	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ShaderForShaderNum
_ShaderForShaderNum:                    ## @ShaderForShaderNum
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	callq	_LittleLong
	movl	%eax, %ebx
	movq	_s_worldData@GOTPCREL(%rip), %r15
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	cmpl	(%r15), %ebx
	jl	LBB0_3
LBB0_2:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	_ERR_DROP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	movl	%ebx, %edx
	callq	*(%rax)
LBB0_3:
	movq	_r_vertexLight@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	jne	LBB0_5
## %bb.4:
	movq	_glConfig@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_GLHW_PERMEDIA2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_6
LBB0_5:
	movq	_LIGHTMAP_BY_VERTEX@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
LBB0_6:
	movq	8(%r15), %rax
	movslq	%ebx, %rcx
	movq	_r_fullbright@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	cmpq	$0, (%rdx)
	je	LBB0_8
## %bb.7:
	movq	_LIGHTMAP_WHITEIMAGE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r14d
LBB0_8:
	movl	(%rax,%rcx,4), %edi
	movq	_qtrue@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	%r14d, %esi
	callq	_R_FindShader
	cmpq	$0, (%rax)
	je	LBB0_10
## %bb.9:
	movq	_tr@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_s_worldData,16,3               ## @s_worldData
	.comm	_ri,8,3                         ## @ri
	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ShaderForShaderNum: bad num %i"

	.comm	_r_vertexLight,8,3              ## @r_vertexLight
	.comm	_glConfig,8,3                   ## @glConfig
	.comm	_GLHW_PERMEDIA2,8,3             ## @GLHW_PERMEDIA2
	.comm	_LIGHTMAP_BY_VERTEX,4,2         ## @LIGHTMAP_BY_VERTEX
	.comm	_r_fullbright,8,3               ## @r_fullbright
	.comm	_LIGHTMAP_WHITEIMAGE,4,2        ## @LIGHTMAP_WHITEIMAGE
	.comm	_qtrue,4,2                      ## @qtrue
	.comm	_tr,8,3                         ## @tr
	.no_dead_strip	_ShaderForShaderNum
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ShaderForShaderNum
_ShaderForShaderNum:                    ; @ShaderForShaderNum
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	bl	_LittleLong
	mov	x20, x0
Lloh0:
	adrp	x21, _s_worldData@GOTPAGE
Lloh1:
	ldr	x21, [x21, _s_worldData@GOTPAGEOFF]
	tbnz	w0, #31, LBB0_2
; %bb.1:
	ldr	w8, [x21]
	cmp	w20, w8
	b.lt	LBB0_3
LBB0_2:
Lloh2:
	adrp	x8, _ri@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh4:
	ldr	x8, [x8]
Lloh5:
	adrp	x9, _ERR_DROP@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ERR_DROP@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x9]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x20
	blr	x8
LBB0_3:
	ldr	x8, [x21, #8]
Lloh10:
	adrp	x9, _r_vertexLight@GOTPAGE
Lloh11:
	ldr	x9, [x9, _r_vertexLight@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	ldr	x9, [x9]
	cbnz	x9, LBB0_5
; %bb.4:
Lloh13:
	adrp	x9, _glConfig@GOTPAGE
Lloh14:
	ldr	x9, [x9, _glConfig@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
Lloh16:
	adrp	x10, _GLHW_PERMEDIA2@GOTPAGE
Lloh17:
	ldr	x10, [x10, _GLHW_PERMEDIA2@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_6
LBB0_5:
Lloh19:
	adrp	x9, _LIGHTMAP_BY_VERTEX@GOTPAGE
Lloh20:
	ldr	x9, [x9, _LIGHTMAP_BY_VERTEX@GOTPAGEOFF]
Lloh21:
	ldr	w19, [x9]
LBB0_6:
Lloh22:
	adrp	x9, _r_fullbright@GOTPAGE
Lloh23:
	ldr	x9, [x9, _r_fullbright@GOTPAGEOFF]
Lloh24:
	ldr	x9, [x9]
	ldr	x9, [x9]
Lloh25:
	adrp	x10, _LIGHTMAP_WHITEIMAGE@GOTPAGE
Lloh26:
	ldr	x10, [x10, _LIGHTMAP_WHITEIMAGE@GOTPAGEOFF]
Lloh27:
	ldr	w10, [x10]
	cmp	x9, #0
	csel	w1, w19, w10, eq
	ldr	w0, [x8, w20, sxtw #2]
Lloh28:
	adrp	x8, _qtrue@GOTPAGE
Lloh29:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	bl	_R_FindShader
	ldr	x8, [x0]
Lloh31:
	adrp	x9, _tr@GOTPAGE
Lloh32:
	ldr	x9, [x9, _tr@GOTPAGEOFF]
Lloh33:
	ldr	x9, [x9]
	cmp	x8, #0
	csel	x0, x0, x9, eq
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_s_worldData,16,3               ; @s_worldData
	.comm	_ri,8,3                         ; @ri
	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ShaderForShaderNum: bad num %i"

	.comm	_r_vertexLight,8,3              ; @r_vertexLight
	.comm	_glConfig,8,3                   ; @glConfig
	.comm	_GLHW_PERMEDIA2,8,3             ; @GLHW_PERMEDIA2
	.comm	_LIGHTMAP_BY_VERTEX,4,2         ; @LIGHTMAP_BY_VERTEX
	.comm	_r_fullbright,8,3               ; @r_fullbright
	.comm	_LIGHTMAP_WHITEIMAGE,4,2        ; @LIGHTMAP_WHITEIMAGE
	.comm	_qtrue,4,2                      ; @qtrue
	.comm	_tr,8,3                         ; @tr
	.no_dead_strip	_ShaderForShaderNum
.subsections_via_symbols
