	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76_dma_dequeue
_mt76_dma_dequeue:                      ## @mt76_dma_dequeue
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r15
	movslq	(%rsi), %r13
	movl	$0, (%r9)
	movl	8(%rsi), %ecx
	testl	%ecx, %ecx
	je	LBB0_5
## %bb.1:
	movq	%r9, %r12
	movq	%rsi, %rbx
	movq	%rdi, %r14
	testl	%edx, %edx
	jne	LBB0_4
## %bb.2:
	movq	16(%rbx), %rax
	movl	(%rax,%r13,4), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_MT_DMA_CTL_DMA_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	%r8, -56(%rbp)                  ## 8-byte Spill
	callq	_cpu_to_le32
	movq	-56(%rbp), %r8                  ## 8-byte Reload
	testl	%eax, -44(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_5
## %bb.3:
	movl	8(%rbx), %ecx
LBB0_4:
	movl	(%rbx), %eax
	incl	%eax
	cltd
	idivl	4(%rbx)
	movl	%edx, (%rbx)
	decl	%ecx
	movl	%ecx, 8(%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	movq	%r15, %rcx
	movq	%r12, %r9
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mt76_dma_get_buf               ## TAILCALL
LBB0_5:
	xorl	%eax, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_DMA_CTL_DMA_DONE,4,2        ## @MT_DMA_CTL_DMA_DONE
	.no_dead_strip	_mt76_dma_dequeue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76_dma_dequeue
_mt76_dma_dequeue:                      ; @mt76_dma_dequeue
	.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
	ldrsw	x23, [x1]
	str	wzr, [x5]
	ldr	w8, [x1, #8]
	cbz	w8, LBB0_5
; %bb.1:
	mov	x19, x5
	mov	x20, x4
	mov	x21, x3
	mov	x22, x1
	mov	x24, x0
	cbnz	w2, LBB0_4
; %bb.2:
	ldr	x8, [x22, #16]
	ldr	w25, [x8, x23, lsl #2]
Lloh0:
	adrp	x8, _MT_DMA_CTL_DMA_DONE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_DMA_CTL_DMA_DONE@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	_cpu_to_le32
	tst	w0, w25
	b.eq	LBB0_5
; %bb.3:
	ldr	w8, [x22, #8]
LBB0_4:
	ldp	w9, w10, [x22]
	add	w9, w9, #1
	sdiv	w11, w9, w10
	msub	w9, w11, w10, w9
	str	w9, [x22]
	sub	w8, w8, #1
	str	w8, [x22, #8]
	mov	x0, x24
	mov	x1, x22
	mov	x2, x23
	mov	x3, x21
	mov	x4, x20
	mov	x5, x19
	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
	b	_mt76_dma_get_buf
LBB0_5:
	mov	x0, #0
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_DMA_CTL_DMA_DONE,4,2        ; @MT_DMA_CTL_DMA_DONE
	.no_dead_strip	_mt76_dma_dequeue
.subsections_via_symbols
