Use #pragma push and #pragma pop on #pragma
arm or #pragma thumb outside of functions,
but not inside of them, to change state. This is because #pragma
arm and #pragma thumb only apply at
the function level. Instead, put them around the function definition.