//
// sub_AE634 from 0xae634 to 0xae6e4 (176 bytes)
//
// 1 xrefs:
// > sub_AEEFC @ 0xaf0d4
//
// 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 12:14:36 +0000
//
__int64 __fastcall sub_AE634(__int64 result, unsigned int a2, int a3, __int64 a4, unsigned int a5, int a6, int a7)
{
int v7; // w19
__int64 i; // x23
unsigned int v14; // w8
int v15; // w9
int v16; // w8
int v17; // w9
int v18; // w26
v7 = a7;
for ( i = result; v7; v7 -= v18 )
{
v14 = a6 + v7;
v15 = a3 + v7;
if ( a6 + v7 >= (int)a5 )
v14 = a5;
if ( v15 >= (int)a2 )
v15 = a2;
v16 = v14 - a6;
v17 = v15 - a3;
if ( v16 >= v17 )
v18 = v17;
else
v18 = v16;
memcpy((void *)(i + a3), (const void *)(a4 + a6), v18);
a6 = sub_AE6E4((unsigned int)(v18 + a6), a5);
result = sub_AE6E4((unsigned int)(v18 + a3), a2);
a3 = result;
}
return result;
}