//
// std::rethrow_exception from 0x779cd0 to 0x779d4a (122 bytes)
//
// 0 xrefs:
//
// 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
//
void __fastcall __noreturn std::rethrow_exception(std::__exception_ptr::exception_ptr *a1)
{
int v1; // r5
char *dependent_exception; // r0
unsigned int *v3; // r5
char *v4; // r4
unsigned int v5; // r3
void *terminate; // r0
v1 = std::__exception_ptr::exception_ptr::_M_get(a1);
dependent_exception = _cxa_allocate_dependent_exception();
*(_DWORD *)dependent_exception = v1;
v3 = (unsigned int *)(v1 - 128);
v4 = dependent_exception;
__dmb(0xFu);
do
v5 = __ldrex(v3);
while ( __strex(v5 + 1, v3) );
__dmb(0xFu);
*((_DWORD *)dependent_exception + 2) = std::get_unexpected();
terminate = std::get_terminate();
v4[32] = 71;
v4[33] = 78;
v4[34] = 85;
v4[39] = 1;
*((_DWORD *)v4 + 10) = sub_779AE8;
v4[35] = 67;
v4[36] = 67;
v4[37] = 43;
v4[38] = 43;
*((_DWORD *)v4 + 3) = terminate;
Unwind_RaiseException(v4 + 32);
_cxa_begin_catch(v4 + 32);
std::terminate();
}