{"type": "func", "start": 524832, "end": 524948, "name": "sub_80220", "pseudocode": "// \n// sub_80220 from 0x80220 to 0x80294 (116 bytes)\n// \n// 1 xrefs:\n// > sub_80E24 @ 0x81052\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_80220(int a1, int a2, _DWORD *a3)\n{\n  int v3; // r0\n  int v4; // r1\n  float *v5; // r4\n  float *v6; // r3\n  int v7; // r5\n  float v8; // s0\n  float v9; // s6\n  float v10; // s2\n  float v11; // s4\n\n  if ( a3[4] == 2 )\n  {\n    if ( a3[5] )\n    {\n      v3 = 1;\n      goto LABEL_5;\n    }\n    return 13;\n  }\n  v3 = a3[16] - 1;\n  if ( v3 < 0 )\n    return 13;\nLABEL_5:\n  v4 = a2 + 72;\n  while ( v3 )\n  {\n    v5 = (float *)(v4 - 4);\n    v6 = (float *)&FMOD::CodecMPEG::gAaCs;\n    v4 += 40;\n    v7 = 7;\n    while ( v7 >= 0 )\n    {\n      v8 = *v5;\n      --v7;\n      v9 = *(float *)(v4 - 40);\n      *v5 = (float)(*v6 * *v5) - (float)(*(v6 - 8) * v9);\n      --v5;\n      v10 = *v6;\n      v11 = *(v6 - 8);\n      ++v6;\n      *(float *)(v4 - 40) = (float)(v10 * v9) + (float)(v11 * v8);\n      v4 += 4;\n    }\n    --v3;\n  }\n  return 0;\n}", "assembly": "; \n; sub_80220 from 0x80220 to 0x80294 (116 bytes)\n; \n; 1 xrefs:\n; > sub_80E24 @ 0x81052\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,R5,R7,LR}                                          ; +0x0, 0x80220\nADD             R7, SP, #8                                             ; +0x2, 0x80222\nLDR             R0, [R2,#0x10]                                         ; +0x4, 0x80224\nCMP             R0, #2                                                 ; +0x6, 0x80226\nBNE             loc_80232                                              ; +0x8, 0x80228\nLDR             R0, [R2,#0x14]                                         ; +0xa, 0x8022a\nCBZ             R0, loc_80290                                          ; +0xc, 0x8022c\nMOVS            R0, #1                                                 ; +0xe, 0x8022e\nB               loc_80238                                              ; +0x10, 0x80230\nLDR             R0, [R2,#0x40]                                         ; +0x12, 0x80232\nSUBS            R0, #1                                                 ; +0x14, 0x80234\nBMI             loc_80290                                              ; +0x16, 0x80236\nLDR             R2, =(_ZN4FMOD9CodecMPEG7gCos6_1E - 0x80240); FMOD::CodecMPEG::gCos6_1 ... ; +0x18, 0x80238\nADDS            R1, #0x48 ; 'H'                                        ; +0x1a, 0x8023a\nADD             R2, PC; FMOD::CodecMPEG::gCos6_1                       ; +0x1c, 0x8023c\nCBZ             R0, loc_8028C                                          ; +0x1e, 0x8023e\nSUBS            R4, R1, #4                                             ; +0x20, 0x80240\nADD.W           R3, R2, #(_ZN4FMOD9CodecMPEG5gAaCsE - 0x109428); FMOD::CodecMPEG::gAaCs ; +0x22, 0x80242\nADDS            R1, #0x28 ; '('                                        ; +0x26, 0x80246\nMOVS            R5, #7                                                 ; +0x28, 0x80248\nCMP             R5, #0                                                 ; +0x2a, 0x8024a\nBMI             loc_80288                                              ; +0x2c, 0x8024c\nVLDR            S0, [R4]                                               ; +0x2e, 0x8024e\nSUBS            R5, #1                                                 ; +0x32, 0x80252\nVLDR            S2, [R3]                                               ; +0x34, 0x80254\nVLDR            S4, [R3,#-0x20]                                        ; +0x38, 0x80258\nVMUL.F32        S2, S2, S0                                             ; +0x3c, 0x8025c\nVLDR            S6, [R1,#-0x28]                                        ; +0x40, 0x80260\nVMLS.F32        S2, S4, S6                                             ; +0x44, 0x80264\nVSTR            S2, [R4]                                               ; +0x48, 0x80268\nSUBS            R4, #4                                                 ; +0x4c, 0x8026c\nVLDR            S2, [R3]                                               ; +0x4e, 0x8026e\nVLDR            S4, [R3,#-0x20]                                        ; +0x52, 0x80272\nADDS            R3, #4                                                 ; +0x56, 0x80276\nVMUL.F32        S2, S2, S6                                             ; +0x58, 0x80278\nVMLA.F32        S2, S4, S0                                             ; +0x5c, 0x8027c\nVSTR            S2, [R1,#-0x28]                                        ; +0x60, 0x80280\nADDS            R1, #4                                                 ; +0x64, 0x80284\nB               loc_8024A                                              ; +0x66, 0x80286\nSUBS            R0, #1                                                 ; +0x68, 0x80288\nB               loc_8023E                                              ; +0x6a, 0x8028a\nMOVS            R0, #0                                                 ; +0x6c, 0x8028c\nPOP             {R4,R5,R7,PC}                                          ; +0x6e, 0x8028e\nMOVS            R0, #0xD                                               ; +0x70, 0x80290\nPOP             {R4,R5,R7,PC}                                          ; +0x72, 0x80292", "xrefs": ["sub_80E24 @ 0x81052"], "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"}