	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_device_release          ## -- Begin function ttm_bo_device_release
	.p2align	4, 0x90
_ttm_bo_device_release:                 ## @ttm_bo_device_release
	.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, %r12
	movq	_TTM_NUM_MEM_TYPES@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movq	24(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	decl	%r15d
	movq	%r15, %rbx
	shlq	$4, %rbx
	xorl	%r14d, %r14d
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, (%r13,%rbx)
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	addq	$-16, %rbx
	addl	$-1, %r15d
	jae	LBB0_9
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %r13
	cmpl	$0, (%r13,%rbx)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	$0, 4(%r13,%rbx)
	movq	_TTM_PL_SYSTEM@GOTPCREL(%rip), %rax
	cmpl	(%rax), %r15d
	je	LBB0_7
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_ttm_bo_clean_mm
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	xorl	%r14d, %r14d
	movq	_EBUSY@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	callq	_pr_err
	jmp	LBB0_7
LBB0_1:
	xorl	%r14d, %r14d
LBB0_9:
	movq	_ttm_global_mutex@GOTPCREL(%rip), %rbx
	movq	%rbx, %rdi
	callq	_mutex_lock
	leaq	20(%r12), %rdi
	callq	_list_del
	movq	%rbx, %rdi
	callq	_mutex_unlock
	leaq	16(%r12), %rdi
	callq	_cancel_delayed_work_sync
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_ttm_bo_delayed_delete
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_pr_debug
LBB0_11:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_lock
	movq	_TTM_MAX_BO_PRIORITY@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	je	LBB0_16
## %bb.12:
	leaq	L_.str.2(%rip), %r13
	xorl	%ebx, %ebx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_15:                                ##   in Loop: Header=BB0_13 Depth=1
	incl	%ebx
	cmpl	(%r15), %ebx
	jae	LBB0_16
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movq	8(%r12), %rax
	movq	8(%rax), %rdi
	callq	_list_empty
	testq	%rax, %rax
	je	LBB0_15
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	%r13, %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_pr_debug
	jmp	LBB0_15
LBB0_16:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_spin_unlock
	movq	%r12, %rdi
	callq	_drm_vma_offset_manager_destroy
	testl	%r14d, %r14d
	jne	LBB0_18
## %bb.17:
	xorl	%eax, %eax
	callq	_ttm_bo_global_release
LBB0_18:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_NUM_MEM_TYPES,4,2          ## @TTM_NUM_MEM_TYPES
	.comm	_TTM_PL_SYSTEM,4,2              ## @TTM_PL_SYSTEM
	.comm	_EBUSY,4,2                      ## @EBUSY
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"DRM memory manager type %d is not clean\n"

	.comm	_ttm_global_mutex,4,2           ## @ttm_global_mutex
L_.str.1:                               ## @.str.1
	.asciz	"Delayed destroy list was clean\n"

	.comm	_TTM_MAX_BO_PRIORITY,4,2        ## @TTM_MAX_BO_PRIORITY
L_.str.2:                               ## @.str.2
	.asciz	"Swap list %d was clean\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_device_release          ; -- Begin function ttm_bo_device_release
	.p2align	2
_ttm_bo_device_release:                 ; @ttm_bo_device_release
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x0
Lloh0:
	adrp	x8, _TTM_NUM_MEM_TYPES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_NUM_MEM_TYPES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldr	x21, [x0, #24]
	mov	w20, #0
	cbz	w8, LBB0_8
; %bb.1:
	sub	w22, w8, #1
	lsl	x24, x22, #4
Lloh3:
	adrp	x25, _TTM_PL_SYSTEM@GOTPAGE
Lloh4:
	ldr	x25, [x25, _TTM_PL_SYSTEM@GOTPAGEOFF]
Lloh5:
	adrp	x26, _EBUSY@GOTPAGE
Lloh6:
	ldr	x26, [x26, _EBUSY@GOTPAGEOFF]
Lloh7:
	adrp	x23, l_.str@PAGE
Lloh8:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	wzr, [x27, x24]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x24, x24, #16
	sub	w22, w22, #1
	cmn	w22, #1
	b.eq	LBB0_8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x27, [x19, #8]
	ldr	w8, [x27, x24]
	cbz	w8, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	add	x8, x27, x24
	str	wzr, [x8, #4]
	ldr	w8, [x25]
	cmp	w22, w8
	b.eq	LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x22
	bl	_ttm_bo_clean_mm
	cbz	x0, LBB0_2
; %bb.7:                                ;   in Loop: Header=BB0_4 Depth=1
	ldr	w8, [x26]
	neg	w20, w8
	mov	x0, x23
	mov	x1, x22
	bl	_pr_err
	b	LBB0_2
LBB0_8:
Lloh9:
	adrp	x22, _ttm_global_mutex@GOTPAGE
Lloh10:
	ldr	x22, [x22, _ttm_global_mutex@GOTPAGEOFF]
	mov	x0, x22
	bl	_mutex_lock
	add	x0, x19, #20
	bl	_list_del
	mov	x0, x22
	bl	_mutex_unlock
	add	x0, x19, #16
	bl	_cancel_delayed_work_sync
	mov	x0, x19
	mov	w1, #1
	bl	_ttm_bo_delayed_delete
	cbz	x0, LBB0_10
; %bb.9:
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_debug
LBB0_10:
	mov	x0, x21
	bl	_spin_lock
Lloh13:
	adrp	x23, _TTM_MAX_BO_PRIORITY@GOTPAGE
Lloh14:
	ldr	x23, [x23, _TTM_MAX_BO_PRIORITY@GOTPAGEOFF]
	ldr	w8, [x23]
	cbz	w8, LBB0_15
; %bb.11:
	mov	w24, #0
Lloh15:
	adrp	x22, l_.str.2@PAGE
Lloh16:
	add	x22, x22, l_.str.2@PAGEOFF
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	add	w24, w24, #1
	ldr	w8, [x23]
	cmp	w24, w8
	b.hs	LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x0, [x8, #8]
	bl	_list_empty
	cbz	x0, LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	str	x24, [sp]
	mov	x0, x22
	bl	_pr_debug
	b	LBB0_12
LBB0_15:
	mov	x0, x21
	bl	_spin_unlock
	mov	x0, x19
	bl	_drm_vma_offset_manager_destroy
	cbnz	w20, LBB0_17
; %bb.16:
	bl	_ttm_bo_global_release
LBB0_17:
	mov	x0, x20
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_NUM_MEM_TYPES,4,2          ; @TTM_NUM_MEM_TYPES
	.comm	_TTM_PL_SYSTEM,4,2              ; @TTM_PL_SYSTEM
	.comm	_EBUSY,4,2                      ; @EBUSY
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"DRM memory manager type %d is not clean\n"

	.comm	_ttm_global_mutex,4,2           ; @ttm_global_mutex
l_.str.1:                               ; @.str.1
	.asciz	"Delayed destroy list was clean\n"

	.comm	_TTM_MAX_BO_PRIORITY,4,2        ; @TTM_MAX_BO_PRIORITY
l_.str.2:                               ; @.str.2
	.asciz	"Swap list %d was clean\n"

.subsections_via_symbols
