	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v8_0_deactivate_hqd
_gfx_v8_0_deactivate_hqd:               ## @gfx_v8_0_deactivate_hqd
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r13
	movq	_mmCP_HQD_ACTIVE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	callq	_RREG32
	movq	_CP_HQD_ACTIVE__ACTIVE_MASK@GOTPCREL(%rip), %r12
	testl	%eax, (%r12)
	je	LBB0_1
## %bb.2:
	movq	_CP_HQD_DEQUEUE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_DEQUEUE_REQ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_WREG32_FIELD
	movl	(%r13), %eax
	xorl	%r14d, %r14d
	movl	$0, %ebx
	testl	%eax, %eax
	jle	LBB0_7
## %bb.3:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r15), %edi
	callq	_RREG32
	testl	%eax, (%r12)
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jl	LBB0_4
LBB0_7:
	cmpl	%eax, %ebx
	je	LBB0_8
	jmp	LBB0_9
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_9
LBB0_5:
	movl	(%r13), %eax
	cmpl	%eax, %ebx
	jne	LBB0_9
LBB0_8:
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_9:
	movq	_mmCP_HQD_DEQUEUE_REQUEST@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_mmCP_HQD_PQ_RPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movq	_mmCP_HQD_PQ_WPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_WREG32
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_mmCP_HQD_ACTIVE,4,2            ## @mmCP_HQD_ACTIVE
	.comm	_CP_HQD_ACTIVE__ACTIVE_MASK,4,2 ## @CP_HQD_ACTIVE__ACTIVE_MASK
	.comm	_CP_HQD_DEQUEUE_REQUEST,4,2     ## @CP_HQD_DEQUEUE_REQUEST
	.comm	_DEQUEUE_REQ,4,2                ## @DEQUEUE_REQ
	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_mmCP_HQD_DEQUEUE_REQUEST,4,2   ## @mmCP_HQD_DEQUEUE_REQUEST
	.comm	_mmCP_HQD_PQ_RPTR,4,2           ## @mmCP_HQD_PQ_RPTR
	.comm	_mmCP_HQD_PQ_WPTR,4,2           ## @mmCP_HQD_PQ_WPTR
	.no_dead_strip	_gfx_v8_0_deactivate_hqd
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v8_0_deactivate_hqd
_gfx_v8_0_deactivate_hqd:               ; @gfx_v8_0_deactivate_hqd
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x21, _mmCP_HQD_ACTIVE@GOTPAGE
Lloh1:
	ldr	x21, [x21, _mmCP_HQD_ACTIVE@GOTPAGEOFF]
	ldr	w0, [x21]
	bl	_RREG32
Lloh2:
	adrp	x22, _CP_HQD_ACTIVE__ACTIVE_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _CP_HQD_ACTIVE__ACTIVE_MASK@GOTPAGEOFF]
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_9
; %bb.1:
Lloh4:
	adrp	x8, _CP_HQD_DEQUEUE_REQUEST@GOTPAGE
Lloh5:
	ldr	x8, [x8, _CP_HQD_DEQUEUE_REQUEST@GOTPAGEOFF]
Lloh6:
	ldr	w0, [x8]
Lloh7:
	adrp	x8, _DEQUEUE_REQ@GOTPAGE
Lloh8:
	ldr	x8, [x8, _DEQUEUE_REQ@GOTPAGEOFF]
Lloh9:
	ldr	w1, [x8]
	mov	x2, x20
	bl	_WREG32_FIELD
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.2:
	mov	w20, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x21]
	bl	_RREG32
	ldr	w8, [x22]
	tst	w8, w0
	b.eq	LBB0_8
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.lt	LBB0_3
; %bb.5:
	cmp	w20, w8
	b.ne	LBB0_9
LBB0_6:
Lloh10:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	neg	w19, w8
	b	LBB0_10
LBB0_7:
	mov	w20, #0
	cmp	w20, w8
	b.ne	LBB0_9
	b	LBB0_6
LBB0_8:
	ldr	w8, [x19]
	cmp	w20, w8
	b.eq	LBB0_6
LBB0_9:
	mov	w19, #0
LBB0_10:
Lloh13:
	adrp	x8, _mmCP_HQD_DEQUEUE_REQUEST@GOTPAGE
Lloh14:
	ldr	x8, [x8, _mmCP_HQD_DEQUEUE_REQUEST@GOTPAGEOFF]
Lloh15:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
Lloh16:
	adrp	x8, _mmCP_HQD_PQ_RPTR@GOTPAGE
Lloh17:
	ldr	x8, [x8, _mmCP_HQD_PQ_RPTR@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
Lloh19:
	adrp	x8, _mmCP_HQD_PQ_WPTR@GOTPAGE
Lloh20:
	ldr	x8, [x8, _mmCP_HQD_PQ_WPTR@GOTPAGEOFF]
Lloh21:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_WREG32
	mov	x0, x19
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_mmCP_HQD_ACTIVE,4,2            ; @mmCP_HQD_ACTIVE
	.comm	_CP_HQD_ACTIVE__ACTIVE_MASK,4,2 ; @CP_HQD_ACTIVE__ACTIVE_MASK
	.comm	_CP_HQD_DEQUEUE_REQUEST,4,2     ; @CP_HQD_DEQUEUE_REQUEST
	.comm	_DEQUEUE_REQ,4,2                ; @DEQUEUE_REQ
	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_mmCP_HQD_DEQUEUE_REQUEST,4,2   ; @mmCP_HQD_DEQUEUE_REQUEST
	.comm	_mmCP_HQD_PQ_RPTR,4,2           ; @mmCP_HQD_PQ_RPTR
	.comm	_mmCP_HQD_PQ_WPTR,4,2           ; @mmCP_HQD_PQ_WPTR
	.no_dead_strip	_gfx_v8_0_deactivate_hqd
.subsections_via_symbols
