//
// sub_10062F8C0 from 0x10062f8c0 to 0x10062f98c (204 bytes)
//
// 7 xrefs:
// > sub_10058C338 @ 0x10058e954
// > sub_10058C338 @ 0x10058ea04
// > sub_10058EBC8 @ 0x10058ecd0
// > sub_10058EFB0 @ 0x10058f0ec
// > ??> @ 0x1009ab0d8
// > ??> @ 0x1009ab300
// > ??> @ 0x1009adbb8
//
// 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:10:27 +0000
//
__int64 __fastcall sub_10062F8C0(_QWORD *a1, int a2, _QWORD *a3)
{
__int64 v4; // x22
__int64 v7; // x23
__int64 v8; // x24
__int64 result; // x0
int v10; // [xsp+Ch] [xbp-34h] BYREF
v10 = 0;
if ( !a3 )
return 31;
v4 = a1[12];
if ( !v4 )
return 9;
v8 = a1[13];
v7 = a1[14];
result = (*(__int64 (__fastcall **)(_QWORD *, int *))(*a1 + 296LL))(a1, &v10);
if ( (_DWORD)result )
return result;
if ( (unsigned int)(a2 + 1) < 2 )
goto LABEL_13;
if ( a2 == -3 )
{
v4 = v8;
goto LABEL_13;
}
v4 = v8;
if ( v10 - 1 == a2 )
goto LABEL_13;
v4 = v7;
if ( a2 == -2 )
goto LABEL_13;
if ( v10 <= a2 )
return 9;
v4 = *(_QWORD *)(a1[2] + 8LL * a2);
LABEL_13:
*a3 = v4;
return 0;
}