//
// __cxa_rethrow_primary_exception from 0x97fde4 to 0x97fe58 (116 bytes)
//
// 1 xrefs:
// > std::rethrow_exception @ 0x95432a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:06:06 +0000
//
_DWORD *__fastcall _cxa_rethrow_primary_exception(_DWORD *result)
{
_DWORD *v1; // r5
_DWORD *dependent_exception; // r4
unsigned int *v3; // r0
unsigned int v4; // r1
_DWORD *v5; // r4
int globals; // r0
v1 = result;
if ( result )
{
dependent_exception = _cxa_allocate_dependent_exception();
v3 = v1 - 32;
*dependent_exception = v1;
__dmb(0xBu);
do
v4 = __ldrex(v3);
while ( __strex(v4 + 1, v3) );
__dmb(0xBu);
dependent_exception[1] = *(v1 - 31);
dependent_exception[3] = std::get_unexpected();
dependent_exception[4] = std::get_terminate();
dependent_exception[10] = 1126902529;
v5 = dependent_exception + 10;
v5[1] = 1129074247;
globals = _cxa_get_globals();
++*(_DWORD *)(globals + 4);
v5[2] = sub_97FE5C;
sub_952DF0(v5);
return _cxa_begin_catch(v5);
}
return result;
}