	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atc_chain_complete
_atc_chain_complete:                    ## @atc_chain_complete
	.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	%rsi, %rbx
	movq	%rdi, %r15
	leaq	20(%rsi), %r14
	leaq	4(%rdi), %r13
	movl	4(%rdi), %edi
	callq	_to_at_dma
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_chan2dev
	movl	20(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_vdbg
	movq	%r15, %rdi
	callq	_atc_chan_is_cyclic
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	cmpl	$0, (%rbx)
	je	LBB0_4
LBB0_3:
	movl	(%r12), %edi
	movl	12(%rbx), %edx
	movl	16(%rbx), %esi
	callq	_dma_pool_free
	movl	$0, (%rbx)
LBB0_4:
	leaq	8(%rbx), %rdi
	movq	%r15, %rsi
	callq	_list_splice_init
	addq	$4, %rbx
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_list_move
	movq	%r14, %rdi
	callq	_dma_descriptor_unmap
	movq	%r15, %rdi
	callq	_atc_chan_is_cyclic
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_dmaengine_desc_get_callback_invoke
LBB0_6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_run_dependencies           ## TAILCALL
LBB0_1:
	movq	%r14, %rdi
	callq	_dma_cookie_complete
	cmpl	$0, (%rbx)
	jne	LBB0_3
	jmp	LBB0_4
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"descriptor %u complete\n"

	.no_dead_strip	_atc_chain_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atc_chain_complete
_atc_chain_complete:                    ; @atc_chain_complete
	.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	x21, x1
	mov	x20, x0
	mov	x19, x0
	ldr	w0, [x19, #4]!
	bl	_to_at_dma
	mov	x22, x0
	mov	x0, x19
	bl	_chan2dev
	mov	x19, x21
	ldr	w2, [x19, #20]!
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	mov	x0, x20
	bl	_atc_chan_is_cyclic
	cbz	w0, LBB0_6
; %bb.1:
	ldr	w8, [x21]
	cbz	w8, LBB0_3
LBB0_2:
	ldr	w0, [x22]
	ldp	w2, w1, [x21, #12]
	bl	_dma_pool_free
	str	wzr, [x21]
LBB0_3:
	add	x0, x21, #8
	mov	x1, x20
	bl	_list_splice_init
	add	x0, x21, #4
	mov	x1, x20
	bl	_list_move
	mov	x0, x19
	bl	_dma_descriptor_unmap
	mov	x0, x20
	bl	_atc_chan_is_cyclic
	cbnz	w0, LBB0_5
; %bb.4:
	mov	x0, x19
	mov	x1, #0
	bl	_dmaengine_desc_get_callback_invoke
LBB0_5:
	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	_dma_run_dependencies
LBB0_6:
	mov	x0, x19
	bl	_dma_cookie_complete
	ldr	w8, [x21]
	cbnz	w8, LBB0_2
	b	LBB0_3
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"descriptor %u complete\n"

	.no_dead_strip	_atc_chain_complete
.subsections_via_symbols
