	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function i810_dma_dispatch_vertex
_i810_dma_dispatch_vertex:              ## @i810_dma_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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, -48(%rbp)                 ## 4-byte Spill
	movq	%rdi, %r12
	movq	(%rdi), %rax
	movq	8(%rdi), %rcx
	movq	(%rsi), %rdx
	subq	(%rax), %rdx
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	movq	%rsi, -72(%rbp)                 ## 8-byte Spill
	movq	8(%rsi), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	8(%rcx), %r14
	movq	16(%r14), %r13
	movl	(%r14), %ebx
	callq	_i810_kernel_lost_context
	movq	_I810_NR_SAREA_CLIPRECTS@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	cmovll	%ebx, %eax
	movl	%eax, %ebx
	xorl	%r15d, %r15d
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	cmpl	$4097, %eax                     ## imm = 0x1001
	cmovll	%eax, %r15d
	cmpq	$0, 8(%r14)
	je	LBB0_2
## %bb.1:
	movq	%r12, %rdi
	callq	_i810EmitState
LBB0_2:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	(%rsi), %rax
	movq	_I810_BUF_MAPPED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
## %bb.3:
	movq	_PR_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	andl	4(%r14), %eax
	movq	_GFX_OP_PRIMITIVE@GOTPCREL(%rip), %rcx
	leal	3(%r15), %edx
	testl	%r15d, %r15d
	cmovnsl	%r15d, %edx
	sarl	$2, %edx
	addl	$-2, %edx
	orl	%eax, %edx
	orl	(%rcx), %edx
	movq	16(%rsi), %rax
	movl	%edx, (%rax)
	testb	$4, %r15b
	je	LBB0_5
## %bb.4:
	movslq	%r15d, %rcx
	movl	$0, (%rax,%rcx)
	addl	$4, %r15d
LBB0_5:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_i810_unmap_buffer
LBB0_6:
	testl	%r15d, %r15d
	je	LBB0_11
## %bb.7:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	addl	%eax, %r15d
	addl	$-4, %r15d
	movslq	%ebx, %r12
	cmpl	$2, %r12d
	movl	$1, %ebx
	cmovgel	%r12d, %ebx
	addq	$12, %r13
	xorl	%r14d, %r14d
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_8 Depth=1
	movl	$4, %edi
	callq	_BEGIN_LP_RING
	movq	_CMD_OP_BATCH_BUFFER@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	movq	_BB1_PROTECTED@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	orl	-64(%rbp), %edi                 ## 4-byte Folded Reload
	callq	_OUT_RING
	movl	%r15d, %edi
	callq	_OUT_RING
	xorl	%edi, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_LP_RING
	incq	%r14
	addq	$16, %r13
	cmpq	%r14, %rbx
	je	LBB0_11
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	cmpq	%r12, %r14
	jge	LBB0_10
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movl	$4, %edi
	callq	_BEGIN_LP_RING
	movq	_SC_UPDATE_SCISSOR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_GFX_OP_SCISSOR@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movq	_SC_ENABLE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	callq	_OUT_RING
	movq	_GFX_OP_SCISSOR_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	movl	-8(%r13), %edi
	shll	$16, %edi
	orl	-12(%r13), %edi
	callq	_OUT_RING
	movl	-4(%r13), %eax
	movl	(%r13), %edi
	decl	%eax
	shll	$16, %edi
	addl	$-65536, %edi                   ## imm = 0xFFFF0000
	orl	%eax, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	callq	_ADVANCE_LP_RING
	jmp	LBB0_10
LBB0_11:
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	je	LBB0_12
## %bb.13:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	incl	(%rbx)
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	movl	12(%r15), %edi
	movq	_I810_BUF_CLIENT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_I810_BUF_HARDWARE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_cmpxchg
	movl	$8, %edi
	callq	_BEGIN_LP_RING
	movq	_CMD_STORE_DWORD_IDX@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	callq	_OUT_RING
	movl	$20, %edi
	callq	_OUT_RING
	movl	(%rbx), %edi
	callq	_OUT_RING
	movl	(%r14), %edi
	callq	_OUT_RING
	movl	8(%r15), %edi
	callq	_OUT_RING
	movq	_I810_BUF_FREE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	movq	_CMD_REPORT_HEAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_OUT_RING
	xorl	%edi, %edi
	callq	_OUT_RING
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_ADVANCE_LP_RING                ## TAILCALL
LBB0_12:
	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
	.comm	_I810_NR_SAREA_CLIPRECTS,4,2    ## @I810_NR_SAREA_CLIPRECTS
	.comm	_I810_BUF_MAPPED,8,3            ## @I810_BUF_MAPPED
	.comm	_PR_MASK,4,2                    ## @PR_MASK
	.comm	_GFX_OP_PRIMITIVE,4,2           ## @GFX_OP_PRIMITIVE
	.comm	_GFX_OP_SCISSOR,4,2             ## @GFX_OP_SCISSOR
	.comm	_SC_UPDATE_SCISSOR,4,2          ## @SC_UPDATE_SCISSOR
	.comm	_SC_ENABLE,4,2                  ## @SC_ENABLE
	.comm	_GFX_OP_SCISSOR_INFO,4,2        ## @GFX_OP_SCISSOR_INFO
	.comm	_CMD_OP_BATCH_BUFFER,4,2        ## @CMD_OP_BATCH_BUFFER
	.comm	_BB1_PROTECTED,8,3              ## @BB1_PROTECTED
	.comm	_I810_BUF_CLIENT,4,2            ## @I810_BUF_CLIENT
	.comm	_I810_BUF_HARDWARE,4,2          ## @I810_BUF_HARDWARE
	.comm	_CMD_STORE_DWORD_IDX,4,2        ## @CMD_STORE_DWORD_IDX
	.comm	_I810_BUF_FREE,4,2              ## @I810_BUF_FREE
	.comm	_CMD_REPORT_HEAD,4,2            ## @CMD_REPORT_HEAD
	.no_dead_strip	_i810_dma_dispatch_vertex
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i810_dma_dispatch_vertex
_i810_dma_dispatch_vertex:              ; @i810_dma_dispatch_vertex
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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	x22, x3
	str	w2, [sp, #28]                   ; 4-byte Folded Spill
	mov	x20, x1
	mov	x21, x0
	ldp	x8, x9, [x0]
	str	x9, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x27, [x9, #8]
	ldr	x19, [x27, #16]
	ldr	w23, [x27]
	ldp	x24, x28, [x1]
	ldr	x25, [x8]
	bl	_i810_kernel_lost_context
Lloh0:
	adrp	x8, _I810_NR_SAREA_CLIPRECTS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _I810_NR_SAREA_CLIPRECTS@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w23, w8
	csel	w23, w23, w8, lt
	cmp	w22, #1, lsl #12                ; =4096
	csel	w26, wzr, w22, gt
	ldr	x8, [x27, #8]
	cbz	x8, LBB0_2
; %bb.1:
	mov	x0, x21
	bl	_i810EmitState
LBB0_2:
	ldr	x8, [x28]
Lloh3:
	adrp	x9, _I810_BUF_MAPPED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I810_BUF_MAPPED@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	str	x28, [sp, #16]                  ; 8-byte Folded Spill
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x27, #4]
Lloh6:
	adrp	x9, _PR_MASK@GOTPAGE
Lloh7:
	ldr	x9, [x9, _PR_MASK@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	and	w8, w9, w8
Lloh9:
	adrp	x9, _GFX_OP_PRIMITIVE@GOTPAGE
Lloh10:
	ldr	x9, [x9, _GFX_OP_PRIMITIVE@GOTPAGEOFF]
Lloh11:
	ldr	w9, [x9]
	add	w10, w26, #3
	cmp	w26, #0
	csel	w10, w10, w26, lt
	asr	w10, w10, #2
	sub	w10, w10, #2
	orr	w8, w8, w10
	orr	w9, w8, w9
	ldr	x8, [x28, #16]
	str	w9, [x8]
	tbz	w26, #2, LBB0_5
; %bb.4:
	str	wzr, [x8, w26, sxtw]
	add	w26, w26, #4
LBB0_5:
	mov	x0, x20
	bl	_i810_unmap_buffer
LBB0_6:
	cbz	w26, LBB0_11
; %bb.7:
	mov	x21, #0
	sub	x22, x24, x25
	add	w8, w22, w26
	sub	w20, w8, #4
	sxtw	x25, w23
	cmp	w23, #1
	csinc	w26, w23, wzr, gt
	add	x27, x19, #8
Lloh12:
	adrp	x23, _SC_ENABLE@GOTPAGE
Lloh13:
	ldr	x23, [x23, _SC_ENABLE@GOTPAGEOFF]
Lloh14:
	adrp	x24, _GFX_OP_SCISSOR_INFO@GOTPAGE
Lloh15:
	ldr	x24, [x24, _GFX_OP_SCISSOR_INFO@GOTPAGEOFF]
Lloh16:
	adrp	x28, _CMD_OP_BATCH_BUFFER@GOTPAGE
Lloh17:
	ldr	x28, [x28, _CMD_OP_BATCH_BUFFER@GOTPAGEOFF]
Lloh18:
	adrp	x19, _BB1_PROTECTED@GOTPAGE
Lloh19:
	ldr	x19, [x19, _BB1_PROTECTED@GOTPAGEOFF]
	b	LBB0_9
LBB0_8:                                 ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #4
	bl	_BEGIN_LP_RING
	ldr	w0, [x28]
	bl	_OUT_RING
	ldr	w8, [x19]
	orr	w0, w8, w22
	bl	_OUT_RING
	mov	x0, x20
	bl	_OUT_RING
	mov	w0, #0
	bl	_OUT_RING
	bl	_ADVANCE_LP_RING
	add	x21, x21, #1
	add	x27, x27, #16
	cmp	x26, x21
	b.eq	LBB0_11
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x21, x25
	b.ge	LBB0_8
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	mov	w0, #4
	bl	_BEGIN_LP_RING
Lloh20:
	adrp	x8, _GFX_OP_SCISSOR@GOTPAGE
Lloh21:
	ldr	x8, [x8, _GFX_OP_SCISSOR@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
Lloh23:
	adrp	x9, _SC_UPDATE_SCISSOR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _SC_UPDATE_SCISSOR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	orr	w8, w9, w8
	ldr	w9, [x23]
	orr	w0, w8, w9
	bl	_OUT_RING
	ldr	w0, [x24]
	bl	_OUT_RING
	ldp	w8, w9, [x27, #-8]
	orr	w0, w8, w9, lsl #16
	bl	_OUT_RING
	ldp	w8, w9, [x27]
	sub	w8, w8, #1
	lsl	w9, w9, #16
	sub	w9, w9, #16, lsl #12            ; =65536
	orr	w0, w9, w8
	bl	_OUT_RING
	bl	_ADVANCE_LP_RING
	b	LBB0_8
LBB0_11:
	ldr	w8, [sp, #28]                   ; 4-byte Folded Reload
	cbz	w8, LBB0_13
; %bb.12:
	ldp	x21, x20, [sp, #8]              ; 16-byte Folded Reload
	ldr	w8, [x21]
	add	w8, w8, #1
	str	w8, [x21]
	ldr	w0, [x20, #12]
Lloh26:
	adrp	x8, _I810_BUF_CLIENT@GOTPAGE
Lloh27:
	ldr	x8, [x8, _I810_BUF_CLIENT@GOTPAGEOFF]
Lloh28:
	ldr	w1, [x8]
Lloh29:
	adrp	x8, _I810_BUF_HARDWARE@GOTPAGE
Lloh30:
	ldr	x8, [x8, _I810_BUF_HARDWARE@GOTPAGEOFF]
Lloh31:
	ldr	w2, [x8]
	bl	_cmpxchg
	mov	w0, #8
	bl	_BEGIN_LP_RING
Lloh32:
	adrp	x19, _CMD_STORE_DWORD_IDX@GOTPAGE
Lloh33:
	ldr	x19, [x19, _CMD_STORE_DWORD_IDX@GOTPAGEOFF]
	ldr	w0, [x19]
	bl	_OUT_RING
	mov	w0, #20
	bl	_OUT_RING
	ldr	w0, [x21]
	bl	_OUT_RING
	ldr	w0, [x19]
	bl	_OUT_RING
	ldr	w0, [x20, #8]
	bl	_OUT_RING
Lloh34:
	adrp	x8, _I810_BUF_FREE@GOTPAGE
Lloh35:
	ldr	x8, [x8, _I810_BUF_FREE@GOTPAGEOFF]
Lloh36:
	ldr	w0, [x8]
	bl	_OUT_RING
Lloh37:
	adrp	x8, _CMD_REPORT_HEAD@GOTPAGE
Lloh38:
	ldr	x8, [x8, _CMD_REPORT_HEAD@GOTPAGEOFF]
Lloh39:
	ldr	w0, [x8]
	bl	_OUT_RING
	mov	w0, #0
	bl	_OUT_RING
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_ADVANCE_LP_RING
LBB0_13:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.cfi_endproc
                                        ; -- End function
	.comm	_RING_LOCALS,4,2                ; @RING_LOCALS
	.comm	_I810_NR_SAREA_CLIPRECTS,4,2    ; @I810_NR_SAREA_CLIPRECTS
	.comm	_I810_BUF_MAPPED,8,3            ; @I810_BUF_MAPPED
	.comm	_PR_MASK,4,2                    ; @PR_MASK
	.comm	_GFX_OP_PRIMITIVE,4,2           ; @GFX_OP_PRIMITIVE
	.comm	_GFX_OP_SCISSOR,4,2             ; @GFX_OP_SCISSOR
	.comm	_SC_UPDATE_SCISSOR,4,2          ; @SC_UPDATE_SCISSOR
	.comm	_SC_ENABLE,4,2                  ; @SC_ENABLE
	.comm	_GFX_OP_SCISSOR_INFO,4,2        ; @GFX_OP_SCISSOR_INFO
	.comm	_CMD_OP_BATCH_BUFFER,4,2        ; @CMD_OP_BATCH_BUFFER
	.comm	_BB1_PROTECTED,8,3              ; @BB1_PROTECTED
	.comm	_I810_BUF_CLIENT,4,2            ; @I810_BUF_CLIENT
	.comm	_I810_BUF_HARDWARE,4,2          ; @I810_BUF_HARDWARE
	.comm	_CMD_STORE_DWORD_IDX,4,2        ; @CMD_STORE_DWORD_IDX
	.comm	_I810_BUF_FREE,4,2              ; @I810_BUF_FREE
	.comm	_CMD_REPORT_HEAD,4,2            ; @CMD_REPORT_HEAD
	.no_dead_strip	_i810_dma_dispatch_vertex
.subsections_via_symbols
