//
// sub_100611E80 from 0x100611e80 to 0x100611f24 (164 bytes)
//
// 3 xrefs:
// > sub_100612A1C @ 0x100612ca0
// > sub_1006135F8 @ 0x1006136b0
// > sub_100615A58 @ 0x100615b18
//
// 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:10 +0000
//
__int64 __fastcall sub_100611E80(__int64 a1, __int64 a2)
{
__int64 v2; // x19
int v4; // w8
unsigned int v5; // w1
bool v6; // cc
int v7; // w0
int v8[8]; // [xsp+0h] [xbp-30h] BYREF
v2 = *(_QWORD *)(a1 + 32);
sub_1005524A8((__int64)v8, *(_QWORD *)a2, *(_DWORD *)(a2 + 8));
if ( (unsigned int)sub_100552800(v8, 1u) )
return 4294967161LL;
v4 = *(_DWORD *)(v2 + 8);
if ( v4 < 2 )
{
v5 = 0;
}
else
{
v5 = 0;
do
{
++v5;
v6 = (unsigned int)v4 > 3;
v4 = (unsigned int)v4 >> 1;
}
while ( v6 );
}
v7 = sub_100552800(v8, v5);
if ( v7 == -1 )
return 4294967160LL;
else
return *(unsigned int *)(v2 + 4LL * **(int **)(v2 + 8LL * v7 + 32));
}