//
// sub_1002A6FE4 from 0x1002a6fe4 to 0x1002a70b8 (212 bytes)
//
// 5 xrefs:
// > GJBaseGameLayer::addCustomEnterEffect @ 0x10027ce6c
// > GJBaseGameLayer::stopCustomEnterEffect @ 0x10027d120
// > GJBaseGameLayer::controlAreaEffect @ 0x100289b54
// > GJBaseGameLayer::controlAreaEffectWithID @ 0x10028a1b8
// > GJBaseGameLayer::addAreaEffect @ 0x1002900f8
//
// 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:02:15 +0000
//
__int64 __fastcall sub_1002A6FE4(__int64 a1, __int64 a2, __int64 a3, __int64 a4)
{
__int64 v5; // x21
__int64 v6; // x20
__int128 v7; // q0
__int128 v8; // q1
__int128 v9; // q2
__int128 v10; // q0
__int128 v11; // q1
__int128 v12; // q2
__int128 v13; // q0
__int128 v14; // q1
__int128 v15; // q2
v5 = a2;
if ( a2 == a3 )
return a2;
v6 = a3;
do
{
sub_1001513C4(a4, (_QWORD *)v5);
v7 = *(_OWORD *)(v5 + 24);
v8 = *(_OWORD *)(v5 + 40);
v9 = *(_OWORD *)(v5 + 56);
*(_OWORD *)(a4 + 72) = *(_OWORD *)(v5 + 72);
*(_OWORD *)(a4 + 56) = v9;
*(_OWORD *)(a4 + 40) = v8;
*(_OWORD *)(a4 + 24) = v7;
v10 = *(_OWORD *)(v5 + 88);
v11 = *(_OWORD *)(v5 + 104);
v12 = *(_OWORD *)(v5 + 120);
*(_OWORD *)(a4 + 136) = *(_OWORD *)(v5 + 136);
*(_OWORD *)(a4 + 120) = v12;
*(_OWORD *)(a4 + 104) = v11;
*(_OWORD *)(a4 + 88) = v10;
v13 = *(_OWORD *)(v5 + 152);
v14 = *(_OWORD *)(v5 + 168);
v15 = *(_OWORD *)(v5 + 184);
*(_DWORD *)(a4 + 200) = *(_DWORD *)(v5 + 200);
*(_OWORD *)(a4 + 184) = v15;
*(_OWORD *)(a4 + 168) = v14;
*(_OWORD *)(a4 + 152) = v13;
sub_10001817C(a4 + 208, (__n128 *)(v5 + 208));
*(_DWORD *)(a4 + 232) = *(_DWORD *)(v5 + 232);
a4 += 240;
v5 += 240;
}
while ( v5 != v6 );
return v6;
}