//
// sub_1007338C0 from 0x1007338c0 to 0x1007339cc (268 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009eccf8
//
// 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:13 +0000
//
__int64 __fastcall sub_1007338C0(__int64 a1, __int64 a2, int a3)
{
__int64 v4; // x8
__int64 result; // x0
__int64 v6; // x8
int v9; // w8
__int64 v10; // x0
v4 = *(_QWORD *)(a2 + 72);
if ( a3 )
{
if ( (v4 & 2) == 0 || (*(_BYTE *)(a2 + 80) & 4) != 0 )
{
if ( (v4 & 1) != 0 )
{
return ((unsigned int)v4 >> 4) & 1;
}
else
{
if ( (v4 & 0x2040) == 0x2040 )
result = 3;
else
result = 4;
if ( (v4 & 0x2040) != 0x2040 && (v4 & 2) == 0 )
{
if ( (v4 & 8) != 0 && (*(_BYTE *)(a2 + 96) & 7) != 0 )
return 5;
else
return 0;
}
}
}
else
{
return 0;
}
}
else
{
if ( (v4 & 2) != 0 )
{
v6 = v4 & 4;
if ( (*(_QWORD *)(a2 + 80) & 0xFFFFFFFFFFFFFF3FLL) != 0 || (*(_QWORD *)(a2 + 80) & 0xC0LL) == 0 || v6 == 0 )
return 0;
}
else if ( (v4 & 4) == 0 )
{
return 0;
}
if ( *(_QWORD *)(a2 + 88) == 64 )
{
v9 = sub_100728FB8(a2, 0x7Eu, -1);
result = true;
if ( (v9 & 0x80000000) == 0 )
{
v10 = sub_100728FC4(a2, v9);
if ( !sub_100728F6C(v10) )
return false;
}
}
else
{
return 0;
}
}
return result;
}