	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetTevOrder                 ## -- Begin function GX_SetTevOrder
	.p2align	4, 0x90
_GX_SetTevOrder:                        ## @GX_SetTevOrder
	.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	$24, %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, %ebx
	movl	%esi, -52(%rbp)                 ## 4-byte Spill
	movl	%edi, %r13d
	movl	$1, %esi
	movl	$3, %edx
	callq	__SHIFTR
	movl	%eax, %r14d
	addl	$3, %r14d
	movq	___gx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movl	%r13d, %ecx
	andl	$15, %ecx
	movl	%ebx, (%rax,%rcx,4)
	movl	%ebx, -48(%rbp)                 ## 4-byte Spill
	andl	$-257, %ebx                     ## imm = 0xFEFF
	movq	_GX_MAX_TEXMAP@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	cmpl	(%rax), %ebx
	cmovgel	%r12d, %ebx
	movq	_GX_MAXCOORD@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	movl	$1, %edi
	movl	%r13d, %esi
	movl	$1, %edx
	callq	__SHIFTL
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	cmpl	%edx, %r15d
	jle	LBB0_1
## %bb.2:
	movq	___gx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orl	%eax, 8(%rcx)
	movl	%edx, %r12d
	jmp	LBB0_3
LBB0_1:
	notl	%eax
	movq	___gx@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	andl	%eax, 8(%rcx)
LBB0_3:
	movq	16(%rcx), %rax
	movslq	%r14d, %r15
	movl	(%rax,%r15,4), %r14d
	testb	$1, %r13b
	jne	LBB0_4
## %bb.8:
	andl	$-8, %r14d
	andl	$7, %ebx
	orl	%r14d, %ebx
	movl	%ebx, (%rax,%r15,4)
	andl	$-57, %ebx
	movl	%r12d, %edi
	movl	$3, %esi
	movl	$3, %edx
	callq	__SHIFTL
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	___gx@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	16(%rax), %rax
	movl	%r14d, (%rax,%r15,4)
	movq	_GX_COLORNULL@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_9
## %bb.10:
	movq	_GX_ALPHA_BUMP@GOTPCREL(%rip), %rax
	jmp	LBB0_11
LBB0_4:
	andl	$-28673, %r14d                  ## imm = 0x8FFF
	movl	%ebx, %edi
	movl	$12, %esi
	movl	$3, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movq	___gx@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	16(%rax), %rax
	movl	%ebx, (%rax,%r15,4)
	andl	$-229377, %ebx                  ## imm = 0xFFFC7FFF
	movl	%r12d, %edi
	movl	$15, %esi
	movl	$3, %edx
	callq	__SHIFTL
	movl	%eax, %r14d
	orl	%ebx, %r14d
	movq	(%r13), %rax
	movq	16(%rax), %rax
	movl	%r14d, (%rax,%r15,4)
	movq	_GX_COLORNULL@GOTPCREL(%rip), %rax
	movl	-44(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	jne	LBB0_5
## %bb.6:
	movq	_GX_ALPHA_BUMP@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_9:
	movl	%ecx, %eax
	movq	__gxtevcolid@GOTPCREL(%rip), %rcx
	cltq
	shlq	$2, %rax
	addq	(%rcx), %rax
LBB0_11:
	movl	(%rax), %edi
	andl	$-897, %r14d                    ## imm = 0xFC7F
	movl	$7, %esi
	movl	$3, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movq	(%r13), %rax
	movq	16(%rax), %rax
	movl	%ebx, (%rax,%r15,4)
	movq	_GX_TEXMAP_NULL@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	setne	%al
	testl	$256, %ecx                      ## imm = 0x100
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	andl	$-65, %ebx
	movl	$6, %esi
	jmp	LBB0_12
LBB0_5:
	movl	%ecx, %eax
	movq	__gxtevcolid@GOTPCREL(%rip), %rcx
	cltq
	shlq	$2, %rax
	addq	(%rcx), %rax
LBB0_7:
	movl	(%rax), %edi
	andl	$-3670017, %r14d                ## imm = 0xFFC7FFFF
	movl	$19, %esi
	movl	$3, %edx
	callq	__SHIFTL
	movl	%eax, %ebx
	orl	%r14d, %ebx
	movq	(%r13), %rax
	movq	16(%rax), %rax
	movl	%ebx, (%rax,%r15,4)
	movq	_GX_TEXMAP_NULL@GOTPCREL(%rip), %rax
	movl	-48(%rbp), %ecx                 ## 4-byte Reload
	cmpl	%ecx, (%rax)
	setne	%al
	testl	$256, %ecx                      ## imm = 0x100
	sete	%cl
	andb	%al, %cl
	movzbl	%cl, %edi
	andl	$-262145, %ebx                  ## imm = 0xFFFBFFFF
	movl	$18, %esi
LBB0_12:
	movl	$1, %edx
	callq	__SHIFTL
	orl	%ebx, %eax
	movq	(%r13), %rcx
	movq	16(%rcx), %rcx
	movl	%eax, (%rcx,%r15,4)
	movl	%eax, %edi
	callq	_GX_LOAD_BP_REG
	movq	(%r13), %rax
	orl	$1, 24(%rax)
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	___gx,8,3                       ## @__gx
	.comm	_GX_MAX_TEXMAP,4,2              ## @GX_MAX_TEXMAP
	.comm	_GX_MAXCOORD,4,2                ## @GX_MAXCOORD
	.comm	_GX_ALPHA_BUMP,4,2              ## @GX_ALPHA_BUMP
	.comm	_GX_COLORNULL,4,2               ## @GX_COLORNULL
	.comm	__gxtevcolid,8,3                ## @_gxtevcolid
	.comm	_GX_TEXMAP_NULL,4,2             ## @GX_TEXMAP_NULL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_GX_SetTevOrder                 ; -- Begin function GX_SetTevOrder
	.p2align	2
_GX_SetTevOrder:                        ; @GX_SetTevOrder
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x3
	mov	x19, x2
	mov	x21, x1
	mov	x22, x0
	mov	w1, #1
	mov	w2, #3
	bl	__SHIFTR
	add	w26, w0, #3
Lloh0:
	adrp	x24, ___gx@GOTPAGE
Lloh1:
	ldr	x24, [x24, ___gx@GOTPAGEOFF]
	ldr	x8, [x24]
	ldr	x8, [x8]
	and	w9, w22, #0xf
	str	w19, [x8, w9, uxtw #2]
	and	w8, w19, #0xfffffeff
Lloh2:
	adrp	x9, _GX_MAX_TEXMAP@GOTPAGE
Lloh3:
	ldr	x9, [x9, _GX_MAX_TEXMAP@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w9
	csel	w23, w8, wzr, lt
Lloh5:
	adrp	x8, _GX_MAXCOORD@GOTPAGE
Lloh6:
	ldr	x8, [x8, _GX_MAXCOORD@GOTPAGEOFF]
Lloh7:
	ldr	w25, [x8]
	mov	w0, #1
	mov	x1, x22
	mov	w2, #1
	bl	__SHIFTL
	cmp	w25, w21
	b.le	LBB0_2
; %bb.1:
	ldr	x8, [x24]
	ldr	w9, [x8, #8]
	orr	w9, w9, w0
	b	LBB0_3
LBB0_2:
	mov	w21, #0
	ldr	x8, [x24]
	ldr	w9, [x8, #8]
	bic	w9, w9, w0
LBB0_3:
	str	w9, [x8, #8]
	ldr	x8, [x8, #16]
	sxtw	x25, w26
	ldr	w9, [x8, w26, sxtw #2]
	tbnz	w22, #0, LBB0_5
; %bb.4:
	bfxil	w9, w23, #0, #3
	lsl	x22, x25, #2
	str	w9, [x8, x22]
	and	w23, w9, #0xffffffc7
	mov	x0, x21
	mov	w1, #3
	mov	w2, #3
	bl	__SHIFTL
	orr	w8, w23, w0
	ldr	x9, [x24]
	ldr	x9, [x9, #16]
	str	w8, [x9, x22]
Lloh8:
	adrp	x9, _GX_COLORNULL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _GX_COLORNULL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
Lloh11:
	adrp	x10, __gxtevcolid@GOTPAGE
Lloh12:
	ldr	x10, [x10, __gxtevcolid@GOTPAGEOFF]
Lloh13:
	ldr	x10, [x10]
	add	x10, x10, w20, sxtw #2
Lloh14:
	adrp	x11, _GX_ALPHA_BUMP@GOTPAGE
Lloh15:
	ldr	x11, [x11, _GX_ALPHA_BUMP@GOTPAGEOFF]
	cmp	w9, w20
	csel	x9, x11, x10, eq
	ldr	w0, [x9]
	and	w20, w8, #0xfffffc7f
	mov	w1, #7
	mov	w2, #3
	bl	__SHIFTL
	orr	w8, w0, w20
	ldr	x9, [x24]
	ldr	x9, [x9, #16]
	str	w8, [x9, x22]
Lloh16:
	adrp	x9, _GX_TEXMAP_NULL@GOTPAGE
Lloh17:
	ldr	x9, [x9, _GX_TEXMAP_NULL@GOTPAGEOFF]
Lloh18:
	ldr	w9, [x9]
	tst	w19, #0x100
	ccmp	w9, w19, #4, eq
	cset	w0, ne
	and	w19, w8, #0xffffffbf
	mov	w1, #6
	b	LBB0_6
LBB0_5:
	and	w22, w9, #0xffff8fff
	mov	x0, x23
	mov	w1, #12
	mov	w2, #3
	bl	__SHIFTL
	orr	w8, w22, w0
	ldr	x9, [x24]
	ldr	x9, [x9, #16]
	lsl	x22, x25, #2
	str	w8, [x9, x22]
	and	w23, w8, #0xfffc7fff
	mov	x0, x21
	mov	w1, #15
	mov	w2, #3
	bl	__SHIFTL
	orr	w8, w0, w23
	ldr	x9, [x24]
	ldr	x9, [x9, #16]
	str	w8, [x9, x22]
Lloh19:
	adrp	x9, _GX_COLORNULL@GOTPAGE
Lloh20:
	ldr	x9, [x9, _GX_COLORNULL@GOTPAGEOFF]
Lloh21:
	ldr	w9, [x9]
Lloh22:
	adrp	x10, __gxtevcolid@GOTPAGE
Lloh23:
	ldr	x10, [x10, __gxtevcolid@GOTPAGEOFF]
Lloh24:
	ldr	x10, [x10]
	add	x10, x10, w20, sxtw #2
Lloh25:
	adrp	x11, _GX_ALPHA_BUMP@GOTPAGE
Lloh26:
	ldr	x11, [x11, _GX_ALPHA_BUMP@GOTPAGEOFF]
	cmp	w9, w20
	csel	x9, x11, x10, eq
	ldr	w0, [x9]
	and	w20, w8, #0xffc7ffff
	mov	w1, #19
	mov	w2, #3
	bl	__SHIFTL
	orr	w8, w0, w20
	ldr	x9, [x24]
	ldr	x9, [x9, #16]
	str	w8, [x9, x22]
Lloh27:
	adrp	x9, _GX_TEXMAP_NULL@GOTPAGE
Lloh28:
	ldr	x9, [x9, _GX_TEXMAP_NULL@GOTPAGEOFF]
Lloh29:
	ldr	w9, [x9]
	tst	w19, #0x100
	ccmp	w9, w19, #4, eq
	cset	w0, ne
	and	w19, w8, #0xfffbffff
	mov	w1, #18
LBB0_6:
	mov	w2, #1
	bl	__SHIFTL
	orr	w0, w0, w19
	ldr	x8, [x24]
	ldr	x8, [x8, #16]
	str	w0, [x8, x25, lsl #2]
	bl	_GX_LOAD_BP_REG
	ldr	x8, [x24]
	ldr	w9, [x8, #24]
	orr	w9, w9, #0x1
	str	w9, [x8, #24]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	___gx,8,3                       ; @__gx
	.comm	_GX_MAX_TEXMAP,4,2              ; @GX_MAX_TEXMAP
	.comm	_GX_MAXCOORD,4,2                ; @GX_MAXCOORD
	.comm	_GX_ALPHA_BUMP,4,2              ; @GX_ALPHA_BUMP
	.comm	_GX_COLORNULL,4,2               ; @GX_COLORNULL
	.comm	__gxtevcolid,8,3                ; @_gxtevcolid
	.comm	_GX_TEXMAP_NULL,4,2             ; @GX_TEXMAP_NULL
.subsections_via_symbols
