//
// GJBaseGameLayer::flipGravity from 0x99db0c to 0x99dc0c (256 bytes)
//
// 11 xrefs:
// > PlayerObject::ringJump @ 0x76a424
// > PlayerObject::ringJump @ 0x76a640
// > PlayerObject::ringJump @ 0x76a6e8
// > PlayerObject::ringJump @ 0x76a734
// > PlayerObject::ringJump @ 0x76a8b0
// > PlayerObject::ringJump @ 0x76a908
// > GJBaseGameLayer::gravBumpPlayer @ 0x9c25b8
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e8ab4
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e947c
// > GJBaseGameLayer::collisionCheckObjects @ 0x9e9558
// > ??> @ 0xe70b8
//
// 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:05 +0000
//
__int64 __fastcall GJBaseGameLayer::flipGravity(__int64 this, PlayerObject *a2, unsigned __int8 a3, unsigned __int8 a4)
{
__int64 v6; // x20
unsigned __int8 *v8; // x1
if ( *((unsigned __int8 *)a2 + 2423) != a3 )
{
v6 = this;
PlayerObject::flipGravity((__int64)a2, a3, a4);
this = *(unsigned __int8 *)(v6 + 1912);
if ( !*(_BYTE *)(v6 + 1912) )
{
this = *(unsigned __int8 *)(v6 + 1010);
if ( *(_BYTE *)(v6 + 1010) )
{
this = *(unsigned __int8 *)(*(_QWORD *)(v6 + 3272) + 340LL);
if ( !*(_BYTE *)(*(_QWORD *)(v6 + 3272) + 340LL) )
{
this = *(_QWORD *)(v6 + 3256);
v8 = *(unsigned __int8 **)(v6 + 3264);
if ( *(unsigned __int8 *)(this + 2417) == v8[2417]
&& *(unsigned __int8 *)(this + 2419) == v8[2419]
&& *(unsigned __int8 *)(this + 2418) == v8[2418]
&& *(unsigned __int8 *)(this + 2422) == v8[2422]
&& *(unsigned __int8 *)(this + 2421) == v8[2421]
&& *(unsigned __int8 *)(this + 2428) == v8[2428] )
{
if ( *((_DWORD *)a2 + 229) == *(_DWORD *)(this + 916) )
this = *(_QWORD *)(v6 + 3264);
return PlayerObject::flipGravity(this, a3 ^ 1u, a4);
}
}
}
}
}
return this;
}