{"type": "func", "start": 589940, "end": 590122, "name": "sub_90074", "pseudocode": "// \n// sub_90074 from 0x90074 to 0x9012a (182 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0x908ee\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__int16 *__fastcall sub_90074(__int16 *result, int a2, int a3, int a4, int a5)\n{\n  int v5; // r12\n  __int16 *v6; // r5\n  float v7; // s10\n  int v8; // r4\n  int v9; // lr\n  int i; // r6\n  int j; // r4\n  float v12; // s14\n  int v13; // r3\n\n  v5 = a5;\n  v6 = &result[a4 * a2];\n  v7 = 1.0 / (float)(a5 + 1);\n  while ( v5 )\n  {\n    v8 = a4 + v5;\n    if ( a4 + v5 >= a3 )\n      v8 = a3;\n    v9 = v8 - a4;\n    for ( i = v8 - a4; i; --i )\n    {\n      for ( j = 0; j < a2; ++j )\n      {\n        v12 = (float)(v7 * 0.000030519) * (float)*v6;\n        if ( v12 <= 1.0 )\n        {\n          if ( v12 >= -1.0 )\n            v13 = (int)(float)(v12 * 32767.0);\n          else\n            LOWORD(v13) = 0x8000;\n        }\n        else\n        {\n          LOWORD(v13) = 0x7FFF;\n        }\n        *v6++ = v13;\n      }\n      v7 = v7 + (float)(1.0 / (float)(a5 + 1));\n    }\n    v5 -= v9;\n    a4 = 0;\n    v6 = result;\n  }\n  return result;\n}", "assembly": "; \n; sub_90074 from 0x90074 to 0x9012a (182 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0x908ee\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, 0x90074\nADD             R7, SP, #0xC                                           ; +0x2, 0x90076\nPUSH.W          {R11}                                                  ; +0x4, 0x90078\nMUL             R4, R3, R1                                             ; +0x8, 0x9007c\nLDR.W           R12, [R7,#-0x10+arg_0]                                 ; +0xc, 0x90080\nVMOV.F32        S6, #-1.0                                              ; +0x10, 0x90084\nVLDR            S4, =0.000030519                                       ; +0x14, 0x90088\nVLDR            S8, =32767.0                                           ; +0x18, 0x9008c\nADD.W           R5, R0, R4,LSL#1                                       ; +0x1c, 0x90090\nADD.W           R4, R12, #1                                            ; +0x20, 0x90094\nVMOV            S0, R4                                                 ; +0x24, 0x90098\nVCVT.F32.S32    S2, S0                                                 ; +0x28, 0x9009c\nVMOV.F32        S0, #1.0                                               ; +0x2c, 0x900a0\nVDIV.F32        S2, S0, S2                                             ; +0x30, 0x900a4\nVMOV.F32        S10, S2                                                ; +0x34, 0x900a8\nCMP.W           R12, #0                                                ; +0x38, 0x900ac\nBEQ             loc_90124                                              ; +0x3c, 0x900b0\nADD.W           R4, R3, R12                                            ; +0x3e, 0x900b2\nCMP             R4, R2                                                 ; +0x42, 0x900b6\nIT GE                                                                  ; +0x44, 0x900b8\nMOVGE           R4, R2                                                 ; +0x46, 0x900ba\nSUB.W           LR, R4, R3                                             ; +0x48, 0x900bc\nMOV             R6, LR                                                 ; +0x4c, 0x900c0\nCBZ             R6, loc_9011A                                          ; +0x4e, 0x900c2\nVMUL.F32        S12, S10, S4                                           ; +0x50, 0x900c4\nSUBS            R6, #1                                                 ; +0x54, 0x900c8\nMOVS            R4, #0                                                 ; +0x56, 0x900ca\nCMP             R4, R1                                                 ; +0x58, 0x900cc\nBGE             loc_90114                                              ; +0x5a, 0x900ce\nLDRSH.W         R3, [R5]                                               ; +0x5c, 0x900d0\nVMOV            S14, R3                                                ; +0x60, 0x900d4\nVCVT.F32.S32    S14, S14                                               ; +0x64, 0x900d8\nVMUL.F32        S14, S12, S14                                          ; +0x68, 0x900dc\nVCMPE.F32       S14, S0                                                ; +0x6c, 0x900e0\nVMRS            APSR_nzcv, FPSCR                                       ; +0x70, 0x900e4\nBLE             loc_900F0                                              ; +0x74, 0x900e8\nMOVW            R3, #0x7FFF                                            ; +0x76, 0x900ea\nB               loc_9010C                                              ; +0x7a, 0x900ee\nVCMPE.F32       S14, S6                                                ; +0x7c, 0x900f0\nVMRS            APSR_nzcv, FPSCR                                       ; +0x80, 0x900f4\nBGE             loc_90100                                              ; +0x84, 0x900f8\nMOV.W           R3, #0x8000                                            ; +0x86, 0x900fa\nB               loc_9010C                                              ; +0x8a, 0x900fe\nVMUL.F32        S14, S14, S8                                           ; +0x8c, 0x90100\nVCVT.S32.F32    S14, S14                                               ; +0x90, 0x90104\nVMOV            R3, S14                                                ; +0x94, 0x90108\nSTRH.W          R3, [R5],#2                                            ; +0x98, 0x9010c\nADDS            R4, #1                                                 ; +0x9c, 0x90110\nB               loc_900CC                                              ; +0x9e, 0x90112\nVADD.F32        S10, S10, S2                                           ; +0xa0, 0x90114\nB               loc_900C2                                              ; +0xa4, 0x90118\nSUB.W           R12, R12, LR                                           ; +0xa6, 0x9011a\nMOVS            R3, #0                                                 ; +0xaa, 0x9011e\nMOV             R5, R0                                                 ; +0xac, 0x90120\nB               loc_900AC                                              ; +0xae, 0x90122\nPOP.W           {R11}                                                  ; +0xb0, 0x90124\nPOP             {R4-R7,PC}                                             ; +0xb4, 0x90128", "xrefs": ["<???> @ 0x908ee"], "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"}