//
// FindBPMLayer::registerTouch from 0x10007e340 to 0x10007e408 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x10077aff0
//
// 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::registerTouch(FindBPMLayer *a1)
{
int m_beats; // w8
__int64 v2; // x9
float m_elapsed; // s0
cocos2d::CCLabelBMFont *m_bpmLabel; // x19
void **v5; // x1
void *__p[2]; // [xsp+8h] [xbp-28h] BYREF
char v7; // [xsp+1Fh] [xbp-11h]
m_beats = a1->m_beats;
v2 = (unsigned int)(m_beats + 1);
a1->m_beats = v2;
m_elapsed = a1->m_elapsed;
if ( m_beats <= 0 )
{
a1->m_startOffset = m_elapsed;
((void (__fastcall *)(cocos2d::CCLabelBMFont *, const char *))a1->m_bpmLabel->setString)(a1->m_bpmLabel, "0");
}
else
{
LODWORD(v2) = llroundf(60.0 / (float)((float)(m_elapsed - a1->m_startOffset) / (float)(unsigned int)m_beats));
a1->m_beatsPerMinute = v2;
m_bpmLabel = a1->m_bpmLabel;
GameToolbox::intToString(v2, __p);
if ( v7 >= 0 )
v5 = __p;
else
v5 = (void **)__p[0];
((void (__fastcall *)(cocos2d::CCLabelBMFont *, void **))m_bpmLabel->setString)(m_bpmLabel, v5);
if ( v7 < 0 )
operator delete(__p[0]);
}
}