	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __update_mqd
___update_mqd:                          ## @__update_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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r13d
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdi, %r12
	movq	%rsi, %rdi
	callq	_get_mqd
	movq	%rax, %rbx
	movq	_DEFAULT_RPTR_BLOCK_SIZE@GOTPCREL(%rip), %rcx
	movq	_DEFAULT_MIN_AVAIL_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movq	_DEFAULT_MIN_IB_AVAIL_SIZE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 48(%rbx)
	testl	%r13d, %r13d
	je	LBB0_2
## %bb.1:
	movq	_PQ_ATC_EN@GOTPCREL(%rip), %rdx
	orl	(%rdx), %eax
	movl	%eax, (%rbx)
	movq	_IB_ATC_EN@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, 48(%rbx)
LBB0_2:
	movl	(%r15), %eax
	leal	3(%rax), %edi
	testl	%eax, %eax
	cmovnsl	%eax, %edi
	sarl	$2, %edi
	callq	_order_base_2
	decl	%eax
	orl	%eax, (%rbx)
	movl	40(%r15), %edi
	sarl	$8, %edi
	callq	_lower_32_bits
	movq	%rax, 40(%rbx)
	movl	40(%r15), %edi
	sarl	$8, %edi
	callq	_upper_32_bits
	movq	%rax, 32(%rbx)
	movl	32(%r15), %edi
	callq	_lower_32_bits
	movq	%rax, 24(%rbx)
	movl	32(%r15), %edi
	callq	_upper_32_bits
	movq	%rax, 16(%rbx)
	movl	24(%r15), %edi
	callq	_DOORBELL_OFFSET
	movl	%eax, 8(%rbx)
	movl	20(%r15), %eax
	movl	%eax, 4(%rbx)
	movq	8(%r15), %rax
	movq	_KFD_QUEUE_FORMAT_AQL@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.3:
	movq	_NO_UPDATE_RPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%rbx)
LBB0_4:
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%r15, %rdx
	callq	_update_cu_mask
	movq	%rbx, %rdi
	movq	%r15, %rsi
	callq	_set_priority
	movups	(%r15), %xmm0
	movups	16(%r15), %xmm1
	movups	32(%r15), %xmm2
	movups	%xmm2, 32(%rsp)
	movups	%xmm1, 16(%rsp)
	movups	%xmm0, (%rsp)
	callq	_QUEUE_IS_ACTIVE
	movl	%eax, 16(%r15)
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DEFAULT_RPTR_BLOCK_SIZE,4,2    ## @DEFAULT_RPTR_BLOCK_SIZE
	.comm	_DEFAULT_MIN_AVAIL_SIZE,4,2     ## @DEFAULT_MIN_AVAIL_SIZE
	.comm	_DEFAULT_MIN_IB_AVAIL_SIZE,4,2  ## @DEFAULT_MIN_IB_AVAIL_SIZE
	.comm	_PQ_ATC_EN,4,2                  ## @PQ_ATC_EN
	.comm	_IB_ATC_EN,4,2                  ## @IB_ATC_EN
	.comm	_KFD_QUEUE_FORMAT_AQL,8,3       ## @KFD_QUEUE_FORMAT_AQL
	.comm	_NO_UPDATE_RPTR,4,2             ## @NO_UPDATE_RPTR
	.no_dead_strip	___update_mqd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __update_mqd
___update_mqd:                          ; @__update_mqd
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	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
	mov	x23, x3
	mov	x19, x2
	mov	x20, x1
	mov	x22, x0
	mov	x0, x1
	bl	_get_mqd
	mov	x21, x0
Lloh0:
	adrp	x8, _DEFAULT_RPTR_BLOCK_SIZE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DEFAULT_RPTR_BLOCK_SIZE@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _DEFAULT_MIN_AVAIL_SIZE@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DEFAULT_MIN_AVAIL_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w9, w9, w8
	str	w9, [x0]
Lloh6:
	adrp	x8, _DEFAULT_MIN_IB_AVAIL_SIZE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _DEFAULT_MIN_IB_AVAIL_SIZE@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	str	w8, [x0, #48]
	cbz	w23, LBB0_2
; %bb.1:
Lloh9:
	adrp	x10, _PQ_ATC_EN@GOTPAGE
Lloh10:
	ldr	x10, [x10, _PQ_ATC_EN@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	orr	w9, w10, w9
	str	w9, [x21]
Lloh12:
	adrp	x9, _IB_ATC_EN@GOTPAGE
Lloh13:
	ldr	x9, [x9, _IB_ATC_EN@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x21, #48]
LBB0_2:
	ldr	w8, [x19]
	add	w9, w8, #3
	cmp	w8, #0
	csel	w8, w9, w8, lt
	asr	w0, w8, #2
	bl	_order_base_2
	sub	w8, w0, #1
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
	ldr	w8, [x19, #40]
	asr	w0, w8, #8
	bl	_lower_32_bits
	str	x0, [x21, #40]
	ldr	w8, [x19, #40]
	asr	w0, w8, #8
	bl	_upper_32_bits
	str	x0, [x21, #32]
	ldr	w0, [x19, #32]
	bl	_lower_32_bits
	str	x0, [x21, #24]
	ldr	w0, [x19, #32]
	bl	_upper_32_bits
	str	x0, [x21, #16]
	ldr	w0, [x19, #24]
	bl	_DOORBELL_OFFSET
	str	w0, [x21, #8]
	ldr	w8, [x19, #20]
	str	w8, [x21, #4]
	ldr	x8, [x19, #8]
Lloh15:
	adrp	x9, _KFD_QUEUE_FORMAT_AQL@GOTPAGE
Lloh16:
	ldr	x9, [x9, _KFD_QUEUE_FORMAT_AQL@GOTPAGEOFF]
Lloh17:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.3:
Lloh18:
	adrp	x8, _NO_UPDATE_RPTR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _NO_UPDATE_RPTR@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	ldr	w9, [x21]
	orr	w8, w9, w8
	str	w8, [x21]
LBB0_4:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_update_cu_mask
	mov	x0, x21
	mov	x1, x19
	bl	_set_priority
	ldp	q0, q1, [x19]
	stp	q0, q1, [sp]
	ldr	q0, [x19, #32]
	str	q0, [sp, #32]
	mov	x0, sp
	bl	_QUEUE_IS_ACTIVE
	str	w0, [x19, #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
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_DEFAULT_RPTR_BLOCK_SIZE,4,2    ; @DEFAULT_RPTR_BLOCK_SIZE
	.comm	_DEFAULT_MIN_AVAIL_SIZE,4,2     ; @DEFAULT_MIN_AVAIL_SIZE
	.comm	_DEFAULT_MIN_IB_AVAIL_SIZE,4,2  ; @DEFAULT_MIN_IB_AVAIL_SIZE
	.comm	_PQ_ATC_EN,4,2                  ; @PQ_ATC_EN
	.comm	_IB_ATC_EN,4,2                  ; @IB_ATC_EN
	.comm	_KFD_QUEUE_FORMAT_AQL,8,3       ; @KFD_QUEUE_FORMAT_AQL
	.comm	_NO_UPDATE_RPTR,4,2             ; @NO_UPDATE_RPTR
	.no_dead_strip	___update_mqd
.subsections_via_symbols
