	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function hns3_check_ringparam
_hns3_check_ringparam:                  ## @hns3_check_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	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %r14
	movq	%rdi, %rbx
	callq	_hns3_nic_resetting
	testq	%rax, %rax
	je	LBB0_2
## %bb.1:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	jmp	LBB0_10
LBB0_2:
	cmpq	$0, 24(%r14)
	jne	LBB0_9
## %bb.3:
	cmpq	$0, 16(%r14)
	jne	LBB0_9
## %bb.4:
	movq	(%r14), %rax
	movq	_HNS3_RING_MAX_PENDING@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	_HNS3_RING_MIN_PENDING@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	%rcx, %rax
	jg	LBB0_8
## %bb.5:
	cmpq	%rdx, %rax
	jl	LBB0_8
## %bb.6:
	movq	8(%r14), %rsi
	cmpq	%rcx, %rsi
	jg	LBB0_8
## %bb.7:
	xorl	%eax, %eax
	cmpq	%rdx, %rsi
	jge	LBB0_11
LBB0_8:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_netdev_err
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_10:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_11:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_HNS3_RING_MAX_PENDING,8,3      ## @HNS3_RING_MAX_PENDING
	.comm	_HNS3_RING_MIN_PENDING,8,3      ## @HNS3_RING_MIN_PENDING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Queue depth out of range [%d-%d]\n"

	.no_dead_strip	_hns3_check_ringparam
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function hns3_check_ringparam
_hns3_check_ringparam:                  ; @hns3_check_ringparam
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	bl	_hns3_nic_resetting
	cbz	x0, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EBUSY@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_8
LBB0_2:
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_7
; %bb.3:
	ldr	x8, [x20, #16]
	cbnz	x8, LBB0_7
; %bb.4:
	ldr	x8, [x20]
Lloh2:
	adrp	x9, _HNS3_RING_MAX_PENDING@GOTPAGE
Lloh3:
	ldr	x9, [x9, _HNS3_RING_MAX_PENDING@GOTPAGEOFF]
Lloh4:
	ldr	x3, [x9]
Lloh5:
	adrp	x9, _HNS3_RING_MIN_PENDING@GOTPAGE
Lloh6:
	ldr	x9, [x9, _HNS3_RING_MIN_PENDING@GOTPAGEOFF]
Lloh7:
	ldr	x2, [x9]
	cmp	x8, x3
	ccmp	x8, x2, #8, le
	b.lt	LBB0_6
; %bb.5:
	ldr	x8, [x20, #8]
	cmp	x8, x3
	ccmp	x8, x2, #8, le
	b.ge	LBB0_10
LBB0_6:
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_netdev_err
LBB0_7:
Lloh10:
	adrp	x8, _EINVAL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_10:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_HNS3_RING_MAX_PENDING,8,3      ; @HNS3_RING_MAX_PENDING
	.comm	_HNS3_RING_MIN_PENDING,8,3      ; @HNS3_RING_MIN_PENDING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Queue depth out of range [%d-%d]\n"

	.no_dead_strip	_hns3_check_ringparam
.subsections_via_symbols
