Keeping only the bits you want
Masking throws away the bits you don't care about. AND a number with a mask and only the mask's set bits survive; everything else collapses to zero. When those set bits lie scattered rather than forming a single run, MWCC falls back to its immediate AND, andi..
Watch n get masked with 0x0A — decimal 10, bits 1 and 3 set:
andi. r3, r3, 10
blr
Only 16 bits fit in that immediate, which pins andi. to the low half-word and nothing above it. The dot riding on the mnemonic is a separate matter: it writes cr0 as a side effect. MWCC keeps emitting andi. even where the flags go unread, because PowerPC has no dotless immediate AND.
(A run of contiguous bits compiles another way — "Testing Whether a Bit Is Set" covers that. Because 0x0A splits its set bits apart, andi. is what you land on.)
The target is below. Recover the mask from its immediate, then write the C expression that reproduces it.
andi. r3, r3, 18
blr
Your task
Write func_803564a0 to match the target.