	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_clear_rx_ring
_hns3_clear_rx_ring:                    ## @hns3_clear_rx_ring
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	(%rdi), %rax
	cmpq	8(%rdi), %rax
	jne	LBB0_1
LBB0_7:
	movq	24(%rbx), %rdi
	xorl	%r14d, %r14d
	testq	%rdi, %rdi
	je	LBB0_9
## %bb.8:
	callq	_dev_kfree_skb_any
	xorps	%xmm0, %xmm0
	movups	%xmm0, 16(%rbx)
	jmp	LBB0_9
LBB0_1:
	leaq	-40(%rbp), %r15
	movq	_next_to_use@GOTPCREL(%rip), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r12), %esi
	movq	%rbx, %rdi
	callq	_ring_ptr_move_fw
	movq	(%rbx), %rax
	cmpq	8(%rbx), %rax
	je	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%rbx), %rcx
	cmpl	$0, (%rcx,%rax,4)
	jne	LBB0_6
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_hns3_reserve_buffer_map
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%rbx), %rsi
	movq	%rbx, %rdi
	movq	%r15, %rdx
	callq	_hns3_replace_buffer
	jmp	LBB0_6
LBB0_4:
	movl	%eax, %r14d
	leaq	40(%rbx), %r15
	movq	%r15, %rdi
	callq	_u64_stats_update_begin
	incl	44(%rbx)
	movq	%r15, %rdi
	callq	_u64_stats_update_end
	movq	32(%rbx), %rax
	movq	(%rax), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movl	%r14d, %edx
	callq	_netdev_warn
LBB0_9:
	movl	%r14d, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"reserve buffer map failed, ret = %d\n"

	.comm	_next_to_use,4,2                ## @next_to_use
	.no_dead_strip	_hns3_clear_rx_ring
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_clear_rx_ring
_hns3_clear_rx_ring:                    ; @hns3_clear_rx_ring
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	mov	x19, x0
	ldp	x8, x9, [x0]
	cmp	x8, x9
	b.ne	LBB0_3
LBB0_1:
	ldr	x0, [x19, #24]
	cbz	x0, LBB0_8
; %bb.2:
	bl	_dev_kfree_skb_any
	mov	w20, #0
	stp	xzr, xzr, [x19, #16]
	b	LBB0_10
LBB0_3:
Lloh0:
	adrp	x21, _next_to_use@GOTPAGE
Lloh1:
	ldr	x21, [x21, _next_to_use@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x21]
	mov	x0, x19
	bl	_ring_ptr_move_fw
	ldp	x8, x9, [x19]
	cmp	x8, x9
	b.eq	LBB0_1
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19, #48]
	ldr	w8, [x9, x8, lsl #2]
	cbnz	w8, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x1, sp, #8
	mov	x0, x19
	bl	_hns3_reserve_buffer_map
	cbnz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x1, [x19]
	add	x2, sp, #8
	mov	x0, x19
	bl	_hns3_replace_buffer
	b	LBB0_4
LBB0_8:
	mov	w20, #0
	b	LBB0_10
LBB0_9:
	mov	x20, x0
	add	x21, x19, #40
	mov	x0, x21
	bl	_u64_stats_update_begin
	ldr	w8, [x19, #44]
	add	w8, w8, #1
	str	w8, [x19, #44]
	mov	x0, x21
	bl	_u64_stats_update_end
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	w0, [x8]
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	bl	_netdev_warn
LBB0_10:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"reserve buffer map failed, ret = %d\n"

	.comm	_next_to_use,4,2                ; @next_to_use
	.no_dead_strip	_hns3_clear_rx_ring
.subsections_via_symbols
