	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function init_mqd
_init_mqd:                              ## @init_mqd
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	movq	%rdi, %r15
	movq	8(%rdx), %rbx
	movl	(%rdx), %r13d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$128, %edx
	callq	_memset
	movabsq	$7519406080, %rax               ## imm = 0x1C0310800
	movq	%rax, (%rbx)
	pcmpeqd	%xmm0, %xmm0
	movdqu	%xmm0, 8(%rbx)
	movq	_CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$83, %eax
	shll	%cl, %eax
	movq	_CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 24(%rbx)
	movq	_MTYPE_UC@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_CP_MQD_CONTROL__MTYPE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movq	_CP_MQD_CONTROL__PRIV_STATE__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	btsl	%ecx, %eax
	movl	%eax, 28(%rbx)
	movl	%r13d, %edi
	callq	_lower_32_bits
	movq	%rax, 120(%rbx)
	movl	%r13d, %edi
	callq	_upper_32_bits
	movq	%rax, 112(%rbx)
	movq	_CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	movq	_CP_HQD_QUANTUM__QUANTUM_EN__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %dl
	movq	_CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	movl	$10, %esi
	shll	%cl, %esi
	btsl	%edx, %eax
	movl	$1, %r12d
	orl	%eax, %esi
	movl	%esi, 32(%rbx)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_set_priority
	movq	_CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movl	%r12d, 36(%rbx)
	movq	(%r14), %rax
	movq	_KFD_QUEUE_FORMAT_AQL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	movl	$1, 40(%rbx)
LBB0_2:
	movl	8(%r14), %edi
	testl	%edi, %edi
	je	LBB0_4
## %bb.3:
	sarl	$8, %edi
	callq	_lower_32_bits
	movq	%rax, 104(%rbx)
	movl	8(%r14), %edi
	sarl	$8, %edi
	callq	_upper_32_bits
	movq	%rax, 96(%rbx)
	movl	12(%r14), %edi
	sarl	$8, %edi
	callq	_lower_32_bits
	movq	%rax, 88(%rbx)
	movl	12(%r14), %edi
	sarl	$8, %edi
	callq	_upper_32_bits
	movq	%rax, 80(%rbx)
	movq	_COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, 44(%rbx)
LBB0_4:
	movq	8(%r15), %rax
	cmpq	$0, (%rax)
	je	LBB0_7
## %bb.5:
	movl	16(%r14), %edi
	testl	%edi, %edi
	je	LBB0_7
## %bb.6:
	movq	_CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	movl	$1, %eax
	shll	%cl, %eax
	orl	%eax, 24(%rbx)
	callq	_lower_32_bits
	movq	%rax, 72(%rbx)
	movl	16(%r14), %edi
	callq	_upper_32_bits
	movq	%rax, 64(%rbx)
	movq	20(%r14), %xmm0                 ## xmm0 = mem[0],zero
	pshufd	$64, %xmm0, %xmm0               ## xmm0 = xmm0[0,0,0,1]
	movdqu	%xmm0, 48(%rbx)
LBB0_7:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rbx, (%rax)
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movl	%r13d, (%rax)
LBB0_9:
	movq	(%r15), %rax
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rdx
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK,4,2 ## @CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK
	.comm	_CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT,4,2 ## @CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT
	.comm	_CP_MQD_CONTROL__PRIV_STATE__SHIFT,4,2 ## @CP_MQD_CONTROL__PRIV_STATE__SHIFT
	.comm	_MTYPE_UC,4,2                   ## @MTYPE_UC
	.comm	_CP_MQD_CONTROL__MTYPE__SHIFT,4,2 ## @CP_MQD_CONTROL__MTYPE__SHIFT
	.comm	_CP_HQD_QUANTUM__QUANTUM_EN__SHIFT,4,2 ## @CP_HQD_QUANTUM__QUANTUM_EN__SHIFT
	.comm	_CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT,4,2 ## @CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT
	.comm	_CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT,4,2 ## @CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT
	.comm	_CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT,4,2 ## @CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT
	.comm	_KFD_QUEUE_FORMAT_AQL,8,3       ## @KFD_QUEUE_FORMAT_AQL
	.comm	_COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT,4,2 ## @COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT
	.comm	_CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT,4,2 ## @CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT
	.no_dead_strip	_init_mqd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ; -- Begin function init_mqd
lCPI0_0:
	.long	3224438784                      ; 0xc0310800
	.long	1                               ; 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	2
_init_mqd:                              ; @init_mqd
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x4
	mov	x22, x3
	mov	x24, x1
	mov	x21, x0
	ldr	x20, [x2, #8]
	ldr	w23, [x2]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #128
	bl	_memset
Lloh0:
	adrp	x8, lCPI0_0@PAGE
Lloh1:
	ldr	d0, [x8, lCPI0_0@PAGEOFF]
	str	d0, [x20]
	mov	x8, #-1
	stp	x8, x8, [x20, #8]
Lloh2:
	adrp	x8, _CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
Lloh5:
	adrp	x9, _CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	mov	w10, #83
	lsl	w9, w10, w9
	orr	w8, w9, w8
Lloh8:
	adrp	x9, _CP_MQD_CONTROL__PRIV_STATE__SHIFT@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CP_MQD_CONTROL__PRIV_STATE__SHIFT@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, _MTYPE_UC@GOTPAGE
Lloh12:
	ldr	x10, [x10, _MTYPE_UC@GOTPAGEOFF]
Lloh13:
	ldr	w10, [x10]
Lloh14:
	adrp	x11, _CP_MQD_CONTROL__MTYPE__SHIFT@GOTPAGE
Lloh15:
	ldr	x11, [x11, _CP_MQD_CONTROL__MTYPE__SHIFT@GOTPAGEOFF]
Lloh16:
	ldr	w11, [x11]
	lsl	w10, w10, w11
	mov	w25, #1
	lsl	w9, w25, w9
	orr	w9, w10, w9
	stp	w8, w9, [x20, #24]
	mov	x0, x23
	bl	_lower_32_bits
	str	x0, [x20, #120]
	mov	x0, x23
	bl	_upper_32_bits
	str	x0, [x20, #112]
Lloh17:
	adrp	x8, _CP_HQD_QUANTUM__QUANTUM_EN__SHIFT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _CP_HQD_QUANTUM__QUANTUM_EN__SHIFT@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	lsl	w8, w25, w8
Lloh20:
	adrp	x9, _CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	lsl	w9, w25, w9
Lloh23:
	adrp	x10, _CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT@GOTPAGE
Lloh24:
	ldr	x10, [x10, _CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT@GOTPAGEOFF]
	orr	w8, w9, w8
Lloh25:
	ldr	w9, [x10]
	mov	w10, #10
	lsl	w9, w10, w9
	orr	w8, w8, w9
	str	w8, [x20, #32]
	mov	x0, x20
	mov	x1, x19
	bl	_set_priority
Lloh26:
	adrp	x8, _CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
	lsl	w8, w25, w8
	str	w8, [x20, #36]
	ldr	x8, [x19]
Lloh29:
	adrp	x9, _KFD_QUEUE_FORMAT_AQL@GOTPAGE
Lloh30:
	ldr	x9, [x9, _KFD_QUEUE_FORMAT_AQL@GOTPAGEOFF]
Lloh31:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	str	w25, [x20, #40]
LBB0_2:
	ldr	w8, [x19, #8]
	cbz	w8, LBB0_4
; %bb.3:
	asr	w0, w8, #8
	bl	_lower_32_bits
	str	x0, [x20, #104]
	ldr	w8, [x19, #8]
	asr	w0, w8, #8
	bl	_upper_32_bits
	str	x0, [x20, #96]
	ldr	w8, [x19, #12]
	asr	w0, w8, #8
	bl	_lower_32_bits
	str	x0, [x20, #88]
	ldr	w8, [x19, #12]
	asr	w0, w8, #8
	bl	_upper_32_bits
	str	x0, [x20, #80]
Lloh32:
	adrp	x8, _COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT@GOTPAGE
Lloh33:
	ldr	x8, [x8, _COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT@GOTPAGEOFF]
Lloh34:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x20, #44]
	orr	w8, w9, w8
	str	w8, [x20, #44]
LBB0_4:
	ldr	x8, [x21, #8]
	ldr	x8, [x8]
	cbz	x8, LBB0_7
; %bb.5:
	ldr	w0, [x19, #16]
	cbz	w0, LBB0_7
; %bb.6:
Lloh35:
	adrp	x8, _CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT@GOTPAGE
Lloh36:
	ldr	x8, [x8, _CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT@GOTPAGEOFF]
Lloh37:
	ldr	w8, [x8]
	mov	w9, #1
	lsl	w8, w9, w8
	ldr	w9, [x20, #24]
	orr	w8, w9, w8
	str	w8, [x20, #24]
	bl	_lower_32_bits
	str	x0, [x20, #72]
	ldr	w0, [x19, #16]
	bl	_upper_32_bits
	str	x0, [x20, #64]
	ldur	d0, [x19, #20]
	zip1.4s	v1, v0, v0
	mov.s	v1[2], v0[0]
	str	q1, [x20, #48]
LBB0_7:
	str	x20, [x24]
	cbz	x22, LBB0_9
; %bb.8:
	str	w23, [x22]
LBB0_9:
	ldr	x3, [x21]
	mov	x0, x21
	mov	x1, x20
	mov	x2, x19
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	br	x3
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdr	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.cfi_endproc
                                        ; -- End function
	.comm	_CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK,4,2 ; @CP_HQD_PERSISTENT_STATE__PRELOAD_REQ_MASK
	.comm	_CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT,4,2 ; @CP_HQD_PERSISTENT_STATE__PRELOAD_SIZE__SHIFT
	.comm	_CP_MQD_CONTROL__PRIV_STATE__SHIFT,4,2 ; @CP_MQD_CONTROL__PRIV_STATE__SHIFT
	.comm	_MTYPE_UC,4,2                   ; @MTYPE_UC
	.comm	_CP_MQD_CONTROL__MTYPE__SHIFT,4,2 ; @CP_MQD_CONTROL__MTYPE__SHIFT
	.comm	_CP_HQD_QUANTUM__QUANTUM_EN__SHIFT,4,2 ; @CP_HQD_QUANTUM__QUANTUM_EN__SHIFT
	.comm	_CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT,4,2 ; @CP_HQD_QUANTUM__QUANTUM_SCALE__SHIFT
	.comm	_CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT,4,2 ; @CP_HQD_QUANTUM__QUANTUM_DURATION__SHIFT
	.comm	_CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT,4,2 ; @CP_HQD_EOP_RPTR__INIT_FETCHER__SHIFT
	.comm	_KFD_QUEUE_FORMAT_AQL,8,3       ; @KFD_QUEUE_FORMAT_AQL
	.comm	_COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT,4,2 ; @COMPUTE_PGM_RSRC2__TRAP_PRESENT__SHIFT
	.comm	_CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT,4,2 ; @CP_HQD_PERSISTENT_STATE__QSWITCH_MODE__SHIFT
	.no_dead_strip	_init_mqd
.subsections_via_symbols
