	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dw_dma_cyclic_free             ## -- Begin function dw_dma_cyclic_free
	.p2align	4, 0x90
_dw_dma_cyclic_free:                    ## @dw_dma_cyclic_free
	.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
	callq	_to_dw_dma_chan
	movq	%rax, %r12
	leaq	12(%rax), %rbx
	movl	12(%rax), %edi
	callq	_to_dw_dma
	movq	%rax, %r15
	movq	16(%r12), %r14
	movq	%rbx, %rdi
	callq	_chan2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_dbg
	testq	%r14, %r14
	je	LBB0_8
## %bb.1:
	leaq	8(%r12), %rdi
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	callq	_spin_lock_bh
	movq	_CH_EN@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_channel_clear_bit
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r13), %esi
	movq	%r15, %rdi
	callq	_dma_readl
	movl	(%r12), %edx
	testl	%eax, %edx
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%eax, %eax
	callq	_cpu_relax
	jmp	LBB0_3
LBB0_4:
	movq	_CLEAR@GOTPCREL(%rip), %rbx
	movl	8(%rbx), %esi
	movq	%r15, %rdi
	callq	_dma_writel
	movl	4(%rbx), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_dma_writel
	movl	(%rbx), %esi
	movl	(%r12), %edx
	movq	%r15, %rdi
	callq	_dma_writel
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock_bh
	cmpl	$0, (%r14)
	jle	LBB0_7
## %bb.5:
	movl	$8, %ebx
	xorl	%r15d, %r15d
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movl	-8(%rax,%rbx), %esi
	movq	(%rax,%rbx), %rdx
	movq	%r12, %rdi
	callq	_dwc_desc_put
	incq	%r15
	movslq	(%r14), %rax
	addq	$16, %rbx
	cmpq	%rax, %r15
	jl	LBB0_6
LBB0_7:
	movq	8(%r14), %rdi
	callq	_kfree
	movq	%r14, %rdi
	callq	_kfree
	movq	_DW_DMA_IS_CYCLIC@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$4, %r12
	movq	%r12, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_clear_bit                      ## TAILCALL
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"cyclic free\n"

	.comm	_CH_EN,4,2                      ## @CH_EN
	.comm	_CLEAR,12,2                     ## @CLEAR
	.comm	_DW_DMA_IS_CYCLIC,4,2           ## @DW_DMA_IS_CYCLIC
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_dw_dma_cyclic_free             ; -- Begin function dw_dma_cyclic_free
	.p2align	2
_dw_dma_cyclic_free:                    ; @dw_dma_cyclic_free
	.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
	bl	_to_dw_dma_chan
	mov	x19, x0
	mov	x22, x0
	ldr	w0, [x22, #12]!
	bl	_to_dw_dma
	mov	x21, x0
	ldr	x20, [x19, #16]
	mov	x0, x22
	bl	_chan2dev
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_dbg
	cbz	x20, LBB0_8
; %bb.1:
	add	x22, x19, #8
	mov	x0, x22
	bl	_spin_lock_bh
Lloh2:
	adrp	x23, _CH_EN@GOTPAGE
Lloh3:
	ldr	x23, [x23, _CH_EN@GOTPAGEOFF]
	ldr	w1, [x23]
	ldr	w2, [x19]
	mov	x0, x21
	bl	_channel_clear_bit
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23]
	mov	x0, x21
	bl	_dma_readl
	ldr	w2, [x19]
	tst	w2, w0
	b.eq	LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	bl	_cpu_relax
	b	LBB0_2
LBB0_4:
Lloh4:
	adrp	x23, _CLEAR@GOTPAGE
Lloh5:
	ldr	x23, [x23, _CLEAR@GOTPAGEOFF]
	ldr	w1, [x23, #8]
	mov	x0, x21
	bl	_dma_writel
	ldr	w1, [x23, #4]
	ldr	w2, [x19]
	mov	x0, x21
	bl	_dma_writel
	ldr	w1, [x23]
	ldr	w2, [x19]
	mov	x0, x21
	bl	_dma_writel
	mov	x0, x22
	bl	_spin_unlock_bh
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.5:
	mov	x21, #0
	mov	x22, #0
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #8]
	add	x8, x8, x21
	ldp	x1, x2, [x8]
	mov	x0, x19
	bl	_dwc_desc_put
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x21, x21, #16
	cmp	x22, x8
	b.lt	LBB0_6
LBB0_7:
	ldr	x0, [x20, #8]
	bl	_kfree
	mov	x0, x20
	bl	_kfree
Lloh6:
	adrp	x8, _DW_DMA_IS_CYCLIC@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DW_DMA_IS_CYCLIC@GOTPAGEOFF]
Lloh8:
	ldr	w0, [x8]
	add	x1, x19, #4
	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
	b	_clear_bit
LBB0_8:
	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 AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"cyclic free\n"

	.comm	_CH_EN,4,2                      ; @CH_EN
	.comm	_CLEAR,12,2                     ; @CLEAR
	.comm	_DW_DMA_IS_CYCLIC,4,2           ; @DW_DMA_IS_CYCLIC
.subsections_via_symbols
