	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function new_node
_new_node:                              ## @new_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r15d
	movq	%rsi, %r14
	movq	%rdi, %rbx
	movq	(%rsi), %rax
	movq	_target_portguid@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	$-1, (%rbx)
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_link_port
	movq	_ibverbose@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdx
	movq	%r14, %rcx
	callq	_dump_endnode
	movl	$1, %eax
	jmp	LBB0_5
LBB0_2:
	movq	%rdx, %r12
	movq	%rbx, %rdi
	callq	_insert_node
	testq	%rax, %rax
	js	LBB0_3
## %bb.4:
	movl	8(%r14), %r8d
	movl	12(%r14), %ecx
	leaq	L_.str.1(%rip), %rdi
	movl	%r15d, %esi
	movq	%rbx, %rdx
	callq	_VERBOSE
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_link_port
	movl	%r15d, (%rbx)
	movl	(%r12), %eax
	movl	%eax, 16(%rbx)
	movq	_nodesdist@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movslq	%r15d, %rcx
	movq	(%rax,%rcx,8), %rdx
	movq	%rdx, 8(%rbx)
	movq	%rbx, (%rax,%rcx,8)
	xorl	%eax, %eax
	jmp	LBB0_5
LBB0_3:
	movl	$-1, %eax
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_target_portguid,8,3            ## @target_portguid
	.comm	_ibverbose,4,2                  ## @ibverbose
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"found target"

L_.str.1:                               ## @.str.1
	.asciz	"insert dist %d node %p port %d lid %d"

	.comm	_nodesdist,8,3                  ## @nodesdist
	.no_dead_strip	_new_node
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function new_node
_new_node:                              ; @new_node
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x20, x1
	mov	x19, x0
	ldr	x8, [x1]
Lloh0:
	adrp	x9, _target_portguid@GOTPAGE
Lloh1:
	ldr	x9, [x9, _target_portguid@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	mov	w8, #-1
	str	w8, [x19]
	mov	x0, x20
	mov	x1, x19
	bl	_link_port
Lloh3:
	adrp	x8, _ibverbose@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ibverbose@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	mov	x3, x20
	bl	_dump_endnode
	mov	w0, #1
	b	LBB0_5
LBB0_2:
	mov	x21, x3
	mov	x22, x2
	mov	x0, x19
	bl	_insert_node
	tbnz	x0, #63, LBB0_4
; %bb.3:
	ldp	w4, w3, [x20, #8]
Lloh8:
	adrp	x0, l_.str.1@PAGE
Lloh9:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x21
	mov	x2, x19
	bl	_VERBOSE
	mov	x0, x20
	mov	x1, x19
	bl	_link_port
	mov	w0, #0
	str	w21, [x19]
	ldr	w8, [x22]
	str	w8, [x19, #16]
Lloh10:
	adrp	x8, _nodesdist@GOTPAGE
Lloh11:
	ldr	x8, [x8, _nodesdist@GOTPAGEOFF]
Lloh12:
	ldr	x8, [x8]
	sbfiz	x9, x21, #3, #32
	ldr	x10, [x8, x9]
	str	x10, [x19, #8]
	str	x19, [x8, x9]
	b	LBB0_5
LBB0_4:
	mov	w0, #-1
LBB0_5:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_target_portguid,8,3            ; @target_portguid
	.comm	_ibverbose,4,2                  ; @ibverbose
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"found target"

l_.str.1:                               ; @.str.1
	.asciz	"insert dist %d node %p port %d lid %d"

	.comm	_nodesdist,8,3                  ; @nodesdist
	.no_dead_strip	_new_node
.subsections_via_symbols
