	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_clean_mm                ## -- Begin function ttm_bo_clean_mm
	.p2align	4, 0x90
_ttm_bo_clean_mm:                       ## @ttm_bo_clean_mm
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	movq	_TTM_NUM_MEM_TYPES@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jbe	LBB0_1
## %bb.3:
	movq	(%rdi), %r15
	movl	%esi, %eax
	leaq	(%rax,%rax,2), %r12
	cmpl	$0, (%r15,%r12,8)
	je	LBB0_4
## %bb.5:
	leaq	(%r15,%r12,8), %r14
	movl	$0, 4(%r15,%r12,8)
	movl	$0, (%r14)
	testl	%esi, %esi
	je	LBB0_6
## %bb.7:
	callq	_ttm_bo_force_list_clean
	testl	%eax, %eax
	je	LBB0_9
## %bb.8:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_11
LBB0_1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_2
LBB0_4:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%eax, %eax
	callq	_pr_err
	jmp	LBB0_11
LBB0_6:
	xorl	%ebx, %ebx
	jmp	LBB0_10
LBB0_9:
	movq	16(%r15,%r12,8), %rax
	movq	%r14, %rdi
	callq	*(%rax)
	movl	%eax, %ebx
LBB0_10:
	movq	8(%r15,%r12,8), %rdi
	callq	_dma_fence_put
	movq	$0, 8(%r15,%r12,8)
LBB0_11:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_TTM_NUM_MEM_TYPES,4,2          ## @TTM_NUM_MEM_TYPES
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Illegal memory type %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Trying to take down uninitialized memory manager type %u\n"

L_.str.2:                               ## @.str.2
	.asciz	"Cleanup eviction failed\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_clean_mm                ; -- Begin function ttm_bo_clean_mm
	.p2align	2
_ttm_bo_clean_mm:                       ; @ttm_bo_clean_mm
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
                                        ; kill: def $w1 killed $w1 def $x1
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w19, w8
Lloh3:
	adrp	x8, _TTM_NUM_MEM_TYPES@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TTM_NUM_MEM_TYPES@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ls	LBB0_5
; %bb.1:
	ldr	x21, [x0]
	mov	w8, #24
	umaddl	x20, w1, w8, x21
	ldr	w8, [x20]
	cbz	w8, LBB0_6
; %bb.2:
	mov	w22, w1
	str	xzr, [x20]
	cbz	w1, LBB0_7
; %bb.3:
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_ttm_bo_force_list_clean
	cbz	w0, LBB0_8
; %bb.4:
	mov	x19, x0
Lloh6:
	adrp	x0, l_.str.2@PAGE
Lloh7:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_5:
	str	x1, [sp]
Lloh8:
	adrp	x0, l_.str@PAGE
Lloh9:
	add	x0, x0, l_.str@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_6:
                                        ; kill: def $w1 killed $w1 killed $x1 def $x1
	str	x1, [sp]
Lloh10:
	adrp	x0, l_.str.1@PAGE
Lloh11:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	b	LBB0_10
LBB0_7:
	mov	w19, #0
	b	LBB0_9
LBB0_8:
	mov	w8, #24
	madd	x8, x22, x8, x21
	ldr	x8, [x8, #16]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	mov	x19, x0
LBB0_9:
	mov	w8, #24
	madd	x20, x22, x8, x21
	ldr	x0, [x20, #8]
	bl	_dma_fence_put
	str	xzr, [x20, #8]
LBB0_10:
	mov	x0, x19
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_TTM_NUM_MEM_TYPES,4,2          ; @TTM_NUM_MEM_TYPES
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Illegal memory type %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Trying to take down uninitialized memory manager type %u\n"

l_.str.2:                               ; @.str.2
	.asciz	"Cleanup eviction failed\n"

.subsections_via_symbols
