	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atc_is_tx_complete
_atc_is_tx_complete:                    ## @atc_is_tx_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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movq	%rdx, %r14
	movl	%esi, %r12d
	movq	%rdi, %rbx
	callq	_to_at_dma_chan
	movq	%rax, %r13
	movq	%rbx, %rdi
	callq	_chan2dev
	xorl	%r8d, %r8d
	movl	$0, %ecx
	testq	%r14, %r14
	je	LBB0_2
## %bb.1:
	movl	(%r14), %ecx
LBB0_2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_4
## %bb.3:
	movl	(%r15), %r8d
LBB0_4:
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	movl	%r12d, %edx
	callq	_dev_vdbg
	movq	%r13, %rdi
	callq	_spin_lock_bh
	movl	4(%r13), %r15d
	movl	(%rbx), %r14d
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_dma_async_is_complete
	movl	%r12d, %ecx
	movl	%eax, %r12d
	movq	_DMA_SUCCESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	je	LBB0_6
## %bb.5:
	movl	%ecx, %r12d
	movq	%r13, %rdi
	callq	_atc_cleanup_descriptors
	movl	4(%r13), %r15d
	movl	(%rbx), %r14d
	movl	%r12d, %edi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_dma_async_is_complete
	movl	%eax, %r12d
LBB0_6:
	movq	%r13, %rdi
	callq	_spin_unlock_bh
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	%r15d, (%rax)
LBB0_8:
	movq	-48(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.9:
	movl	%r14d, (%rbx)
LBB0_10:
	movl	%r12d, %eax
	addq	$24, %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	"is_tx_complete: %d (d%d, u%d)\n"

	.comm	_DMA_SUCCESS,4,2                ## @DMA_SUCCESS
	.no_dead_strip	_atc_is_tx_complete
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atc_is_tx_complete
_atc_is_tx_complete:                    ; @atc_is_tx_complete
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x3
	mov	x20, x2
	mov	x22, x1
	mov	x23, x0
	bl	_to_at_dma_chan
	mov	x21, x0
	mov	x0, x23
	bl	_chan2dev
	cbz	x20, LBB0_3
; %bb.1:
	ldr	w3, [x20]
	cbz	x19, LBB0_4
LBB0_2:
	ldr	w4, [x19]
	b	LBB0_5
LBB0_3:
	mov	w3, #0
	cbnz	x19, LBB0_2
LBB0_4:
	mov	w4, #0
LBB0_5:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x22
	bl	_dev_vdbg
	mov	x0, x21
	bl	_spin_lock_bh
	ldr	w25, [x21, #4]
	ldr	w24, [x23]
	mov	x0, x22
	mov	x1, x25
	mov	x2, x24
	bl	_dma_async_is_complete
Lloh2:
	adrp	x8, _DMA_SUCCESS@GOTPAGE
Lloh3:
	ldr	x8, [x8, _DMA_SUCCESS@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_7
; %bb.6:
	mov	x0, x21
	bl	_atc_cleanup_descriptors
	ldr	w25, [x21, #4]
	ldr	w24, [x23]
	mov	x0, x22
	mov	x1, x25
	mov	x2, x24
	bl	_dma_async_is_complete
LBB0_7:
	mov	x26, x0
	mov	x0, x21
	bl	_spin_unlock_bh
	cbz	x20, LBB0_9
; %bb.8:
	str	w25, [x20]
LBB0_9:
	cbz	x19, LBB0_11
; %bb.10:
	str	w24, [x19]
LBB0_11:
	mov	x0, x26
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"is_tx_complete: %d (d%d, u%d)\n"

	.comm	_DMA_SUCCESS,4,2                ; @DMA_SUCCESS
	.no_dead_strip	_atc_is_tx_complete
.subsections_via_symbols
