//
// sub_100022874 from 0x100022874 to 0x100022918 (164 bytes)
//
// 2 xrefs:
// > sub_1000226F4 @ 0x1000227bc
// > sub_1000226F4 @ 0x100022800
//
// 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 10:57:23 +0000
//
__int64 __fastcall sub_100022874(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v4; // x19
__int64 v6; // x21
__int128 v7; // q1
_QWORD v9[3]; // [xsp+0h] [xbp-50h] BYREF
char v10; // [xsp+18h] [xbp-38h]
__int64 v11; // [xsp+20h] [xbp-30h] BYREF
__int64 v12; // [xsp+28h] [xbp-28h] BYREF
v4 = a4;
v11 = a4;
v12 = a4;
v9[0] = a1;
v9[1] = &v11;
v9[2] = &v12;
v10 = 0;
if ( a2 != a3 )
{
v6 = a2;
do
{
v7 = *(_OWORD *)(v6 + 16);
*(_OWORD *)v4 = *(_OWORD *)v6;
*(_OWORD *)(v4 + 16) = v7;
*(_QWORD *)(v4 + 40) = 0;
*(_QWORD *)(v4 + 48) = 0;
*(_QWORD *)(v4 + 32) = 0;
sub_100018908(
(__int64 *)(v4 + 32),
*(const void **)(v6 + 32),
*(_QWORD *)(v6 + 40),
(__int64)(*(_QWORD *)(v6 + 40) - *(_QWORD *)(v6 + 32)) >> 2);
v6 += 56;
v4 = v12 + 56;
v12 += 56;
}
while ( v6 != a3 );
}
v10 = 1;
sub_100019CFC((__int64)v9);
return v4;
}