//
// sub_7662A8 from 0x7662a8 to 0x766382 (218 bytes)
//
// 4 xrefs:
// > DeathHistogram::setProgression @ 0x767580
// > DeathHistogram::setData @ 0x767d24
// > DeathHistogram::setSurvival @ 0x767f7e
// > DeathHistogram::setSurvival @ 0x768264
//
// 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:59:07 +0000
//
int sub_7662A8()
{
float v0; // s0
float v1; // s15
float v2; // s0
float v3; // s14
unsigned __int8 v5; // [sp+4h] [bp-4h]
unsigned __int8 v6; // [sp+5h] [bp-3h]
v1 = 0.0;
if ( v0 < 0.0 )
{
v0 = 0.0;
}
else
{
if ( v0 > 1.0 )
{
v0 = 1.0;
LABEL_8:
v2 = (float)(v0 - 0.5) + (float)(v0 - 0.5);
v5 = (unsigned int)(float)((float)(v2 * 0.0) + 255.0);
v3 = 15.0;
v6 = (unsigned int)(float)((float)(v2 * -180.0) + 205.0);
return v5 | (unsigned __int16)(v6 << 8) | ((unsigned __int8)(unsigned int)(float)(v1 + (float)(v2 * v3)) << 16);
}
if ( v0 >= 0.5 )
goto LABEL_8;
}
v2 = v0 + v0;
v3 = -45.0;
v5 = (unsigned int)(float)((float)(v2 * 230.0) + 25.0);
v1 = 45.0;
v6 = (unsigned int)(float)((float)(v2 * -30.0) + 235.0);
return v5 | (unsigned __int16)(v6 << 8) | ((unsigned __int8)(unsigned int)(float)(v1 + (float)(v2 * v3)) << 16);
}