	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_set_ringparam
_hns3_set_ringparam:                    ## @hns3_set_ringparam
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_netdev_priv
	movq	%rax, %r13
	movq	8(%rax), %r15
	movq	%rbx, %rdi
	callq	_netif_running
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	(%r15), %r15
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_hns3_check_ringparam
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_15
## %bb.1:
	movl	4(%r14), %edi
	movq	_HNS3_RING_BD_MULTIPLE@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_ALIGN
	movq	%r15, %rbx
	movq	%rax, %r15
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_ALIGN
	movq	(%r13), %rdx
	movq	(%rdx), %rcx
	movq	(%rcx), %r14
	movq	(%rdx,%rbx,8), %rcx
	movq	(%rcx), %rbx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	cmpq	%r15, %r14
	jne	LBB0_3
## %bb.2:
	xorl	%r12d, %r12d
	cmpq	%rax, %rbx
	je	LBB0_15
LBB0_3:
	movq	%rax, %r12
	movq	%r13, %rdi
	callq	_hns3_backup_ringparam
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rcx
	movq	-72(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	%r14, -88(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdx
	movq	%rcx, %r14
	movq	-80(%rbp), %r8                  ## 8-byte Reload
	movq	%r12, %r9
	callq	_netdev_info
	movl	-44(%rbp), %r15d                ## 4-byte Reload
	testl	%r15d, %r15d
	je	LBB0_7
## %bb.6:
	movq	(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
LBB0_7:
	movq	%r13, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movq	%r12, %rdx
	callq	_hns3_change_all_ring_bd_num
	movq	%r13, %rdi
	callq	_hns3_init_all_ring
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_8
## %bb.11:
	leaq	L_.str.2(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r12d, %edx
	xorl	%eax, %eax
	callq	_netdev_err
	movq	%r13, %rdi
	movq	-88(%rbp), %rsi                 ## 8-byte Reload
	movq	%r14, %rdx
	callq	_hns3_change_all_ring_bd_num
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	shlq	$1, %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.12:
	xorl	%ebx, %ebx
	movq	-64(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rax
	movq	(%rax,%rbx,8), %rdi
	movq	%r15, %rsi
	movl	$4, %edx
	callq	_memcpy
	incq	%rbx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	addq	%rax, %rax
	addq	$4, %r15
	cmpq	%rbx, %rax
	ja	LBB0_13
	jmp	LBB0_14
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	xorl	%eax, %eax
	callq	_netdev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_15
LBB0_8:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	shlq	$1, %rax
	testq	%rax, %rax
	je	LBB0_14
## %bb.9:
	xorl	%r15d, %r15d
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	callq	_hns3_fini_ring
	incq	%r15
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	addq	%rax, %rax
	addq	$4, %rbx
	cmpq	%r15, %rax
	ja	LBB0_10
LBB0_14:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_kfree
	cmpl	$0, -44(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_15
## %bb.16:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	(%rdi), %rax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*(%rax)                         ## TAILCALL
LBB0_15:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_HNS3_RING_BD_MULTIPLE,4,2      ## @HNS3_RING_BD_MULTIPLE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"backup ring param failed by allocating memory fail\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"Changing Tx/Rx ring depth from %d/%d to %d/%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"Change bd num fail, revert to old value(%d)\n"

	.no_dead_strip	_hns3_set_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_set_ringparam
_hns3_set_ringparam:                    ; @hns3_set_ringparam
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x22, x1
	mov	x19, x0
	bl	_netdev_priv
	mov	x21, x0
	ldr	x27, [x0, #8]
	mov	x0, x19
	bl	_netif_running
	mov	x20, x0
	ldr	x25, [x27]
	mov	x0, x19
	mov	x1, x22
	bl	_hns3_check_ringparam
	mov	x23, x0
	cbnz	w0, LBB0_16
; %bb.1:
	ldr	w0, [x22, #4]
Lloh0:
	adrp	x24, _HNS3_RING_BD_MULTIPLE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _HNS3_RING_BD_MULTIPLE@GOTPAGEOFF]
	ldr	w1, [x24]
	bl	_ALIGN
	mov	x23, x0
	ldr	w0, [x22]
	ldr	w1, [x24]
	bl	_ALIGN
	ldr	x8, [x21]
	ldr	x9, [x8]
	ldr	x24, [x9]
	ldr	x8, [x8, x25, lsl #3]
	ldr	x25, [x8]
	cmp	x24, x23
	ccmp	x25, x0, #0, eq
	b.eq	LBB0_9
; %bb.2:
	mov	x26, x0
	mov	x0, x21
	bl	_hns3_backup_ringparam
	cbz	x0, LBB0_10
; %bb.3:
	mov	x22, x0
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	mov	x2, x24
	mov	x3, x25
	mov	x4, x23
	mov	x5, x26
	bl	_netdev_info
	cbz	w20, LBB0_5
; %bb.4:
	ldr	x8, [x19]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
LBB0_5:
	mov	x0, x21
	mov	x1, x23
	mov	x2, x26
	bl	_hns3_change_all_ring_bd_num
	mov	x0, x21
	bl	_hns3_init_all_ring
	mov	x23, x0
	cbz	w0, LBB0_11
; %bb.6:
	str	x23, [sp]
Lloh4:
	adrp	x1, l_.str.2@PAGE
Lloh5:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
	mov	x0, x21
	mov	x1, x24
	mov	x2, x25
	bl	_hns3_change_all_ring_bd_num
	ldr	x8, [x27]
	tst	x8, #0x7fffffffffffffff
	b.eq	LBB0_14
; %bb.7:
	mov	x25, #0
	mov	x24, x22
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	x0, [x8, x25, lsl #3]
	mov	x1, x24
	mov	w2, #4
	bl	_memcpy
	add	x25, x25, #1
	ldr	x8, [x27]
	add	x24, x24, #4
	cmp	x25, x8, lsl #1
	b.lo	LBB0_8
	b	LBB0_14
LBB0_9:
	mov	w23, #0
	b	LBB0_16
LBB0_10:
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w23, w8
	b	LBB0_16
LBB0_11:
	ldr	x8, [x27]
	tst	x8, #0x7fffffffffffffff
	b.eq	LBB0_14
; %bb.12:
	mov	x24, #0
	mov	x21, x22
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_hns3_fini_ring
	add	x24, x24, #1
	ldr	x8, [x27]
	add	x21, x21, #4
	cmp	x24, x8, lsl #1
	b.lo	LBB0_13
LBB0_14:
	mov	x0, x22
	bl	_kfree
	cbz	w20, LBB0_16
; %bb.15:
	ldr	x8, [x19]
	ldr	x1, [x8]
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	br	x1
LBB0_16:
	mov	x0, x23
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpAdd	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_HNS3_RING_BD_MULTIPLE,4,2      ; @HNS3_RING_BD_MULTIPLE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"backup ring param failed by allocating memory fail\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"Changing Tx/Rx ring depth from %d/%d to %d/%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"Change bd num fail, revert to old value(%d)\n"

	.no_dead_strip	_hns3_set_ringparam
.subsections_via_symbols
