Forcing bits on
OR is the bit-setter. Every bit the mask has on comes out on in the result, and the rest pass through exactly as they were. For that, MWCC reaches for its immediate form, ori.
Watch n get OR'd with 0x05, decimal 5:
ori r3, r3, 5
blr
No dot rides on plain ori, so it never touches the condition register the way andi. does. Contiguity is a non-issue too. ori swallows any 16-bit pattern you throw at it, which is why the rotate tricks AND sometimes needs never appear here.
The one real limit is width. A constant past the low 16 bits won't fit, so MWCC splits it in two, oris for the high half-word and ori for the low. A pair like that is just the mask outgrowing the bottom 16 bits.
The target sits below. Turn its ori immediate back into the mask, then write the C expression behind it.
ori r3, r3, 18
blr
Your task
Write set_bits to match the target.