	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function r128_cce_dispatch_blit
_r128_cce_dispatch_blit:                ## @r128_cce_dispatch_blit
	.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, %r13
	movq	%rsi, %r12
	movq	%rdi, %rbx
	movq	8(%rdi), %r14
	leaq	L_.str(%rip), %rdi
	callq	_DRM_DEBUG
	movl	(%r13), %esi
	leal	-128(%rsi), %r15d
	cmpl	$8, %r15d
	jae	LBB0_1
## %bb.4:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movl	$2, %edi
	callq	_BEGIN_RING
	movq	_R128_PC_GUI_CTLSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_CCE_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_R128_PC_RI_GUI@GOTPCREL(%rip), %rax
	movq	_R128_PC_FLUSH_GUI@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	orl	(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	movq	(%r14), %rax
	movq	8(%r13), %rsi
	movq	(%rax,%rsi,8), %rdi
	movq	16(%rdi), %rdx
	cmpq	%r12, %rdx
	je	LBB0_6
## %bb.5:
	movq	_DRM_CURRENTPID@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_DRM_ERROR
	jmp	LBB0_3
LBB0_1:
	leaq	L_.str.1(%rip), %rdi
LBB0_2:
	xorl	%ebx, %ebx
                                        ## kill: def $esi killed $esi killed $rsi
	xorl	%eax, %eax
	callq	_DRM_ERROR
LBB0_3:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_9:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	cmpq	$0, 8(%rdi)
	je	LBB0_8
## %bb.7:
	leaq	L_.str.3(%rip), %rdi
	jmp	LBB0_2
LBB0_8:
	movslq	%r15d, %rax
	leaq	l_switch.table.r128_cce_dispatch_blit(%rip), %rcx
	movq	24(%rdi), %rdx
	movl	$1, (%rdx)
	movl	20(%r13), %r14d
	imull	16(%r13), %r14d
	movl	(%rcx,%rax,4), %ecx
                                        ## kill: def $cl killed $cl killed $ecx
	sarl	%cl, %r14d
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	(%rax), %rbx
	movslq	(%rdi), %r12
	movq	_R128_CNTL_HOSTDATA_BLT@GOTPCREL(%rip), %rax
	movq	%rdi, %r15
	movl	(%rax), %edi
	leal	6(%r14), %esi
	callq	_CCE_PACKET3
	movl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, (%rbx,%r12)
	movq	_R128_GMC_DST_PITCH_OFFSET_CNTL@GOTPCREL(%rip), %rax
	movq	_R128_GMC_BRUSH_NONE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	orl	(%rax), %ecx
	movl	(%r13), %edi
	shll	$8, %edi
	orl	%ecx, %edi
	movq	_R128_GMC_SRC_DATATYPE_COLOR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_R128_ROP3_S@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_R128_DP_SRC_SOURCE_HOST_DATA@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_R128_GMC_CLR_CMP_CNTL_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_R128_GMC_AUX_CLIP_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_R128_GMC_WR_MSK_DIS@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_cpu_to_le32
	movl	%eax, 4(%rbx,%r12)
	movl	24(%r13), %eax
	movl	28(%r13), %edi
	shll	$21, %eax
	sarl	$5, %edi
	orl	%eax, %edi
	callq	_cpu_to_le32
	movl	%eax, 8(%rbx,%r12)
	movl	$-1, %edi
	callq	_cpu_to_le32
	movl	%eax, 12(%rbx,%r12)
	movl	$-1, %edi
	callq	_cpu_to_le32
	movl	%eax, 16(%rbx,%r12)
	movl	32(%r13), %edi
	shll	$16, %edi
	orl	36(%r13), %edi
	callq	_cpu_to_le32
	movl	%eax, 20(%rbx,%r12)
	movl	20(%r13), %edi
	shll	$16, %edi
	orl	16(%r13), %edi
	callq	_cpu_to_le32
	movl	%eax, 24(%rbx,%r12)
	movl	%r14d, %edi
	callq	_cpu_to_le32
	movl	%eax, 28(%rbx,%r12)
	leal	32(,%r14,4), %ecx
	movl	%ecx, 4(%r15)
	xorl	%ebx, %ebx
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%r15, %rsi
	xorl	%edx, %edx
	callq	_r128_cce_dispatch_indirect
	movl	$2, %edi
	callq	_BEGIN_RING
	movq	_R128_PC_GUI_CTLSTAT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	xorl	%esi, %esi
	callq	_CCE_PACKET0
	movl	%eax, %edi
	callq	_OUT_RING
	movq	_R128_PC_FLUSH_GUI@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_RING
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_RING_LOCALS,4,2                ## @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"\n"

L_.str.1:                               ## @.str.1
	.asciz	"invalid blit format %d\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_R128_PC_GUI_CTLSTAT,4,2        ## @R128_PC_GUI_CTLSTAT
	.comm	_R128_PC_RI_GUI,4,2             ## @R128_PC_RI_GUI
	.comm	_R128_PC_FLUSH_GUI,4,2          ## @R128_PC_FLUSH_GUI
L_.str.2:                               ## @.str.2
	.asciz	"process %d using buffer owned by %p\n"

	.comm	_DRM_CURRENTPID,4,2             ## @DRM_CURRENTPID
L_.str.3:                               ## @.str.3
	.asciz	"sending pending buffer %d\n"

	.comm	_R128_CNTL_HOSTDATA_BLT,4,2     ## @R128_CNTL_HOSTDATA_BLT
	.comm	_R128_GMC_DST_PITCH_OFFSET_CNTL,4,2 ## @R128_GMC_DST_PITCH_OFFSET_CNTL
	.comm	_R128_GMC_BRUSH_NONE,4,2        ## @R128_GMC_BRUSH_NONE
	.comm	_R128_GMC_SRC_DATATYPE_COLOR,4,2 ## @R128_GMC_SRC_DATATYPE_COLOR
	.comm	_R128_ROP3_S,4,2                ## @R128_ROP3_S
	.comm	_R128_DP_SRC_SOURCE_HOST_DATA,4,2 ## @R128_DP_SRC_SOURCE_HOST_DATA
	.comm	_R128_GMC_CLR_CMP_CNTL_DIS,4,2  ## @R128_GMC_CLR_CMP_CNTL_DIS
	.comm	_R128_GMC_AUX_CLIP_DIS,4,2      ## @R128_GMC_AUX_CLIP_DIS
	.comm	_R128_GMC_WR_MSK_DIS,4,2        ## @R128_GMC_WR_MSK_DIS
	.no_dead_strip	_r128_cce_dispatch_blit
	.section	__TEXT,__const
	.p2align	2                               ## @switch.table.r128_cce_dispatch_blit
l_switch.table.r128_cce_dispatch_blit:
	.long	1                               ## 0x1
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	1                               ## 0x1
	.long	2                               ## 0x2
	.long	0                               ## 0x0
	.long	1                               ## 0x1
	.long	1                               ## 0x1

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function r128_cce_dispatch_blit
_r128_cce_dispatch_blit:                ; @r128_cce_dispatch_blit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	mov	x20, x2
	mov	x22, x1
	mov	x19, x0
	ldr	x21, [x0, #8]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	bl	_DRM_DEBUG
	ldr	w1, [x20]
	sub	w25, w1, #128
	cmp	w25, #8
	b.hs	LBB0_3
; %bb.1:
	mov	w0, #2
	bl	_BEGIN_RING
Lloh2:
	adrp	x23, _R128_PC_GUI_CTLSTAT@GOTPAGE
Lloh3:
	ldr	x23, [x23, _R128_PC_GUI_CTLSTAT@GOTPAGEOFF]
	ldr	w0, [x23]
	mov	w1, #0
	bl	_CCE_PACKET0
	bl	_OUT_RING
Lloh4:
	adrp	x8, _R128_PC_RI_GUI@GOTPAGE
Lloh5:
	ldr	x8, [x8, _R128_PC_RI_GUI@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
Lloh7:
	adrp	x24, _R128_PC_FLUSH_GUI@GOTPAGE
Lloh8:
	ldr	x24, [x24, _R128_PC_FLUSH_GUI@GOTPAGEOFF]
	ldr	w9, [x24]
	orr	w0, w9, w8
	bl	_OUT_RING
	bl	_ADVANCE_RING
	ldr	x8, [x21]
	ldr	x1, [x20, #8]
	ldr	x21, [x8, x1, lsl #3]
	ldr	x8, [x21, #16]
	cmp	x8, x22
	b.eq	LBB0_6
; %bb.2:
Lloh9:
	adrp	x9, _DRM_CURRENTPID@GOTPAGE
Lloh10:
	ldr	x9, [x9, _DRM_CURRENTPID@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x9]
	str	x8, [sp]
Lloh12:
	adrp	x0, l_.str.2@PAGE
Lloh13:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_4
LBB0_3:
Lloh14:
	adrp	x0, l_.str.1@PAGE
Lloh15:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_4:
	bl	_DRM_ERROR
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_5:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_6:
	ldr	x8, [x21, #8]
	cbz	x8, LBB0_8
; %bb.7:
Lloh19:
	adrp	x0, l_.str.3@PAGE
Lloh20:
	add	x0, x0, l_.str.3@PAGEOFF
                                        ; kill: def $w1 killed $w1 killed $x1
	b	LBB0_4
LBB0_8:
Lloh21:
	adrp	x8, l_switch.table.r128_cce_dispatch_blit@PAGE
Lloh22:
	add	x8, x8, l_switch.table.r128_cce_dispatch_blit@PAGEOFF
	ldr	w8, [x8, w25, sxtw #2]
	ldr	x9, [x21, #24]
	mov	w10, #1
	str	w10, [x9]
	ldp	w9, w10, [x20, #16]
	mul	w9, w10, w9
	asr	w22, w9, w8
	ldr	x8, [x19]
	ldr	x8, [x8]
	ldrsw	x9, [x21]
	add	x25, x8, x9
Lloh23:
	adrp	x8, _R128_CNTL_HOSTDATA_BLT@GOTPAGE
Lloh24:
	ldr	x8, [x8, _R128_CNTL_HOSTDATA_BLT@GOTPAGEOFF]
Lloh25:
	ldr	w0, [x8]
	add	w1, w22, #6
	bl	_CCE_PACKET3
	bl	_cpu_to_le32
	str	w0, [x25]
Lloh26:
	adrp	x8, _R128_GMC_DST_PITCH_OFFSET_CNTL@GOTPAGE
Lloh27:
	ldr	x8, [x8, _R128_GMC_DST_PITCH_OFFSET_CNTL@GOTPAGEOFF]
Lloh28:
	ldr	w8, [x8]
Lloh29:
	adrp	x9, _R128_GMC_BRUSH_NONE@GOTPAGE
Lloh30:
	ldr	x9, [x9, _R128_GMC_BRUSH_NONE@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x20]
	orr	w8, w8, w9, lsl #8
Lloh32:
	adrp	x9, _R128_GMC_SRC_DATATYPE_COLOR@GOTPAGE
Lloh33:
	ldr	x9, [x9, _R128_GMC_SRC_DATATYPE_COLOR@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh35:
	adrp	x9, _R128_ROP3_S@GOTPAGE
Lloh36:
	ldr	x9, [x9, _R128_ROP3_S@GOTPAGEOFF]
Lloh37:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh38:
	adrp	x9, _R128_DP_SRC_SOURCE_HOST_DATA@GOTPAGE
Lloh39:
	ldr	x9, [x9, _R128_DP_SRC_SOURCE_HOST_DATA@GOTPAGEOFF]
Lloh40:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh41:
	adrp	x9, _R128_GMC_CLR_CMP_CNTL_DIS@GOTPAGE
Lloh42:
	ldr	x9, [x9, _R128_GMC_CLR_CMP_CNTL_DIS@GOTPAGEOFF]
Lloh43:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh44:
	adrp	x9, _R128_GMC_AUX_CLIP_DIS@GOTPAGE
Lloh45:
	ldr	x9, [x9, _R128_GMC_AUX_CLIP_DIS@GOTPAGEOFF]
Lloh46:
	ldr	w9, [x9]
	orr	w8, w8, w9
Lloh47:
	adrp	x9, _R128_GMC_WR_MSK_DIS@GOTPAGE
Lloh48:
	ldr	x9, [x9, _R128_GMC_WR_MSK_DIS@GOTPAGEOFF]
Lloh49:
	ldr	w9, [x9]
	orr	w0, w8, w9
	bl	_cpu_to_le32
	str	w0, [x25, #4]
	ldp	w8, w9, [x20, #24]
	asr	w9, w9, #5
	orr	w0, w9, w8, lsl #21
	bl	_cpu_to_le32
	str	w0, [x25, #8]
	mov	w0, #-1
	bl	_cpu_to_le32
	str	w0, [x25, #12]
	mov	w0, #-1
	bl	_cpu_to_le32
	str	w0, [x25, #16]
	ldp	w8, w9, [x20, #32]
	orr	w0, w9, w8, lsl #16
	bl	_cpu_to_le32
	str	w0, [x25, #20]
	ldp	w9, w8, [x20, #16]
	orr	w0, w9, w8, lsl #16
	bl	_cpu_to_le32
	str	w0, [x25, #24]
	mov	x0, x22
	bl	_cpu_to_le32
	str	w0, [x25, #28]
	lsl	w8, w22, #2
	add	w3, w8, #32
	str	w3, [x21, #4]
	mov	x0, x19
	mov	x1, x21
	mov	w2, #0
	bl	_r128_cce_dispatch_indirect
	mov	w0, #2
	bl	_BEGIN_RING
	ldr	w0, [x23]
	mov	w1, #0
	bl	_CCE_PACKET0
	bl	_OUT_RING
	ldr	w0, [x24]
	bl	_OUT_RING
	bl	_ADVANCE_RING
	mov	w0, #0
	b	LBB0_5
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh40
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh21, Lloh22
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"\n"

l_.str.1:                               ; @.str.1
	.asciz	"invalid blit format %d\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_R128_PC_GUI_CTLSTAT,4,2        ; @R128_PC_GUI_CTLSTAT
	.comm	_R128_PC_RI_GUI,4,2             ; @R128_PC_RI_GUI
	.comm	_R128_PC_FLUSH_GUI,4,2          ; @R128_PC_FLUSH_GUI
l_.str.2:                               ; @.str.2
	.asciz	"process %d using buffer owned by %p\n"

	.comm	_DRM_CURRENTPID,4,2             ; @DRM_CURRENTPID
l_.str.3:                               ; @.str.3
	.asciz	"sending pending buffer %d\n"

	.comm	_R128_CNTL_HOSTDATA_BLT,4,2     ; @R128_CNTL_HOSTDATA_BLT
	.comm	_R128_GMC_DST_PITCH_OFFSET_CNTL,4,2 ; @R128_GMC_DST_PITCH_OFFSET_CNTL
	.comm	_R128_GMC_BRUSH_NONE,4,2        ; @R128_GMC_BRUSH_NONE
	.comm	_R128_GMC_SRC_DATATYPE_COLOR,4,2 ; @R128_GMC_SRC_DATATYPE_COLOR
	.comm	_R128_ROP3_S,4,2                ; @R128_ROP3_S
	.comm	_R128_DP_SRC_SOURCE_HOST_DATA,4,2 ; @R128_DP_SRC_SOURCE_HOST_DATA
	.comm	_R128_GMC_CLR_CMP_CNTL_DIS,4,2  ; @R128_GMC_CLR_CMP_CNTL_DIS
	.comm	_R128_GMC_AUX_CLIP_DIS,4,2      ; @R128_GMC_AUX_CLIP_DIS
	.comm	_R128_GMC_WR_MSK_DIS,4,2        ; @R128_GMC_WR_MSK_DIS
	.no_dead_strip	_r128_cce_dispatch_blit
	.section	__TEXT,__const
	.p2align	2                               ; @switch.table.r128_cce_dispatch_blit
l_switch.table.r128_cce_dispatch_blit:
	.long	1                               ; 0x1
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	1                               ; 0x1
	.long	2                               ; 0x2
	.long	0                               ; 0x0
	.long	1                               ; 0x1
	.long	1                               ; 0x1

.subsections_via_symbols
