	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_tx_unmap
_mtk_tx_unmap:                          ## @mtk_tx_unmap
	.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	%rsi, %rbx
	movq	%rdi, %r14
	movq	8(%rdi), %rax
	movl	(%rax), %edi
	movq	_MTK_QDMA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MTK_HAS_CAPS
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	(%rbx), %eax
	movq	_MTK_TX_FLAGS_SINGLE0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_3
## %bb.2:
	movl	(%r14), %r14d
	movq	_dma_addr0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_addr
	movl	%eax, %r15d
	movq	_dma_len0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_len
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movq	%rax, %rdx
	callq	_dma_unmap_single
	jmp	LBB0_10
LBB0_5:
	movq	_dma_len0@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_len
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movl	(%r14), %r15d
	movq	_dma_addr0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_addr
	movl	%eax, %r12d
	movl	(%r13), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_len
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r15d, %edi
	movl	%r12d, %esi
	movq	%rax, %rdx
	callq	_dma_unmap_page
LBB0_7:
	movq	_dma_len1@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_len
	testq	%rax, %rax
	je	LBB0_10
## %bb.8:
	movl	(%r14), %r14d
	movq	_dma_addr1@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_addr
	movl	%eax, %r15d
	movl	(%r12), %esi
	jmp	LBB0_9
LBB0_3:
	movq	_MTK_TX_FLAGS_PAGE0@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_10
## %bb.4:
	movl	(%r14), %r14d
	movq	_dma_addr0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_dma_unmap_addr
	movl	%eax, %r15d
	movq	_dma_len0@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
LBB0_9:
	movq	%rbx, %rdi
	callq	_dma_unmap_len
	movq	_DMA_TO_DEVICE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%r14d, %edi
	movl	%r15d, %esi
	movq	%rax, %rdx
	callq	_dma_unmap_page
LBB0_10:
	movl	$0, (%rbx)
	movq	8(%rbx), %rdi
	testq	%rdi, %rdi
	je	LBB0_13
## %bb.11:
	movq	_MTK_DMA_DUMMY_DESC@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdi
	je	LBB0_13
## %bb.12:
	callq	_dev_kfree_skb_any
LBB0_13:
	movq	$0, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MTK_QDMA,4,2                   ## @MTK_QDMA
	.comm	_MTK_TX_FLAGS_SINGLE0,4,2       ## @MTK_TX_FLAGS_SINGLE0
	.comm	_dma_addr0,4,2                  ## @dma_addr0
	.comm	_dma_len0,4,2                   ## @dma_len0
	.comm	_DMA_TO_DEVICE,4,2              ## @DMA_TO_DEVICE
	.comm	_MTK_TX_FLAGS_PAGE0,4,2         ## @MTK_TX_FLAGS_PAGE0
	.comm	_dma_len1,4,2                   ## @dma_len1
	.comm	_dma_addr1,4,2                  ## @dma_addr1
	.comm	_MTK_DMA_DUMMY_DESC,8,3         ## @MTK_DMA_DUMMY_DESC
	.no_dead_strip	_mtk_tx_unmap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_tx_unmap
_mtk_tx_unmap:                          ; @mtk_tx_unmap
	.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, x1
	mov	x20, x0
	ldr	x8, [x0, #8]
	ldr	w0, [x8]
Lloh0:
	adrp	x8, _MTK_QDMA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MTK_QDMA@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_MTK_HAS_CAPS
	cbz	x0, LBB0_3
; %bb.1:
	ldr	w8, [x19]
Lloh3:
	adrp	x9, _MTK_TX_FLAGS_SINGLE0@GOTPAGE
Lloh4:
	ldr	x9, [x9, _MTK_TX_FLAGS_SINGLE0@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_7
; %bb.2:
	ldr	w20, [x20]
Lloh6:
	adrp	x8, _dma_addr0@GOTPAGE
Lloh7:
	ldr	x8, [x8, _dma_addr0@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_unmap_addr
	mov	x21, x0
Lloh9:
	adrp	x8, _dma_len0@GOTPAGE
Lloh10:
	ldr	x8, [x8, _dma_len0@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_unmap_len
	mov	x2, x0
Lloh12:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh13:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh14:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_dma_unmap_single
	b	LBB0_10
LBB0_3:
Lloh15:
	adrp	x23, _dma_len0@GOTPAGE
Lloh16:
	ldr	x23, [x23, _dma_len0@GOTPAGEOFF]
	ldr	w1, [x23]
	mov	x0, x19
	bl	_dma_unmap_len
	cbz	x0, LBB0_5
; %bb.4:
	ldr	w21, [x20]
Lloh17:
	adrp	x8, _dma_addr0@GOTPAGE
Lloh18:
	ldr	x8, [x8, _dma_addr0@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_unmap_addr
	mov	x22, x0
	ldr	w1, [x23]
	mov	x0, x19
	bl	_dma_unmap_len
	mov	x2, x0
Lloh20:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh21:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh22:
	ldr	w3, [x8]
	mov	x0, x21
	mov	x1, x22
	bl	_dma_unmap_page
LBB0_5:
Lloh23:
	adrp	x22, _dma_len1@GOTPAGE
Lloh24:
	ldr	x22, [x22, _dma_len1@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_dma_unmap_len
	cbz	x0, LBB0_10
; %bb.6:
	ldr	w20, [x20]
Lloh25:
	adrp	x8, _dma_addr1@GOTPAGE
Lloh26:
	ldr	x8, [x8, _dma_addr1@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_unmap_addr
	mov	x21, x0
	ldr	w1, [x22]
	b	LBB0_9
LBB0_7:
Lloh28:
	adrp	x9, _MTK_TX_FLAGS_PAGE0@GOTPAGE
Lloh29:
	ldr	x9, [x9, _MTK_TX_FLAGS_PAGE0@GOTPAGEOFF]
Lloh30:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.8:
	ldr	w20, [x20]
Lloh31:
	adrp	x8, _dma_addr0@GOTPAGE
Lloh32:
	ldr	x8, [x8, _dma_addr0@GOTPAGEOFF]
Lloh33:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_dma_unmap_addr
	mov	x21, x0
Lloh34:
	adrp	x8, _dma_len0@GOTPAGE
Lloh35:
	ldr	x8, [x8, _dma_len0@GOTPAGEOFF]
Lloh36:
	ldr	w1, [x8]
LBB0_9:
	mov	x0, x19
	bl	_dma_unmap_len
	mov	x2, x0
Lloh37:
	adrp	x8, _DMA_TO_DEVICE@GOTPAGE
Lloh38:
	ldr	x8, [x8, _DMA_TO_DEVICE@GOTPAGEOFF]
Lloh39:
	ldr	w3, [x8]
	mov	x0, x20
	mov	x1, x21
	bl	_dma_unmap_page
LBB0_10:
	str	wzr, [x19]
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_13
; %bb.11:
Lloh40:
	adrp	x8, _MTK_DMA_DUMMY_DESC@GOTPAGE
Lloh41:
	ldr	x8, [x8, _MTK_DMA_DUMMY_DESC@GOTPAGEOFF]
Lloh42:
	ldr	x8, [x8]
	cmp	x0, x8
	b.eq	LBB0_13
; %bb.12:
	bl	_dev_kfree_skb_any
LBB0_13:
	str	xzr, [x19, #8]
	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 AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.cfi_endproc
                                        ; -- End function
	.comm	_MTK_QDMA,4,2                   ; @MTK_QDMA
	.comm	_MTK_TX_FLAGS_SINGLE0,4,2       ; @MTK_TX_FLAGS_SINGLE0
	.comm	_dma_addr0,4,2                  ; @dma_addr0
	.comm	_dma_len0,4,2                   ; @dma_len0
	.comm	_DMA_TO_DEVICE,4,2              ; @DMA_TO_DEVICE
	.comm	_MTK_TX_FLAGS_PAGE0,4,2         ; @MTK_TX_FLAGS_PAGE0
	.comm	_dma_len1,4,2                   ; @dma_len1
	.comm	_dma_addr1,4,2                  ; @dma_addr1
	.comm	_MTK_DMA_DUMMY_DESC,8,3         ; @MTK_DMA_DUMMY_DESC
	.no_dead_strip	_mtk_tx_unmap
.subsections_via_symbols
