	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coh901318_free_chan_resources
_coh901318_free_chan_resources:         ## @coh901318_free_chan_resources
	.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	%rdi, %r14
	callq	_to_coh901318_chan
	movq	%rax, %rbx
	movslq	(%rax), %r12
	leaq	4(%rax), %r15
	movq	%r15, %rdi
	callq	_spin_lock_irqsave
	movq	16(%rbx), %rax
	movq	_COH901318_CX_CFG@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	_COH901318_CX_CFG_SPACING@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	imulq	%r12, %rsi
	addq	%rcx, %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	16(%rbx), %rax
	movq	_COH901318_CX_CTRL@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	addq	(%rax), %rcx
	movq	_COH901318_CX_CTRL_SPACING@GOTPCREL(%rip), %rax
	movslq	(%rax), %rsi
	imulq	%r12, %rsi
	addq	%rcx, %rsi
	xorl	%edi, %edi
	callq	_writel
	movq	$0, 8(%rbx)
	movq	%r15, %rdi
	callq	_spin_unlock_irqrestore
	movq	%r14, %rdi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_coh901318_terminate_all        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_COH901318_CX_CFG,8,3           ## @COH901318_CX_CFG
	.comm	_COH901318_CX_CFG_SPACING,4,2   ## @COH901318_CX_CFG_SPACING
	.comm	_COH901318_CX_CTRL,8,3          ## @COH901318_CX_CTRL
	.comm	_COH901318_CX_CTRL_SPACING,4,2  ## @COH901318_CX_CTRL_SPACING
	.no_dead_strip	_coh901318_free_chan_resources
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coh901318_free_chan_resources
_coh901318_free_chan_resources:         ; @coh901318_free_chan_resources
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	bl	_to_coh901318_chan
	mov	x20, x0
	ldrsw	x22, [x0]
	add	x21, x0, #4
	mov	x0, x21
	bl	_spin_lock_irqsave
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _COH901318_CX_CFG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _COH901318_CX_CFG@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh3:
	adrp	x9, _COH901318_CX_CFG_SPACING@GOTPAGE
Lloh4:
	ldr	x9, [x9, _COH901318_CX_CFG_SPACING@GOTPAGEOFF]
Lloh5:
	ldrsw	x9, [x9]
	madd	x1, x9, x22, x8
	mov	w0, #0
	bl	_writel
	ldr	x8, [x20, #16]
	ldr	x8, [x8]
Lloh6:
	adrp	x9, _COH901318_CX_CTRL@GOTPAGE
Lloh7:
	ldr	x9, [x9, _COH901318_CX_CTRL@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	add	x8, x9, x8
Lloh9:
	adrp	x9, _COH901318_CX_CTRL_SPACING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _COH901318_CX_CTRL_SPACING@GOTPAGEOFF]
Lloh11:
	ldrsw	x9, [x9]
	madd	x1, x9, x22, x8
	mov	w0, #0
	bl	_writel
	str	xzr, [x20, #8]
	mov	x0, x21
	bl	_spin_unlock_irqrestore
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	b	_coh901318_terminate_all
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_COH901318_CX_CFG,8,3           ; @COH901318_CX_CFG
	.comm	_COH901318_CX_CFG_SPACING,4,2   ; @COH901318_CX_CFG_SPACING
	.comm	_COH901318_CX_CTRL,8,3          ; @COH901318_CX_CTRL
	.comm	_COH901318_CX_CTRL_SPACING,4,2  ; @COH901318_CX_CTRL_SPACING
	.no_dead_strip	_coh901318_free_chan_resources
.subsections_via_symbols
