	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mtk_rx_clean
_mtk_rx_clean:                          ## @mtk_rx_clean
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	24(%rsi), %rdi
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.1:
	cmpq	$0, 8(%r15)
	je	LBB0_9
## %bb.2:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_8
## %bb.3:
	xorl	%ebx, %ebx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	movq	24(%r15), %rdi
	cmpq	%rcx, %rbx
	jge	LBB0_8
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$0, (%rdi,%rbx,4)
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	8(%r15), %rcx
	movl	(%rcx,%rbx,4), %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r14), %edi
	movl	32(%r15), %edx
	movl	(%r12), %ecx
	callq	_dma_unmap_single
	movq	24(%r15), %rax
	movl	(%rax,%rbx,4), %edi
	callq	_skb_free_frag
	movl	(%r15), %eax
	jmp	LBB0_7
LBB0_8:
	callq	_kfree
	movq	$0, 24(%r15)
LBB0_9:
	movq	8(%r15), %rdx
	testq	%rdx, %rdx
	je	LBB0_11
## %bb.10:
	movl	(%r14), %edi
	movl	(%r15), %esi
	movl	16(%r15), %ecx
	shll	$2, %esi
	callq	_dma_free_coherent
	movq	$0, 8(%r15)
LBB0_11:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_mtk_rx_clean
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mtk_rx_clean
_mtk_rx_clean:                          ; @mtk_rx_clean
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x0, [x1, #24]
	cbz	x0, LBB0_9
; %bb.1:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_9
; %bb.2:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_8
; %bb.3:
	mov	x21, #0
Lloh0:
	adrp	x22, _DMA_FROM_DEVICE@GOTPAGE
Lloh1:
	ldr	x22, [x22, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x21, x21, #1
	ldr	x0, [x19, #24]
	cmp	x21, w8, sxtw
	b.ge	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x0, x21, lsl #2]
	cbz	w9, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x19, #8]
	ldr	w1, [x9, x21, lsl #2]
	cbz	w1, LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x20]
	ldr	w2, [x19, #32]
	ldr	w3, [x22]
	bl	_dma_unmap_single
	ldr	x8, [x19, #24]
	ldr	w0, [x8, x21, lsl #2]
	bl	_skb_free_frag
	ldr	w8, [x19]
	b	LBB0_4
LBB0_8:
	bl	_kfree
	str	xzr, [x19, #24]
LBB0_9:
	ldr	x2, [x19, #8]
	cbz	x2, LBB0_11
; %bb.10:
	ldr	w0, [x20]
	ldr	w8, [x19]
	lsl	w1, w8, #2
	ldr	w3, [x19, #16]
	bl	_dma_free_coherent
	str	xzr, [x19, #8]
LBB0_11:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_mtk_rx_clean
.subsections_via_symbols
