	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mt76_dma_get_buf
_mt76_dma_get_buf:                      ## @mt76_dma_get_buf
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, -72(%rbp)                  ## 8-byte Spill
	movq	%r8, -104(%rbp)                 ## 8-byte Spill
	movq	%rcx, %r15
	movq	%rdi, -96(%rbp)                 ## 8-byte Spill
	movq	16(%rsi), %rbx
	movslq	%edx, %r14
	movq	8(%rsi), %r13
	movq	(%rbx,%r14,8), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movl	(%rsi), %edi
	callq	_SKB_WITH_OVERHEAD
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	leaq	(%r14,%r14,2), %r12
	movl	8(%r13,%r12,4), %edi
	callq	_READ_ONCE
	movl	%eax, %edi
	callq	_le32_to_cpu
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	testq	%r15, %r15
	je	LBB0_2
## %bb.1:
	movl	4(%r13,%r12,4), %edi
	callq	_READ_ONCE
	movl	%eax, %edi
	callq	_le32_to_cpu
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %r15
	movq	_MT_DMA_CTL_SD_LEN0@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%r15d, %esi
	callq	_FIELD_GET
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movl	%eax, (%rcx)
	movq	_MT_DMA_CTL_LAST_SEC0@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	andl	(%rax), %r15d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	sete	%cl
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movl	%ecx, (%rax)
LBB0_2:
	movq	-104(%rbp), %rax                ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movl	(%r13,%r12,4), %edi
	movq	%rax, %r12
	callq	_le32_to_cpu
	movl	%eax, (%r12)
LBB0_4:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	callq	_dma_unmap_single
	movq	$0, (%rbx,%r14,8)
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MT_DMA_CTL_SD_LEN0,4,2         ## @MT_DMA_CTL_SD_LEN0
	.comm	_MT_DMA_CTL_LAST_SEC0,4,2       ## @MT_DMA_CTL_LAST_SEC0
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_mt76_dma_get_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mt76_dma_get_buf
_mt76_dma_get_buf:                      ; @mt76_dma_get_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x5
	mov	x20, x4
	mov	x25, x3
	mov	x24, x2
	mov	x21, x0
	sxtw	x27, w24
	ldp	x19, x28, [x1, #8]
	ldr	x26, [x28, w2, sxtw #3]
	ldr	w0, [x1]
	bl	_SKB_WITH_OVERHEAD
	mov	x22, x0
	mov	w8, #12
	smaddl	x8, w24, w8, x19
	ldr	w0, [x8, #8]
	bl	_READ_ONCE
	bl	_le32_to_cpu
	mov	x24, x0
	cbz	x25, LBB0_2
; %bb.1:
	mov	w8, #12
	madd	x8, x27, x8, x19
	ldr	w0, [x8, #4]
	bl	_READ_ONCE
	bl	_le32_to_cpu
	str	x27, [sp, #8]                   ; 8-byte Folded Spill
	mov	x27, x28
	mov	x28, x20
	mov	x20, x24
	mov	x24, x22
	mov	x22, x23
	mov	x23, x21
	mov	x21, x26
	mov	x26, x0
Lloh0:
	adrp	x8, _MT_DMA_CTL_SD_LEN0@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MT_DMA_CTL_SD_LEN0@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	mov	x1, x26
	bl	_FIELD_GET
	str	w0, [x25]
Lloh3:
	adrp	x8, _MT_DMA_CTL_LAST_SEC0@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MT_DMA_CTL_LAST_SEC0@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w26
	mov	x26, x21
	mov	x21, x23
	cset	w8, eq
	str	w8, [x22]
	mov	x22, x24
	mov	x24, x20
	mov	x20, x28
	mov	x28, x27
	ldr	x27, [sp, #8]                   ; 8-byte Folded Reload
LBB0_2:
	cbz	x20, LBB0_4
; %bb.3:
	mov	w8, #12
	mul	x8, x27, x8
	ldr	w0, [x19, x8]
	bl	_le32_to_cpu
	str	w0, [x20]
LBB0_4:
	ldr	w0, [x21]
Lloh6:
	adrp	x8, _DMA_FROM_DEVICE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DMA_FROM_DEVICE@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	mov	x1, x24
	mov	x2, x22
	bl	_dma_unmap_single
	str	xzr, [x28, x27, lsl #3]
	mov	x0, x26
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MT_DMA_CTL_SD_LEN0,4,2         ; @MT_DMA_CTL_SD_LEN0
	.comm	_MT_DMA_CTL_LAST_SEC0,4,2       ; @MT_DMA_CTL_LAST_SEC0
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_mt76_dma_get_buf
.subsections_via_symbols
