	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ttm_fini                ## -- Begin function amdgpu_ttm_fini
	.p2align	4, 0x90
_amdgpu_ttm_fini:                       ## @amdgpu_ttm_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
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	cmpl	$0, (%rdi)
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	callq	_amdgpu_ttm_debugfs_fini
	movq	%r14, %rdi
	callq	_amdgpu_ttm_fw_reserve_vram_fini
	movq	8(%r14), %rdi
	testq	%rdi, %rdi
	je	LBB0_3
## %bb.2:
	callq	_iounmap
LBB0_3:
	movq	$0, 8(%r14)
	leaq	4(%r14), %rbx
	movq	_TTM_PL_VRAM@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_clean_mm
	movq	_TTM_PL_TT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_clean_mm
	movq	_AMDGPU_PL_GDS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_clean_mm
	movq	_AMDGPU_PL_GWS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_clean_mm
	movq	_AMDGPU_PL_OA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_clean_mm
	movq	%rbx, %rdi
	callq	_ttm_bo_device_release
	movl	$0, (%r14)
	leaq	L_.str(%rip), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_DRM_INFO                       ## TAILCALL
LBB0_4:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_VRAM,4,2                ## @TTM_PL_VRAM
	.comm	_TTM_PL_TT,4,2                  ## @TTM_PL_TT
	.comm	_AMDGPU_PL_GDS,4,2              ## @AMDGPU_PL_GDS
	.comm	_AMDGPU_PL_GWS,4,2              ## @AMDGPU_PL_GWS
	.comm	_AMDGPU_PL_OA,4,2               ## @AMDGPU_PL_OA
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"amdgpu: ttm finalized\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_amdgpu_ttm_fini                ; -- Begin function amdgpu_ttm_fini
	.p2align	2
_amdgpu_ttm_fini:                       ; @amdgpu_ttm_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
	ldr	w8, [x0]
	cbz	w8, LBB0_4
; %bb.1:
	mov	x19, x0
	bl	_amdgpu_ttm_debugfs_fini
	mov	x0, x19
	bl	_amdgpu_ttm_fw_reserve_vram_fini
	ldr	x0, [x19, #8]
	cbz	x0, LBB0_3
; %bb.2:
	bl	_iounmap
LBB0_3:
	str	xzr, [x19, #8]
	add	x20, x19, #4
Lloh0:
	adrp	x8, _TTM_PL_VRAM@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_PL_VRAM@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ttm_bo_clean_mm
Lloh3:
	adrp	x8, _TTM_PL_TT@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TTM_PL_TT@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ttm_bo_clean_mm
Lloh6:
	adrp	x8, _AMDGPU_PL_GDS@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AMDGPU_PL_GDS@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ttm_bo_clean_mm
Lloh9:
	adrp	x8, _AMDGPU_PL_GWS@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AMDGPU_PL_GWS@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ttm_bo_clean_mm
Lloh12:
	adrp	x8, _AMDGPU_PL_OA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _AMDGPU_PL_OA@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_ttm_bo_clean_mm
	mov	x0, x20
	bl	_ttm_bo_device_release
	str	wzr, [x19]
Lloh15:
	adrp	x0, l_.str@PAGE
Lloh16:
	add	x0, x0, l_.str@PAGEOFF
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_DRM_INFO
LBB0_4:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_VRAM,4,2                ; @TTM_PL_VRAM
	.comm	_TTM_PL_TT,4,2                  ; @TTM_PL_TT
	.comm	_AMDGPU_PL_GDS,4,2              ; @AMDGPU_PL_GDS
	.comm	_AMDGPU_PL_GWS,4,2              ; @AMDGPU_PL_GWS
	.comm	_AMDGPU_PL_OA,4,2               ; @AMDGPU_PL_OA
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"amdgpu: ttm finalized\n"

.subsections_via_symbols
