//
// sub_1002214C8 from 0x1002214c8 to 0x100221554 (140 bytes)
//
// 1 xrefs:
// > sub_100220E68 @ 0x1002210b4
//
// 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:01:08 +0000
//
__int64 __fastcall sub_1002214C8(__int64 a1, __int64 a2)
{
int v3; // w20
int v4; // w21
int v5; // w1
double v6; // d0
double v7; // d1
_WORD *v9; // x0
__int64 v10; // x0
v3 = *(_DWORD *)(a1 + 720);
v4 = *(_DWORD *)(a1 + 724);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) + v4 * v3;
if ( *(_BYTE *)(a1 + 752) == 1 )
{
*(_DWORD *)(a1 + 768) = v5;
return sub_1002216CC(a1);
}
else
{
v9 = sub_10000F52C(*(_QWORD *)(*(_QWORD *)(a1 + 680) + 320LL), v5, v6, v7);
v10 = sub_10049E428(v9);
*(_QWORD *)(v10 + 1120) = a1 + 664;
*(_DWORD *)(v10 + 592) = 106;
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v10 + 1312LL))(v10);
}
}