	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_avail_vl_in_subn
_get_avail_vl_in_subn:                  ## @get_avail_vl_in_subn
	.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
	movq	(%rdi), %r14
	movq	%r14, %rdi
	callq	_cl_qmap_head
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_cl_qmap_end
	movl	$255, %r15d
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	%r12, %rdi
	callq	_cl_qmap_next
	movq	%rax, %r12
	movq	%r14, %rdi
	callq	_cl_qmap_end
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_4 Depth 2
	cmpq	%rax, %r12
	je	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r12), %edi
	callq	_osm_node_get_num_physp
	cmpl	$2, %eax
	jl	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$1, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_4 Depth=2
	incl	%ebx
	movl	(%r12), %edi
	callq	_osm_node_get_num_physp
	cmpl	%eax, %ebx
	jge	LBB0_8
LBB0_4:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r12), %edi
	movl	%ebx, %esi
	callq	_osm_node_get_physp_ptr
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=2
	cmpq	$0, 8(%rax)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=2
	movq	%rax, %rdi
	callq	_ib_port_info_get_op_vls
	cmpl	%r15d, %eax
	movl	%r15d, %ecx
	cmovll	%eax, %ecx
	testl	%eax, %eax
	cmovnel	%ecx, %r15d
	jmp	LBB0_7
LBB0_9:
	decb	%r15b
	movl	$1, %edx
	movl	%r15d, %ecx
	shll	%cl, %edx
	cmpl	$15, %edx
	movl	$15, %eax
	cmovll	%edx, %eax
	movl	$1, %ecx
	cmpl	$2, %eax
	cmovll	%ecx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.no_dead_strip	_get_avail_vl_in_subn
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_avail_vl_in_subn
_get_avail_vl_in_subn:                  ; @get_avail_vl_in_subn
	.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
	ldr	x19, [x0]
	mov	x0, x19
	bl	_cl_qmap_head
	mov	x20, x0
	mov	x0, x19
	bl	_cl_qmap_end
	mov	w22, #255
	b	LBB0_2
LBB0_1:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	bl	_cl_qmap_next
	mov	x20, x0
	mov	x0, x19
	bl	_cl_qmap_end
LBB0_2:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	cmp	x20, x0
	b.eq	LBB0_9
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [x20]
	bl	_osm_node_get_num_physp
	cmp	w0, #2
	b.lt	LBB0_1
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	w21, #1
	b	LBB0_6
LBB0_5:                                 ;   in Loop: Header=BB0_6 Depth=2
	add	w21, w21, #1
	ldr	w0, [x20]
	bl	_osm_node_get_num_physp
	cmp	w21, w0
	b.ge	LBB0_1
LBB0_6:                                 ;   Parent Loop BB0_2 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x20]
	mov	x1, x21
	bl	_osm_node_get_physp_ptr
	cbz	x0, LBB0_5
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x8, [x0, #8]
	cbz	x8, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	bl	_ib_port_info_get_op_vls
	cmp	w0, w22
	ccmp	w0, #0, #4, lt
	csel	w22, w0, w22, ne
	b	LBB0_5
LBB0_9:
	sub	w8, w22, #1
	mov	w9, #1
	lsl	w8, w9, w8
	mov	w9, #15
	cmp	w8, #15
	csel	w8, w8, w9, lt
	cmp	w8, #1
	csinc	w0, w8, wzr, gt
	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
	.cfi_endproc
                                        ; -- End function
	.no_dead_strip	_get_avail_vl_in_subn
.subsections_via_symbols
