	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_do_cp_stop
_radeon_do_cp_stop:                     ## @radeon_do_cp_stop
	.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
	movq	_RADEON_FAMILY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	(%rbx), %eax
	movq	_CHIP_R420@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_2
## %bb.1:
	movl	$2, %edi
	callq	_BEGIN_RING
	movq	_R300_RB3D_DSTCACHE_CTLSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CP_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_R300_RB3D_DC_FINISH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	xorl	%eax, %eax
	callq	_COMMIT_RING
	movq	%rbx, %rdi
	callq	_radeon_do_wait_for_idle
LBB0_2:
	movq	_RADEON_CP_CSQ_CNTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_RADEON_CSQ_PRIDIS_INDDIS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_RADEON_WRITE
	movq	$0, 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	_RADEON_FAMILY_MASK,4,2         ## @RADEON_FAMILY_MASK
	.comm	_CHIP_R420,4,2                  ## @CHIP_R420
	.comm	_R300_RB3D_DSTCACHE_CTLSTAT,4,2 ## @R300_RB3D_DSTCACHE_CTLSTAT
	.comm	_R300_RB3D_DC_FINISH,4,2        ## @R300_RB3D_DC_FINISH
	.comm	_RADEON_CP_CSQ_CNTL,4,2         ## @RADEON_CP_CSQ_CNTL
	.comm	_RADEON_CSQ_PRIDIS_INDDIS,4,2   ## @RADEON_CSQ_PRIDIS_INDDIS
	.no_dead_strip	_radeon_do_cp_stop
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_do_cp_stop
_radeon_do_cp_stop:                     ; @radeon_do_cp_stop
	.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
	ldr	w8, [x19]
Lloh2:
	adrp	x9, _RADEON_FAMILY_MASK@GOTPAGE
Lloh3:
	ldr	x9, [x9, _RADEON_FAMILY_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh5:
	adrp	x9, _CHIP_R420@GOTPAGE
Lloh6:
	ldr	x9, [x9, _CHIP_R420@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	cmp	w8, w9
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #2
	bl	_BEGIN_RING
Lloh8:
	adrp	x8, _R300_RB3D_DSTCACHE_CTLSTAT@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R300_RB3D_DSTCACHE_CTLSTAT@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CP_PACKET0
	bl	_OUT_RING
Lloh11:
	adrp	x8, _R300_RB3D_DC_FINISH@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R300_RB3D_DC_FINISH@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	bl	_OUT_RING
	bl	_ADVANCE_RING
	bl	_COMMIT_RING
	mov	x0, x19
	bl	_radeon_do_wait_for_idle
LBB0_2:
Lloh14:
	adrp	x8, _RADEON_CP_CSQ_CNTL@GOTPAGE
Lloh15:
	ldr	x8, [x8, _RADEON_CP_CSQ_CNTL@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
Lloh17:
	adrp	x8, _RADEON_CSQ_PRIDIS_INDDIS@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RADEON_CSQ_PRIDIS_INDDIS@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	bl	_RADEON_WRITE
	str	xzr, [x19, #8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_RADEON_FAMILY_MASK,4,2         ; @RADEON_FAMILY_MASK
	.comm	_CHIP_R420,4,2                  ; @CHIP_R420
	.comm	_R300_RB3D_DSTCACHE_CTLSTAT,4,2 ; @R300_RB3D_DSTCACHE_CTLSTAT
	.comm	_R300_RB3D_DC_FINISH,4,2        ; @R300_RB3D_DC_FINISH
	.comm	_RADEON_CP_CSQ_CNTL,4,2         ; @RADEON_CP_CSQ_CNTL
	.comm	_RADEON_CSQ_PRIDIS_INDDIS,4,2   ; @RADEON_CSQ_PRIDIS_INDDIS
	.no_dead_strip	_radeon_do_cp_stop
.subsections_via_symbols
