Single-bit bitfields compile to rlwimi
Get this idiom wrong and nothing matches. A single-bit C bitfield assigned 1 won't turn into a hand-rolled OR-mask. Take this struct:
typedef struct { u8 active : 1; u8 visible : 1; u8 dead : 1; } Flags;
Assigning any one of these bits makes the compiler load the whole byte, rotate the new value into the bit's slot with rlwimi (rotate-left-word-immediate, then mask-insert), and write the byte back. Set the second bit, visible, and you get:
lbz r0, 0(r3)
li r4, 1
rlwimi r0, r4, 6, 25, 25
stb r0, 0(r3)
blr
rlwimi rA, rS, SH, MB, ME works like this: rotate rS left by SH, then drop bits MB..ME of that result into rA, leaving everything else untouched. Shift the field one bit further in the byte and the rotate amount and mask bounds each move by one. The field's position sets those numbers.
Now contrast the manual spelling *p |= mask. That emits an ori:
lbz r0, 0(r3)
ori r0, r0, 1
stb r0, 0(r3)
The bytes end up identical, but the instructions don't. A li; rlwimi pair writing a single bit came from a u8 x:1 bitfield assignment, not a hand-written |= mask. Mask-and-OR by hand gives ori rather than rlwimi, and that won't line up with the compiled output.
Your task
With Flags above, write func_800621a4 to reproduce the target assembly.