//
// sub_2B4390 from 0x2b4390 to 0x2b43d0 (64 bytes)
//
// 21 xrefs:
// > sub_75EE20 @ 0x75eeee
// > ??> @ 0x75ef28
// > ??> @ 0x75f220
// > ??> @ 0x75f342
// > ??> @ 0x75f448
// > ??> @ 0x75f55c
// > ??> @ 0x75f67c
// > sub_75F74C @ 0x75f81a
// > ??> @ 0x75f854
// > ??> @ 0x75f93c
// > ??> @ 0x75fa42
// > ??> @ 0x75fb52
// > ??> @ 0x75fc6e
// > sub_75FD3C @ 0x75fe0a
// > ??> @ 0x75fe44
// > ??> @ 0x75ff6c
// > ??> @ 0x760088
// > ??> @ 0x7601d4
// > ??> @ 0x76031e
// > sub_760420 @ 0x7604ee
// > ??> @ 0x760528
//
// 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_2B4390(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);
}