//
// sub_CE28F4 from 0xce28f4 to 0xce2a60 (364 bytes)
//
// 2 xrefs:
// > ??> @ 0x111e1b8
// > ??> @ 0x111e208
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_QWORD *__fastcall sub_CE28F4(
__int64 a1,
_QWORD *a2,
__int64 a3,
_QWORD *a4,
__int64 a5,
__int64 a6,
_DWORD *a7,
_DWORD *a8)
{
_QWORD *v13; // x0
_QWORD *v14; // x0
int v15; // w1
_QWORD *v16; // x19
int v17; // w25
int v18; // w0
v13 = sub_CDD1F0(a6 + 208);
v14 = sub_CE1914(a1, a2, a3, a4, a5, a6, a7, a8, *(const char **)(v13[2] + 32LL));
v16 = v14;
if ( !v14 || v15 == -1 && v14[2] >= v14[3] && (*(unsigned int (__fastcall **)(_QWORD *))(*v14 + 72LL))(v14) == -1 )
{
v16 = nullptr;
v17 = 1;
if ( !a4 )
{
LABEL_8:
*a7 |= 2u;
return v16;
}
}
else
{
v17 = 0;
if ( !a4 )
return v16;
}
v18 = 0;
if ( (_DWORD)a5 == -1 )
v18 = a4[2] >= a4[3] && (*(__int64 (__fastcall **)(_QWORD *))(*a4 + 72LL))(a4) == -1;
if ( v17 == v18 )
goto LABEL_8;
return v16;
}