	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_dma_dispatch_vertex
_mga_dma_dispatch_vertex:               ## @mga_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
	movq	%rsi, %rbx
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	movq	(%rdi), %r13
	movq	24(%rsi), %rax
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	movq	8(%r13), %r14
	movl	20(%rsi), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movq	(%rsi), %rdx
	movl	16(%rsi), %esi
	leaq	L_.str(%rip), %rdi
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	callq	_DRM_DEBUG
	movq	%rbx, -80(%rbp)                 ## 8-byte Spill
	cmpq	$0, (%rbx)
	je	LBB0_5
## %bb.1:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	$1, (%rax)
	movl	16(%r14), %esi
	movq	%r13, %rdi
	callq	_MGA_EMIT_STATE
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	addl	-44(%rbp), %eax                 ## 4-byte Folded Reload
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	movl	(%r14), %eax
	xorl	%r12d, %r12d
	xorl	%r15d, %r15d
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	movl	$1, %edi
	callq	_BEGIN_DMA
	movq	_MGA_DMAPAD@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_SECADDRESS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MGA_DMA_VERTEX@GOTPCREL(%rip), %rax
	movl	(%rax), %r9d
	orl	-44(%rbp), %r9d                 ## 4-byte Folded Reload
	movq	_MGA_SECEND@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	(%r13), %ebx
	orl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	xorl	%esi, %esi
	movl	%edi, %edx
	xorl	%ecx, %ecx
	pushq	%rbx
	pushq	%rax
	callq	_DMA_BLOCK
	addq	$16, %rsp
	xorl	%eax, %eax
	callq	_ADVANCE_DMA
	incq	%r15
	movslq	(%r14), %rax
	addq	$4, %r12
	cmpq	%rax, %r15
	jge	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	cltq
	cmpq	%rax, %r15
	jge	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	8(%r14), %rsi
	addq	%r12, %rsi
	movq	%r13, %rdi
	callq	_mga_emit_clip_rect
	jmp	LBB0_4
LBB0_5:
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	cmpq	$0, 8(%rbx)
	je	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	callq	_AGE_BUFFER
	xorps	%xmm0, %xmm0
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	movups	%xmm0, (%rsi)
	movl	$0, (%rbx)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	callq	_mga_freelist_put
LBB0_7:
	xorl	%eax, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_FLUSH_DMA                      ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_LOCALS,4,2                 ## @DMA_LOCALS
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buf=%d used=%d\n"

	.comm	_MGA_DMAPAD,4,2                 ## @MGA_DMAPAD
	.comm	_MGA_SECADDRESS,4,2             ## @MGA_SECADDRESS
	.comm	_MGA_DMA_VERTEX,4,2             ## @MGA_DMA_VERTEX
	.comm	_MGA_SECEND,4,2                 ## @MGA_SECEND
	.no_dead_strip	_mga_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 mga_dma_dispatch_vertex
_mga_dma_dispatch_vertex:               ; @mga_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	x19, x1
	str	x0, [sp, #8]                    ; 8-byte Folded Spill
	ldr	x22, [x0]
	ldr	x8, [x1, #24]
	str	x8, [sp, #24]                   ; 8-byte Folded Spill
	ldr	x24, [x22, #8]
	ldr	x23, [x1]
	ldp	w1, w25, [x1, #16]
Lloh0:
	adrp	x0, l_.str@PAGE
Lloh1:
	add	x0, x0, l_.str@PAGEOFF
	mov	x2, x23
	bl	_DRM_DEBUG
	str	x19, [sp, #16]                  ; 8-byte Folded Spill
	ldr	x8, [x19]
	cbz	x8, LBB0_5
; %bb.1:
	mov	w8, #1
	ldr	x9, [sp, #24]                   ; 8-byte Folded Reload
	str	w8, [x9]
	ldr	w1, [x24, #16]
	mov	x0, x22
	bl	_MGA_EMIT_STATE
	mov	x26, #0
	mov	x27, #0
	add	w23, w25, w23
	ldr	w8, [x24]
Lloh2:
	adrp	x28, _MGA_DMAPAD@GOTPAGE
Lloh3:
	ldr	x28, [x28, _MGA_DMAPAD@GOTPAGEOFF]
Lloh4:
	adrp	x20, _MGA_SECADDRESS@GOTPAGE
Lloh5:
	ldr	x20, [x20, _MGA_SECADDRESS@GOTPAGEOFF]
Lloh6:
	adrp	x21, _MGA_DMA_VERTEX@GOTPAGE
Lloh7:
	ldr	x21, [x21, _MGA_DMA_VERTEX@GOTPAGEOFF]
Lloh8:
	adrp	x19, _MGA_SECEND@GOTPAGE
Lloh9:
	ldr	x19, [x19, _MGA_SECEND@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	mov	w0, #1
	bl	_BEGIN_DMA
	ldr	w0, [x28]
	ldr	w4, [x20]
	ldr	w8, [x21]
	orr	w5, w8, w25
	ldr	w6, [x19]
	ldr	w8, [x22]
	orr	w7, w8, w23
	mov	w1, #0
	mov	x2, x0
	mov	w3, #0
	bl	_DMA_BLOCK
	bl	_ADVANCE_DMA
	add	x27, x27, #1
	ldrsw	x8, [x24]
	add	x26, x26, #4
	cmp	x27, x8
	b.ge	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	x27, w8, sxtw
	b.ge	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24, #8]
	add	x1, x8, x26
	mov	x0, x22
	bl	_mga_emit_clip_rect
	b	LBB0_2
LBB0_5:
	ldr	x19, [sp, #24]                  ; 8-byte Folded Reload
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_7
; %bb.6:
	mov	x0, x19
	bl	_AGE_BUFFER
	ldp	x0, x1, [sp, #8]                ; 16-byte Folded Reload
	stp	xzr, xzr, [x1]
	str	wzr, [x19]
	bl	_mga_freelist_put
LBB0_7:
	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	_FLUSH_DMA
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_LOCALS,4,2                 ; @DMA_LOCALS
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buf=%d used=%d\n"

	.comm	_MGA_DMAPAD,4,2                 ; @MGA_DMAPAD
	.comm	_MGA_SECADDRESS,4,2             ; @MGA_SECADDRESS
	.comm	_MGA_DMA_VERTEX,4,2             ; @MGA_DMA_VERTEX
	.comm	_MGA_SECEND,4,2                 ; @MGA_SECEND
	.no_dead_strip	_mga_dma_dispatch_vertex
.subsections_via_symbols
