	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function omap_dma_tx_status
_omap_dma_tx_status:                    ## @omap_dma_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
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_to_omap_dma_chan
	movq	%rax, %r13
	movq	%rbx, %rdi
	movq	%r14, %rsi
	movq	%r12, %rdx
	callq	_dma_cookie_status
	movl	%eax, %r15d
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_28
## %bb.1:
	movq	%r13, %rdi
	callq	_spin_lock_irqsave
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	24(%r13), %r13
	testq	%r13, %r13
	je	LBB0_6
## %bb.2:
	xorl	%ebx, %ebx
	cmpq	%r14, 8(%r13)
	cmoveq	%r13, %rbx
	testq	%r12, %r12
	je	LBB0_19
## %bb.3:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.4:
	movq	(%rbx), %rax
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.5:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_omap_dma_get_src_pos
	jmp	LBB0_12
LBB0_6:
	testq	%r12, %r12
	je	LBB0_7
LBB0_14:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_vchan_find_desc
	testq	%rax, %rax
	je	LBB0_15
## %bb.16:
	movq	%rax, %rdi
	callq	_to_omap_dma_desc
	movl	%eax, %edi
	callq	_omap_dma_desc_size
                                        ## kill: def $eax killed $eax def $rax
	jmp	LBB0_17
LBB0_7:
	xorl	%ebx, %ebx
	jmp	LBB0_19
LBB0_15:
	xorl	%eax, %eax
LBB0_17:
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_8:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.9:
	movq	_DMA_MEM_TO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_11
## %bb.10:
	xorl	%esi, %esi
	jmp	LBB0_13
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_omap_dma_get_dst_pos
LBB0_12:
	movq	%rax, %rsi
LBB0_13:
	movq	%rbx, %rdi
	callq	_omap_dma_desc_size_pos
                                        ## kill: def $eax killed $eax def $rax
LBB0_18:
	movl	%eax, (%r12)
	movq	%r13, %rbx
LBB0_19:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	_DMA_IN_PROGRESS@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	jne	LBB0_22
## %bb.20:
	cmpq	$0, 16(%r14)
	je	LBB0_22
## %bb.21:
	movq	_DMA_PAUSED@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	jmp	LBB0_27
LBB0_22:
	testq	%rbx, %rbx
	je	LBB0_27
## %bb.23:
	cmpq	$0, 16(%rbx)
	je	LBB0_27
## %bb.24:
	cmpq	$0, 8(%r14)
	je	LBB0_27
## %bb.25:
	movq	_CCR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_omap_dma_chan_read
	movq	_CCR_ENABLE@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_27
## %bb.26:
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	%r14, %rdi
	callq	_omap_dma_start_desc
	addq	$8, %rbx
	movq	%rbx, %rdi
	callq	_vchan_cookie_complete
LBB0_27:
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_28:
	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_MEM_TO_DEV,8,3             ## @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_DMA_MEM_TO_MEM,8,3             ## @DMA_MEM_TO_MEM
	.comm	_DMA_IN_PROGRESS,4,2            ## @DMA_IN_PROGRESS
	.comm	_DMA_PAUSED,4,2                 ## @DMA_PAUSED
	.comm	_CCR,4,2                        ## @CCR
	.comm	_CCR_ENABLE,4,2                 ## @CCR_ENABLE
	.no_dead_strip	_omap_dma_tx_status
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function omap_dma_tx_status
_omap_dma_tx_status:                    ; @omap_dma_tx_status
	.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	x21, x2
	mov	x23, x1
	mov	x20, x0
	bl	_to_omap_dma_chan
	mov	x19, x0
	mov	x0, x20
	mov	x1, x23
	mov	x2, x21
	bl	_dma_cookie_status
	mov	x20, x0
Lloh0:
	adrp	x24, _DMA_COMPLETE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _DMA_COMPLETE@GOTPAGEOFF]
	ldr	w8, [x24]
	cmp	w0, w8
	b.eq	LBB0_26
; %bb.1:
	mov	x0, x19
	bl	_spin_lock_irqsave
	ldr	x25, [x19, #24]
	cbz	x25, LBB0_6
; %bb.2:
	ldr	x8, [x25, #8]
	cmp	x8, x23
	csel	x22, x25, xzr, eq
	cbz	x21, LBB0_17
; %bb.3:
	cbz	x22, LBB0_7
; %bb.4:
	ldr	x8, [x22]
Lloh2:
	adrp	x9, _DMA_MEM_TO_DEV@GOTPAGE
Lloh3:
	ldr	x9, [x9, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.5:
	mov	x0, x19
	bl	_omap_dma_get_src_pos
	b	LBB0_13
LBB0_6:
	cbz	x21, LBB0_10
LBB0_7:
	mov	x0, x19
	mov	x1, x23
	bl	_vchan_find_desc
	cbz	x0, LBB0_9
; %bb.8:
	bl	_to_omap_dma_desc
	bl	_omap_dma_desc_size
LBB0_9:
	mov	x25, #0
	b	LBB0_16
LBB0_10:
	mov	x22, #0
	b	LBB0_17
LBB0_11:
Lloh5:
	adrp	x9, _DMA_DEV_TO_MEM@GOTPAGE
Lloh6:
	ldr	x9, [x9, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
Lloh8:
	adrp	x10, _DMA_MEM_TO_MEM@GOTPAGE
Lloh9:
	ldr	x10, [x10, _DMA_MEM_TO_MEM@GOTPAGEOFF]
Lloh10:
	ldr	x10, [x10]
	cmp	x8, x9
	ccmp	x8, x10, #4, ne
	b.ne	LBB0_14
; %bb.12:
	mov	x0, x19
	bl	_omap_dma_get_dst_pos
LBB0_13:
	mov	x1, x0
	b	LBB0_15
LBB0_14:
	mov	x1, #0
LBB0_15:
	mov	x0, x22
	bl	_omap_dma_desc_size_pos
LBB0_16:
	str	w0, [x21]
	mov	x22, x25
LBB0_17:
Lloh11:
	adrp	x8, _DMA_IN_PROGRESS@GOTPAGE
Lloh12:
	ldr	x8, [x8, _DMA_IN_PROGRESS@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
	cmp	w20, w8
	b.ne	LBB0_20
; %bb.18:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_20
; %bb.19:
Lloh14:
	adrp	x8, _DMA_PAUSED@GOTPAGE
Lloh15:
	ldr	x8, [x8, _DMA_PAUSED@GOTPAGEOFF]
Lloh16:
	ldr	w20, [x8]
	b	LBB0_25
LBB0_20:
	cbz	x22, LBB0_25
; %bb.21:
	ldr	x8, [x22, #16]
	cbz	x8, LBB0_25
; %bb.22:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_25
; %bb.23:
Lloh17:
	adrp	x8, _CCR@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CCR@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_omap_dma_chan_read
Lloh20:
	adrp	x8, _CCR_ENABLE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _CCR_ENABLE@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	tst	w8, w0
	b.ne	LBB0_25
; %bb.24:
	ldr	w20, [x24]
	mov	x0, x19
	bl	_omap_dma_start_desc
	add	x0, x22, #8
	bl	_vchan_cookie_complete
LBB0_25:
	mov	x0, x19
	bl	_spin_unlock_irqrestore
LBB0_26:
	mov	x0, x20
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_COMPLETE,4,2               ; @DMA_COMPLETE
	.comm	_DMA_MEM_TO_DEV,8,3             ; @DMA_MEM_TO_DEV
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_DMA_MEM_TO_MEM,8,3             ; @DMA_MEM_TO_MEM
	.comm	_DMA_IN_PROGRESS,4,2            ; @DMA_IN_PROGRESS
	.comm	_DMA_PAUSED,4,2                 ; @DMA_PAUSED
	.comm	_CCR,4,2                        ; @CCR
	.comm	_CCR_ENABLE,4,2                 ; @CCR_ENABLE
	.no_dead_strip	_omap_dma_tx_status
.subsections_via_symbols
