	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r300_emit_clear
_r300_emit_clear:                       ## @r300_emit_clear
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movl	(%rsi), %edi
	callq	_drm_buffer_unprocessed
	cmpl	$31, %eax
	jg	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_3
LBB0_2:
	movl	$10, %edi
	callq	_BEGIN_RING
	movq	_R200_3D_DRAW_IMMD_2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$8, %esi
	callq	_CP_PACKET3
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_R300_PRIM_TYPE_POINT@GOTPCREL(%rip), %rax
	movq	_R300_PRIM_WALK_RING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	movq	_R300_PRIM_NUM_VERTICES_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %al
	btsl	%eax, %edi
	callq	_OUT_RING
	movl	(%rbx), %edi
	movl	$8, %esi
	callq	_OUT_RING_DRM_BUFFER
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	movl	$4, %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_FLUSH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	movq	_RADEON_WAIT_UNTIL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CP_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_RADEON_WAIT_3D_IDLECLEAN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	movq	_RADEON_FLUSH_EMITED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r14)
LBB0_3:
	movl	%ebx, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_R200_3D_DRAW_IMMD_2,4,2        ## @R200_3D_DRAW_IMMD_2
	.comm	_R300_PRIM_TYPE_POINT,4,2       ## @R300_PRIM_TYPE_POINT
	.comm	_R300_PRIM_WALK_RING,4,2        ## @R300_PRIM_WALK_RING
	.comm	_R300_PRIM_NUM_VERTICES_SHIFT,4,2 ## @R300_PRIM_NUM_VERTICES_SHIFT
	.comm	_R300_RB3D_DSTCACHE_CTLSTAT,4,2 ## @R300_RB3D_DSTCACHE_CTLSTAT
	.comm	_R300_RB3D_DC_FLUSH,4,2         ## @R300_RB3D_DC_FLUSH
	.comm	_RADEON_WAIT_UNTIL,4,2          ## @RADEON_WAIT_UNTIL
	.comm	_RADEON_WAIT_3D_IDLECLEAN,4,2   ## @RADEON_WAIT_3D_IDLECLEAN
	.comm	_RADEON_FLUSH_EMITED,4,2        ## @RADEON_FLUSH_EMITED
	.no_dead_strip	_r300_emit_clear
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r300_emit_clear
_r300_emit_clear:                       ; @r300_emit_clear
	.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	x20, x1
	mov	x19, x0
	ldr	w0, [x1]
	bl	_drm_buffer_unprocessed
	cmp	w0, #31
	b.gt	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_3
LBB0_2:
	mov	w0, #10
	bl	_BEGIN_RING
Lloh3:
	adrp	x8, _R200_3D_DRAW_IMMD_2@GOTPAGE
Lloh4:
	ldr	x8, [x8, _R200_3D_DRAW_IMMD_2@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	mov	w1, #8
	bl	_CP_PACKET3
	bl	_OUT_RING
Lloh6:
	adrp	x8, _R300_PRIM_TYPE_POINT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _R300_PRIM_TYPE_POINT@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
Lloh9:
	adrp	x9, _R300_PRIM_WALK_RING@GOTPAGE
Lloh10:
	ldr	x9, [x9, _R300_PRIM_WALK_RING@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	orr	w8, w9, w8
Lloh12:
	adrp	x9, _R300_PRIM_NUM_VERTICES_SHIFT@GOTPAGE
Lloh13:
	ldr	x9, [x9, _R300_PRIM_NUM_VERTICES_SHIFT@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mov	w10, #1
	lsl	w9, w10, w9
	orr	w0, w8, w9
	bl	_OUT_RING
	ldr	w0, [x20]
	mov	w1, #8
	bl	_OUT_RING_DRM_BUFFER
	bl	_ADVANCE_RING
	mov	w0, #4
	bl	_BEGIN_RING
Lloh15:
	adrp	x8, _R300_RB3D_DSTCACHE_CTLSTAT@GOTPAGE
Lloh16:
	ldr	x8, [x8, _R300_RB3D_DSTCACHE_CTLSTAT@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CP_PACKET0
	bl	_OUT_RING
Lloh18:
	adrp	x8, _R300_RB3D_DC_FLUSH@GOTPAGE
Lloh19:
	ldr	x8, [x8, _R300_RB3D_DC_FLUSH@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	bl	_OUT_RING
Lloh21:
	adrp	x8, _RADEON_WAIT_UNTIL@GOTPAGE
Lloh22:
	ldr	x8, [x8, _RADEON_WAIT_UNTIL@GOTPAGEOFF]
Lloh23:
	ldr	w0, [x8]
	mov	w1, #0
	bl	_CP_PACKET0
	bl	_OUT_RING
Lloh24:
	adrp	x8, _RADEON_WAIT_3D_IDLECLEAN@GOTPAGE
Lloh25:
	ldr	x8, [x8, _RADEON_WAIT_3D_IDLECLEAN@GOTPAGEOFF]
Lloh26:
	ldr	w0, [x8]
	bl	_OUT_RING
	bl	_ADVANCE_RING
	mov	w0, #0
Lloh27:
	adrp	x8, _RADEON_FLUSH_EMITED@GOTPAGE
Lloh28:
	ldr	x8, [x8, _RADEON_FLUSH_EMITED@GOTPAGEOFF]
Lloh29:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_R200_3D_DRAW_IMMD_2,4,2        ; @R200_3D_DRAW_IMMD_2
	.comm	_R300_PRIM_TYPE_POINT,4,2       ; @R300_PRIM_TYPE_POINT
	.comm	_R300_PRIM_WALK_RING,4,2        ; @R300_PRIM_WALK_RING
	.comm	_R300_PRIM_NUM_VERTICES_SHIFT,4,2 ; @R300_PRIM_NUM_VERTICES_SHIFT
	.comm	_R300_RB3D_DSTCACHE_CTLSTAT,4,2 ; @R300_RB3D_DSTCACHE_CTLSTAT
	.comm	_R300_RB3D_DC_FLUSH,4,2         ; @R300_RB3D_DC_FLUSH
	.comm	_RADEON_WAIT_UNTIL,4,2          ; @RADEON_WAIT_UNTIL
	.comm	_RADEON_WAIT_3D_IDLECLEAN,4,2   ; @RADEON_WAIT_3D_IDLECLEAN
	.comm	_RADEON_FLUSH_EMITED,4,2        ; @RADEON_FLUSH_EMITED
	.no_dead_strip	_r300_emit_clear
.subsections_via_symbols
