{"type": "func", "start": 388360, "end": 388540, "name": "sub_5ED08", "pseudocode": "// \n// sub_5ED08 from 0x5ed08 to 0x5edbc (180 bytes)\n// \n// 4 xrefs:\n// > sub_5F130 @ 0x5f2b6\n// > sub_5F2D0 @ 0x5f442\n// > sub_5F2D0 @ 0x5f476\n// > sub_5F5F8 @ 0x5f796\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 sub_5ED08(int a1, float *a2, float *a3)\n{\n  int result; // r0\n  float v7; // s0\n  float v8; // s2\n  float v9; // s0\n  float v10; // s0\n  float v11; // s4\n  bool v12; // fzf\n  bool v13; // fnf\n  float v14; // s0\n\n  result = sub_5EC94(a1, (int)a2, (int)a3);\n  if ( !result )\n  {\n    v7 = a2[1];\n    v8 = a3[1];\n    if ( (float)(v8 - v7) <= 181.0 && (v7 <= v8 || (float)(v7 - v8) >= 179.0) )\n    {\n      v9 = *(float *)(a1 + 12);\n      if ( v9 > 179.0 || v9 <= 0.0 )\n      {\n        *(_DWORD *)(a1 + 16) = 0;\n        *(_DWORD *)(a1 + 20) = 0;\n        return 0;\n      }\n      else\n      {\n        result = 0;\n        v10 = (float)(a3[4] * a2[2]) - (float)(a3[2] * a2[4]);\n        v11 = -1.0;\n        v12 = v10 == 0.0;\n        v13 = v10 < 0.0;\n        v14 = 1.0 / v10;\n        if ( !v13 && !v12 )\n          v11 = 1.0;\n        *(float *)(a1 + 16) = v14;\n        *(float *)(a1 + 20) = v11;\n      }\n    }\n    else\n    {\n      return 31;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_5ED08 from 0x5ed08 to 0x5edbc (180 bytes)\n; \n; 4 xrefs:\n; > sub_5F130 @ 0x5f2b6\n; > sub_5F2D0 @ 0x5f442\n; > sub_5F2D0 @ 0x5f476\n; > sub_5F5F8 @ 0x5f796\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\nPUSH            {R4-R7,LR}                                             ; +0x0, 0x5ed08\nADD             R7, SP, #0xC                                           ; +0x2, 0x5ed0a\nPUSH.W          {R11}                                                  ; +0x4, 0x5ed0c\nMOV             R5, R2                                                 ; +0x8, 0x5ed10\nMOV             R6, R1                                                 ; +0xa, 0x5ed12\nMOV             R4, R0                                                 ; +0xc, 0x5ed14\nBL              sub_5EC94                                              ; +0xe, 0x5ed16\nCBNZ            R0, loc_5ED54                                          ; +0x12, 0x5ed1a\nVLDR            S0, [R6,#4]                                            ; +0x14, 0x5ed1c\nVLDR            S2, [R5,#4]                                            ; +0x18, 0x5ed20\nVLDR            S6, =181.0                                             ; +0x1c, 0x5ed24\nVSUB.F32        S4, S2, S0                                             ; +0x20, 0x5ed28\nVCMPE.F32       S4, S6                                                 ; +0x24, 0x5ed2c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x28, 0x5ed30\nBGT             loc_5ED52                                              ; +0x2c, 0x5ed34\nVCMPE.F32       S0, S2                                                 ; +0x2e, 0x5ed36\nVMRS            APSR_nzcv, FPSCR                                       ; +0x32, 0x5ed3a\nBLE             loc_5ED5A                                              ; +0x36, 0x5ed3e\nVSUB.F32        S0, S0, S2                                             ; +0x38, 0x5ed40\nVLDR            S2, =179.0                                             ; +0x3c, 0x5ed44\nVCMPE.F32       S0, S2                                                 ; +0x40, 0x5ed48\nVMRS            APSR_nzcv, FPSCR                                       ; +0x44, 0x5ed4c\nBGE             loc_5ED5A                                              ; +0x48, 0x5ed50\nMOVS            R0, #0x1F                                              ; +0x4a, 0x5ed52\nPOP.W           {R11}                                                  ; +0x4c, 0x5ed54\nPOP             {R4-R7,PC}                                             ; +0x50, 0x5ed58\nVLDR            S0, [R4,#0xC]                                          ; +0x52, 0x5ed5a\nVLDR            S2, =179.0                                             ; +0x56, 0x5ed5e\nVCMPE.F32       S0, S2                                                 ; +0x5a, 0x5ed62\nVMRS            APSR_nzcv, FPSCR                                       ; +0x5e, 0x5ed66\nBGT             loc_5EDB4                                              ; +0x62, 0x5ed6a\nVCMPE.F32       S0, #0.0                                               ; +0x64, 0x5ed6c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x68, 0x5ed70\nBLE             loc_5EDB4                                              ; +0x6c, 0x5ed74\nVLDR            S0, [R6,#8]                                            ; +0x6e, 0x5ed76\nMOVS            R0, #0                                                 ; +0x72, 0x5ed7a\nVLDR            S6, [R5,#0x10]                                         ; +0x74, 0x5ed7c\nVLDR            S2, [R6,#0x10]                                         ; +0x78, 0x5ed80\nVMUL.F32        S0, S6, S0                                             ; +0x7c, 0x5ed84\nVLDR            S4, [R5,#8]                                            ; +0x80, 0x5ed88\nVMLS.F32        S0, S4, S2                                             ; +0x84, 0x5ed8c\nVMOV.F32        S2, #1.0                                               ; +0x88, 0x5ed90\nVMOV.F32        S4, #-1.0                                              ; +0x8c, 0x5ed94\nVCMPE.F32       S0, #0.0                                               ; +0x90, 0x5ed98\nVDIV.F32        S0, S2, S0                                             ; +0x94, 0x5ed9c\nVMRS            APSR_nzcv, FPSCR                                       ; +0x98, 0x5eda0\nIT GT                                                                  ; +0x9c, 0x5eda4\nVMOVGT.F32      S4, S2                                                 ; +0x9e, 0x5eda6\nVSTR            S0, [R4,#0x10]                                         ; +0xa2, 0x5edaa\nVSTR            S4, [R4,#0x14]                                         ; +0xa6, 0x5edae\nB               loc_5ED54                                              ; +0xaa, 0x5edb2\nMOVS            R0, #0                                                 ; +0xac, 0x5edb4\nSTRD.W          R0, R0, [R4,#0x10]                                     ; +0xae, 0x5edb6\nB               loc_5ED54                                              ; +0xb2, 0x5edba", "xrefs": ["sub_5F130 @ 0x5f2b6", "sub_5F2D0 @ 0x5f442", "sub_5F2D0 @ 0x5f476", "sub_5F5F8 @ 0x5f796"], "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"}