//
// sub_100628D6C from 0x100628d6c to 0x100628e44 (216 bytes)
//
// 1 xrefs:
// > sub_10062804C @ 0x10062804c
//
// 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:23 +0000
//
__int64 __fastcall sub_100628D6C(_QWORD *a1, __int64 a2, int a3, _DWORD *a4)
{
int v5; // w22
int v8; // w24
int v9; // w23
int v10; // w24
__int64 result; // x0
int v12; // [xsp+8h] [xbp-38h] BYREF
int v13; // [xsp+Ch] [xbp-34h] BYREF
v12 = 0;
v13 = a3;
*a4 = 0;
if ( a3 )
{
v5 = a3;
while ( 1 )
{
if ( (unsigned int)sub_100624490(a1[54], nullptr, 0) )
{
v8 = v12;
v9 = sub_100624490(a1[54], (float *)(a2 + 4LL * (unsigned int)(*(_DWORD *)(a1[1] + 12LL) * v12)), v5);
v10 = v9 + v8;
v12 = v10;
v13 = v5 - v9;
sub_1006245BC(a1[54], v9);
if ( v5 == v9 )
break;
}
result = sub_100628C00(a1, a2, &v13, &v12);
if ( (_DWORD)result )
return result;
v5 = v13;
if ( !v13 )
{
v10 = v12;
break;
}
}
}
else
{
v10 = 0;
}
*a4 = v10;
return 0;
}