//
// sub_745378 from 0x745378 to 0x7453c4 (76 bytes)
//
// 4 xrefs:
// > sub_744A84 @ 0x744aee
// > sub_744FE0 @ 0x74504a
// > sub_7453C8 @ 0x7453dc
// > sub_745404 @ 0x745418
//
// 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_745378(int a1)
{
_DWORD *v1; // r3
unsigned int *v3; // r1
unsigned int v4; // r2
_DWORD *v5; // r4
v1 = *(_DWORD **)(a1 + 24);
if ( v1 )
{
if ( !&pthread_create )
goto LABEL_10;
LABEL_3:
v3 = v1 + 3;
__dmb(0xFu);
do
v4 = __ldrex(v3);
while ( __strex(v4 - 1, v3) );
__dmb(0xFu);
while ( !v4 )
{
v5 = (_DWORD *)*v1;
operator delete(v1);
v1 = v5;
if ( !v5 )
break;
if ( &pthread_create )
goto LABEL_3;
LABEL_10:
v4 = v1[3];
v1[3] = v4 - 1;
}
}
*(_DWORD *)(a1 + 24) = 0;
}