	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_move_accel_cleanup      ## -- Begin function ttm_bo_move_accel_cleanup
	.p2align	4, 0x90
_ttm_bo_move_accel_cleanup:             ## @ttm_bo_move_accel_cleanup
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, -60(%rbp)                 ## 4-byte Spill
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	40(%rdi), %rbx
	movq	8(%rbx), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	16(%rbx), %r13
	movq	%r8, -88(%rbp)                  ## 8-byte Spill
	movq	(%r8), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	$0, -48(%rbp)
	movq	%rbx, %rdi
	callq	_spin_lock
	movq	16(%r15), %r14
	testq	%r14, %r14
	je	LBB0_1
## %bb.2:
	movq	%r14, -48(%rbp)
	movq	$0, 16(%r15)
	jmp	LBB0_3
LBB0_1:
	xorl	%r14d, %r14d
LBB0_3:
	movq	%r12, %rdi
	callq	*8(%r13)
	movq	%rax, 16(%r15)
	cmpl	$0, -60(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_11
## %bb.4:
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_ttm_bo_wait
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_spin_unlock
	testq	%r14, %r14
	je	LBB0_6
## %bb.5:
	leaq	-48(%rbp), %rdi
	callq	*(%r13)
LBB0_6:
	testl	%r12d, %r12d
	jne	LBB0_18
## %bb.7:
	movq	_TTM_MEMTYPE_FLAG_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	testl	%eax, (%rcx,%rdx,4)
	je	LBB0_10
## %bb.8:
	movq	(%r15), %rdi
	testq	%rdi, %rdi
	je	LBB0_10
## %bb.9:
	callq	_ttm_tt_unbind
	movq	(%r15), %rdi
	callq	_ttm_tt_destroy
	movq	$0, (%r15)
LBB0_10:
	movq	%r15, %rdi
	callq	_ttm_bo_free_old_node
	jmp	LBB0_17
LBB0_11:
	movq	_TTM_BO_PRIV_FLAG_MOVING@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	8(%r15), %rsi
	callq	_set_bit
	movq	%rbx, %rdi
	callq	_spin_unlock
	testq	%r14, %r14
	je	LBB0_13
## %bb.12:
	leaq	-48(%rbp), %rdi
	callq	*(%r13)
LBB0_13:
	leaq	-56(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ttm_buffer_object_transfer
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_18
## %bb.14:
	movq	_TTM_MEMTYPE_FLAG_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r15, %rax
	movq	-80(%rbp), %rdx                 ## 8-byte Reload
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	andl	(%rdx,%rsi,4), %ecx
	jne	LBB0_16
## %bb.15:
	movq	-56(%rbp), %rax
LBB0_16:
	movq	$0, (%rax)
	movq	-56(%rbp), %rdi
	callq	_ttm_bo_unreserve
	leaq	-56(%rbp), %rdi
	callq	_ttm_bo_unref
LBB0_17:
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	addq	$24, %r15
	movups	(%rax), %xmm0
	movups	%xmm0, (%r15)
	movq	$0, 8(%rax)
	xorl	%r12d, %r12d
LBB0_18:
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ## @TTM_MEMTYPE_FLAG_FIXED
	.comm	_TTM_BO_PRIV_FLAG_MOVING,4,2    ## @TTM_BO_PRIV_FLAG_MOVING
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_move_accel_cleanup      ; -- Begin function ttm_bo_move_accel_cleanup
	.p2align	2
_ttm_bo_move_accel_cleanup:             ; @ttm_bo_move_accel_cleanup
	.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, x4
	mov	x22, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x21, [x0, #40]
	ldp	x24, x26, [x21, #8]
	ldr	x25, [x4]
	str	xzr, [sp]
	mov	x0, x21
	bl	_spin_lock
	ldr	x27, [x20, #16]
	cbz	x27, LBB0_2
; %bb.1:
	str	x27, [sp]
	str	xzr, [x20, #16]
LBB0_2:
	ldr	x8, [x26, #8]
	mov	x0, x23
	blr	x8
	str	x0, [x20, #16]
	cbz	w22, LBB0_10
; %bb.3:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	w3, #0
	bl	_ttm_bo_wait
	mov	x22, x0
	mov	x0, x21
	bl	_spin_unlock
	cbz	x27, LBB0_5
; %bb.4:
	ldr	x8, [x26]
	mov	x0, sp
	blr	x8
LBB0_5:
	cbnz	w22, LBB0_15
; %bb.6:
	ldr	w8, [x24, x25, lsl #2]
Lloh0:
	adrp	x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGE
Lloh1:
	ldr	x9, [x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_9
; %bb.7:
	ldr	x0, [x20]
	cbz	x0, LBB0_9
; %bb.8:
	bl	_ttm_tt_unbind
	ldr	x0, [x20]
	bl	_ttm_tt_destroy
	str	xzr, [x20]
LBB0_9:
	mov	x0, x20
	bl	_ttm_bo_free_old_node
	b	LBB0_14
LBB0_10:
Lloh3:
	adrp	x8, _TTM_BO_PRIV_FLAG_MOVING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _TTM_BO_PRIV_FLAG_MOVING@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	add	x1, x20, #8
	bl	_set_bit
	mov	x0, x21
	bl	_spin_unlock
	cbz	x27, LBB0_12
; %bb.11:
	ldr	x8, [x26]
	mov	x0, sp
	blr	x8
LBB0_12:
	add	x1, sp, #8
	mov	x0, x20
	bl	_ttm_buffer_object_transfer
	mov	x22, x0
	cbnz	w0, LBB0_15
; %bb.13:
	ldr	w8, [x24, x25, lsl #2]
Lloh6:
	adrp	x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	ldr	x10, [sp, #8]
	tst	w9, w8
	csel	x8, x10, x20, eq
	str	xzr, [x8]
	ldr	x0, [sp, #8]
	bl	_ttm_bo_unreserve
	add	x0, sp, #8
	bl	_ttm_bo_unref
LBB0_14:
	mov	w22, #0
	ldr	q0, [x19]
	add	x8, x20, #24
	str	q0, [x8]
	str	xzr, [x19, #8]
LBB0_15:
	mov	x0, x22
	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 AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ; @TTM_MEMTYPE_FLAG_FIXED
	.comm	_TTM_BO_PRIV_FLAG_MOVING,4,2    ; @TTM_BO_PRIV_FLAG_MOVING
.subsections_via_symbols
