	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_sb_pool_set           ## -- Begin function mlxsw_sp_sb_pool_set
	.p2align	4, 0x90
_mlxsw_sp_sb_pool_set:                  ## @mlxsw_sp_sb_pool_set
	.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	%r9, %r12
	movl	%r8d, -44(%rbp)                 ## 4-byte Spill
	movq	%rcx, %r13
	movq	%rdx, %r15
	callq	_mlxsw_core_driver_priv
	movq	%rax, %rbx
	movq	%rax, %rdi
	movq	%r13, %rsi
	callq	_mlxsw_sp_bytes_cells
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	8(%rbx), %rax
	movq	(%rax), %r14
	movl	(%rbx), %edi
	movq	_MAX_BUFFER_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_MLXSW_CORE_RES_GET
	cmpq	%r13, %rax
	jge	LBB0_3
## %bb.1:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_2
LBB0_3:
	movq	%r15, %rax
	shlq	$5, %rax
	cmpq	$0, 24(%r14,%rax)
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	je	LBB0_6
## %bb.4:
	cmpl	%edx, (%r14,%rax)
	jne	LBB0_5
LBB0_6:
	cmpq	$0, 16(%r14,%rax)
	je	LBB0_9
## %bb.7:
	cmpq	%r13, 8(%r14,%rax)
	jne	LBB0_8
LBB0_9:
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	xorl	%r8d, %r8d
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_mlxsw_sp_sb_pr_write           ## TAILCALL
LBB0_5:
	leaq	L_.str.1(%rip), %rsi
	jmp	LBB0_2
LBB0_8:
	leaq	L_.str.2(%rip), %rsi
LBB0_2:
	movq	%r12, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_BUFFER_SIZE,4,2            ## @MAX_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Exceeded shared buffer size"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"Changing this pool's threshold type is forbidden"

L_.str.2:                               ## @.str.2
	.asciz	"Changing this pool's size is forbidden"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_mlxsw_sp_sb_pool_set           ; -- Begin function mlxsw_sp_sb_pool_set
	.p2align	2
_mlxsw_sp_sb_pool_set:                  ; @mlxsw_sp_sb_pool_set
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x5
	mov	x20, x4
	mov	x22, x3
	mov	x21, x2
	bl	_mlxsw_core_driver_priv
	mov	x23, x0
	mov	x1, x22
	bl	_mlxsw_sp_bytes_cells
	mov	x24, x0
	ldr	x8, [x23, #8]
	ldr	x25, [x8]
	ldr	w0, [x23]
Lloh0:
	adrp	x8, _MAX_BUFFER_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_BUFFER_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_MLXSW_CORE_RES_GET
	cmp	x0, x22
	b.ge	LBB0_2
; %bb.1:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_9
LBB0_2:
	add	x8, x25, x21, lsl #5
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_4
; %bb.3:
	lsl	x9, x21, #5
	ldr	w9, [x25, x9]
	cmp	w9, w20
	b.ne	LBB0_7
LBB0_4:
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_6
; %bb.5:
	add	x8, x25, x21, lsl #5
	ldr	x8, [x8, #8]
	cmp	x8, x22
	b.ne	LBB0_8
LBB0_6:
	mov	x0, x23
	mov	x1, x21
	mov	x2, x20
	mov	x3, x24
	mov	w4, #0
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_mlxsw_sp_sb_pr_write
LBB0_7:
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	b	LBB0_9
LBB0_8:
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
LBB0_9:
	mov	x0, x19
	bl	_NL_SET_ERR_MSG_MOD
Lloh9:
	adrp	x8, _EINVAL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_BUFFER_SIZE,4,2            ; @MAX_BUFFER_SIZE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Exceeded shared buffer size"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"Changing this pool's threshold type is forbidden"

l_.str.2:                               ; @.str.2
	.asciz	"Changing this pool's size is forbidden"

.subsections_via_symbols
