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 then let it widen back, and the value has to be squeezed through that narrow range, so it gets sign-extended from the cast's width on the way out.
Here is 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
When you spot a stray extsb or extsh on its own in the disassembly, it has usually come from an explicit narrowing cast in the source rather than from a load.
Your task
Write as_s8 so it compiles to the single extsb above.