	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv50_bo_move_m2mf
_nv50_bo_move_m2mf:                     ## @nv50_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	%rcx, %r14
	movq	%rdi, %r12
	movq	%rdx, %rdi
	callq	_nouveau_mem
	movl	(%r14), %ebx
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rcx
	movb	(%rcx), %cl
	shll	%cl, %ebx
	movq	8(%rax), %rcx
	movl	(%rcx), %r15d
	movl	4(%rcx), %ecx
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	(%rax), %r13d
	movq	%r14, %rdi
	callq	_nouveau_mem
	movl	(%rax), %ecx
	xorl	%eax, %eax
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	testl	%ecx, %ecx
	setne	%al
	movl	%r13d, -56(%rbp)                ## 4-byte Spill
	cmpl	$1, %r13d
	sbbl	$-1, %eax
	testl	%ebx, %ebx
	je	LBB0_1
## %bb.2:
	leal	(%rax,%rax,2), %eax
	addl	%eax, %eax
	addl	$18, %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	jmp	LBB0_3
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %r15d
	movq	%r12, %rdi
	movl	$540, %edx                      ## imm = 0x21C
	movl	$1, %ecx
	callq	_BEGIN_NV04
LBB0_11:                                ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_OUT_RING
	movq	_NvSubCopy@GOTPCREL(%rip), %r13
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$568, %edx                      ## imm = 0x238
	movl	$2, %ecx
	callq	_BEGIN_NV04
	movl	-60(%rbp), %r15d                ## 4-byte Reload
	movl	%r15d, %edi
	callq	_upper_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	movl	%ebx, %edi
	callq	_upper_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	(%r13), %esi
	movq	%r12, %rdi
	movl	$780, %edx                      ## imm = 0x30C
	movl	$8, %ecx
	callq	_BEGIN_NV04
	movl	%r15d, %edi
	callq	_lower_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	%ebx, %edi
	callq	_lower_32_bits
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$257, %esi                      ## imm = 0x101
	callq	_OUT_RING
	xorl	%r14d, %r14d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movl	(%r13), %esi
	movq	_NV_MEMORY_TO_MEMORY_FORMAT_NOP@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$1, %ecx
	callq	_BEGIN_NV04
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, %r15d
	addl	%eax, %ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movl	-64(%rbp), %ebx                 ## 4-byte Reload
	subl	%eax, %ebx
	je	LBB0_12
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	-48(%rbp), %esi                 ## 4-byte Reload
	callq	_RING_SPACE
	testl	%eax, %eax
	jne	LBB0_4
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=1
	movl	%r15d, -60(%rbp)                ## 4-byte Spill
	movl	%ebx, -64(%rbp)                 ## 4-byte Spill
	movl	%ebx, %edi
	movl	$4194304, %esi                  ## imm = 0x400000
	callq	_min
                                        ## kill: def $eax killed $eax def $rax
	leal	63(%rax), %r14d
	testl	%eax, %eax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	cmovnsl	%eax, %r14d
	sarl	$6, %r14d
	movq	_NvSubCopy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$0, -56(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	$512, %edx                      ## imm = 0x200
	movl	$7, %ecx
	callq	_BEGIN_NV04
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	$1, %r15d
	movq	%r12, %rdi
	movl	$512, %edx                      ## imm = 0x200
	movl	$1, %ecx
	callq	_BEGIN_NV04
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_OUT_RING
	movq	_NvSubCopy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$0, -52(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	%r12, %rdi
	movl	$540, %edx                      ## imm = 0x21C
	movl	$7, %ecx
	callq	_BEGIN_NV04
	xorl	%r15d, %r15d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$64, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$1, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	jmp	LBB0_11
LBB0_1:
	xorl	%r14d, %r14d
	jmp	LBB0_12
LBB0_4:
	movl	%eax, %r14d
LBB0_12:
	movl	%r14d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_NvSubCopy,4,2                  ## @NvSubCopy
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_NOP,4,2 ## @NV_MEMORY_TO_MEMORY_FORMAT_NOP
	.no_dead_strip	_nv50_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 nv50_bo_move_m2mf
_nv50_bo_move_m2mf:                     ; @nv50_bo_move_m2mf
	.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	x23, x3
	mov	x19, x0
	mov	x0, x2
	bl	_nouveau_mem
	ldr	w8, [x23]
Lloh0:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	lsl	w20, w8, w9
	ldr	x8, [x0, #8]
	ldp	w21, w22, [x8]
	ldr	w27, [x0]
	cmp	w27, #0
	cset	w24, ne
	mov	x0, x23
	bl	_nouveau_mem
	ldr	w28, [x0]
	cmp	w28, #0
	cinc	w8, w24, ne
	cbz	w20, LBB0_10
; %bb.1:
	mov	w9, #6
	mul	w8, w8, w9
	add	w8, w8, #18
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
Lloh3:
	adrp	x23, _NvSubCopy@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NvSubCopy@GOTPAGEOFF]
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #1
	mov	x0, x19
	mov	w2, #540
	mov	w3, #1
	bl	_BEGIN_NV04
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x26
	bl	_OUT_RING
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #568
	mov	w3, #2
	bl	_BEGIN_NV04
	mov	x0, x21
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_OUT_RING
	mov	x0, x22
	bl	_upper_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_OUT_RING
	ldr	w1, [x23]
	mov	x0, x19
	mov	w2, #780
	mov	w3, #8
	bl	_BEGIN_NV04
	mov	x0, x21
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_OUT_RING
	mov	x0, x22
	bl	_lower_32_bits
	mov	x1, x0
	mov	x0, x19
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #64
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #64
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #64
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x25
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #257
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	ldr	w1, [x23]
Lloh5:
	adrp	x8, _NV_MEMORY_TO_MEMORY_FORMAT_NOP@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NV_MEMORY_TO_MEMORY_FORMAT_NOP@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #1
	bl	_BEGIN_NV04
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	add	w21, w24, w21
	add	w22, w24, w22
	subs	w20, w20, w24
	b.eq	LBB0_10
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	ldr	w1, [sp, #12]                   ; 4-byte Folded Reload
	bl	_RING_SPACE
	cbnz	w0, LBB0_11
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x20
	mov	w1, #4194304
	bl	_min
	mov	x24, x0
	add	w8, w0, #63
	cmp	w0, #0
	csel	w8, w8, w0, lt
	asr	w25, w8, #6
	ldr	w1, [x23]
	cbz	w27, LBB0_7
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	w2, #512
	mov	w3, #7
	bl	_BEGIN_NV04
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #64
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x25
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #1
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	w26, #0
	b	LBB0_8
LBB0_7:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #1
	mov	x0, x19
	mov	w2, #512
	mov	w3, #1
	bl	_BEGIN_NV04
LBB0_8:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x26
	bl	_OUT_RING
	ldr	w1, [x23]
	cbz	w28, LBB0_2
; %bb.9:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	w2, #540
	mov	w3, #7
	bl	_BEGIN_NV04
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #64
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x25
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #1
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	mov	w26, #0
	b	LBB0_3
LBB0_10:
	mov	w0, #0
LBB0_11:
	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 AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_NvSubCopy,4,2                  ; @NvSubCopy
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_NOP,4,2 ; @NV_MEMORY_TO_MEMORY_FORMAT_NOP
	.no_dead_strip	_nv50_bo_move_m2mf
.subsections_via_symbols
