{"type": "func", "start": 316180, "end": 316548, "name": "sub_4D314", "pseudocode": "// \n// sub_4D314 from 0x4d314 to 0x4d484 (368 bytes)\n// \n// 1 xrefs:\n// > sub_4DD08 @ 0x4df6c\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:40:41 +0000\n// \n\nint __fastcall sub_4D314(int a1)\n{\n  float v2; // s4\n  float v3; // s6\n  float v4; // s8\n  float v5; // s10\n  float v6; // s0\n  float v7; // s2\n  float v8; // s4\n  float *v9; // r1\n  float v10; // s11\n  float v11; // s6\n  float v12; // s3\n  float v13; // s10\n  float v14; // s5\n  float v15; // s7\n  float v16; // s9\n  float v17; // s14\n  float v18; // s12\n  float v19; // s8\n  float v20; // s1\n  float v21; // s0\n  int v22; // r0\n  float v24; // [sp+0h] [bp-28h] BYREF\n  float v25; // [sp+4h] [bp-24h]\n  float v26; // [sp+8h] [bp-20h]\n  float v27[3]; // [sp+Ch] [bp-1Ch] BYREF\n\n  v2 = *(float *)(a1 + 60);\n  v3 = *(float *)(a1 + 64);\n  v4 = *(float *)(a1 + 68);\n  v5 = *(float *)(a1 + 72);\n  v27[0] = (float)(*(float *)(a1 + 52) + *(float *)(a1 + 56)) * 0.5;\n  v27[1] = (float)(v2 + v3) * 0.5;\n  v27[2] = (float)(v4 + v5) * 0.5;\n  sub_4D484(a1 + 128, v27, &v24);\n  v7 = v25 + *(float *)(a1 + 108);\n  v8 = v26 + *(float *)(a1 + 112);\n  v24 = v24 + *(float *)(a1 + 104);\n  v6 = v24;\n  v25 = v7;\n  v26 = v8;\n  v9 = *(float **)(a1 + 224);\n  v10 = *(float *)(a1 + 128);\n  v11 = (float)(*(float *)(a1 + 56) - *(float *)(a1 + 52)) * 0.5;\n  v12 = *(float *)(a1 + 168);\n  v13 = (float)(*(float *)(a1 + 64) - *(float *)(a1 + 60)) * 0.5;\n  v14 = *(float *)(a1 + 152);\n  v15 = *(float *)(a1 + 136);\n  v16 = fabsf(*(float *)(a1 + 144));\n  v17 = fabsf(*(float *)(a1 + 160));\n  v18 = (float)(*(float *)(a1 + 72) - *(float *)(a1 + 68)) * 0.5;\n  v19 = (float)((float)(fabsf(*(float *)(a1 + 132)) * v11) + (float)(fabsf(*(float *)(a1 + 148)) * v13))\n      + (float)(fabsf(*(float *)(a1 + 164)) * v18);\n  v9[3] = v19 + v7;\n  v20 = (float)((float)(fabsf(v10) * v11) + (float)(v16 * v13)) + (float)(v17 * v18);\n  *v9 = v6 - v20;\n  v9[1] = v20 + v6;\n  v21 = (float)((float)(fabsf(v15) * v11) + (float)(fabsf(v14) * v13)) + (float)(fabsf(v12) * v18);\n  v9[5] = v21 + v8;\n  v9[2] = v7 - v19;\n  v9[4] = v8 - v21;\n  v22 = *(_DWORD *)(*(_DWORD *)(a1 + 12) + 340);\n  if ( *(_BYTE *)(a1 + 76) )\n    return sub_50210(v22);\n  else\n    return sub_5006E(v22);\n}", "assembly": "; \n; sub_4D314 from 0x4d314 to 0x4d484 (368 bytes)\n; \n; 1 xrefs:\n; > sub_4DD08 @ 0x4df6c\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:40:41 +0000\n; \nPUSH            {R4,R6,R7,LR}                                          ; +0x0, 0x4d314\nADD             R7, SP, #8                                             ; +0x2, 0x4d316\nVPUSH           {D5-D8}                                                ; +0x4, 0x4d318\nVLDR            S0, [R0,#0x34]                                         ; +0x8, 0x4d31c\nVMOV.F32        S16, #0.5                                              ; +0xc, 0x4d320\nVLDR            S2, [R0,#0x38]                                         ; +0x10, 0x4d324\nMOV             R4, R0                                                 ; +0x14, 0x4d328\nVLDR            S4, [R0,#0x3C]                                         ; +0x16, 0x4d32a\nADD             R1, SP, #0x18+var_C                                    ; +0x1a, 0x4d32e\nVADD.F32        S0, S0, S2                                             ; +0x1c, 0x4d330\nVLDR            S6, [R0,#0x40]                                         ; +0x20, 0x4d334\nVLDR            S8, [R0,#0x44]                                         ; +0x24, 0x4d338\nMOV             R2, SP                                                 ; +0x28, 0x4d33c\nVLDR            S10, [R0,#0x48]                                        ; +0x2a, 0x4d33e\nADDS            R0, #0x80                                              ; +0x2e, 0x4d342\nVMUL.F32        S0, S0, S16                                            ; +0x30, 0x4d344\nVSTR            S0, [SP,#0x18+var_C]                                   ; +0x34, 0x4d348\nVADD.F32        S0, S4, S6                                             ; +0x38, 0x4d34c\nVMUL.F32        S0, S0, S16                                            ; +0x3c, 0x4d350\nVSTR            S0, [SP,#0x18+var_8]                                   ; +0x40, 0x4d354\nVADD.F32        S0, S8, S10                                            ; +0x44, 0x4d358\nVMUL.F32        S0, S0, S16                                            ; +0x48, 0x4d35c\nVSTR            S0, [SP,#0x18+var_4]                                   ; +0x4c, 0x4d360\nBL              sub_4D484                                              ; +0x50, 0x4d364\nVLDR            S0, [R4,#0x68]                                         ; +0x54, 0x4d368\nVLDR            S6, [SP,#0x18+var_18]                                  ; +0x58, 0x4d36c\nVLDR            S2, [R4,#0x6C]                                         ; +0x5c, 0x4d370\nVLDR            S8, [SP,#0x18+var_14]                                  ; +0x60, 0x4d374\nVADD.F32        S0, S6, S0                                             ; +0x64, 0x4d378\nVLDR            S4, [R4,#0x70]                                         ; +0x68, 0x4d37c\nVLDR            S10, [SP,#0x18+var_10]                                 ; +0x6c, 0x4d380\nVADD.F32        S2, S8, S2                                             ; +0x70, 0x4d384\nVADD.F32        S4, S10, S4                                            ; +0x74, 0x4d388\nVSTR            S0, [SP,#0x18+var_18]                                  ; +0x78, 0x4d38c\nVSTR            S2, [SP,#0x18+var_14]                                  ; +0x7c, 0x4d390\nVSTR            S4, [SP,#0x18+var_10]                                  ; +0x80, 0x4d394\nVLDR            S6, [R4,#0x34]                                         ; +0x84, 0x4d398\nVLDR            S8, [R4,#0x38]                                         ; +0x88, 0x4d39c\nVLDR            S10, [R4,#0x3C]                                        ; +0x8c, 0x4d3a0\nVSUB.F32        S6, S8, S6                                             ; +0x90, 0x4d3a4\nVLDR            S12, [R4,#0x40]                                        ; +0x94, 0x4d3a8\nVLDR            S8, [R4,#0x84]                                         ; +0x98, 0x4d3ac\nVSUB.F32        S10, S12, S10                                          ; +0x9c, 0x4d3b0\nVLDR            S12, [R4,#0x94]                                        ; +0xa0, 0x4d3b4\nVABS.F32        S8, S8                                                 ; +0xa4, 0x4d3b8\nVLDR            S14, [R4,#0x44]                                        ; +0xa8, 0x4d3bc\nVABS.F32        S12, S12                                               ; +0xac, 0x4d3c0\nVLDR            S1, [R4,#0x48]                                         ; +0xb0, 0x4d3c4\nLDR.W           R1, [R4,#0xE0]                                         ; +0xb4, 0x4d3c8\nVLDR            S11, [R4,#0x80]                                        ; +0xb8, 0x4d3cc\nVMUL.F32        S6, S6, S16                                            ; +0xbc, 0x4d3d0\nVLDR            S9, [R4,#0x90]                                         ; +0xc0, 0x4d3d4\nVLDR            S3, [R4,#0xA8]                                         ; +0xc4, 0x4d3d8\nVMUL.F32        S10, S10, S16                                          ; +0xc8, 0x4d3dc\nVLDR            S5, [R4,#0x98]                                         ; +0xcc, 0x4d3e0\nVLDR            S7, [R4,#0x88]                                         ; +0xd0, 0x4d3e4\nVABS.F32        S9, S9                                                 ; +0xd4, 0x4d3e8\nVMUL.F32        S8, S8, S6                                             ; +0xd8, 0x4d3ec\nVMLA.F32        S8, S12, S10                                           ; +0xdc, 0x4d3f0\nVSUB.F32        S12, S1, S14                                           ; +0xe0, 0x4d3f4\nVLDR            S1, [R4,#0xA4]                                         ; +0xe4, 0x4d3f8\nVLDR            S14, [R4,#0xA0]                                        ; +0xe8, 0x4d3fc\nVABS.F32        S1, S1                                                 ; +0xec, 0x4d400\nVABS.F32        S14, S14                                               ; +0xf0, 0x4d404\nVMUL.F32        S12, S12, S16                                          ; +0xf4, 0x4d408\nVMLA.F32        S8, S1, S12                                            ; +0xf8, 0x4d40c\nVADD.F32        S1, S8, S2                                             ; +0xfc, 0x4d410\nVSUB.F32        S2, S2, S8                                             ; +0x100, 0x4d414\nVSTR            S1, [R1,#0xC]                                          ; +0x104, 0x4d418\nVABS.F32        S1, S11                                                ; +0x108, 0x4d41c\nVMUL.F32        S1, S1, S6                                             ; +0x10c, 0x4d420\nVMLA.F32        S1, S9, S10                                            ; +0x110, 0x4d424\nVMLA.F32        S1, S14, S12                                           ; +0x114, 0x4d428\nVSUB.F32        S14, S0, S1                                            ; +0x118, 0x4d42c\nVADD.F32        S0, S1, S0                                             ; +0x11c, 0x4d430\nVSTR            S14, [R1]                                              ; +0x120, 0x4d434\nVSTR            S0, [R1,#4]                                            ; +0x124, 0x4d438\nVABS.F32        S0, S7                                                 ; +0x128, 0x4d43c\nVMUL.F32        S0, S0, S6                                             ; +0x12c, 0x4d440\nVABS.F32        S6, S5                                                 ; +0x130, 0x4d444\nVMLA.F32        S0, S6, S10                                            ; +0x134, 0x4d448\nVABS.F32        S6, S3                                                 ; +0x138, 0x4d44c\nVMLA.F32        S0, S6, S12                                            ; +0x13c, 0x4d450\nVADD.F32        S6, S0, S4                                             ; +0x140, 0x4d454\nVSUB.F32        S0, S4, S0                                             ; +0x144, 0x4d458\nVSTR            S6, [R1,#0x14]                                         ; +0x148, 0x4d45c\nVSTR            S2, [R1,#8]                                            ; +0x14c, 0x4d460\nVSTR            S0, [R1,#0x10]                                         ; +0x150, 0x4d464\nLDR             R0, [R4,#0xC]                                          ; +0x154, 0x4d468\nLDRB.W          R2, [R4,#0x4C]                                         ; +0x156, 0x4d46a\nLDR.W           R0, [R0,#0x154]                                        ; +0x15a, 0x4d46e\nCBZ             R2, loc_4D47A                                          ; +0x15e, 0x4d472\nBL              sub_50210                                              ; +0x160, 0x4d474\nB               loc_4D47E                                              ; +0x164, 0x4d478\nBL              sub_5006E                                              ; +0x166, 0x4d47a\nVPOP            {D5-D8}                                                ; +0x16a, 0x4d47e\nPOP             {R4,R6,R7,PC}                                          ; +0x16e, 0x4d482", "xrefs": ["sub_4DD08 @ 0x4df6c"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}