Forcing bits on
OR is the bit-setter. Every bit the mask has on comes out on in the result; the rest pass through as they were. For that, MWCC uses ori.
Watch n get OR'd with 0x05, decimal 5:
ori r3, r3, 5
blr
Plain ori has no dot, so it never touches the condition register the way andi. does. Contiguity doesn't matter either: 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 is below. Turn its ori immediate back into the mask, then write the C expression behind it.
ori r3, r3, 18
blr
Your task
Write func_8031d49c to match the target.