//
// sub_1002F6A3C from 0x1002f6a3c to 0x1002f6c10 (468 bytes)
//
// 2 xrefs:
// > GameObject::customSetup @ 0x1002f4f20
// > LevelEditorLayer::addSpecial @ 0x1003f9f78
//
// 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:03:00 +0000
//
__int64 __fastcall sub_1002F6A3C(__int64 a1)
{
int v1; // w8
__int64 result; // x0
bool v3; // zf
unsigned int v4; // w8
bool v5; // zf
unsigned int v6; // w8
bool v7; // cc
__int64 v8; // x8
bool v10; // zf
bool v11; // zf
v1 = *(_DWORD *)(a1 + 1028);
result = 1;
if ( v1 > 2014 )
{
if ( v1 > 3601 )
{
v6 = v1 - 3602;
v7 = v6 > 0x3C;
v8 = (1LL << v6) & 0x1C00004000000CFFLL;
if ( v7 || v8 == 0 )
return 0;
}
else
{
v3 = (unsigned int)(v1 - 2999) > 0x20 || ((1LL << ((unsigned __int8)v1 + 73)) & 0x1C37FFF81LL) == 0;
if ( v3 && ((unsigned int)(v1 - 2015) > 0x35 || ((1LL << ((unsigned __int8)v1 + 33)) & 0x30800000000001LL) == 0) )
{
v4 = v1 - 2900;
if ( v4 > 0x19 || ((1 << v4) & 0x2000003) == 0 )
return 0;
}
}
}
else if ( v1 <= 743 )
{
if ( (unsigned int)(v1 - 22) >= 0xD )
{
v5 = (unsigned int)(v1 - 55) > 0x32 || ((1LL << ((unsigned __int8)v1 - 55)) & 0x400000000001FLL) == 0;
if ( v5 && (unsigned int)(v1 - 200) >= 4 )
return 0;
}
}
else if ( v1 > 1615 )
{
v10 = (unsigned int)(v1 - 1912) > 0x17 || ((1 << (v1 - 120)) & 0xC0003F) == 0;
if ( v10 && ((unsigned int)(v1 - 1812) > 3 || v1 == 1813) && v1 != 1616 )
return 0;
}
else if ( v1 <= 1005 )
{
v11 = (unsigned int)(v1 - 899) > 0x10 || ((1 << (v1 + 125)) & 0x10007) == 0;
if ( v11 && v1 != 744 )
return 0;
}
else if ( ((unsigned int)(v1 - 1006) > 0x2B || ((1LL << ((unsigned __int8)v1 + 18)) & 0x80000000003LL) == 0)
&& ((unsigned int)(v1 - 1334) > 0xD || ((1 << (v1 - 54)) & 0x3001) == 0)
&& v1 != 1268 )
{
return 0;
}
return result;
}