//
// sub_10066B3C8 from 0x10066b3c8 to 0x10066b43c (116 bytes)
//
// 2 xrefs:
// > sub_100649174 @ 0x100649558
// > sub_1006663D4 @ 0x100666408
//
// 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:04 +0000
//
__int64 __fastcall sub_10066B3C8(__int64 a1)
{
__int64 v1; // x8
__int64 v2; // x9
unsigned int v4; // w10
v2 = *(_QWORD *)(a1 + 24);
v1 = *(_QWORD *)(a1 + 32);
if ( v1 & 0x40 | v2 & 0x60 )
return 5;
if ( (v2 & 2) != 0 )
return 3;
if ( (v2 & 4) != 0 )
return 4;
if ( (v1 & 2) != 0 )
return 2;
if ( (v1 & 1) != 0 )
return 0;
if ( (v1 & 0x100) != 0 )
v4 = 6;
else
v4 = (((unsigned int)v1 >> 6) & 8) - 1;
if ( (v1 & 0x20) != 0 )
return 0xFFFFFFFFLL;
else
return v4;
}