	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_AppendCDKey                ## -- Begin function Com_AppendCDKey
	.p2align	4, 0x90
_Com_AppendCDKey:                       ## @Com_AppendCDKey
	.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
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	movq	%rsp, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	_MAX_OSPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movq	%r14, %rdx
	callq	_sprintf
	leaq	-84(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_FS_SV_FOpenFileRead
	cmpl	$0, -84(%rbp)
	je	LBB0_1
## %bb.3:
	leaq	-80(%rbp), %rbx
	movq	%rbx, %rdi
	xorl	%esi, %esi
	movl	$33, %edx
	callq	_Com_Memset
	movl	-84(%rbp), %edx
	movq	%rbx, %rdi
	movl	$16, %esi
	callq	_FS_Read
	movl	-84(%rbp), %edi
	callq	_FS_FCloseFile
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_CL_CDKeyValidate
	movq	_cl_cdkey@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdi
	addq	$64, %rdi
	testq	%rax, %rax
	je	LBB0_2
## %bb.4:
	leaq	-80(%rbp), %rsi
	callq	_strcat
	jmp	LBB0_5
LBB0_1:
	movq	_cl_cdkey@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	addq	$64, %rdi
LBB0_2:
	leaq	L_.str.1(%rip), %rsi
	movl	$17, %edx
	callq	_Q_strncpyz
LBB0_5:
	movq	%r15, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-32(%rbp), %rax
	jne	LBB0_7
## %bb.6:
	leaq	-24(%rbp), %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_OSPATH,4,2                 ## @MAX_OSPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s/q3key"

	.comm	_cl_cdkey,8,3                   ## @cl_cdkey
L_.str.1:                               ## @.str.1
	.asciz	"                "

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_Com_AppendCDKey                ; -- Begin function Com_AppendCDKey
	.p2align	2
_Com_AppendCDKey:                       ; @Com_AppendCDKey
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	sub	sp, sp, #48
	mov	x2, x0
	mov	x20, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-24]
Lloh3:
	adrp	x8, _MAX_OSPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_OSPATH@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	x8, x8, #15
	and	x8, x8, #0x1fffffff0
	sub	x19, x9, x8
	mov	sp, x19
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_sprintf
	sub	x1, x29, #64
	mov	x0, x19
	bl	_FS_SV_FOpenFileRead
	ldur	w8, [x29, #-64]
	cbz	w8, LBB0_3
; %bb.1:
	sub	x0, x29, #57
	mov	w1, #0
	mov	w2, #33
	bl	_Com_Memset
	ldur	w2, [x29, #-64]
	sub	x0, x29, #57
	mov	w1, #16
	bl	_FS_Read
	ldur	w0, [x29, #-64]
	bl	_FS_FCloseFile
	sub	x0, x29, #57
	mov	x1, #0
	bl	_CL_CDKeyValidate
	mov	x8, x0
Lloh10:
	adrp	x9, _cl_cdkey@GOTPAGE
Lloh11:
	ldr	x9, [x9, _cl_cdkey@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	add	x0, x9, #64
	cbz	x8, LBB0_4
; %bb.2:
	sub	x1, x29, #57
	bl	_strcat
	b	LBB0_5
LBB0_3:
Lloh13:
	adrp	x8, _cl_cdkey@GOTPAGE
Lloh14:
	ldr	x8, [x8, _cl_cdkey@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	add	x0, x8, #64
LBB0_4:
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	w2, #17
	bl	_Q_strncpyz
LBB0_5:
	mov	sp, x20
	ldur	x8, [x29, #-24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_7
; %bb.6:
	sub	sp, x29, #16
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
LBB0_7:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_OSPATH,4,2                 ; @MAX_OSPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s/q3key"

	.comm	_cl_cdkey,8,3                   ; @cl_cdkey
l_.str.1:                               ; @.str.1
	.asciz	"                "

.subsections_via_symbols
