//
// sub_10056E558 from 0x10056e558 to 0x10056e6a4 (332 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009d5438
//
// 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:08:17 +0000
//
__int64 __fastcall sub_10056E558(int **a1, __int64 a2, __int64 a3, __int64 a4, int a5, int a6)
{
int *v11; // x20
__int64 v12; // x19
int v13; // w9
int v14; // w10
int v15; // w9
int v16; // w9
__int64 v17; // x9
__int64 v18; // x10
__int64 v19; // x8
__int64 v20; // x20
v11 = *a1;
v12 = qword_100A10AD0;
sub_1005DBDD8(qword_100A10AD0);
if ( a6 != 1 )
{
sub_10056DE88(
(__int64)v11,
**(void ***)(a3 + 24),
**(unsigned int **)(a3 + 8),
**(void ***)(a4 + 24),
**(unsigned int **)(a4 + 8),
a2);
LABEL_17:
v20 = 0;
goto LABEL_18;
}
if ( !a4 )
goto LABEL_17;
*(_DWORD *)(a4 + 32) = *(_DWORD *)(a3 + 32);
v13 = **(_DWORD **)(a3 + 8);
**(_DWORD **)(a4 + 8) = v13;
v14 = v13 == 2 ? 1 : 2;
v15 = v13 == 1 ? 0 : v14;
v11[139] = v15;
if ( !a5 )
goto LABEL_17;
v16 = v11[136];
if ( v16 != 1 )
{
if ( v16 )
goto LABEL_17;
v17 = qword_100A10A90[v11[56]];
v18 = v11[135];
v19 = 1LL - *(int *)(v17 + 112 * v18 + 108);
if ( *(_BYTE *)(v17 + 112 * v18 + v19 + 100)
|| *(_BYTE *)(v17 + 112 * v18 + v19 + 102)
|| *(_BYTE *)(v17 + 112 * v18 + v19 + 104) )
{
goto LABEL_17;
}
}
v20 = 11;
LABEL_18:
sub_1005DBE08(v12);
return v20;
}