//
// GJGameLevel::getAverageDifficulty from 0x10055bd70 to 0x10055bdb5 (69 bytes)
//
// 2 xrefs:
// > LevelCell::loadCustomLevelCell @ 0x100250500
// > LevelInfoLayer::updateLabelValues @ 0x1002c31aa
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall GJGameLevel::getAverageDifficulty(GJGameLevel *a1)
{
__m128 v1; // xmm0
int m_ratings; // ecx
int result; // eax
__m128 v4; // xmm1
m_ratings = a1->m_ratings;
result = 0;
if ( m_ratings >= 5 )
{
v1.f32[0] = (float)a1->m_ratingsSum / (float)m_ratings;
v4 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v1), (__m128)xmmword_1008150C0);
v4.f32[0] = v4.f32[0] + v1.f32[0];
return (int)_mm_round_ss((__m128)0LL, v4, 11).f32[0];
}
return result;
}