	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_ShaderStateChanged          ## -- Begin function CG_ShaderStateChanged
	.p2align	4, 0x90
_CG_ShaderStateChanged:                 ## @CG_ShaderStateChanged
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_QPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, -72(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	_CS_SHADERSTATE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_CG_ConfigString
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %r13
	cmpb	$0, (%rax)
	je	LBB0_8
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r13, %rdi
	movl	$61, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_8
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	cmpb	$0, (%rax)
	je	LBB0_8
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%r15, %rbx
	subq	%r13, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movq	%r14, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_strncpy
	movb	$0, (%r14,%rbx)
	incq	%r15
	movq	%r15, %rdi
	movl	$58, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %rbx
	cmpb	$0, (%rax)
	je	LBB0_8
## %bb.6:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rbx, %r13
	subq	%r15, %r13
	movq	%r12, %rdi
	movq	%r15, %rsi
	movl	%r13d, %edx
	callq	_strncpy
	movb	$0, (%r12,%r13)
	incq	%rbx
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_strchr
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, %r15
	movq	%rax, %r13
	subq	%rbx, %r13
	leaq	-64(%rbp), %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	movl	%r13d, %edx
	callq	_strncpy
	movb	$0, -64(%rbp,%r13)
	movq	%r15, %r13
	incq	%r13
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	movq	%r12, %rsi
	movq	%r14, %rdx
	callq	_trap_R_RemapShader
	cmpb	$0, 1(%r15)
	jne	LBB0_2
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.comm	_CS_SHADERSTATE,4,2             ## @CS_SHADERSTATE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CG_ShaderStateChanged          ; -- Begin function CG_ShaderStateChanged
	.p2align	2
_CG_ShaderStateChanged:                 ; @CG_ShaderStateChanged
	.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
	sub	sp, sp, #32
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
Lloh3:
	adrp	x8, _MAX_QPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_QPATH@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mov	x9, x8
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x9, sp
	add	x10, x8, #15
	and	x12, x10, #0x1fffffff0
	sub	x19, x9, x12
	mov	sp, x19
	mov	x9, x8
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x20, x8, x12
	mov	sp, x20
Lloh10:
	adrp	x8, _CS_SHADERSTATE@GOTPAGE
Lloh11:
	ldr	x8, [x8, _CS_SHADERSTATE@GOTPAGEOFF]
Lloh12:
	ldr	w0, [x8]
	bl	_CG_ConfigString
	cbz	x0, LBB0_9
; %bb.1:
	mov	x21, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_9
; %bb.2:
	sub	x24, x29, #72
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	mov	w1, #61
	bl	_strchr
	cbz	x0, LBB0_9
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_9
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x23, x22, x21
	mov	x0, x19
	mov	x1, x21
	mov	x2, x23
	bl	_strncpy
	strb	wzr, [x19, x23]
	add	x21, x22, #1
	mov	x0, x21
	mov	w1, #58
	bl	_strchr
	cbz	x0, LBB0_9
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x22, x0
	ldrb	w8, [x0]
	cbz	w8, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_3 Depth=1
	sub	x23, x22, x21
	mov	x0, x20
	mov	x1, x21
	mov	x2, x23
	bl	_strncpy
	strb	wzr, [x20, x23]
	add	x22, x22, #1
	mov	x0, x22
	mov	w1, #64
	bl	_strchr
	cbz	x0, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=1
	mov	x21, x0
	sub	x23, x0, x22
	sub	x0, x29, #72
	mov	x1, x22
	mov	x2, x23
	bl	_strncpy
	strb	wzr, [x24, x23]
	sub	x2, x29, #72
	mov	x0, x19
	mov	x1, x20
	bl	_trap_R_RemapShader
	ldrb	w8, [x21, #1]!
	cbnz	w8, LBB0_3
LBB0_9:
	ldur	x8, [x29, #-56]
Lloh13:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh14:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_11
; %bb.10:
	sub	sp, x29, #48
	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
LBB0_11:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.comm	_CS_SHADERSTATE,4,2             ; @CS_SHADERSTATE
.subsections_via_symbols
