	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxs_dma_tx_status
_mxs_dma_tx_status:                     ## @mxs_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, %r14
	movq	%rdi, %rbx
	callq	_to_mxs_dma_chan
	movq	%rax, %r15
	movq	(%rax), %rax
	movq	_DMA_IN_PROGRESS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.1:
	movq	_MXS_DMA_SG_LOOP@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_4
## %bb.2:
	movq	24(%r15), %rdi
	movq	16(%r15), %rax
	movslq	12(%r15), %rcx
	shlq	$4, %rcx
	movq	-16(%rcx,%rax), %r12
	addq	-8(%rcx,%rax), %r12
	movq	(%rdi), %r13
	movl	8(%rbx), %esi
	callq	_HW_APBHX_CHn_BAR
	addq	%rax, %r13
	movq	%r13, %rdi
	callq	_readl
	subq	%rax, %r12
	jmp	LBB0_5
LBB0_4:
	xorl	%r12d, %r12d
LBB0_5:
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	movq	%r14, %rdi
	movq	%r12, %rcx
	callq	_dma_set_tx_state
	movl	(%r15), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_IN_PROGRESS,8,3            ## @DMA_IN_PROGRESS
	.comm	_MXS_DMA_SG_LOOP,4,2            ## @MXS_DMA_SG_LOOP
	.no_dead_strip	_mxs_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 mxs_dma_tx_status
_mxs_dma_tx_status:                     ; @mxs_dma_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	x21, x0
	bl	_to_mxs_dma_chan
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _DMA_IN_PROGRESS@GOTPAGE
Lloh1:
	ldr	x9, [x9, _DMA_IN_PROGRESS@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
	ldr	w8, [x20, #8]
Lloh3:
	adrp	x9, _MXS_DMA_SG_LOOP@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MXS_DMA_SG_LOOP@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_3
; %bb.2:
	ldp	x8, x0, [x20, #16]
	ldrsw	x9, [x20, #12]
	add	x8, x8, x9, lsl #4
	ldp	x8, x9, [x8, #-16]
	add	x22, x8, x9
	ldr	x23, [x0]
	ldr	w1, [x21, #8]
	bl	_HW_APBHX_CHn_BAR
	add	x0, x0, x23
	bl	_readl
	sub	x3, x22, x0
	b	LBB0_4
LBB0_3:
	mov	x3, #0
LBB0_4:
	ldp	w2, w1, [x21]
	mov	x0, x19
	bl	_dma_set_tx_state
	ldr	w0, [x20]
	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_IN_PROGRESS,8,3            ; @DMA_IN_PROGRESS
	.comm	_MXS_DMA_SG_LOOP,4,2            ; @MXS_DMA_SG_LOOP
	.no_dead_strip	_mxs_dma_tx_status
.subsections_via_symbols
