	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv04_bo_move_m2mf
_nv04_bo_move_m2mf:                     ## @nv04_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movl	(%rdx), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%rcx, -56(%rbp)                 ## 8-byte Spill
	movl	(%rcx), %r14d
	movl	$3, %esi
	callq	_RING_SPACE
	movl	%eax, %r13d
	testl	%eax, %eax
	je	LBB0_1
LBB0_7:
	movl	%r13d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	-60(%rbp), %r13d                ## 4-byte Reload
	movq	_NvSubCopy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$2, %ecx
	callq	_BEGIN_NV04
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	%rbx, %rdx
	callq	_nouveau_bo_mem_ctxdma
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movq	%r15, %rdi
	movq	%r12, %rsi
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdx
	callq	_nouveau_bo_mem_ctxdma
	movq	%r12, %rdi
	movl	%eax, %esi
	callq	_OUT_RING
	movl	4(%rbx), %ebx
	testl	%ebx, %ebx
	je	LBB0_2
## %bb.3:
	movl	%r13d, %ecx
	shll	%cl, -44(%rbp)                  ## 4-byte Folded Spill
                                        ## kill: def $cl killed $cl killed $ecx
	shll	%cl, %r14d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r12, %rdi
	movl	$11, %esi
	callq	_RING_SPACE
	testl	%eax, %eax
	jne	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	cmpl	$2047, %ebx                     ## imm = 0x7FF
	movl	%ebx, -56(%rbp)                 ## 4-byte Spill
	movl	$2047, %r15d                    ## imm = 0x7FF
	cmovll	-56(%rbp), %r15d                ## 4-byte Folded Reload
	movq	_NvSubCopy@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	$8, %ecx
	callq	_BEGIN_NV04
	movq	%r12, %rdi
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	%r14d, %esi
	callq	_OUT_RING
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_OUT_RING
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_OUT_RING
	movl	(%rbx), %esi
	movq	%r12, %rdi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_OUT_RING
	movq	%r12, %rdi
	movl	$257, %esi                      ## imm = 0x101
	callq	_OUT_RING
	xorl	%r13d, %r13d
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_OUT_RING
	movq	_NvSubCopy@GOTPCREL(%rip), %rax
	movl	(%rax), %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
	movl	(%rbx), %eax
	imull	%r15d, %eax
	addl	%eax, -44(%rbp)                 ## 4-byte Folded Spill
	addl	%eax, %r14d
	subl	%r15d, -56(%rbp)                ## 4-byte Folded Spill
	movl	-56(%rbp), %ebx                 ## 4-byte Reload
	jne	LBB0_4
	jmp	LBB0_7
LBB0_2:
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_5:
	movl	%eax, %r13d
	jmp	LBB0_7
	.cfi_endproc
                                        ## -- End function
	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
	.comm	_NvSubCopy,4,2                  ## @NvSubCopy
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE,4,2 ## @NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN,4,2 ## @NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_NOP,4,2 ## @NV_MEMORY_TO_MEMORY_FORMAT_NOP
	.no_dead_strip	_nv04_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 nv04_bo_move_m2mf
_nv04_bo_move_m2mf:                     ; @nv04_bo_move_m2mf
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x20, x3
	mov	x22, x2
	mov	x21, x1
	mov	x19, x0
	ldr	w25, [x2]
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	w26, [x8]
	ldr	w27, [x3]
	mov	w1, #3
	bl	_RING_SPACE
	cbnz	w0, LBB0_6
; %bb.1:
Lloh3:
	adrp	x23, _NvSubCopy@GOTPAGE
Lloh4:
	ldr	x23, [x23, _NvSubCopy@GOTPAGEOFF]
	ldr	w1, [x23]
Lloh5:
	adrp	x8, _NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x19
	mov	w3, #2
	bl	_BEGIN_NV04
	mov	x0, x21
	mov	x1, x19
	mov	x2, x22
	bl	_nouveau_bo_mem_ctxdma
	mov	x1, x0
	mov	x0, x19
	bl	_OUT_RING
	mov	x0, x21
	mov	x1, x19
	mov	x2, x20
	bl	_nouveau_bo_mem_ctxdma
	mov	x1, x0
	mov	x0, x19
	bl	_OUT_RING
	ldr	w24, [x20, #4]
	cbz	w24, LBB0_5
; %bb.2:
	lsl	w20, w25, w26
	lsl	w21, w27, w26
	mov	w25, #2047
Lloh8:
	adrp	x26, _NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN@GOTPAGE
Lloh9:
	ldr	x26, [x26, _NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN@GOTPAGEOFF]
Lloh10:
	adrp	x27, _PAGE_SIZE@GOTPAGE
Lloh11:
	ldr	x27, [x27, _PAGE_SIZE@GOTPAGEOFF]
Lloh12:
	adrp	x28, _NV_MEMORY_TO_MEMORY_FORMAT_NOP@GOTPAGE
Lloh13:
	ldr	x28, [x28, _NV_MEMORY_TO_MEMORY_FORMAT_NOP@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #11
	bl	_RING_SPACE
	cbnz	w0, LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w24, #2047
	csel	w22, w24, w25, lt
	ldr	w1, [x23]
	ldr	w2, [x26]
	mov	x0, x19
	mov	w3, #8
	bl	_BEGIN_NV04
	mov	x0, x19
	mov	x1, x20
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x21
	bl	_OUT_RING
	ldr	w1, [x27]
	mov	x0, x19
	bl	_OUT_RING
	ldr	w1, [x27]
	mov	x0, x19
	bl	_OUT_RING
	ldr	w1, [x27]
	mov	x0, x19
	bl	_OUT_RING
	mov	x0, x19
	mov	x1, x22
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #257
	bl	_OUT_RING
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	ldr	w1, [x23]
	ldr	w2, [x28]
	mov	x0, x19
	mov	w3, #1
	bl	_BEGIN_NV04
	mov	x0, x19
	mov	w1, #0
	bl	_OUT_RING
	ldr	w8, [x27]
	mul	w8, w8, w22
	add	w20, w8, w20
	add	w21, w8, w21
	subs	w24, w24, w22
	b.ne	LBB0_3
LBB0_5:
	mov	w0, #0
LBB0_6:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
	.comm	_NvSubCopy,4,2                  ; @NvSubCopy
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE,4,2 ; @NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN,4,2 ; @NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_NV_MEMORY_TO_MEMORY_FORMAT_NOP,4,2 ; @NV_MEMORY_TO_MEMORY_FORMAT_NOP
	.no_dead_strip	_nv04_bo_move_m2mf
.subsections_via_symbols
