	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r128_do_cce_idle               ## -- Begin function r128_do_cce_idle
	.p2align	4, 0x90
_r128_do_cce_idle:                      ## @r128_do_cce_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	cmpl	$0, (%rdi)
	jle	LBB0_6
## %bb.1:
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	movq	_R128_PM4_STAT@GOTPCREL(%rip), %r15
	movq	_R128_PM4_FIFOCNT_MASK@GOTPCREL(%rip), %r12
	movq	_R128_PM4_GUI_ACTIVE@GOTPCREL(%rip), %r13
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_DRM_UDELAY
	incl	%ebx
	cmpl	(%r14), %ebx
	jge	LBB0_6
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	callq	_GET_RING_HEAD
	cmpq	8(%r14), %rax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r15), %edi
	callq	_R128_READ
	movl	(%r12), %ecx
	andl	%eax, %ecx
	cmpl	4(%r14), %ecx
	jl	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r13), %ecx
	movq	_R128_PM4_BUSY@GOTPCREL(%rip), %rdx
	orl	(%rdx), %ecx
	testl	%eax, %ecx
	jne	LBB0_5
## %bb.7:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_r128_do_pixcache_flush         ## TAILCALL
LBB0_6:
	movq	_EBUSY@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R128_PM4_STAT,4,2              ## @R128_PM4_STAT
	.comm	_R128_PM4_FIFOCNT_MASK,4,2      ## @R128_PM4_FIFOCNT_MASK
	.comm	_R128_PM4_BUSY,4,2              ## @R128_PM4_BUSY
	.comm	_R128_PM4_GUI_ACTIVE,4,2        ## @R128_PM4_GUI_ACTIVE
	.comm	_EBUSY,4,2                      ## @EBUSY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r128_do_cce_idle               ; -- Begin function r128_do_cce_idle
	.p2align	2
_r128_do_cce_idle:                      ; @r128_do_cce_idle
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_7
; %bb.1:
	mov	x19, x0
	mov	w20, #0
Lloh0:
	adrp	x21, _R128_PM4_STAT@GOTPAGE
Lloh1:
	ldr	x21, [x21, _R128_PM4_STAT@GOTPAGEOFF]
Lloh2:
	adrp	x22, _R128_PM4_FIFOCNT_MASK@GOTPAGE
Lloh3:
	ldr	x22, [x22, _R128_PM4_FIFOCNT_MASK@GOTPAGEOFF]
Lloh4:
	adrp	x23, _R128_PM4_BUSY@GOTPAGE
Lloh5:
	ldr	x23, [x23, _R128_PM4_BUSY@GOTPAGEOFF]
Lloh6:
	adrp	x24, _R128_PM4_GUI_ACTIVE@GOTPAGE
Lloh7:
	ldr	x24, [x24, _R128_PM4_GUI_ACTIVE@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_DRM_UDELAY
	add	w20, w20, #1
	ldr	w8, [x19]
	cmp	w20, w8
	b.ge	LBB0_7
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	bl	_GET_RING_HEAD
	ldr	x8, [x19, #8]
	cmp	x0, x8
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w0, [x21]
	bl	_R128_READ
	ldr	w8, [x22]
	and	w8, w8, w0
	ldr	w9, [x19, #4]
	cmp	w8, w9
	b.lt	LBB0_2
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x23]
	ldr	w9, [x24]
	orr	w8, w9, w8
	tst	w8, w0
	b.ne	LBB0_2
; %bb.6:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_r128_do_pixcache_flush
LBB0_7:
Lloh8:
	adrp	x8, _EBUSY@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_R128_PM4_STAT,4,2              ; @R128_PM4_STAT
	.comm	_R128_PM4_FIFOCNT_MASK,4,2      ; @R128_PM4_FIFOCNT_MASK
	.comm	_R128_PM4_BUSY,4,2              ; @R128_PM4_BUSY
	.comm	_R128_PM4_GUI_ACTIVE,4,2        ; @R128_PM4_GUI_ACTIVE
	.comm	_EBUSY,4,2                      ; @EBUSY
.subsections_via_symbols
