//
// sub_100022180 from 0x100022180 to 0x1000221fc (124 bytes)
//
// 1 xrefs:
// > sub_10002205C @ 0x1000220d0
//
// 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
//
__int64 __fastcall sub_100022180(__int64 a1, __int64 a2)
{
__int64 v4; // x21
__int128 v5; // q0
__int128 v6; // q1
__int128 v7; // q2
v4 = *(_QWORD *)(a1 + 8);
**(_DWORD **)a1 = *(_DWORD *)a2;
v5 = *(_OWORD *)(a2 + 8);
v6 = *(_OWORD *)(a2 + 24);
v7 = *(_OWORD *)(a2 + 40);
*(_QWORD *)(v4 + 48) = *(_QWORD *)(a2 + 56);
*(_OWORD *)(v4 + 16) = v6;
*(_OWORD *)(v4 + 32) = v7;
*(_OWORD *)v4 = v5;
if ( v4 != a2 + 8 )
sub_100017888(
(__int64 *)(v4 + 56),
*(char **)(a2 + 64),
*(char **)(a2 + 72),
(__int64)(*(_QWORD *)(a2 + 72) - *(_QWORD *)(a2 + 64)) >> 2);
*(_BYTE *)(v4 + 80) = *(_BYTE *)(a2 + 88);
return a1;
}