	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_alloc_skb
_hns3_alloc_skb:                        ## @hns3_alloc_skb
	.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	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	72(%rdi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	56(%rdi), %rdi
	movq	64(%r15), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	movq	_HNS3_RX_HEAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_napi_alloc_skb
	movq	%rax, %r12
	movq	%rax, 48(%r15)
	xorl	%edi, %edi
	testq	%rax, %rax
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_hns3_rl_err
	leaq	24(%r15), %rbx
	movq	%rbx, %rdi
	callq	_u64_stats_update_begin
	incl	32(%r15)
	movq	%rbx, %rdi
	callq	_u64_stats_update_end
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_8
LBB0_2:
	movq	%rbx, -64(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rax,%rcx,8), %rbx
	movl	(%r12), %edi
	callq	_prefetchw
	movl	$1, 8(%r15)
	movq	$0, 16(%r15)
	movq	$0, 40(%r15)
	movq	_HNS3_RX_HEAD_SIZE@GOTPCREL(%rip), %rax
	cmpl	%r14d, (%rax)
	jae	LBB0_3
## %bb.7:
	leaq	24(%r15), %r14
	movq	%r14, %rdi
	callq	_u64_stats_update_begin
	incl	28(%r15)
	movq	%r14, %rdi
	callq	_u64_stats_update_end
	movq	_HNS3_RX_HEAD_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_eth_get_headlen
	movl	%eax, 12(%r15)
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	___skb_put
	movq	16(%r15), %rsi
	leaq	1(%rsi), %rax
	movq	%rax, 16(%r15)
	movl	12(%r15), %ecx
	movq	%r12, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	movq	%r15, %rdx
	movq	%rbx, %r8
	callq	_hns3_nic_reuse_page
	movq	_next_to_clean@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ring_ptr_move_fw
	movl	$1, %eax
	jmp	LBB0_8
LBB0_3:
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	___skb_put
	movl	%eax, %r12d
	movl	%r14d, %edi
	movl	$8, %esi
	callq	_ALIGN
	movl	%r12d, %edi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	movl	%eax, %edx
	callq	_memcpy
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rax,%rcx,8), %edi
	callq	_page_to_nid
	movq	%rax, %r14
	xorl	%eax, %eax
	callq	_numa_mem_id
	xorl	%edi, %edi
	cmpq	%rax, %r14
	sete	%dil
	callq	_likely
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	$1, (%rbx)
	jmp	LBB0_6
LBB0_5:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	movl	4(%rax,%rcx,8), %edi
	callq	_put_page
LBB0_6:
	movq	_next_to_clean@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_ring_ptr_move_fw
	xorl	%eax, %eax
LBB0_8:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HNS3_RX_HEAD_SIZE,4,2          ## @HNS3_RX_HEAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"alloc rx skb fail\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_next_to_clean,4,2              ## @next_to_clean
	.comm	_HNS3_NEED_ADD_FRAG,4,2         ## @HNS3_NEED_ADD_FRAG
	.no_dead_strip	_hns3_alloc_skb
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_alloc_skb
_hns3_alloc_skb:                        ; @hns3_alloc_skb
	.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	x21, x2
	mov	x24, x1
	mov	x19, x0
	ldp	x8, x25, [x0, #64]
	ldr	x26, [x0]
	ldr	x0, [x0, #56]
	ldr	x8, [x8]
	ldr	x23, [x8]
Lloh0:
	adrp	x27, _HNS3_RX_HEAD_SIZE@GOTPAGE
Lloh1:
	ldr	x27, [x27, _HNS3_RX_HEAD_SIZE@GOTPAGEOFF]
	ldr	w1, [x27]
	bl	_napi_alloc_skb
	mov	x22, x0
	str	x0, [x19, #48]
	cmp	x0, #0
	cset	w0, eq
	bl	_unlikely
	cbz	x0, LBB0_2
; %bb.1:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	bl	_hns3_rl_err
	add	x20, x19, #24
	mov	x0, x20
	bl	_u64_stats_update_begin
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	mov	x0, x20
	bl	_u64_stats_update_end
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_2:
	add	x20, x25, x26, lsl #3
	ldr	w0, [x22]
	bl	_prefetchw
	mov	w8, #1
	str	w8, [x19, #8]
	str	xzr, [x19, #16]
	str	xzr, [x19, #40]
	ldr	w8, [x27]
	cmp	w8, w24
	b.hs	LBB0_4
; %bb.3:
	add	x24, x19, #24
	mov	x0, x24
	bl	_u64_stats_update_begin
	ldr	w8, [x19, #28]
	add	w8, w8, #1
	str	w8, [x19, #28]
	mov	x0, x24
	bl	_u64_stats_update_end
	ldr	w2, [x27]
	mov	x0, x23
	mov	x1, x21
	bl	_eth_get_headlen
	mov	x1, x0
	str	w0, [x19, #12]
	mov	x0, x22
	bl	___skb_put
	ldr	x1, [x19, #16]
	add	x8, x1, #1
	str	x8, [x19, #16]
	ldr	w3, [x19, #12]
	mov	x0, x22
                                        ; kill: def $w1 killed $w1 killed $x1
	mov	x2, x19
	mov	x4, x20
	bl	_hns3_nic_reuse_page
Lloh7:
	adrp	x8, _next_to_clean@GOTPAGE
Lloh8:
	ldr	x8, [x8, _next_to_clean@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ring_ptr_move_fw
	mov	w0, #1
	b	LBB0_8
LBB0_4:
	mov	x0, x22
	mov	x1, x24
	bl	___skb_put
	mov	x22, x0
	mov	x0, x24
	mov	w1, #8
	bl	_ALIGN
	mov	x2, x0
	mov	x0, x22
	mov	x1, x21
	bl	_memcpy
	add	x22, x25, x26, lsl #3
	ldr	w0, [x22, #4]!
	bl	_page_to_nid
	mov	x21, x0
	bl	_numa_mem_id
	cmp	x21, x0
	cset	w0, eq
	bl	_likely
	cbz	x0, LBB0_6
; %bb.5:
	mov	w8, #1
	str	w8, [x20]
	b	LBB0_7
LBB0_6:
	ldr	w0, [x22]
	bl	_put_page
LBB0_7:
Lloh10:
	adrp	x8, _next_to_clean@GOTPAGE
Lloh11:
	ldr	x8, [x8, _next_to_clean@GOTPAGEOFF]
Lloh12:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ring_ptr_move_fw
	mov	w0, #0
LBB0_8:
	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 AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_HNS3_RX_HEAD_SIZE,4,2          ; @HNS3_RX_HEAD_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"alloc rx skb fail\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_next_to_clean,4,2              ; @next_to_clean
	.comm	_HNS3_NEED_ADD_FRAG,4,2         ; @HNS3_NEED_ADD_FRAG
	.no_dead_strip	_hns3_alloc_skb
.subsections_via_symbols
