//
// sub_6DF4C from 0x6df4c to 0x6dfda (142 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_6DF4C(int a1)
{
int v2; // r5
int v3; // r0
unsigned int *v4; // r0
unsigned int v5; // r1
v2 = sub_5D838(*(_DWORD **)(a1 + 48), *(_DWORD *)(a1 + 36), *(_DWORD *)(a1 + 72), 0, 1);
if ( !v2 )
{
qmemcpy(
(void *)(*(_DWORD *)(a1 + 68) + 8 * (*(_DWORD *)(a1 + 8) + 1) * *(_DWORD *)(a1 + 32)),
*(const void **)(a1 + 72),
8 * (*(_DWORD *)(a1 + 8) + 1));
v3 = *(_DWORD *)(a1 + 32);
*(_DWORD *)(a1 + 32) = v3 - 1;
if ( v3 <= 0 )
*(_DWORD *)(a1 + 32) = *(_DWORD *)(a1 + 24) - 1;
v4 = (unsigned int *)(a1 + 88);
__dmb(0xBu);
do
v5 = __ldrex(v4);
while ( __strex(v5 + 1, v4) );
__dmb(0xBu);
sub_46AF6((int)&unk_F4D34 + 616 * *(_DWORD *)(*(_DWORD *)(a1 + 4) + 68832) + 308 * *(_DWORD *)(a1 + 104));
}
return v2;
}