	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r300_emit_packet3
_r300_emit_packet3:                     ## @r300_emit_packet3
	.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
	movl	%edx, %r14d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	8(%rsi), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rsi), %ecx
	movq	_R300_SIMULTANEOUS_CLIPRECTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ebx, %ebx
	jmp	LBB0_1
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str.2(%rip), %rdi
	callq	_DRM_DEBUG
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_r300_emit_raw_packet3
	testl	%eax, %eax
	jne	LBB0_11
LBB0_13:                                ##   in Loop: Header=BB0_1 Depth=1
	movq	_R300_SIMULTANEOUS_CLIPRECTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	addl	%eax, %ebx
	movl	(%r12), %ecx
	cmpl	%ecx, %ebx
	jge	LBB0_14
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	%eax, %ecx
	jle	LBB0_5
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	%r15, %rdi
	movq	%r12, %rsi
	movl	%ebx, %edx
	callq	_r300_emit_cliprects
	testl	%eax, %eax
	jne	LBB0_3
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	8(%r12), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
LBB0_5:                                 ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$128, %r14d
	je	LBB0_10
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	cmpl	$129, %r14d
	jne	LBB0_12
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	_r300_emit_clear
	testl	%eax, %eax
	je	LBB0_13
## %bb.8:
	movl	%eax, %r13d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_9
LBB0_14:
	xorl	%r13d, %r13d
	jmp	LBB0_15
LBB0_11:
	movl	%eax, %r13d
	leaq	L_.str.3(%rip), %rdi
LBB0_9:
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_15
LBB0_3:
	movl	%eax, %r13d
	jmp	LBB0_15
LBB0_12:
	movq	8(%r12), %rax
	movl	(%rax), %edx
	addl	$-4, %edx
	leaq	L_.str.4(%rip), %rdi
	xorl	%r13d, %r13d
	movl	%r14d, %esi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r13d
LBB0_15:
	movl	%r13d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_R300_SIMULTANEOUS_CLIPRECTS,4,2 ## @R300_SIMULTANEOUS_CLIPRECTS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"R300_CMD_PACKET3_CLEAR\n"

L_.str.1:                               ## @.str.1
	.asciz	"r300_emit_clear failed\n"

L_.str.2:                               ## @.str.2
	.asciz	"R300_CMD_PACKET3_RAW\n"

L_.str.3:                               ## @.str.3
	.asciz	"r300_emit_raw_packet3 failed\n"

L_.str.4:                               ## @.str.4
	.asciz	"bad packet3 type %i at byte %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.no_dead_strip	_r300_emit_packet3
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r300_emit_packet3
_r300_emit_packet3:                     ; @r300_emit_packet3
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x1
	mov	x20, x0
	mov	w21, #0
	mov	x25, x2
	ldr	x8, [x1, #8]
	ldr	w26, [x8]
Lloh0:
	adrp	x27, _R300_SIMULTANEOUS_CLIPRECTS@GOTPAGE
Lloh1:
	ldr	x27, [x27, _R300_SIMULTANEOUS_CLIPRECTS@GOTPAGEOFF]
	ldr	w9, [x1]
	ldr	w8, [x27]
Lloh2:
	adrp	x22, l_.str.2@PAGE
Lloh3:
	add	x22, x22, l_.str.2@PAGEOFF
Lloh4:
	adrp	x23, l_.str@PAGE
Lloh5:
	add	x23, x23, l_.str@PAGEOFF
	b	LBB0_3
LBB0_1:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x22
	bl	_DRM_DEBUG
	mov	x0, x20
	mov	x1, x19
	bl	_r300_emit_raw_packet3
	cbnz	w0, LBB0_11
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	ldr	w8, [x27]
	ldr	w9, [x19]
	add	w21, w8, w21
	cmp	w21, w9
	b.ge	LBB0_10
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w9, w8
	b.le	LBB0_6
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x20
	mov	x1, x19
	mov	x2, x21
	bl	_r300_emit_cliprects
	cbnz	w0, LBB0_12
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x19, #8]
	str	w26, [x8]
LBB0_6:                                 ;   in Loop: Header=BB0_3 Depth=1
	cmp	w25, #128
	b.eq	LBB0_1
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	cmp	w25, #129
	b.ne	LBB0_13
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x0, x23
	bl	_DRM_DEBUG
	mov	x0, x20
	mov	x1, x19
	bl	_r300_emit_clear
	cbz	w0, LBB0_2
; %bb.9:
	mov	x24, x0
Lloh6:
	adrp	x0, l_.str.1@PAGE
Lloh7:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_14
LBB0_10:
	mov	w24, #0
	b	LBB0_14
LBB0_11:
	mov	x24, x0
Lloh8:
	adrp	x0, l_.str.3@PAGE
Lloh9:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_14
LBB0_12:
	mov	x24, x0
	b	LBB0_14
LBB0_13:
	ldr	x8, [x19, #8]
	ldr	w8, [x8]
	sub	w8, w8, #4
	stp	x25, x8, [sp]
Lloh10:
	adrp	x0, l_.str.4@PAGE
Lloh11:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w24, w8
LBB0_14:
	mov	x0, x24
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_R300_SIMULTANEOUS_CLIPRECTS,4,2 ; @R300_SIMULTANEOUS_CLIPRECTS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"R300_CMD_PACKET3_CLEAR\n"

l_.str.1:                               ; @.str.1
	.asciz	"r300_emit_clear failed\n"

l_.str.2:                               ; @.str.2
	.asciz	"R300_CMD_PACKET3_RAW\n"

l_.str.3:                               ; @.str.3
	.asciz	"r300_emit_raw_packet3 failed\n"

l_.str.4:                               ; @.str.4
	.asciz	"bad packet3 type %i at byte %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.no_dead_strip	_r300_emit_packet3
.subsections_via_symbols
