//
// sub_2B445C from 0x2b445c to 0x2b449c (64 bytes)
//
// 6 xrefs:
// > ??> @ 0x7768b0
// > ??> @ 0x7768c6
// > ??> @ 0x7768d6
// > ??> @ 0x7768e4
// > sub_776A9C @ 0x776ba4
// > ??> @ 0x776bb8
//
// 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_2B445C(unsigned int *a1)
{
unsigned int *v1; // r2
int v2; // r3
if ( &pthread_create )
{
v1 = a1 + 2;
__dmb(0xFu);
do
v2 = __ldrex(v1);
while ( __strex(v2 - 1, v1) );
__dmb(0xFu);
}
else
{
v2 = a1[2];
a1[2] = v2 - 1;
}
if ( v2 <= 0 )
operator delete(a1);
}