{"type": "func", "start": 789272, "end": 789390, "name": "sub_C0B18", "pseudocode": "// \n// sub_C0B18 from 0xc0b18 to 0xc0b8e (118 bytes)\n// \n// 2 xrefs:\n// > sub_C1358 @ 0xc13ea\n// > sub_C17FC @ 0xc1878\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_C0B18(int a1, int a2, _DWORD *a3, int *a4, _DWORD *a5, _DWORD *a6, _DWORD *a7)\n{\n  int Format; // r0\n  int v10; // r0\n\n  if ( a3 )\n    *a3 = so_AAudioStream_getSampleRate(a2);\n  if ( a4 )\n  {\n    Format = so_AAudioStream_getFormat(a2);\n    if ( Format == 2 )\n    {\n      v10 = 5;\n    }\n    else\n    {\n      if ( Format != 1 )\n        goto LABEL_9;\n      v10 = 2;\n    }\n    *a4 = v10;\n  }\nLABEL_9:\n  if ( a5 )\n    *a5 = so_AAudioStream_getChannelCount(a2);\n  if ( a6 )\n    *a6 = so_AAudioStream_getFramesPerBurst(a2);\n  if ( a7 )\n    *a7 = so_AAudioStream_getBufferSizeInFrames(a2);\n  return 0;\n}", "assembly": "; \n; sub_C0B18 from 0xc0b18 to 0xc0b8e (118 bytes)\n; \n; 2 xrefs:\n; > sub_C1358 @ 0xc13ea\n; > sub_C17FC @ 0xc1878\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, 0xc0b18\nADD             R7, SP, #0xC                                           ; +0x2, 0xc0b1a\nPUSH.W          {R8,R9,R11}                                            ; +0x4, 0xc0b1c\nLDR             R5, =(dword_126258 - 0xC0B2A)                          ; +0x8, 0xc0b20\nMOV             R8, R3                                                 ; +0xa, 0xc0b22\nMOV             R4, R1                                                 ; +0xc, 0xc0b24\nADD             R5, PC; dword_126258                                   ; +0xe, 0xc0b26\nCBZ             R2, loc_C0B34                                          ; +0x10, 0xc0b28\nLDR             R1, [R5,#(so_AAudioStream_getSampleRate - 0x126258)]   ; +0x12, 0xc0b2a\nMOV             R0, R4                                                 ; +0x14, 0xc0b2c\nMOV             R6, R2                                                 ; +0x16, 0xc0b2e\nBLX             R1                                                     ; +0x18, 0xc0b30\nSTR             R0, [R6]                                               ; +0x1a, 0xc0b32\nLDR.W           R9, [R7,#-0x18+arg_0]                                  ; +0x1c, 0xc0b34\nCMP.W           R8, #0                                                 ; +0x20, 0xc0b38\nBEQ             loc_C0B56                                              ; +0x24, 0xc0b3c\nLDR             R1, [R5,#(so_AAudioStream_getFormat - 0x126258)]       ; +0x26, 0xc0b3e\nMOV             R0, R4                                                 ; +0x28, 0xc0b40\nBLX             R1                                                     ; +0x2a, 0xc0b42\nCMP             R0, #2                                                 ; +0x2c, 0xc0b44\nBEQ             loc_C0B50                                              ; +0x2e, 0xc0b46\nCMP             R0, #1                                                 ; +0x30, 0xc0b48\nBNE             loc_C0B56                                              ; +0x32, 0xc0b4a\nMOVS            R0, #2                                                 ; +0x34, 0xc0b4c\nB               loc_C0B52                                              ; +0x36, 0xc0b4e\nMOVS            R0, #5                                                 ; +0x38, 0xc0b50\nSTR.W           R0, [R8]                                               ; +0x3a, 0xc0b52\nLDR.W           R8, [R7,#-0x18+arg_4]                                  ; +0x3e, 0xc0b56\nCMP.W           R9, #0                                                 ; +0x42, 0xc0b5a\nBEQ             loc_C0B6A                                              ; +0x46, 0xc0b5e\nLDR             R1, [R5,#(so_AAudioStream_getChannelCount - 0x126258)] ; +0x48, 0xc0b60\nMOV             R0, R4                                                 ; +0x4a, 0xc0b62\nBLX             R1                                                     ; +0x4c, 0xc0b64\nSTR.W           R0, [R9]                                               ; +0x4e, 0xc0b66\nLDR             R6, [R7,#-0x18+arg_8]                                  ; +0x52, 0xc0b6a\nCMP.W           R8, #0                                                 ; +0x54, 0xc0b6c\nBEQ             loc_C0B7C                                              ; +0x58, 0xc0b70\nLDR             R1, [R5,#(so_AAudioStream_getFramesPerBurst - 0x126258)] ; +0x5a, 0xc0b72\nMOV             R0, R4                                                 ; +0x5c, 0xc0b74\nBLX             R1                                                     ; +0x5e, 0xc0b76\nSTR.W           R0, [R8]                                               ; +0x60, 0xc0b78\nCBZ             R6, loc_C0B86                                          ; +0x64, 0xc0b7c\nLDR             R1, [R5,#(so_AAudioStream_getBufferSizeInFrames - 0x126258)] ; +0x66, 0xc0b7e\nMOV             R0, R4                                                 ; +0x68, 0xc0b80\nBLX             R1                                                     ; +0x6a, 0xc0b82\nSTR             R0, [R6]                                               ; +0x6c, 0xc0b84\nMOVS            R0, #0                                                 ; +0x6e, 0xc0b86\nPOP.W           {R8,R9,R11}                                            ; +0x70, 0xc0b88\nPOP             {R4-R7,PC}                                             ; +0x74, 0xc0b8c", "xrefs": ["sub_C1358 @ 0xc13ea", "sub_C17FC @ 0xc1878"], "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"}