//
// GameObject::determineSlopeDirection from 0x76f3b0 to 0x76f5f4 (580 bytes)
//
// 12 xrefs:
// > PlayLayer::addObject @ 0x6f44a0
// > PlayerObject::unrotateGameplayObject @ 0x760a54
// > PlayerObject::rotateGameplayObject @ 0x760ed0
// > GameObject::getObjectDirection @ 0x76f678
// > LevelEditorLayer::rotationForSlopeNearObject @ 0x78b53c
// > LevelEditorLayer::onPlaytest @ 0x7967dc
// > LevelEditorLayer::addSpecial @ 0x7a0790
// > EditorUI::createSmartObjectsFromTemplate @ 0x7cb7d0
// > EditorUI::addObjectsToSmartTemplate @ 0x7cc6dc
// > RotateGameplayGameObject::updateGameplayRotation @ 0x886f40
// > GJBaseGameLayer::updateDebugDraw @ 0x99bcd0
// > ??> @ 0xd6a80
//
// 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:53:12 +0000
//
__int64 __fastcall GameObject::determineSlopeDirection(GameObject *this)
{
unsigned int v2; // w20
unsigned int v3; // w21
float v4; // s0
float v5; // s0
_BOOL4 v6; // w1
__int64 result; // x0
_BOOL4 v8; // w4
_BOOL4 v9; // w3
_BOOL4 v10; // w4
_BOOL4 v11; // w3
v2 = (*(unsigned __int8 (__fastcall **)(GameObject *))(*(_QWORD *)this + 1424LL))(this);
v3 = (*(unsigned __int8 (__fastcall **)(GameObject *))(*(_QWORD *)this + 1432LL))(this);
v4 = (*(float (__fastcall **)(GameObject *))(*(_QWORD *)this + 1576LL))(this);
*((_BYTE *)this + 1080) = 0;
v5 = (float)((int)v4 % 360);
v6 = fabsf(v5) == 180.0;
result = v5 == 0.0;
if ( v5 == 0.0 && v2 < (v3 ^ 1) )
goto LABEL_3;
if ( (v3 & v2) == 0 )
{
if ( v5 == 0.0 && v2 < v3 )
goto LABEL_14;
if ( v2 <= v3 )
{
if ( !v6 || v2 >= v3 )
{
result = v2 < v3;
goto LABEL_18;
}
}
else
{
if ( v6 )
{
LABEL_14:
*((_DWORD *)this + 271) = 1;
return 1;
}
if ( v5 != 0.0 )
{
LABEL_18:
v10 = v5 == 90.0 || v5 == -270.0;
v11 = v5 == -90.0 || v5 == 270.0;
if ( v2 >= (v3 ^ 1) )
{
if ( v10 && v2 > v3 )
goto LABEL_39;
}
else
{
if ( v6 )
goto LABEL_26;
if ( v10 )
goto LABEL_29;
if ( v11 )
{
LABEL_22:
*((_DWORD *)this + 271) = 5;
return 5;
}
}
if ( !(_DWORD)result )
{
if ( !v11 || v2 <= v3 )
return result;
LABEL_33:
*((_BYTE *)this + 1080) = 1;
*((_DWORD *)this + 271) = 7;
return 7;
}
if ( !v11 )
{
if ( !v10 )
return result;
goto LABEL_33;
}
LABEL_39:
*((_BYTE *)this + 1080) = 1;
*((_DWORD *)this + 271) = 6;
return 6;
}
}
*((_DWORD *)this + 271) = 2;
return 2;
}
if ( v6 )
{
LABEL_3:
result = 1;
*((_DWORD *)this + 271) = 0;
*((_BYTE *)this + 1080) = 1;
return result;
}
v8 = v5 == 90.0 || v5 == -270.0;
v9 = v5 == -90.0 || v5 == 270.0;
if ( v5 == 0.0 )
{
LABEL_26:
*((_BYTE *)this + 1080) = 1;
*((_DWORD *)this + 271) = 3;
return 3;
}
if ( v2 < (v3 ^ 1) )
{
if ( !v8 && !v9 )
return result;
LABEL_29:
*((_DWORD *)this + 271) = 4;
return 4;
}
if ( v9 )
goto LABEL_29;
if ( v8 )
goto LABEL_22;
return result;
}