//
// sub_1005A1570 from 0x1005a1570 to 0x1005a15c4 (84 bytes)
//
// 1 xrefs:
// > sub_1005A141C @ 0x1005a1468
//
// 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:09:01 +0000
//
__int64 __fastcall sub_1005A1570(__int64 a1, __int64 a2, unsigned __int64 a3, int a4)
{
unsigned int v4; // w9
if ( (_DWORD)a3 && a4 != 8 )
{
v4 = *(_DWORD *)(*(_QWORD *)(a1 + 8) + 8LL) - 1;
if ( v4 <= 4 )
a3 = (qword_100773108[v4] * (unsigned __int64)(unsigned int)a3) >> 3;
LODWORD(a3) = a3 * *(_DWORD *)(*(_QWORD *)(a1 + 8) + 12LL);
}
return sub_1005D0A20(*(_QWORD *)(a1 + 368), (unsigned int)(*(_DWORD *)(a1 + 272) + a3), 0);
}