//
// sub_100516548 from 0x100516548 to 0x1005165c4 (124 bytes)
//
// 1 xrefs:
// > sub_1004FFAF4 @ 0x1004ffb10
//
// 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 11:07:05 +0000
//
_QWORD *__fastcall sub_100516548(_QWORD *result, __int128 *a2)
{
_QWORD *v3; // x19
__int64 v4; // x21
__int128 v5; // q0
__int128 v6; // q0
__int16 v7; // w8
v3 = result;
v4 = result[1];
v5 = *a2;
*(_WORD *)(v4 + 16) = *((_WORD *)a2 + 8);
*(_OWORD *)v4 = v5;
if ( *((char *)a2 + 47) < 0 )
{
result = sub_1000097D0((_BYTE *)(v4 + 24), *((void **)a2 + 3), *((_QWORD *)a2 + 4));
}
else
{
v6 = *(__int128 *)((char *)a2 + 24);
*(_QWORD *)(v4 + 40) = *((_QWORD *)a2 + 5);
*(_OWORD *)(v4 + 24) = v6;
}
v7 = *((_WORD *)a2 + 24);
*(_BYTE *)(v4 + 50) = *((_BYTE *)a2 + 50);
*(_WORD *)(v4 + 48) = v7;
v3[1] = v4 + 56;
return result;
}