	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdma_tx_status
_sdma_tx_status:                        ## @sdma_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, %r15
	movq	%rsi, %rbx
	movq	%rdi, %r13
	callq	_to_sdma_chan
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_dma_cookie_status
	testq	%r15, %r15
	je	LBB0_12
## %bb.1:
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	je	LBB0_12
## %bb.2:
	movq	%r14, %r12
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_spin_lock_irqsave
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_vchan_find_desc
	testq	%rax, %rax
	je	LBB0_5
## %bb.3:
	movq	%rax, %rdi
	callq	_to_sdma_desc
	movq	_IMX_DMA_SG_LOOP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%r14)
	je	LBB0_8
## %bb.4:
	movslq	(%rax), %rcx
	movslq	4(%rax), %rdx
	subq	%rdx, %rcx
	movslq	8(%rax), %rbx
	imulq	%rcx, %rbx
	jmp	LBB0_9
LBB0_5:
	movq	16(%r14), %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.6:
	cmpq	%rbx, 16(%rax)
	jne	LBB0_14
## %bb.7:
	movq	8(%rax), %rbx
	jmp	LBB0_10
LBB0_14:
	xorl	%ebx, %ebx
	jmp	LBB0_11
LBB0_8:
	movq	24(%rax), %rbx
LBB0_9:
	addq	$16, %rax
LBB0_10:
	subq	(%rax), %rbx
LBB0_11:
	movq	%r12, %rdi
	callq	_spin_unlock_irqrestore
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	%r15, %rdi
	movq	%rbx, %rcx
	callq	_dma_set_tx_state
	movl	4(%r14), %eax
LBB0_12:
	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	_IMX_DMA_SG_LOOP,4,2            ## @IMX_DMA_SG_LOOP
	.no_dead_strip	_sdma_tx_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdma_tx_status
_sdma_tx_status:                        ; @sdma_tx_status
	.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	x19, x2
	mov	x23, x1
	mov	x21, x0
	bl	_to_sdma_chan
	mov	x20, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x19
	bl	_dma_cookie_status
	cbz	x19, LBB0_13
; %bb.1:
Lloh0:
	adrp	x8, _DMA_COMPLETE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_COMPLETE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w0, w8
	b.eq	LBB0_13
; %bb.2:
	add	x22, x20, #8
	mov	x0, x22
	bl	_spin_lock_irqsave
	mov	x0, x22
	mov	x1, x23
	bl	_vchan_find_desc
	cbz	x0, LBB0_5
; %bb.3:
	bl	_to_sdma_desc
	ldr	w8, [x20]
Lloh3:
	adrp	x9, _IMX_DMA_SG_LOOP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _IMX_DMA_SG_LOOP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.4:
	ldpsw	x8, x9, [x0]
	sub	x8, x8, x9
	ldrsw	x9, [x0, #8]
	mul	x9, x8, x9
	b	LBB0_10
LBB0_5:
	ldr	x8, [x20, #16]
	cbz	x8, LBB0_8
; %bb.6:
	ldr	x9, [x8, #16]
	cmp	x9, x23
	b.ne	LBB0_8
; %bb.7:
	ldr	x9, [x8, #8]
	b	LBB0_11
LBB0_8:
	mov	x23, #0
	b	LBB0_12
LBB0_9:
	ldr	x9, [x0, #24]
LBB0_10:
	add	x8, x0, #16
LBB0_11:
	ldr	x8, [x8]
	sub	x23, x9, x8
LBB0_12:
	mov	x0, x22
	bl	_spin_unlock_irqrestore
	ldp	w2, w1, [x21]
	mov	x0, x19
	mov	x3, x23
	bl	_dma_set_tx_state
	ldr	w0, [x20, #4]
LBB0_13:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_COMPLETE,4,2               ; @DMA_COMPLETE
	.comm	_IMX_DMA_SG_LOOP,4,2            ; @IMX_DMA_SG_LOOP
	.no_dead_strip	_sdma_tx_status
.subsections_via_symbols
