//
// sub_1006E6084 from 0x1006e6084 to 0x1006e6238 (436 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009bd3f8
//
// 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:12:36 +0000
//
__int64 __fastcall sub_1006E6084(__int64 a1, __int64 a2, __int64 *a3, __int64 *a4)
{
__int64 v7; // x22
int v8; // w8
int v9; // w9
int v10; // w8
int v11; // w1
int v12; // w8
__int64 v13; // x9
int v14; // w8
int v15; // w9
int v16; // w8
int v17; // w1
int v18; // w8
__int64 v19; // x9
v7 = a1 + 104;
if ( !sub_1006D1164(a1 + 104, a2) )
return 0;
if ( ((unsigned int)sub_1006DAA04(v7, a1 + 128, 6) | 2) != 6 )
{
sub_100706FB0(16, 195, 131, "ec2_smpl.c", 219);
return 0;
}
if ( !(unsigned int)sub_1006DA5BC(a1 + 152, a3, (int *)(a1 + 128)) )
return 0;
v8 = *(_DWORD *)(a1 + 128);
v9 = v8 + 63;
v10 = v8 + 126;
if ( v9 >= 0 )
v10 = v9;
v11 = v10 >> 6;
v12 = *(_DWORD *)(a1 + 164);
if ( v11 > v12 )
{
if ( !sub_1006D10FC(a1 + 152, v11) )
return 0;
v12 = *(_DWORD *)(a1 + 164);
}
v13 = *(int *)(a1 + 160);
if ( (int)v13 < v12 )
{
if ( v12 <= (int)v13 + 1 )
v12 = v13 + 1;
bzero((void *)(*(_QWORD *)(a1 + 152) + 8 * v13), 8LL * (unsigned int)(v12 - 1 - v13) + 8);
}
if ( !(unsigned int)sub_1006DA5BC(a1 + 176, a4, (int *)(a1 + 128)) )
return 0;
v14 = *(_DWORD *)(a1 + 128);
v15 = v14 + 63;
v16 = v14 + 126;
if ( v15 >= 0 )
v16 = v15;
v17 = v16 >> 6;
v18 = *(_DWORD *)(a1 + 188);
if ( v17 > v18 )
{
if ( !sub_1006D10FC(a1 + 176, v17) )
return 0;
v18 = *(_DWORD *)(a1 + 188);
}
v19 = *(int *)(a1 + 184);
if ( (int)v19 < v18 )
{
if ( v18 <= (int)v19 + 1 )
v18 = v19 + 1;
bzero((void *)(*(_QWORD *)(a1 + 176) + 8 * v19), 8LL * (unsigned int)(v18 - 1 - v19) + 8);
}
return 1;
}