//
// sub_1006A0D64 from 0x1006a0d64 to 0x1006a0df8 (148 bytes)
//
// 4 xrefs:
// > sub_10067AEC4 @ 0x10067af3c
// > sub_10069BF28 @ 0x10069c02c
// > sub_10069E3FC @ 0x10069e4e4
// > sub_10069FB9C @ 0x10069fc88
//
// 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:11:39 +0000
//
__int64 __fastcall sub_1006A0D64(_QWORD *a1)
{
_QWORD *v2; // x20
__int64 result; // x0
__int64 v4; // x9
__int64 v5; // x1
__int64 v6; // [xsp+8h] [xbp-18h] BYREF
v2 = a1 + 5;
result = sub_100678AB8(a1[11], *(_DWORD *)(a1[11] + 464LL), a1[5] + a1[7] - a1[6], a1[6], &v6);
if ( !(_DWORD)result )
{
v4 = a1[6];
if ( v4 == v6 )
{
off_1009E5FD8((void *)a1[5]);
v2[1] = 0;
v2[2] = 0;
*v2 = 0;
a1[8] = sub_10066F074();
a1[9] = v5;
}
else
{
a1[6] = v4 - v6;
}
return 0;
}
return result;
}