	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function dnup_lid_matrices
_dnup_lid_matrices:                     ## @dnup_lid_matrices
	.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	%rdi, %r14
	movq	(%rdi), %rdi
	callq	_OSM_LOG_ENTER
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_head
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_end
	cmpq	%rax, %rbx
	je	LBB0_6
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_create_dnup_node
	movq	%rax, 8(%rbx)
	testq	%rax, %rax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%rbx, %rdi
	callq	_cl_qmap_next
	jmp	LBB0_1
LBB0_6:
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_head
	movq	%rax, %r13
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_end
	cmpq	%rax, %r13
	je	LBB0_16
## %bb.7:
	leaq	-48(%rbp), %r15
	xorl	%r12d, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_14:                                ##   in Loop: Header=BB0_8 Depth=1
	movq	%r13, %rdi
	callq	_cl_qmap_next
	movq	%rax, %r13
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_end
	cmpq	%rax, %r13
	je	LBB0_15
LBB0_8:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_10 Depth 2
	cmpq	$0, (%r13)
	jle	LBB0_14
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	xorl	%ebx, %ebx
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_10 Depth=2
	incq	%rbx
	cmpq	(%r13), %rbx
	jge	LBB0_14
LBB0_10:                                ##   Parent Loop BB0_8 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	16(%r13), %rdi
	movq	%rbx, %rsi
	movq	%r15, %rdx
	callq	_osm_node_get_remote_node
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=2
	cmpl	$0, (%rax)
	jne	LBB0_13
## %bb.12:                              ##   in Loop: Header=BB0_8 Depth=1
	movq	8(%r13), %rax
	movq	$0, (%rax)
	movq	(%r14), %rdi
	movq	_OSM_LOG_VERBOSE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	16(%r13), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rdx
	xorl	%eax, %eax
	callq	_OSM_LOG
	incl	%r12d
	jmp	LBB0_14
LBB0_15:
	testl	%r12d, %r12d
	je	LBB0_16
## %bb.17:
	movq	%r14, %rdi
	callq	_dnup_build_lid_matrices
	movl	%eax, %r15d
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_head
	.p2align	4, 0x90
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	%rax, %rbx
	movq	(%r14), %rdi
	addq	$4, %rdi
	callq	_cl_qmap_end
	cmpq	%rax, %rbx
	je	LBB0_20
## %bb.18:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	8(%rbx), %rdi
	callq	_delete_dnup_node
	movq	%rbx, %rdi
	callq	_cl_qmap_next
	jmp	LBB0_19
LBB0_16:
	movq	(%r14), %rdi
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdx
	jmp	LBB0_4
LBB0_3:
	movq	(%r14), %rdi
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
LBB0_4:
	xorl	%eax, %eax
	callq	_OSM_LOG
	movq	(%r14), %rdi
	callq	_OSM_LOG_EXIT
	movl	$-1, %r15d
	jmp	LBB0_21
LBB0_20:
	movq	(%r14), %rdi
	callq	_OSM_LOG_EXIT
LBB0_21:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_OSM_LOG_ERROR,4,2              ## @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ERR AE0C: cannot create dnup node\n"

	.comm	_OSM_LOG_VERBOSE,4,2            ## @OSM_LOG_VERBOSE
L_.str.1:                               ## @.str.1
	.asciz	"(%s) rank 0 leaf switch\n"

L_.str.2:                               ## @.str.2
	.asciz	"ERR AE0D: No leaf switches found, DnUp routing failed\n"

	.no_dead_strip	_dnup_lid_matrices
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function dnup_lid_matrices
_dnup_lid_matrices:                     ; @dnup_lid_matrices
	.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	x19, x0
	ldr	x0, [x0]
	bl	_OSM_LOG_ENTER
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_head
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	mov	x20, x0
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_end
	cmp	x20, x0
	b.eq	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_create_dnup_node
	str	x0, [x20, #8]
	cbz	x0, LBB0_18
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	x0, x20
	bl	_cl_qmap_next
	b	LBB0_1
LBB0_4:
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_head
	mov	x20, x0
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_end
	cmp	x20, x0
	b.eq	LBB0_17
; %bb.5:
	mov	w23, #0
Lloh0:
	adrp	x24, _OSM_LOG_VERBOSE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _OSM_LOG_VERBOSE@GOTPAGEOFF]
Lloh2:
	adrp	x21, l_.str.1@PAGE
Lloh3:
	add	x21, x21, l_.str.1@PAGEOFF
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x20
	bl	_cl_qmap_next
	mov	x20, x0
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_end
	cmp	x20, x0
	b.eq	LBB0_13
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_10 Depth 2
	ldr	x8, [x20]
	cmp	x8, #1
	b.lt	LBB0_6
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x22, #0
	b	LBB0_10
LBB0_9:                                 ;   in Loop: Header=BB0_10 Depth=2
	add	x22, x22, #1
	ldr	x8, [x20]
	cmp	x22, x8
	b.ge	LBB0_6
LBB0_10:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x0, [x20, #16]
	add	x2, sp, #8
	mov	x1, x22
	bl	_osm_node_get_remote_node
	cbz	x0, LBB0_9
; %bb.11:                               ;   in Loop: Header=BB0_10 Depth=2
	ldr	w8, [x0]
	cbnz	w8, LBB0_9
; %bb.12:                               ;   in Loop: Header=BB0_7 Depth=1
	ldp	x8, x9, [x20, #8]
	str	xzr, [x8]
	ldr	x0, [x19]
	ldr	w1, [x24]
	ldr	w8, [x9]
	str	x8, [sp]
	mov	x2, x21
	bl	_OSM_LOG
	add	w23, w23, #1
	b	LBB0_6
LBB0_13:
	cbz	w23, LBB0_17
; %bb.14:
	mov	x0, x19
	bl	_dnup_build_lid_matrices
	mov	x20, x0
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_head
LBB0_15:                                ; =>This Inner Loop Header: Depth=1
	mov	x21, x0
	ldr	x8, [x19]
	add	x0, x8, #4
	bl	_cl_qmap_end
	cmp	x21, x0
	b.eq	LBB0_20
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	ldr	x0, [x21, #8]
	bl	_delete_dnup_node
	mov	x0, x21
	bl	_cl_qmap_next
	b	LBB0_15
LBB0_17:
	ldr	x0, [x19]
Lloh4:
	adrp	x8, _OSM_LOG_ERROR@GOTPAGE
Lloh5:
	ldr	x8, [x8, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh6:
	ldr	w1, [x8]
Lloh7:
	adrp	x2, l_.str.2@PAGE
Lloh8:
	add	x2, x2, l_.str.2@PAGEOFF
	b	LBB0_19
LBB0_18:
	ldr	x0, [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@PAGE
Lloh13:
	add	x2, x2, l_.str@PAGEOFF
LBB0_19:
	bl	_OSM_LOG
	ldr	x0, [x19]
	bl	_OSM_LOG_EXIT
	mov	w20, #-1
	b	LBB0_21
LBB0_20:
	ldr	x0, [x19]
	bl	_OSM_LOG_EXIT
LBB0_21:
	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
	ret
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERR AE0C: cannot create dnup node\n"

	.comm	_OSM_LOG_VERBOSE,4,2            ; @OSM_LOG_VERBOSE
l_.str.1:                               ; @.str.1
	.asciz	"(%s) rank 0 leaf switch\n"

l_.str.2:                               ; @.str.2
	.asciz	"ERR AE0D: No leaf switches found, DnUp routing failed\n"

	.no_dead_strip	_dnup_lid_matrices
.subsections_via_symbols
