//
// sub_100140628 from 0x100140628 to 0x1001406ac (132 bytes)
//
// 1 xrefs:
// > sub_10013C008 @ 0x10013c024
//
// 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
//
__n128 __fastcall sub_100140628(__int64 a1, __int128 *a2)
{
__int64 v4; // x20
__int128 v5; // q0
__n128 result; // q0
__int128 v7; // q1
__int128 v8; // q2
v4 = *(_QWORD *)(a1 + 8);
if ( *((char *)a2 + 23) < 0 )
{
sub_1000097D0(*(_BYTE **)(a1 + 8), *(void **)a2, *((_QWORD *)a2 + 1));
}
else
{
v5 = *a2;
*(_QWORD *)(v4 + 16) = *((_QWORD *)a2 + 2);
*(_OWORD *)v4 = v5;
}
*(_OWORD *)(v4 + 24) = *(__int128 *)((char *)a2 + 24);
result = *(__n128 *)((char *)a2 + 40);
v7 = *(__int128 *)((char *)a2 + 56);
v8 = *(__int128 *)((char *)a2 + 72);
*(_OWORD *)(v4 + 84) = *(__int128 *)((char *)a2 + 84);
*(_OWORD *)(v4 + 72) = v8;
*(_OWORD *)(v4 + 56) = v7;
*(__n128 *)(v4 + 40) = result;
*(_QWORD *)(a1 + 8) = v4 + 104;
return result;
}