	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_bo_move
_nouveau_bo_move:                       ## @nouveau_bo_move
	.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, -48(%rbp)                 ## 8-byte Spill
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movl	20(%rdi), %edi
	callq	_nouveau_bdev
	movq	%rax, %r15
	movq	%rbx, %rdi
	callq	_nouveau_bo
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	$0, -56(%rbp)
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_wait
	movl	%eax, %r12d
	testl	%eax, %eax
	je	LBB0_1
LBB0_22:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	cmpq	$0, 8(%rdx)
	je	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%r15, %rdi
	callq	_NV_WARN
LBB0_3:
	movq	(%r15), %rax
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_5
## %bb.4:
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	callq	_nouveau_bo_vm_bind
	movl	%eax, %r12d
	testl	%eax, %eax
	jne	LBB0_22
LBB0_5:
	movq	(%rbx), %rax
	movq	_TTM_PL_SYSTEM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rsi
	cmpq	%rsi, %rax
	jne	LBB0_8
## %bb.6:
	cmpl	$0, 16(%rbx)
	je	LBB0_7
LBB0_8:
	cmpq	$0, 8(%r15)
	je	LBB0_16
## %bb.9:
	movl	(%r13), %ecx
	movl	4(%r13), %edx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	cmpq	%rsi, (%r8)
	jne	LBB0_11
## %bb.10:
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_nouveau_bo_move_flipd
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_15
LBB0_11:
	movq	%rbx, %rdi
	cmpq	%rsi, %rax
	jne	LBB0_13
## %bb.12:
	movl	%r14d, %esi
	callq	_nouveau_bo_move_flips
	testl	%eax, %eax
	jne	LBB0_16
	jmp	LBB0_15
LBB0_7:
	xorl	%edi, %edi
	cmpq	$0, 8(%rbx)
	setne	%dil
	callq	_BUG_ON
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movups	(%rax), %xmm0
	movups	%xmm0, (%rbx)
	movq	$0, 8(%rax)
	jmp	LBB0_15
LBB0_13:
	movl	%r14d, %esi
	callq	_nouveau_bo_move_m2mf
	testl	%eax, %eax
	je	LBB0_15
LBB0_16:
	movl	(%r13), %edx
	movl	4(%r13), %esi
	movq	%rbx, %rdi
	callq	_ttm_bo_wait
	movl	%eax, %r12d
	testl	%eax, %eax
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %r14
	jne	LBB0_18
## %bb.17:
	movq	%rbx, %rdi
	movq	%r13, %rsi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	callq	_ttm_bo_move_memcpy
	movl	%eax, %r12d
	jmp	LBB0_18
LBB0_15:
	xorl	%r12d, %r12d
	movq	_NV_DEVICE_INFO_V0_TESLA@GOTPCREL(%rip), %r14
LBB0_18:
	movq	(%r15), %rax
	cmpq	(%r14), %rax
	jge	LBB0_22
## %bb.19:
	testl	%r12d, %r12d
	je	LBB0_21
## %bb.20:
	leaq	-56(%rbp), %rdx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_nouveau_bo_vm_cleanup
	jmp	LBB0_22
LBB0_21:
	movq	-56(%rbp), %rsi
	movq	%rbx, %rdi
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	callq	_nouveau_bo_vm_cleanup
	xorl	%r12d, %r12d
	jmp	LBB0_22
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Moving pinned object %p!\n"

	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ## @NV_DEVICE_INFO_V0_TESLA
	.comm	_TTM_PL_SYSTEM,8,3              ## @TTM_PL_SYSTEM
	.no_dead_strip	_nouveau_bo_move
.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
_nouveau_bo_move:                       ; @nouveau_bo_move
	.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	x22, x3
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	w0, [x0, #20]
	bl	_nouveau_bdev
	mov	x21, x0
	mov	x0, x19
	bl	_nouveau_bo
	mov	x20, x0
	str	xzr, [sp, #8]
	ldp	w2, w1, [x23]
	mov	x0, x19
	bl	_ttm_bo_wait
	mov	x25, x0
	cbz	w0, LBB0_2
LBB0_1:
	mov	x0, x25
	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
LBB0_2:
	ldr	x8, [x20, #8]
	cbz	x8, LBB0_4
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	mov	x2, x20
	bl	_NV_WARN
LBB0_4:
	ldr	x8, [x21]
Lloh2:
	adrp	x26, _NV_DEVICE_INFO_V0_TESLA@GOTPAGE
Lloh3:
	ldr	x26, [x26, _NV_DEVICE_INFO_V0_TESLA@GOTPAGEOFF]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ge	LBB0_6
; %bb.5:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, x22
	bl	_nouveau_bo_vm_bind
	mov	x25, x0
	cbnz	w0, LBB0_1
LBB0_6:
	ldr	x8, [x19]
Lloh4:
	adrp	x9, _TTM_PL_SYSTEM@GOTPAGE
Lloh5:
	ldr	x9, [x9, _TTM_PL_SYSTEM@GOTPAGEOFF]
Lloh6:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_8
; %bb.7:
	ldr	w10, [x19, #16]
	cbz	w10, LBB0_15
LBB0_8:
	ldr	x10, [x21, #8]
	cbz	x10, LBB0_13
; %bb.9:
	ldr	x10, [x22]
	ldp	w3, w2, [x23]
	mov	x0, x19
	mov	x1, x24
	mov	x4, x22
	cmp	x10, x9
	b.ne	LBB0_11
; %bb.10:
	bl	_nouveau_bo_move_flipd
	cbnz	w0, LBB0_13
	b	LBB0_17
LBB0_11:
	cmp	x8, x9
	b.ne	LBB0_16
; %bb.12:
	bl	_nouveau_bo_move_flips
	cbz	w0, LBB0_17
LBB0_13:
	ldp	w2, w1, [x23]
	mov	x0, x19
	bl	_ttm_bo_wait
	mov	x25, x0
	cbnz	w0, LBB0_18
; %bb.14:
	mov	x0, x19
	mov	x1, x23
	mov	x2, x22
	bl	_ttm_bo_move_memcpy
	mov	x25, x0
	b	LBB0_18
LBB0_15:
	ldr	x8, [x19, #8]
	cmp	x8, #0
	cset	w0, ne
	bl	_BUG_ON
	mov	w25, #0
	ldr	q0, [x22]
	str	q0, [x19]
	str	xzr, [x22, #8]
	b	LBB0_18
LBB0_16:
	bl	_nouveau_bo_move_m2mf
	cbnz	w0, LBB0_13
LBB0_17:
	mov	w25, #0
LBB0_18:
	ldr	x8, [x21]
	ldr	x9, [x26]
	cmp	x8, x9
	b.ge	LBB0_1
; %bb.19:
	cbz	w25, LBB0_21
; %bb.20:
	add	x2, sp, #8
	mov	x0, x19
	mov	x1, #0
	b	LBB0_22
LBB0_21:
	ldr	x1, [sp, #8]
	mov	x0, x19
	mov	x2, x20
LBB0_22:
	bl	_nouveau_bo_vm_cleanup
	b	LBB0_1
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Moving pinned object %p!\n"

	.comm	_NV_DEVICE_INFO_V0_TESLA,8,3    ; @NV_DEVICE_INFO_V0_TESLA
	.comm	_TTM_PL_SYSTEM,8,3              ; @TTM_PL_SYSTEM
	.no_dead_strip	_nouveau_bo_move
.subsections_via_symbols
