//
// sub_100437C3C from 0x100437c3c to 0x100437db8 (380 bytes)
//
// 1 xrefs:
// > ??> @ 0x10084ccc0
//
// 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_100437C3C(__int64 a1, int a2, __int64 a3, __int64 a4, int a5, int a6)
{
__int64 v8; // x19
int v9; // w8
int v10; // w8
int v11; // w22
__int64 v12; // x20
int v13; // w8
int v14; // w9
int v15; // w10
float v16; // s0
float v17; // s0
v8 = *(_QWORD *)(a1 + 8);
if ( a6 == 1 )
{
if ( a4 )
{
**(_DWORD **)(a4 + 8) = *(_DWORD *)(v8 + 24);
v9 = *(_DWORD *)(v8 + 24) - 1;
if ( (unsigned int)v9 > 0xB )
v10 = 1;
else
v10 = dword_10064911C[v9];
*(_DWORD *)(a4 + 32) = v10;
}
if ( a3 )
{
v13 = **(_DWORD **)(a3 + 8);
if ( a5 )
goto LABEL_11;
}
else
{
v13 = 0;
if ( a5 )
{
LABEL_11:
v14 = *(_DWORD *)(v8 + 48);
if ( v14 >= a2 )
v15 = a2;
else
v15 = *(_DWORD *)(v8 + 48);
*(_DWORD *)(v8 + 48) = v14 - v15;
if ( v14 <= a2 )
return 11;
v16 = *(float *)(v8 + 32);
if ( v16 <= 0.0 && *(float *)(v8 + 40) <= 0.0 )
return 11;
LABEL_20:
if ( v16 <= 0.0 && *(float *)(v8 + 40) <= 0.0 && *(_DWORD *)(v8 + 24) == v13 )
{
v17 = *(float *)(v8 + 36);
if ( v17 <= 0.0 && *(float *)(v8 + 44) <= 0.0 )
return 11;
if ( v17 == 1.0 && *(float *)(v8 + 44) == 1.0 )
return 6;
}
return 0;
}
}
*(_DWORD *)(v8 + 48) = *(_DWORD *)(v8 + 52);
v16 = *(float *)(v8 + 32);
goto LABEL_20;
}
v11 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)v8 + 24LL))(*(_QWORD *)(a1 + 8));
v12 = sub_1004387D8(v8, **(_QWORD **)(a3 + 24), **(_QWORD **)(a4 + 24), **(unsigned int **)(a3 + 8));
if ( v11 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v8 + 32LL))(v8);
return v12;
}