	.file	"extr_common.c_Com_AppendCDKey.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"%s/q3key"
.LC1:
	.string	"                "
	.text
	.p2align 4
	.globl	Com_AppendCDKey
	.type	Com_AppendCDKey, @function
Com_AppendCDKey:
.LFB0:
	.cfi_startproc
	endbr64
	push	rbp
	.cfi_def_cfa_offset 16
	.cfi_offset 6, -16
	mov	rbp, rsp
	.cfi_def_cfa_register 6
	push	r12
	push	rbx
	sub	rsp, 64
	.cfi_offset 12, -24
	.cfi_offset 3, -32
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR -24[rbp], rax
	xor	eax, eax
	movsx	rax, DWORD PTR MAX_OSPATH[rip]
	mov	rcx, rsp
	mov	rbx, rsp
	mov	rsi, rax
	add	rax, 15
	mov	rdx, rax
	and	rax, -4096
	sub	rcx, rax
	and	rdx, -16
	mov	rax, rcx
	cmp	rsp, rax
	je	.L3
.L15:
	sub	rsp, 4096
	or	QWORD PTR 4088[rsp], 0
	cmp	rsp, rax
	jne	.L15
.L3:
	and	edx, 4095
	sub	rsp, rdx
	test	rdx, rdx
	jne	.L16
.L4:
	mov	rcx, rdi
	lea	rdx, .LC0[rip]
	mov	rdi, rsp
	call	Com_sprintf@PLT
	lea	rsi, -68[rbp]
	mov	rdi, rsp
	call	FS_SV_FOpenFileRead@PLT
	mov	eax, DWORD PTR -68[rbp]
	test	eax, eax
	je	.L17
	lea	r12, -64[rbp]
	xor	esi, esi
	mov	edx, 33
	mov	rdi, r12
	call	Com_Memset@PLT
	mov	edx, DWORD PTR -68[rbp]
	mov	esi, 16
	mov	rdi, r12
	call	FS_Read@PLT
	mov	edi, DWORD PTR -68[rbp]
	call	FS_FCloseFile@PLT
	xor	esi, esi
	mov	rdi, r12
	call	CL_CDKeyValidate@PLT
	test	rax, rax
	mov	rax, QWORD PTR cl_cdkey[rip]
	lea	rdi, 64[rax]
	je	.L7
	mov	rsi, r12
	call	strcat@PLT
.L8:
	mov	rsp, rbx
.L1:
	mov	rax, QWORD PTR -24[rbp]
	xor	rax, QWORD PTR fs:40
	jne	.L18
	lea	rsp, -16[rbp]
	pop	rbx
	pop	r12
	pop	rbp
	.cfi_remember_state
	.cfi_def_cfa 7, 8
	ret
	.p2align 4,,10
	.p2align 3
.L17:
	.cfi_restore_state
	mov	rax, QWORD PTR cl_cdkey[rip]
	mov	edx, 17
	lea	rsi, .LC1[rip]
	lea	rdi, 64[rax]
	call	Q_strncpyz@PLT
	mov	rsp, rbx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L7:
	mov	edx, 17
	lea	rsi, .LC1[rip]
	call	Q_strncpyz@PLT
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L16:
	or	QWORD PTR -8[rsp+rdx], 0
	jmp	.L4
.L18:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	Com_AppendCDKey, .-Com_AppendCDKey
	.comm	cl_cdkey,8,8
	.comm	MAX_OSPATH,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_common.c_Com_AppendCDKey.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"%s/q3key\000"
	.align	2
.LC1:
	.ascii	"                \000"
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC2:
	.word	__stack_chk_guard
	.text
	.align	2
	.global	Com_AppendCDKey
	.syntax unified
	.arm
	.fpu softvfp
	.type	Com_AppendCDKey, %function
Com_AppendCDKey:
	@ args = 0, pretend = 0, frame = 48
	@ frame_needed = 1, uses_anonymous_args = 0
	push	{r4, fp, lr}
	add	fp, sp, #8
	sub	sp, sp, #52
	ldr	r2, .L11
	ldr	ip, .L11+4
	ldr	r1, [r2]
	mov	r4, sp
	add	r2, r1, #7
	bic	r2, r2, #7
	sub	sp, sp, r2
	mov	r3, r0
	ldr	r2, .L11+8
	mov	r0, sp
	ldr	ip, [ip]
	str	ip, [fp, #-16]
	mov	ip,#0
	bl	Com_sprintf
	mov	r0, sp
	sub	r1, fp, #56
	bl	FS_SV_FOpenFileRead
	ldr	r3, [fp, #-56]
	cmp	r3, #0
	ldreq	r3, .L11+12
	beq	.L4
	mov	r2, #33
	mov	r1, #0
	sub	r0, fp, #52
	bl	Com_Memset
	mov	r1, #16
	ldr	r2, [fp, #-56]
	sub	r0, fp, #52
	bl	FS_Read
	ldr	r0, [fp, #-56]
	bl	FS_FCloseFile
	mov	r1, #0
	sub	r0, fp, #52
	bl	CL_CDKeyValidate
	cmp	r0, #0
	ldr	r3, .L11+12
	bne	.L9
.L4:
	ldr	r0, [r3]
	mov	r2, #17
	ldr	r1, .L11+16
	add	r0, r0, #64
	bl	Q_strncpyz
.L5:
	ldr	r3, .L11+4
	mov	sp, r4
	ldr	r2, [r3]
	ldr	r3, [fp, #-16]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L10
	sub	sp, fp, #8
	@ sp needed
	pop	{r4, fp, pc}
.L9:
	ldr	r0, [r3]
	sub	r1, fp, #52
	add	r0, r0, #64
	bl	strcat
	b	.L5
.L10:
	bl	__stack_chk_fail
.L12:
	.align	2
.L11:
	.word	MAX_OSPATH
	.word	.LC2
	.word	.LC0
	.word	cl_cdkey
	.word	.LC1
	.size	Com_AppendCDKey, .-Com_AppendCDKey
	.comm	cl_cdkey,4,4
	.comm	MAX_OSPATH,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
