//
// sub_1004A1974 from 0x1004a1974 to 0x1004a1a10 (156 bytes)
//
// 1 xrefs:
// > sub_1004A0628 @ 0x1004a0704
//
// 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:06:02 +0000
//
__n128 __fastcall sub_1004A1974(__int64 a1)
{
__int64 v2; // x8
__n128 result; // q0
__int64 v4; // x0
unsigned int v5; // w20
__int64 v6; // x8
v2 = *(_QWORD *)(a1 + 680);
if ( v2 )
{
result = *(__n128 *)(a1 + 1192);
*(__n128 *)(v2 + 1612) = result;
}
else
{
v4 = *(_QWORD *)(a1 + 688);
if ( v4 )
{
if ( (unsigned int)sub_1002E757C(v4) )
{
v5 = 0;
do
*(_OWORD *)(sub_1002E75A0(*(_QWORD *)(a1 + 688), v5++) + 1612) = *(_OWORD *)(a1 + 1192);
while ( v5 < (unsigned int)sub_1002E757C(*(_QWORD *)(a1 + 688)) );
}
}
else
{
v6 = *(_QWORD *)(a1 + 1144);
if ( v6 )
{
result = *(__n128 *)(a1 + 1192);
*(__n128 *)(v6 + 104) = result;
}
}
}
return result;
}