//
// sub_100021200 from 0x100021200 to 0x10002127c (124 bytes)
//
// 2 xrefs:
// > sub_100020F88 @ 0x10002107c
// > sub_100020F88 @ 0x1000210ac
//
// 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_100021200(__int64 a1, __int128 *a2, __int128 *a3, __int64 a4)
{
__int128 *v5; // x20
__int128 v7; // q0
__int128 v8; // q2
v5 = a2;
if ( a2 != a3 )
{
do
{
v7 = *v5;
v8 = v5[2];
*(_OWORD *)(a4 + 16) = v5[1];
*(_OWORD *)(a4 + 32) = v8;
*(_OWORD *)a4 = v7;
if ( v5 != (__int128 *)a4 )
sub_1000182DC(
(__int64 *)(a4 + 48),
*((char **)v5 + 6),
*((char **)v5 + 7),
(__int64)(*((_QWORD *)v5 + 7) - *((_QWORD *)v5 + 6)) >> 2);
v5 = (__int128 *)((char *)v5 + 72);
a4 += 72;
}
while ( v5 != a3 );
return a3;
}
return v5;
}