	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_router_fib6_add
_mlxsw_sp_router_fib6_add:              ## @mlxsw_sp_router_fib6_add
	.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
	movl	%ecx, -48(%rbp)
	movq	(%rdi), %rax
	xorl	%ebx, %ebx
	cmpq	$0, (%rax)
	jne	LBB0_13
## %bb.1:
	movq	%rsi, %r13
	movq	(%rsi), %r12
	cmpq	$0, 16(%r12)
	je	LBB0_3
## %bb.2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_13
LBB0_3:
	movl	%ecx, %r15d
	movq	%rdi, %r14
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_mlxsw_sp_fib6_rt_should_ignore
	testq	%rax, %rax
	je	LBB0_4
LBB0_13:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	8(%r12), %rax
	movl	(%rax), %esi
	leaq	4(%r12), %rdx
	movl	(%r12), %r8d
	movq	_MLXSW_SP_L3_PROTO_IPV6@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movq	%r14, %rdi
	movl	$4, %ecx
	callq	_mlxsw_sp_fib_node_get
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_5
## %bb.14:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_5:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movl	%r15d, %edx
	callq	_mlxsw_sp_fib6_node_mp_entry_find
	movq	%r14, %rdi
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, %rsi
	movq	%r13, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_mlxsw_sp_fib6_entry_nexthop_add
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_12
	jmp	LBB0_13
LBB0_7:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	%r13, %rdx
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	callq	_mlxsw_sp_fib6_entry_create
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %r12d
	jmp	LBB0_12
LBB0_9:
	leaq	-48(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mlxsw_sp_fib6_node_entry_link
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:
	movl	%eax, %r12d
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mlxsw_sp_fib6_entry_destroy
LBB0_12:
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlxsw_sp_fib_node_put
	movl	%r12d, %ebx
	jmp	LBB0_13
LBB0_10:
	movl	-48(%rbp), %edx
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_mlxsw_sp_fib6_entry_replace
	jmp	LBB0_13
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_MLXSW_SP_L3_PROTO_IPV6,4,2     ## @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_router_fib6_add
.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_fib6_add
_mlxsw_sp_router_fib6_add:              ; @mlxsw_sp_router_fib6_add
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	str	w3, [sp, #12]
	ldr	x8, [x0]
	ldr	x8, [x8]
	cbz	x8, LBB0_2
LBB0_1:
	mov	w21, #0
	b	LBB0_4
LBB0_2:
	mov	x22, x1
	ldr	x24, [x1]
	ldr	x8, [x24, #16]
	cbz	x8, LBB0_5
; %bb.3:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w21, w8
LBB0_4:
	mov	x0, x21
	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
	add	sp, sp, #80
	ret
LBB0_5:
	mov	x23, x3
	mov	x21, x2
	mov	x19, x0
	mov	x0, x24
	bl	_mlxsw_sp_fib6_rt_should_ignore
	cbnz	x0, LBB0_1
; %bb.6:
	ldr	x8, [x24, #8]
	ldr	w1, [x8]
	add	x2, x24, #4
	ldr	w4, [x24]
Lloh3:
	adrp	x8, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MLXSW_SP_L3_PROTO_IPV6@GOTPAGEOFF]
Lloh5:
	ldr	w5, [x8]
	mov	x0, x19
	mov	w3, #4
	bl	_mlxsw_sp_fib_node_get
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_8
; %bb.7:
	mov	x0, x20
	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
	add	sp, sp, #80
	b	_PTR_ERR
LBB0_8:
	mov	x0, x20
	mov	x1, x24
	mov	x2, x23
	bl	_mlxsw_sp_fib6_node_mp_entry_find
	cbz	x0, LBB0_10
; %bb.9:
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	mov	x3, x21
	bl	_mlxsw_sp_fib6_entry_nexthop_add
	mov	x21, x0
	cbnz	w0, LBB0_14
	b	LBB0_4
LBB0_10:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x22
	mov	x3, x21
	bl	_mlxsw_sp_fib6_entry_create
	mov	x22, x0
	bl	_IS_ERR
	cbz	x0, LBB0_12
; %bb.11:
	mov	x0, x22
	bl	_PTR_ERR
	mov	x21, x0
	b	LBB0_14
LBB0_12:
	add	x2, sp, #12
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_fib6_node_entry_link
	mov	x21, x0
	cbz	w0, LBB0_15
; %bb.13:
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_fib6_entry_destroy
LBB0_14:
	mov	x0, x19
	mov	x1, x20
	bl	_mlxsw_sp_fib_node_put
	b	LBB0_4
LBB0_15:
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	x1, x22
	bl	_mlxsw_sp_fib6_entry_replace
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_MLXSW_SP_L3_PROTO_IPV6,4,2     ; @MLXSW_SP_L3_PROTO_IPV6
	.no_dead_strip	_mlxsw_sp_router_fib6_add
.subsections_via_symbols
