	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mlxsw_sp_router_fib4_add
_mlxsw_sp_router_fib4_add:              ## @mlxsw_sp_router_fib4_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
	movq	8(%rdi), %rax
	xorl	%r15d, %r15d
	cmpq	$0, (%rax)
	je	LBB0_1
LBB0_7:
	movl	%r15d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	%ecx, %r13d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rsi), %r8d
	movl	8(%rsi), %esi
	leaq	4(%r14), %rdx
	movq	_MLXSW_SP_L3_PROTO_IPV4@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	movl	$4, %ecx
	callq	_mlxsw_sp_fib_node_get
	movq	%rax, %r12
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_2
## %bb.8:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_dev_warn
	movq	%r12, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
LBB0_2:
	movq	%rbx, %rdi
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_mlxsw_sp_fib4_entry_create
	movq	%rax, %r14
	movq	%rax, %rdi
	callq	_IS_ERR
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_warn
	movq	%r14, %rdi
	callq	_PTR_ERR
	movl	%eax, %r15d
	jmp	LBB0_6
LBB0_4:
	movq	%rbx, %rdi
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rsi
	movl	-44(%rbp), %r12d                ## 4-byte Reload
	movl	%r12d, %edx
	movl	%r13d, %ecx
	callq	_mlxsw_sp_fib4_node_entry_link
	testl	%eax, %eax
	je	LBB0_9
## %bb.5:
	movl	%eax, %r14d
	movq	(%rbx), %rax
	movl	(%rax), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_dev_warn
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlxsw_sp_fib4_entry_destroy
	movl	%r14d, %r15d
LBB0_6:
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_mlxsw_sp_fib_node_put
	jmp	LBB0_7
LBB0_9:
	movq	%rbx, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movl	%r12d, %edx
	callq	_mlxsw_sp_fib4_entry_replace
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_MLXSW_SP_L3_PROTO_IPV4,4,2     ## @MLXSW_SP_L3_PROTO_IPV4
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Failed to get FIB node\n"

L_.str.1:                               ## @.str.1
	.asciz	"Failed to create FIB entry\n"

L_.str.2:                               ## @.str.2
	.asciz	"Failed to link FIB entry to node\n"

	.no_dead_strip	_mlxsw_sp_router_fib4_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_fib4_add
_mlxsw_sp_router_fib4_add:              ; @mlxsw_sp_router_fib4_add
	.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
	ldr	x8, [x0, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	w22, #0
LBB0_2:
	mov	x0, x22
	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_3:
	mov	x22, x3
	mov	x21, x2
	mov	x23, x1
	mov	x19, x0
	ldr	w1, [x1, #8]
	add	x2, x23, #4
	ldr	w4, [x23]
Lloh0:
	adrp	x8, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MLXSW_SP_L3_PROTO_IPV4@GOTPAGEOFF]
Lloh2:
	ldr	w5, [x8]
	mov	w3, #4
	bl	_mlxsw_sp_fib_node_get
	mov	x20, x0
	bl	_IS_ERR
	cbz	x0, LBB0_5
; %bb.4:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_warn
	mov	x0, x20
	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
	b	_PTR_ERR
LBB0_5:
	mov	x0, x19
	mov	x1, x20
	mov	x2, x23
	bl	_mlxsw_sp_fib4_entry_create
	mov	x23, x0
	bl	_IS_ERR
	cbz	x0, LBB0_7
; %bb.6:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_warn
	mov	x0, x23
	bl	_PTR_ERR
	mov	x22, x0
	b	LBB0_9
LBB0_7:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	mov	x3, x22
	bl	_mlxsw_sp_fib4_node_entry_link
	mov	x22, x0
	cbz	w0, LBB0_10
; %bb.8:
	ldr	x8, [x19]
	ldr	w0, [x8]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_dev_warn
	mov	x0, x19
	mov	x1, x23
	bl	_mlxsw_sp_fib4_entry_destroy
LBB0_9:
	mov	x0, x19
	mov	x1, x20
	bl	_mlxsw_sp_fib_node_put
	b	LBB0_2
LBB0_10:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x21
	bl	_mlxsw_sp_fib4_entry_replace
	b	LBB0_2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MLXSW_SP_L3_PROTO_IPV4,4,2     ; @MLXSW_SP_L3_PROTO_IPV4
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Failed to get FIB node\n"

l_.str.1:                               ; @.str.1
	.asciz	"Failed to create FIB entry\n"

l_.str.2:                               ; @.str.2
	.asciz	"Failed to link FIB entry to node\n"

	.no_dead_strip	_mlxsw_sp_router_fib4_add
.subsections_via_symbols
