	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ag71xx_ring_rx_clean
_ag71xx_ring_rx_clean:                  ## @ag71xx_ring_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	%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
	cmpq	$0, 8(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%rdi, %r15
	movq	_AG71XX_RX_RING_SIZE@GOTPCREL(%rip), %r13
	cmpl	$0, (%r13)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_NetRxPackets@GOTPCREL(%rip), %r12
	movq	_DESC_EMPTY@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	callq	_virt_to_phys
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movq	%rax, 8(%rcx)
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	_PKTSIZE_ALIGN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_flush_cache
	movl	(%r14), %eax
	movq	8(%r15), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movl	%eax, (%rcx)
	incq	%rbx
	movslq	(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	movq	$0, (%r15)
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AG71XX_RX_RING_SIZE,4,2        ## @AG71XX_RX_RING_SIZE
	.comm	_NetRxPackets,8,3               ## @NetRxPackets
	.comm	_PKTSIZE_ALIGN,4,2              ## @PKTSIZE_ALIGN
	.comm	_DESC_EMPTY,4,2                 ## @DESC_EMPTY
	.no_dead_strip	_ag71xx_ring_rx_clean
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ag71xx_ring_rx_clean
_ag71xx_ring_rx_clean:                  ; @ag71xx_ring_rx_clean
	.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
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x19, x0
Lloh0:
	adrp	x20, _AG71XX_RX_RING_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AG71XX_RX_RING_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
Lloh2:
	adrp	x22, _NetRxPackets@GOTPAGE
Lloh3:
	ldr	x22, [x22, _NetRxPackets@GOTPAGEOFF]
Lloh4:
	adrp	x23, _PKTSIZE_ALIGN@GOTPAGE
Lloh5:
	ldr	x23, [x23, _PKTSIZE_ALIGN@GOTPAGEOFF]
Lloh6:
	adrp	x24, _DESC_EMPTY@GOTPAGE
Lloh7:
	ldr	x24, [x24, _DESC_EMPTY@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x22]
	lsl	x25, x21, #3
	ldr	x0, [x8, x25]
	bl	_virt_to_phys
	ldr	x8, [x19, #8]
	ldr	x8, [x8, x25]
	str	x0, [x8, #8]
	ldr	x8, [x22]
	ldr	x0, [x8, x25]
	ldr	w1, [x23]
	bl	_flush_cache
	ldr	w8, [x24]
	ldr	x9, [x19, #8]
	ldr	x9, [x9, x25]
	str	w8, [x9]
	add	x21, x21, #1
	ldrsw	x8, [x20]
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_4:
	str	xzr, [x19]
LBB0_5:
	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 AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_AG71XX_RX_RING_SIZE,4,2        ; @AG71XX_RX_RING_SIZE
	.comm	_NetRxPackets,8,3               ; @NetRxPackets
	.comm	_PKTSIZE_ALIGN,4,2              ; @PKTSIZE_ALIGN
	.comm	_DESC_EMPTY,4,2                 ; @DESC_EMPTY
	.no_dead_strip	_ag71xx_ring_rx_clean
.subsections_via_symbols
