	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_vr_create
_mlxsw_sp_vr_create:                    ## @mlxsw_sp_vr_create
	.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	%rdx, %rbx
	movl	%esi, %r15d
	movq	%rdi, %r12
	callq	_mlxsw_sp_vr_find_unused
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r13
	movq	_MLXSW_SP_L3_PROTO_IPV4@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_mlxsw_sp_fib_create
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_3
## %bb.12:
	movq	%r14, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_CAST                       ## TAILCALL
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_NL_SET_ERR_MSG_MOD
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%edi, %edi
	subl	(%rax), %edi
	jmp	LBB0_11
LBB0_3:
	movq	_MLXSW_SP_L3_PROTO_IPV6@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_mlxsw_sp_fib_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_10
LBB0_5:
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	movl	32(%r13), %esi
	movq	_MLXSW_SP_L3_PROTO_IPV4@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rdx
	movq	%r12, %rdi
	callq	_mlxsw_sp_mr_table_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	32(%r13), %esi
	movq	_MLXSW_SP_L3_PROTO_IPV6@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r12, %rdi
	callq	_mlxsw_sp_mr_table_create
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_13
## %bb.8:
	movq	%rbx, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_mlxsw_sp_mr_table_destroy
LBB0_9:
	movq	%r12, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlxsw_sp_fib_destroy
LBB0_10:
	movq	%r12, %rdi
	movq	%r14, %rsi
	callq	_mlxsw_sp_fib_destroy
	movl	%ebx, %edi
LBB0_11:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ERR_PTR                        ## TAILCALL
LBB0_13:
	movq	%r14, 24(%r13)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 16(%r13)
	movq	8(%r13), %rax
	movq	_MLXSW_SP_L3_PROTO_IPV4@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	%rdx, (%rax,%rcx,8)
	movq	8(%r13), %rax
	movq	_MLXSW_SP_L3_PROTO_IPV6@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rbx, (%rax,%rcx,8)
	movl	%r15d, (%r13)
	movq	%r13, %rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Exceeded number of supported virtual routers"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_MLXSW_SP_L3_PROTO_IPV4,8,3     ## @MLXSW_SP_L3_PROTO_IPV4
	.comm	_MLXSW_SP_L3_PROTO_IPV6,8,3     ## @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_vr_create
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mlxsw_sp_vr_create
_mlxsw_sp_vr_create:                    ; @mlxsw_sp_vr_create
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	bl	_mlxsw_sp_vr_find_unused
	cbz	x0, LBB0_3
; %bb.1:
	mov	x22, x0
Lloh0:
	adrp	x26, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGE
Lloh1:
	ldr	x26, [x26, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGEOFF]
	ldr	x2, [x26]
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_fib_create
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_4
; %bb.2:
	mov	x0, x20
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ERR_CAST
LBB0_3:
Lloh2:
	adrp	x1, l_.str@PAGE
Lloh3:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_NL_SET_ERR_MSG_MOD
Lloh4:
	adrp	x8, _EBUSY@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_12
LBB0_4:
Lloh7:
	adrp	x27, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGE
Lloh8:
	ldr	x27, [x27, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGEOFF]
	ldr	x2, [x27]
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_fib_create
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_6
; %bb.5:
	mov	x0, x23
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_11
LBB0_6:
	ldr	w1, [x22, #32]
	ldr	x2, [x26]
	mov	x0, x19
	bl	_mlxsw_sp_mr_table_create
	mov	x24, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x24
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_10
LBB0_8:
	ldr	w1, [x22, #32]
	ldr	x2, [x27]
	mov	x0, x19
	bl	_mlxsw_sp_mr_table_create
	mov	x25, x0
	bl	_IS_ERR
	cbz	x0, LBB0_13
; %bb.9:
	mov	x0, x25
	bl	_PTR_ERR
	mov	x21, x0
	mov	x0, x24
	bl	_mlxsw_sp_mr_table_destroy
LBB0_10:
	mov	x0, x19
	mov	x1, x23
	bl	_mlxsw_sp_fib_destroy
LBB0_11:
	mov	x0, x19
	mov	x1, x20
	bl	_mlxsw_sp_fib_destroy
	mov	x0, x21
LBB0_12:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	b	_ERR_PTR
LBB0_13:
	stp	x23, x20, [x22, #16]
	ldr	x8, [x22, #8]
	ldr	x9, [x26]
	str	x24, [x8, x9, lsl #3]
	ldr	x8, [x22, #8]
	ldr	x9, [x27]
	str	x25, [x8, x9, lsl #3]
	str	w21, [x22]
	mov	x0, x22
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Exceeded number of supported virtual routers"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_MLXSW_SP_L3_PROTO_IPV4,8,3     ; @MLXSW_SP_L3_PROTO_IPV4
	.comm	_MLXSW_SP_L3_PROTO_IPV6,8,3     ; @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_vr_create
.subsections_via_symbols
