Instead of duplicating stack unwinding code everywhere, introduce a new AK helper to unwind the stack in a generic way.