{"type": "func", "start": 4300265616, "end": 4300265708, "name": "FindBPMLayer::calculateBPM", "pseudocode": "// \n// FindBPMLayer::calculateBPM from 0x10050d890 to 0x10050d8ec (92 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid __fastcall FindBPMLayer::calculateBPM(FindBPMLayer *a1)\n{\n  int m_beats; // eax\n  __m128 v2; // xmm1\n  __m128 v3; // xmm0\n\n  m_beats = a1->m_beats;\n  if ( m_beats >= 2 )\n  {\n    v2 = (__m128)0x42700000u;\n    v2.f32[0] = 60.0 / (float)((float)(a1->m_elapsed - a1->m_startOffset) / (float)(m_beats - 1));\n    v3 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v2), (__m128)xmmword_1008150C0);\n    v3.f32[0] = v3.f32[0] + v2.f32[0];\n    a1->m_beatsPerMinute = (int)_mm_round_ss(v3, v3, 11).f32[0];\n  }\n}", "assembly": "; \n; FindBPMLayer::calculateBPM from 0x10050d890 to 0x10050d8ec (92 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nmov     eax, [rdi+2ECh]                                                ; +0x0, 0x10050d890\ncmp     eax, 2                                                         ; +0x6, 0x10050d896\njl      short locret_10050D8EB                                         ; +0x9, 0x10050d899\npush    rbp                                                            ; +0xb, 0x10050d89b\nmov     rbp, rsp                                                       ; +0xc, 0x10050d89c\nmovss   xmm0, dword ptr [rdi+2B0h]                                     ; +0xf, 0x10050d89f\nsubss   xmm0, dword ptr [rdi+2E8h]                                     ; +0x17, 0x10050d8a7\ndec     eax                                                            ; +0x1f, 0x10050d8af\ncvtsi2ss xmm1, eax                                                     ; +0x21, 0x10050d8b1\ndivss   xmm0, xmm1                                                     ; +0x25, 0x10050d8b5\nmovss   xmm1, cs:dword_100815028                                       ; +0x29, 0x10050d8b9\ndivss   xmm1, xmm0                                                     ; +0x31, 0x10050d8c1\nmovaps  xmm0, cs:xmmword_1008150B0                                     ; +0x35, 0x10050d8c5\nandps   xmm0, xmm1                                                     ; +0x3c, 0x10050d8cc\norps    xmm0, cs:xmmword_1008150C0                                     ; +0x3f, 0x10050d8cf\naddss   xmm0, xmm1                                                     ; +0x46, 0x10050d8d6\nroundss xmm0, xmm0, 0Bh                                                ; +0x4a, 0x10050d8da\ncvttss2si eax, xmm0                                                    ; +0x50, 0x10050d8e0\nmov     [rdi+2F0h], eax                                                ; +0x54, 0x10050d8e4\npop     rbp                                                            ; +0x5a, 0x10050d8ea\nretn                                                                   ; +0x5b, 0x10050d8eb", "xrefs": [], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}