//
// sub_1004EDFD8 from 0x1004edfd8 to 0x1004ee090 (184 bytes)
//
// 1 xrefs:
// > sub_1004EDD38 @ 0x1004edee8
//
// 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:43 +0000
//
__int64 __fastcall sub_1004EDFD8(__int64 *a1, _QWORD *a2, __int64 a3)
{
__int64 v6; // x22
__int64 v7; // x1
__int64 v8; // x10
__int64 v9; // x23
__int64 v10; // x8
__int64 v11; // x8
__int64 v12; // x8
v6 = a2[1];
sub_1004C3F4C((__int64)a1, a3, a1[1], a2[2]);
v7 = *a1;
v8 = a2[1];
a2[2] += a1[1] - a3;
a1[1] = a3;
v9 = v8 + v7 - a3;
sub_1004C3F4C((__int64)a1, v7, a3, v9);
a2[1] = v9;
v10 = *a1;
a1[1] = *a1;
*a1 = a2[1];
a2[1] = v10;
v11 = a1[1];
a1[1] = a2[2];
a2[2] = v11;
v12 = a1[2];
a1[2] = a2[3];
a2[3] = v12;
*a2 = a2[1];
return v6;
}