	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r300_do_cp_cmdbuf              ## -- Begin function r300_do_cp_cmdbuf
	.p2align	4, 0x90
_r300_do_cp_cmdbuf:                     ## @r300_do_cp_cmdbuf
	.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
	subq	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movq	(%rdi), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	%rdi, -64(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rbx
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %rax
	movq	(%rax), %r15
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movq	%rbx, %rdi
	callq	_r300_pacify
	movq	(%r14), %rax
	movq	_R300_SIMULTANEOUS_CLIPRECTS@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jg	LBB0_3
## %bb.1:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	xorl	%edx, %edx
	callq	_r300_emit_cliprects
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, %r12d
	movq	%rbx, %rdi
	callq	_r300_pacify
	jmp	LBB0_34
LBB0_3:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	movq	8(%r14), %rdi
	callq	_drm_buffer_unprocessed
	xorl	%r12d, %r12d
	movl	$0, %r13d
	cmpl	$12, %eax
	jb	LBB0_30
## %bb.4:
	movq	_RADEON_CP_PACKET2@GOTPCREL(%rip), %rbx
	xorl	%r13d, %r13d
	jmp	LBB0_7
LBB0_19:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.1(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%r15), %rdx
	movl	8(%r15), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_r300_emit_packet0
	testl	%eax, %eax
	jne	LBB0_41
LBB0_20:                                ##   in Loop: Header=BB0_7 Depth=1
	movq	_RADEON_CP_PACKET2@GOTPCREL(%rip), %rbx
LBB0_6:                                 ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%r14), %rdi
	callq	_drm_buffer_unprocessed
	cmpl	$11, %eax
	jbe	LBB0_30
LBB0_7:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_28 Depth 2
	movq	8(%r14), %rdi
	movl	$12, %esi
	leaq	-96(%rbp), %rdx
	callq	_drm_buffer_read_object
	movq	%rax, %r15
	movl	(%rax), %esi
	leal	-128(%rsi), %eax
	cmpl	$8, %eax
	ja	LBB0_35
## %bb.8:                               ##   in Loop: Header=BB0_7 Depth=1
	leaq	LJTI0_0(%rip), %rcx
	movslq	(%rcx,%rax,4), %rax
	addq	%rcx, %rax
	jmpq	*%rax
LBB0_9:                                 ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.12(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%r15), %rsi
	movl	8(%r15), %edx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_r300_cmd_wait
	jmp	LBB0_6
LBB0_10:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.3(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%r15), %rdx
	movl	8(%r15), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_r300_emit_vpu
	testl	%eax, %eax
	je	LBB0_20
	jmp	LBB0_36
LBB0_12:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.13(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%r15), %rdx
	movl	8(%r15), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_r300_scratch
	testl	%eax, %eax
	je	LBB0_20
	jmp	LBB0_37
LBB0_14:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %r12d
	movq	_RADEON_FAMILY_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %r13                 ## 8-byte Reload
	andl	(%r13), %eax
	movq	_CHIP_RV515@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %eax
	jl	LBB0_38
## %bb.15:                              ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.16(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%r15), %rdx
	movl	8(%r15), %ecx
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_r300_emit_r500fp
	testl	%eax, %eax
	jne	LBB0_39
## %bb.16:                              ##   in Loop: Header=BB0_7 Depth=1
	movl	%r12d, %r13d
	xorl	%r12d, %r12d
	movq	_RADEON_CP_PACKET2@GOTPCREL(%rip), %rbx
	jmp	LBB0_6
LBB0_17:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.5(%rip), %rdi
	callq	_DRM_DEBUG
	movq	(%r15), %rdx
	movl	8(%r15), %ecx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r14, %rsi
	callq	_r300_emit_packet3
	testl	%eax, %eax
	je	LBB0_20
	jmp	LBB0_40
LBB0_5:                                 ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.7(%rip), %rdi
	callq	_DRM_DEBUG
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_r300_pacify
	jmp	LBB0_6
LBB0_21:                                ##   in Loop: Header=BB0_7 Depth=1
	leaq	L_.str.9(%rip), %rdi
	callq	_DRM_DEBUG
	movl	4(%r15), %esi
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edx
	testl	%esi, %esi
	js	LBB0_43
## %bb.22:                              ##   in Loop: Header=BB0_7 Depth=1
	cmpl	%edx, %esi
	jge	LBB0_43
## %bb.23:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	8(%rax), %rax
	movq	(%rax,%rsi,8), %rdx
	movq	8(%rdx), %rsi
	movl	(%rdx), %ecx
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	cmpq	%rax, %rsi
	jne	LBB0_46
## %bb.24:                              ##   in Loop: Header=BB0_7 Depth=1
	testl	%ecx, %ecx
	jne	LBB0_45
## %bb.25:                              ##   in Loop: Header=BB0_7 Depth=1
	movq	(%rax), %rsi
	movq	-64(%rbp), %rdi                 ## 8-byte Reload
	callq	_r300_discard_buffer
	movl	$1, %r13d
	jmp	LBB0_6
LBB0_26:                                ##   in Loop: Header=BB0_7 Depth=1
	movl	%r13d, %r12d
	leaq	L_.str.8(%rip), %rdi
	callq	_DRM_DEBUG
	movl	8(%r15), %edi
	callq	_BEGIN_RING
	cmpl	$0, 8(%r15)
	movq	%rbx, %r13
	jle	LBB0_29
## %bb.27:                              ##   in Loop: Header=BB0_7 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_28:                                ##   Parent Loop BB0_7 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%r13), %edi
	callq	_OUT_RING
	incl	%ebx
	cmpl	8(%r15), %ebx
	jl	LBB0_28
LBB0_29:                                ##   in Loop: Header=BB0_7 Depth=1
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	movq	%r13, %rbx
	movl	%r12d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_6
LBB0_30:
	leaq	L_.str.19(%rip), %rdi
	callq	_DRM_DEBUG
LBB0_31:
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
LBB0_32:
	callq	_r300_pacify
	testl	%r13d, %r13d
	je	LBB0_34
## %bb.33:
	movl	$2, %edi
	callq	_BEGIN_RING
	movq	(%rbx), %rax
	movl	(%rax), %edi
	callq	_RADEON_DISPATCH_AGE
	xorl	%eax, %eax
	callq	_ADVANCE_RING
LBB0_34:
	xorl	%eax, %eax
	callq	_COMMIT_RING
	movl	%r12d, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_41:
	movl	%eax, %ebx
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_42
LBB0_35:
	movq	8(%r14), %rax
	movl	(%rax), %edx
	addl	$-12, %edx
	leaq	L_.str.18(%rip), %rdi
	jmp	LBB0_44
LBB0_36:
	movl	%eax, %ebx
	leaq	L_.str.4(%rip), %rdi
	jmp	LBB0_42
LBB0_37:
	movl	%eax, %ebx
	leaq	L_.str.14(%rip), %rdi
	jmp	LBB0_42
LBB0_38:
	leaq	L_.str.15(%rip), %rdi
	xorl	%r14d, %r14d
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	%r13, %rdi
	movl	%r12d, %r13d
	movl	%r14d, %r12d
	jmp	LBB0_32
LBB0_39:
	movl	%eax, %ebx
	leaq	L_.str.17(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	%ebx, %eax
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movl	%r12d, %r13d
	movl	%eax, %r12d
	jmp	LBB0_32
LBB0_40:
	movl	%eax, %ebx
	leaq	L_.str.6(%rip), %rdi
LBB0_42:
	xorl	%eax, %eax
	callq	_DRM_ERROR
	movl	%ebx, %r12d
	jmp	LBB0_31
LBB0_43:
	decl	%edx
	leaq	L_.str.10(%rip), %rdi
LBB0_44:
	xorl	%r12d, %r12d
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_47
LBB0_45:
	movq	%rax, %rsi
LBB0_46:
	leaq	L_.str.11(%rip), %rdi
	xorl	%r12d, %r12d
	movq	%rax, %rdx
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_47:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r12d
	jmp	LBB0_31
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_9, LBB0_9-LJTI0_0
.set L0_0_set_10, LBB0_10-LJTI0_0
.set L0_0_set_12, LBB0_12-LJTI0_0
.set L0_0_set_14, LBB0_14-LJTI0_0
.set L0_0_set_17, LBB0_17-LJTI0_0
.set L0_0_set_19, LBB0_19-LJTI0_0
.set L0_0_set_5, LBB0_5-LJTI0_0
.set L0_0_set_21, LBB0_21-LJTI0_0
.set L0_0_set_26, LBB0_26-LJTI0_0
LJTI0_0:
	.long	L0_0_set_9
	.long	L0_0_set_10
	.long	L0_0_set_12
	.long	L0_0_set_14
	.long	L0_0_set_17
	.long	L0_0_set_19
	.long	L0_0_set_5
	.long	L0_0_set_21
	.long	L0_0_set_26
	.end_data_region
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

	.comm	_R300_SIMULTANEOUS_CLIPRECTS,8,3 ## @R300_SIMULTANEOUS_CLIPRECTS
L_.str.1:                               ## @.str.1
	.asciz	"R300_CMD_PACKET0\n"

L_.str.2:                               ## @.str.2
	.asciz	"r300_emit_packet0 failed\n"

L_.str.3:                               ## @.str.3
	.asciz	"R300_CMD_VPU\n"

L_.str.4:                               ## @.str.4
	.asciz	"r300_emit_vpu failed\n"

L_.str.5:                               ## @.str.5
	.asciz	"R300_CMD_PACKET3\n"

L_.str.6:                               ## @.str.6
	.asciz	"r300_emit_packet3 failed\n"

L_.str.7:                               ## @.str.7
	.asciz	"R300_CMD_END3D\n"

L_.str.8:                               ## @.str.8
	.asciz	"R300_CMD_CP_DELAY\n"

	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.comm	_RADEON_CP_PACKET2,4,2          ## @RADEON_CP_PACKET2
L_.str.9:                               ## @.str.9
	.asciz	"RADEON_CMD_DMA_DISCARD\n"

L_.str.10:                              ## @.str.10
	.asciz	"buffer index %d (of %d max)\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.11:                              ## @.str.11
	.asciz	"bad buffer %p %p %d\n"

L_.str.12:                              ## @.str.12
	.asciz	"R300_CMD_WAIT\n"

L_.str.13:                              ## @.str.13
	.asciz	"R300_CMD_SCRATCH\n"

L_.str.14:                              ## @.str.14
	.asciz	"r300_scratch failed\n"

	.comm	_RADEON_FAMILY_MASK,4,2         ## @RADEON_FAMILY_MASK
	.comm	_CHIP_RV515,4,2                 ## @CHIP_RV515
L_.str.15:                              ## @.str.15
	.asciz	"Calling r500 command on r300 card\n"

L_.str.16:                              ## @.str.16
	.asciz	"R300_CMD_R500FP\n"

L_.str.17:                              ## @.str.17
	.asciz	"r300_emit_r500fp failed\n"

L_.str.18:                              ## @.str.18
	.asciz	"bad cmd_type %i at byte %d\n"

L_.str.19:                              ## @.str.19
	.asciz	"END\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_r300_do_cp_cmdbuf              ; -- Begin function r300_do_cp_cmdbuf
	.p2align	2
_r300_do_cp_cmdbuf:                     ; @r300_do_cp_cmdbuf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #192
	.cfi_def_cfa_offset 192
	stp	x28, x27, [sp, #96]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #112]            ; 16-byte Folded Spill
	stp	x24, x23, [sp, #128]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #144]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #160]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #176]            ; 16-byte Folded Spill
	add	x29, sp, #176
	.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	x21, x2
	mov	x28, x1
	mov	x22, x0
	ldr	x8, [x1]
	ldr	x24, [x8]
	ldp	x26, x19, [x0]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x19
	bl	_r300_pacify
	ldr	x8, [x21]
Lloh2:
	adrp	x9, _R300_SIMULTANEOUS_CLIPRECTS@GOTPAGE
Lloh3:
	ldr	x9, [x9, _R300_SIMULTANEOUS_CLIPRECTS@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.gt	LBB0_3
; %bb.1:
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_r300_emit_cliprects
	cbz	w0, LBB0_3
; %bb.2:
	mov	x27, x0
	mov	x0, x19
	bl	_r300_pacify
	b	LBB0_29
LBB0_3:
	ldr	x0, [x21, #8]
	bl	_drm_buffer_unprocessed
	cmp	w0, #12
	b.lo	LBB0_25
; %bb.4:
	mov	w25, #0
Lloh5:
	adrp	x23, lJTI0_0@PAGE
Lloh6:
	add	x23, x23, lJTI0_0@PAGEOFF
Lloh7:
	adrp	x20, _RADEON_CP_PACKET2@GOTPAGE
Lloh8:
	ldr	x20, [x20, _RADEON_CP_PACKET2@GOTPAGEOFF]
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
                                        ; implicit-def: $x8
                                        ; kill: killed $x8
	str	x19, [sp, #24]                  ; 8-byte Folded Spill
	b	LBB0_7
LBB0_5:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh9:
	adrp	x0, l_.str.7@PAGE
Lloh10:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_DRM_DEBUG
	mov	x0, x19
	bl	_r300_pacify
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x0, [x21, #8]
	bl	_drm_buffer_unprocessed
	cmp	w0, #11
	b.ls	LBB0_26
LBB0_7:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_23 Depth 2
	ldr	x0, [x21, #8]
	add	x2, sp, #80
	mov	w1, #12
	bl	_drm_buffer_read_object
	ldr	w8, [x0]
	sub	w9, w8, #128
	cmp	w9, #8
	b.hi	LBB0_30
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x27, x0
	adr	x8, LBB0_5
	ldrb	w10, [x23, x9]
	add	x8, x8, x10, lsl #2
	br	x8
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
Lloh11:
	adrp	x0, l_.str.12@PAGE
Lloh12:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x1, [x27]
	ldr	w8, [x27, #8]
	ldr	x9, [sp, #64]                   ; 8-byte Folded Reload
	and	x9, x9, #0xffffffff00000000
	orr	x2, x9, x8
	mov	x0, x19
	str	x2, [sp, #64]                   ; 8-byte Folded Spill
	bl	_r300_cmd_wait
	b	LBB0_6
LBB0_10:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh13:
	adrp	x0, l_.str.3@PAGE
Lloh14:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x2, [x27]
	ldr	w8, [x27, #8]
	ldr	x9, [sp, #40]                   ; 8-byte Folded Reload
	and	x9, x9, #0xffffffff00000000
	orr	x3, x9, x8
	mov	x0, x19
	mov	x1, x21
	str	x3, [sp, #40]                   ; 8-byte Folded Spill
	bl	_r300_emit_vpu
	cbz	w0, LBB0_6
	b	LBB0_31
LBB0_11:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh15:
	adrp	x0, l_.str.13@PAGE
Lloh16:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x2, [x27]
	ldr	w8, [x27, #8]
	ldr	x9, [sp, #72]                   ; 8-byte Folded Reload
	and	x9, x9, #0xffffffff00000000
	orr	x3, x9, x8
	mov	x0, x19
	mov	x1, x21
	str	x3, [sp, #72]                   ; 8-byte Folded Spill
	bl	_r300_scratch
	cbz	w0, LBB0_6
	b	LBB0_32
LBB0_12:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	w8, [x19]
Lloh17:
	adrp	x9, _RADEON_FAMILY_MASK@GOTPAGE
Lloh18:
	ldr	x9, [x9, _RADEON_FAMILY_MASK@GOTPAGEOFF]
Lloh19:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh20:
	adrp	x9, _CHIP_RV515@GOTPAGE
Lloh21:
	ldr	x9, [x9, _CHIP_RV515@GOTPAGEOFF]
Lloh22:
	ldr	w9, [x9]
	cmp	w8, w9
	b.lt	LBB0_33
; %bb.13:                               ;   in Loop: Header=BB0_7 Depth=1
Lloh23:
	adrp	x0, l_.str.16@PAGE
Lloh24:
	add	x0, x0, l_.str.16@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x2, [x27]
	ldr	w8, [x27, #8]
	ldr	x9, [sp, #32]                   ; 8-byte Folded Reload
	and	x9, x9, #0xffffffff00000000
	orr	x3, x9, x8
	mov	x0, x19
	mov	x1, x21
	str	x3, [sp, #32]                   ; 8-byte Folded Spill
	bl	_r300_emit_r500fp
	cbz	w0, LBB0_6
	b	LBB0_34
LBB0_14:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh25:
	adrp	x0, l_.str.5@PAGE
Lloh26:
	add	x0, x0, l_.str.5@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x2, [x27]
	ldr	w8, [x27, #8]
	ldr	x9, [sp, #56]                   ; 8-byte Folded Reload
	and	x9, x9, #0xffffffff00000000
	orr	x3, x9, x8
	mov	x0, x19
	mov	x1, x21
	str	x3, [sp, #56]                   ; 8-byte Folded Spill
	bl	_r300_emit_packet3
	cbz	w0, LBB0_6
	b	LBB0_35
LBB0_15:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh27:
	adrp	x0, l_.str.1@PAGE
Lloh28:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_DRM_DEBUG
	ldr	x2, [x27]
	ldr	w8, [x27, #8]
	ldr	x9, [sp, #48]                   ; 8-byte Folded Reload
	and	x9, x9, #0xffffffff00000000
	orr	x3, x9, x8
	mov	x0, x19
	mov	x1, x21
	str	x3, [sp, #48]                   ; 8-byte Folded Spill
	bl	_r300_emit_packet0
	cbz	w0, LBB0_6
	b	LBB0_36
LBB0_16:                                ;   in Loop: Header=BB0_7 Depth=1
Lloh29:
	adrp	x0, l_.str.9@PAGE
Lloh30:
	add	x0, x0, l_.str.9@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w8, [x27, #4]
	ldr	w9, [x26]
	tbnz	w8, #31, LBB0_37
; %bb.17:                               ;   in Loop: Header=BB0_7 Depth=1
	cmp	w8, w9
	b.ge	LBB0_37
; %bb.18:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x26, #8]
	ldr	x2, [x9, x8, lsl #3]
	ldr	x9, [x2, #8]
	ldr	w8, [x2]
	cmp	x9, x28
	b.ne	LBB0_39
; %bb.19:                               ;   in Loop: Header=BB0_7 Depth=1
	cbnz	w8, LBB0_38
; %bb.20:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x1, [x28]
	mov	x0, x22
	bl	_r300_discard_buffer
	mov	w25, #1
	b	LBB0_6
LBB0_21:                                ;   in Loop: Header=BB0_7 Depth=1
	mov	x19, x22
	mov	x22, x23
	mov	x23, x26
	mov	x26, x28
	mov	x28, x25
	mov	x25, x24
Lloh31:
	adrp	x0, l_.str.8@PAGE
Lloh32:
	add	x0, x0, l_.str.8@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w0, [x27, #8]
	bl	_BEGIN_RING
	ldr	w8, [x27, #8]
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.22:                               ;   in Loop: Header=BB0_7 Depth=1
	mov	w24, #0
LBB0_23:                                ;   Parent Loop BB0_7 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x20]
	bl	_OUT_RING
	add	w24, w24, #1
	ldr	w8, [x27, #8]
	cmp	w24, w8
	b.lt	LBB0_23
LBB0_24:                                ;   in Loop: Header=BB0_7 Depth=1
	bl	_ADVANCE_RING
	mov	x24, x25
	mov	x25, x28
	mov	x28, x26
	mov	x26, x23
	mov	x23, x22
	mov	x22, x19
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	b	LBB0_6
LBB0_25:
	mov	w25, #0
LBB0_26:
Lloh33:
	adrp	x0, l_.str.19@PAGE
Lloh34:
	add	x0, x0, l_.str.19@PAGEOFF
	bl	_DRM_DEBUG
	mov	w27, #0
LBB0_27:
	mov	x0, x19
	bl	_r300_pacify
	cbz	w25, LBB0_29
; %bb.28:
	mov	w0, #2
	bl	_BEGIN_RING
	ldr	x8, [x24]
	ldr	w0, [x8]
	bl	_RADEON_DISPATCH_AGE
	bl	_ADVANCE_RING
LBB0_29:
	bl	_COMMIT_RING
	mov	x0, x27
	ldp	x29, x30, [sp, #176]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #160]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #144]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #128]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #112]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #192
	ret
LBB0_30:
	ldr	x9, [x21, #8]
	ldr	w9, [x9]
	sub	w9, w9, #12
	stp	x8, x9, [sp]
Lloh35:
	adrp	x0, l_.str.18@PAGE
Lloh36:
	add	x0, x0, l_.str.18@PAGEOFF
	b	LBB0_40
LBB0_31:
	mov	x27, x0
Lloh37:
	adrp	x0, l_.str.4@PAGE
Lloh38:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_32:
	mov	x27, x0
Lloh39:
	adrp	x0, l_.str.14@PAGE
Lloh40:
	add	x0, x0, l_.str.14@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_33:
Lloh41:
	adrp	x0, l_.str.15@PAGE
Lloh42:
	add	x0, x0, l_.str.15@PAGEOFF
	b	LBB0_40
LBB0_34:
	mov	x27, x0
Lloh43:
	adrp	x0, l_.str.17@PAGE
Lloh44:
	add	x0, x0, l_.str.17@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_35:
	mov	x27, x0
Lloh45:
	adrp	x0, l_.str.6@PAGE
Lloh46:
	add	x0, x0, l_.str.6@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_36:
	mov	x27, x0
Lloh47:
	adrp	x0, l_.str.2@PAGE
Lloh48:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_DRM_ERROR
	b	LBB0_27
LBB0_37:
	sub	w9, w9, #1
	stp	x8, x9, [sp]
Lloh49:
	adrp	x0, l_.str.10@PAGE
Lloh50:
	add	x0, x0, l_.str.10@PAGEOFF
	b	LBB0_40
LBB0_38:
	mov	x9, x28
LBB0_39:
	stp	x28, x8, [sp, #8]
	str	x9, [sp]
Lloh51:
	adrp	x0, l_.str.11@PAGE
Lloh52:
	add	x0, x0, l_.str.11@PAGEOFF
LBB0_40:
	bl	_DRM_ERROR
Lloh53:
	adrp	x8, _EINVAL@GOTPAGE
Lloh54:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh55:
	ldr	w8, [x8]
	neg	w27, w8
	b	LBB0_27
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpAdd	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpAdd	Lloh41, Lloh42
	.loh AdrpAdd	Lloh43, Lloh44
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpAdd	Lloh49, Lloh50
	.loh AdrpAdd	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_9-LBB0_5)>>2
	.byte	(LBB0_10-LBB0_5)>>2
	.byte	(LBB0_11-LBB0_5)>>2
	.byte	(LBB0_12-LBB0_5)>>2
	.byte	(LBB0_14-LBB0_5)>>2
	.byte	(LBB0_15-LBB0_5)>>2
	.byte	(LBB0_5-LBB0_5)>>2
	.byte	(LBB0_16-LBB0_5)>>2
	.byte	(LBB0_21-LBB0_5)>>2
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

	.comm	_R300_SIMULTANEOUS_CLIPRECTS,8,3 ; @R300_SIMULTANEOUS_CLIPRECTS
l_.str.1:                               ; @.str.1
	.asciz	"R300_CMD_PACKET0\n"

l_.str.2:                               ; @.str.2
	.asciz	"r300_emit_packet0 failed\n"

l_.str.3:                               ; @.str.3
	.asciz	"R300_CMD_VPU\n"

l_.str.4:                               ; @.str.4
	.asciz	"r300_emit_vpu failed\n"

l_.str.5:                               ; @.str.5
	.asciz	"R300_CMD_PACKET3\n"

l_.str.6:                               ; @.str.6
	.asciz	"r300_emit_packet3 failed\n"

l_.str.7:                               ; @.str.7
	.asciz	"R300_CMD_END3D\n"

l_.str.8:                               ; @.str.8
	.asciz	"R300_CMD_CP_DELAY\n"

	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.comm	_RADEON_CP_PACKET2,4,2          ; @RADEON_CP_PACKET2
l_.str.9:                               ; @.str.9
	.asciz	"RADEON_CMD_DMA_DISCARD\n"

l_.str.10:                              ; @.str.10
	.asciz	"buffer index %d (of %d max)\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.11:                              ; @.str.11
	.asciz	"bad buffer %p %p %d\n"

l_.str.12:                              ; @.str.12
	.asciz	"R300_CMD_WAIT\n"

l_.str.13:                              ; @.str.13
	.asciz	"R300_CMD_SCRATCH\n"

l_.str.14:                              ; @.str.14
	.asciz	"r300_scratch failed\n"

	.comm	_RADEON_FAMILY_MASK,4,2         ; @RADEON_FAMILY_MASK
	.comm	_CHIP_RV515,4,2                 ; @CHIP_RV515
l_.str.15:                              ; @.str.15
	.asciz	"Calling r500 command on r300 card\n"

l_.str.16:                              ; @.str.16
	.asciz	"R300_CMD_R500FP\n"

l_.str.17:                              ; @.str.17
	.asciz	"r300_emit_r500fp failed\n"

l_.str.18:                              ; @.str.18
	.asciz	"bad cmd_type %i at byte %d\n"

l_.str.19:                              ; @.str.19
	.asciz	"END\n"

.subsections_via_symbols
