//
// __sfp_handle_exceptions from 0xe8d750 to 0xe8d7b0 (96 bytes)
//
// 10 xrefs:
// > __addtf3 @ 0xe88230
// > __divtf3 @ 0xe88aec
// > __eqtf2 @ 0xe88be4
// > __gttf2 @ 0xe88d1c
// > __lttf2 @ 0xe88e58
// > __multf3 @ 0xe8953c
// > __extendsftf2 @ 0xe89774
// > __trunctfsf2 @ 0xe89a24
// > __trunctfdf2 @ 0xe89ce0
// > ??> @ 0x71e80
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
unsigned __int64 __fastcall _sfp_handle_exceptions(unsigned __int64 result)
{
if ( (result & 1) != 0 )
_ReadStatusReg(FPSR);
if ( (result & 2) != 0 )
_ReadStatusReg(FPSR);
if ( (result & 4) != 0 )
_ReadStatusReg(FPSR);
if ( (result & 8) != 0 )
_ReadStatusReg(FPSR);
if ( (result & 0x10) != 0 )
return _ReadStatusReg(FPSR);
return result;
}