An explicit cast can be a whole instruction
Not every cast is free. Push a wide signed value down into a narrower signed type and let it widen back, and the value has to squeeze through that narrow range — so it gets sign-extended from the cast's width on the way out.
Here's a function that narrows an int into the range of a signed halfword:
extsh r3, r3 # narrow to s16 width, sign bit re-spread
blr
What extsh (extend sign halfword) does is hold onto the low 16 bits and copy bit 15 up across the top 16, so the register ends up holding a properly sign-extended 32-bit value. Drop down a width and you get extsb (extend sign byte), which does the same trick from bit 7 across the top 24:
extsb r3, r3 # narrow to s8 width, sign bit re-spread
blr
A stray extsb or extsh on its own in a disassembly usually comes from an explicit narrowing cast in the source rather than from a load.
Your task
Write func_80277678 so it compiles to the single extsb above.