//
// sub_100413918 from 0x100413918 to 0x1004139a4 (140 bytes)
//
// 2 xrefs:
// > sub_1004137A0 @ 0x100413854
// > sub_1004137A0 @ 0x100413884
//
// 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:04:51 +0000
//
__int64 __fastcall sub_100413918(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 result; // x0
__int64 v7; // x21
__int64 v8; // x22
__int128 v9; // q0
result = a2;
if ( a2 != a3 )
{
v7 = a2 + 16;
do
{
v8 = v7 - 16;
*(_QWORD *)a4 = *(_QWORD *)(v7 - 16);
if ( a4 != v7 - 16 )
sub_100150ACC(
(__int64 *)(a4 + 8),
*(char **)(v7 - 8),
*(char **)v7,
(__int64)(*(_QWORD *)v7 - *(_QWORD *)(v7 - 8)) >> 4);
v9 = *(_OWORD *)(v7 + 16);
*(_OWORD *)(a4 + 42) = *(_OWORD *)(v7 + 26);
*(_OWORD *)(a4 + 32) = v9;
a4 += 64;
v7 += 64;
}
while ( v8 + 64 != a3 );
return a3;
}
return result;
}