	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osm_ucast_cache_add_node       ## -- Begin function osm_ucast_cache_add_node
	.p2align	4, 0x90
_osm_ucast_cache_add_node:              ## @osm_ucast_cache_add_node
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	(%rdi), %edi
	callq	_OSM_LOG_ENTER
	cmpl	$0, 4(%r14)
	je	LBB0_30
## %bb.1:
	movq	%r12, %rdi
	callq	_osm_node_get_type
	movq	_IB_NODE_TYPE_SWITCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_24
## %bb.2:
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_osm_node_get_base_lid
	movl	%eax, %edi
	callq	_cl_ntoh16
	movl	(%r14), %edi
	testl	%eax, %eax
	je	LBB0_3
## %bb.4:
	movl	%eax, %r15d
	movq	_OSM_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_OSM_LOG
	cmpq	$0, (%r12)
	je	LBB0_5
## %bb.8:
	movq	%r12, %rdi
	callq	_osm_node_get_num_physp
	cmpl	$2, %eax
	jl	LBB0_14
## %bb.9:
	movl	%eax, %r13d
	movl	$1, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=1
	incl	%ebx
	cmpl	%ebx, %r13d
	je	LBB0_14
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_osm_node_get_physp_ptr
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_osm_ucast_cache_add_link
	jmp	LBB0_13
LBB0_24:
	movq	%r12, %rdi
	callq	_osm_node_get_num_physp
	cmpl	$2, %eax
	jl	LBB0_30
## %bb.25:
	movl	%eax, %r15d
	movl	$1, %ebx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_29:                                ##   in Loop: Header=BB0_26 Depth=1
	incl	%ebx
	cmpl	%ebx, %r15d
	je	LBB0_30
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_osm_node_get_physp_ptr
	testq	%rax, %rax
	je	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	%rax, %r13
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_29
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	8(%rax), %rdi
	callq	_osm_node_get_type
	xorl	%edi, %edi
	movq	_IB_NODE_TYPE_SWITCH@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	sete	%dil
	callq	_CL_ASSERT
	movq	(%r13), %rsi
	movq	%r14, %rdi
	movq	%r13, %rdx
	callq	_osm_ucast_cache_add_link
	jmp	LBB0_29
LBB0_14:
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_cache_get_sw
	testq	%rax, %rax
	je	LBB0_16
## %bb.15:
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_cache_sw_is_leaf
	testl	%eax, %eax
	je	LBB0_16
## %bb.17:
	movq	_TRUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
	movq	(%r12), %rax
	movq	40(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_19
## %bb.18:
	movq	32(%rax), %rdx
	testq	%rdx, %rdx
	je	LBB0_19
## %bb.20:
	movq	%rcx, 24(%rbx)
	movq	$0, 40(%rax)
	movq	%rdx, 16(%rbx)
	movq	$0, 32(%rax)
	movq	24(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_22
## %bb.21:
	movq	$0, 24(%rax)
	jmp	LBB0_23
LBB0_3:
	movq	_OSM_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	xorl	%eax, %eax
	callq	_OSM_LOG
	jmp	LBB0_7
LBB0_16:
	movl	(%r14), %edi
	movq	_OSM_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.3(%rip), %rdx
	jmp	LBB0_6
LBB0_5:
	movl	(%r14), %edi
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_6
LBB0_19:
	movl	(%r14), %edi
	movq	_OSM_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.4(%rip), %rdx
LBB0_6:
	movl	%r15d, %ecx
	xorl	%eax, %eax
	callq	_OSM_LOG
LBB0_7:
	movq	%r14, %rdi
	callq	_osm_ucast_cache_invalidate
LBB0_30:
	movl	(%r14), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_OSM_LOG_EXIT                   ## TAILCALL
LBB0_22:
	movq	16(%rax), %rcx
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%rax)
LBB0_23:
	movq	%rcx, 8(%rbx)
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	jmp	LBB0_30
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_NODE_TYPE_SWITCH,8,3        ## @IB_NODE_TYPE_SWITCH
	.comm	_OSM_LOG_VERBOSE,4,2            ## @OSM_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Skip caching. Switch dropped before it gets a valid lid.\n"

	.comm	_OSM_LOG_DEBUG,4,2              ## @OSM_LOG_DEBUG
L_.str.1:                               ## @.str.1
	.asciz	"Caching dropped switch lid %u\n"

	.comm	_OSM_LOG_ERROR,4,2              ## @OSM_LOG_ERROR
L_.str.2:                               ## @.str.2
	.asciz	"ERR AD03: no switch info for node lid %u - clearing cache\n"

L_.str.3:                               ## @.str.3
	.asciz	"Dropped non-leaf switch (lid %u)\n"

	.comm	_TRUE,4,2                       ## @TRUE
L_.str.4:                               ## @.str.4
	.asciz	"No LID matrices for switch lid %u\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osm_ucast_cache_add_node       ; -- Begin function osm_ucast_cache_add_node
	.p2align	2
_osm_ucast_cache_add_node:              ; @osm_ucast_cache_add_node
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0]
	bl	_OSM_LOG_ENTER
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_27
; %bb.1:
	mov	x0, x20
	bl	_osm_node_get_type
Lloh0:
	adrp	x24, _IB_NODE_TYPE_SWITCH@GOTPAGE
Lloh1:
	ldr	x24, [x24, _IB_NODE_TYPE_SWITCH@GOTPAGEOFF]
	ldr	x8, [x24]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.2:
	mov	x0, x20
	mov	w1, #0
	bl	_osm_node_get_base_lid
	bl	_cl_ntoh16
	mov	x21, x0
	ldr	w0, [x19]
	cbz	w21, LBB0_22
; %bb.3:
Lloh2:
	adrp	x24, _OSM_LOG_DEBUG@GOTPAGE
Lloh3:
	ldr	x24, [x24, _OSM_LOG_DEBUG@GOTPAGEOFF]
	ldr	w1, [x24]
	str	x21, [sp]
Lloh4:
	adrp	x2, l_.str.1@PAGE
Lloh5:
	add	x2, x2, l_.str.1@PAGEOFF
	bl	_OSM_LOG
	ldr	x8, [x20]
	cbz	x8, LBB0_24
; %bb.4:
	mov	x0, x20
	bl	_osm_node_get_num_physp
	cmp	w0, #2
	b.lt	LBB0_16
; %bb.5:
	mov	x22, x0
	mov	w23, #1
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w23, w23, #1
	cmp	w22, w23
	b.eq	LBB0_16
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	bl	_osm_node_get_physp_ptr
	cbz	x0, LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x1, x0
	ldr	x2, [x0]
	cbz	x2, LBB0_6
; %bb.9:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	bl	_osm_ucast_cache_add_link
	b	LBB0_6
LBB0_10:
	mov	x0, x20
	bl	_osm_node_get_num_physp
	cmp	w0, #2
	b.lt	LBB0_27
; %bb.11:
	mov	x21, x0
	mov	w22, #1
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w22, w22, #1
	cmp	w21, w22
	b.eq	LBB0_27
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_osm_node_get_physp_ptr
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	mov	x23, x0
	ldr	x8, [x0]
	cbz	x8, LBB0_12
; %bb.15:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x8, #8]
	bl	_osm_node_get_type
	ldr	x8, [x24]
	cmp	x0, x8
	cset	w0, eq
	bl	_CL_ASSERT
	ldr	x1, [x23]
	mov	x0, x19
	mov	x2, x23
	bl	_osm_ucast_cache_add_link
	b	LBB0_12
LBB0_16:
	mov	x0, x19
	mov	x1, x21
	bl	_cache_get_sw
	cbz	x0, LBB0_23
; %bb.17:
	mov	x22, x0
	bl	_cache_sw_is_leaf
	cbz	w0, LBB0_23
; %bb.18:
Lloh6:
	adrp	x8, _TRUE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x22, #32]
	ldr	x8, [x20]
	ldr	x9, [x8, #40]
	cbz	x9, LBB0_25
; %bb.19:
	ldr	x10, [x8, #32]
	cbz	x10, LBB0_25
; %bb.20:
	stp	x10, x9, [x22, #16]
	stp	xzr, xzr, [x8, #32]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_28
; %bb.21:
	str	xzr, [x8, #24]
	b	LBB0_29
LBB0_22:
Lloh9:
	adrp	x8, _OSM_LOG_VERBOSE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _OSM_LOG_VERBOSE@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
Lloh12:
	adrp	x2, l_.str@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
	b	LBB0_26
LBB0_23:
	ldr	w0, [x19]
	ldr	w1, [x24]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh14:
	adrp	x2, l_.str.3@PAGE
Lloh15:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_26
LBB0_24:
	ldr	w0, [x19]
Lloh16:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh18:
	ldr	w1, [x8]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh19:
	adrp	x2, l_.str.2@PAGE
Lloh20:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_26
LBB0_25:
	ldr	w0, [x19]
	ldr	w1, [x24]
                                        ; kill: def $w21 killed $w21 killed $x21 def $x21
	str	x21, [sp]
Lloh21:
	adrp	x2, l_.str.4@PAGE
Lloh22:
	add	x2, x2, l_.str.4@PAGEOFF
LBB0_26:
	bl	_OSM_LOG
	mov	x0, x19
	bl	_osm_ucast_cache_invalidate
LBB0_27:
	ldr	w0, [x19]
	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	_OSM_LOG_EXIT
LBB0_28:
	ldr	x9, [x8, #16]
	stp	xzr, xzr, [x8, #8]
LBB0_29:
	str	x9, [x22, #8]
	ldr	w8, [x8]
	str	w8, [x22]
	b	LBB0_27
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_NODE_TYPE_SWITCH,8,3        ; @IB_NODE_TYPE_SWITCH
	.comm	_OSM_LOG_VERBOSE,4,2            ; @OSM_LOG_VERBOSE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Skip caching. Switch dropped before it gets a valid lid.\n"

	.comm	_OSM_LOG_DEBUG,4,2              ; @OSM_LOG_DEBUG
l_.str.1:                               ; @.str.1
	.asciz	"Caching dropped switch lid %u\n"

	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
l_.str.2:                               ; @.str.2
	.asciz	"ERR AD03: no switch info for node lid %u - clearing cache\n"

l_.str.3:                               ; @.str.3
	.asciz	"Dropped non-leaf switch (lid %u)\n"

	.comm	_TRUE,4,2                       ; @TRUE
l_.str.4:                               ; @.str.4
	.asciz	"No LID matrices for switch lid %u\n"

.subsections_via_symbols
