	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __mlxsw_sp_router_init
___mlxsw_sp_router_init:                ## @__mlxsw_sp_router_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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	_init_net@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_MLXSW_REG_RGCR_LEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	movl	(%r14), %edi
	movq	_MAX_RIFS@GOTPCREL(%rip), %r12
	movl	(%r12), %esi
	callq	_MLXSW_CORE_RES_VALID
	testl	%eax, %eax
	je	LBB0_1
## %bb.2:
	movl	(%r14), %edi
	movl	(%r12), %esi
	callq	_MLXSW_CORE_RES_GET
	movl	%eax, %r12d
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	$1, %edx
	callq	_mlxsw_reg_rgcr_pack
	movq	%rbx, %rdi
	movl	%r12d, %esi
	callq	_mlxsw_reg_rgcr_max_router_interfaces_set
	movq	%rbx, %rdi
	movl	%r15d, %esi
	callq	_mlxsw_reg_rgcr_usp_set
	movl	(%r14), %r14d
	movq	_rgcr@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_MLXSW_REG
	movl	%r14d, %edi
	movl	%eax, %esi
	movq	%rbx, %rdx
	callq	_mlxsw_reg_write
	jmp	LBB0_3
LBB0_1:
	movq	_EIO@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_5
## %bb.4:
	leaq	-32(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_init_net,4,2                   ## @init_net
	.comm	_MLXSW_REG_RGCR_LEN,4,2         ## @MLXSW_REG_RGCR_LEN
	.comm	_MAX_RIFS,4,2                   ## @MAX_RIFS
	.comm	_EIO,4,2                        ## @EIO
	.comm	_rgcr,4,2                       ## @rgcr
	.no_dead_strip	___mlxsw_sp_router_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_router_init
___mlxsw_sp_router_init:                ; @__mlxsw_sp_router_init
	.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
	sub	sp, sp, #16
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
Lloh3:
	adrp	x8, _init_net@GOTPAGE
Lloh4:
	ldr	x8, [x8, _init_net@GOTPAGEOFF]
Lloh5:
	ldr	w21, [x8]
Lloh6:
	adrp	x8, _MLXSW_REG_RGCR_LEN@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MLXSW_REG_RGCR_LEN@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	mov	x9, x8
Lloh9:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh10:
	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	w0, [x0]
Lloh11:
	adrp	x22, _MAX_RIFS@GOTPAGE
Lloh12:
	ldr	x22, [x22, _MAX_RIFS@GOTPAGEOFF]
	ldr	w1, [x22]
	bl	_MLXSW_CORE_RES_VALID
	cbz	w0, LBB0_2
; %bb.1:
	ldr	w0, [x19]
	ldr	w1, [x22]
	bl	_MLXSW_CORE_RES_GET
	mov	x22, x0
	mov	x0, x20
	mov	w1, #1
	mov	w2, #1
	bl	_mlxsw_reg_rgcr_pack
	mov	x0, x20
	mov	x1, x22
	bl	_mlxsw_reg_rgcr_max_router_interfaces_set
	mov	x0, x20
	mov	x1, x21
	bl	_mlxsw_reg_rgcr_usp_set
	ldr	w19, [x19]
Lloh13:
	adrp	x8, _rgcr@GOTPAGE
Lloh14:
	ldr	x8, [x8, _rgcr@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	bl	_MLXSW_REG
	mov	x1, x0
	mov	x0, x19
	mov	x2, x20
	bl	_mlxsw_reg_write
	b	LBB0_3
LBB0_2:
Lloh16:
	adrp	x8, _EIO@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh19:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh20:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	sub	sp, x29, #32
	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
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_init_net,4,2                   ; @init_net
	.comm	_MLXSW_REG_RGCR_LEN,4,2         ; @MLXSW_REG_RGCR_LEN
	.comm	_MAX_RIFS,4,2                   ; @MAX_RIFS
	.comm	_EIO,4,2                        ; @EIO
	.comm	_rgcr,4,2                       ; @rgcr
	.no_dead_strip	___mlxsw_sp_router_init
.subsections_via_symbols
