	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadQuakeFile                  ## -- Begin function ReadQuakeFile
	.p2align	4, 0x90
_ReadQuakeFile:                         ## @ReadQuakeFile
	.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	$1048, %rsp                     ## imm = 0x418
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movl	%edx, %ebx
	movq	%rsi, %r15
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	cmpq	$0, 16(%rdi)
	je	LBB0_5
## %bb.1:
	movq	%r15, -1088(%rbp)               ## 8-byte Spill
	movl	%r14d, -1076(%rbp)              ## 4-byte Spill
	movl	12(%r12), %edi
	callq	_unzOpen
	movq	%rax, %r13
	movl	(%rax), %eax
	movl	%eax, 8(%r12)
	addq	$8, %r12
	movq	%r12, %rdi
	callq	_unzOpenCurrentFile
	testl	%ebx, %ebx
	jle	LBB0_4
## %bb.2:
	leaq	-1072(%rbp), %r14
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	cmpl	$1024, %ebx                     ## imm = 0x400
	movl	$1024, %r15d                    ## imm = 0x400
	cmovbl	%ebx, %r15d
	movq	%r12, %rdi
	movq	%r14, %rsi
	movl	%r15d, %edx
	callq	_unzReadCurrentFile
	subl	%r15d, %ebx
	jg	LBB0_3
LBB0_4:
	movq	%r12, %rdi
	movq	-1088(%rbp), %rsi               ## 8-byte Reload
	movl	-1076(%rbp), %edx               ## 4-byte Reload
	callq	_unzReadCurrentFile
	movl	%eax, %r14d
	movq	%r12, %rdi
	callq	_unzCloseCurrentFile
	movq	%r13, %rdi
	callq	_unzClose
	jmp	LBB0_10
LBB0_5:
	movl	4(%r12), %edi
	callq	_SafeOpenRead
	movq	%rax, %r13
	movl	(%r12), %esi
	testl	%esi, %esi
	je	LBB0_7
## %bb.6:
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	callq	_fseek
LBB0_7:
	testl	%ebx, %ebx
	je	LBB0_9
## %bb.8:
	movq	_SEEK_CUR@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r13, %rdi
	movl	%ebx, %esi
	callq	_fseek
LBB0_9:
	movq	%r13, %rdi
	movq	%r15, %rsi
	movl	%r14d, %edx
	callq	_SafeRead
	movq	%r13, %rdi
	callq	_fclose
LBB0_10:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_12
## %bb.11:
	movl	%r14d, %eax
	addq	$1048, %rsp                     ## imm = 0x418
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_12:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ## @SEEK_CUR
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadQuakeFile                  ; -- Begin function ReadQuakeFile
	.p2align	2
_ReadQuakeFile:                         ; @ReadQuakeFile
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	sub	sp, sp, #1040
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
	mov	x22, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-72]
	ldr	x8, [x0, #16]
	cbz	x8, LBB0_5
; %bb.1:
	ldr	w0, [x22, #12]
	bl	_unzOpen
	mov	x23, x0
	ldr	w8, [x0]
	str	w8, [x22, #8]!
	mov	x0, x22
	bl	_unzOpenCurrentFile
	cmp	w21, #1
	b.lt	LBB0_4
; %bb.2:
	mov	w25, #1024
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	cmp	w21, #1024
	csel	w24, w21, w25, lo
	add	x1, sp, #8
	mov	x0, x22
	mov	x2, x24
	bl	_unzReadCurrentFile
	sub	w21, w21, w24
	cmp	w21, #0
	b.gt	LBB0_3
LBB0_4:
	mov	x0, x22
	mov	x1, x20
	mov	x2, x19
	bl	_unzReadCurrentFile
	mov	x19, x0
	mov	x0, x22
	bl	_unzCloseCurrentFile
	mov	x0, x23
	bl	_unzClose
	b	LBB0_10
LBB0_5:
	ldr	w0, [x22, #4]
	bl	_SafeOpenRead
	mov	x23, x0
	ldr	w1, [x22]
	cbz	w1, LBB0_7
; %bb.6:
Lloh3:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_fseek
LBB0_7:
	cbz	w21, LBB0_9
; %bb.8:
Lloh6:
	adrp	x8, _SEEK_CUR@GOTPAGE
Lloh7:
	ldr	x8, [x8, _SEEK_CUR@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x23
	mov	x1, x21
	bl	_fseek
LBB0_9:
	mov	x0, x23
	mov	x1, x20
	mov	x2, x19
	bl	_SafeRead
	mov	x0, x23
	bl	_fclose
LBB0_10:
	ldur	x8, [x29, #-72]
Lloh9:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh10:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	mov	x0, x19
	add	sp, sp, #1040
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
	.comm	_SEEK_CUR,4,2                   ; @SEEK_CUR
.subsections_via_symbols
