	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_port_pb_init
_mlxsw_sp_port_pb_init:                 ## @mlxsw_sp_port_pb_init
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -80(%rbp)
	movaps	%xmm0, -96(%rbp)
	movq	$0, -64(%rbp)
	movq	_MLXSW_SP_PB_HEADROOM@GOTPCREL(%rip), %rax
	movl	16(%rdi), %ecx
	imull	(%rax), %ecx
	movq	%rsp, -104(%rbp)                ## 8-byte Spill
	movl	%ecx, -96(%rbp)
	movq	_MLXSW_PORT_MAX_MTU@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)
	movq	8(%rdi), %r15
	movq	_MLXSW_REG_PBMC_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movl	(%rbx), %esi
	movq	%r14, %rdi
	movl	$65535, %edx                    ## imm = 0xFFFF
	movl	$32767, %ecx                    ## imm = 0x7FFF
	callq	_mlxsw_reg_pbmc_pack
	leaq	-96(%rbp), %rdi
	callq	_ARRAY_SIZE
	testl	%eax, %eax
	jle	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_MLXSW_SP_PB_UNUSED@GOTPCREL(%rip), %r13
	leaq	-96(%rbp), %r12
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	movq	%r12, %rdi
	callq	_ARRAY_SIZE
	cltq
	cmpq	%rax, %rbx
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	-96(%rbp,%rbx,4), %esi
	movq	%r15, %rdi
	callq	_mlxsw_sp_bytes_cells
	movl	(%r13), %ecx
	cmpq	%rcx, %rbx
	je	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r14, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_mlxsw_reg_pbmc_lossy_buffer_pack
	jmp	LBB0_4
LBB0_5:
	movq	_MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	xorl	%edx, %edx
	callq	_mlxsw_reg_pbmc_lossy_buffer_pack
	movl	(%r15), %ebx
	movq	_pbmc@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	movq	%r14, %rdx
	callq	_mlxsw_reg_write
	movq	-104(%rbp), %rsp                ## 8-byte Reload
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_7
## %bb.6:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_SP_PB_HEADROOM,4,2       ## @MLXSW_SP_PB_HEADROOM
	.comm	_MLXSW_PORT_MAX_MTU,4,2         ## @MLXSW_PORT_MAX_MTU
	.comm	_MLXSW_REG_PBMC_LEN,4,2         ## @MLXSW_REG_PBMC_LEN
	.comm	_MLXSW_SP_PB_UNUSED,4,2         ## @MLXSW_SP_PB_UNUSED
	.comm	_MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX,4,2 ## @MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX
	.comm	_pbmc,4,2                       ## @pbmc
	.no_dead_strip	_mlxsw_sp_port_pb_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_port_pb_init
_mlxsw_sp_port_pb_init:                 ; @mlxsw_sp_port_pb_init
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	sub	sp, sp, #48
	mov	x22, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	movi.2d	v0, #0000000000000000
	stur	q0, [x29, #-76]
	stur	q0, [x29, #-92]
Lloh3:
	adrp	x8, _MLXSW_SP_PB_HEADROOM@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_SP_PB_HEADROOM@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x0, #16]
	mul	w8, w9, w8
	stur	w8, [x29, #-96]
Lloh6:
	adrp	x8, _MLXSW_PORT_MAX_MTU@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLXSW_PORT_MAX_MTU@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stur	w8, [x29, #-60]
	ldr	x19, [x0, #8]
Lloh9:
	adrp	x8, _MLXSW_REG_PBMC_LEN@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MLXSW_REG_PBMC_LEN@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	mov	x9, x8
Lloh12:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh13:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x20, x9, x8
	mov	sp, x20
	ldr	w1, [x0]
	mov	x0, x20
	mov	w2, #65535
	mov	w3, #32767
	bl	_mlxsw_reg_pbmc_pack
	sub	x23, x29, #96
	sub	x0, x29, #96
	bl	_ARRAY_SIZE
	cmp	w0, #1
	b.lt	LBB0_5
; %bb.1:
	mov	x21, #0
Lloh14:
	adrp	x24, _MLXSW_SP_PB_UNUSED@GOTPAGE
Lloh15:
	ldr	x24, [x24, _MLXSW_SP_PB_UNUSED@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x21, x21, #1
	sub	x0, x29, #96
	bl	_ARRAY_SIZE
	cmp	x21, w0, sxtw
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x23, x21, lsl #2]
	mov	x0, x19
	bl	_mlxsw_sp_bytes_cells
	ldr	w8, [x24]
	cmp	x21, x8
	b.eq	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x2, x0
	mov	x0, x20
	mov	x1, x21
	bl	_mlxsw_reg_pbmc_lossy_buffer_pack
	b	LBB0_2
LBB0_5:
Lloh16:
	adrp	x8, _MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
	mov	x0, x20
	mov	w2, #0
	bl	_mlxsw_reg_pbmc_lossy_buffer_pack
	ldr	w19, [x19]
Lloh19:
	adrp	x8, _pbmc@GOTPAGE
Lloh20:
	ldr	x8, [x8, _pbmc@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_mlxsw_reg_write
	mov	sp, x22
	ldur	x8, [x29, #-56]
Lloh22:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh23:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #48
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_SP_PB_HEADROOM,4,2       ; @MLXSW_SP_PB_HEADROOM
	.comm	_MLXSW_PORT_MAX_MTU,4,2         ; @MLXSW_PORT_MAX_MTU
	.comm	_MLXSW_REG_PBMC_LEN,4,2         ; @MLXSW_REG_PBMC_LEN
	.comm	_MLXSW_SP_PB_UNUSED,4,2         ; @MLXSW_SP_PB_UNUSED
	.comm	_MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX,4,2 ; @MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX
	.comm	_pbmc,4,2                       ; @pbmc
	.no_dead_strip	_mlxsw_sp_port_pb_init
.subsections_via_symbols
