{"type": "func", "start": 743648, "end": 743764, "name": "sub_B58E0", "pseudocode": "// \n// sub_B58E0 from 0xb58e0 to 0xb5954 (116 bytes)\n// \n// 1 xrefs:\n// > sub_B4A0C @ 0xb4a0c\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\n__int64 __fastcall sub_B58E0(__int64 a1, float *a2)\n{\n  int v3; // w9\n  float v4; // s0\n  __int64 result; // x0\n  int v6; // w9\n  int v7; // w11\n  float v8; // s1\n  int v9; // w12\n\n  v3 = *(_DWORD *)(a1 + 8);\n  v4 = *a2;\n  result = 0;\n  v6 = v3 - 1;\n  while ( (int)result <= v6 )\n  {\n    if ( *(float *)(*(_QWORD *)a1 + 4LL * v6) < v4 )\n      return (unsigned int)(v6 + 1);\n    v7 = ((int)result + v6) / 2;\n    v8 = *(float *)(*(_QWORD *)a1 + 4LL * v7);\n    v9 = v4 < v8;\n    if ( v8 < v4 )\n      v9 = -1;\n    if ( !v9 )\n      return (unsigned int)v7;\n    if ( v9 <= 0 )\n    {\n      result = (unsigned int)(v7 + 1);\n    }\n    else\n    {\n      v6 = v7 - 1;\n      result = (unsigned int)result;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_B58E0 from 0xb58e0 to 0xb5954 (116 bytes)\n; \n; 1 xrefs:\n; > sub_B4A0C @ 0xb4a0c\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             X8, X0                                                 ; +0x0, 0xb58e0\nLDR             W9, [X8,#8]                                            ; +0x4, 0xb58e4\nLDR             S0, [X1]                                               ; +0x8, 0xb58e8\nMOV             W0, WZR                                                ; +0xc, 0xb58ec\nMOV             W10, #2                                                ; +0x10, 0xb58f0\nSUB             W9, W9, #1                                             ; +0x14, 0xb58f4\nCMP             W0, W9                                                 ; +0x18, 0xb58f8\nB.GT            locret_B5950                                           ; +0x1c, 0xb58fc\nLDR             X12, [X8]                                              ; +0x20, 0xb5900\nLDR             S1, [X12,W9,SXTW#2]                                    ; +0x24, 0xb5904\nFCMP            S1, S0                                                 ; +0x28, 0xb5908\nB.LT            loc_B5944                                              ; +0x2c, 0xb590c\nADD             W11, W0, W9                                            ; +0x30, 0xb5910\nSDIV            W11, W11, W10                                          ; +0x34, 0xb5914\nLDR             S1, [X12,W11,SXTW#2]                                   ; +0x38, 0xb5918\nFCMP            S0, S1                                                 ; +0x3c, 0xb591c\nCSET            W12, LT                                                ; +0x40, 0xb5920\nFCMP            S1, S0                                                 ; +0x44, 0xb5924\nCSINV           W12, W12, WZR, GE                                      ; +0x48, 0xb5928\nCBZ             W12, loc_B594C                                         ; +0x4c, 0xb592c\nSUB             W13, W11, #1                                           ; +0x50, 0xb5930\nCMP             W12, #0                                                ; +0x54, 0xb5934\nCSEL            W9, W13, W9, GT                                        ; +0x58, 0xb5938\nCSINC           W0, W0, W11, GT                                        ; +0x5c, 0xb593c\nB               loc_B58F8                                              ; +0x60, 0xb5940\nADD             W0, W9, #1                                             ; +0x64, 0xb5944\nRET                                                                    ; +0x68, 0xb5948\nMOV             W0, W11                                                ; +0x6c, 0xb594c\nRET                                                                    ; +0x70, 0xb5950", "xrefs": ["sub_B4A0C @ 0xb4a0c"], "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"}