	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v9_0_kiq_fini_register
_gfx_v9_0_kiq_fini_register:            ## @gfx_v9_0_kiq_fini_register
	.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
	movq	(%rdi), %r13
	movq	_GC@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movq	_mmCP_HQD_ACTIVE@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	testb	$1, %al
	je	LBB0_8
## %bb.1:
	movl	(%r12), %edi
	movq	_mmCP_HQD_DEQUEUE_REQUEST@GOTPCREL(%rip), %r15
	movl	(%r15), %edx
	xorl	%esi, %esi
	movl	$1, %ecx
	callq	_WREG32_SOC15_RLC
	cmpl	$0, (%r13)
	jle	LBB0_5
## %bb.2:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12), %edi
	movl	(%r14), %edx
	xorl	%esi, %esi
	callq	_RREG32_SOC15
	testb	$1, %al
	je	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %edi
	callq	_udelay
	incl	%ebx
	cmpl	(%r13), %ebx
	jl	LBB0_3
LBB0_5:
	movq	_AMDGPU_MAX_USEC_TIMEOUT@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_7
## %bb.6:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	(%r12), %edi
	movl	(%r14), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
LBB0_7:
	movl	(%r12), %edi
	movl	(%r15), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
LBB0_8:
	movl	(%r12), %edi
	movq	_mmCP_HQD_IQ_TIMER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movq	_mmCP_HQD_IB_CONTROL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movq	_mmCP_HQD_PERSISTENT_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movq	_mmCP_HQD_PQ_DOORBELL_CONTROL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edx
	xorl	%esi, %esi
	movl	$1073741824, %ecx               ## imm = 0x40000000
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movl	(%rbx), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movq	_mmCP_HQD_PQ_RPTR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movq	_mmCP_HQD_PQ_WPTR_HI@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	movl	(%r12), %edi
	movq	_mmCP_HQD_PQ_WPTR_LO@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	callq	_WREG32_SOC15_RLC
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GC,4,2                         ## @GC
	.comm	_mmCP_HQD_ACTIVE,4,2            ## @mmCP_HQD_ACTIVE
	.comm	_mmCP_HQD_DEQUEUE_REQUEST,4,2   ## @mmCP_HQD_DEQUEUE_REQUEST
	.comm	_AMDGPU_MAX_USEC_TIMEOUT,4,2    ## @AMDGPU_MAX_USEC_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KIQ dequeue request failed.\n"

	.comm	_mmCP_HQD_IQ_TIMER,4,2          ## @mmCP_HQD_IQ_TIMER
	.comm	_mmCP_HQD_IB_CONTROL,4,2        ## @mmCP_HQD_IB_CONTROL
	.comm	_mmCP_HQD_PERSISTENT_STATE,4,2  ## @mmCP_HQD_PERSISTENT_STATE
	.comm	_mmCP_HQD_PQ_DOORBELL_CONTROL,4,2 ## @mmCP_HQD_PQ_DOORBELL_CONTROL
	.comm	_mmCP_HQD_PQ_RPTR,4,2           ## @mmCP_HQD_PQ_RPTR
	.comm	_mmCP_HQD_PQ_WPTR_HI,4,2        ## @mmCP_HQD_PQ_WPTR_HI
	.comm	_mmCP_HQD_PQ_WPTR_LO,4,2        ## @mmCP_HQD_PQ_WPTR_LO
	.no_dead_strip	_gfx_v9_0_kiq_fini_register
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v9_0_kiq_fini_register
_gfx_v9_0_kiq_fini_register:            ; @gfx_v9_0_kiq_fini_register
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	x22, [x0]
Lloh0:
	adrp	x19, _GC@GOTPAGE
Lloh1:
	ldr	x19, [x19, _GC@GOTPAGEOFF]
	ldr	w0, [x19]
Lloh2:
	adrp	x20, _mmCP_HQD_ACTIVE@GOTPAGE
Lloh3:
	ldr	x20, [x20, _mmCP_HQD_ACTIVE@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_RREG32_SOC15
	tbz	w0, #0, LBB0_9
; %bb.1:
	ldr	w0, [x19]
Lloh4:
	adrp	x21, _mmCP_HQD_DEQUEUE_REQUEST@GOTPAGE
Lloh5:
	ldr	x21, [x21, _mmCP_HQD_DEQUEUE_REQUEST@GOTPAGEOFF]
	ldr	w2, [x21]
	mov	w1, #0
	mov	w3, #1
	bl	_WREG32_SOC15_RLC
	ldr	w8, [x22]
	cmp	w8, #1
	b.lt	LBB0_5
; %bb.2:
	mov	w23, #0
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x19]
	ldr	w2, [x20]
	mov	w1, #0
	bl	_RREG32_SOC15
	tbz	w0, #0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_udelay
	add	w23, w23, #1
	ldr	w8, [x22]
	cmp	w23, w8
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	mov	w23, #0
LBB0_6:
Lloh6:
	adrp	x8, _AMDGPU_MAX_USEC_TIMEOUT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AMDGPU_MAX_USEC_TIMEOUT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	cmp	w23, w8
	b.ne	LBB0_8
; %bb.7:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w0, [x19]
	ldr	w2, [x20]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
LBB0_8:
	ldr	w0, [x19]
	ldr	w2, [x21]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
LBB0_9:
	ldr	w0, [x19]
Lloh11:
	adrp	x8, _mmCP_HQD_IQ_TIMER@GOTPAGE
Lloh12:
	ldr	x8, [x8, _mmCP_HQD_IQ_TIMER@GOTPAGEOFF]
Lloh13:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
Lloh14:
	adrp	x8, _mmCP_HQD_IB_CONTROL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _mmCP_HQD_IB_CONTROL@GOTPAGEOFF]
Lloh16:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
Lloh17:
	adrp	x8, _mmCP_HQD_PERSISTENT_STATE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _mmCP_HQD_PERSISTENT_STATE@GOTPAGEOFF]
Lloh19:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
Lloh20:
	adrp	x20, _mmCP_HQD_PQ_DOORBELL_CONTROL@GOTPAGE
Lloh21:
	ldr	x20, [x20, _mmCP_HQD_PQ_DOORBELL_CONTROL@GOTPAGEOFF]
	ldr	w2, [x20]
	mov	w1, #0
	mov	w3, #1073741824
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
	ldr	w2, [x20]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
Lloh22:
	adrp	x8, _mmCP_HQD_PQ_RPTR@GOTPAGE
Lloh23:
	ldr	x8, [x8, _mmCP_HQD_PQ_RPTR@GOTPAGEOFF]
Lloh24:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
Lloh25:
	adrp	x8, _mmCP_HQD_PQ_WPTR_HI@GOTPAGE
Lloh26:
	ldr	x8, [x8, _mmCP_HQD_PQ_WPTR_HI@GOTPAGEOFF]
Lloh27:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	ldr	w0, [x19]
Lloh28:
	adrp	x8, _mmCP_HQD_PQ_WPTR_LO@GOTPAGE
Lloh29:
	ldr	x8, [x8, _mmCP_HQD_PQ_WPTR_LO@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	mov	w1, #0
	mov	w3, #0
	bl	_WREG32_SOC15_RLC
	mov	w0, #0
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_GC,4,2                         ; @GC
	.comm	_mmCP_HQD_ACTIVE,4,2            ; @mmCP_HQD_ACTIVE
	.comm	_mmCP_HQD_DEQUEUE_REQUEST,4,2   ; @mmCP_HQD_DEQUEUE_REQUEST
	.comm	_AMDGPU_MAX_USEC_TIMEOUT,4,2    ; @AMDGPU_MAX_USEC_TIMEOUT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KIQ dequeue request failed.\n"

	.comm	_mmCP_HQD_IQ_TIMER,4,2          ; @mmCP_HQD_IQ_TIMER
	.comm	_mmCP_HQD_IB_CONTROL,4,2        ; @mmCP_HQD_IB_CONTROL
	.comm	_mmCP_HQD_PERSISTENT_STATE,4,2  ; @mmCP_HQD_PERSISTENT_STATE
	.comm	_mmCP_HQD_PQ_DOORBELL_CONTROL,4,2 ; @mmCP_HQD_PQ_DOORBELL_CONTROL
	.comm	_mmCP_HQD_PQ_RPTR,4,2           ; @mmCP_HQD_PQ_RPTR
	.comm	_mmCP_HQD_PQ_WPTR_HI,4,2        ; @mmCP_HQD_PQ_WPTR_HI
	.comm	_mmCP_HQD_PQ_WPTR_LO,4,2        ; @mmCP_HQD_PQ_WPTR_LO
	.no_dead_strip	_gfx_v9_0_kiq_fini_register
.subsections_via_symbols
