//
// sub_100033E8C from 0x100033e8c to 0x100033f20 (148 bytes)
//
// 1 xrefs:
// > sub_1000335D0 @ 0x100033c34
//
// 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 10:57:31 +0000
//
__int64 __fastcall sub_100033E8C(__int64 result, _QWORD *a2, __int64 (__fastcall **a3)(__int64, __int64))
{
_QWORD *v4; // x21
_QWORD *i; // x8
__int64 v7; // x0
__int64 v8; // x1
__int64 v9; // x22
_QWORD *v10; // x23
_QWORD *v11; // x8
__int64 v12; // t1
if ( (_QWORD *)result != a2 )
{
v4 = (_QWORD *)result;
for ( i = (_QWORD *)(result + 8); v4 + 1 != a2; i = v4 + 1 )
{
v8 = *v4;
v7 = v4[1];
v4 = i;
result = (*a3)(v7, v8);
if ( (_DWORD)result )
{
v9 = *v4;
v10 = v4;
do
{
v11 = v10;
v12 = *--v10;
*v11 = v12;
result = (*a3)(v9, *(v11 - 2));
}
while ( (result & 1) != 0 );
*v10 = v9;
}
}
}
return result;
}