	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function radeon_cp_dispatch_vertex
_radeon_cp_dispatch_vertex:             ## @radeon_cp_dispatch_vertex
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %rbx
	movq	(%rdi), %r14
	movq	(%rsi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r13
	movl	(%rdx), %r15d
	addl	(%r14), %r15d
	movl	(%rcx), %ecx
	movl	4(%rbx), %esi
	movq	16(%rbx), %r12
	movslq	(%r13), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	8(%rbx), %edx
	movl	24(%rbx), %r8d
	leaq	L_.str(%rip), %rdi
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movq	%r12, %r9
	callq	_DRM_DEBUG
	movl	4(%rbx), %edi
	movq	16(%rbx), %rsi
	callq	_bad_prim_vertex_nr
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movl	4(%rbx), %esi
	movq	16(%rbx), %rdx
	leaq	L_.str.1(%rip), %rdi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_DRM_ERROR                      ## TAILCALL
LBB0_1:
	movq	%r13, -64(%rbp)                 ## 8-byte Spill
	movq	%r14, -72(%rbp)                 ## 8-byte Spill
	addl	-44(%rbp), %r15d                ## 4-byte Folded Reload
	movl	%r15d, -44(%rbp)                ## 4-byte Spill
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	cmpl	$2, %eax
	movl	$1, %r13d
	cmovgel	%eax, %r13d
	xorl	%r14d, %r14d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$5, %edi
	callq	_BEGIN_RING
	movq	_RADEON_3D_RNDR_GEN_INDX_PRIM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	$3, %esi
	callq	_CP_PACKET3
	movl	%eax, %edi
	callq	_OUT_RING
	movl	-44(%rbp), %edi                 ## 4-byte Reload
	callq	_OUT_RING
	movl	%r12d, %edi
	callq	_OUT_RING
	movl	8(%rbx), %edi
	callq	_OUT_RING
	movq	_RADEON_PRIM_WALK_LIST@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	4(%rbx), %eax
	movq	_RADEON_COLOR_ORDER_RGBA@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_RADEON_VTX_FMT_RADEON_MODE@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movq	_RADEON_NUM_VERTICES_SHIFT@GOTPCREL(%rip), %rcx
	movzbl	(%rcx), %ecx
	movl	%r12d, %edi
	shll	%cl, %edi
	orl	%eax, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	incq	%r14
	cmpq	%r13, %r14
	movq	%r15, %rax
	je	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rax, %r15
	cmpq	%rax, %r14
	jge	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(,%r14,4), %rsi
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addq	8(%rax), %rsi
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_radeon_emit_clip_rect
	jmp	LBB0_4
LBB0_5:
	addq	$40, %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
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"hwprim 0x%x vfmt 0x%x %d..%d %d verts\n"

L_.str.1:                               ## @.str.1
	.asciz	"bad prim %x numverts %d\n"

	.comm	_RADEON_3D_RNDR_GEN_INDX_PRIM,4,2 ## @RADEON_3D_RNDR_GEN_INDX_PRIM
	.comm	_RADEON_PRIM_WALK_LIST,4,2      ## @RADEON_PRIM_WALK_LIST
	.comm	_RADEON_COLOR_ORDER_RGBA,4,2    ## @RADEON_COLOR_ORDER_RGBA
	.comm	_RADEON_VTX_FMT_RADEON_MODE,4,2 ## @RADEON_VTX_FMT_RADEON_MODE
	.comm	_RADEON_NUM_VERTICES_SHIFT,4,2  ## @RADEON_NUM_VERTICES_SHIFT
	.no_dead_strip	_radeon_cp_dispatch_vertex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function radeon_cp_dispatch_vertex
_radeon_cp_dispatch_vertex:             ; @radeon_cp_dispatch_vertex
	.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, x3
	ldr	x25, [x0]
	ldr	x8, [x1]
	ldr	x8, [x8]
	ldr	x26, [x8]
	ldr	w20, [x25]
	ldr	w23, [x2]
	ldr	x21, [x3, #16]
	ldrsw	x24, [x26]
	ldp	w22, w1, [x3]
	ldr	w2, [x3, #8]
	ldr	w4, [x3, #24]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x3, x22
	mov	x5, x21
	bl	_DRM_DEBUG
	ldr	w0, [x19, #4]
	ldr	x1, [x19, #16]
	bl	_bad_prim_vertex_nr
	cbz	x0, LBB0_2
; %bb.1:
	ldr	w1, [x19, #4]
	ldr	x2, [x19, #16]
Lloh2:
	adrp	x0, l_.str.1@PAGE
Lloh3:
	add	x0, x0, l_.str.1@PAGEOFF
	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
	b	_DRM_ERROR
LBB0_2:
	stp	x26, x25, [sp]                  ; 16-byte Folded Spill
	mov	x25, #0
	add	w8, w23, w20
	add	w22, w8, w22
	cmp	w24, #1
	csinc	w26, w24, wzr, gt
Lloh4:
	adrp	x28, _RADEON_PRIM_WALK_LIST@GOTPAGE
Lloh5:
	ldr	x28, [x28, _RADEON_PRIM_WALK_LIST@GOTPAGEOFF]
Lloh6:
	adrp	x20, _RADEON_COLOR_ORDER_RGBA@GOTPAGE
Lloh7:
	ldr	x20, [x20, _RADEON_COLOR_ORDER_RGBA@GOTPAGEOFF]
Lloh8:
	adrp	x23, _RADEON_VTX_FMT_RADEON_MODE@GOTPAGE
Lloh9:
	ldr	x23, [x23, _RADEON_VTX_FMT_RADEON_MODE@GOTPAGEOFF]
Lloh10:
	adrp	x27, _RADEON_NUM_VERTICES_SHIFT@GOTPAGE
Lloh11:
	ldr	x27, [x27, _RADEON_NUM_VERTICES_SHIFT@GOTPAGEOFF]
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	mov	w0, #5
	bl	_BEGIN_RING
Lloh12:
	adrp	x8, _RADEON_3D_RNDR_GEN_INDX_PRIM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _RADEON_3D_RNDR_GEN_INDX_PRIM@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	mov	w1, #3
	bl	_CP_PACKET3
	bl	_OUT_RING
	mov	x0, x22
	bl	_OUT_RING
	mov	x0, x21
	bl	_OUT_RING
	ldr	w0, [x19, #8]
	bl	_OUT_RING
	ldr	w8, [x19, #4]
	ldr	w9, [x28]
	orr	w8, w9, w8
	ldr	w9, [x20]
	orr	w8, w8, w9
	ldr	w9, [x23]
	orr	w8, w8, w9
	ldr	w9, [x27]
	lsl	w9, w21, w9
	orr	w0, w8, w9
	bl	_OUT_RING
	bl	_ADVANCE_RING
	add	x25, x25, #1
	cmp	x25, x26
	b.eq	LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x25, x24
	b.ge	LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	ldp	x8, x0, [sp]                    ; 16-byte Folded Reload
	ldr	x8, [x8, #8]
	add	x1, x8, x25, lsl #2
	bl	_radeon_emit_clip_rect
	b	LBB0_3
LBB0_6:
	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	Lloh0, Lloh1
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"hwprim 0x%x vfmt 0x%x %d..%d %d verts\n"

l_.str.1:                               ; @.str.1
	.asciz	"bad prim %x numverts %d\n"

	.comm	_RADEON_3D_RNDR_GEN_INDX_PRIM,4,2 ; @RADEON_3D_RNDR_GEN_INDX_PRIM
	.comm	_RADEON_PRIM_WALK_LIST,4,2      ; @RADEON_PRIM_WALK_LIST
	.comm	_RADEON_COLOR_ORDER_RGBA,4,2    ; @RADEON_COLOR_ORDER_RGBA
	.comm	_RADEON_VTX_FMT_RADEON_MODE,4,2 ; @RADEON_VTX_FMT_RADEON_MODE
	.comm	_RADEON_NUM_VERTICES_SHIFT,4,2  ; @RADEON_NUM_VERTICES_SHIFT
	.no_dead_strip	_radeon_cp_dispatch_vertex
.subsections_via_symbols
