//
// std::runtime_error::operator= from 0x977a2c to 0x977a78 (76 bytes)
//
// 1 xrefs:
// > fmt::SystemError::init @ 0x81f20c
//
// 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:05:59 +0000
//
int __fastcall std::runtime_error::operator=(int a1, int a2)
{
int v3; // r1
int v4; // r0
unsigned int *v5; // r1
unsigned int v6; // r2
unsigned int *v7; // r1
unsigned int v8; // r2
signed int v9; // r2
v3 = *(_DWORD *)(a2 + 4);
v4 = *(_DWORD *)(a1 + 4);
*(_DWORD *)(a1 + 4) = v3;
v5 = (unsigned int *)(v3 - 4);
__dmb(0xBu);
do
v6 = __ldrex(v5);
while ( __strex(v6 + 1, v5) );
v7 = (unsigned int *)(v4 - 4);
__dmb(0xBu);
__dmb(0xBu);
do
{
v8 = __ldrex(v7);
v9 = v8 - 1;
}
while ( __strex(v9, v7) );
__dmb(0xBu);
if ( v9 <= -1 )
operator delete((void *)(v4 - 12));
return a1;
}