	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_bo_move_buffer
_ttm_bo_move_buffer:                    ## @ttm_bo_move_buffer
	.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	%rbx
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	%rsi, %rbx
	movq	%rdi, %r15
	movl	8(%rdi), %edi
	callq	_dma_resv_assert_held
	movl	(%r15), %eax
	movl	%eax, -64(%rbp)
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %eax
	movl	%eax, -60(%rbp)
	movl	4(%r15), %eax
	movl	%eax, -32(%rbp)
	movl	$0, -48(%rbp)
	movq	$0, -40(%rbp)
	leaq	-64(%rbp), %rdx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	movq	%r14, %rcx
	callq	_ttm_bo_mem_space
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	xorl	%edx, %edx
	movq	%r14, %rcx
	callq	_ttm_bo_handle_move_mem
	movl	%eax, %ebx
LBB0_2:
	testl	%ebx, %ebx
	je	LBB0_5
## %bb.3:
	cmpq	$0, -56(%rbp)
	je	LBB0_5
## %bb.4:
	leaq	-64(%rbp), %rsi
	movq	%r15, %rdi
	callq	_ttm_bo_mem_put
LBB0_5:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.no_dead_strip	_ttm_bo_move_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_bo_move_buffer
_ttm_bo_move_buffer:                    ; @ttm_bo_move_buffer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	bl	_dma_resv_assert_held
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	ldp	w9, w10, [x19]
	lsl	w8, w9, w8
	stp	w9, w8, [sp, #8]
	str	w10, [sp, #40]
	str	wzr, [sp, #24]
	str	xzr, [sp, #32]
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x21
	mov	x3, x20
	bl	_ttm_bo_mem_space
	mov	x21, x0
	cbnz	w0, LBB0_2
; %bb.1:
	add	x1, sp, #8
	mov	x0, x19
	mov	w2, #0
	mov	x3, x20
	bl	_ttm_bo_handle_move_mem
	mov	x21, x0
LBB0_2:
	cbz	w21, LBB0_5
; %bb.3:
	ldr	x8, [sp, #16]
	cbz	x8, LBB0_5
; %bb.4:
	add	x1, sp, #8
	mov	x0, x19
	bl	_ttm_bo_mem_put
LBB0_5:
	mov	x0, x21
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.no_dead_strip	_ttm_bo_move_buffer
.subsections_via_symbols
