	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_sb_threshold_in
_mlxsw_sp_sb_threshold_in:              ## @mlxsw_sp_sb_threshold_in
	.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	%r8, %r14
	movq	%rcx, %r15
	movl	%edx, %r12d
	movq	%rdi, %rbx
	callq	_mlxsw_sp_sb_pr_get
	movq	(%rax), %rax
	movq	_MLXSW_REG_SBPR_MODE_DYNAMIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_5
## %bb.1:
	movq	_MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET@GOTPCREL(%rip), %rax
	addl	(%rax), %r12d
	movq	_MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jl	LBB0_4
## %bb.2:
	movq	_MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r12d
	jg	LBB0_4
## %bb.3:
	movl	%r12d, (%r15)
	jmp	LBB0_6
LBB0_5:
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_mlxsw_sp_bytes_cells
	movl	%eax, (%r15)
LBB0_6:
	xorl	%eax, %eax
	jmp	LBB0_7
LBB0_4:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_7:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_REG_SBPR_MODE_DYNAMIC,8,3 ## @MLXSW_REG_SBPR_MODE_DYNAMIC
	.comm	_MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET,4,2 ## @MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET
	.comm	_MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN,4,2 ## @MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN
	.comm	_MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX,4,2 ## @MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Invalid dynamic threshold value"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_mlxsw_sp_sb_threshold_in
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_sb_threshold_in
_mlxsw_sp_sb_threshold_in:              ; @mlxsw_sp_sb_threshold_in
	.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
	mov	x20, x4
	mov	x19, x3
	mov	x21, x2
	mov	x22, x0
	bl	_mlxsw_sp_sb_pr_get
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _MLXSW_REG_SBPR_MODE_DYNAMIC@GOTPAGE
Lloh1:
	ldr	x9, [x9, _MLXSW_REG_SBPR_MODE_DYNAMIC@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_3
; %bb.1:
Lloh3:
	adrp	x8, _MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
Lloh6:
	adrp	x9, _MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN@GOTPAGE
Lloh7:
	ldr	x9, [x9, _MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
Lloh9:
	adrp	x10, _MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX@GOTPAGE
Lloh10:
	ldr	x10, [x10, _MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	add	w8, w8, w21
	cmp	w8, w9
	ccmp	w8, w10, #0, ge
	b.le	LBB0_4
; %bb.2:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_NL_SET_ERR_MSG_MOD
Lloh14:
	adrp	x8, _EINVAL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh16:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	mov	x0, x22
	mov	x1, x21
	bl	_mlxsw_sp_bytes_cells
	mov	x8, x0
LBB0_4:
	mov	w0, #0
	str	w8, [x19]
LBB0_5:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_REG_SBPR_MODE_DYNAMIC,8,3 ; @MLXSW_REG_SBPR_MODE_DYNAMIC
	.comm	_MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET,4,2 ; @MLXSW_SP_SB_THRESHOLD_TO_ALPHA_OFFSET
	.comm	_MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN,4,2 ; @MLXSW_REG_SBXX_DYN_MAX_BUFF_MIN
	.comm	_MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX,4,2 ; @MLXSW_REG_SBXX_DYN_MAX_BUFF_MAX
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Invalid dynamic threshold value"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_mlxsw_sp_sb_threshold_in
.subsections_via_symbols
