//
// GJBaseGameLayer::processAdvancedFollowActions from 0x100294a5c to 0x100294c00 (420 bytes)
//
// 1 xrefs:
// > GJBaseGameLayer::processMoveActionsStep @ 0x1002933b4
//
// 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:05 +0000
//
__int64 __fastcall GJBaseGameLayer::processAdvancedFollowActions(__int64 result, float a2)
{
__int64 v3; // x19
_BYTE *v4; // x20
_BYTE *v5; // x21
float v6; // s8
int v7; // w8
_BYTE *v8; // x8
bool v9; // zf
_OWORD *v10; // x20
__int128 v11; // q1
__int64 i; // x1
v3 = result;
if ( *(_BYTE *)(result + 1640) == 1 )
{
result = sub_1002AD6B0();
*(_BYTE *)(v3 + 1640) = 0;
}
v4 = *(_BYTE **)(v3 + 1648);
v5 = *(_BYTE **)(v3 + 1656);
if ( v4 != v5 )
{
v6 = a2 * 240.0;
while ( (v4[28] & 1) != 0 )
{
v7 = (unsigned __int8)v4[29];
if ( v7 == 1 )
{
v4[29] = 0;
LABEL_9:
result = GJBaseGameLayer::processAdvancedFollowAction(v3, v4, v7 & 1, v6);
}
v4 += 32;
if ( v4 == v5 )
{
v4 = *(_BYTE **)(v3 + 1648);
v5 = *(_BYTE **)(v3 + 1656);
goto LABEL_12;
}
}
LOBYTE(v7) = v4[30];
goto LABEL_9;
}
LABEL_12:
if ( v4 != v5 )
{
v8 = v4 + 32;
while ( (*(v8 - 2) & 1) == 0 )
{
v9 = v8 == v5;
v8 += 32;
if ( v9 )
goto LABEL_26;
}
v10 = v8 - 32;
if ( v8 - 32 != v5 && v8 != v5 )
{
do
{
if ( (v8[30] & 1) == 0 )
{
v11 = *((_OWORD *)v8 + 1);
*v10 = *(_OWORD *)v8;
v10[1] = v11;
v10 += 2;
}
v8 += 32;
}
while ( v8 != v5 );
v5 = *(_BYTE **)(v3 + 1656);
}
if ( v10 != (_OWORD *)v5 )
*(_QWORD *)(v3 + 1656) = v10;
}
LABEL_26:
for ( i = *(_QWORD *)(v3 + 1088); i; i = *(_QWORD *)i )
{
while ( *(_DWORD *)(i + 60) < *(_DWORD *)(v3 + 944) )
{
result = sub_100019534((_QWORD *)(v3 + 1072), (__int64 *)i);
i = result;
if ( !result )
return result;
}
}
return result;
}