//
// sub_1000221AC from 0x1000221ac to 0x100022228 (124 bytes)
//
// 2 xrefs:
// > sub_100021F3C @ 0x100021ff0
// > sub_100021F3C @ 0x100022020
//
// 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
//
__int128 *__fastcall sub_1000221AC(__int64 a1, __int128 *a2, __int128 *a3, __int64 a4)
{
__int128 *v5; // x20
__int128 v7; // q0
__int128 v8; // q1
v5 = a2;
if ( a2 != a3 )
{
do
{
v7 = *v5;
v8 = v5[1];
*(_BYTE *)(a4 + 32) = *((_BYTE *)v5 + 32);
*(_OWORD *)a4 = v7;
*(_OWORD *)(a4 + 16) = v8;
if ( v5 != (__int128 *)a4 )
sub_1000182DC(
(__int64 *)(a4 + 40),
*((char **)v5 + 5),
*((char **)v5 + 6),
(__int64)(*((_QWORD *)v5 + 6) - *((_QWORD *)v5 + 5)) >> 2);
v5 += 4;
a4 += 64;
}
while ( v5 != a3 );
return a3;
}
return v5;
}