	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CollapseStagesToGLSL
_CollapseStagesToGLSL:                  ## @CollapseStagesToGLSL
	.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	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_shader@GOTPCREL(%rip), %r14
	cmpq	$0, (%r14)
	jne	LBB0_15
## %bb.1:
	movq	_qfalse@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	je	LBB0_16
LBB0_2:
	movq	_MAX_SHADER_STAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
LBB0_3:
	testl	%r11d, %r11d
	jle	LBB0_33
## %bb.4:
	movl	%r11d, %eax
	shlq	$6, %rax
	xorl	%edi, %edi
	movq	_stages@GOTPCREL(%rip), %rdx
	movq	$-132, %rbx
	movq	_qfalse@GOTPCREL(%rip), %r9
	jmp	LBB0_6
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_6 Depth=1
	addq	$64, %rdi
	cmpq	%rdi, %rax
	je	LBB0_9
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rcx
	cmpq	$0, 56(%rcx,%rdi)
	je	LBB0_5
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	8(%rcx,%rdi), %rsi
	addq	%rbx, %rsi
	cmpq	$2, %rsi
	ja	LBB0_5
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=1
	movq	(%r9), %rsi
	movq	%rsi, 56(%rcx,%rdi)
	jmp	LBB0_5
LBB0_9:
	xorl	%edi, %edi
	movl	$56, %ebx
	movq	_MAX_SHADER_STAGES@GOTPCREL(%rip), %r8
	xorl	%eax, %eax
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_10:                                ##   in Loop: Header=BB0_12 Depth=1
	movslq	%eax, %rcx
	shlq	$6, %rcx
	movups	-56(%rsi,%rbx), %xmm0
	movups	-40(%rsi,%rbx), %xmm1
	movups	-24(%rsi,%rbx), %xmm2
	movups	-8(%rsi,%rbx), %xmm3
	movups	%xmm3, 48(%rsi,%rcx)
	movups	%xmm2, 32(%rsi,%rcx)
	movups	%xmm1, 16(%rsi,%rcx)
	movups	%xmm0, (%rsi,%rcx)
	movq	(%r9), %rcx
	movq	(%rdx), %rsi
	movq	%rcx, (%rsi,%rbx)
	incl	%eax
	movl	(%r8), %r11d
LBB0_11:                                ##   in Loop: Header=BB0_12 Depth=1
	incq	%rdi
	movslq	%r11d, %rcx
	addq	$64, %rbx
	cmpq	%rcx, %rdi
	jge	LBB0_69
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdx), %rsi
	cmpq	$0, (%rsi,%rbx)
	je	LBB0_11
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movl	%eax, %ecx
	cmpq	%rcx, %rdi
	jne	LBB0_10
## %bb.14:                              ##   in Loop: Header=BB0_12 Depth=1
	incl	%eax
	jmp	LBB0_11
LBB0_15:
	movq	_qtrue@GOTPCREL(%rip), %rax
	cmpq	$0, (%rax)
	jne	LBB0_2
LBB0_16:
	movq	_stages@GOTPCREL(%rip), %rdi
	movq	(%rdi), %r13
	cmpq	$0, 56(%r13)
	je	LBB0_22
## %bb.17:
	movq	32(%r13), %rax
	cmpq	$130, (%rax)
	jne	LBB0_22
## %bb.18:
	cmpq	$0, 120(%r13)
	je	LBB0_22
## %bb.19:
	movq	_GLS_DSTBLEND_BITS@GOTPCREL(%rip), %rax
	movq	_GLS_SRCBLEND_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	movl	64(%r13), %ecx
	andl	%ecx, %edx
	movq	_GLS_DSTBLEND_SRC_COLOR@GOTPCREL(%rip), %rax
	movq	_GLS_SRCBLEND_ZERO@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rax), %esi
	cmpl	%esi, %edx
	je	LBB0_21
## %bb.20:
	movq	_GLS_DSTBLEND_ZERO@GOTPCREL(%rip), %rax
	movq	_GLS_SRCBLEND_DST_COLOR@GOTPCREL(%rip), %rsi
	movl	(%rsi), %esi
	orl	(%rax), %esi
	cmpl	%esi, %edx
	jne	LBB0_22
LBB0_21:
	movl	(%r13), %eax
	movups	(%r13), %xmm0
	movups	16(%r13), %xmm1
	movups	32(%r13), %xmm2
	movups	48(%r13), %xmm3
	movaps	%xmm3, -112(%rbp)
	movaps	%xmm2, -128(%rbp)
	movaps	%xmm1, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movups	64(%r13), %xmm0
	movups	80(%r13), %xmm1
	movups	96(%r13), %xmm2
	movups	112(%r13), %xmm3
	movups	%xmm0, (%r13)
	movups	%xmm1, 16(%r13)
	movups	%xmm2, 32(%r13)
	movups	%xmm3, 48(%r13)
	movq	(%rdi), %r13
	movaps	-160(%rbp), %xmm0
	movaps	-144(%rbp), %xmm1
	movaps	-128(%rbp), %xmm2
	movaps	-112(%rbp), %xmm3
	movups	%xmm0, 64(%r13)
	movups	%xmm2, 96(%r13)
	movups	%xmm3, 112(%r13)
	movups	%xmm1, 80(%r13)
	movl	%eax, (%r13)
	movl	%ecx, 64(%r13)
LBB0_22:
	movq	_MAX_SHADER_STAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	testl	%r11d, %r11d
	jle	LBB0_33
## %bb.23:
	movq	_GLS_DSTBLEND_BITS@GOTPCREL(%rip), %rax
	movq	_GLS_SRCBLEND_BITS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r9d
	orl	(%rax), %r9d
	movq	_GLS_DSTBLEND_SRC_COLOR@GOTPCREL(%rip), %rax
	movq	_GLS_SRCBLEND_ZERO@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r10d
	orl	(%rax), %r10d
	movq	_GLS_DSTBLEND_ZERO@GOTPCREL(%rip), %rax
	movq	_GLS_SRCBLEND_DST_COLOR@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r8d
	orl	(%rax), %r8d
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rdx
	movq	%r11, %rdi
	shlq	$6, %rdi
	xorl	%esi, %esi
	xorl	%ebx, %ebx
	jmp	LBB0_26
	.p2align	4, 0x90
LBB0_24:                                ##   in Loop: Header=BB0_26 Depth=1
	andq	$-4, %rax
	cmpq	$128, %rax
	cmovneq	%rdx, %rbx
	movl	4(%r13,%rsi), %eax
	andl	$-2, %eax
	cmpl	$136, %eax
	cmoveq	%rdx, %rbx
LBB0_25:                                ##   in Loop: Header=BB0_26 Depth=1
	addq	$64, %rsi
	cmpq	%rsi, %rdi
	je	LBB0_35
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, 56(%r13,%rsi)
	je	LBB0_25
## %bb.27:                              ##   in Loop: Header=BB0_26 Depth=1
	cmpq	$0, 48(%r13,%rsi)
	jne	LBB0_34
## %bb.28:                              ##   in Loop: Header=BB0_26 Depth=1
	movq	32(%r13,%rsi), %rax
	movq	(%rax), %rax
	cmpq	$130, %rax
	jne	LBB0_24
## %bb.29:                              ##   in Loop: Header=BB0_26 Depth=1
	movl	(%r13,%rsi), %ecx
	andl	%r9d, %ecx
	cmpl	%r10d, %ecx
	je	LBB0_24
## %bb.30:                              ##   in Loop: Header=BB0_26 Depth=1
	cmpl	%r8d, %ecx
	je	LBB0_24
LBB0_34:
	movq	%rdx, %rbx
LBB0_35:
	testq	%rbx, %rbx
	movq	_stages@GOTPCREL(%rip), %rdi
	jne	LBB0_3
## %bb.36:
	movq	_qfalse@GOTPCREL(%rip), %r9
	movq	(%r9), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movl	$1, %r12d
	xorl	%r15d, %r15d
	leaq	LJTI0_0(%rip), %r14
	.p2align	4, 0x90
LBB0_37:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_44 Depth 2
	movq	%r15, %rbx
	shlq	$6, %rbx
	cmpq	$0, 56(%r13,%rbx)
	je	LBB0_60
## %bb.38:                              ##   in Loop: Header=BB0_37 Depth=1
	cmpq	$135, 8(%r13,%rbx)
	jne	LBB0_60
## %bb.39:                              ##   in Loop: Header=BB0_37 Depth=1
	movq	32(%r13,%rbx), %rax
	movq	(%rax), %r8
	cmpq	$130, %r8
	je	LBB0_60
## %bb.40:                              ##   in Loop: Header=BB0_37 Depth=1
	leaq	(%rbx,%r13), %rax
	movq	%rax, -80(%rbp)                 ## 8-byte Spill
	movq	(%r9), %r9
	leaq	1(%r15), %rax
	movslq	%r11d, %rcx
	cmpq	%rcx, %rax
	jge	LBB0_54
## %bb.41:                              ##   in Loop: Header=BB0_37 Depth=1
	movq	_GLS_SRCBLEND_BITS@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GLS_DSTBLEND_BITS@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movq	_GLS_SRCBLEND_ZERO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GLS_DSTBLEND_SRC_COLOR@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movq	_GLS_SRCBLEND_DST_COLOR@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_GLS_DSTBLEND_ZERO@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -52(%rbp)                 ## 4-byte Spill
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	%r11d, %r11d
	movq	%r12, %rcx
	shlq	$6, %rcx
	addq	%r13, %rcx
	movq	%r9, %r10
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	xorl	%edx, %edx
	xorl	%esi, %esi
	jmp	LBB0_44
LBB0_42:                                ##   in Loop: Header=BB0_44 Depth=2
	testq	%rdx, %rdx
	cmoveq	%rcx, %rdx
	.p2align	4, 0x90
LBB0_43:                                ##   in Loop: Header=BB0_44 Depth=2
	addq	$64, %rcx
	decq	%r11
	cmpq	%r11, %r12
	je	LBB0_55
LBB0_44:                                ##   Parent Loop BB0_37 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	cmpq	$0, 56(%rcx)
	je	LBB0_43
## %bb.45:                              ##   in Loop: Header=BB0_44 Depth=2
	movq	8(%rcx), %rax
	movq	$-132, %rdi
	addq	%rdi, %rax
	cmpq	$3, %rax
	ja	LBB0_43
## %bb.46:                              ##   in Loop: Header=BB0_44 Depth=2
	movslq	(%r14,%rax,4), %rax
	addq	%r14, %rax
	jmpq	*%rax
LBB0_47:                                ##   in Loop: Header=BB0_44 Depth=2
	testq	%rsi, %rsi
	cmoveq	%rcx, %rsi
	cmoveq	-88(%rbp), %r10                 ## 8-byte Folded Reload
	jmp	LBB0_43
LBB0_48:                                ##   in Loop: Header=BB0_44 Depth=2
	testq	%rsi, %rsi
	cmoveq	%rcx, %rsi
	jmp	LBB0_43
LBB0_49:                                ##   in Loop: Header=BB0_44 Depth=2
	movq	32(%rcx), %rax
	cmpq	$130, (%rax)
	jne	LBB0_43
## %bb.50:                              ##   in Loop: Header=BB0_44 Depth=2
	cmpq	$0, -72(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_53
## %bb.51:                              ##   in Loop: Header=BB0_44 Depth=2
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %eax
	andl	-60(%rbp), %eax                 ## 4-byte Folded Reload
	cmpl	-56(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_43
## %bb.52:                              ##   in Loop: Header=BB0_44 Depth=2
	cmpl	-52(%rbp), %eax                 ## 4-byte Folded Reload
	je	LBB0_43
LBB0_53:                                ##   in Loop: Header=BB0_44 Depth=2
	movq	%rcx, %rax
	movq	%rcx, -48(%rbp)                 ## 8-byte Spill
	movq	-88(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	jmp	LBB0_43
LBB0_54:                                ##   in Loop: Header=BB0_37 Depth=1
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%eax, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	%r9, %r10
LBB0_55:                                ##   in Loop: Header=BB0_37 Depth=1
	addq	$-128, %r8
	cmpq	$3, %r8
	ja	LBB0_58
## %bb.56:                              ##   in Loop: Header=BB0_37 Depth=1
	cmpq	$1, %r8
	je	LBB0_58
## %bb.57:                              ##   in Loop: Header=BB0_37 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%rcx, %r11
	jmp	LBB0_59
LBB0_58:                                ##   in Loop: Header=BB0_37 Depth=1
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	movq	%r9, %r11
LBB0_59:                                ##   in Loop: Header=BB0_37 Depth=1
	movq	16(%r13,%rbx), %rax
	movq	_CGEN_LIGHTING_DIFFUSE@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	movq	%r9, %r8
	cmoveq	%rcx, %r8
	movq	_CGEN_EXACT_VERTEX_LIT@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	cmoveq	%rcx, %r9
	movq	_CGEN_VERTEX_LIT@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	cmoveq	%rcx, %r9
	movq	-80(%rbp), %rdi                 ## 8-byte Reload
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	pushq	%r11
	pushq	%r10
	callq	_CollapseStagesToLightall
	addq	$16, %rsp
	movq	_MAX_SHADER_STAGES@GOTPCREL(%rip), %rax
	movl	(%rax), %r11d
	movq	_stages@GOTPCREL(%rip), %rdi
	movq	_qfalse@GOTPCREL(%rip), %r9
	.p2align	4, 0x90
LBB0_60:                                ##   in Loop: Header=BB0_37 Depth=1
	incq	%r15
	movslq	%r11d, %rax
	cmpq	%rax, %r15
	jge	LBB0_62
## %bb.61:                              ##   in Loop: Header=BB0_37 Depth=1
	incq	%r12
	movq	(%rdi), %r13
	jmp	LBB0_37
LBB0_33:
	xorl	%eax, %eax
LBB0_69:
	movq	_r_sunlightMode@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	$0, (%rcx)
	movq	(%r14), %rdx
	je	LBB0_79
## %bb.70:
	testq	%rdx, %rdx
	jne	LBB0_79
## %bb.71:
	testl	%r11d, %r11d
	jle	LBB0_89
## %bb.72:
	movl	$56, %edx
	xorl	%esi, %esi
	movq	_stages@GOTPCREL(%rip), %r12
	movq	_TB_DIFFUSEMAP@GOTPCREL(%rip), %r15
	movq	_tr@GOTPCREL(%rip), %r8
	movq	_TB_LIGHTMAP@GOTPCREL(%rip), %r10
	movq	_qfalse@GOTPCREL(%rip), %r13
	movq	_MAX_SHADER_STAGES@GOTPCREL(%rip), %r14
	jmp	LBB0_74
	.p2align	4, 0x90
LBB0_73:                                ##   in Loop: Header=BB0_74 Depth=1
	incq	%rsi
	movslq	%r11d, %rcx
	addq	$64, %rdx
	cmpq	%rcx, %rsi
	jge	LBB0_78
LBB0_74:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rbx
	cmpq	$0, (%rbx,%rdx)
	je	LBB0_73
## %bb.75:                              ##   in Loop: Header=BB0_74 Depth=1
	cmpq	$0, -8(%rbx,%rdx)
	jne	LBB0_73
## %bb.76:                              ##   in Loop: Header=BB0_74 Depth=1
	movq	-24(%rbx,%rdx), %r9
	movq	(%r15), %rcx
	shlq	$5, %rcx
	cmpq	$130, (%r9,%rcx)
	jne	LBB0_73
## %bb.77:                              ##   in Loop: Header=BB0_74 Depth=1
	movl	(%r8), %edi
	movl	%edi, -16(%rbx,%rdx)
	movq	_LIGHTDEF_USE_LIGHTMAP@GOTPCREL(%rip), %rdi
	movl	(%rdi), %edi
	movl	%edi, -32(%rbx,%rdx)
	movq	(%r10), %rdi
	shlq	$5, %rdi
	movups	(%r9,%rcx), %xmm0
	movups	16(%r9,%rcx), %xmm1
	movups	%xmm1, 16(%r9,%rdi)
	movups	%xmm0, (%r9,%rdi)
	movl	4(%r8), %r9d
	movq	-24(%rbx,%rdx), %rdi
	movq	(%r15), %rbx
	shlq	$5, %rbx
	movq	24(%rdi,%rbx), %rcx
	movl	%r9d, (%rcx)
	movq	(%r13), %rcx
	movq	%rcx, 16(%rdi,%rbx)
	movq	$129, (%rdi,%rbx)
	movl	(%r14), %r11d
	jmp	LBB0_73
LBB0_78:
	movq	_shader@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
LBB0_79:
	testq	%rdx, %rdx
	jne	LBB0_90
LBB0_80:
	movq	_MAX_SHADER_STAGES@GOTPCREL(%rip), %rcx
	cmpl	$0, (%rcx)
	jle	LBB0_90
## %bb.81:
	movq	_stages@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	_CGEN_LIGHTING_DIFFUSE@GOTPCREL(%rip), %rsi
	movq	(%rsi), %r11
	movq	_tr@GOTPCREL(%rip), %rsi
	movl	(%rsi), %r10d
	addq	$56, %rdx
	xorl	%ebx, %ebx
	movq	_LIGHTDEF_USE_LIGHT_VECTOR@GOTPCREL(%rip), %r8
	movq	_LIGHTDEF_USE_TCGEN_AND_TCMOD@GOTPCREL(%rip), %r9
	jmp	LBB0_84
LBB0_82:                                ##   in Loop: Header=BB0_84 Depth=1
	orl	(%r9), %edi
	movl	%edi, -32(%rdx)
	.p2align	4, 0x90
LBB0_83:                                ##   in Loop: Header=BB0_84 Depth=1
	incq	%rbx
	movslq	(%rcx), %rsi
	addq	$64, %rdx
	cmpq	%rsi, %rbx
	jge	LBB0_90
LBB0_84:                                ## =>This Inner Loop Header: Depth=1
	cmpq	$0, (%rdx)
	je	LBB0_83
## %bb.85:                              ##   in Loop: Header=BB0_84 Depth=1
	cmpq	$0, -8(%rdx)
	jne	LBB0_83
## %bb.86:                              ##   in Loop: Header=BB0_84 Depth=1
	cmpq	%r11, -40(%rdx)
	jne	LBB0_83
## %bb.87:                              ##   in Loop: Header=BB0_84 Depth=1
	movl	%r10d, -16(%rdx)
	movl	(%r8), %edi
	movl	%edi, -32(%rdx)
	movq	-24(%rdx), %rsi
	cmpq	$129, (%rsi)
	jne	LBB0_82
## %bb.88:                              ##   in Loop: Header=BB0_84 Depth=1
	cmpq	$0, 8(%rsi)
	jne	LBB0_82
	jmp	LBB0_83
LBB0_89:
	xorl	%edx, %edx
	testq	%rdx, %rdx
	je	LBB0_80
LBB0_90:
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_62:
	testl	%r11d, %r11d
	jle	LBB0_68
## %bb.63:
	movl	%r11d, %eax
	shlq	$6, %rax
	xorl	%edx, %edx
	movq	_shader@GOTPCREL(%rip), %r14
	jmp	LBB0_65
	.p2align	4, 0x90
LBB0_64:                                ##   in Loop: Header=BB0_65 Depth=1
	addq	$64, %rdx
	cmpq	%rdx, %rax
	je	LBB0_3
LBB0_65:                                ## =>This Inner Loop Header: Depth=1
	movq	(%rdi), %rcx
	cmpq	$0, 56(%rcx,%rdx)
	je	LBB0_64
## %bb.66:                              ##   in Loop: Header=BB0_65 Depth=1
	movq	32(%rcx,%rdx), %rsi
	cmpq	$130, (%rsi)
	jne	LBB0_64
## %bb.67:                              ##   in Loop: Header=BB0_65 Depth=1
	movq	(%r9), %rsi
	movq	%rsi, 56(%rcx,%rdx)
	jmp	LBB0_64
LBB0_68:
	xorl	%eax, %eax
	movq	_shader@GOTPCREL(%rip), %r14
	jmp	LBB0_69
	.cfi_endproc
	.p2align	2, 0x90
	.data_region jt32
.set L0_0_set_42, LBB0_42-LJTI0_0
.set L0_0_set_47, LBB0_47-LJTI0_0
.set L0_0_set_48, LBB0_48-LJTI0_0
.set L0_0_set_49, LBB0_49-LJTI0_0
LJTI0_0:
	.long	L0_0_set_42
	.long	L0_0_set_47
	.long	L0_0_set_48
	.long	L0_0_set_49
	.end_data_region
                                        ## -- End function
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_shader,8,3                     ## @shader
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_stages,8,3                     ## @stages
	.comm	_GLS_DSTBLEND_BITS,4,2          ## @GLS_DSTBLEND_BITS
	.comm	_GLS_SRCBLEND_BITS,4,2          ## @GLS_SRCBLEND_BITS
	.comm	_GLS_DSTBLEND_SRC_COLOR,4,2     ## @GLS_DSTBLEND_SRC_COLOR
	.comm	_GLS_SRCBLEND_ZERO,4,2          ## @GLS_SRCBLEND_ZERO
	.comm	_GLS_DSTBLEND_ZERO,4,2          ## @GLS_DSTBLEND_ZERO
	.comm	_GLS_SRCBLEND_DST_COLOR,4,2     ## @GLS_SRCBLEND_DST_COLOR
	.comm	_MAX_SHADER_STAGES,4,2          ## @MAX_SHADER_STAGES
	.comm	_CGEN_LIGHTING_DIFFUSE,8,3      ## @CGEN_LIGHTING_DIFFUSE
	.comm	_CGEN_VERTEX_LIT,8,3            ## @CGEN_VERTEX_LIT
	.comm	_CGEN_EXACT_VERTEX_LIT,8,3      ## @CGEN_EXACT_VERTEX_LIT
	.comm	_r_sunlightMode,8,3             ## @r_sunlightMode
	.comm	_TB_DIFFUSEMAP,8,3              ## @TB_DIFFUSEMAP
	.comm	_tr,8,2                         ## @tr
	.comm	_LIGHTDEF_USE_LIGHTMAP,4,2      ## @LIGHTDEF_USE_LIGHTMAP
	.comm	_TB_LIGHTMAP,8,3                ## @TB_LIGHTMAP
	.comm	_LIGHTDEF_USE_LIGHT_VECTOR,4,2  ## @LIGHTDEF_USE_LIGHT_VECTOR
	.comm	_LIGHTDEF_USE_TCGEN_AND_TCMOD,4,2 ## @LIGHTDEF_USE_TCGEN_AND_TCMOD
	.no_dead_strip	_CollapseStagesToGLSL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CollapseStagesToGLSL
_CollapseStagesToGLSL:                  ; @CollapseStagesToGLSL
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #160
	.cfi_def_cfa_offset 160
	stp	x28, x27, [sp, #64]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #80]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #96]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #112]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #128]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #144]            ; 16-byte Folded Spill
	add	x29, sp, #144
	.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
Lloh0:
	adrp	x20, _shader@GOTPAGE
Lloh1:
	ldr	x20, [x20, _shader@GOTPAGEOFF]
Lloh2:
	adrp	x21, _qfalse@GOTPAGE
Lloh3:
	ldr	x21, [x21, _qfalse@GOTPAGEOFF]
Lloh4:
	adrp	x23, _qtrue@GOTPAGE
Lloh5:
	ldr	x23, [x23, _qtrue@GOTPAGEOFF]
	ldr	x8, [x20]
	cmp	x8, #0
	csel	x8, x21, x23, eq
	ldr	x8, [x8]
Lloh6:
	adrp	x19, _MAX_SHADER_STAGES@GOTPAGE
Lloh7:
	ldr	x19, [x19, _MAX_SHADER_STAGES@GOTPAGEOFF]
	cbz	x8, LBB0_14
; %bb.1:
	ldr	w8, [x19]
LBB0_2:
	cmp	w8, #1
	b.lt	LBB0_61
; %bb.3:
	mov	x10, #0
	mov	w9, w8
	lsl	x11, x9, #6
Lloh8:
	adrp	x9, _stages@GOTPAGE
Lloh9:
	ldr	x9, [x9, _stages@GOTPAGEOFF]
	b	LBB0_5
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x10, x10, #64
	cmp	x11, x10
	b.eq	LBB0_8
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	add	x12, x12, x10
	ldr	x13, [x12, #56]
	cbz	x13, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x12, #8]
	sub	x13, x13, #132
	cmp	x13, #2
	b.hi	LBB0_4
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x13, [x21]
	str	x13, [x12, #56]
	b	LBB0_4
LBB0_8:
	mov	x10, #0
	mov	x11, #0
	mov	w0, #0
	b	LBB0_11
LBB0_9:                                 ;   in Loop: Header=BB0_11 Depth=1
	sxtw	x8, w0
	add	x8, x12, x8, lsl #6
	add	x12, x12, x10
	ldp	q0, q1, [x12]
	ldp	q2, q3, [x12, #32]
	stp	q2, q3, [x8, #32]
	stp	q0, q1, [x8]
	ldr	x8, [x21]
	ldr	x12, [x9]
	add	x12, x12, x10
	str	x8, [x12, #56]
	add	w0, w0, #1
	ldr	w8, [x19]
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x11, x11, #1
	add	x10, x10, #64
	cmp	x11, w8, sxtw
	b.ge	LBB0_62
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x9]
	add	x13, x12, x10
	ldr	x13, [x13, #56]
	cbz	x13, LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	cmp	x11, w0, uxtw
	b.ne	LBB0_9
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	add	w0, w0, #1
	b	LBB0_10
LBB0_14:
Lloh10:
	adrp	x22, _stages@GOTPAGE
Lloh11:
	ldr	x22, [x22, _stages@GOTPAGEOFF]
	ldr	x9, [x22]
	ldr	x8, [x9, #56]
	cbz	x8, LBB0_20
; %bb.15:
	ldr	x8, [x9, #32]
	ldr	x8, [x8]
	cmp	x8, #130
	b.ne	LBB0_20
; %bb.16:
	ldr	x8, [x9, #120]
	cbz	x8, LBB0_20
; %bb.17:
	ldr	w8, [x9, #64]
Lloh12:
	adrp	x10, _GLS_DSTBLEND_BITS@GOTPAGE
Lloh13:
	ldr	x10, [x10, _GLS_DSTBLEND_BITS@GOTPAGEOFF]
Lloh14:
	adrp	x11, _GLS_SRCBLEND_BITS@GOTPAGE
Lloh15:
	ldr	x11, [x11, _GLS_SRCBLEND_BITS@GOTPAGEOFF]
Lloh16:
	ldr	w10, [x10]
Lloh17:
	ldr	w11, [x11]
	orr	w10, w11, w10
	and	w10, w10, w8
Lloh18:
	adrp	x11, _GLS_DSTBLEND_SRC_COLOR@GOTPAGE
Lloh19:
	ldr	x11, [x11, _GLS_DSTBLEND_SRC_COLOR@GOTPAGEOFF]
Lloh20:
	ldr	w11, [x11]
Lloh21:
	adrp	x12, _GLS_SRCBLEND_ZERO@GOTPAGE
Lloh22:
	ldr	x12, [x12, _GLS_SRCBLEND_ZERO@GOTPAGEOFF]
Lloh23:
	ldr	w12, [x12]
	orr	w11, w12, w11
	cmp	w10, w11
	b.eq	LBB0_19
; %bb.18:
Lloh24:
	adrp	x11, _GLS_DSTBLEND_ZERO@GOTPAGE
Lloh25:
	ldr	x11, [x11, _GLS_DSTBLEND_ZERO@GOTPAGEOFF]
Lloh26:
	ldr	w11, [x11]
Lloh27:
	adrp	x12, _GLS_SRCBLEND_DST_COLOR@GOTPAGE
Lloh28:
	ldr	x12, [x12, _GLS_SRCBLEND_DST_COLOR@GOTPAGEOFF]
Lloh29:
	ldr	w12, [x12]
	orr	w11, w12, w11
	cmp	w10, w11
	b.ne	LBB0_20
LBB0_19:
	ldr	w10, [x9]
	ldp	q0, q1, [x9, #32]
	ldp	q3, q2, [x9]
	ldp	q4, q5, [x9, #64]
	stp	q4, q5, [x9]
	ldp	q4, q5, [x9, #96]
	stp	q4, q5, [x9, #32]
	ldr	x9, [x22]
	stp	q0, q1, [x9, #96]
	stp	q3, q2, [x9, #64]
	str	w10, [x9]
	str	w8, [x9, #64]
LBB0_20:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_61
; %bb.21:
	mov	x11, #0
	mov	x10, #0
Lloh30:
	adrp	x12, _GLS_DSTBLEND_BITS@GOTPAGE
Lloh31:
	ldr	x12, [x12, _GLS_DSTBLEND_BITS@GOTPAGEOFF]
Lloh32:
	ldr	w12, [x12]
Lloh33:
	adrp	x13, _GLS_SRCBLEND_BITS@GOTPAGE
Lloh34:
	ldr	x13, [x13, _GLS_SRCBLEND_BITS@GOTPAGEOFF]
Lloh35:
	ldr	w13, [x13]
	orr	w12, w13, w12
Lloh36:
	adrp	x13, _GLS_DSTBLEND_SRC_COLOR@GOTPAGE
Lloh37:
	ldr	x13, [x13, _GLS_DSTBLEND_SRC_COLOR@GOTPAGEOFF]
Lloh38:
	adrp	x14, _GLS_SRCBLEND_ZERO@GOTPAGE
Lloh39:
	ldr	x14, [x14, _GLS_SRCBLEND_ZERO@GOTPAGEOFF]
Lloh40:
	ldr	w13, [x13]
Lloh41:
	ldr	w14, [x14]
	orr	w13, w14, w13
Lloh42:
	adrp	x14, _GLS_DSTBLEND_ZERO@GOTPAGE
Lloh43:
	ldr	x14, [x14, _GLS_DSTBLEND_ZERO@GOTPAGEOFF]
Lloh44:
	ldr	w14, [x14]
Lloh45:
	adrp	x24, _GLS_SRCBLEND_DST_COLOR@GOTPAGE
Lloh46:
	ldr	x24, [x24, _GLS_SRCBLEND_DST_COLOR@GOTPAGEOFF]
	ldr	w15, [x24]
	orr	w15, w15, w14
	ldr	x14, [x23]
	lsl	x16, x8, #6
	b	LBB0_24
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	and	x0, x0, #0xfffffffffffffffc
	cmp	x0, #128
	csel	x10, x10, x14, eq
	ldr	w17, [x17, #4]
	and	w17, w17, #0xfffffffe
	cmp	w17, #136
	csel	x10, x14, x10, eq
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	add	x11, x11, #64
	cmp	x16, x11
	b.eq	LBB0_29
LBB0_24:                                ; =>This Inner Loop Header: Depth=1
	add	x17, x9, x11
	ldr	x0, [x17, #56]
	cbz	x0, LBB0_23
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x17, [x17, #48]
	cbnz	x17, LBB0_28
; %bb.26:                               ;   in Loop: Header=BB0_24 Depth=1
	add	x17, x9, x11
	ldr	x0, [x17, #32]
	ldr	x0, [x0]
	cmp	x0, #130
	b.ne	LBB0_22
; %bb.27:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	w1, [x9, x11]
	and	w1, w12, w1
	cmp	w1, w13
	ccmp	w1, w15, #4, ne
	b.eq	LBB0_22
LBB0_28:
	mov	x10, x14
LBB0_29:
	cbnz	x10, LBB0_2
; %bb.30:
	mov	x25, #0
	ldr	x27, [x21]
	mov	w26, #1
Lloh47:
	adrp	x28, lJTI0_0@PAGE
Lloh48:
	add	x28, x28, lJTI0_0@PAGEOFF
LBB0_31:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_38 Depth 2
	add	x0, x9, x25, lsl #6
	ldr	x10, [x0, #56]
	cbz	x10, LBB0_53
; %bb.32:                               ;   in Loop: Header=BB0_31 Depth=1
	ldr	x10, [x0, #8]
	cmp	x10, #135
	b.ne	LBB0_53
; %bb.33:                               ;   in Loop: Header=BB0_31 Depth=1
	add	x10, x9, x25, lsl #6
	ldr	x10, [x10, #32]
	ldr	x11, [x10]
	cmp	x11, #130
	b.eq	LBB0_53
; %bb.34:                               ;   in Loop: Header=BB0_31 Depth=1
	ldr	x10, [x21]
	add	x12, x25, #1
	cmp	x12, w8, sxtw
	b.ge	LBB0_47
; %bb.35:                               ;   in Loop: Header=BB0_31 Depth=1
	mov	x3, #0
	mov	x2, #0
	mov	x1, #0
Lloh49:
	adrp	x12, _GLS_DSTBLEND_BITS@GOTPAGE
Lloh50:
	ldr	x12, [x12, _GLS_DSTBLEND_BITS@GOTPAGEOFF]
Lloh51:
	ldr	w12, [x12]
Lloh52:
	adrp	x13, _GLS_SRCBLEND_BITS@GOTPAGE
Lloh53:
	ldr	x13, [x13, _GLS_SRCBLEND_BITS@GOTPAGEOFF]
Lloh54:
	ldr	w13, [x13]
	orr	w12, w13, w12
Lloh55:
	adrp	x13, _GLS_DSTBLEND_SRC_COLOR@GOTPAGE
Lloh56:
	ldr	x13, [x13, _GLS_DSTBLEND_SRC_COLOR@GOTPAGEOFF]
Lloh57:
	ldr	w13, [x13]
Lloh58:
	adrp	x14, _GLS_SRCBLEND_ZERO@GOTPAGE
Lloh59:
	ldr	x14, [x14, _GLS_SRCBLEND_ZERO@GOTPAGEOFF]
Lloh60:
	ldr	w14, [x14]
	orr	w13, w14, w13
Lloh61:
	adrp	x14, _GLS_DSTBLEND_ZERO@GOTPAGE
Lloh62:
	ldr	x14, [x14, _GLS_DSTBLEND_ZERO@GOTPAGEOFF]
Lloh63:
	ldr	w14, [x14]
	ldr	w15, [x24]
	orr	w14, w15, w14
	ldr	x15, [x23]
	mov	w8, w8
	add	x16, x9, x26, lsl #6
	mov	x6, x10
	b	LBB0_38
LBB0_36:                                ;   in Loop: Header=BB0_38 Depth=2
	cmp	x2, #0
	csel	x2, x16, x2, eq
LBB0_37:                                ;   in Loop: Header=BB0_38 Depth=2
	add	x16, x16, #64
	sub	x8, x8, #1
	cmp	x26, x8
	b.eq	LBB0_48
LBB0_38:                                ;   Parent Loop BB0_31 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	x17, [x16, #56]
	cbz	x17, LBB0_37
; %bb.39:                               ;   in Loop: Header=BB0_38 Depth=2
	ldr	x17, [x16, #8]
	sub	x17, x17, #132
	cmp	x17, #3
	b.hi	LBB0_37
; %bb.40:                               ;   in Loop: Header=BB0_38 Depth=2
	adr	x4, LBB0_36
	ldrb	w5, [x28, x17]
	add	x4, x4, x5, lsl #2
	br	x4
LBB0_41:                                ;   in Loop: Header=BB0_38 Depth=2
	cmp	x1, #0
	csel	x1, x16, x1, eq
	csel	x6, x15, x6, eq
	b	LBB0_37
LBB0_42:                                ;   in Loop: Header=BB0_38 Depth=2
	cmp	x1, #0
	csel	x1, x16, x1, eq
	b	LBB0_37
LBB0_43:                                ;   in Loop: Header=BB0_38 Depth=2
	ldr	x17, [x16, #32]
	ldr	x17, [x17]
	cmp	x17, #130
	b.ne	LBB0_37
; %bb.44:                               ;   in Loop: Header=BB0_38 Depth=2
	cbz	x27, LBB0_46
; %bb.45:                               ;   in Loop: Header=BB0_38 Depth=2
	ldr	w17, [x0]
	and	w17, w12, w17
	cmp	w17, w13
	ccmp	w17, w14, #4, ne
	b.eq	LBB0_37
LBB0_46:                                ;   in Loop: Header=BB0_38 Depth=2
	mov	x3, x16
	mov	x27, x15
	b	LBB0_37
LBB0_47:                                ;   in Loop: Header=BB0_31 Depth=1
	mov	x1, #0
	mov	x2, #0
	mov	x3, #0
	mov	x6, x10
LBB0_48:                                ;   in Loop: Header=BB0_31 Depth=1
	sub	x8, x11, #128
	cmp	x8, #3
	b.hi	LBB0_51
; %bb.49:                               ;   in Loop: Header=BB0_31 Depth=1
	cmp	x8, #1
	b.eq	LBB0_51
; %bb.50:                               ;   in Loop: Header=BB0_31 Depth=1
	ldr	x8, [x23]
	mov	x7, x8
	b	LBB0_52
LBB0_51:                                ;   in Loop: Header=BB0_31 Depth=1
	ldr	x8, [x23]
	mov	x7, x10
LBB0_52:                                ;   in Loop: Header=BB0_31 Depth=1
	add	x9, x9, x25, lsl #6
	ldr	x9, [x9, #16]
Lloh64:
	adrp	x11, _CGEN_LIGHTING_DIFFUSE@GOTPAGE
Lloh65:
	ldr	x11, [x11, _CGEN_LIGHTING_DIFFUSE@GOTPAGEOFF]
Lloh66:
	ldr	x11, [x11]
	cmp	x9, x11
	csel	x4, x8, x10, eq
Lloh67:
	adrp	x11, _CGEN_VERTEX_LIT@GOTPAGE
Lloh68:
	ldr	x11, [x11, _CGEN_VERTEX_LIT@GOTPAGEOFF]
Lloh69:
	ldr	x11, [x11]
Lloh70:
	adrp	x12, _CGEN_EXACT_VERTEX_LIT@GOTPAGE
Lloh71:
	ldr	x12, [x12, _CGEN_EXACT_VERTEX_LIT@GOTPAGEOFF]
Lloh72:
	ldr	x12, [x12]
	cmp	x9, x12
	ccmp	x9, x11, #4, ne
	csel	x5, x8, x10, eq
	bl	_CollapseStagesToLightall
	ldr	w8, [x19]
LBB0_53:                                ;   in Loop: Header=BB0_31 Depth=1
	add	x25, x25, #1
	cmp	x25, w8, sxtw
	b.ge	LBB0_55
; %bb.54:                               ;   in Loop: Header=BB0_31 Depth=1
	add	x26, x26, #1
	ldr	x9, [x22]
	b	LBB0_31
LBB0_55:
	cmp	w8, #1
	b.lt	LBB0_61
; %bb.56:
	mov	x9, #0
	mov	w10, w8
	lsl	x10, x10, #6
	b	LBB0_58
LBB0_57:                                ;   in Loop: Header=BB0_58 Depth=1
	add	x9, x9, #64
	cmp	x10, x9
	b.eq	LBB0_2
LBB0_58:                                ; =>This Inner Loop Header: Depth=1
	ldr	x11, [x22]
	add	x11, x11, x9
	ldr	x12, [x11, #56]
	cbz	x12, LBB0_57
; %bb.59:                               ;   in Loop: Header=BB0_58 Depth=1
	ldr	x12, [x11, #32]
	ldr	x12, [x12]
	cmp	x12, #130
	b.ne	LBB0_57
; %bb.60:                               ;   in Loop: Header=BB0_58 Depth=1
	ldr	x12, [x21]
	str	x12, [x11, #56]
	b	LBB0_57
LBB0_61:
	mov	w0, #0
LBB0_62:
Lloh73:
	adrp	x9, _r_sunlightMode@GOTPAGE
Lloh74:
	ldr	x9, [x9, _r_sunlightMode@GOTPAGEOFF]
Lloh75:
	ldr	x9, [x9]
	ldr	x10, [x9]
	ldr	x9, [x20]
	cmp	x10, #0
	ccmp	x9, #0, #0, ne
	b.ne	LBB0_72
; %bb.63:
	cmp	w8, #1
	b.lt	LBB0_71
; %bb.64:
	mov	x9, #0
	mov	x10, #0
Lloh76:
	adrp	x11, _stages@GOTPAGE
Lloh77:
	ldr	x11, [x11, _stages@GOTPAGEOFF]
Lloh78:
	adrp	x12, _TB_DIFFUSEMAP@GOTPAGE
Lloh79:
	ldr	x12, [x12, _TB_DIFFUSEMAP@GOTPAGEOFF]
Lloh80:
	adrp	x13, _tr@GOTPAGE
Lloh81:
	ldr	x13, [x13, _tr@GOTPAGEOFF]
Lloh82:
	adrp	x14, _LIGHTDEF_USE_LIGHTMAP@GOTPAGE
Lloh83:
	ldr	x14, [x14, _LIGHTDEF_USE_LIGHTMAP@GOTPAGEOFF]
	mov	w15, #129
Lloh84:
	adrp	x16, _TB_LIGHTMAP@GOTPAGE
Lloh85:
	ldr	x16, [x16, _TB_LIGHTMAP@GOTPAGEOFF]
	b	LBB0_66
LBB0_65:                                ;   in Loop: Header=BB0_66 Depth=1
	add	x10, x10, #1
	add	x9, x9, #64
	cmp	x10, w8, sxtw
	b.ge	LBB0_70
LBB0_66:                                ; =>This Inner Loop Header: Depth=1
	ldr	x17, [x11]
	add	x1, x17, x9
	ldr	x2, [x1, #56]
	cbz	x2, LBB0_65
; %bb.67:                               ;   in Loop: Header=BB0_66 Depth=1
	ldr	x1, [x1, #48]
	cbnz	x1, LBB0_65
; %bb.68:                               ;   in Loop: Header=BB0_66 Depth=1
	add	x17, x17, x9
	ldr	x1, [x17, #32]
	ldr	x2, [x12]
	lsl	x3, x2, #5
	ldr	x3, [x1, x3]
	cmp	x3, #130
	b.ne	LBB0_65
; %bb.69:                               ;   in Loop: Header=BB0_66 Depth=1
	ldr	w8, [x13]
	str	w8, [x17, #40]
	ldr	w8, [x14]
	str	w8, [x17, #24]
	ldr	x8, [x16]
	add	x8, x1, x8, lsl #5
	add	x1, x1, x2, lsl #5
	ldp	q0, q1, [x1]
	stp	q0, q1, [x8]
	ldr	w8, [x13, #4]
	ldr	x17, [x17, #32]
	ldr	x1, [x12]
	add	x17, x17, x1, lsl #5
	ldr	x1, [x17, #24]
	str	w8, [x1]
	ldr	x8, [x21]
	str	x8, [x17, #16]
	str	x15, [x17]
	ldr	w8, [x19]
	b	LBB0_65
LBB0_70:
	ldr	x9, [x20]
	b	LBB0_72
LBB0_71:
	mov	x9, #0
LBB0_72:
	ldr	w8, [x19]
	cmp	x9, #0
	ccmp	w8, #1, #8, eq
	b.ge	LBB0_74
LBB0_73:
                                        ; kill: def $w0 killed $w0 killed $x0
	ldp	x29, x30, [sp, #144]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #128]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #112]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #96]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #80]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #160
	ret
LBB0_74:
	mov	x8, #0
Lloh86:
	adrp	x9, _stages@GOTPAGE
Lloh87:
	ldr	x9, [x9, _stages@GOTPAGEOFF]
Lloh88:
	ldr	x11, [x9]
Lloh89:
	adrp	x9, _CGEN_LIGHTING_DIFFUSE@GOTPAGE
Lloh90:
	ldr	x9, [x9, _CGEN_LIGHTING_DIFFUSE@GOTPAGEOFF]
Lloh91:
	ldr	x9, [x9]
Lloh92:
	adrp	x10, _tr@GOTPAGE
Lloh93:
	ldr	x10, [x10, _tr@GOTPAGEOFF]
Lloh94:
	ldr	w10, [x10]
	add	x11, x11, #32
Lloh95:
	adrp	x12, _LIGHTDEF_USE_LIGHT_VECTOR@GOTPAGE
Lloh96:
	ldr	x12, [x12, _LIGHTDEF_USE_LIGHT_VECTOR@GOTPAGEOFF]
Lloh97:
	adrp	x13, _LIGHTDEF_USE_TCGEN_AND_TCMOD@GOTPAGE
Lloh98:
	ldr	x13, [x13, _LIGHTDEF_USE_TCGEN_AND_TCMOD@GOTPAGEOFF]
	b	LBB0_77
LBB0_75:                                ;   in Loop: Header=BB0_77 Depth=1
	ldr	w15, [x13]
	orr	w14, w15, w14
	stur	w14, [x11, #-8]
LBB0_76:                                ;   in Loop: Header=BB0_77 Depth=1
	add	x8, x8, #1
	ldrsw	x14, [x19]
	add	x11, x11, #64
	cmp	x8, x14
	b.ge	LBB0_73
LBB0_77:                                ; =>This Inner Loop Header: Depth=1
	ldr	x14, [x11, #24]
	cbz	x14, LBB0_76
; %bb.78:                               ;   in Loop: Header=BB0_77 Depth=1
	ldr	x14, [x11, #16]
	cbnz	x14, LBB0_76
; %bb.79:                               ;   in Loop: Header=BB0_77 Depth=1
	ldur	x14, [x11, #-16]
	cmp	x14, x9
	b.ne	LBB0_76
; %bb.80:                               ;   in Loop: Header=BB0_77 Depth=1
	str	w10, [x11, #8]
	ldr	w14, [x12]
	stur	w14, [x11, #-8]
	ldr	x15, [x11]
	ldr	x16, [x15]
	cmp	x16, #129
	b.ne	LBB0_75
; %bb.81:                               ;   in Loop: Header=BB0_77 Depth=1
	ldr	x15, [x15, #8]
	cbnz	x15, LBB0_75
	b	LBB0_76
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh16
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGot	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh38, Lloh39, Lloh41
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh40
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpAdd	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh61, Lloh62, Lloh63
	.loh AdrpLdrGotLdr	Lloh58, Lloh59, Lloh60
	.loh AdrpLdrGotLdr	Lloh55, Lloh56, Lloh57
	.loh AdrpLdrGotLdr	Lloh52, Lloh53, Lloh54
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpLdrGotLdr	Lloh70, Lloh71, Lloh72
	.loh AdrpLdrGotLdr	Lloh67, Lloh68, Lloh69
	.loh AdrpLdrGotLdr	Lloh64, Lloh65, Lloh66
	.loh AdrpLdrGotLdr	Lloh73, Lloh74, Lloh75
	.loh AdrpLdrGot	Lloh84, Lloh85
	.loh AdrpLdrGot	Lloh82, Lloh83
	.loh AdrpLdrGot	Lloh80, Lloh81
	.loh AdrpLdrGot	Lloh78, Lloh79
	.loh AdrpLdrGot	Lloh76, Lloh77
	.loh AdrpLdrGot	Lloh97, Lloh98
	.loh AdrpLdrGot	Lloh95, Lloh96
	.loh AdrpLdrGotLdr	Lloh92, Lloh93, Lloh94
	.loh AdrpLdrGotLdr	Lloh89, Lloh90, Lloh91
	.loh AdrpLdrGotLdr	Lloh86, Lloh87, Lloh88
	.cfi_endproc
	.section	__TEXT,__const
lJTI0_0:
	.byte	(LBB0_36-LBB0_36)>>2
	.byte	(LBB0_41-LBB0_36)>>2
	.byte	(LBB0_42-LBB0_36)>>2
	.byte	(LBB0_43-LBB0_36)>>2
                                        ; -- End function
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_shader,8,3                     ; @shader
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_stages,8,3                     ; @stages
	.comm	_GLS_DSTBLEND_BITS,4,2          ; @GLS_DSTBLEND_BITS
	.comm	_GLS_SRCBLEND_BITS,4,2          ; @GLS_SRCBLEND_BITS
	.comm	_GLS_DSTBLEND_SRC_COLOR,4,2     ; @GLS_DSTBLEND_SRC_COLOR
	.comm	_GLS_SRCBLEND_ZERO,4,2          ; @GLS_SRCBLEND_ZERO
	.comm	_GLS_DSTBLEND_ZERO,4,2          ; @GLS_DSTBLEND_ZERO
	.comm	_GLS_SRCBLEND_DST_COLOR,4,2     ; @GLS_SRCBLEND_DST_COLOR
	.comm	_MAX_SHADER_STAGES,4,2          ; @MAX_SHADER_STAGES
	.comm	_CGEN_LIGHTING_DIFFUSE,8,3      ; @CGEN_LIGHTING_DIFFUSE
	.comm	_CGEN_VERTEX_LIT,8,3            ; @CGEN_VERTEX_LIT
	.comm	_CGEN_EXACT_VERTEX_LIT,8,3      ; @CGEN_EXACT_VERTEX_LIT
	.comm	_r_sunlightMode,8,3             ; @r_sunlightMode
	.comm	_TB_DIFFUSEMAP,8,3              ; @TB_DIFFUSEMAP
	.comm	_tr,8,2                         ; @tr
	.comm	_LIGHTDEF_USE_LIGHTMAP,4,2      ; @LIGHTDEF_USE_LIGHTMAP
	.comm	_TB_LIGHTMAP,8,3                ; @TB_LIGHTMAP
	.comm	_LIGHTDEF_USE_LIGHT_VECTOR,4,2  ; @LIGHTDEF_USE_LIGHT_VECTOR
	.comm	_LIGHTDEF_USE_TCGEN_AND_TCMOD,4,2 ; @LIGHTDEF_USE_TCGEN_AND_TCMOD
	.no_dead_strip	_CollapseStagesToGLSL
.subsections_via_symbols
