	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osm_qos_setup                  ## -- Begin function osm_qos_setup
	.p2align	4, 0x90
_osm_qos_setup:                         ## @osm_qos_setup
	.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	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, 40(%rdi)
	je	LBB0_20
## %bb.1:
	movq	%rdi, %rbx
	leaq	16(%rdi), %r15
	callq	_OSM_LOG_ENTER
	leaq	36(%rbx), %rsi
	leaq	20(%rbx), %r14
	leaq	-88(%rbp), %rdi
	movq	%r14, %rdx
	callq	_qos_build_config
	leaq	32(%rbx), %rsi
	leaq	-48(%rbp), %rdi
	movq	%r14, %rdx
	callq	_qos_build_config
	leaq	28(%rbx), %rsi
	leaq	-56(%rbp), %rdi
	movq	%r14, %rdx
	callq	_qos_build_config
	leaq	24(%rbx), %rsi
	leaq	-80(%rbp), %rdi
	movq	%r14, %rdx
	callq	_qos_build_config
	leaq	-52(%rbp), %rdi
	callq	_cl_qlist_init
	leaq	4(%rbx), %rdi
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	callq	_cl_plock_excl_acquire
	movq	%r15, %rdi
	callq	_osm_qos_parse_policy_file
	movq	%r15, %rdi
	callq	_cl_qmap_head
	movq	%rax, %r14
	movq	%r15, -104(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_cl_qmap_end
	cmpq	%rax, %r14
	movq	%rbx, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_21
## %bb.2:
	leaq	8(%rbx), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	%rbx, %rdi
	callq	_free
LBB0_4:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	-104(%rbp), %rdi                ## 8-byte Reload
	callq	_cl_qmap_end
	movq	%r12, %r14
	cmpq	%rax, %r12
	je	LBB0_22
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_cl_qmap_next
	movq	%rax, %r12
	movl	$8, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_30
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	%rax, %rbx
	movq	%rax, %rdi
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	%rbx, %r15
	addq	$4, %r15
	movq	%r15, %rdi
	callq	_cl_qlist_init
	movq	8(%r14), %r13
	cmpq	$0, (%r13)
	je	LBB0_13
## %bb.7:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r13, %rsi
	leaq	-56(%rbp), %rdx
	movq	%r15, %rcx
	callq	_qos_extports_setup
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_cl_plock_release
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rdi
	callq	_ib_switch_info_is_enhanced_port0
	testl	%eax, %eax
	je	LBB0_18
## %bb.10:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rdi
	callq	_ib_switch_info_get_opt_sl2vlmapping
	xorl	%ecx, %ecx
	testq	%rax, %rax
	je	LBB0_15
## %bb.11:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	je	LBB0_15
## %bb.12:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	-56(%rbp), %rdi
	leaq	-48(%rbp), %r13
	movq	%r13, %rsi
	movl	$4, %edx
	callq	_memcmp
	xorl	%ecx, %ecx
	testl	%eax, %eax
	sete	%cl
	movq	%r13, %rdx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_13:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r13, %rdi
	callq	_osm_node_get_type
	movq	_IB_NODE_TYPE_ROUTER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	leaq	-88(%rbp), %rdx
	leaq	-80(%rbp), %rax
	cmoveq	%rax, %rdx
	xorl	%ecx, %ecx
	jmp	LBB0_16
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	-48(%rbp), %rdx
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %esi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %r8
	callq	_qos_endport_setup
	testq	%rax, %rax
	je	LBB0_18
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_cl_plock_release
	movl	$-1, -44(%rbp)                  ## 4-byte Folded Spill
LBB0_18:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	%r15, %rdi
	callq	_cl_qlist_count
	testq	%rax, %rax
	je	LBB0_3
## %bb.19:                              ##   in Loop: Header=BB0_5 Depth=1
	leaq	-52(%rbp), %rdi
	movq	%rbx, %rsi
	callq	_cl_qlist_insert_tail
	jmp	LBB0_4
LBB0_20:
	xorl	%eax, %eax
	jmp	LBB0_31
LBB0_21:
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_22:
	leaq	-52(%rbp), %rdi
	callq	_cl_qlist_count
	testq	%rax, %rax
	je	LBB0_29
## %bb.23:
	movq	-96(%rbp), %rax                 ## 8-byte Reload
	leaq	8(%rax), %r12
	leaq	-52(%rbp), %r14
	jmp	LBB0_25
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_25 Depth=1
	movq	%r14, %rdi
	callq	_cl_qlist_count
	testq	%rax, %rax
	je	LBB0_29
LBB0_25:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_27 Depth 2
	movq	%r14, %rdi
	callq	_cl_qlist_head
	movq	%rax, %rbx
	movq	%r14, %rdi
	callq	_cl_qlist_end
	cmpq	%rax, %rbx
	jne	LBB0_27
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_26:                                ##   in Loop: Header=BB0_27 Depth=2
	movq	%r14, %rdi
	callq	_cl_qlist_end
	movq	%r13, %rbx
	cmpq	%rax, %r13
	je	LBB0_24
LBB0_27:                                ##   Parent Loop BB0_25 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%rbx, %rdi
	callq	_cl_qlist_next
	movq	%rax, %r13
	leaq	4(%rbx), %r15
	movq	%r15, %rdi
	callq	_cl_qlist_remove_head
	movq	%rax, -112(%rbp)
	movl	(%rax), %esi
	movq	%r12, %rdi
	callq	_osm_send_req_mad
	leaq	-112(%rbp), %rdi
	callq	_osm_qos_mad_delete
	movq	%r15, %rdi
	callq	_cl_qlist_count
	testq	%rax, %rax
	jne	LBB0_26
## %bb.28:                              ##   in Loop: Header=BB0_27 Depth=2
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_cl_qlist_remove_item
	movq	%rbx, %rdi
	callq	_free
	jmp	LBB0_26
LBB0_29:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_cl_plock_release
	movq	-96(%rbp), %rdi                 ## 8-byte Reload
	callq	_OSM_LOG_EXIT
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_31
LBB0_30:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_cl_plock_release
	movl	$-1, %eax
LBB0_31:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_IB_NODE_TYPE_ROUTER,8,3        ## @IB_NODE_TYPE_ROUTER
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_osm_qos_setup                  ; -- Begin function osm_qos_setup
	.p2align	2
_osm_qos_setup:                         ; @osm_qos_setup
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x28, x27, [sp, #48]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #64]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #80]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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
	ldr	w8, [x0, #40]
	cbz	w8, LBB0_19
; %bb.1:
	mov	x19, x0
	add	x22, x0, #16
	bl	_OSM_LOG_ENTER
	add	x1, x19, #36
	add	x20, x19, #20
	add	x0, sp, #40
	mov	x2, x20
	bl	_qos_build_config
	add	x1, x19, #32
	add	x0, sp, #32
	mov	x2, x20
	bl	_qos_build_config
	add	x1, x19, #28
	add	x0, sp, #24
	mov	x2, x20
	bl	_qos_build_config
	add	x1, x19, #24
	add	x0, sp, #16
	mov	x2, x20
	bl	_qos_build_config
	add	x0, sp, #4
	bl	_cl_qlist_init
	add	x20, x19, #4
	mov	x0, x20
	bl	_cl_plock_excl_acquire
	mov	x0, x22
	bl	_osm_qos_parse_policy_file
	mov	x0, x22
	bl	_cl_qmap_head
	mov	x26, x0
	mov	x0, x22
	bl	_cl_qmap_end
	cmp	x26, x0
	b.eq	LBB0_20
; %bb.2:
	mov	w21, #0
	add	x23, x19, #8
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	bl	_free
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x22
	bl	_cl_qmap_end
	mov	x26, x24
	cmp	x24, x0
	b.eq	LBB0_21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x26
	bl	_cl_qmap_next
	mov	x24, x0
	mov	w0, #8
	bl	_malloc
	cbz	x0, LBB0_29
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x25, x0
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	add	x27, x25, #4
	mov	x0, x27
	bl	_cl_qlist_init
	ldr	x28, [x26, #8]
	ldr	x8, [x28]
	cbz	x8, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	add	x2, sp, #24
	mov	x0, x23
	mov	x1, x28
	mov	x3, x27
	bl	_qos_extports_setup
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_cl_plock_release
	mov	w21, #-1
LBB0_9:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x28]
	bl	_ib_switch_info_is_enhanced_port0
	cbz	w0, LBB0_17
; %bb.10:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x0, [x28]
	bl	_ib_switch_info_get_opt_sl2vlmapping
	cbz	x0, LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	x8, [x23]
	ldr	x8, [x8]
	cbz	x8, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x28, sp, #32
	add	x0, sp, #24
	add	x1, sp, #32
	mov	w2, #4
	bl	_memcmp
	cmp	w0, #0
	cset	w3, eq
	b	LBB0_15
LBB0_13:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x28
	bl	_osm_node_get_type
	mov	w3, #0
Lloh0:
	adrp	x8, _IB_NODE_TYPE_ROUTER@GOTPAGE
Lloh1:
	ldr	x8, [x8, _IB_NODE_TYPE_ROUTER@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	x0, x8
	add	x8, sp, #40
	add	x9, sp, #16
	csel	x28, x9, x8, eq
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	w3, #0
	add	x28, sp, #32
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x26]
	mov	x0, x23
	mov	x2, x28
	mov	x4, x27
	bl	_qos_endport_setup
	cbz	x0, LBB0_17
; %bb.16:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
	bl	_cl_plock_release
	mov	w21, #-1
LBB0_17:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x27
	bl	_cl_qlist_count
	cbz	x0, LBB0_3
; %bb.18:                               ;   in Loop: Header=BB0_5 Depth=1
	add	x0, sp, #4
	mov	x1, x25
	bl	_cl_qlist_insert_tail
	b	LBB0_4
LBB0_19:
	mov	w21, #0
	b	LBB0_30
LBB0_20:
	mov	w21, #0
LBB0_21:
	add	x0, sp, #4
	bl	_cl_qlist_count
	cbz	x0, LBB0_28
; %bb.22:
	add	x22, x19, #8
	b	LBB0_24
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x0, sp, #4
	bl	_cl_qlist_count
	cbz	x0, LBB0_28
LBB0_24:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_26 Depth 2
	add	x0, sp, #4
	bl	_cl_qlist_head
	mov	x23, x0
	add	x0, sp, #4
	bl	_cl_qlist_end
	cmp	x23, x0
	b.ne	LBB0_26
	b	LBB0_23
LBB0_25:                                ;   in Loop: Header=BB0_26 Depth=2
	add	x0, sp, #4
	bl	_cl_qlist_end
	mov	x23, x24
	cmp	x24, x0
	b.eq	LBB0_23
LBB0_26:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x23
	bl	_cl_qlist_next
	mov	x24, x0
	add	x25, x23, #4
	mov	x0, x25
	bl	_cl_qlist_remove_head
	str	x0, [sp, #8]
	ldr	w1, [x0]
	mov	x0, x22
	bl	_osm_send_req_mad
	add	x0, sp, #8
	bl	_osm_qos_mad_delete
	mov	x0, x25
	bl	_cl_qlist_count
	cbnz	x0, LBB0_25
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	add	x0, sp, #4
	mov	x1, x23
	bl	_cl_qlist_remove_item
	mov	x0, x23
	bl	_free
	b	LBB0_25
LBB0_28:
	mov	x0, x20
	bl	_cl_plock_release
	mov	x0, x19
	bl	_OSM_LOG_EXIT
	b	LBB0_30
LBB0_29:
	mov	x0, x20
	bl	_cl_plock_release
	mov	w21, #-1
LBB0_30:
	mov	x0, x21
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #80]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #64]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_IB_NODE_TYPE_ROUTER,8,3        ; @IB_NODE_TYPE_ROUTER
.subsections_via_symbols
