//
// sub_10018E878 from 0x10018e878 to 0x10018e904 (140 bytes)
//
// 1 xrefs:
// > sub_10018E7F8 @ 0x10018e864
//
// 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 10:59:53 +0000
//
__int64 *__fastcall sub_10018E878(__int64 *result, _QWORD *a2, _QWORD *a3, unsigned __int64 a4)
{
__int64 *v6; // x19
_DWORD *v7; // x8
_QWORD *v8; // x10
_QWORD *v9; // x9
bool v10; // zf
if ( a4 )
{
v6 = result;
result = (__int64 *)sub_100018404(result, a4);
v7 = (_DWORD *)v6[1];
if ( a2 != a3 )
{
do
{
*v7 = *((_DWORD *)a2 + 7);
v8 = (_QWORD *)a2[1];
if ( v8 )
{
do
{
v9 = v8;
v8 = (_QWORD *)*v8;
}
while ( v8 );
}
else
{
do
{
v9 = (_QWORD *)a2[2];
v10 = *v9 == (_QWORD)a2;
a2 = v9;
}
while ( !v10 );
}
++v7;
a2 = v9;
}
while ( v9 != a3 );
}
v6[1] = (__int64)v7;
}
return result;
}