	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	32(%rdi), %rax
	movq	(%rax), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	(%rcx), %r13
	movl	8(%rdi), %edi
	callq	_dma_resv_add_excl_fence
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.1:
	movq	%r12, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	callq	_ttm_bo_wait
	testl	%eax, %eax
	jne	LBB0_10
## %bb.2:
	movq	_TTM_MEMTYPE_FLAG_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, (%rcx,%r13,4)
	je	LBB0_4
## %bb.3:
	movq	(%r12), %rdi
	callq	_ttm_tt_destroy
	movq	$0, (%r12)
LBB0_4:
	movq	%r12, %rdi
	callq	_ttm_bo_free_old_node
	jmp	LBB0_9
LBB0_5:
	movl	12(%r12), %edi
	callq	_dma_fence_put
	movq	%r15, %rdi
	callq	_dma_fence_get
	movl	%eax, 12(%r12)
	leaq	-48(%rbp), %rsi
	movq	%r12, %rdi
	callq	_ttm_buffer_object_transfer
	testl	%eax, %eax
	jne	LBB0_10
## %bb.6:
	movq	-48(%rbp), %rax
	movl	8(%rax), %edi
	movq	%r15, %rsi
	callq	_dma_resv_add_excl_fence
	movq	_TTM_MEMTYPE_FLAG_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	%r12, %rax
	movq	-56(%rbp), %rdx                 ## 8-byte Reload
	andl	(%rdx,%r13,4), %ecx
	jne	LBB0_8
## %bb.7:
	movq	-48(%rbp), %rax
LBB0_8:
	movq	$0, (%rax)
	movq	-48(%rbp), %rdi
	callq	_ttm_bo_unreserve
	movq	-48(%rbp), %rdi
	callq	_ttm_bo_put
LBB0_9:
	addq	$16, %r12
	movups	(%r14), %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 8(%r14)
	xorl	%eax, %eax
LBB0_10:
	addq	$24, %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
.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, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x3
	mov	x22, x2
	mov	x21, x1
	mov	x20, x0
	ldr	x8, [x0, #32]
	ldr	x23, [x8]
	ldr	x24, [x3]
	ldr	w0, [x0, #8]
	bl	_dma_resv_add_excl_fence
	cbz	w22, LBB0_5
; %bb.1:
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	bl	_ttm_bo_wait
	cbnz	w0, LBB0_8
; %bb.2:
	ldr	w8, [x23, x24, 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_4
; %bb.3:
	ldr	x0, [x20]
	bl	_ttm_tt_destroy
	str	xzr, [x20]
LBB0_4:
	mov	x0, x20
	bl	_ttm_bo_free_old_node
	b	LBB0_7
LBB0_5:
	ldr	w0, [x20, #12]
	bl	_dma_fence_put
	mov	x0, x21
	bl	_dma_fence_get
	str	w0, [x20, #12]
	add	x1, sp, #8
	mov	x0, x20
	bl	_ttm_buffer_object_transfer
	cbnz	w0, LBB0_8
; %bb.6:
	ldr	x8, [sp, #8]
	ldr	w0, [x8, #8]
	mov	x1, x21
	bl	_dma_resv_add_excl_fence
	ldr	w8, [x23, x24, lsl #2]
Lloh3:
	adrp	x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGEOFF]
Lloh5:
	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
	ldr	x0, [sp, #8]
	bl	_ttm_bo_put
LBB0_7:
	mov	w0, #0
	ldr	q0, [x19]
	add	x8, x20, #16
	str	q0, [x8]
	str	xzr, [x19, #8]
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ; @TTM_MEMTYPE_FLAG_FIXED
.subsections_via_symbols
