	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_bo_move_m2mf
_nouveau_bo_move_m2mf:                  ## @nouveau_bo_move_m2mf
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r14
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movl	%esi, -44(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r13
	movl	4(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %r15
	movq	8(%rax), %rbx
	movq	(%rbx), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	16(%r15), %rax
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_2
## %bb.1:
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r14, %rdx
	callq	_nouveau_bo_move_prep
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_7
LBB0_2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	_SINGLE_DEPTH_NESTING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_lock_nested
	movq	%r13, %rdi
	callq	_nouveau_bo
	movl	%eax, %edi
	movq	%rbx, %rsi
	movl	$1, %edx
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	callq	_nouveau_fence_sync
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	%r13, %rdx
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	*(%r15)
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.4:
	leaq	-72(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_nouveau_fence_new
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_6
## %bb.5:
	movq	-72(%rbp), %rsi
	movq	%r13, %rdi
	movl	-44(%rbp), %edx                 ## 4-byte Reload
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	callq	_ttm_bo_move_accel_cleanup
	movl	%eax, %r12d
	leaq	-72(%rbp), %rdi
	callq	_nouveau_fence_unref
LBB0_6:
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_7:
	movl	%r12d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.comm	_SINGLE_DEPTH_NESTING,4,2       ## @SINGLE_DEPTH_NESTING
	.no_dead_strip	_nouveau_bo_move_m2mf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_bo_move_m2mf
_nouveau_bo_move_m2mf:                  ; @nouveau_bo_move_m2mf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x20, x4
	mov	x25, x2
	mov	x21, x1
	mov	x22, x0
	ldr	w0, [x0, #4]
	bl	_nouveau_bdev
	mov	x24, x0
	ldp	x23, x8, [x0, #8]
	ldr	x19, [x23]
Lloh0:
	adrp	x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_2
; %bb.1:
	mov	x0, x24
	mov	x1, x22
	mov	x2, x20
	bl	_nouveau_bo_move_prep
	mov	x26, x0
	cbnz	w0, LBB0_7
LBB0_2:
Lloh3:
	adrp	x8, _SINGLE_DEPTH_NESTING@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SINGLE_DEPTH_NESTING@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_mutex_lock_nested
	mov	x0, x22
	bl	_nouveau_bo
	mov	x1, x23
	mov	w2, #1
	mov	x3, x25
	bl	_nouveau_fence_sync
	mov	x26, x0
	cbnz	w0, LBB0_6
; %bb.3:
	ldr	x8, [x24]
	mov	x0, x23
	mov	x1, x22
	mov	x2, x22
	mov	x3, x20
	blr	x8
	mov	x26, x0
	cbnz	w0, LBB0_6
; %bb.4:
	add	x2, sp, #8
	mov	x0, x23
	mov	w1, #0
	bl	_nouveau_fence_new
	mov	x26, x0
	cbnz	w0, LBB0_6
; %bb.5:
	ldr	x1, [sp, #8]
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	_ttm_bo_move_accel_cleanup
	mov	x26, x0
	add	x0, sp, #8
	bl	_nouveau_fence_unref
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_7:
	mov	x0, x26
	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
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.comm	_SINGLE_DEPTH_NESTING,4,2       ; @SINGLE_DEPTH_NESTING
	.no_dead_strip	_nouveau_bo_move_m2mf
.subsections_via_symbols
