//
// sub_75F6AC from 0x75f6ac to 0x75f736 (138 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
//
int __fastcall sub_75F6AC(int a1, int *a2)
{
int v2; // r3
int v5; // r1
void *v6; // r0
int v7; // r3
unsigned int *v9; // r1
int v10; // r3
v2 = *a2;
v5 = *(_DWORD *)(a1 + 44);
*(_DWORD *)a1 = v2;
v6 = (void *)(v5 - 12);
*(_DWORD *)(a1 + *(_DWORD *)(v2 - 12)) = a2[3];
*(_DWORD *)(a1 + 8) = &off_AB00A0;
if ( (_UNKNOWN *)(v5 - 12) != &unk_ACDDAC )
{
if ( &pthread_create )
{
v9 = (unsigned int *)(v5 - 4);
__dmb(0xFu);
do
v10 = __ldrex(v9);
while ( __strex(v10 - 1, v9) );
__dmb(0xFu);
}
else
{
v10 = *(_DWORD *)(v5 - 4);
*(_DWORD *)(v5 - 4) = v10 - 1;
}
if ( v10 <= 0 )
operator delete(v6);
}
*(_DWORD *)(a1 + 8) = &off_A2E1D8;
sub_756898((unsigned int **)(a1 + 36));
v7 = a2[1];
*(_DWORD *)a1 = v7;
*(_DWORD *)(a1 + *(_DWORD *)(v7 - 12)) = a2[2];
return a1;
}