//
// sub_1006639E8 from 0x1006639e8 to 0x100663b04 (284 bytes)
//
// 2 xrefs:
// > sub_100662258 @ 0x100662498
// > sub_100662258 @ 0x1006625ec
//
// 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:10:59 +0000
//
__int64 __fastcall sub_1006639E8(_QWORD *a1, unsigned __int8 *a2, int a3)
{
unsigned __int64 v5; // x21
unsigned __int64 v6; // x8
__int64 v7; // x4
__int64 v8; // x8
__int64 v10; // x8
__int64 v11; // x9
int v12; // w10
v5 = *((_QWORD *)a2 + 1);
v6 = *((_QWORD *)a2 + 4) + *((_QWORD *)a2 + 3);
if ( v6 > v5 )
{
v7 = 571;
LABEL_11:
sub_100706FB0(20, 288, 152, "d1_both.c", v7);
return 47;
}
if ( v6 > a3 )
{
v7 = 576;
goto LABEL_11;
}
v8 = a1[17];
if ( *(_QWORD *)(v8 + 768) )
{
if ( v5 == *(_QWORD *)(v8 + 752) )
return 0;
v7 = 601;
goto LABEL_11;
}
if ( (unsigned int)sub_1007000B0(a1[10], v5 + 12) )
{
v10 = a1[16];
*(_QWORD *)(v10 + 920) = v5;
v11 = a1[17];
*(_QWORD *)(v11 + 752) = v5;
v12 = *a2;
*(_DWORD *)(v10 + 928) = v12;
*(_BYTE *)(v11 + 744) = v12;
*(_WORD *)(v11 + 760) = *((_WORD *)a2 + 8);
return 0;
}
else
{
sub_100706FB0(20, 288, 7, "d1_both.c", 587);
return 80;
}
}