//
// sub_D1F048 from 0xd1f048 to 0xd1f0b4 (108 bytes)
//
// 1 xrefs:
// > std::rethrow_exception @ 0xd1f2fc
//
// 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 sub_D1F048(unsigned int a1, __int64 a2)
{
void (**v2)(); // x19
unsigned int *v3; // x0
unsigned int v4; // w1
unsigned int v5; // w1
void (__fastcall *v6)(void (**)()); // x1
v2 = *(void (***)())(a2 - 80);
if ( a1 > 1 )
__cxxabiv1::__terminate(*(v2 - 11));
_cxa_free_dependent_exception((__int64 *)(a2 - 80));
v3 = (unsigned int *)(v2 - 16);
do
{
v4 = __ldaxr(v3);
v5 = v4 - 1;
}
while ( __stlxr(v5, v3) );
if ( !v5 )
{
v6 = (void (__fastcall *)(void (**)()))*(v2 - 13);
if ( v6 )
v6(v2);
_cxa_free_exception(v2);
}
}