When the shift count is a register
Up to now every shift moved by a constant, which is why MWCC could fold the count into an rlwinm (slwi/srwi) or an srawi. A runtime amount leaves nothing to fold. PowerPC keeps separate register-shift opcodes for that case, each reading its count out of a second register. Here's a logical right shift by a variable amount:
srw r3,r3,r4
blr
Three of these track the constant forms by sign: slw shifts left, srw shifts right logically for unsigned values, and sraw shifts right algebraically for signed ones. The signed-versus-unsigned rule hasn't changed — the one new wrinkle is that the count rides in a register instead of inside the instruction.
Spot any of slw/srw/sraw with no trailing i and you know the shift distance came from a variable in the source. Take the direction and sign straight from the mnemonic, and let the second argument carry the count.
Your task
Write func_801aa74c to match the target.