//
// sub_100692470 from 0x100692470 to 0x100692568 (248 bytes)
//
// 1 xrefs:
// > sub_10066F79C @ 0x10066f800
//
// 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:11:32 +0000
//
__int64 __fastcall sub_100692470(__int64 result, __int64 a2, __int64 (__fastcall *a3)(__int64, _QWORD))
{
__int64 v5; // x19
int v6; // w8
__int64 v7; // x24
_QWORD *v8; // x22
_QWORD *v9; // x23
_QWORD *v10; // x25
_QWORD *v11; // x20
_QWORD *v12; // x1
_QWORD *v13; // x21
v5 = result;
if ( result )
{
v6 = *(_DWORD *)(result + 32);
if ( v6 >= 1 )
{
v7 = 0;
if ( a3 )
{
do
{
v8 = *(_QWORD **)(*(_QWORD *)v5 + 8 * v7);
v9 = (_QWORD *)*v8;
if ( *v8 )
{
do
{
v10 = (_QWORD *)v9[2];
result = a3(a2, *(_QWORD *)*v9);
if ( (_DWORD)result )
{
result = sub_100691D08((__int64)v8, v9, v5);
--*(_QWORD *)(v5 + 40);
}
v9 = v10;
}
while ( v10 );
v6 = *(_DWORD *)(v5 + 32);
}
++v7;
}
while ( v7 < v6 );
}
else
{
do
{
v11 = *(_QWORD **)(*(_QWORD *)v5 + 8 * v7);
v12 = (_QWORD *)*v11;
if ( *v11 )
{
do
{
v13 = (_QWORD *)v12[2];
result = sub_100691D08((__int64)v11, v12, v5);
--*(_QWORD *)(v5 + 40);
v12 = v13;
}
while ( v13 );
}
++v7;
}
while ( v7 < *(int *)(v5 + 32) );
}
}
}
return result;
}