//
// sub_100021C24 from 0x100021c24 to 0x100021ca0 (124 bytes)
//
// 2 xrefs:
// > sub_100021974 @ 0x100021a58
// > sub_100021974 @ 0x100021a88
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int128 *__fastcall sub_100021C24(__int64 a1, __int128 *a2, __int128 *a3, __int64 a4)
{
__int128 *v5; // x20
__int128 v7; // q0
v5 = a2;
if ( a2 != a3 )
{
do
{
v7 = *v5;
*(_DWORD *)(a4 + 16) = *((_DWORD *)v5 + 4);
*(_OWORD *)a4 = v7;
if ( v5 != (__int128 *)a4 )
sub_100017888(
(__int64 *)(a4 + 24),
*((char **)v5 + 3),
*((char **)v5 + 4),
(__int64)(*((_QWORD *)v5 + 4) - *((_QWORD *)v5 + 3)) >> 2);
v5 += 3;
a4 += 48;
}
while ( v5 != a3 );
return a3;
}
return v5;
}