//
// sub_A6EE80 from 0xa6ee80 to 0xa6ef58 (216 bytes)
//
// 1 xrefs:
// > ??> @ 0xd2634c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:41 +0000
//
int __fastcall sub_A6EE80(int a1, _DWORD *a2, int a3)
{
int v3; // r12
int result; // r0
int v5; // r3
int v6; // r3
v3 = a2[28];
if ( (v3 & 4) == 0 || (result = a2[30] & 4) != 0 )
{
if ( a3 )
{
if ( (v3 & 2) == 0 || (result = a2[29] & 4) != 0 )
{
if ( (v3 & 1) != 0 )
return (a2[28] & 0x10) != 0;
if ( (a2[28] & 0x2040) == 0x2040 )
return 3;
if ( (v3 & 2) != 0 )
return 4;
if ( (v3 & 8) != 0 )
{
v6 = a2[31];
if ( (v6 & 7) != 0 )
{
result = a2[31] & 2;
if ( (v6 & 2) != 0 )
return 5;
return result;
}
}
return 0;
}
}
else
{
if ( (v3 & 8) == 0 || (v5 = a2[31], (v5 & 0x20) != 0) )
{
result = 1;
}
else
{
if ( (v5 & 0x80) == 0 )
return 0;
result = 2;
}
if ( (v3 & 2) != 0 && (a2[29] & 0xC0) == 0 )
return 0;
}
}
return result;
}