//
// GJBaseGameLayer::flipGravity from 0x58ed3e to 0x58edde (160 bytes)
//
// 10 xrefs:
// > PlayerObject::ringJump @ 0x449a34
// > PlayerObject::ringJump @ 0x449a6c
// > PlayerObject::ringJump @ 0x449bea
// > PlayerObject::ringJump @ 0x449c24
// > PlayerObject::ringJump @ 0x449d2e
// > PlayerObject::ringJump @ 0x449d68
// > GJBaseGameLayer::gravBumpPlayer @ 0x5a4be2
// > GJBaseGameLayer::collisionCheckObjects @ 0x5ba48a
// > GJBaseGameLayer::collisionCheckObjects @ 0x5ba4fe
// > GJBaseGameLayer::collisionCheckObjects @ 0x5ba582
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:53:04 +0000
//
unsigned __int8 *__fastcall GJBaseGameLayer::flipGravity(unsigned __int8 *this, PlayerObject *a2, int a3, int a4)
{
unsigned __int8 *v5; // r5
int v8; // r2
v5 = this;
if ( *((unsigned __int8 *)a2 + 1959) != a3 )
{
this = PlayerObject::flipGravity((unsigned __int8 *)a2, a3, a4);
if ( !v5[1388] )
{
if ( v5[866] )
{
if ( !*(_BYTE *)(*((_DWORD *)v5 + 521) + 280) )
{
v8 = *((_DWORD *)v5 + 519);
this = *((unsigned __int8 **)v5 + 520);
if ( *(unsigned __int8 *)(v8 + 1953) == *(this + 1953)
&& *(unsigned __int8 *)(v8 + 1955) == *(this + 1955)
&& *(unsigned __int8 *)(v8 + 1954) == *(this + 1954)
&& *(unsigned __int8 *)(v8 + 1958) == *(this + 1958)
&& *(unsigned __int8 *)(v8 + 1957) == *(this + 1957)
&& *(unsigned __int8 *)(v8 + 1964) == *(this + 1964) )
{
if ( *((_DWORD *)a2 + 195) != *(_DWORD *)(v8 + 780) )
this = *((unsigned __int8 **)v5 + 519);
return PlayerObject::flipGravity(this, a3 ^ 1, a4);
}
}
}
}
}
return this;
}