//
// sub_1043B8 from 0x1043b8 to 0x10449c (228 bytes)
//
// 2 xrefs:
// > sub_10449C @ 0x1046c0
// > sub_1047B8 @ 0x1047c8
//
// 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_1043B8(__int64 a1, __int64 a2, __n128 *a3, _OWORD *a4)
{
__int64 v7; // x3
__int16 v9; // w2
int v10; // w10
__int64 v11; // x8
int v12; // w2
__n128 result; // q0
__int128 v14; // q1
v7 = **(_QWORD **)a2 >> *(_DWORD *)(a2 + 16);
v9 = *(_WORD *)(*(_QWORD *)(a1 + 48) + 2LL * ((unsigned int)v7 & *(_DWORD *)(a1 + 112)));
if ( v9 < 0 )
sub_FBCF8(a1, a2, v9, v7);
sub_1047DC();
*(_DWORD *)(a2 + 16) = v10;
*(_QWORD *)a2 = v11;
LOBYTE(v10) = *(_BYTE *)(a1 + 102);
LODWORD(v11) = *(unsigned __int16 *)(*(_QWORD *)(a1 + 72) + 2LL * (unsigned int)(v12 - 1));
result.n128_u64[0] = __PAIR64__((unsigned int)v11 >> v10, v11);
LODWORD(v11) = (unsigned int)v11 >> v10 >> v10;
result.n128_u64[1] = __PAIR64__((unsigned int)v11 >> v10, v11);
LODWORD(v14) = (unsigned int)v11 >> v10 >> v10;
DWORD1(v14) = (unsigned int)v14 >> v10;
DWORD2(v14) = (unsigned int)v14 >> v10 >> v10;
HIDWORD(v14) = DWORD2(v14) >> v10;
*a3 = result;
*a4 = v14;
return result;
}