	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r300_emit_r500fp
_r300_emit_r500fp:                      ## @r300_emit_r500fp
	.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
	movq	%rdx, %r15
	movq	%rsi, %r14
	movq	%rdx, %r12
	shrq	$32, %r12
	movl	%r12d, %eax
	andl	$1, %eax
	shll	$8, %eax
	orl	%ecx, %eax
	movq	_R500FP_CONSTANT_TYPE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r13d
	xorl	%ecx, %ecx
	testl	%r12d, %r13d
	setne	%cl
	movq	_R500FP_CONSTANT_CLAMP@GOTPCREL(%rip), %rdx
	xorl	%ebx, %ebx
	movl	(%rdx), %edx
	andl	%r12d, %edx
	setne	%bl
	movl	%ecx, %edx
	shll	$16, %edx
	orl	%eax, %edx
	shll	$17, %ebx
	orl	%edx, %ebx
	leaq	L_.str(%rip), %rdi
	movl	%r15d, %esi
	movl	%ebx, %edx
	callq	_DRM_DEBUG
	testl	%r15d, %r15d
	je	LBB0_1
## %bb.2:
	xorl	%eax, %eax
	testl	%r12d, %r13d
	sete	%al
	leal	(%rax,%rax), %r12d
	addl	$4, %r12d
	imull	%r15d, %r12d
	leal	(,%r12,4), %r15d
	movl	(%r14), %edi
	callq	_drm_buffer_unprocessed
	cmpl	%eax, %r15d
	jle	LBB0_4
## %bb.3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
	jmp	LBB0_5
LBB0_1:
	xorl	%ebx, %ebx
	jmp	LBB0_5
LBB0_4:
	leal	3(%r12), %edi
	callq	_BEGIN_RING
	movq	_R500_GA_US_VECTOR_INDEX@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%ebx, %esi
	callq	_OUT_RING_REG
	movq	_R500_GA_US_VECTOR_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leal	-1(%r12), %esi
	callq	_CP_PACKET0_TABLE
	movl	%eax, %edi
	callq	_OUT_RING
	movl	(%r14), %edi
	movl	%r12d, %esi
	callq	_OUT_RING_DRM_BUFFER
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_ADVANCE_RING
LBB0_5:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.comm	_R500FP_CONSTANT_TYPE,4,2       ## @R500FP_CONSTANT_TYPE
	.comm	_R500FP_CONSTANT_CLAMP,4,2      ## @R500FP_CONSTANT_CLAMP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"r500fp %d %d type: %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_R500_GA_US_VECTOR_INDEX,4,2    ## @R500_GA_US_VECTOR_INDEX
	.comm	_R500_GA_US_VECTOR_DATA,4,2     ## @R500_GA_US_VECTOR_DATA
	.no_dead_strip	_r300_emit_r500fp
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r300_emit_r500fp
_r300_emit_r500fp:                      ; @r300_emit_r500fp
	.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
	mov	x20, x2
	mov	x19, x1
	lsr	x8, x2, #32
	ubfiz	w9, w8, #8, #1
	orr	w9, w9, w3
Lloh0:
	adrp	x10, _R500FP_CONSTANT_TYPE@GOTPAGE
Lloh1:
	ldr	x10, [x10, _R500FP_CONSTANT_TYPE@GOTPAGEOFF]
Lloh2:
	ldr	w10, [x10]
	ands	w22, w10, w8
Lloh3:
	adrp	x10, _R500FP_CONSTANT_CLAMP@GOTPAGE
Lloh4:
	ldr	x10, [x10, _R500FP_CONSTANT_CLAMP@GOTPAGEOFF]
	cset	w3, ne
Lloh5:
	ldr	w10, [x10]
	tst	w10, w8
	cset	w8, ne
	orr	w9, w9, w3, lsl #16
	orr	w21, w9, w8, lsl #17
Lloh6:
	adrp	x0, l_.str@PAGE
Lloh7:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	mov	x2, x21
	bl	_DRM_DEBUG
	cbz	w20, LBB0_4
; %bb.1:
	mov	w8, #6
	mov	w9, #4
	cmp	w22, #0
	csel	w8, w9, w8, ne
	mul	w20, w8, w20
	ldr	w0, [x19]
	bl	_drm_buffer_unprocessed
	cmp	w0, w20, lsl #2
	b.ge	LBB0_3
; %bb.2:
Lloh8:
	adrp	x8, _EINVAL@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_5
LBB0_3:
	add	w0, w20, #3
	bl	_BEGIN_RING
Lloh11:
	adrp	x8, _R500_GA_US_VECTOR_INDEX@GOTPAGE
Lloh12:
	ldr	x8, [x8, _R500_GA_US_VECTOR_INDEX@GOTPAGEOFF]
Lloh13:
	ldr	w0, [x8]
	mov	x1, x21
	bl	_OUT_RING_REG
Lloh14:
	adrp	x8, _R500_GA_US_VECTOR_DATA@GOTPAGE
Lloh15:
	ldr	x8, [x8, _R500_GA_US_VECTOR_DATA@GOTPAGEOFF]
Lloh16:
	ldr	w0, [x8]
	sub	w1, w20, #1
	bl	_CP_PACKET0_TABLE
	bl	_OUT_RING
	ldr	w0, [x19]
	mov	x1, x20
	bl	_OUT_RING_DRM_BUFFER
	bl	_ADVANCE_RING
LBB0_4:
	mov	w0, #0
LBB0_5:
	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 AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.comm	_R500FP_CONSTANT_TYPE,4,2       ; @R500FP_CONSTANT_TYPE
	.comm	_R500FP_CONSTANT_CLAMP,4,2      ; @R500FP_CONSTANT_CLAMP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"r500fp %d %d type: %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_R500_GA_US_VECTOR_INDEX,4,2    ; @R500_GA_US_VECTOR_INDEX
	.comm	_R500_GA_US_VECTOR_DATA,4,2     ; @R500_GA_US_VECTOR_DATA
	.no_dead_strip	_r300_emit_r500fp
.subsections_via_symbols
