{"type": "func", "start": 313536, "end": 313616, "name": "sub_4C8C0", "pseudocode": "// \n// sub_4C8C0 from 0x4c8c0 to 0x4c910 (80 bytes)\n// \n// 3 xrefs:\n// > sub_79454 @ 0x79a9a\n// > sub_BE9F4 @ 0xbea3e\n// > sub_BEEE8 @ 0xbef32\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_4C8C0(int *a1, int a2, int a3, int a4)\n{\n  int v8; // r0\n\n  if ( a4 < 0 )\n    return 31;\n  if ( a4 )\n  {\n    v8 = sub_BD580(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 4 * a4, \"../../src/fmod_channelpool.cpp\", 56, 0);\n    a1[4] = v8;\n    if ( !v8 )\n      return 38;\n  }\n  a1[2] = a2;\n  a1[3] = a3;\n  *a1 = a4;\n  return 0;\n}", "assembly": "; \n; sub_4C8C0 from 0x4c8c0 to 0x4c910 (80 bytes)\n; \n; 3 xrefs:\n; > sub_79454 @ 0x79a9a\n; > sub_BE9F4 @ 0xbea3e\n; > sub_BEEE8 @ 0xbef32\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-R7,LR}                                             ; +0x0, 0x4c8c0\nADD             R7, SP, #0xC                                           ; +0x2, 0x4c8c2\nPUSH.W          {R8}                                                   ; +0x4, 0x4c8c4\nSUB             SP, SP, #8                                             ; +0x8, 0x4c8c8\nCMP             R3, #0                                                 ; +0xa, 0x4c8ca\nBMI             loc_4C902                                              ; +0xc, 0x4c8cc\nMOV             R4, R3                                                 ; +0xe, 0x4c8ce\nMOV             R8, R2                                                 ; +0x10, 0x4c8d0\nMOV             R5, R1                                                 ; +0x12, 0x4c8d2\nMOV             R6, R0                                                 ; +0x14, 0x4c8d4\nBEQ             loc_4C8F8                                              ; +0x16, 0x4c8d6\nLDR             R0, =(off_E6144 - 0x4C8E2)                             ; +0x18, 0x4c8d8\nMOVS            R1, #0                                                 ; +0x1a, 0x4c8da\nMOVS            R3, #0x38 ; '8'                                        ; +0x1c, 0x4c8dc\nADD             R0, PC; off_E6144                                      ; +0x1e, 0x4c8de\nLDR             R0, [R0]; off_E8000                                    ; +0x20, 0x4c8e0\nLDR             R0, [R0]; unk_F2488                                    ; +0x22, 0x4c8e2\nLDR.W           R0, [R0,#(dword_F25D4 - 0xF2488)]                      ; +0x24, 0x4c8e4\nSTR             R1, [SP,#8+var_8]                                      ; +0x28, 0x4c8e8\nLSLS            R1, R4, #2                                             ; +0x2a, 0x4c8ea\nLDR             R2, =(aSrcFmodChannel_0 - 0x4C8F2); \"../../src/fmod_channelpool.cpp\" ... ; +0x2c, 0x4c8ec\nADD             R2, PC; \"../../src/fmod_channelpool.cpp\"               ; +0x2e, 0x4c8ee\nBL              sub_BD580                                              ; +0x30, 0x4c8f0\nSTR             R0, [R6,#0x10]                                         ; +0x34, 0x4c8f4\nCBZ             R0, loc_4C906                                          ; +0x36, 0x4c8f6\nMOVS            R0, #0                                                 ; +0x38, 0x4c8f8\nSTRD.W          R5, R8, [R6,#8]                                        ; +0x3a, 0x4c8fa\nSTR             R4, [R6]                                               ; +0x3e, 0x4c8fe\nB               loc_4C908                                              ; +0x40, 0x4c900\nMOVS            R0, #0x1F                                              ; +0x42, 0x4c902\nB               loc_4C908                                              ; +0x44, 0x4c904\nMOVS            R0, #0x26 ; '&'                                        ; +0x46, 0x4c906\nADD             SP, SP, #8                                             ; +0x48, 0x4c908\nPOP.W           {R8}                                                   ; +0x4a, 0x4c90a\nPOP             {R4-R7,PC}                                             ; +0x4e, 0x4c90e", "xrefs": ["sub_79454 @ 0x79a9a", "sub_BE9F4 @ 0xbea3e", "sub_BEEE8 @ 0xbef32"], "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"}