//
// sub_1002B36FC from 0x1002b36fc to 0x1002b3c3c (1344 bytes)
//
// 1 xrefs:
// > sub_1002B3E60 @ 0x1002b3e90
//
// 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:21 +0000
//
float __fastcall sub_1002B36FC(int a1, float *a2, float *a3, float result, float a5)
{
bool v5; // zf
float v6; // s1
float v7; // s2
float v8; // s2
float v9; // s2
float v10; // s2
float v11; // s2
float v12; // s2
float v13; // s3
float v14; // s3
float v15; // s3
float v16; // s4
float v17; // s2
float v18; // s4
float v19; // s1
float v20; // s1
v5 = a5 == 1.0;
v6 = 0.5;
if ( v5 )
v6 = 1.0;
if ( a1 > 3 )
{
if ( a1 != 4 )
{
if ( a1 != 5 )
{
if ( a1 != 6 )
goto LABEL_67;
if ( result == 0.7 )
{
*a2 = (float)(v6 * 0.15) * 0.6;
v7 = 12.0;
}
else if ( result == 0.9 )
{
*a2 = (float)(v6 * 0.151) * 0.6;
v7 = 14.0;
}
else if ( result == 1.1 )
{
*a2 = (float)(v6 * 0.152) * 0.6;
v7 = 15.0;
}
else if ( result == 1.3 )
{
*a2 = (float)(v6 * 0.155) * 0.6;
v7 = 16.0;
}
else
{
if ( result != 1.6 )
goto LABEL_67;
*a2 = (float)(v6 * 0.16) * 0.6;
v7 = 18.0;
}
v6 = v6 * v7;
v12 = 1.5;
goto LABEL_65;
}
if ( result == 0.7 )
{
*a2 = (float)(v6 * 0.15) * 0.6;
v11 = 12.0;
}
else
{
if ( result != 0.9 )
{
v12 = 1.1;
if ( result == 1.1 )
{
*a2 = (float)(v6 * 0.15) * 0.6;
v15 = 15.0;
}
else if ( result == 1.3 )
{
*a2 = (float)(v6 * 0.15) * 0.6;
v15 = 16.0;
}
else
{
if ( result != 1.6 )
goto LABEL_67;
*a2 = (float)(v6 * 0.15) * 0.6;
v15 = 17.0;
}
v6 = v6 * v15;
goto LABEL_65;
}
*a2 = (float)(v6 * 0.15) * 0.6;
v11 = 14.0;
}
v6 = v6 * v11;
v12 = 1.1;
LABEL_65:
v19 = v6 * v12;
LABEL_66:
*a3 = v19;
goto LABEL_67;
}
v9 = 0.7;
if ( result == 0.7 )
{
v8 = (float)(v6 * 0.145) * 0.7;
goto LABEL_15;
}
if ( result == 0.9 )
{
v13 = 0.152;
LABEL_31:
*a2 = (float)(v6 * v13) * v9;
v10 = 14.0;
goto LABEL_43;
}
if ( result == 1.1 )
{
v14 = 0.155;
LABEL_42:
*a2 = (float)(v6 * v14) * v9;
v10 = 16.0;
goto LABEL_43;
}
if ( result == 1.3 )
{
v16 = 0.151;
LABEL_54:
*a2 = (float)(v6 * v16) * v9;
v17 = 18.0;
LABEL_79:
v19 = (float)(v6 * v17) * 1.3;
goto LABEL_66;
}
if ( result != 1.6 )
goto LABEL_67;
v18 = 0.15;
LABEL_78:
*a2 = (float)(v6 * v18) * v9;
v17 = 22.0;
goto LABEL_79;
}
if ( a1 == 2 )
{
if ( result == 0.7 )
{
*a2 = (float)(v6 * 0.12) * 0.6;
v12 = 14.0;
}
else if ( result == 0.9 )
{
*a2 = (float)(v6 * 0.115) * 0.6;
v12 = 16.0;
}
else if ( result == 1.1 )
{
*a2 = (float)(v6 * 0.11) * 0.6;
v12 = 18.0;
}
else if ( result == 1.3 )
{
*a2 = (float)(v6 * 0.108) * 0.6;
v12 = 20.0;
}
else
{
if ( result != 1.6 )
goto LABEL_67;
*a2 = (float)(v6 * 0.106) * 0.6;
v12 = 22.0;
}
goto LABEL_65;
}
if ( a1 != 3 )
goto LABEL_67;
if ( result == 0.7 )
{
v8 = (float)(v6 * 0.15) * 0.9;
LABEL_15:
*a2 = v8;
v10 = 12.0;
LABEL_43:
v6 = v6 * v10;
v12 = 1.3;
goto LABEL_65;
}
v9 = 0.9;
if ( result == 0.9 )
{
v13 = 0.148;
goto LABEL_31;
}
if ( result == 1.1 )
{
v14 = 0.146;
goto LABEL_42;
}
if ( result == 1.3 )
{
v16 = 0.144;
goto LABEL_54;
}
if ( result == 1.6 )
{
v18 = 0.142;
goto LABEL_78;
}
LABEL_67:
if ( result == 0.7 )
{
v20 = 1.3;
}
else if ( result == 0.9 )
{
v20 = 1.2;
}
else
{
v20 = 1.1;
if ( result != 1.1 )
{
if ( result != 1.3 )
return result;
v20 = 1.05;
}
}
*a2 = *a2 * v20;
result = *a3 * v20;
*a3 = result;
return result;
}