//
// sub_1004483F0 from 0x1004483f0 to 0x10044853c (332 bytes)
//
// 1 xrefs:
// > ??> @ 0x10084d318
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1004483F0(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_100886EA0;
sub_1004B5C70(qword_100886EA0);
if ( a6 != 1 )
{
sub_100447D20(
(__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_100886E60[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_1004B5CA0(v12);
return v20;
}