	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function discover_network_properties
_discover_network_properties:           ## @discover_network_properties
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	8(%rdi), %r14
	leaq	8(%r14), %r13
	movq	%r13, %rdi
	callq	_cl_qmap_count
	movl	%eax, (%r12)
	movl	%eax, %edi
	movl	$8, %esi
	callq	_calloc
	movq	%rax, 24(%r12)
	movl	$-1, %ebx
	testq	%rax, %rax
	je	LBB0_15
## %bb.1:
	movq	%r13, %rdi
	callq	_cl_qmap_head
	movq	%rax, %r15
	movq	%r13, %rdi
	callq	_cl_qmap_end
	cmpq	%rax, %r15
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	$5, %ebx
	je	LBB0_11
## %bb.2:
	xorl	%r14d, %r14d
	movq	%r12, -64(%rbp)                 ## 8-byte Spill
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%r14
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_cl_qmap_end
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, %r15
	cmpq	%rax, %rcx
	movq	-64(%rbp), %r12                 ## 8-byte Reload
	je	LBB0_11
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_8 Depth 2
	leaq	4(%r15), %rdi
	callq	_cl_qmap_next
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	movl	%r14d, %esi
	movq	%r15, %rdx
	callq	_switch_create
	movq	24(%r12), %rcx
	movl	%eax, (%rcx,%r14,4)
	testl	%eax, %eax
	je	LBB0_14
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	(%r15), %edi
	callq	_osm_node_get_num_physp
	cmpl	$2, %eax
	jl	LBB0_3
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	%eax, %r13d
	movl	$1, %r12d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=2
	incl	%r12d
	cmpl	%r12d, %r13d
	je	LBB0_3
LBB0_8:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r15), %edi
	movl	%r12d, %esi
	callq	_osm_node_get_physp_ptr
	testq	%rax, %rax
	je	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=2
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=2
	movq	%rax, %rdi
	callq	_ib_port_info_get_op_vls
	cmpq	%rbx, %rax
	movq	%rbx, %rcx
	cmovlq	%rax, %rcx
	testq	%rax, %rax
	cmovneq	%rcx, %rbx
	jmp	LBB0_7
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	addq	$16, %rdi
	decb	%bl
	movl	$1, %eax
	movl	%ebx, %ecx
	shll	%cl, %eax
	cmpl	$15, %eax
	movl	$15, %ecx
	cmovll	%eax, %ecx
	movslq	%ecx, %r8
	movq	8(%r12), %rax
	movq	(%rax), %rax
	cmpq	%r8, %rax
	jge	LBB0_13
## %bb.12:
	subq	%rax, %r8
	movq	%r8, 16(%r12)
	movq	_OSM_LOG_INFO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	(%r12), %r9d
	leaq	L_.str.1(%rip), %rdx
	xorl	%ebx, %ebx
	movq	%r8, %rcx
	movq	%rax, %r8
	xorl	%eax, %eax
	callq	_OSM_LOG
	jmp	LBB0_15
LBB0_13:
	movq	_OSM_LOG_ERROR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rax, %rcx
	xorl	%eax, %eax
	callq	_OSM_LOG
LBB0_14:
	movl	$-1, %ebx
LBB0_15:
	movl	%ebx, %eax
	addq	$40, %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 4D03: Start VL(%d) too high for min operational vl(%d)\n"

	.comm	_OSM_LOG_INFO,4,2               ## @OSM_LOG_INFO
L_.str.1:                               ## @.str.1
	.asciz	"min operational vl(%d) start vl(%d) max_switches(%d)\n"

	.no_dead_strip	_discover_network_properties
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function discover_network_properties
_discover_network_properties:           ; @discover_network_properties
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
	ldr	x26, [x0, #8]
	add	x20, x26, #8
	mov	x0, x20
	bl	_cl_qmap_count
	str	w0, [x19]
	mov	w1, #8
	bl	_calloc
	str	x0, [x19, #24]
	cbz	x0, LBB0_15
; %bb.1:
	mov	x0, x20
	bl	_cl_qmap_head
	mov	x22, x0
	mov	x0, x20
	bl	_cl_qmap_end
	cmp	x22, x0
	b.eq	LBB0_11
; %bb.2:
	mov	x21, #0
	mov	w27, #5
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	add	x21, x21, #1
	mov	x0, x20
	bl	_cl_qmap_end
	mov	x22, x23
	cmp	x23, x0
	b.eq	LBB0_12
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_8 Depth 2
	add	x0, x22, #4
	bl	_cl_qmap_next
	mov	x23, x0
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_switch_create
	ldr	x8, [x19, #24]
	str	w0, [x8, x21, lsl #2]
	cbz	w0, LBB0_15
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w0, [x22]
	bl	_osm_node_get_num_physp
	cmp	w0, #2
	b.lt	LBB0_3
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x24, x0
	mov	w25, #1
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=2
	add	w25, w25, #1
	cmp	w24, w25
	b.eq	LBB0_3
LBB0_8:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x22]
	mov	x1, x25
	bl	_osm_node_get_physp_ptr
	cbz	x0, LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=2
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_7
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=2
	bl	_ib_port_info_get_op_vls
	cmp	x0, x27
	ccmp	x0, #0, #4, lt
	csel	x27, x0, x27, ne
	b	LBB0_7
LBB0_11:
	mov	w27, #5
LBB0_12:
	add	x0, x26, #16
	sub	w8, w27, #1
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #15
	cmp	w8, #15
	csel	w8, w8, w9, lt
	sxtw	x4, w8
	ldr	x8, [x19, #8]
	ldr	x8, [x8]
	cmp	x8, x4
	b.ge	LBB0_14
; %bb.13:
	sub	x3, x4, x8
	str	x3, [x19, #16]
Lloh0:
	adrp	x9, _OSM_LOG_INFO@GOTPAGE
Lloh1:
	ldr	x9, [x9, _OSM_LOG_INFO@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	ldr	w9, [x19]
Lloh3:
	adrp	x2, l_.str.1@PAGE
Lloh4:
	add	x2, x2, l_.str.1@PAGEOFF
	str	x9, [sp]
	mov	x4, x8
	bl	_OSM_LOG
	mov	w0, #0
	b	LBB0_16
LBB0_14:
Lloh5:
	adrp	x9, _OSM_LOG_ERROR@GOTPAGE
Lloh6:
	ldr	x9, [x9, _OSM_LOG_ERROR@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x9]
Lloh8:
	adrp	x2, l_.str@PAGE
Lloh9:
	add	x2, x2, l_.str@PAGEOFF
	mov	x3, x8
	bl	_OSM_LOG
LBB0_15:
	mov	w0, #-1
LBB0_16:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_OSM_LOG_ERROR,4,2              ; @OSM_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ERR 4D03: Start VL(%d) too high for min operational vl(%d)\n"

	.comm	_OSM_LOG_INFO,4,2               ; @OSM_LOG_INFO
l_.str.1:                               ; @.str.1
	.asciz	"min operational vl(%d) start vl(%d) max_switches(%d)\n"

	.no_dead_strip	_discover_network_properties
.subsections_via_symbols
