	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_do_cp_idle                ## -- Begin function r600_do_cp_idle
	.p2align	4, 0x90
_r600_do_cp_idle:                       ## @r600_do_cp_idle
	.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	$5, %edi
	callq	_BEGIN_RING
	movq	_R600_IT_EVENT_WRITE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CP_PACKET3
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_R600_CACHE_FLUSH_AND_INV_EVENT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	movq	_R600_IT_SET_CONFIG_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$1, %esi
	callq	_CP_PACKET3
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_R600_WAIT_UNTIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_R600_SET_CONFIG_REG_OFFSET@GOTPCREL(%rip), %rax
	subl	(%rax), %edi
	sarl	$2, %edi
	callq	_OUT_RING
	movq	_RADEON_WAIT_3D_IDLE@GOTPCREL(%rip), %rax
	movq	_RADEON_WAIT_3D_IDLECLEAN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	xorl	%eax, %eax
	callq	_COMMIT_RING
	movq	%rbx, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_r600_do_wait_for_idle          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_R600_IT_EVENT_WRITE,4,2        ## @R600_IT_EVENT_WRITE
	.comm	_R600_CACHE_FLUSH_AND_INV_EVENT,4,2 ## @R600_CACHE_FLUSH_AND_INV_EVENT
	.comm	_R600_IT_SET_CONFIG_REG,4,2     ## @R600_IT_SET_CONFIG_REG
	.comm	_R600_WAIT_UNTIL,4,2            ## @R600_WAIT_UNTIL
	.comm	_R600_SET_CONFIG_REG_OFFSET,4,2 ## @R600_SET_CONFIG_REG_OFFSET
	.comm	_RADEON_WAIT_3D_IDLE,4,2        ## @RADEON_WAIT_3D_IDLE
	.comm	_RADEON_WAIT_3D_IDLECLEAN,4,2   ## @RADEON_WAIT_3D_IDLECLEAN
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r600_do_cp_idle                ; -- Begin function r600_do_cp_idle
	.p2align	2
_r600_do_cp_idle:                       ; @r600_do_cp_idle
	.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, #5
	bl	_BEGIN_RING
Lloh2:
	adrp	x8, _R600_IT_EVENT_WRITE@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R600_IT_EVENT_WRITE@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CP_PACKET3
	bl	_OUT_RING
Lloh5:
	adrp	x8, _R600_CACHE_FLUSH_AND_INV_EVENT@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R600_CACHE_FLUSH_AND_INV_EVENT@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	bl	_OUT_RING
Lloh8:
	adrp	x8, _R600_IT_SET_CONFIG_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _R600_IT_SET_CONFIG_REG@GOTPAGEOFF]
Lloh10:
	ldr	w0, [x8]
	mov	w1, #1
	bl	_CP_PACKET3
	bl	_OUT_RING
Lloh11:
	adrp	x8, _R600_WAIT_UNTIL@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R600_WAIT_UNTIL@GOTPAGEOFF]
Lloh13:
	ldr	w8, [x8]
Lloh14:
	adrp	x9, _R600_SET_CONFIG_REG_OFFSET@GOTPAGE
Lloh15:
	ldr	x9, [x9, _R600_SET_CONFIG_REG_OFFSET@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	sub	w8, w8, w9
	asr	w0, w8, #2
	bl	_OUT_RING
Lloh17:
	adrp	x8, _RADEON_WAIT_3D_IDLE@GOTPAGE
Lloh18:
	ldr	x8, [x8, _RADEON_WAIT_3D_IDLE@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
Lloh20:
	adrp	x9, _RADEON_WAIT_3D_IDLECLEAN@GOTPAGE
Lloh21:
	ldr	x9, [x9, _RADEON_WAIT_3D_IDLECLEAN@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	orr	w0, w9, w8
	bl	_OUT_RING
	bl	_ADVANCE_RING
	bl	_COMMIT_RING
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_r600_do_wait_for_idle
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.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_EVENT_WRITE,4,2        ; @R600_IT_EVENT_WRITE
	.comm	_R600_CACHE_FLUSH_AND_INV_EVENT,4,2 ; @R600_CACHE_FLUSH_AND_INV_EVENT
	.comm	_R600_IT_SET_CONFIG_REG,4,2     ; @R600_IT_SET_CONFIG_REG
	.comm	_R600_WAIT_UNTIL,4,2            ; @R600_WAIT_UNTIL
	.comm	_R600_SET_CONFIG_REG_OFFSET,4,2 ; @R600_SET_CONFIG_REG_OFFSET
	.comm	_RADEON_WAIT_3D_IDLE,4,2        ; @RADEON_WAIT_3D_IDLE
	.comm	_RADEON_WAIT_3D_IDLECLEAN,4,2   ; @RADEON_WAIT_3D_IDLECLEAN
.subsections_via_symbols
