//
// sub_100655CF0 from 0x100655cf0 to 0x100655d88 (152 bytes)
//
// 1 xrefs:
// > sub_100654DEC @ 0x1006553d4
//
// 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:10:52 +0000
//
__int64 __fastcall sub_100655CF0(__int64 a1)
{
__int64 v2; // x22
__int64 v3; // x20
__int64 v4; // x21
__int64 result; // x0
v2 = *(_QWORD *)(*(_QWORD *)(a1 + 80) + 8LL);
v3 = *(unsigned int *)(a1 + 96);
v4 = *(int *)(a1 + 100);
*(_DWORD *)(a1 + 40) = 2;
result = sub_100700894(*(_QWORD *)(a1 + 24), v2 + v4, v3);
if ( (int)result <= 0 )
{
LABEL_4:
*(_DWORD *)(a1 + 96) = v3;
*(_DWORD *)(a1 + 100) = v4;
}
else
{
while ( 1 )
{
*(_DWORD *)(a1 + 40) = 1;
v3 = (unsigned int)(v3 - result);
if ( !(_DWORD)v3 )
return (unsigned int)(result + v4);
LODWORD(v4) = result + v4;
*(_DWORD *)(a1 + 40) = 2;
result = sub_100700894(*(_QWORD *)(a1 + 24), v2 + (int)v4, v3);
if ( (int)result < 1 )
goto LABEL_4;
}
}
return result;
}