	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_qos
_init_qos:                              ## @init_qos
	.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	$88, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	movl	$1, -44(%rbp)
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	testq	%rsi, %rsi
	je	LBB0_13
## %bb.1:
	leaq	-48(%rbp), %rsi
	leaq	-44(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_qos_rmt_entries
	testl	%eax, %eax
	je	LBB0_13
## %bb.2:
	movl	-48(%rbp), %r11d
	movl	-44(%rbp), %eax
	leal	(%rax,%r11), %ecx
	movl	$1, %r14d
	shll	%cl, %r14d
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %r10
	leaq	(%r10,%r14), %rdx
	movq	_NUM_MAP_ENTRIES@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rdx
	jge	LBB0_13
## %bb.3:
	movq	_num_vls@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	testl	%edx, %edx
	je	LBB0_12
## %bb.4:
	movq	%r14, -112(%rbp)                ## 8-byte Spill
	movq	%rbx, -120(%rbp)                ## 8-byte Spill
	movq	_FIRST_KERNEL_KCTXT@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	_krcvqs@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	xorl	%r14d, %r14d
	movq	_RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK@GOTPCREL(%rip), %r9
	jmp	LBB0_5
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_5 Depth=1
	movq	_num_vls@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
LBB0_10:                                ##   in Loop: Header=BB0_5 Depth=1
	addl	%r15d, %edi
	incq	%r14
	movl	%edx, %eax
	movl	%edi, %r15d
	cmpq	%rax, %r14
	jae	LBB0_11
LBB0_5:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_7 Depth 2
	cmpl	$0, (%r13,%r14,4)
	movl	$0, %edi
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_5 Depth=1
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	8(%rax), %r12
	movl	$1, %eax
	movl	%r15d, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ##   Parent Loop BB0_5 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	leal	-1(%rax), %edi
	movzbl	-44(%rbp), %ecx
	shll	%cl, %edi
	xorl	%r14d, %edi
	addl	%r10d, %edi
	leal	(,%rdi,8), %ecx
	movl	(%r9), %esi
	shll	%cl, %esi
	shrl	$3, %edi
	notl	%esi
	andl	(%r12,%rdi,4), %esi
	leal	1(%rbx), %edx
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %ebx
	orl	%esi, %ebx
	movl	%ebx, (%r12,%rdi,4)
	movl	(%r13,%r14,4), %edi
	leal	(%rdi,%r15), %ecx
	cmpl	%ecx, %edx
	movl	%edx, %ebx
	cmovel	%r15d, %ebx
	movl	%eax, %r8d
	movl	%r11d, %ecx
	shrl	%cl, %r8d
	testl	%edi, %edi
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=2
	incl	%eax
	testl	%r8d, %r8d
	je	LBB0_7
	jmp	LBB0_9
LBB0_13:
	movl	$1, (%rbx)
	movq	_FIRST_KERNEL_KCTXT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%rbx), %edx
	decl	%edx
	movq	%rbx, %rdi
	callq	_init_qpmap_table
LBB0_14:
	addq	$88, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_11:
	movl	-44(%rbp), %eax
	movl	-48(%rbp), %ecx
	addl	%eax, %ecx
	movq	-120(%rbp), %rbx                ## 8-byte Reload
	movq	-112(%rbp), %r14                ## 8-byte Reload
LBB0_12:
	movl	%r10d, -104(%rbp)
	movl	$2, -100(%rbp)
	movq	_LRH_BTH_MATCH_OFFSET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, -60(%rbp)
	movq	_LRH_SC_MATCH_OFFSET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, -64(%rbp)
	movq	_LRH_SC_SELECT_OFFSET@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, -68(%rbp)
	movl	%eax, -96(%rbp)
	movq	_QPN_SELECT_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -72(%rbp)
	movl	%ecx, -92(%rbp)
	movq	_LRH_BTH_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -76(%rbp)
	movq	_LRH_BTH_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -80(%rbp)
	movq	_LRH_SC_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -84(%rbp)
	movq	_LRH_SC_VALUE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -88(%rbp)
	movq	_RSM_INS_VERBS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-104(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_add_rsm_rule
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addq	%r14, (%rax)
	movq	_HFI1_CTRL_CTXT@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	movl	%edx, %esi
	callq	_init_qpmap_table
	movl	-44(%rbp), %eax
	incl	%eax
	movl	%eax, (%rbx)
	jmp	LBB0_14
	.cfi_endproc
                                        ## -- End function
	.comm	_NUM_MAP_ENTRIES,8,3            ## @NUM_MAP_ENTRIES
	.comm	_FIRST_KERNEL_KCTXT,4,2         ## @FIRST_KERNEL_KCTXT
	.comm	_num_vls,4,2                    ## @num_vls
	.comm	_krcvqs,8,3                     ## @krcvqs
	.comm	_RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK,4,2 ## @RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK
	.comm	_LRH_BTH_MATCH_OFFSET,4,2       ## @LRH_BTH_MATCH_OFFSET
	.comm	_LRH_SC_MATCH_OFFSET,4,2        ## @LRH_SC_MATCH_OFFSET
	.comm	_LRH_SC_SELECT_OFFSET,4,2       ## @LRH_SC_SELECT_OFFSET
	.comm	_QPN_SELECT_OFFSET,4,2          ## @QPN_SELECT_OFFSET
	.comm	_LRH_BTH_MASK,4,2               ## @LRH_BTH_MASK
	.comm	_LRH_BTH_VALUE,4,2              ## @LRH_BTH_VALUE
	.comm	_LRH_SC_MASK,4,2                ## @LRH_SC_MASK
	.comm	_LRH_SC_VALUE,4,2               ## @LRH_SC_VALUE
	.comm	_RSM_INS_VERBS,4,2              ## @RSM_INS_VERBS
	.comm	_HFI1_CTRL_CTXT,4,2             ## @HFI1_CTRL_CTXT
	.no_dead_strip	_init_qos
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function init_qos
_init_qos:                              ; @init_qos
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x19, x0
	mov	w22, #1
	str	w22, [sp, #12]
	cbz	x1, LBB0_12
; %bb.1:
	mov	x20, x1
	add	x1, sp, #8
	add	x2, sp, #12
	mov	x0, x19
	bl	_qos_rmt_entries
	cbz	w0, LBB0_12
; %bb.2:
	ldp	w9, w11, [sp, #8]
	add	w12, w11, w9
	mov	w8, #1
	lsl	w21, w8, w12
	ldr	x8, [x20]
Lloh0:
	adrp	x10, _NUM_MAP_ENTRIES@GOTPAGE
Lloh1:
	ldr	x10, [x10, _NUM_MAP_ENTRIES@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	add	x13, x8, x21
	cmp	x13, x10
	b.ge	LBB0_12
; %bb.3:
Lloh3:
	adrp	x10, _num_vls@GOTPAGE
Lloh4:
	ldr	x10, [x10, _num_vls@GOTPAGEOFF]
	ldr	w15, [x10]
	cbz	w15, LBB0_15
; %bb.4:
	mov	x11, #0
Lloh5:
	adrp	x12, _FIRST_KERNEL_KCTXT@GOTPAGE
Lloh6:
	ldr	x12, [x12, _FIRST_KERNEL_KCTXT@GOTPAGEOFF]
Lloh7:
	ldr	w12, [x12]
Lloh8:
	adrp	x13, _krcvqs@GOTPAGE
Lloh9:
	ldr	x13, [x13, _krcvqs@GOTPAGEOFF]
Lloh10:
	ldr	x13, [x13]
Lloh11:
	adrp	x14, _RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK@GOTPAGE
Lloh12:
	ldr	x14, [x14, _RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK@GOTPAGEOFF]
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	w0, #0
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	add	w12, w0, w12
	add	x11, x11, #1
	cmp	x11, w15, uxtw
	b.hs	LBB0_14
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_9 Depth 2
	ldr	w16, [x13, x11, lsl #2]
	cbz	w16, LBB0_5
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x15, [x20, #8]
	mov	w16, #1
	mov	x17, x12
LBB0_9:                                 ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	sub	w0, w16, #1
	ldr	w1, [sp, #12]
	lsl	w0, w0, w1
	eor	w0, w0, w11
	add	w0, w0, w8
	ubfiz	w1, w0, #3, #3
	lsr	w0, w0, #3
	lsl	x0, x0, #2
	ldr	w2, [x15, x0]
	ldr	w3, [x14]
	lsl	w3, w3, w1
	bic	w2, w2, w3
	lsl	w1, w17, w1
	orr	w1, w2, w1
	str	w1, [x15, x0]
	add	w1, w17, #1
	ldr	w0, [x13, x11, lsl #2]
	add	w2, w0, w12
	cmp	w1, w2
	csinc	w17, w12, w17, eq
	cbz	w0, LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=2
	lsr	w1, w16, w9
	add	w16, w16, #1
	cbz	w1, LBB0_9
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w15, [x10]
	b	LBB0_6
LBB0_12:
	str	w22, [x19]
Lloh13:
	adrp	x8, _FIRST_KERNEL_KCTXT@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FIRST_KERNEL_KCTXT@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
	sub	w2, w8, #1
	mov	x0, x19
	bl	_init_qpmap_table
LBB0_13:
	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
	add	sp, sp, #112
	ret
LBB0_14:
	ldp	w9, w11, [sp, #8]
	add	w12, w9, w11
LBB0_15:
Lloh16:
	adrp	x9, _LRH_BTH_MATCH_OFFSET@GOTPAGE
Lloh17:
	ldr	x9, [x9, _LRH_BTH_MATCH_OFFSET@GOTPAGEOFF]
	mov	w10, #2
	stp	w8, w10, [sp, #16]
Lloh18:
	ldr	w8, [x9]
Lloh19:
	adrp	x9, _LRH_SC_MATCH_OFFSET@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LRH_SC_MATCH_OFFSET@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #56]
Lloh22:
	adrp	x8, _LRH_SC_SELECT_OFFSET@GOTPAGE
Lloh23:
	ldr	x8, [x8, _LRH_SC_SELECT_OFFSET@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
Lloh25:
	adrp	x9, _QPN_SELECT_OFFSET@GOTPAGE
Lloh26:
	ldr	x9, [x9, _QPN_SELECT_OFFSET@GOTPAGEOFF]
Lloh27:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #48]
Lloh28:
	adrp	x8, _LRH_BTH_MASK@GOTPAGE
Lloh29:
	ldr	x8, [x8, _LRH_BTH_MASK@GOTPAGEOFF]
	stp	w11, w12, [sp, #24]
Lloh30:
	ldr	w8, [x8]
Lloh31:
	adrp	x9, _LRH_BTH_VALUE@GOTPAGE
Lloh32:
	ldr	x9, [x9, _LRH_BTH_VALUE@GOTPAGEOFF]
Lloh33:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #40]
Lloh34:
	adrp	x8, _LRH_SC_MASK@GOTPAGE
Lloh35:
	ldr	x8, [x8, _LRH_SC_MASK@GOTPAGEOFF]
Lloh36:
	ldr	w8, [x8]
Lloh37:
	adrp	x9, _LRH_SC_VALUE@GOTPAGE
Lloh38:
	ldr	x9, [x9, _LRH_SC_VALUE@GOTPAGEOFF]
Lloh39:
	ldr	w9, [x9]
	stp	w9, w8, [sp, #32]
Lloh40:
	adrp	x8, _RSM_INS_VERBS@GOTPAGE
Lloh41:
	ldr	x8, [x8, _RSM_INS_VERBS@GOTPAGEOFF]
Lloh42:
	ldr	w1, [x8]
	add	x2, sp, #16
	mov	x0, x19
	bl	_add_rsm_rule
	ldr	x8, [x20]
	add	x8, x8, x21
	str	x8, [x20]
Lloh43:
	adrp	x8, _HFI1_CTRL_CTXT@GOTPAGE
Lloh44:
	ldr	x8, [x8, _HFI1_CTRL_CTXT@GOTPAGEOFF]
Lloh45:
	ldr	w1, [x8]
	mov	x0, x19
	mov	x2, x1
	bl	_init_qpmap_table
	ldr	w8, [sp, #12]
	add	w8, w8, #1
	str	w8, [x19]
	b	LBB0_13
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh43, Lloh44, Lloh45
	.loh AdrpLdrGotLdr	Lloh40, Lloh41, Lloh42
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_NUM_MAP_ENTRIES,8,3            ; @NUM_MAP_ENTRIES
	.comm	_FIRST_KERNEL_KCTXT,4,2         ; @FIRST_KERNEL_KCTXT
	.comm	_num_vls,4,2                    ; @num_vls
	.comm	_krcvqs,8,3                     ; @krcvqs
	.comm	_RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK,4,2 ; @RCV_RSM_MAP_TABLE_RCV_CONTEXT_A_MASK
	.comm	_LRH_BTH_MATCH_OFFSET,4,2       ; @LRH_BTH_MATCH_OFFSET
	.comm	_LRH_SC_MATCH_OFFSET,4,2        ; @LRH_SC_MATCH_OFFSET
	.comm	_LRH_SC_SELECT_OFFSET,4,2       ; @LRH_SC_SELECT_OFFSET
	.comm	_QPN_SELECT_OFFSET,4,2          ; @QPN_SELECT_OFFSET
	.comm	_LRH_BTH_MASK,4,2               ; @LRH_BTH_MASK
	.comm	_LRH_BTH_VALUE,4,2              ; @LRH_BTH_VALUE
	.comm	_LRH_SC_MASK,4,2                ; @LRH_SC_MASK
	.comm	_LRH_SC_VALUE,4,2               ; @LRH_SC_VALUE
	.comm	_RSM_INS_VERBS,4,2              ; @RSM_INS_VERBS
	.comm	_HFI1_CTRL_CTXT,4,2             ; @HFI1_CTRL_CTXT
	.no_dead_strip	_init_qos
.subsections_via_symbols
