	.file	"extr_cg_servercmds.c_CG_ShaderStateChanged.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	CG_ShaderStateChanged
	.type	CG_ShaderStateChanged, @function
CG_ShaderStateChanged:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r15
	push	r14
	push	r13
	push	r12
	push	rbx
	sub	rsp, 56
	.cfi_offset 15, -24
	.cfi_offset 14, -32
	.cfi_offset 13, -40
	.cfi_offset 12, -48
	.cfi_offset 3, -56
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -56[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_QPATH[rip]
	mov	rsi, rsp
	add	rax, 15
	mov	rcx, rax
	mov	rdx, rax
	and	rcx, -4096
	and	rdx, -16
	sub	rsi, rcx
	mov	rcx, rsi
	cmp	rsp, rcx
	je	.L3
.L30:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rcx
	jne	.L30
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L31
.L4:
	mov	rdx, rax
	mov	rdi, rsp
	and	rax, -4096
	mov	r13, rsp
	sub	rdi, rax
	and	rdx, -16
	mov	rax, rdi
	cmp	rsp, rax
	je	.L6
.L32:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L32
.L6:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L33
.L7:
	mov	edi, DWORD PTR CS_SHADERSTATE[rip]
	mov	r14, rsp
	call	CG_ConfigString@PLT
	mov	r12, rax
	test	rax, rax
	je	.L1
	cmp	BYTE PTR [r12], 0
	lea	r15, -80[rbp]
	je	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	esi, 61
	mov	rdi, r12
	call	strchr@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L1
	cmp	BYTE PTR [rax], 0
	je	.L1
	mov	rcx, rax
	mov	rsi, r12
	mov	rdi, r13
	sub	rcx, r12
	lea	r12, 1[rbx]
	mov	edx, ecx
	mov	QWORD PTR -88[rbp], rcx
	call	strncpy@PLT
	mov	rcx, QWORD PTR -88[rbp]
	mov	esi, 58
	mov	rdi, r12
	mov	BYTE PTR 0[r13+rcx], 0
	call	strchr@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L1
	cmp	BYTE PTR [rax], 0
	je	.L1
	mov	rcx, rax
	mov	rsi, r12
	mov	rdi, r14
	sub	rcx, r12
	lea	r12, 1[rbx]
	mov	edx, ecx
	mov	QWORD PTR -88[rbp], rcx
	call	strncpy@PLT
	mov	rcx, QWORD PTR -88[rbp]
	mov	esi, 64
	mov	rdi, r12
	mov	BYTE PTR [r14+rcx], 0
	call	strchr@PLT
	mov	rbx, rax
	test	rax, rax
	je	.L1
	mov	rcx, rax
	mov	rsi, r12
	mov	rdi, r15
	sub	rcx, r12
	lea	r12, 1[rbx]
	mov	edx, ecx
	mov	QWORD PTR -88[rbp], rcx
	call	strncpy@PLT
	mov	rcx, QWORD PTR -88[rbp]
	mov	rdx, r15
	mov	rsi, r14
	mov	rdi, r13
	mov	BYTE PTR -80[rbp+rcx], 0
	call	trap_R_RemapShader@PLT
	cmp	BYTE PTR [r12], 0
	jne	.L10
	.p2align 4,,10
	.p2align 3
.L1:
	mov	rax, QWORD PTR -56[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L34
	lea	rsp, -40[rbp]
	pop	rbx
	pop	r12
	pop	r13
	pop	r14
	pop	r15
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L31:
	.cfi_restore_state
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L33:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L7
.L34:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	CG_ShaderStateChanged, .-CG_ShaderStateChanged
	.comm	MAX_QPATH,4,4
	.comm	CS_SHADERSTATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_cg_servercmds.c_CG_ShaderStateChanged.c"
	.text
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	CG_ShaderStateChanged
	.syntax unified
	.arm
	.fpu softvfp
	.type	CG_ShaderStateChanged, %function
CG_ShaderStateChanged:
	@ args = 0, pretend = 0, frame = 24
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, fp, lr}
	add	fp, sp, #28
	sub	sp, sp, #24
	ldr	r3, .L25
	ldr	r2, .L25+4
	ldr	r3, [r3]
	ldr	r0, [r2]
	add	r3, r3, #7
	bic	r3, r3, #7
	sub	sp, sp, r3
	mov	r5, sp
	sub	sp, sp, r3
	ldr	r3, .L25+8
	ldr	r3, [r3]
	str	r3, [fp, #-32]
	mov	r3,#0
	bl	CG_ConfigString
	subs	r4, r0, #0
	beq	.L1
	ldrb	r3, [r4]	@ zero_extendqisi2
	mov	r7, sp
	cmp	r3, #0
	mov	r6, #0
	beq	.L1
.L4:
	mov	r1, #61
	mov	r0, r4
	bl	strchr
	cmp	r0, #0
	beq	.L1
	ldrb	r3, [r0]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L1
	sub	r8, r0, r4
	mov	r1, r4
	mov	r2, r8
	add	r4, r0, #1
	mov	r0, r5
	bl	strncpy
	mov	r0, r4
	mov	r1, #58
	strb	r6, [r5, r8]
	bl	strchr
	cmp	r0, #0
	beq	.L1
	ldrb	r3, [r0]	@ zero_extendqisi2
	cmp	r3, #0
	beq	.L1
	sub	r8, r0, r4
	mov	r1, r4
	mov	r2, r8
	add	r4, r0, #1
	mov	r0, r7
	bl	strncpy
	mov	r0, r4
	mov	r1, #64
	strb	r6, [r7, r8]
	bl	strchr
	subs	r8, r0, #0
	beq	.L1
	sub	r9, r8, r4
	mov	r1, r4
	mov	r2, r9
	sub	r0, fp, #48
	bl	strncpy
	sub	r3, fp, #28
	add	r9, r3, r9
	mov	r1, r7
	mov	r0, r5
	sub	r2, fp, #48
	add	r4, r8, #1
	strb	r6, [r9, #-20]
	bl	trap_R_RemapShader
	ldrb	r3, [r4]	@ zero_extendqisi2
	cmp	r3, #0
	bne	.L4
.L1:
	ldr	r3, .L25+8
	ldr	r2, [r3]
	ldr	r3, [fp, #-32]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L24
	sub	sp, fp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, fp, pc}
.L24:
	bl	__stack_chk_fail
.L26:
	.align	2
.L25:
	.word	MAX_QPATH
	.word	CS_SHADERSTATE
	.word	.LC0
	.size	CG_ShaderStateChanged, .-CG_ShaderStateChanged
	.comm	MAX_QPATH,4,4
	.comm	CS_SHADERSTATE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
