	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns3_init_all_ring             ## -- Begin function hns3_init_all_ring
	.p2align	4, 0x90
_hns3_init_all_ring:                    ## @hns3_init_all_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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	16(%rdi), %rax
	movl	(%rax), %eax
	xorl	%r14d, %r14d
	testl	%eax, %eax
	jle	LBB0_7
## %bb.1:
	movq	%rdi, %r15
	addl	%eax, %eax
	cmpl	$2, %eax
	movl	$1, %r12d
	cmovgel	%eax, %r12d
	negq	%r12
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_hns3_alloc_ring_memory
	testl	%eax, %eax
	jne	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rax
	movq	-8(%rax,%rbx,8), %rdi
	callq	_u64_stats_init
	leaq	(%r12,%rbx), %rax
	incq	%rax
	incq	%rbx
	cmpq	$1, %rax
	jne	LBB0_2
	jmp	LBB0_7
LBB0_3:
	movl	8(%r15), %edi
	leaq	L_.str(%rip), %rsi
	movl	%eax, %edx
	callq	_dev_err
	cmpl	$1, %ebx
	je	LBB0_5
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r15), %rax
	movq	-16(%rax,%rbx,8), %rdi
	callq	_hns3_fini_ring
	decq	%rbx
	cmpq	$1, %rbx
	jg	LBB0_4
LBB0_5:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_7:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Alloc ring memory fail! ret=%d\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_hns3_init_all_ring             ; -- Begin function hns3_init_all_ring
	.p2align	2
_hns3_init_all_ring:                    ; @hns3_init_all_ring
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x8, [x0, #16]
	ldr	w8, [x8]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.1:
	mov	x19, x0
	mov	x20, #0
	lsl	w8, w8, #1
	cmp	w8, #1
	csinc	w21, w8, wzr, gt
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x20, lsl #3]
	bl	_hns3_alloc_ring_memory
	cbnz	w0, LBB0_5
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x20, lsl #3]
	bl	_u64_stats_init
	add	x20, x20, #1
	cmp	x21, x20
	b.ne	LBB0_2
LBB0_4:
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	mov	x2, x0
	ldr	w0, [x19, #8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
	cbz	w20, LBB0_8
; %bb.6:
	sub	x20, x20, #1
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19]
	ldr	x0, [x8, x20, lsl #3]
	bl	_hns3_fini_ring
	add	x8, x20, #1
	sub	x20, x20, #1
	cmp	x8, #1
	b.gt	LBB0_7
LBB0_8:
Lloh2:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Alloc ring memory fail! ret=%d\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
