	.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, %r13
	movq	%rdi, %r12
	leaq	24(%rsi), %r15
	callq	_chan2dev
	movl	48(%r13), %edx
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	callq	_dev_vdbg
	movl	48(%r13), %eax
	movl	%eax, 8(%r12)
	movq	32(%r13), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	40(%r13), %r14
	leaq	16(%r13), %rdi
	leaq	4(%r12), %rbx
	movq	%rbx, %rsi
	callq	_list_splice_init
	leaq	12(%r13), %rdi
	movq	%rbx, %rsi
	callq	_list_move
	cmpl	$0, (%r12)
	jne	LBB0_9
## %bb.1:
	movq	%r12, %rdi
	callq	_chan2parent
	movq	%rax, %r12
	movl	(%r15), %eax
	movq	_DMA_COMPL_SKIP_DEST_UNMAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_5
## %bb.2:
	movq	_DMA_COMPL_DEST_UNMAP_SINGLE@GOTPCREL(%rip), %rdi
	movl	(%r13), %edx
	movl	8(%r13), %esi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, (%rdi)
	je	LBB0_4
## %bb.3:
	movq	%r12, %rdi
	callq	_dma_unmap_single
	jmp	LBB0_5
LBB0_4:
	movq	%r12, %rdi
	callq	_dma_unmap_page
LBB0_5:
	movl	(%r15), %eax
	movq	_DMA_COMPL_SKIP_SRC_UNMAP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_9
## %bb.6:
	movq	_DMA_COMPL_SRC_UNMAP_SINGLE@GOTPCREL(%rip), %rdi
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, (%rdi)
	je	LBB0_8
## %bb.7:
	movq	%r12, %rdi
	callq	_dma_unmap_single
LBB0_9:
	testq	%r14, %r14
	je	LBB0_11
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	*%r14
LBB0_11:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_dma_run_dependencies           ## TAILCALL
LBB0_8:
	movq	%r12, %rdi
	callq	_dma_unmap_page
	testq	%r14, %r14
	jne	LBB0_10
	jmp	LBB0_11
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"descriptor %u complete\n"

	.comm	_DMA_COMPL_SKIP_DEST_UNMAP,4,2  ## @DMA_COMPL_SKIP_DEST_UNMAP
	.comm	_DMA_COMPL_DEST_UNMAP_SINGLE,4,2 ## @DMA_COMPL_DEST_UNMAP_SINGLE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.comm	_DMA_COMPL_SKIP_SRC_UNMAP,4,2   ## @DMA_COMPL_SKIP_SRC_UNMAP
	.comm	_DMA_COMPL_SRC_UNMAP_SINGLE,4,2 ## @DMA_COMPL_SRC_UNMAP_SINGLE
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.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	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	x21, x1
	mov	x22, x0
	add	x19, x1, #24
	bl	_chan2dev
	ldr	w2, [x21, #48]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
	ldr	w8, [x21, #48]
	str	w8, [x22, #8]
	ldp	x20, x24, [x21, #32]
	add	x0, x21, #16
	add	x23, x22, #4
	mov	x1, x23
	bl	_list_splice_init
	add	x0, x21, #12
	mov	x1, x23
	bl	_list_move
	ldr	w8, [x22]
	cbnz	w8, LBB0_8
; %bb.1:
	mov	x0, x22
	bl	_chan2parent
	mov	x22, x0
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _DMA_COMPL_SKIP_DEST_UNMAP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_COMPL_SKIP_DEST_UNMAP@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_5
; %bb.2:
Lloh5:
	adrp	x9, _DMA_COMPL_DEST_UNMAP_SINGLE@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DMA_COMPL_DEST_UNMAP_SINGLE@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	ldr	w1, [x21, #8]
	ldr	w2, [x21]
Lloh8:
	adrp	x10, _DMA_FROM_DEVICE@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh10:
	ldr	w3, [x10]
	mov	x0, x22
	tst	w9, w8
	b.eq	LBB0_4
; %bb.3:
	bl	_dma_unmap_single
	b	LBB0_5
LBB0_4:
	bl	_dma_unmap_page
LBB0_5:
	ldr	w8, [x19]
Lloh11:
	adrp	x9, _DMA_COMPL_SKIP_SRC_UNMAP@GOTPAGE
Lloh12:
	ldr	x9, [x9, _DMA_COMPL_SKIP_SRC_UNMAP@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_8
; %bb.6:
Lloh14:
	adrp	x9, _DMA_COMPL_SRC_UNMAP_SINGLE@GOTPAGE
Lloh15:
	ldr	x9, [x9, _DMA_COMPL_SRC_UNMAP_SINGLE@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	ldp	w2, w1, [x21]
Lloh17:
	adrp	x10, _DMA_TO_DEVICE@GOTPAGE
Lloh18:
	ldr	x10, [x10, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh19:
	ldr	w3, [x10]
	mov	x0, x22
	tst	w9, w8
	b.eq	LBB0_11
; %bb.7:
	bl	_dma_unmap_single
LBB0_8:
	cbz	x24, LBB0_10
LBB0_9:
	mov	x0, x20
	blr	x24
LBB0_10:
	mov	x0, x19
	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	_dma_run_dependencies
LBB0_11:
	bl	_dma_unmap_page
	cbnz	x24, LBB0_9
	b	LBB0_10
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"descriptor %u complete\n"

	.comm	_DMA_COMPL_SKIP_DEST_UNMAP,4,2  ; @DMA_COMPL_SKIP_DEST_UNMAP
	.comm	_DMA_COMPL_DEST_UNMAP_SINGLE,4,2 ; @DMA_COMPL_DEST_UNMAP_SINGLE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.comm	_DMA_COMPL_SKIP_SRC_UNMAP,4,2   ; @DMA_COMPL_SKIP_SRC_UNMAP
	.comm	_DMA_COMPL_SRC_UNMAP_SINGLE,4,2 ; @DMA_COMPL_SRC_UNMAP_SINGLE
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.no_dead_strip	_atc_chain_complete
.subsections_via_symbols
