	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cppi41_tear_down_chan
_cppi41_tear_down_chan:                 ## @cppi41_tear_down_chan
	.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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	56(%rdi), %r14
	movslq	(%r14), %r15
	leal	(,%r15,4), %r13d
	shlq	$2, %r15
	addq	24(%r14), %r15
	addl	4(%r14), %r13d
	cmpl	$0, (%rdi)
	je	LBB0_1
## %bb.4:
	cmpl	$0, 8(%r12)
	jne	LBB0_5
	jmp	LBB0_6
LBB0_1:
	movq	%r15, %rdi
	callq	_cppi41_compute_td_desc
	xorl	%eax, %eax
	callq	___iowmb
	movl	%r13d, -44(%rbp)                ## 4-byte Spill
	orl	$-5, %r13d
	movq	16(%r14), %rbx
	movl	12(%r14), %edi
	callq	_QMGR_QUEUE_D
	addq	%rax, %rbx
	movl	%r13d, %edi
	movq	%rbx, %rsi
	callq	_cppi_writel
	movq	_GCR_CHAN_ENABLE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	cmpq	$0, 48(%r12)
	jne	LBB0_3
## %bb.2:
	movq	_GCR_STARV_RETRY@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_GCR_DESC_TYPE_HOST@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	orl	8(%r14), %edi
LBB0_3:
	movl	-44(%rbp), %r13d                ## 4-byte Reload
	movq	_GCR_TEARDOWN@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	40(%r12), %rsi
	callq	_cppi_writel
	movabsq	$2147483648001, %rax            ## imm = 0x1F400000001
	movq	%rax, (%r12)
	cmpl	$0, 8(%r12)
	je	LBB0_6
LBB0_5:
	cmpl	$0, 12(%r12)
	jne	LBB0_16
LBB0_6:
	movl	8(%r14), %esi
	movq	%r14, %rdi
	callq	_cppi41_pop_desc
	testl	%eax, %eax
	jne	LBB0_10
## %bb.7:
	cmpq	$0, 48(%r12)
	je	LBB0_8
## %bb.9:
	movl	16(%r12), %esi
	movq	%r14, %rdi
	callq	_cppi41_pop_desc
LBB0_10:
	cmpl	20(%r12), %eax
	jne	LBB0_12
LBB0_11:
	movl	$1, 12(%r12)
	jmp	LBB0_16
LBB0_8:
	xorl	%eax, %eax
	cmpl	20(%r12), %eax
	je	LBB0_11
LBB0_12:
	cmpl	%r13d, %eax
	jne	LBB0_14
## %bb.13:
	xorl	%eax, %eax
	callq	___iormb
	movl	(%r15), %ebx
	movq	_DESC_TYPE@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	%ebx, %eax
	sarl	%cl, %eax
	movq	_DESC_TYPE_TEARD@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpl	(%rcx), %eax
	setne	%dil
	callq	_WARN_ON
	cmpq	$0, 48(%r12)
	sete	%al
	movq	_TD_DESC_IS_RX@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	andl	%ebx, %ecx
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	callq	_WARN_ON
	andl	$31, %ebx
	xorl	%edi, %edi
	cmpl	24(%r12), %ebx
	setne	%dil
	callq	_WARN_ON
	movl	$1, 8(%r12)
	jmp	LBB0_16
LBB0_14:
	testl	%eax, %eax
	je	LBB0_16
## %bb.15:
	movl	$1, %edi
	callq	_WARN_ON_ONCE
LBB0_16:
	movl	4(%r12), %eax
	decl	%eax
	movl	%eax, 4(%r12)
	cmpl	$0, 8(%r12)
	jne	LBB0_19
## %bb.17:
	testl	%eax, %eax
	je	LBB0_19
## %bb.18:
	movl	$1, %edi
	callq	_udelay
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_24
LBB0_19:
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
	cmpl	$0, 12(%r12)
	jne	LBB0_23
## %bb.20:
	movl	28(%r12), %esi
	movq	%r14, %rdi
	callq	_cppi41_pop_desc
	testl	%eax, %eax
	jne	LBB0_22
## %bb.21:
	movl	16(%r12), %esi
	movq	%r14, %rdi
	callq	_cppi41_pop_desc
LBB0_22:
	xorl	%edi, %edi
	testl	%eax, %eax
	sete	%dil
	callq	_WARN_ON
LBB0_23:
	movl	$0, (%r12)
	movq	$0, 8(%r12)
	movq	40(%r12), %rsi
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	callq	_cppi_writel
	movq	_DMA_TRANS_ABORTED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -48(%rbp)
	addq	$32, %r12
	movq	%r12, %rdi
	callq	_dma_cookie_complete
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_dmaengine_desc_get_callback_invoke
LBB0_24:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GCR_CHAN_ENABLE,4,2            ## @GCR_CHAN_ENABLE
	.comm	_GCR_STARV_RETRY,4,2            ## @GCR_STARV_RETRY
	.comm	_GCR_DESC_TYPE_HOST,4,2         ## @GCR_DESC_TYPE_HOST
	.comm	_GCR_TEARDOWN,4,2               ## @GCR_TEARDOWN
	.comm	_DESC_TYPE,4,2                  ## @DESC_TYPE
	.comm	_DESC_TYPE_TEARD,4,2            ## @DESC_TYPE_TEARD
	.comm	_TD_DESC_IS_RX,4,2              ## @TD_DESC_IS_RX
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_DMA_TRANS_ABORTED,4,2          ## @DMA_TRANS_ABORTED
	.no_dead_strip	_cppi41_tear_down_chan
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function cppi41_tear_down_chan
lCPI0_0:
	.long	1                               ; 0x1
	.long	500                             ; 0x1f4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_cppi41_tear_down_chan:                 ; @cppi41_tear_down_chan
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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	x19, x0
	ldr	x20, [x0, #56]
	ldr	x8, [x20, #24]
	ldp	w9, w10, [x20]
                                        ; kill: def $w9 killed $w9 def $x9
	sxtw	x9, w9
	add	x21, x8, x9, lsl #2
	add	w23, w10, w9, lsl #2
	ldr	w8, [x0]
	cbz	w8, LBB0_2
; %bb.1:
	ldr	w8, [x19, #8]
	cbnz	w8, LBB0_5
	b	LBB0_6
LBB0_2:
	mov	x0, x21
	bl	_cppi41_compute_td_desc
	bl	___iowmb
	orr	w22, w23, #0xfffffffb
	ldr	x24, [x20, #16]
	ldr	w0, [x20, #12]
	bl	_QMGR_QUEUE_D
	add	x1, x0, x24
	mov	x0, x22
	bl	_cppi_writel
Lloh0:
	adrp	x8, _GCR_CHAN_ENABLE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GCR_CHAN_ENABLE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x9, [x19, #48]
	cbnz	x9, LBB0_4
; %bb.3:
Lloh3:
	adrp	x9, _GCR_STARV_RETRY@GOTPAGE
Lloh4:
	ldr	x9, [x9, _GCR_STARV_RETRY@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh6:
	adrp	x9, _GCR_DESC_TYPE_HOST@GOTPAGE
Lloh7:
	ldr	x9, [x9, _GCR_DESC_TYPE_HOST@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	orr	w8, w8, w9
	ldr	w9, [x20, #8]
	orr	w8, w8, w9
LBB0_4:
Lloh9:
	adrp	x9, _GCR_TEARDOWN@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GCR_TEARDOWN@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w0, w9, w8
	ldr	x1, [x19, #40]
	bl	_cppi_writel
Lloh12:
	adrp	x8, lCPI0_0@PAGE
Lloh13:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x19]
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_6
LBB0_5:
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_16
LBB0_6:
	ldr	w1, [x20, #8]
	mov	x0, x20
	bl	_cppi41_pop_desc
	cbnz	w0, LBB0_10
; %bb.7:
	ldr	x8, [x19, #48]
	cbz	x8, LBB0_9
; %bb.8:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_cppi41_pop_desc
	b	LBB0_10
LBB0_9:
	mov	w0, #0
LBB0_10:
	ldr	w8, [x19, #20]
	cmp	w0, w8
	b.ne	LBB0_12
; %bb.11:
	mov	w8, #1
	str	w8, [x19, #12]
	b	LBB0_16
LBB0_12:
	cmp	w0, w23
	b.ne	LBB0_14
; %bb.13:
	bl	___iormb
	ldr	w21, [x21]
Lloh14:
	adrp	x8, _DESC_TYPE@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DESC_TYPE@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	asr	w8, w21, w8
Lloh17:
	adrp	x9, _DESC_TYPE_TEARD@GOTPAGE
Lloh18:
	ldr	x9, [x9, _DESC_TYPE_TEARD@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	cmp	w8, w9
	cset	w0, ne
	bl	_WARN_ON
	ldr	x8, [x19, #48]
Lloh20:
	adrp	x9, _TD_DESC_IS_RX@GOTPAGE
Lloh21:
	ldr	x9, [x9, _TD_DESC_IS_RX@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	tst	w9, w21
	ccmp	x8, #0, #0, eq
	cset	w0, eq
	bl	_WARN_ON
	and	w8, w21, #0x1f
	ldr	w9, [x19, #24]
	cmp	w8, w9
	cset	w0, ne
	bl	_WARN_ON
	mov	w8, #1
	str	w8, [x19, #8]
	b	LBB0_16
LBB0_14:
	cbz	w0, LBB0_16
; %bb.15:
	mov	w0, #1
	bl	_WARN_ON_ONCE
LBB0_16:
	ldp	w8, w9, [x19, #4]
	sub	w8, w8, #1
	str	w8, [x19, #4]
	cbnz	w9, LBB0_19
; %bb.17:
	cbz	w8, LBB0_19
; %bb.18:
	mov	w0, #1
	bl	_udelay
Lloh23:
	adrp	x8, _EAGAIN@GOTPAGE
Lloh24:
	ldr	x8, [x8, _EAGAIN@GOTPAGEOFF]
Lloh25:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_24
LBB0_19:
	cmp	w8, #0
	cset	w0, eq
	bl	_WARN_ON
	ldr	w8, [x19, #12]
	cbnz	w8, LBB0_23
; %bb.20:
	ldr	w1, [x19, #28]
	mov	x0, x20
	bl	_cppi41_pop_desc
	cbnz	w0, LBB0_22
; %bb.21:
	ldr	w1, [x19, #16]
	mov	x0, x20
	bl	_cppi41_pop_desc
LBB0_22:
	cmp	w0, #0
	cset	w0, eq
	bl	_WARN_ON
LBB0_23:
	str	wzr, [x19]
	str	xzr, [x19, #8]
	ldr	x1, [x19, #40]
	mov	w0, #0
	bl	_cppi_writel
Lloh26:
	adrp	x8, _DMA_TRANS_ABORTED@GOTPAGE
Lloh27:
	ldr	x8, [x8, _DMA_TRANS_ABORTED@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	str	w8, [sp, #8]
	add	x19, x19, #32
	mov	x0, x19
	bl	_dma_cookie_complete
	add	x1, sp, #8
	mov	x0, x19
	bl	_dmaengine_desc_get_callback_invoke
	mov	w0, #0
LBB0_24:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdr	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_GCR_CHAN_ENABLE,4,2            ; @GCR_CHAN_ENABLE
	.comm	_GCR_STARV_RETRY,4,2            ; @GCR_STARV_RETRY
	.comm	_GCR_DESC_TYPE_HOST,4,2         ; @GCR_DESC_TYPE_HOST
	.comm	_GCR_TEARDOWN,4,2               ; @GCR_TEARDOWN
	.comm	_DESC_TYPE,4,2                  ; @DESC_TYPE
	.comm	_DESC_TYPE_TEARD,4,2            ; @DESC_TYPE_TEARD
	.comm	_TD_DESC_IS_RX,4,2              ; @TD_DESC_IS_RX
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_DMA_TRANS_ABORTED,4,2          ; @DMA_TRANS_ABORTED
	.no_dead_strip	_cppi41_tear_down_chan
.subsections_via_symbols
