//
// sub_1001E920C from 0x1001e920c to 0x1001e92c0 (180 bytes)
//
// 1 xrefs:
// > sub_1001E90A4 @ 0x1001e90e0
//
// 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:00:34 +0000
//
__int64 *__fastcall sub_1001E920C(__int64 *result, _QWORD *a2)
{
int8x8_t v2; // x8
unsigned __int64 v3; // x10
uint8x8_t v4; // d0
__int64 v5; // x12
_QWORD *v6; // x11
unsigned __int64 v7; // x10
v2 = (int8x8_t)result[1];
v3 = a2[1];
v4 = (uint8x8_t)vcnt_s8(v2);
v4.i16[0] = vaddlv_u8(v4);
if ( v4.u32[0] > 1uLL )
{
if ( v3 >= *(_QWORD *)&v2 )
v3 %= *(_QWORD *)&v2;
}
else
{
v3 &= *(_QWORD *)&v2 - 1LL;
}
v5 = *result;
v6 = *(_QWORD **)(*result + 8 * v3);
if ( v6 )
{
*a2 = *v6;
LABEL_13:
*v6 = a2;
goto LABEL_14;
}
*a2 = result[2];
result[2] = (__int64)a2;
*(_QWORD *)(v5 + 8 * v3) = result + 2;
if ( *a2 )
{
v7 = *(_QWORD *)(*a2 + 8LL);
if ( v4.u32[0] > 1uLL )
{
if ( v7 >= *(_QWORD *)&v2 )
v7 %= *(_QWORD *)&v2;
}
else
{
v7 &= *(_QWORD *)&v2 - 1LL;
}
v6 = (_QWORD *)(*result + 8 * v7);
goto LABEL_13;
}
LABEL_14:
++result[3];
return result;
}