//
// FindBPMLayer::calculateBPM from 0x10050d890 to 0x10050d8ec (92 bytes)
//
// 0 xrefs:
//
// 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
//
void __fastcall FindBPMLayer::calculateBPM(FindBPMLayer *a1)
{
int m_beats; // eax
__m128 v2; // xmm1
__m128 v3; // xmm0
m_beats = a1->m_beats;
if ( m_beats >= 2 )
{
v2 = (__m128)0x42700000u;
v2.f32[0] = 60.0 / (float)((float)(a1->m_elapsed - a1->m_startOffset) / (float)(m_beats - 1));
v3 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v2), (__m128)xmmword_1008150C0);
v3.f32[0] = v3.f32[0] + v2.f32[0];
a1->m_beatsPerMinute = (int)_mm_round_ss(v3, v3, 11).f32[0];
}
}