//
// sub_100033DCC from 0x100033dcc to 0x100033e8c (192 bytes)
//
// 2 xrefs:
// > sub_1000335D0 @ 0x100033bb0
// > sub_10046BE64 @ 0x10046bf0c
//
// 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_100033DCC(__int64 result, __int64 *a2, __int64 (__fastcall **a3)(__int64, __int64))
{
_QWORD *v4; // x21
__int64 *v5; // x8
__int64 v7; // x23
__int64 *v8; // x24
__int64 v9; // x0
__int64 v10; // x1
__int64 v11; // x22
__int64 v12; // x25
_QWORD *v13; // x8
if ( (__int64 *)result != a2 )
{
v4 = (_QWORD *)result;
v5 = (__int64 *)(result + 8);
if ( (__int64 *)(result + 8) != a2 )
{
v7 = 0;
v8 = (__int64 *)result;
do
{
v10 = *v8;
v9 = v8[1];
v8 = v5;
result = (*a3)(v9, v10);
if ( (_DWORD)result )
{
v11 = *v8;
v12 = v7;
while ( 1 )
{
*(_QWORD *)((char *)v4 + v12 + 8) = *(_QWORD *)((char *)v4 + v12);
if ( !v12 )
break;
result = (*a3)(v11, *(_QWORD *)((char *)v4 + v12 - 8));
v12 -= 8;
if ( (result & 1) == 0 )
{
v13 = (_QWORD *)((char *)v4 + v12 + 8);
goto LABEL_10;
}
}
v13 = v4;
LABEL_10:
*v13 = v11;
}
v5 = v8 + 1;
v7 += 8;
}
while ( v8 + 1 != a2 );
}
}
return result;
}