	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gfx_v10_0_hw_fini
_gfx_v10_0_hw_fini:                     ## @gfx_v10_0_hw_fini
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	4(%rdi), %rsi
	xorl	%edx, %edx
	callq	_amdgpu_irq_put
	movq	%rbx, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_amdgpu_irq_put
	movq	_amdgpu_async_gfx_ring@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	callq	_gfx_v10_0_kiq_disable_kgq
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rdi
	callq	_DRM_ERROR
LBB0_3:
	movq	%rbx, %rdi
	callq	_amdgpu_gfx_disable_kcq
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_ERROR
LBB0_5:
	movq	%rbx, %rdi
	callq	_amdgpu_sriov_vf
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.2(%rip), %rdi
	callq	_pr_debug
	jmp	LBB0_8
LBB0_7:
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gfx_v10_0_cp_enable
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_gfx_v10_0_enable_gui_idle_interrupt
	movq	%rbx, %rdi
	callq	_gfx_v10_0_csb_vram_unpin
LBB0_8:
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_amdgpu_async_gfx_ring,8,3      ## @amdgpu_async_gfx_ring
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"KGQ disable failed\n"

L_.str.1:                               ## @.str.1
	.asciz	"KCQ disable failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"For SRIOV client, shouldn't do anything.\n"

	.no_dead_strip	_gfx_v10_0_hw_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gfx_v10_0_hw_fini
_gfx_v10_0_hw_fini:                     ; @gfx_v10_0_hw_fini
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
	add	x1, x0, #4
	mov	w2, #0
	bl	_amdgpu_irq_put
	mov	x0, x19
	mov	x1, x19
	mov	w2, #0
	bl	_amdgpu_irq_put
Lloh0:
	adrp	x8, _amdgpu_async_gfx_ring@GOTPAGE
Lloh1:
	ldr	x8, [x8, _amdgpu_async_gfx_ring@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cbz	x8, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_gfx_v10_0_kiq_disable_kgq
	cbz	w0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_ERROR
LBB0_3:
	mov	x0, x19
	bl	_amdgpu_gfx_disable_kcq
	cbz	x0, LBB0_5
; %bb.4:
Lloh5:
	adrp	x0, l_.str.1@PAGE
Lloh6:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
LBB0_5:
	mov	x0, x19
	bl	_amdgpu_sriov_vf
	cbz	x0, LBB0_7
; %bb.6:
Lloh7:
	adrp	x0, l_.str.2@PAGE
Lloh8:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_debug
	b	LBB0_8
LBB0_7:
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_v10_0_cp_enable
	mov	x0, x19
	mov	w1, #0
	bl	_gfx_v10_0_enable_gui_idle_interrupt
	mov	x0, x19
	bl	_gfx_v10_0_csb_vram_unpin
LBB0_8:
	mov	w0, #0
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_amdgpu_async_gfx_ring,8,3      ; @amdgpu_async_gfx_ring
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"KGQ disable failed\n"

l_.str.1:                               ; @.str.1
	.asciz	"KCQ disable failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"For SRIOV client, shouldn't do anything.\n"

	.no_dead_strip	_gfx_v10_0_hw_fini
.subsections_via_symbols
