	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r200_copy_dma                  ## -- Begin function r200_copy_dma
	.p2align	4, 0x90
_r200_copy_dma:                         ## @r200_copy_dma
	.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, -72(%rbp)                  ## 8-byte Spill
	movl	%ecx, %r12d
	movl	%edx, -44(%rbp)                 ## 4-byte Spill
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %r13
	shlq	$2, %r13
	addq	(%rdi), %r13
	movq	_RADEON_GPU_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %r12d
	movl	%r12d, %edi
	movl	$2097151, %esi                  ## imm = 0x1FFFFF
	callq	_DIV_ROUND_UP
	movl	%eax, %ebx
	leal	64(,%rbx,4), %edx
	movq	%r15, -80(%rbp)                 ## 8-byte Spill
	movq	%r15, %rdi
	movq	%r13, -56(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	callq	_radeon_ring_lock
	testl	%eax, %eax
	je	LBB0_2
## %bb.1:
	movl	%eax, %r15d
	leaq	L_.str(%rip), %rdi
	movl	%eax, %esi
	callq	_DRM_ERROR
	jmp	LBB0_8
LBB0_2:
	movq	_RADEON_WAIT_UNTIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET0
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r13, %rdi
	movl	$65536, %esi                    ## imm = 0x10000
	callq	_radeon_ring_write
	testl	%ebx, %ebx
	jle	LBB0_5
## %bb.3:
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$2097151, %r12d                 ## imm = 0x1FFFFF
	movl	$2097151, %r13d                 ## imm = 0x1FFFFF
	cmovll	%r12d, %r13d
	subl	%r13d, %r12d
	movl	%r12d, -60(%rbp)                ## 4-byte Spill
	movl	$1824, %edi                     ## imm = 0x720
	movl	$2, %esi
	callq	_PACKET0
	movq	%r15, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	%r14d, %esi
	callq	_radeon_ring_write
	movq	%r15, %rdi
	movl	%r14d, %r12d
	movl	-44(%rbp), %r14d                ## 4-byte Reload
	movl	%r14d, %esi
	callq	_radeon_ring_write
	movl	%r13d, %esi
	orl	$-1073741824, %esi              ## imm = 0xC0000000
	movq	%r15, %rdi
	callq	_radeon_ring_write
	addl	%r13d, %r12d
	addl	%r13d, %r14d
	movl	%r14d, -44(%rbp)                ## 4-byte Spill
	movl	%r12d, %r14d
	movl	-60(%rbp), %r12d                ## 4-byte Reload
	decl	%ebx
	jne	LBB0_4
LBB0_5:
	movq	_RADEON_WAIT_UNTIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_PACKET0
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movl	%eax, %esi
	callq	_radeon_ring_write
	movq	_RADEON_WAIT_DMA_GUI_IDLE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_radeon_ring_write
	movq	-72(%rbp), %rsi                 ## 8-byte Reload
	testq	%rsi, %rsi
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	movl	$0, %r15d
	je	LBB0_7
## %bb.6:
	movq	_RADEON_RING_TYPE_GFX_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%rbx, %rdi
	callq	_radeon_fence_emit
	movl	%eax, %r15d
LBB0_7:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_radeon_ring_unlock_commit
LBB0_8:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ## @RADEON_RING_TYPE_GFX_INDEX
	.comm	_RADEON_GPU_PAGE_SHIFT,4,2      ## @RADEON_GPU_PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"radeon: moving bo (%d).\n"

	.comm	_RADEON_WAIT_UNTIL,4,2          ## @RADEON_WAIT_UNTIL
	.comm	_RADEON_WAIT_DMA_GUI_IDLE,4,2   ## @RADEON_WAIT_DMA_GUI_IDLE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r200_copy_dma                  ; -- Begin function r200_copy_dma
	.p2align	2
_r200_copy_dma:                         ; @r200_copy_dma
	.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	x21, x4
	mov	x22, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x27, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGE
Lloh1:
	ldr	x27, [x27, _RADEON_RING_TYPE_GFX_INDEX@GOTPAGEOFF]
	ldr	x9, [x27]
	add	x20, x8, x9, lsl #2
Lloh2:
	adrp	x8, _RADEON_GPU_PAGE_SHIFT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _RADEON_GPU_PAGE_SHIFT@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	lsl	w24, w3, w8
	mov	x0, x24
	mov	w1, #2097151
	bl	_DIV_ROUND_UP
	mov	x25, x0
	lsl	w8, w0, #2
	add	w2, w8, #64
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_lock
	cbz	w0, LBB0_2
; %bb.1:
	mov	x26, x0
Lloh5:
	adrp	x0, l_.str@PAGE
Lloh6:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x26
	bl	_DRM_ERROR
	b	LBB0_9
LBB0_2:
Lloh7:
	adrp	x8, _RADEON_WAIT_UNTIL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _RADEON_WAIT_UNTIL@GOTPAGEOFF]
Lloh9:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	w1, #65536
	bl	_radeon_ring_write
	cmp	w25, #1
	b.lt	LBB0_5
; %bb.3:
	mov	w28, #2097151
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w24, w28
	csel	w26, w24, w28, lt
	sub	w24, w24, w26
	mov	w0, #1824
	mov	w1, #2
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
	mov	x0, x20
	mov	x1, x23
	bl	_radeon_ring_write
	mov	x0, x20
	mov	x1, x22
	bl	_radeon_ring_write
	orr	w1, w26, #0xc0000000
	mov	x0, x20
	bl	_radeon_ring_write
	add	w23, w23, w26
	add	w22, w26, w22
	subs	w25, w25, #1
	b.ne	LBB0_4
LBB0_5:
Lloh10:
	adrp	x8, _RADEON_WAIT_UNTIL@GOTPAGE
Lloh11:
	ldr	x8, [x8, _RADEON_WAIT_UNTIL@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_PACKET0
	mov	x1, x0
	mov	x0, x20
	bl	_radeon_ring_write
Lloh13:
	adrp	x8, _RADEON_WAIT_DMA_GUI_IDLE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _RADEON_WAIT_DMA_GUI_IDLE@GOTPAGEOFF]
Lloh15:
	ldr	w1, [x8]
	mov	x0, x20
	bl	_radeon_ring_write
	cbz	x21, LBB0_7
; %bb.6:
	ldr	x2, [x27]
	mov	x0, x19
	mov	x1, x21
	bl	_radeon_fence_emit
	mov	x26, x0
	b	LBB0_8
LBB0_7:
	mov	w26, #0
LBB0_8:
	mov	x0, x19
	mov	x1, x20
	bl	_radeon_ring_unlock_commit
LBB0_9:
	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
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_RADEON_RING_TYPE_GFX_INDEX,8,3 ; @RADEON_RING_TYPE_GFX_INDEX
	.comm	_RADEON_GPU_PAGE_SHIFT,4,2      ; @RADEON_GPU_PAGE_SHIFT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"radeon: moving bo (%d).\n"

	.comm	_RADEON_WAIT_UNTIL,4,2          ; @RADEON_WAIT_UNTIL
	.comm	_RADEON_WAIT_DMA_GUI_IDLE,4,2   ; @RADEON_WAIT_DMA_GUI_IDLE
.subsections_via_symbols
