	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mga_g400_emit_state
_mga_g400_emit_state:                   ## @mga_g400_emit_state
	.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	%rdi, %rbx
	movq	8(%rdi), %r14
	movl	(%r14), %r13d
	movl	4(%r14), %r15d
	movq	_MGA_T2@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	cmpl	(%rdi), %r15d
	je	LBB0_2
## %bb.1:
	movq	%rbx, %rdi
	callq	_mga_g400_emit_pipe
	movl	4(%r14), %eax
	movl	%eax, (%rbx)
LBB0_2:
	movq	_MGA_UPLOAD_CONTEXT@GOTPCREL(%rip), %r12
	testl	%r13d, (%r12)
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_mga_g400_emit_context
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_4:
	movq	_MGA_UPLOAD_TEX0@GOTPCREL(%rip), %r12
	testl	%r13d, (%r12)
	je	LBB0_6
## %bb.5:
	movq	%rbx, %rdi
	callq	_mga_g400_emit_tex0
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_6:
	movq	_MGA_UPLOAD_TEX1@GOTPCREL(%rip), %r12
	testl	%r13d, (%r12)
	je	LBB0_9
## %bb.7:
	andl	%r15d, -44(%rbp)                ## 4-byte Folded Spill
	je	LBB0_9
## %bb.8:
	movq	%rbx, %rdi
	callq	_mga_g400_emit_tex1
	movl	(%r12), %eax
	notl	%eax
	andl	%eax, (%r14)
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MGA_T2,4,2                     ## @MGA_T2
	.comm	_MGA_UPLOAD_CONTEXT,4,2         ## @MGA_UPLOAD_CONTEXT
	.comm	_MGA_UPLOAD_TEX0,4,2            ## @MGA_UPLOAD_TEX0
	.comm	_MGA_UPLOAD_TEX1,4,2            ## @MGA_UPLOAD_TEX1
	.no_dead_strip	_mga_g400_emit_state
.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_state
_mga_g400_emit_state:                   ; @mga_g400_emit_state
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x19, x0
	ldr	x20, [x0, #8]
	ldp	w21, w22, [x20]
Lloh0:
	adrp	x8, _MGA_T2@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MGA_T2@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	ldr	w8, [x0]
	cmp	w22, w8
	b.eq	LBB0_2
; %bb.1:
	mov	x0, x19
	bl	_mga_g400_emit_pipe
	ldr	w8, [x20, #4]
	str	w8, [x19]
LBB0_2:
Lloh3:
	adrp	x24, _MGA_UPLOAD_CONTEXT@GOTPAGE
Lloh4:
	ldr	x24, [x24, _MGA_UPLOAD_CONTEXT@GOTPAGEOFF]
	ldr	w8, [x24]
	tst	w8, w21
	b.eq	LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_mga_g400_emit_context
	ldr	w8, [x24]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_4:
	and	w22, w23, w22
Lloh5:
	adrp	x23, _MGA_UPLOAD_TEX0@GOTPAGE
Lloh6:
	ldr	x23, [x23, _MGA_UPLOAD_TEX0@GOTPAGEOFF]
	ldr	w8, [x23]
	tst	w8, w21
	b.eq	LBB0_6
; %bb.5:
	mov	x0, x19
	bl	_mga_g400_emit_tex0
	ldr	w8, [x23]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_6:
Lloh7:
	adrp	x23, _MGA_UPLOAD_TEX1@GOTPAGE
Lloh8:
	ldr	x23, [x23, _MGA_UPLOAD_TEX1@GOTPAGEOFF]
	ldr	w8, [x23]
	and	w8, w8, w21
	cmp	w8, #0
	ccmp	w22, #0, #4, ne
	b.eq	LBB0_8
; %bb.7:
	mov	x0, x19
	bl	_mga_g400_emit_tex1
	ldr	w8, [x23]
	ldr	w9, [x20]
	bic	w8, w9, w8
	str	w8, [x20]
LBB0_8:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_MGA_T2,4,2                     ; @MGA_T2
	.comm	_MGA_UPLOAD_CONTEXT,4,2         ; @MGA_UPLOAD_CONTEXT
	.comm	_MGA_UPLOAD_TEX0,4,2            ; @MGA_UPLOAD_TEX0
	.comm	_MGA_UPLOAD_TEX1,4,2            ; @MGA_UPLOAD_TEX1
	.no_dead_strip	_mga_g400_emit_state
.subsections_via_symbols
