	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_do_init_pageflip
_radeon_do_init_pageflip:               ## @radeon_do_init_pageflip
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %r15
	movq	(%rsi), %r14
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	$6, %edi
	callq	_BEGIN_RING
	xorl	%eax, %eax
	callq	_RADEON_WAIT_UNTIL_3D_IDLE
	movq	_RADEON_CRTC_OFFSET_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_CP_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movl	(%rbx), %edi
	callq	_RADEON_READ
	movq	_RADEON_CRTC_OFFSET_FLIP_CNTL@GOTPCREL(%rip), %r12
	orl	(%r12), %eax
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_RADEON_CRTC2_OFFSET_CNTL@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	xorl	%esi, %esi
	callq	_CP_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movl	(%rbx), %edi
	callq	_RADEON_READ
	orl	(%r12), %eax
	movl	%eax, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	movl	$1, (%r15)
	movq	(%r14), %rax
	cmpl	$1, (%rax)
	je	LBB0_2
## %bb.1:
	movl	$0, (%rax)
LBB0_2:
	xorl	%eax, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	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_CRTC_OFFSET_CNTL,4,2    ## @RADEON_CRTC_OFFSET_CNTL
	.comm	_RADEON_CRTC_OFFSET_FLIP_CNTL,4,2 ## @RADEON_CRTC_OFFSET_FLIP_CNTL
	.comm	_RADEON_CRTC2_OFFSET_CNTL,4,2   ## @RADEON_CRTC2_OFFSET_CNTL
	.no_dead_strip	_radeon_do_init_pageflip
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_do_init_pageflip
_radeon_do_init_pageflip:               ; @radeon_do_init_pageflip
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	ldr	x19, [x0]
	ldr	x20, [x1]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	mov	w0, #6
	bl	_BEGIN_RING
	bl	_RADEON_WAIT_UNTIL_3D_IDLE
Lloh2:
	adrp	x21, _RADEON_CRTC_OFFSET_CNTL@GOTPAGE
Lloh3:
	ldr	x21, [x21, _RADEON_CRTC_OFFSET_CNTL@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #0
	bl	_CP_PACKET0
	bl	_OUT_RING
	ldr	w0, [x21]
	bl	_RADEON_READ
Lloh4:
	adrp	x21, _RADEON_CRTC_OFFSET_FLIP_CNTL@GOTPAGE
Lloh5:
	ldr	x21, [x21, _RADEON_CRTC_OFFSET_FLIP_CNTL@GOTPAGEOFF]
	ldr	w8, [x21]
	orr	w0, w8, w0
	bl	_OUT_RING
Lloh6:
	adrp	x22, _RADEON_CRTC2_OFFSET_CNTL@GOTPAGE
Lloh7:
	ldr	x22, [x22, _RADEON_CRTC2_OFFSET_CNTL@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #0
	bl	_CP_PACKET0
	bl	_OUT_RING
	ldr	w0, [x22]
	bl	_RADEON_READ
	ldr	w8, [x21]
	orr	w0, w8, w0
	bl	_OUT_RING
	bl	_ADVANCE_RING
	mov	w8, #1
	str	w8, [x19]
	ldr	x8, [x20]
	ldr	w9, [x8]
	cmp	w9, #1
	b.eq	LBB0_2
; %bb.1:
	str	wzr, [x8]
LBB0_2:
	mov	w0, #0
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.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	_RADEON_CRTC_OFFSET_CNTL,4,2    ; @RADEON_CRTC_OFFSET_CNTL
	.comm	_RADEON_CRTC_OFFSET_FLIP_CNTL,4,2 ; @RADEON_CRTC_OFFSET_FLIP_CNTL
	.comm	_RADEON_CRTC2_OFFSET_CNTL,4,2   ; @RADEON_CRTC2_OFFSET_CNTL
	.no_dead_strip	_radeon_do_init_pageflip
.subsections_via_symbols
