{"type": "func", "start": 3760240, "end": 3760312, "name": "AchievementManager::percentageForCount", "pseudocode": "// \n// AchievementManager::percentageForCount from 0x396070 to 0x3960b8 (72 bytes)\n// \n// 0 xrefs:\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:46:20 +0000\n// \n\nfloat __fastcall AchievementManager::percentageForCount(AchievementManager *this, int a2, int a3)\n{\n  float result; // r0\n  int v4; // s15\n  bool v5; // fnf\n\n  result = floorf((float)((float)a2 / (float)a3) * 100.0);\n  v4 = LODWORD(result);\n  v5 = result < 100.0;\n  if ( result >= 100.0 )\n    LODWORD(result) = 100;\n  else\n    v4 = (int)result;\n  if ( v5 )\n    return *(float *)&v4;\n  return result;\n}", "assembly": "; \n; AchievementManager::percentageForCount from 0x396070 to 0x3960b8 (72 bytes)\n; \n; 0 xrefs:\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:46:20 +0000\n; \nVMOV            S15, R1                                                ; +0x0, 0x396070\nVMOV            S14, R2                                                ; +0x4, 0x396074\nVCVT.F32.S32    S15, S15                                               ; +0x8, 0x396078\nPUSH            {R3,LR}                                                ; +0xc, 0x39607c\nVPUSH           {D8}                                                   ; +0xe, 0x39607e\nVLDR            S16, =100.0                                            ; +0x12, 0x396082\nVCVT.F32.S32    S14, S14                                               ; +0x16, 0x396086\nVDIV.F32        S15, S15, S14                                          ; +0x1a, 0x39608a\nVMUL.F32        S15, S15, S16                                          ; +0x1e, 0x39608e\nVMOV            R0, S15; x                                             ; +0x22, 0x396092\nBLX             floorf                                                 ; +0x26, 0x396096\nVMOV            S15, R0                                                ; +0x2a, 0x39609a\nVCMPE.F32       S15, S16                                               ; +0x2e, 0x39609e\nVPOP            {D8}                                                   ; +0x32, 0x3960a2\nVMRS            APSR_nzcv, FPSCR                                       ; +0x36, 0x3960a6\nITET MI                                                                ; +0x3a, 0x3960aa\nVCVTMI.S32.F32  S15, S15                                               ; +0x3c, 0x3960ac\nMOVPL           R0, #0x64 ; 'd'                                        ; +0x40, 0x3960b0\nVMOVMI          R0, S15                                                ; +0x42, 0x3960b2\nPOP             {R3,PC}                                                ; +0x46, 0x3960b6", "xrefs": [], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}