	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r128_cce_dispatch_flip
_r128_cce_dispatch_flip:                ## @r128_cce_dispatch_flip
	.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
	movq	(%rbx), %rsi
	movq	8(%rbx), %rax
	movq	(%rax), %rdx
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	$4, %edi
	callq	_BEGIN_RING
	xorl	%eax, %eax
	callq	_R128_WAIT_UNTIL_PAGE_FLIPPED
	movq	_R128_CRTC_OFFSET@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CCE_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	cmpq	$0, (%rbx)
	sete	%al
	movl	16(%rbx,%rax,4), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	movq	8(%rbx), %rax
	incl	8(%rax)
	movl	$1, %ecx
	subq	(%rbx), %rcx
	movq	%rcx, (%rbx)
	movq	%rcx, (%rax)
	movl	$2, %edi
	callq	_BEGIN_RING
	movq	_R128_LAST_FRAME_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CCE_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movq	8(%rbx), %rax
	movl	8(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	jmp	_ADVANCE_RING                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"page=%d pfCurrentPage=%d\n"

	.comm	_R128_CRTC_OFFSET,4,2           ## @R128_CRTC_OFFSET
	.comm	_R128_LAST_FRAME_REG,4,2        ## @R128_LAST_FRAME_REG
	.no_dead_strip	_r128_cce_dispatch_flip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r128_cce_dispatch_flip
_r128_cce_dispatch_flip:                ; @r128_cce_dispatch_flip
	.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
	ldr	x19, [x0]
	ldp	x1, x8, [x19]
	ldr	x2, [x8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	mov	w0, #4
	bl	_BEGIN_RING
	bl	_R128_WAIT_UNTIL_PAGE_FLIPPED
Lloh2:
	adrp	x8, _R128_CRTC_OFFSET@GOTPAGE
Lloh3:
	ldr	x8, [x8, _R128_CRTC_OFFSET@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CCE_PACKET0
	bl	_OUT_RING
	ldr	x8, [x19]
	mov	w9, #16
	mov	w10, #20
	cmp	x8, #0
	csel	x8, x10, x9, eq
	ldr	w0, [x19, x8]
	bl	_OUT_RING
	bl	_ADVANCE_RING
	ldp	x9, x8, [x19]
	ldr	w10, [x8, #8]
	add	w10, w10, #1
	str	w10, [x8, #8]
	mov	w10, #1
	sub	x9, x10, x9
	str	x9, [x19]
	str	x9, [x8]
	mov	w0, #2
	bl	_BEGIN_RING
Lloh5:
	adrp	x8, _R128_LAST_FRAME_REG@GOTPAGE
Lloh6:
	ldr	x8, [x8, _R128_LAST_FRAME_REG@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CCE_PACKET0
	bl	_OUT_RING
	ldr	x8, [x19, #8]
	ldr	w0, [x8, #8]
	bl	_OUT_RING
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ADVANCE_RING
	.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	"page=%d pfCurrentPage=%d\n"

	.comm	_R128_CRTC_OFFSET,4,2           ; @R128_CRTC_OFFSET
	.comm	_R128_LAST_FRAME_REG,4,2        ; @R128_LAST_FRAME_REG
	.no_dead_strip	_r128_cce_dispatch_flip
.subsections_via_symbols
