//
// GJBaseGameLayer::processAdvancedFollowActions from 0x9eb808 to 0x9ebac0 (696 bytes)
//
// 2 xrefs:
// > GJBaseGameLayer::processMoveActionsStep @ 0x9ebb80
// > ??> @ 0x7f108
//
// 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:59:03 +0000
//
__int64 __fastcall GJBaseGameLayer::processAdvancedFollowActions(GJBaseGameLayer *this, float a2)
{
float v3; // s8
__int64 v4; // x19
__int64 v5; // x21
unsigned __int8 v6; // w2
int *v7; // x1
__int64 v8; // x0
__int64 v9; // x19
__int64 v10; // x3
__int64 v11; // x3
_DWORD *v12; // x1
unsigned __int64 v14; // x3
__int64 v15; // x5
unsigned __int64 v16; // x7
unsigned __int64 v17; // x4
__int64 v18; // x8
_DWORD *v19; // x21
unsigned __int64 v20; // x4
__int64 v21; // x9
_QWORD *i; // x2
unsigned __int64 v23; // x0
unsigned __int64 v24; // x0
unsigned __int64 v25; // x0
__int64 v26; // x0
__int64 v27; // x0
unsigned __int64 v28; // x6
__int64 v29; // x0
bool (__fastcall *v30)(__int64 *, __int64 *); // [xsp+40h] [xbp+40h] BYREF
v3 = a2 * 240.0;
if ( *((_BYTE *)this + 1640) )
{
v29 = *((_QWORD *)this + 206);
v30 = compAdvFollowSort;
std::__sort(
v29,
*((__int64 **)this + 207),
(__int64 (__fastcall **)(__int64 *, __int64 *))&v30);
*((_BYTE *)this + 1640) = 0;
}
v4 = *((_QWORD *)this + 206);
v5 = *((_QWORD *)this + 207);
if ( v4 == v5 )
goto LABEL_52;
do
{
while ( !*(_BYTE *)(v4 + 28) )
{
v6 = *(_BYTE *)(v4 + 30);
v7 = (int *)v4;
v4 += 32;
GJBaseGameLayer::processAdvancedFollowAction((__int64)this, v7, v6, v3);
if ( v5 == v4 )
goto LABEL_10;
}
if ( *(_BYTE *)(v4 + 29) )
{
*(_BYTE *)(v4 + 29) = 0;
GJBaseGameLayer::processAdvancedFollowAction((__int64)this, (int *)v4, 1u, v3);
}
v4 += 32;
}
while ( v5 != v4 );
LABEL_10:
v8 = *((_QWORD *)this + 206);
v5 = *((_QWORD *)this + 207);
if ( v8 == v5 )
{
LABEL_52:
v8 = v5;
}
else
{
while ( !*(_BYTE *)(v8 + 30) )
{
v8 += 32;
if ( v5 == v8 )
goto LABEL_19;
}
v9 = v8;
while ( 1 )
{
v9 += 32;
if ( v5 == v9 )
break;
while ( !*(_BYTE *)(v9 + 30) )
{
v8 += 32;
v9 += 32;
v10 = *(_QWORD *)(v9 - 24);
*(_QWORD *)(v8 - 32) = *(_QWORD *)(v9 - 32);
*(_QWORD *)(v8 - 24) = v10;
v11 = *(_QWORD *)(v9 - 8);
*(_QWORD *)(v8 - 16) = *(_QWORD *)(v9 - 16);
*(_QWORD *)(v8 - 8) = v11;
if ( v5 == v9 )
goto LABEL_18;
}
}
LABEL_18:
v5 = *((_QWORD *)this + 207);
}
LABEL_19:
if ( v8 != v5 )
*((_QWORD *)this + 207) = v5 + 32 * ~((unsigned __int64)(v5 - 32 - v8) >> 5);
v12 = *((_DWORD **)this + 136);
if ( v12 )
{
do
{
while ( v12[15] >= *((_DWORD *)this + 236) )
{
v12 = *(_DWORD **)v12;
if ( !v12 )
return _stack_chk_guard;
}
v14 = *((_QWORD *)this + 135);
v15 = *(_QWORD *)v12;
v16 = v14 - 1;
v17 = *((_QWORD *)v12 + 1);
v18 = (v14 - 1) & v14;
v19 = *(_DWORD **)v12;
if ( v18 )
v20 = v17 % v14;
else
v20 = v16 & v17;
v21 = *((_QWORD *)this + 134);
for ( i = *(_QWORD **)(v21 + 8 * v20); v12 != (_DWORD *)*i; i = (_QWORD *)*i )
;
if ( i == (_QWORD *)((char *)this + 1088)
|| ((v23 = i[1], v18) ? (v24 = v23 % v14) : (v24 = v16 & v23), v20 != v24) )
{
if ( !v15 )
goto LABEL_37;
v25 = *(_QWORD *)(v15 + 8);
if ( !v18 )
{
v26 = v16 & v25;
if ( v20 == v26 )
goto LABEL_42;
LABEL_37:
*(_QWORD *)(v21 + 8 * v20) = 0;
v15 = *(_QWORD *)v12;
goto LABEL_38;
}
v28 = v25 / v14;
if ( v20 == v25 % v14 )
goto LABEL_41;
*(_QWORD *)(v21 + 8 * v20) = 0;
v15 = *(_QWORD *)v12;
}
LABEL_38:
v27 = v15;
if ( v15 )
{
v25 = *(_QWORD *)(v15 + 8);
if ( v18 )
{
v28 = v25 / v14;
LABEL_41:
v26 = v25 - v28 * v14;
LABEL_42:
if ( v20 == v26 )
goto LABEL_48;
}
else
{
v26 = v16 & v25;
if ( v20 == v26 )
{
LABEL_48:
v27 = v15;
goto LABEL_44;
}
}
*(_QWORD *)(*((_QWORD *)this + 134) + 8 * v26) = i;
v27 = *(_QWORD *)v12;
}
LABEL_44:
*i = v27;
*(_QWORD *)v12 = 0;
--*((_QWORD *)this + 137);
operator delete(v12);
v12 = v19;
}
while ( v19 );
}
return _stack_chk_guard;
}