//
// sub_1006245EC from 0x1006245ec to 0x100624680 (148 bytes)
//
// 1 xrefs:
// > sub_100628E44 @ 0x100628f78
//
// 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:21 +0000
//
__int64 __fastcall sub_1006245EC(__int64 a1, unsigned int **a2)
{
__int64 v3; // x20
int v4; // w21
int v6; // w1
bool v7; // cc
int v8; // w0
v3 = *(_QWORD *)(a1 + 48);
v4 = *(_DWORD *)(v3 + 8);
if ( sub_100621DE8(a2, 1) )
return -135;
if ( v4 < 2 )
{
v6 = 0;
}
else
{
v6 = 0;
do
{
++v6;
v7 = (unsigned int)v4 > 3;
v4 = (unsigned int)v4 >> 1;
}
while ( v7 );
}
v8 = sub_100621DE8(a2, v6);
if ( v8 == -1 )
return -136;
else
return *(int *)(v3 + 4LL * *(unsigned __int8 *)(*(_QWORD *)(v3 + 32) + 2LL * v8));
}