	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function CL_GenerateQKey
_CL_GenerateQKey:                       ## @CL_GenerateQKey
	.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	$24, %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	_QKEY_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %r15d
	movq	%r15, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	_QKEY_FILE@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	leaq	-52(%rbp), %rsi
	callq	_FS_SV_FOpenFileRead
	movl	%eax, %ebx
	movl	-52(%rbp), %edi
	callq	_FS_FCloseFile
	movl	(%r13), %esi
	cmpl	%esi, %ebx
	jne	LBB0_2
## %bb.1:
	leaq	L_.str(%rip), %rdi
	jmp	LBB0_7
LBB0_2:
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.3:
	leaq	L_.str.1(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
LBB0_4:
	leaq	L_.str.2(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	movq	%r14, %rdi
	movl	%r15d, %esi
	callq	_Com_RandomBytes
	movl	(%r12), %edi
	callq	_FS_SV_FOpenFileWrite
	movl	%eax, -52(%rbp)
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movq	%r14, %rdi
	movl	%r15d, %esi
	movl	%eax, %edx
	callq	_FS_Write
	movl	-52(%rbp), %edi
	callq	_FS_FCloseFile
	leaq	L_.str.4(%rip), %rdi
LBB0_7:
	xorl	%eax, %eax
	callq	_Com_Printf
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_5:
	movl	(%r12), %esi
	leaq	L_.str.3(%rip), %rdi
	xorl	%eax, %eax
	callq	_Com_Printf
	jmp	LBB0_8
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_QKEY_SIZE,4,2                  ## @QKEY_SIZE
	.comm	_QKEY_FILE,4,2                  ## @QKEY_FILE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"QKEY found.\n"

L_.str.1:                               ## @.str.1
	.asciz	"QKEY file size != %d, regenerating\n"

L_.str.2:                               ## @.str.2
	.asciz	"QKEY building random string\n"

L_.str.3:                               ## @.str.3
	.asciz	"QKEY could not open %s for write\n"

L_.str.4:                               ## @.str.4
	.asciz	"QKEY generated\n"

	.no_dead_strip	_CL_GenerateQKey
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function CL_GenerateQKey
_CL_GenerateQKey:                       ; @CL_GenerateQKey
	.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, #16
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	x23, _QKEY_SIZE@GOTPAGE
Lloh4:
	ldr	x23, [x23, _QKEY_SIZE@GOTPAGEOFF]
	ldr	w19, [x23]
	mov	x9, x19
Lloh5:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh6:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x19, #15
	and	x9, x9, #0x1fffffff0
	sub	x20, x8, x9
	mov	sp, x20
Lloh7:
	adrp	x22, _QKEY_FILE@GOTPAGE
Lloh8:
	ldr	x22, [x22, _QKEY_FILE@GOTPAGEOFF]
	ldr	w0, [x22]
	sub	x1, x29, #60
	bl	_FS_SV_FOpenFileRead
	mov	x21, x0
	ldur	w0, [x29, #-60]
	bl	_FS_FCloseFile
	ldr	w8, [x23]
	cmp	w21, w8
	b.ne	LBB0_2
; %bb.1:
Lloh9:
	adrp	x0, l_.str@PAGE
Lloh10:
	add	x0, x0, l_.str@PAGEOFF
	b	LBB0_6
LBB0_2:
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.3:
	str	x8, [sp, #-16]!
Lloh11:
	adrp	x0, l_.str.1@PAGE
Lloh12:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_Com_Printf
	add	sp, sp, #16
LBB0_4:
Lloh13:
	adrp	x0, l_.str.2@PAGE
Lloh14:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
	mov	x0, x20
	mov	x1, x19
	bl	_Com_RandomBytes
	ldr	w0, [x22]
	bl	_FS_SV_FOpenFileWrite
	stur	w0, [x29, #-60]
	cbz	w0, LBB0_9
; %bb.5:
	mov	x2, x0
	mov	x0, x20
	mov	x1, x19
	bl	_FS_Write
	ldur	w0, [x29, #-60]
	bl	_FS_FCloseFile
Lloh15:
	adrp	x0, l_.str.4@PAGE
Lloh16:
	add	x0, x0, l_.str.4@PAGEOFF
LBB0_6:
	bl	_Com_Printf
LBB0_7:
	ldur	x8, [x29, #-56]
Lloh17:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh18:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_10
; %bb.8:
	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_9:
	ldr	w8, [x22]
	str	x8, [sp, #-16]!
Lloh20:
	adrp	x0, l_.str.3@PAGE
Lloh21:
	add	x0, x0, l_.str.3@PAGEOFF
	bl	_Com_Printf
	add	sp, sp, #16
	b	LBB0_7
LBB0_10:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_QKEY_SIZE,4,2                  ; @QKEY_SIZE
	.comm	_QKEY_FILE,4,2                  ; @QKEY_FILE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"QKEY found.\n"

l_.str.1:                               ; @.str.1
	.asciz	"QKEY file size != %d, regenerating\n"

l_.str.2:                               ; @.str.2
	.asciz	"QKEY building random string\n"

l_.str.3:                               ; @.str.3
	.asciz	"QKEY could not open %s for write\n"

l_.str.4:                               ; @.str.4
	.asciz	"QKEY generated\n"

	.no_dead_strip	_CL_GenerateQKey
.subsections_via_symbols
