	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_g400_emit_tex0
_mga_g400_emit_tex0:                    ## @mga_g400_emit_tex0
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	(%rax), %rbx
	movl	$6, %edi
	callq	_BEGIN_DMA
	movq	_MGA_TEXCTL2@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_G400_TC2_MAGIC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	orl	(%rbx), %esi
	movq	_MGA_TEXCTL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MGA_TEXFILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	4(%rbx), %ecx
	movl	8(%rbx), %r9d
	movq	_MGA_TEXBORDERCOL@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movl	12(%rbx), %eax
	pushq	%rax
	pushq	%r10
	callq	_DMA_BLOCK
	addq	$16, %rsp
	movq	_MGA_TEXORG@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_TEXORG1@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	16(%rbx), %esi
	movl	20(%rbx), %ecx
	movq	_MGA_TEXORG2@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	24(%rbx), %r9d
	movq	_MGA_TEXORG3@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movl	28(%rbx), %eax
	pushq	%rax
	pushq	%r10
	callq	_DMA_BLOCK
	addq	$16, %rsp
	movq	_MGA_TEXORG4@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_TEXWIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	32(%rbx), %esi
	movl	36(%rbx), %ecx
	movq	_MGA_TEXHEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	40(%rbx), %r9d
	movq	_MGA_WR49@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	pushq	$0
	pushq	%rax
	callq	_DMA_BLOCK
	addq	$16, %rsp
	movq	_MGA_WR57@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_MGA_WR53@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MGA_WR61@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MGA_WR52@GOTPCREL(%rip), %rax
	movl	(%rax), %r10d
	movq	_MGA_G400_WR_MAGIC@GOTPCREL(%rip), %r14
	movl	(%r14), %eax
	xorl	%esi, %esi
	xorl	%ecx, %ecx
	xorl	%r9d, %r9d
	pushq	%rax
	pushq	%r10
	callq	_DMA_BLOCK
	addq	$16, %rsp
	movq	_MGA_WR60@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	movq	_MGA_WR54@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	36(%rbx), %ecx
	orl	%esi, %ecx
	movq	_MGA_WR62@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	40(%rbx), %r9d
	orl	%esi, %r9d
	movq	_MGA_DMAPAD@GOTPCREL(%rip), %rbx
	movl	(%rbx), %eax
	pushq	$0
	pushq	%rax
	callq	_DMA_BLOCK
	addq	$16, %rsp
	movl	(%rbx), %edi
	movq	_MGA_TEXTRANS@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	_MGA_TEXTRANSHIGH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%esi, %esi
	movl	%edi, %edx
	xorl	%ecx, %ecx
	movl	$65535, %r9d                    ## imm = 0xFFFF
	pushq	$65535                          ## imm = 0xFFFF
	pushq	%rax
	callq	_DMA_BLOCK
	addq	$16, %rsp
	xorl	%eax, %eax
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_ADVANCE_DMA                    ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_DMA_LOCALS,4,2                 ## @DMA_LOCALS
	.comm	_MGA_TEXCTL2,4,2                ## @MGA_TEXCTL2
	.comm	_MGA_G400_TC2_MAGIC,4,2         ## @MGA_G400_TC2_MAGIC
	.comm	_MGA_TEXCTL,4,2                 ## @MGA_TEXCTL
	.comm	_MGA_TEXFILTER,4,2              ## @MGA_TEXFILTER
	.comm	_MGA_TEXBORDERCOL,4,2           ## @MGA_TEXBORDERCOL
	.comm	_MGA_TEXORG,4,2                 ## @MGA_TEXORG
	.comm	_MGA_TEXORG1,4,2                ## @MGA_TEXORG1
	.comm	_MGA_TEXORG2,4,2                ## @MGA_TEXORG2
	.comm	_MGA_TEXORG3,4,2                ## @MGA_TEXORG3
	.comm	_MGA_TEXORG4,4,2                ## @MGA_TEXORG4
	.comm	_MGA_TEXWIDTH,4,2               ## @MGA_TEXWIDTH
	.comm	_MGA_TEXHEIGHT,4,2              ## @MGA_TEXHEIGHT
	.comm	_MGA_WR49,4,2                   ## @MGA_WR49
	.comm	_MGA_WR57,4,2                   ## @MGA_WR57
	.comm	_MGA_WR53,4,2                   ## @MGA_WR53
	.comm	_MGA_WR61,4,2                   ## @MGA_WR61
	.comm	_MGA_WR52,4,2                   ## @MGA_WR52
	.comm	_MGA_G400_WR_MAGIC,4,2          ## @MGA_G400_WR_MAGIC
	.comm	_MGA_WR60,4,2                   ## @MGA_WR60
	.comm	_MGA_WR54,4,2                   ## @MGA_WR54
	.comm	_MGA_WR62,4,2                   ## @MGA_WR62
	.comm	_MGA_DMAPAD,4,2                 ## @MGA_DMAPAD
	.comm	_MGA_TEXTRANS,4,2               ## @MGA_TEXTRANS
	.comm	_MGA_TEXTRANSHIGH,4,2           ## @MGA_TEXTRANSHIGH
	.no_dead_strip	_mga_g400_emit_tex0
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mga_g400_emit_tex0
_mga_g400_emit_tex0:                    ; @mga_g400_emit_tex0
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	ldr	x8, [x0]
	ldr	x19, [x8]
	mov	w0, #6
	bl	_BEGIN_DMA
Lloh0:
	adrp	x8, _MGA_TEXCTL2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MGA_TEXCTL2@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
Lloh3:
	adrp	x8, _MGA_G400_TC2_MAGIC@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MGA_G400_TC2_MAGIC@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldp	w9, w3, [x19]
	orr	w1, w8, w9
Lloh6:
	adrp	x8, _MGA_TEXCTL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MGA_TEXCTL@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
Lloh9:
	adrp	x8, _MGA_TEXFILTER@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MGA_TEXFILTER@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
Lloh12:
	adrp	x8, _MGA_TEXBORDERCOL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MGA_TEXBORDERCOL@GOTPAGEOFF]
Lloh14:
	ldr	w6, [x8]
	ldp	w5, w7, [x19, #8]
	bl	_DMA_BLOCK
Lloh15:
	adrp	x8, _MGA_TEXORG@GOTPAGE
Lloh16:
	ldr	x8, [x8, _MGA_TEXORG@GOTPAGEOFF]
Lloh17:
	adrp	x9, _MGA_TEXORG1@GOTPAGE
Lloh18:
	ldr	x9, [x9, _MGA_TEXORG1@GOTPAGEOFF]
Lloh19:
	ldr	w0, [x8]
Lloh20:
	ldr	w2, [x9]
	ldp	w1, w3, [x19, #16]
Lloh21:
	adrp	x8, _MGA_TEXORG2@GOTPAGE
Lloh22:
	ldr	x8, [x8, _MGA_TEXORG2@GOTPAGEOFF]
Lloh23:
	ldr	w4, [x8]
Lloh24:
	adrp	x8, _MGA_TEXORG3@GOTPAGE
Lloh25:
	ldr	x8, [x8, _MGA_TEXORG3@GOTPAGEOFF]
Lloh26:
	ldr	w6, [x8]
	ldp	w5, w7, [x19, #24]
	bl	_DMA_BLOCK
Lloh27:
	adrp	x8, _MGA_TEXORG4@GOTPAGE
Lloh28:
	ldr	x8, [x8, _MGA_TEXORG4@GOTPAGEOFF]
Lloh29:
	ldr	w0, [x8]
Lloh30:
	adrp	x8, _MGA_TEXWIDTH@GOTPAGE
Lloh31:
	ldr	x8, [x8, _MGA_TEXWIDTH@GOTPAGEOFF]
Lloh32:
	ldr	w2, [x8]
Lloh33:
	adrp	x8, _MGA_TEXHEIGHT@GOTPAGE
Lloh34:
	ldr	x8, [x8, _MGA_TEXHEIGHT@GOTPAGEOFF]
	ldp	w1, w3, [x19, #32]
Lloh35:
	ldr	w4, [x8]
	ldr	w5, [x19, #40]
Lloh36:
	adrp	x8, _MGA_WR49@GOTPAGE
Lloh37:
	ldr	x8, [x8, _MGA_WR49@GOTPAGEOFF]
Lloh38:
	ldr	w6, [x8]
	mov	w7, #0
	bl	_DMA_BLOCK
Lloh39:
	adrp	x8, _MGA_WR57@GOTPAGE
Lloh40:
	ldr	x8, [x8, _MGA_WR57@GOTPAGEOFF]
Lloh41:
	ldr	w0, [x8]
Lloh42:
	adrp	x8, _MGA_WR53@GOTPAGE
Lloh43:
	ldr	x8, [x8, _MGA_WR53@GOTPAGEOFF]
Lloh44:
	ldr	w2, [x8]
Lloh45:
	adrp	x8, _MGA_WR61@GOTPAGE
Lloh46:
	ldr	x8, [x8, _MGA_WR61@GOTPAGEOFF]
Lloh47:
	ldr	w4, [x8]
Lloh48:
	adrp	x8, _MGA_WR52@GOTPAGE
Lloh49:
	ldr	x8, [x8, _MGA_WR52@GOTPAGEOFF]
Lloh50:
	ldr	w6, [x8]
Lloh51:
	adrp	x20, _MGA_G400_WR_MAGIC@GOTPAGE
Lloh52:
	ldr	x20, [x20, _MGA_G400_WR_MAGIC@GOTPAGEOFF]
	ldr	w7, [x20]
	mov	w1, #0
	mov	w3, #0
	mov	w5, #0
	bl	_DMA_BLOCK
Lloh53:
	adrp	x8, _MGA_WR60@GOTPAGE
Lloh54:
	ldr	x8, [x8, _MGA_WR60@GOTPAGEOFF]
Lloh55:
	ldr	w0, [x8]
Lloh56:
	adrp	x8, _MGA_WR54@GOTPAGE
Lloh57:
	ldr	x8, [x8, _MGA_WR54@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh58:
	ldr	w2, [x8]
Lloh59:
	adrp	x8, _MGA_WR62@GOTPAGE
Lloh60:
	ldr	x8, [x8, _MGA_WR62@GOTPAGEOFF]
	ldp	w9, w10, [x19, #36]
	orr	w3, w9, w1
Lloh61:
	ldr	w4, [x8]
	orr	w5, w10, w1
Lloh62:
	adrp	x19, _MGA_DMAPAD@GOTPAGE
Lloh63:
	ldr	x19, [x19, _MGA_DMAPAD@GOTPAGEOFF]
	ldr	w6, [x19]
	mov	w7, #0
	bl	_DMA_BLOCK
	ldr	w0, [x19]
Lloh64:
	adrp	x8, _MGA_TEXTRANS@GOTPAGE
Lloh65:
	ldr	x8, [x8, _MGA_TEXTRANS@GOTPAGEOFF]
Lloh66:
	ldr	w4, [x8]
Lloh67:
	adrp	x8, _MGA_TEXTRANSHIGH@GOTPAGE
Lloh68:
	ldr	x8, [x8, _MGA_TEXTRANSHIGH@GOTPAGEOFF]
Lloh69:
	ldr	w6, [x8]
	mov	w1, #0
	mov	x2, x0
	mov	w3, #0
	mov	w5, #65535
	mov	w7, #65535
	bl	_DMA_BLOCK
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_ADVANCE_DMA
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGot	Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh59, Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh56, Lloh57, Lloh58
	.loh AdrpLdrGotLdr	Lloh53, Lloh54, Lloh55
	.loh AdrpLdrGot	Lloh51, Lloh52
	.loh AdrpLdrGotLdr	Lloh48, Lloh49, Lloh50
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh19
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_DMA_LOCALS,4,2                 ; @DMA_LOCALS
	.comm	_MGA_TEXCTL2,4,2                ; @MGA_TEXCTL2
	.comm	_MGA_G400_TC2_MAGIC,4,2         ; @MGA_G400_TC2_MAGIC
	.comm	_MGA_TEXCTL,4,2                 ; @MGA_TEXCTL
	.comm	_MGA_TEXFILTER,4,2              ; @MGA_TEXFILTER
	.comm	_MGA_TEXBORDERCOL,4,2           ; @MGA_TEXBORDERCOL
	.comm	_MGA_TEXORG,4,2                 ; @MGA_TEXORG
	.comm	_MGA_TEXORG1,4,2                ; @MGA_TEXORG1
	.comm	_MGA_TEXORG2,4,2                ; @MGA_TEXORG2
	.comm	_MGA_TEXORG3,4,2                ; @MGA_TEXORG3
	.comm	_MGA_TEXORG4,4,2                ; @MGA_TEXORG4
	.comm	_MGA_TEXWIDTH,4,2               ; @MGA_TEXWIDTH
	.comm	_MGA_TEXHEIGHT,4,2              ; @MGA_TEXHEIGHT
	.comm	_MGA_WR49,4,2                   ; @MGA_WR49
	.comm	_MGA_WR57,4,2                   ; @MGA_WR57
	.comm	_MGA_WR53,4,2                   ; @MGA_WR53
	.comm	_MGA_WR61,4,2                   ; @MGA_WR61
	.comm	_MGA_WR52,4,2                   ; @MGA_WR52
	.comm	_MGA_G400_WR_MAGIC,4,2          ; @MGA_G400_WR_MAGIC
	.comm	_MGA_WR60,4,2                   ; @MGA_WR60
	.comm	_MGA_WR54,4,2                   ; @MGA_WR54
	.comm	_MGA_WR62,4,2                   ; @MGA_WR62
	.comm	_MGA_DMAPAD,4,2                 ; @MGA_DMAPAD
	.comm	_MGA_TEXTRANS,4,2               ; @MGA_TEXTRANS
	.comm	_MGA_TEXTRANSHIGH,4,2           ; @MGA_TEXTRANSHIGH
	.no_dead_strip	_mga_g400_emit_tex0
.subsections_via_symbols
