//
// sub_10001C6D8 from 0x10001c6d8 to 0x10001c73c (100 bytes)
//
// 6 xrefs:
// > sub_10001C658 @ 0x10001c67c
// > sub_100076CD8 @ 0x100076cfc
// > sub_1001A30C4 @ 0x1001a30f0
// > sub_1001F8C0C @ 0x1001f8c30
// > sub_1002A8C0C @ 0x1002a8c30
// > sub_1003F2CB8 @ 0x1003f2cdc
//
// 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:21 +0000
//
__int64 *__fastcall sub_10001C6D8(__int64 a1, _QWORD *a2, int *a3)
{
__int64 *result; // x0
__int64 *v4; // x11
__int64 *v5; // t1
int v6; // w9
int v7; // w10
__int64 *v8; // x8
int v9; // w11
int v10; // w11
v5 = *(__int64 **)(a1 + 8);
result = (__int64 *)(a1 + 8);
v4 = v5;
if ( v5 )
{
v6 = *a3;
v7 = a3[1];
while ( 1 )
{
while ( 1 )
{
v8 = v4;
v9 = *((_DWORD *)v4 + 7);
if ( v6 >= v9 )
break;
LABEL_4:
v4 = (__int64 *)*v8;
result = v8;
if ( !*v8 )
goto LABEL_12;
}
if ( v9 >= v6 )
{
v10 = *((_DWORD *)v8 + 8);
if ( v7 < v10 )
goto LABEL_4;
if ( v10 >= v7 )
goto LABEL_12;
}
result = v8 + 1;
v4 = (__int64 *)v8[1];
if ( !v4 )
goto LABEL_12;
}
}
v8 = result;
LABEL_12:
*a2 = v8;
return result;
}