	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mvneta_rxq_drop_pkts
_mvneta_rxq_drop_pkts:                  ## @mvneta_rxq_drop_pkts
	.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, %r15
	movq	%rdi, %r14
	callq	_mvneta_rxq_busy_desc_num_get
	testl	%eax, %eax
	je	LBB0_4
## %bb.1:
	movl	%eax, %ebx
	movq	%r14, %rdi
	movq	%r15, %rsi
	movl	%eax, %edx
	movl	%eax, %ecx
	callq	_mvneta_rxq_desc_num_update
	cmpq	$0, 8(%r14)
	je	LBB0_5
## %bb.2:
	testl	%ebx, %ebx
	jle	LBB0_11
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	callq	_mvneta_rxq_next_desc_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_MVNETA_RX_GET_BM_POOL_ID
	movq	8(%r14), %rdi
	leaq	(,%rax,4), %rsi
	addq	(%rdi), %rsi
	movl	(%r12), %edx
	callq	_mvneta_bm_pool_put_bp
	decl	%ebx
	jne	LBB0_3
	jmp	LBB0_11
LBB0_4:
	cmpq	$0, 8(%r14)
	jne	LBB0_11
LBB0_5:
	movl	(%r15), %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.6:
	xorl	%ebx, %ebx
	movq	_DMA_FROM_DEVICE@GOTPCREL(%rip), %r13
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_11
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %r12
	testq	%r12, %r12
	je	LBB0_10
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	16(%r15), %rcx
	movl	(%rcx,%rbx,4), %esi
	testl	%esi, %esi
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_7 Depth=1
	movq	(%r14), %rax
	movl	(%rax), %edi
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%r13), %ecx
	callq	_dma_unmap_page
	movq	%r12, %rdi
	callq	___free_page
	movl	(%r15), %eax
	jmp	LBB0_10
LBB0_11:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ## @DMA_FROM_DEVICE
	.no_dead_strip	_mvneta_rxq_drop_pkts
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mvneta_rxq_drop_pkts
_mvneta_rxq_drop_pkts:                  ; @mvneta_rxq_drop_pkts
	.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
	bl	_mvneta_rxq_busy_desc_num_get
	cbz	w0, LBB0_4
; %bb.1:
	mov	x21, x0
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	mov	x3, x21
	bl	_mvneta_rxq_desc_num_update
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_5
; %bb.2:
	cmp	w21, #1
	b.lt	LBB0_11
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_mvneta_rxq_next_desc_get
	mov	x22, x0
	bl	_MVNETA_RX_GET_BM_POOL_ID
	ldr	x8, [x20, #8]
	ldr	x9, [x8]
	add	x1, x9, x0, lsl #2
	ldr	w2, [x22]
	mov	x0, x8
	bl	_mvneta_bm_pool_put_bp
	subs	w21, w21, #1
	b.ne	LBB0_3
	b	LBB0_11
LBB0_4:
	ldr	x8, [x20, #8]
	cbnz	x8, LBB0_11
LBB0_5:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_11
; %bb.6:
	mov	x22, #0
Lloh0:
	adrp	x23, _PAGE_SIZE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _PAGE_SIZE@GOTPAGEOFF]
Lloh2:
	adrp	x24, _DMA_FROM_DEVICE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _DMA_FROM_DEVICE@GOTPAGEOFF]
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x22, x22, #1
	cmp	x22, w8, sxtw
	b.ge	LBB0_11
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #8]
	ldr	x21, [x9, x22, lsl #3]
	cbz	x21, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	ldr	x9, [x19, #16]
	ldr	w1, [x9, x22, lsl #2]
	cbz	w1, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	ldr	x8, [x20]
	ldr	w0, [x8]
	ldr	w2, [x23]
	ldr	w3, [x24]
	bl	_dma_unmap_page
	mov	x0, x21
	bl	___free_page
	ldr	w8, [x19]
	b	LBB0_7
LBB0_11:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_DMA_FROM_DEVICE,4,2            ; @DMA_FROM_DEVICE
	.no_dead_strip	_mvneta_rxq_drop_pkts
.subsections_via_symbols
