	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function cache_add_sw_link
_cache_add_sw_link:                     ## @cache_add_sw_link
	.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	%rcx, %r14
	movq	%rdx, %r15
	movq	%rsi, %r13
	movq	%rdi, %r12
	movq	8(%rsi), %rdi
	xorl	%esi, %esi
	callq	_osm_node_get_base_lid
	movl	%eax, %edi
	callq	_cl_ntoh16
	movq	%rax, %rbx
	movl	(%r12), %edi
	callq	_OSM_LOG_ENTER
	testq	%r15, %r15
	je	LBB0_14
## %bb.1:
	testq	%rbx, %rbx
	je	LBB0_14
## %bb.2:
	movq	(%r13), %r8
	testq	%r8, %r8
	je	LBB0_14
## %bb.3:
	movl	(%r12), %edi
	movq	_OSM_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	testq	%r14, %r14
	leaq	L_.str.2(%rip), %rax
	leaq	L_.str.1(%rip), %rcx
	cmoveq	%rax, %rcx
	movq	%rcx, (%rsp)
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rcx
	movq	%r15, %r9
	xorl	%eax, %eax
	callq	_OSM_LOG
	movq	%r12, %rdi
	movq	%rbx, %rsi
	callq	_cache_get_sw
	movq	%rax, %r14
	testq	%rax, %rax
	jne	LBB0_8
## %bb.4:
	movq	8(%r13), %rax
	movq	(%rax), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_cache_sw_new
	testq	%rax, %rax
	je	LBB0_5
## %bb.7:
	movq	%rax, %r14
	leaq	4(%r12), %rdi
	movq	%rax, %rdx
	addq	$16, %rdx
	movq	%rbx, %rsi
	callq	_cl_qmap_insert
LBB0_8:
	movq	(%r13), %rax
	cmpq	(%r14), %rax
	jae	LBB0_9
## %bb.10:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	%r14, %rdi
	callq	_cache_sw_set_leaf
	movq	(%r13), %rax
LBB0_12:
	movq	8(%r14), %rcx
	shlq	$4, %rax
	cmpq	$0, (%rcx,%rax)
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	jne	LBB0_14
## %bb.13:
	leaq	(%rcx,%rax), %rdx
	movq	%r15, (%rdx)
	movq	%rsi, 8(%rcx,%rax)
	jmp	LBB0_14
LBB0_9:
	movl	(%r12), %edi
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
	jmp	LBB0_6
LBB0_5:
	movl	(%r12), %edi
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
LBB0_6:
	xorl	%eax, %eax
	callq	_OSM_LOG
	movq	%r12, %rdi
	callq	_osm_ucast_cache_invalidate
LBB0_14:
	movl	(%r12), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_OSM_LOG_EXIT                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_OSM_LOG_DEBUG,4,2              ## @OSM_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Caching switch port: lid %u [port %u] -> lid %u (%s)\n"

L_.str.1:                               ## @.str.1
	.asciz	"CA/RTR"

L_.str.2:                               ## @.str.2
	.asciz	"SW"

	.comm	_OSM_LOG_ERROR,4,2              ## @OSM_LOG_ERROR
L_.str.3:                               ## @.str.3
	.asciz	"ERR AD01: Out of memory - cache is invalid\n"

L_.str.4:                               ## @.str.4
	.asciz	"ERR AD02: Wrong switch? - cache is invalid\n"

	.no_dead_strip	_cache_add_sw_link
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function cache_add_sw_link
_cache_add_sw_link:                     ; @cache_add_sw_link
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	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
	mov	x20, x3
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x0, [x1, #8]
	mov	w1, #0
	bl	_osm_node_get_base_lid
	bl	_cl_ntoh16
	mov	x23, x0
	ldr	w0, [x19]
	bl	_OSM_LOG_ENTER
	cbz	x21, LBB0_14
; %bb.1:
	cbz	x23, LBB0_14
; %bb.2:
	ldr	x8, [x22]
	cbz	x8, LBB0_14
; %bb.3:
	ldr	w0, [x19]
Lloh0:
	adrp	x9, _OSM_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OSM_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
Lloh3:
	adrp	x9, l_.str.1@PAGE
Lloh4:
	add	x9, x9, l_.str.1@PAGEOFF
Lloh5:
	adrp	x10, l_.str.2@PAGE
Lloh6:
	add	x10, x10, l_.str.2@PAGEOFF
	cmp	x20, #0
	csel	x9, x10, x9, eq
	stp	x21, x9, [sp, #16]
	stp	x23, x8, [sp]
Lloh7:
	adrp	x2, l_.str@PAGE
Lloh8:
	add	x2, x2, l_.str@PAGEOFF
	bl	_OSM_LOG
	mov	x0, x19
	mov	x1, x23
	bl	_cache_get_sw
	mov	x24, x0
	cbnz	x0, LBB0_6
; %bb.4:
	ldr	x8, [x22, #8]
	ldr	x8, [x8]
	ldr	w1, [x8]
	mov	x0, x23
	bl	_cache_sw_new
	cbz	x0, LBB0_12
; %bb.5:
	mov	x24, x0
	add	x0, x19, #4
	add	x2, x24, #16
	mov	x1, x23
	bl	_cl_qmap_insert
LBB0_6:
	ldr	x8, [x22]
	ldr	x9, [x24]
	cmp	x8, x9
	b.hs	LBB0_11
; %bb.7:
	cbz	x20, LBB0_9
; %bb.8:
	mov	x0, x24
	bl	_cache_sw_set_leaf
	ldr	x8, [x22]
LBB0_9:
	ldr	x9, [x24, #8]
	add	x8, x9, x8, lsl #4
	ldr	x9, [x8]
	cbnz	x9, LBB0_14
; %bb.10:
	stp	x21, x20, [x8]
	b	LBB0_14
LBB0_11:
	ldr	w0, [x19]
Lloh9:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str.4@PAGE
Lloh13:
	add	x2, x2, l_.str.4@PAGEOFF
	b	LBB0_13
LBB0_12:
	ldr	w0, [x19]
Lloh14:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh15:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
Lloh17:
	adrp	x2, l_.str.3@PAGE
Lloh18:
	add	x2, x2, l_.str.3@PAGEOFF
LBB0_13:
	bl	_OSM_LOG
	mov	x0, x19
	bl	_osm_ucast_cache_invalidate
LBB0_14:
	ldr	w0, [x19]
	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
	add	sp, sp, #96
	b	_OSM_LOG_EXIT
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_OSM_LOG_DEBUG,4,2              ; @OSM_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Caching switch port: lid %u [port %u] -> lid %u (%s)\n"

l_.str.1:                               ; @.str.1
	.asciz	"CA/RTR"

l_.str.2:                               ; @.str.2
	.asciz	"SW"

	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
l_.str.3:                               ; @.str.3
	.asciz	"ERR AD01: Out of memory - cache is invalid\n"

l_.str.4:                               ; @.str.4
	.asciz	"ERR AD02: Wrong switch? - cache is invalid\n"

	.no_dead_strip	_cache_add_sw_link
.subsections_via_symbols
