{"type": "func", "start": 4300586352, "end": 4300586421, "name": "GJGameLevel::getAverageDifficulty", "pseudocode": "// \n// GJGameLevel::getAverageDifficulty from 0x10055bd70 to 0x10055bdb5 (69 bytes)\n// \n// 2 xrefs:\n// > LevelCell::loadCustomLevelCell @ 0x100250500\n// > LevelInfoLayer::updateLabelValues @ 0x1002c31aa\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\nint __fastcall GJGameLevel::getAverageDifficulty(GJGameLevel *a1)\n{\n  __m128 v1; // xmm0\n  int m_ratings; // ecx\n  int result; // eax\n  __m128 v4; // xmm1\n\n  m_ratings = a1->m_ratings;\n  result = 0;\n  if ( m_ratings >= 5 )\n  {\n    v1.f32[0] = (float)a1->m_ratingsSum / (float)m_ratings;\n    v4 = _mm_or_ps(_mm_and_ps((__m128)xmmword_1008150B0, v1), (__m128)xmmword_1008150C0);\n    v4.f32[0] = v4.f32[0] + v1.f32[0];\n    return (int)_mm_round_ss((__m128)0LL, v4, 11).f32[0];\n  }\n  return result;\n}", "assembly": "; \n; GJGameLevel::getAverageDifficulty from 0x10055bd70 to 0x10055bdb5 (69 bytes)\n; \n; 2 xrefs:\n; > LevelCell::loadCustomLevelCell @ 0x100250500\n; > LevelInfoLayer::updateLabelValues @ 0x1002c31aa\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     ecx, [rdi+274h]                                                ; +0x0, 0x10055bd70\nxor     eax, eax                                                       ; +0x6, 0x10055bd76\ncmp     ecx, 5                                                         ; +0x8, 0x10055bd78\njl      short locret_10055BDB4                                         ; +0xb, 0x10055bd7b\npush    rbp                                                            ; +0xd, 0x10055bd7d\nmov     rbp, rsp                                                       ; +0xe, 0x10055bd7e\ncvtsi2ss xmm0, dword ptr [rdi+278h]                                    ; +0x11, 0x10055bd81\ncvtsi2ss xmm1, ecx                                                     ; +0x19, 0x10055bd89\ndivss   xmm0, xmm1                                                     ; +0x1d, 0x10055bd8d\nmovaps  xmm1, cs:xmmword_1008150B0                                     ; +0x21, 0x10055bd91\nandps   xmm1, xmm0                                                     ; +0x28, 0x10055bd98\norps    xmm1, cs:xmmword_1008150C0                                     ; +0x2b, 0x10055bd9b\naddss   xmm1, xmm0                                                     ; +0x32, 0x10055bda2\nxorps   xmm0, xmm0                                                     ; +0x36, 0x10055bda6\nroundss xmm0, xmm1, 0Bh                                                ; +0x39, 0x10055bda9\ncvttss2si eax, xmm0                                                    ; +0x3f, 0x10055bdaf\npop     rbp                                                            ; +0x43, 0x10055bdb3\nretn                                                                   ; +0x44, 0x10055bdb4", "xrefs": ["LevelCell::loadCustomLevelCell @ 0x100250500", "LevelInfoLayer::updateLabelValues @ 0x1002c31aa"], "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"}