//
// sub_100707CFC from 0x100707cfc to 0x100707e04 (264 bytes)
//
// 2 xrefs:
// > sub_1006FDDA4 @ 0x1006fdef4
// > sub_10073B9B8 @ 0x10073bb80
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:12:52 +0000
//
__int64 sub_100707CFC()
{
_DWORD *v0; // x19
int v1; // w9
int v2; // w8
__int64 result; // x0
char *v4; // x10
_DWORD *v5; // x10
char v6; // t1
int v7; // w8
void *v8; // x0
int v9; // w8
v0 = sub_1007070B4();
v1 = v0[149];
v2 = v0[148];
if ( v1 == v2 )
return 0;
while ( 1 )
{
v4 = (char *)&v0[v2];
v6 = v4[16];
v5 = v4 + 16;
if ( (v6 & 1) != 0 )
break;
*v5 = 0;
*(_QWORD *)&v0[2 * v0[148] + 20] = 0;
v7 = v0[148];
v8 = *(void **)&v0[2 * v7 + 52];
if ( v8 && (v0[v7 + 84] & 1) != 0 )
{
sub_1006AEDAC(v8);
*(_QWORD *)&v0[2 * v0[148] + 52] = 0;
v7 = v0[148];
}
result = 0;
v0[v7 + 84] = 0;
*(_QWORD *)&v0[2 * v0[148] + 100] = 0;
v0[v0[148] + 132] = -1;
v9 = v0[148];
if ( v9 )
v2 = v9 - 1;
else
v2 = 15;
v0[148] = v2;
v1 = v0[149];
if ( v1 == v2 )
return result;
}
if ( v1 == v2 )
return 0;
v0[v2 + 4] &= ~1u;
return 1;
}