//
// PlayLayer::getRelativeMod from 0x401888 to 0x4018f6 (110 bytes)
//
// 1 xrefs:
// > PlayLayer::updateInvisibleBlock @ 0x40196e
//
// 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:47:24 +0000
//
float __fastcall PlayLayer::getRelativeMod(int a1, float *a2, float a3, float a4, float a5)
{
float v5; // s13
float v6; // s14
float v7; // s11
float v8; // s12
bool v10; // cc
float v11; // s13
float v12; // s15
v5 = *(float *)(a1 + 996);
v6 = *(float *)(a1 + 10896);
v7 = *a2;
v8 = v5 + v6;
v10 = *a2 <= (float)(v5 + v6);
if ( *a2 <= (float)(v5 + v6) )
a3 = a4;
else
v7 = v7 - a5;
if ( *a2 <= (float)(v5 + v6) )
v8 = v8 - v7;
else
v5 = v7 - v5;
if ( v10 )
v11 = v8 - a5;
else
v11 = v5 - v6;
v12 = (float)(v6 - v11) * a3;
if ( v12 < 0.0 )
return 0.0;
if ( v12 > 1.0 )
return 1.0;
return v12;
}