//
// GJBaseGameLayer::processAreaActions from 0x9d798c to 0x9d7dd4 (1096 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processMoveActionsStep @ 0x9ebb98
// > ??> @ 0x44098
//
// 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:58:46 +0000
//
__int64 __fastcall GJBaseGameLayer::processAreaActions(GJBaseGameLayer *this, float a2, unsigned __int8 a3)
{
char *v3; // x23
int v4; // w26
__int64 v8; // x24
int v9; // w21
int v10; // w2
_DWORD *v11; // x20
int v12; // w0
int v13; // w0
__int64 v14; // x24
int v15; // w20
int i; // w21
_QWORD *v17; // x1
int v18; // w0
int v19; // w0
__int64 v20; // x2
__int64 v21; // x1
int v22; // w0
__int64 v23; // x20
double v24; // d1
double v25; // d0
int v26; // w4
float v27; // s0
int v28; // w27
double v29; // d1
float v30; // s0
double v31; // d1
float v32; // s0
float v33; // s5
float v34; // s3
float v35; // s1
int v36; // w0
int v37; // w0
float v38; // s1
float v39; // s0
__int64 v40; // x1
float v41; // s1
float v42; // s2
__int64 v43; // x1
float v44; // s3
float v45; // s2
float v46; // s1
__int64 v47; // [xsp+70h] [xbp+70h] BYREF
v3 = (char *)this + 12288;
v4 = a3;
if ( *((_BYTE *)this + 12605) )
return _stack_chk_guard;
*((_DWORD *)this + 237) = *((_DWORD *)this + 236) - 1;
v8 = 0;
v9 = 0;
GJBaseGameLayer::processAreaEffects((__int64)this, (__int64 *)this + 191, 2, a3, a2);
GJBaseGameLayer::processAreaEffects((__int64)this, (__int64 *)this + 188, 1, v4, a2);
GJBaseGameLayer::processAreaEffects((__int64)this, (__int64 *)this + 185, 0, v4, a2);
v10 = *((_DWORD *)this + 892);
if ( v10 > 0 )
{
while ( 1 )
{
v11 = *(_DWORD **)(*((_QWORD *)this + 428) + v8);
v12 = v11[310];
if ( v12 < *((_DWORD *)this + 236) )
break;
if ( v4 )
{
LABEL_6:
++v9;
v8 += 8;
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v11 + 1480LL))(v11, 0.0);
(*(void (__fastcall **)(_DWORD *, float))(*(_QWORD *)v11 + 1456LL))(v11, 1.0);
v10 = *((_DWORD *)this + 892);
if ( v9 >= v10 )
goto LABEL_10;
}
else
{
++v9;
v8 += 8;
if ( v9 >= v10 )
goto LABEL_10;
}
}
*((_BYTE *)v11 + 840) = 1;
*((_BYTE *)v11 + 864) = 1;
*((_BYTE *)v11 + 865) = 1;
if ( v12 < *((_DWORD *)this + 236) )
{
v27 = *((float *)v11 + 167);
v28 = 0;
if ( v27 != 0.0 )
{
*((_BYTE *)v11 + 842) = 1;
v29 = *((double *)v11 + 118);
v28 = 1;
v11[167] = 0;
*((double *)v11 + 118) = v29 - v27;
}
v30 = *((float *)v11 + 168);
if ( v30 != 0.0 )
{
*((_BYTE *)v11 + 842) = 1;
v31 = *((double *)v11 + 119);
v28 = 1;
v11[168] = 0;
*((double *)v11 + 119) = v31 - v30;
}
v32 = *((float *)v11 + 175);
v33 = *((float *)v11 + 176);
if ( v32 != 0.0 || v33 != 0.0 )
{
v43 = *(_QWORD *)v11;
v44 = *((float *)v11 + 288);
v45 = *((float *)v11 + 174) - v33;
v46 = *((float *)v11 + 289) - v33;
*((float *)v11 + 173) = *((float *)v11 + 173) - v32;
v11[175] = 0;
*((float *)v11 + 288) = v44 - v32;
*((float *)v11 + 174) = v45;
*((float *)v11 + 289) = v46;
v11[176] = 0;
(*(void (__fastcall **)(_DWORD *, float))(v43 + 1456))(v11, 1.0);
}
v34 = *((float *)v11 + 170);
v35 = *((float *)v11 + 172);
if ( v34 != 0.0 || v35 != 0.0 )
{
v40 = *(_QWORD *)v11;
v41 = *((float *)v11 + 171) - v35;
v42 = *((float *)v11 + 169) - v34;
v11[170] = 0;
*((float *)v11 + 171) = v41;
*((float *)v11 + 169) = v42;
v11[172] = 0;
(*(void (__fastcall **)(_DWORD *, float))(v40 + 1480))(v11, 0.0);
}
v36 = *((unsigned __int8 *)v11 + 1290);
v11[310] = *((_DWORD *)this + 236);
if ( !v36 )
{
v37 = *((_DWORD *)this + 236);
if ( v11[309] != v37 )
{
v38 = *((double *)v11 + 118);
v39 = *((double *)v11 + 119);
*((float *)v11 + 306) = v38;
*((float *)v11 + 307) = v39;
v11[309] = *((_DWORD *)this + 236);
GameObject::dirtifyObjectRect((__int64)v11);
v37 = *((_DWORD *)this + 236);
}
if ( v11[311] != v37 )
{
*(_QWORD *)(v11 + 247) = *((_QWORD *)v11 + 144);
v11[311] = *((_DWORD *)this + 236);
GameObject::dirtifyObjectRect((__int64)v11);
}
}
if ( v28 )
(*(void (__fastcall **)(GJBaseGameLayer *, _DWORD *))(*(_QWORD *)this + 1368LL))(this, v11);
}
goto LABEL_6;
}
LABEL_10:
v13 = *((_DWORD *)this + 891);
*((_DWORD *)this + 892) = 0;
if ( v13 > 0 )
{
v14 = 0;
v15 = 0;
for ( i = 0; i < v19; ++i )
{
while ( 1 )
{
v18 = *((_DWORD *)this + 897);
v20 = *(_QWORD *)(*((_QWORD *)this + 425) + v14);
v47 = v20;
if ( v18 <= v15 )
break;
++i;
v14 += 8;
*(_QWORD *)(*((_QWORD *)this + 428) + 8LL * v15) = v20;
v19 = *((_DWORD *)this + 891);
v15 = *((_DWORD *)this + 892) + 1;
*((_DWORD *)this + 892) = v15;
if ( i >= v19 )
goto LABEL_19;
}
v17 = *((_QWORD **)this + 429);
if ( v17 == *((_QWORD **)this + 430) )
{
std::vector::__push_back_slow_path((__int64)this + 3424, &v47);
v15 = *((_DWORD *)this + 892);
v18 = *((_DWORD *)this + 897);
}
else
{
if ( v17 )
{
*v17 = v20;
v17 = *((_QWORD **)this + 429);
v18 = *((_DWORD *)this + 897);
v15 = *((_DWORD *)this + 892);
}
*((_QWORD *)this + 429) = v17 + 1;
}
*((_DWORD *)this + 897) = v18 + 1;
v19 = *((_DWORD *)this + 891);
*((_DWORD *)this + 892) = ++v15;
v14 += 8;
}
LABEL_19:
if ( v3[137] && v19 > 0 )
{
v21 = 0;
v22 = 0;
do
{
++v22;
v23 = *(_QWORD *)(*((_QWORD *)this + 425) + v21);
v21 += 8;
v24 = *(double *)(v23 + 944);
*(_BYTE *)(v23 + 864) = 1;
v25 = *(double *)(v23 + 952);
*(_BYTE *)(v23 + 865) = 1;
*(float *)&v24 = v24;
*(float *)&v25 = v25;
v26 = *(_DWORD *)(v23 + 1152);
*(_DWORD *)(v23 + 992) = *(_DWORD *)(v23 + 1156);
*(_DWORD *)(v23 + 1224) = LODWORD(v24);
*(_DWORD *)(v23 + 1228) = LODWORD(v25);
*(_DWORD *)(v23 + 988) = v26;
}
while ( v22 < *((_DWORD *)this + 891) );
}
}
return _stack_chk_guard;
}