	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_add_frag
_hns3_add_frag:                         ## @hns3_add_frag
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	(%rdx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testl	%ecx, %ecx
	je	LBB0_2
## %bb.1:
	movl	(%r12), %eax
	movl	4(%r12), %ecx
	addl	%ecx, %eax
	decl	%eax
	cltd
	idivl	%ecx
	movq	48(%r12), %rax
	movslq	%edx, %rcx
	leaq	(%rax,%rcx,8), %rsi
	addq	$4, %rsi
	jmp	LBB0_3
LBB0_2:
	addq	$4, %rsi
LBB0_3:
	movl	(%rsi), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	movq	_HNS3_RXD_FE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	xorl	%r13d, %r13d
	testl	%ebx, %eax
	jne	LBB0_18
## %bb.4:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rsi
	leaq	1(%rsi), %rax
	movq	%rax, 8(%r12)
	xorl	%r13d, %r13d
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r12, %rdx
	xorl	%ecx, %ecx
	movq	%r15, %r8
	callq	_hns3_nic_reuse_page
	movq	_next_to_clean@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_ring_ptr_move_fw
	incl	16(%r12)
	movq	_HNS3_RXD_FE_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	testl	%eax, -52(%rbp)                 ## 4-byte Folded Reload
	jne	LBB0_18
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	48(%r12), %r13
	movslq	(%r12), %r14
	leaq	(,%r14,4), %r15
	addq	40(%r12), %r15
	movl	4(%r13,%r14,8), %edi
	callq	_le32_to_cpu
	movl	%eax, %ebx
	xorl	%eax, %eax
	callq	_dma_rmb
	movq	_HNS3_RXD_VLD_B@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_BIT
	testl	%ebx, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	8(%r12), %rax
	xorl	%edi, %edi
	movq	_MAX_SKB_FRAGS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setge	%dil
	callq	_unlikely
	testq	%rax, %rax
	movl	%ebx, -52(%rbp)                 ## 4-byte Spill
	je	LBB0_8
## %bb.9:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	32(%r12), %rdi
	movq	_HNS3_RX_HEAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_napi_alloc_skb
	movq	%rax, %rbx
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	$0, 8(%r12)
	movq	24(%r12), %rax
	testq	%rax, %rax
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, 16(%rax)
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	24(%r12), %rbx
	testq	%rbx, %rbx
	jne	LBB0_16
	jmp	LBB0_17
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_skb_shinfo
	movq	%rbx, (%rax)
LBB0_14:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, 24(%r12)
	testq	%rbx, %rbx
	je	LBB0_17
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r12, %rdi
	callq	_hns3_buf_size
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	addl	%eax, 8(%rbx)
	movl	(%r13,%r14,8), %edi
	callq	_le16_to_cpu
	addl	%eax, 4(%rbx)
	movl	(%r13,%r14,8), %edi
	callq	_le16_to_cpu
	addl	%eax, (%rbx)
	movq	24(%r12), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	jmp	LBB0_17
LBB0_10:
	movq	32(%r12), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_hns3_rl_err
LBB0_6:
	movq	_ENXIO@GOTPCREL(%rip), %rax
	xorl	%r13d, %r13d
	subl	(%rax), %r13d
LBB0_18:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HNS3_RXD_FE_B,4,2              ## @HNS3_RXD_FE_B
	.comm	_HNS3_RXD_VLD_B,4,2             ## @HNS3_RXD_VLD_B
	.comm	_ENXIO,4,2                      ## @ENXIO
	.comm	_MAX_SKB_FRAGS,8,3              ## @MAX_SKB_FRAGS
	.comm	_HNS3_RX_HEAD_SIZE,4,2          ## @HNS3_RX_HEAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc rx fraglist skb fail\n"

	.comm	_next_to_clean,4,2              ## @next_to_clean
	.no_dead_strip	_hns3_add_frag
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_add_frag
_hns3_add_frag:                         ; @hns3_add_frag
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	cbz	w3, LBB0_2
; %bb.1:
	ldp	w8, w9, [x19]
	add	w8, w8, w9
	sub	w8, w8, #1
	sdiv	w10, w8, w9
	msub	w8, w10, w9, w8
	ldr	x9, [x19, #48]
	add	x8, x9, w8, sxtw #3
	add	x8, x8, #4
	b	LBB0_3
LBB0_2:
	add	x8, x1, #4
LBB0_3:
	ldr	x23, [x2]
	ldr	w0, [x8]
	bl	_le32_to_cpu
	mov	x20, x0
Lloh0:
	adrp	x24, _HNS3_RXD_FE_B@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HNS3_RXD_FE_B@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_5
LBB0_4:
	mov	w0, #0
	b	LBB0_18
LBB0_5:
Lloh2:
	adrp	x25, _HNS3_RXD_VLD_B@GOTPAGE
Lloh3:
	ldr	x25, [x25, _HNS3_RXD_VLD_B@GOTPAGEOFF]
	mov	x21, x23
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	x4, x27, x28, lsl #2
	ldr	x1, [x19, #8]
	add	x8, x1, #1
	str	x8, [x19, #8]
	mov	x0, x21
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x19
	mov	w3, #0
	bl	_hns3_nic_reuse_page
Lloh4:
	adrp	x8, _next_to_clean@GOTPAGE
Lloh5:
	ldr	x8, [x8, _next_to_clean@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ring_ptr_move_fw
	ldr	w8, [x19, #16]
	add	w8, w8, #1
	str	w8, [x19, #16]
	ldr	w0, [x24]
	bl	_BIT
	tst	w0, w20
	b.ne	LBB0_4
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldrsw	x28, [x19]
	ldp	x27, x26, [x19, #40]
	add	x8, x26, x28, lsl #3
	ldr	w0, [x8, #4]
	bl	_le32_to_cpu
	mov	x20, x0
	bl	_dma_rmb
	ldr	w0, [x25]
	bl	_BIT
	tst	w0, w20
	b.eq	LBB0_17
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x19, #8]
Lloh7:
	adrp	x9, _MAX_SKB_FRAGS@GOTPAGE
Lloh8:
	ldr	x9, [x9, _MAX_SKB_FRAGS@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ge
	bl	_unlikely
	cbz	x0, LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x19, #32]
Lloh10:
	adrp	x8, _HNS3_RX_HEAD_SIZE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _HNS3_RX_HEAD_SIZE@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	bl	_napi_alloc_skb
	mov	x22, x0
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_16
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	str	xzr, [x19, #8]
	ldr	x8, [x19, #24]
	cbz	x8, LBB0_13
; %bb.11:                               ;   in Loop: Header=BB0_7 Depth=1
	str	x22, [x8, #16]
	b	LBB0_14
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x22, [x19, #24]
	cbnz	x22, LBB0_15
	b	LBB0_6
LBB0_13:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x21
	bl	_skb_shinfo
	str	x22, [x0]
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
	str	x22, [x19, #24]
	cbz	x22, LBB0_6
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_hns3_buf_size
	ldr	w8, [x23, #8]
	add	w8, w8, w0
	str	w8, [x23, #8]
	lsl	x21, x28, #3
	ldr	w0, [x26, x21]
	bl	_le16_to_cpu
	ldr	w8, [x23, #4]
	add	w8, w8, w0
	str	w8, [x23, #4]
	ldr	w0, [x26, x21]
	bl	_le16_to_cpu
	ldr	w8, [x23]
	add	w8, w8, w0
	str	w8, [x23]
	ldr	x21, [x19, #24]
	b	LBB0_6
LBB0_16:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	bl	_hns3_rl_err
LBB0_17:
Lloh15:
	adrp	x8, _ENXIO@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_18:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_HNS3_RXD_FE_B,4,2              ; @HNS3_RXD_FE_B
	.comm	_HNS3_RXD_VLD_B,4,2             ; @HNS3_RXD_VLD_B
	.comm	_ENXIO,4,2                      ; @ENXIO
	.comm	_MAX_SKB_FRAGS,8,3              ; @MAX_SKB_FRAGS
	.comm	_HNS3_RX_HEAD_SIZE,4,2          ; @HNS3_RX_HEAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc rx fraglist skb fail\n"

	.comm	_next_to_clean,4,2              ; @next_to_clean
	.no_dead_strip	_hns3_add_frag
.subsections_via_symbols
