	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function atc_tx_status
_atc_tx_status:                         ## @atc_tx_status
	.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	%rdx, %r12
	movl	%esi, %r14d
	movq	%rdi, %rbx
	callq	_to_at_dma_chan
	movq	%rax, %r13
	movq	%rbx, %rdi
	movl	%r14d, %esi
	movq	%r12, %rdx
	callq	_dma_cookie_status
	movl	%eax, %r15d
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_6
## %bb.1:
	testq	%r12, %r12
	je	LBB0_2
## %bb.3:
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_atc_get_bytes_left
	movq	%r13, %rdi
	movl	%eax, %r13d
	callq	_spin_unlock_irqrestore
	movl	%r13d, %edi
	shrl	$31, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_chan2dev
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edi
	xorl	%eax, %eax
	callq	_dev_vdbg
LBB0_2:
	movq	_DMA_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_6
LBB0_5:
	movq	%r12, %rdi
	movl	%r13d, %esi
	callq	_dma_set_residue
	movq	%rbx, %rdi
	callq	_chan2dev
	leaq	L_.str.1(%rip), %rsi
	movl	%eax, %edi
	movl	%r15d, %edx
	movl	%r14d, %ecx
	movl	%r13d, %r8d
	xorl	%eax, %eax
	callq	_dev_vdbg
LBB0_6:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_COMPLETE,4,2               ## @DMA_COMPLETE
	.comm	_DMA_ERROR,4,2                  ## @DMA_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"get residual bytes error\n"

L_.str.1:                               ## @.str.1
	.asciz	"tx_status %d: cookie = %d residue = %d\n"

	.no_dead_strip	_atc_tx_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function atc_tx_status
_atc_tx_status:                         ; @atc_tx_status
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x22, x2
	mov	x20, x1
	mov	x21, x0
	bl	_to_at_dma_chan
	mov	x23, x0
	mov	x0, x21
	mov	x1, x20
	mov	x2, x22
	bl	_dma_cookie_status
	mov	x19, x0
Lloh0:
	adrp	x8, _DMA_COMPLETE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_COMPLETE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_6
; %bb.1:
	cbz	x22, LBB0_4
; %bb.2:
	mov	x0, x23
	bl	_spin_lock_irqsave
	mov	x0, x21
	mov	x1, x20
	bl	_atc_get_bytes_left
	mov	x24, x0
	mov	x0, x23
	bl	_spin_unlock_irqrestore
	lsr	w0, w24, #31
	bl	_unlikely
	cbz	x0, LBB0_5
; %bb.3:
	mov	x0, x21
	bl	_chan2dev
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_vdbg
LBB0_4:
Lloh5:
	adrp	x8, _DMA_ERROR@GOTPAGE
Lloh6:
	ldr	x8, [x8, _DMA_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w19, [x8]
	b	LBB0_6
LBB0_5:
	mov	x0, x22
	mov	x1, x24
	bl	_dma_set_residue
	mov	x0, x21
	bl	_chan2dev
	stp	x20, x24, [sp, #8]
	str	x19, [sp]
Lloh8:
	adrp	x1, l_.str.1@PAGE
Lloh9:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_vdbg
LBB0_6:
	mov	x0, x19
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_COMPLETE,4,2               ; @DMA_COMPLETE
	.comm	_DMA_ERROR,4,2                  ; @DMA_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"get residual bytes error\n"

l_.str.1:                               ; @.str.1
	.asciz	"tx_status %d: cookie = %d residue = %d\n"

	.no_dead_strip	_atc_tx_status
.subsections_via_symbols
