//
// sub_100729828 from 0x100729828 to 0x10072992c (260 bytes)
//
// 2 xrefs:
// > sub_1007296AC @ 0x100729790
// > sub_10072992C @ 0x100729a10
//
// 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:13:09 +0000
//
__int64 __fastcall sub_100729828(int *a1, __int64 a2)
{
int v4; // w21
__int64 v5; // x22
int v6; // w8
int v7; // w0
v4 = sub_100704898(a1, a2);
if ( v4 == -1 )
return 0;
if ( (unsigned int)(*(_DWORD *)a2 - 1) <= 1 )
{
while ( 1 )
{
if ( v4 >= (int)sub_100704BB4((unsigned int *)a1) )
return 0;
v5 = sub_100704BC8((__int64)a1, v4);
v6 = *(_DWORD *)v5;
v7 = *(_DWORD *)v5 - *(_DWORD *)a2;
if ( *(_DWORD *)v5 == *(_DWORD *)a2 )
{
if ( v6 == 2 )
{
v7 = sub_100724F68(*(_QWORD *)(v5 + 8), *(_QWORD *)(a2 + 8));
}
else
{
if ( v6 != 1 )
goto LABEL_13;
v7 = sub_100724EC8(*(_QWORD *)(v5 + 8), *(_QWORD *)(a2 + 8));
}
}
if ( v7 )
return 0;
v6 = *(_DWORD *)a2;
LABEL_13:
if ( v6 == 2 )
{
if ( !(unsigned int)sub_100725008(*(_QWORD *)(v5 + 8), *(_QWORD *)(a2 + 8)) )
return v5;
}
else if ( v6 != 1 || !(unsigned int)sub_1007250E0(*(__int64 **)(v5 + 8), *(__int64 **)(a2 + 8)) )
{
return v5;
}
++v4;
}
}
return sub_100704BC8((__int64)a1, v4);
}