	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function gmc_v9_0_sw_fini
_gmc_v9_0_sw_fini:                      ## @gmc_v9_0_sw_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	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rdi, %rbx
	movq	_AMDGPU_RAS_BLOCK__UMC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_amdgpu_ras_is_supported
	testq	%rax, %rax
	je	LBB0_3
## %bb.1:
	movq	16(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_3
## %bb.2:
	movl	(%r14), %eax
	movl	%eax, -24(%rbp)
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_ras_debugfs_remove
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_ras_sysfs_remove
	leaq	-24(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_amdgpu_ras_interrupt_remove_handler
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_amdgpu_ras_feature_enable
	movq	%r14, %rdi
	callq	_kfree
LBB0_3:
	movq	_AMDGPU_RAS_BLOCK__MMHUB@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_amdgpu_ras_is_supported
	testq	%rax, %rax
	je	LBB0_6
## %bb.4:
	movq	8(%rbx), %r14
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_ras_debugfs_remove
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_amdgpu_ras_sysfs_remove
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_amdgpu_ras_feature_enable
	movq	%r14, %rdi
	callq	_kfree
LBB0_6:
	movq	%rbx, %rdi
	callq	_amdgpu_gem_force_release
	movq	%rbx, %rdi
	callq	_amdgpu_vm_manager_fini
	movq	%rbx, %rdi
	callq	_gmc_v9_0_keep_stolen_memory
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	leaq	-32(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_amdgpu_bo_free_kernel
LBB0_8:
	movq	%rbx, %rdi
	callq	_amdgpu_gart_table_vram_free
	movq	%rbx, %rdi
	callq	_amdgpu_bo_fini
	movq	%rbx, %rdi
	callq	_amdgpu_gart_fini
	xorl	%eax, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AMDGPU_RAS_BLOCK__UMC,4,2      ## @AMDGPU_RAS_BLOCK__UMC
	.comm	_AMDGPU_RAS_BLOCK__MMHUB,4,2    ## @AMDGPU_RAS_BLOCK__MMHUB
	.no_dead_strip	_gmc_v9_0_sw_fini
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function gmc_v9_0_sw_fini
_gmc_v9_0_sw_fini:                      ; @gmc_v9_0_sw_fini
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _AMDGPU_RAS_BLOCK__UMC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AMDGPU_RAS_BLOCK__UMC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_amdgpu_ras_is_supported
	cbz	x0, LBB0_3
; %bb.1:
	ldr	x20, [x19, #16]
	cbz	x20, LBB0_3
; %bb.2:
	ldr	w8, [x20]
	str	w8, [sp]
	mov	x0, x19
	mov	x1, x20
	bl	_amdgpu_ras_debugfs_remove
	mov	x0, x19
	mov	x1, x20
	bl	_amdgpu_ras_sysfs_remove
	mov	x1, sp
	mov	x0, x19
	bl	_amdgpu_ras_interrupt_remove_handler
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_amdgpu_ras_feature_enable
	mov	x0, x20
	bl	_kfree
LBB0_3:
Lloh3:
	adrp	x8, _AMDGPU_RAS_BLOCK__MMHUB@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AMDGPU_RAS_BLOCK__MMHUB@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_amdgpu_ras_is_supported
	cbz	x0, LBB0_6
; %bb.4:
	ldr	x20, [x19, #8]
	cbz	x20, LBB0_6
; %bb.5:
	mov	x0, x19
	mov	x1, x20
	bl	_amdgpu_ras_debugfs_remove
	mov	x0, x19
	mov	x1, x20
	bl	_amdgpu_ras_sysfs_remove
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	bl	_amdgpu_ras_feature_enable
	mov	x0, x20
	bl	_kfree
LBB0_6:
	mov	x0, x19
	bl	_amdgpu_gem_force_release
	mov	x0, x19
	bl	_amdgpu_vm_manager_fini
	mov	x0, x19
	bl	_gmc_v9_0_keep_stolen_memory
	cbz	x0, LBB0_8
; %bb.7:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, #0
	bl	_amdgpu_bo_free_kernel
LBB0_8:
	mov	x0, x19
	bl	_amdgpu_gart_table_vram_free
	mov	x0, x19
	bl	_amdgpu_bo_fini
	mov	x0, x19
	bl	_amdgpu_gart_fini
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AMDGPU_RAS_BLOCK__UMC,4,2      ; @AMDGPU_RAS_BLOCK__UMC
	.comm	_AMDGPU_RAS_BLOCK__MMHUB,4,2    ; @AMDGPU_RAS_BLOCK__MMHUB
	.no_dead_strip	_gmc_v9_0_sw_fini
.subsections_via_symbols
