	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bcm2835_dma_tx_status
_bcm2835_dma_tx_status:                 ## @bcm2835_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, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_to_bcm2835_dma_chan
	movq	%rax, %r14
	movq	%rbx, %rdi
	movq	%r12, %rsi
	movq	%r13, %rdx
	callq	_dma_cookie_status
	movl	%eax, %r15d
	testq	%r13, %r13
	je	LBB0_13
## %bb.1:
	movq	_DMA_COMPLETE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_13
## %bb.2:
	movq	%r14, %rdi
	callq	_spin_lock_irqsave
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_vchan_find_desc
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %rdi
	callq	_to_bcm2835_dma_desc
	movl	%eax, %edi
	callq	_bcm2835_dma_desc_size
LBB0_12:
	movl	%eax, (%r13)
	movq	%r14, %rdi
	callq	_spin_unlock_irqrestore
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	16(%r14), %rbx
	xorl	%eax, %eax
	testq	%rbx, %rbx
	je	LBB0_12
## %bb.5:
	cmpq	%r12, 8(%rbx)
	jne	LBB0_12
## %bb.6:
	movq	(%rbx), %rax
	movq	_DMA_MEM_TO_DEV@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_8
## %bb.7:
	movq	_BCM2835_DMA_SOURCE_AD@GOTPCREL(%rip), %rax
	jmp	LBB0_10
LBB0_8:
	movq	_DMA_DEV_TO_MEM@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.9:
	movq	_BCM2835_DMA_DEST_AD@GOTPCREL(%rip), %rax
LBB0_10:
	movq	(%rax), %rdi
	addq	8(%r14), %rdi
	callq	_readl
	movq	%rax, %rsi
	jmp	LBB0_11
LBB0_14:
	xorl	%esi, %esi
LBB0_11:
	movq	%rbx, %rdi
	callq	_bcm2835_dma_desc_size_pos
	jmp	LBB0_12
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_COMPLETE,4,2               ## @DMA_COMPLETE
	.comm	_DMA_MEM_TO_DEV,8,3             ## @DMA_MEM_TO_DEV
	.comm	_BCM2835_DMA_SOURCE_AD,8,3      ## @BCM2835_DMA_SOURCE_AD
	.comm	_DMA_DEV_TO_MEM,8,3             ## @DMA_DEV_TO_MEM
	.comm	_BCM2835_DMA_DEST_AD,8,3        ## @BCM2835_DMA_DEST_AD
	.no_dead_strip	_bcm2835_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 bcm2835_dma_tx_status
_bcm2835_dma_tx_status:                 ; @bcm2835_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	x23, x1
	mov	x21, x0
	bl	_to_bcm2835_dma_chan
	mov	x20, x0
	mov	x0, x21
	mov	x1, x23
	mov	x2, x19
	bl	_dma_cookie_status
	mov	x21, x0
	cbz	x19, LBB0_15
; %bb.1:
Lloh0:
	adrp	x8, _DMA_COMPLETE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DMA_COMPLETE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w21, w8
	b.eq	LBB0_15
; %bb.2:
	mov	x0, x20
	bl	_spin_lock_irqsave
	mov	x0, x20
	mov	x1, x23
	bl	_vchan_find_desc
	cbz	x0, LBB0_4
; %bb.3:
	bl	_to_bcm2835_dma_desc
	bl	_bcm2835_dma_desc_size
	b	LBB0_14
LBB0_4:
	ldr	x22, [x20, #16]
	cbz	x22, LBB0_8
; %bb.5:
	ldr	x8, [x22, #8]
	cmp	x8, x23
	b.ne	LBB0_8
; %bb.6:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _DMA_MEM_TO_DEV@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DMA_MEM_TO_DEV@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_9
; %bb.7:
Lloh6:
	adrp	x8, _BCM2835_DMA_SOURCE_AD@GOTPAGE
Lloh7:
	ldr	x8, [x8, _BCM2835_DMA_SOURCE_AD@GOTPAGEOFF]
	b	LBB0_11
LBB0_8:
	mov	w0, #0
	b	LBB0_14
LBB0_9:
Lloh8:
	adrp	x9, _DMA_DEV_TO_MEM@GOTPAGE
Lloh9:
	ldr	x9, [x9, _DMA_DEV_TO_MEM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.10:
Lloh11:
	adrp	x8, _BCM2835_DMA_DEST_AD@GOTPAGE
Lloh12:
	ldr	x8, [x8, _BCM2835_DMA_DEST_AD@GOTPAGEOFF]
LBB0_11:
	ldr	x9, [x20, #8]
	ldr	x8, [x8]
	add	x0, x8, x9
	bl	_readl
	mov	x1, x0
	b	LBB0_13
LBB0_12:
	mov	x1, #0
LBB0_13:
	mov	x0, x22
	bl	_bcm2835_dma_desc_size_pos
LBB0_14:
	str	w0, [x19]
	mov	x0, x20
	bl	_spin_unlock_irqrestore
LBB0_15:
	mov	x0, x21
	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
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_COMPLETE,4,2               ; @DMA_COMPLETE
	.comm	_DMA_MEM_TO_DEV,8,3             ; @DMA_MEM_TO_DEV
	.comm	_BCM2835_DMA_SOURCE_AD,8,3      ; @BCM2835_DMA_SOURCE_AD
	.comm	_DMA_DEV_TO_MEM,8,3             ; @DMA_DEV_TO_MEM
	.comm	_BCM2835_DMA_DEST_AD,8,3        ; @BCM2835_DMA_DEST_AD
	.no_dead_strip	_bcm2835_dma_tx_status
.subsections_via_symbols
