//
// sub_100553F14 from 0x100553f14 to 0x100553f78 (100 bytes)
//
// 10 xrefs:
// > sub_1006135F8 @ 0x100613948
// > sub_100613A64 @ 0x100613c88
// > sub_100613A64 @ 0x100613cd0
// > sub_100613A64 @ 0x100613d48
// > sub_1006141FC @ 0x100614268
// > sub_1006145BC @ 0x100614614
// > sub_1006146B0 @ 0x100614758
// > sub_100614B8C @ 0x100614c08
// > sub_100614D44 @ 0x100614f0c
// > sub_100615218 @ 0x1006153e0
//
// 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:07:55 +0000
//
__int64 __fastcall sub_100553F14(__int64 a1, _QWORD *a2)
{
__int64 v2; // x8
int v3; // w9
__int64 v4; // x11
__int64 v5; // x10
__int64 v6; // x11
v2 = *(unsigned int *)(a1 + 32);
if ( (v2 & 0x80000000) != 0 )
return 0;
v3 = *(_DWORD *)(a1 + 28);
if ( v3 <= (int)v2 )
return 0;
if ( a2 )
{
v4 = *(unsigned int *)(*(_QWORD *)a1 + 4LL);
if ( (int)v4 >= 1 )
{
v5 = 0;
v6 = 8 * v4;
do
{
*(_QWORD *)(*(_QWORD *)(a1 + 16) + v5) = *(_QWORD *)(*(_QWORD *)(a1 + 8) + v5) + 4 * v2;
v5 += 8;
}
while ( v6 != v5 );
}
*a2 = *(_QWORD *)(a1 + 16);
}
return (unsigned int)(v3 - v2);
}