{"type": "func", "start": 387248, "end": 387360, "name": "sub_5E8B0", "pseudocode": "// \n// sub_5E8B0 from 0x5e8b0 to 0x5e920 (112 bytes)\n// \n// 3 xrefs:\n// > sub_60178 @ 0x6024e\n// > sub_60178 @ 0x6030e\n// > sub_603D4 @ 0x60668\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_5E8B0(int result, float a2, int a3, float *a4, int a5, float *a6)\n{\n  float v8; // s2\n  int v9; // r2\n  int v10; // r5\n  float *v11; // r6\n  float v12; // s4\n  int v13; // r5\n  float v14; // s2\n  float v15; // s4\n\n  v8 = 0.0;\n  v9 = 4 * a3;\n  v10 = 0;\n  v11 = a4;\n  while ( v10 < result )\n  {\n    v12 = *v11;\n    ++v10;\n    v11 = (float *)((char *)v11 + v9);\n    v8 = v8 + (float)(v12 * v12);\n  }\n  if ( v8 != 0.0 )\n  {\n    v13 = 0;\n    v14 = 1.0 / sqrtf(v8);\n    while ( v13 < result )\n    {\n      v15 = *a4;\n      a4 = (float *)((char *)a4 + v9);\n      ++v13;\n      *a6 = *a6 + (float)((float)(v15 * a2) * v14);\n      a6 += a5;\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_5E8B0 from 0x5e8b0 to 0x5e920 (112 bytes)\n; \n; 3 xrefs:\n; > sub_60178 @ 0x6024e\n; > sub_60178 @ 0x6030e\n; > sub_603D4 @ 0x60668\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, 0x5e8b0\nADD             R7, SP, #0xC                                           ; +0x2, 0x5e8b2\nPUSH.W          {R11}                                                  ; +0x4, 0x5e8b4\nVMOV            S0, R1                                                 ; +0x8, 0x5e8b8\nLDRD.W          R12, R1, [R7,#-0x10+arg_0]                             ; +0xc, 0x5e8bc\nVLDR            S2, =0.0                                               ; +0x10, 0x5e8c0\nLSLS            R2, R2, #2                                             ; +0x14, 0x5e8c4\nMOVS            R5, #0                                                 ; +0x16, 0x5e8c6\nMOV             R6, R3                                                 ; +0x18, 0x5e8c8\nCMP             R5, R0                                                 ; +0x1a, 0x5e8ca\nBGE             loc_5E8DE                                              ; +0x1c, 0x5e8cc\nVLDR            S4, [R6]                                               ; +0x1e, 0x5e8ce\nADDS            R4, R6, R2                                             ; +0x22, 0x5e8d2\nADDS            R5, #1                                                 ; +0x24, 0x5e8d4\nMOV             R6, R4                                                 ; +0x26, 0x5e8d6\nVMLA.F32        S2, S4, S4                                             ; +0x28, 0x5e8d8\nB               loc_5E8CA                                              ; +0x2c, 0x5e8dc\nVCMP.F32        S2, #0.0                                               ; +0x2e, 0x5e8de\nVMRS            APSR_nzcv, FPSCR                                       ; +0x32, 0x5e8e2\nBEQ             loc_5E91A                                              ; +0x36, 0x5e8e6\nVSQRT.F32       S2, S2                                                 ; +0x38, 0x5e8e8\nMOV.W           R4, R12,LSL#2                                          ; +0x3c, 0x5e8ec\nMOVS            R5, #0                                                 ; +0x40, 0x5e8f0\nVMOV.F32        S4, #1.0                                               ; +0x42, 0x5e8f2\nVDIV.F32        S2, S4, S2                                             ; +0x46, 0x5e8f6\nCMP             R5, R0                                                 ; +0x4a, 0x5e8fa\nBGE             loc_5E91A                                              ; +0x4c, 0x5e8fc\nVLDR            S4, [R3]                                               ; +0x4e, 0x5e8fe\nADD             R3, R2                                                 ; +0x52, 0x5e902\nVLDR            S6, [R1]                                               ; +0x54, 0x5e904\nADDS            R5, #1                                                 ; +0x58, 0x5e908\nVMUL.F32        S4, S4, S0                                             ; +0x5a, 0x5e90a\nVMLA.F32        S6, S4, S2                                             ; +0x5e, 0x5e90e\nVSTR            S6, [R1]                                               ; +0x62, 0x5e912\nADD             R1, R4                                                 ; +0x66, 0x5e916\nB               loc_5E8FA                                              ; +0x68, 0x5e918\nPOP.W           {R11}                                                  ; +0x6a, 0x5e91a\nPOP             {R4-R7,PC}                                             ; +0x6e, 0x5e91e", "xrefs": ["sub_60178 @ 0x6024e", "sub_60178 @ 0x6030e", "sub_603D4 @ 0x60668"], "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"}