//
// sub_1002C2D70 from 0x1002c2d70 to 0x1002c2f0c (412 bytes)
//
// 1 xrefs:
// > PlayerObject::startDashing @ 0x1002c30c8
//
// 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:31 +0000
//
float __fastcall sub_1002C2D70(__int64 a1, float *a2)
{
float result; // s0
float v3; // s1
float v4; // w8
float v5; // s2
float v6; // w8
float v8; // s2
float v10; // s3
float v12; // w8
result = -90.0;
if ( !*(_BYTE *)(a1 + 2427) )
result = 0.0;
if ( *(_BYTE *)(a1 + 2426) )
result = result + 180.0;
v3 = *a2;
if ( result != 0.0 )
{
v3 = result + v3;
*a2 = v3;
if ( v3 <= 180.0 )
{
if ( v3 >= -180.0 )
goto LABEL_11;
v4 = 360.0;
}
else
{
v4 = -360.0;
}
v3 = v3 + v4;
*a2 = v3;
}
LABEL_11:
if ( fabsf(v3) <= 90.0 )
goto LABEL_19;
v5 = -180.0;
if ( v3 > 0.0 )
v5 = 180.0;
v3 = v5 - v3;
*a2 = v3;
if ( v3 <= 180.0 )
{
if ( v3 >= -180.0 )
goto LABEL_19;
v6 = 360.0;
}
else
{
v6 = -360.0;
}
v3 = v3 + v6;
*a2 = v3;
LABEL_19:
if ( v3 > 70.0 || v3 < -70.0 )
{
v8 = 70.0;
if ( v3 > -180.0 && v3 < 70.0 )
v8 = -70.0;
v10 = 70.0;
if ( v3 >= 180.0 || v3 <= 70.0 )
v10 = -70.0;
if ( v3 > 0.0 )
v3 = v10;
else
v3 = v8;
*a2 = v3;
}
if ( result != 0.0 )
{
result = v3 - result;
*a2 = result;
if ( result <= 180.0 )
{
if ( result >= -180.0 )
return result;
v12 = 360.0;
}
else
{
v12 = -360.0;
}
result = result + v12;
*a2 = result;
}
return result;
}