	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_do_cp_start               ## -- Begin function r600_do_cp_start
	.p2align	4, 0x90
_r600_do_cp_start:                      ## @r600_do_cp_start
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	$7, %edi
	callq	_BEGIN_RING
	movq	_R600_IT_ME_INITIALIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$5, %esi
	callq	_CP_PACKET3
	movl	%eax, %edi
	callq	_OUT_RING
	movl	$1, %edi
	callq	_OUT_RING
	movq	_RADEON_FAMILY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	movq	_CHIP_RV770@GOTPCREL(%rip), %rcx
	xorl	%edx, %edx
	cmpl	(%rcx), %eax
	setl	%dl
	leal	(%rdx,%rdx,2), %edi
	callq	_OUT_RING
	movl	4(%rbx), %edi
	decl	%edi
	callq	_OUT_RING
	movl	$1, %edi
	callq	_R600_ME_INITIALIZE_DEVICE_ID
	movl	%eax, %edi
	callq	_OUT_RING
	xorl	%edi, %edi
	callq	_OUT_RING
	xorl	%edi, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	xorl	%eax, %eax
	callq	_COMMIT_RING
	movq	_R600_CP_ME_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$255, %esi
	callq	_RADEON_WRITE
	movl	$1, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_R600_IT_ME_INITIALIZE,4,2      ## @R600_IT_ME_INITIALIZE
	.comm	_RADEON_FAMILY_MASK,4,2         ## @RADEON_FAMILY_MASK
	.comm	_CHIP_RV770,4,2                 ## @CHIP_RV770
	.comm	_R600_CP_ME_CNTL,4,2            ## @R600_CP_ME_CNTL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_do_cp_start               ; -- Begin function r600_do_cp_start
	.p2align	2
_r600_do_cp_start:                      ; @r600_do_cp_start
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x19, x0
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	mov	w0, #7
	bl	_BEGIN_RING
Lloh2:
	adrp	x8, _R600_IT_ME_INITIALIZE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R600_IT_ME_INITIALIZE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #5
	bl	_CP_PACKET3
	bl	_OUT_RING
	mov	w20, #1
	mov	w0, #1
	bl	_OUT_RING
	ldr	w8, [x19]
Lloh5:
	adrp	x9, _RADEON_FAMILY_MASK@GOTPAGE
Lloh6:
	ldr	x9, [x9, _RADEON_FAMILY_MASK@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh8:
	adrp	x9, _CHIP_RV770@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CHIP_RV770@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	mov	w10, #3
	cmp	w8, w9
	csel	w0, w10, wzr, lt
	bl	_OUT_RING
	ldr	w8, [x19, #4]
	sub	w0, w8, #1
	bl	_OUT_RING
	mov	w0, #1
	bl	_R600_ME_INITIALIZE_DEVICE_ID
	bl	_OUT_RING
	mov	w0, #0
	bl	_OUT_RING
	mov	w0, #0
	bl	_OUT_RING
	bl	_ADVANCE_RING
	bl	_COMMIT_RING
Lloh11:
	adrp	x8, _R600_CP_ME_CNTL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R600_CP_ME_CNTL@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	w1, #255
	bl	_RADEON_WRITE
	str	w20, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_R600_IT_ME_INITIALIZE,4,2      ; @R600_IT_ME_INITIALIZE
	.comm	_RADEON_FAMILY_MASK,4,2         ; @RADEON_FAMILY_MASK
	.comm	_CHIP_RV770,4,2                 ; @CHIP_RV770
	.comm	_R600_CP_ME_CNTL,4,2            ; @R600_CP_ME_CNTL
.subsections_via_symbols
