//
// sub_10036E414 from 0x10036e414 to 0x10036e604 (496 bytes)
//
// 3 xrefs:
// > sub_100369218 @ 0x10036c750
// > sub_10036CF0C @ 0x10036d0cc
// > sub_10036D1A0 @ 0x10036d21c
//
// 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:21 +0000
//
__int64 __fastcall sub_10036E414(__int64 a1, __int64 a2)
{
__int64 v4; // x21
__int64 v5; // x22
__int64 i; // x23
__n128 v7; // q0
__int64 v8; // x0
__n128 v9; // q0
__int64 v10; // x0
__n128 v11; // q0
__int64 v12; // x0
__n128 v13; // q0
__int64 v14; // x0
__int64 j; // x23
__n128 v16; // q0
__int64 v17; // x0
__n128 v18; // q0
__int64 v19; // x0
__n128 v20; // q0
__int64 v21; // x0
__n128 v22; // q0
__int64 v23; // x0
unsigned int v24; // w21
__int64 v25; // x0
unsigned int v26; // w21
__int64 v27; // x0
__int64 result; // x0
v4 = sub_1002E75A0(*(_QWORD *)(a1 + 744), 0);
v5 = sub_1002E75A0(*(_QWORD *)(a1 + 752), 0);
for ( i = 8; i != 18; ++i )
{
v7 = cocos2d::CCDictionary::objectForKey_1(v4, i);
(*(void (__fastcall **)(__int64, __int64, __n128))(*(_QWORD *)v8 + 344LL))(v8, a2, v7);
v9 = cocos2d::CCDictionary::objectForKey_1(v4, i);
(*(void (__fastcall **)(__int64, __int64, __n128))(*(_QWORD *)v10 + 1000LL))(v10, a2, v9);
v11 = cocos2d::CCDictionary::objectForKey_1(v5, i);
(*(void (__fastcall **)(__int64, __int64, __n128))(*(_QWORD *)v12 + 344LL))(v12, a2, v11);
v13 = cocos2d::CCDictionary::objectForKey_1(v5, i);
(*(void (__fastcall **)(__int64, __int64, __n128))(*(_QWORD *)v14 + 1000LL))(v14, a2, v13);
}
for ( j = 50; j != 56; ++j )
{
v16 = cocos2d::CCDictionary::objectForKey_1(v4, j);
(*(void (__fastcall **)(__int64, _QWORD, __n128))(*(_QWORD *)v17 + 344LL))(v17, (unsigned int)a2 ^ 1, v16);
v18 = cocos2d::CCDictionary::objectForKey_1(v4, j);
(*(void (__fastcall **)(__int64, _QWORD, __n128))(*(_QWORD *)v19 + 1000LL))(v19, (unsigned int)a2 ^ 1, v18);
v20 = cocos2d::CCDictionary::objectForKey_1(v5, j);
(*(void (__fastcall **)(__int64, _QWORD, __n128))(*(_QWORD *)v21 + 344LL))(v21, (unsigned int)a2 ^ 1, v20);
v22 = cocos2d::CCDictionary::objectForKey_1(v5, j);
(*(void (__fastcall **)(__int64, _QWORD, __n128))(*(_QWORD *)v23 + 1000LL))(v23, (unsigned int)a2 ^ 1, v22);
}
if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 960)) )
{
v24 = 0;
do
{
v25 = sub_1002E75A0(*(_QWORD *)(a1 + 960), v24);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v25 + 344LL))(v25, a2);
++v24;
}
while ( v24 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 960)) );
}
if ( (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 968)) )
{
v26 = 0;
do
{
v27 = sub_1002E75A0(*(_QWORD *)(a1 + 968), v26);
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v27 + 344LL))(v27, (unsigned int)a2 ^ 1);
++v26;
}
while ( v26 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 968)) );
}
result = (*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 712) + 1592LL))(*(_QWORD *)(a1 + 712));
*(_BYTE *)(*(_QWORD *)(a1 + 792) + 560LL) = (_DWORD)result == 0;
return result;
}