	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_getChannel                   ## -- Begin function S_getChannel
	.p2align	4, 0x90
_S_getChannel:                          ## @S_getChannel
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	_numChannels@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	testl	%ecx, %ecx
	jle	LBB0_1
## %bb.2:
	movq	_channels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	addq	$8, %rax
	xorl	%ebx, %ebx
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_3 Depth=1
	incq	%rbx
	addq	$16, %rax
	cmpq	%rbx, %rcx
	je	LBB0_10
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	testq	%r15, %r15
	je	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	cmpq	%r15, -8(%rax)
	jne	LBB0_9
## %bb.6:
	movl	%ebx, %edi
	callq	_S_StopChannel
	movl	(%r12), %ecx
LBB0_7:
	cmpl	%ecx, %ebx
	je	LBB0_10
	jmp	LBB0_8
LBB0_1:
	xorl	%ebx, %ebx
	cmpl	%ecx, %ebx
	jne	LBB0_8
LBB0_10:
	testl	%ecx, %ecx
	jle	LBB0_11
## %bb.14:
	movq	_channels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r14), %rdx
	movl	%ecx, %esi
	addq	$8, %rax
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_15:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rax), %rdi
	cmpq	%rdx, (%rdi)
	jge	LBB0_12
## %bb.16:                              ##   in Loop: Header=BB0_15 Depth=1
	incq	%rbx
	addq	$16, %rax
	cmpq	%rbx, %rsi
	jne	LBB0_15
## %bb.17:
	movl	$-1, %eax
	jmp	LBB0_18
LBB0_11:
	xorl	%ebx, %ebx
LBB0_12:
	movl	$-1, %eax
	cmpl	%ecx, %ebx
	je	LBB0_18
## %bb.13:
	movl	%ebx, %edi
	callq	_S_StopChannel
LBB0_8:
	movq	_channels@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	%ebx, %ecx
	shlq	$4, %rcx
	movq	%r14, 8(%rax,%rcx)
	movq	%r15, (%rax,%rcx)
	movl	%ebx, %eax
LBB0_18:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_numChannels,4,2                ## @numChannels
	.comm	_channels,8,3                   ## @channels
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_S_getChannel                   ; -- Begin function S_getChannel
	.p2align	2
_S_getChannel:                          ; @S_getChannel
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x23, _numChannels@GOTPAGE
Lloh1:
	ldr	x23, [x23, _numChannels@GOTPAGEOFF]
	ldr	w8, [x23]
Lloh2:
	adrp	x22, _channels@GOTPAGE
Lloh3:
	ldr	x22, [x22, _channels@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.1:
	mov	x21, #0
	ldr	x9, [x22]
	add	x9, x9, #8
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	add	x9, x9, #16
	cmp	x8, x21
	b.eq	LBB0_9
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x9]
	cbz	x10, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cbz	x19, LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldur	x10, [x9, #-8]
	cmp	x10, x19
	b.ne	LBB0_2
; %bb.6:
	mov	x0, x21
	bl	_S_StopChannel
	ldr	w8, [x23]
LBB0_7:
	cmp	w21, w8
	b.ne	LBB0_17
	b	LBB0_9
LBB0_8:
	mov	w21, #0
	cmp	w21, w8
	b.ne	LBB0_17
LBB0_9:
	cmp	w8, #1
	b.lt	LBB0_13
; %bb.10:
	mov	x21, #0
	ldr	x11, [x22]
	ldr	x9, [x20]
	mov	w10, w8
	add	x11, x11, #8
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x11]
	ldr	x12, [x12]
	cmp	x12, x9
	b.ge	LBB0_15
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x21, x21, #1
	add	x11, x11, #16
	cmp	x10, x21
	b.ne	LBB0_11
	b	LBB0_14
LBB0_13:
	mov	w21, #0
	cmp	w21, w8
	b.ne	LBB0_16
LBB0_14:
	mov	w21, #-1
	b	LBB0_18
LBB0_15:
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	cmp	w21, w8
	b.eq	LBB0_14
LBB0_16:
	mov	x0, x21
	bl	_S_StopChannel
LBB0_17:
	ldr	x8, [x22]
	add	x8, x8, w21, uxtw #4
	stp	x19, x20, [x8]
LBB0_18:
	mov	x0, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_numChannels,4,2                ; @numChannels
	.comm	_channels,8,3                   ; @channels
.subsections_via_symbols
