{"type": "func", "start": 2990608, "end": 2990680, "name": "AchievementManager::percentageForCount", "pseudocode": "// \n// AchievementManager::percentageForCount from 0x2da210 to 0x2da258 (72 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\nint AchievementManager::percentageForCount(AchievementManager *a1, int a2, int a3)\n{\n  int result; // r0\n  int v4; // s15\n  bool v5; // fnf\n\n  *(float *)&result = floorf((float)((float)a2 / (float)a3) * 100.0);\n  v4 = result;\n  v5 = *(float *)&result < 100.0;\n  if ( *(float *)&result >= 100.0 )\n    result = 100;\n  else\n    v4 = (int)*(float *)&result;\n  if ( v5 )\n    return v4;\n  return result;\n}", "assembly": "; \n; AchievementManager::percentageForCount from 0x2da210 to 0x2da258 (72 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\nVMOV            S15, R1                                                ; +0x0, 0x2da210\nVMOV            S14, R2                                                ; +0x4, 0x2da214\nVCVT.F32.S32    S15, S15                                               ; +0x8, 0x2da218\nPUSH            {R3,LR}                                                ; +0xc, 0x2da21c\nVPUSH           {D8}                                                   ; +0xe, 0x2da21e\nVLDR            S16, =100.0                                            ; +0x12, 0x2da222\nVCVT.F32.S32    S14, S14                                               ; +0x16, 0x2da226\nVDIV.F32        S15, S15, S14                                          ; +0x1a, 0x2da22a\nVMUL.F32        S15, S15, S16                                          ; +0x1e, 0x2da22e\nVMOV            R0, S15; x                                             ; +0x22, 0x2da232\nBLX             floorf                                                 ; +0x26, 0x2da236\nVMOV            S15, R0                                                ; +0x2a, 0x2da23a\nVCMPE.F32       S15, S16                                               ; +0x2e, 0x2da23e\nVPOP            {D8}                                                   ; +0x32, 0x2da242\nVMRS            APSR_nzcv, FPSCR                                       ; +0x36, 0x2da246\nITET MI                                                                ; +0x3a, 0x2da24a\nVCVTMI.S32.F32  S15, S15                                               ; +0x3c, 0x2da24c\nMOVPL           R0, #0x64 ; 'd'                                        ; +0x40, 0x2da250\nVMOVMI          R0, S15                                                ; +0x42, 0x2da252\nPOP             {R3,PC}                                                ; +0x46, 0x2da256", "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"}