	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SV_WriteDownloadToClient       ## -- Begin function SV_WriteDownloadToClient
	.p2align	4, 0x90
_SV_WriteDownloadToClient:              ## @SV_WriteDownloadToClient
	.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	$1064, %rsp                     ## imm = 0x428
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r14
	movq	%rdi, %r15
	movq	%rsp, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	_MAX_QPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movq	%rbx, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r12
	movq	80(%r15), %rcx
	xorl	%eax, %eax
	cmpq	$0, (%rcx)
	je	LBB0_68
## %bb.1:
	cmpq	$0, 72(%r15)
	movq	%r14, -1080(%rbp)               ## 8-byte Spill
	je	LBB0_3
## %bb.2:
	movq	8(%r15), %rax
	movq	16(%r15), %rcx
LBB0_35:
	movq	%rax, %rdx
	subq	%rcx, %rdx
	movq	_MAX_DOWNLOAD_WINDOW@GOTPCREL(%rip), %r14
	movq	(%r14), %rsi
	cmpq	%rsi, %rdx
	jae	LBB0_36
## %bb.37:
	movl	32(%r15), %ecx
	movq	_MAX_DOWNLOAD_BLKSIZE@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_38:                                ## =>This Inner Loop Header: Depth=1
	cmpl	%ecx, (%r15)
	je	LBB0_47
## %bb.39:                              ##   in Loop: Header=BB0_38 Depth=1
	movq	%rax, %rcx
	orq	%rsi, %rcx
	shrq	$32, %rcx
	je	LBB0_40
## %bb.41:                              ##   in Loop: Header=BB0_38 Depth=1
	xorl	%edx, %edx
	divq	%rsi
	jmp	LBB0_42
	.p2align	4, 0x90
LBB0_40:                                ##   in Loop: Header=BB0_38 Depth=1
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%esi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_42:                                ##   in Loop: Header=BB0_38 Depth=1
	movq	56(%r15), %rax
	movslq	%edx, %rbx
	movq	(%rax,%rbx,8), %rdi
	testq	%rdi, %rdi
	jne	LBB0_44
## %bb.43:                              ##   in Loop: Header=BB0_38 Depth=1
	movl	(%r12), %edi
	callq	_Z_Malloc
	movq	%rax, %rdi
	movq	56(%r15), %rax
	movq	%rdi, (%rax,%rbx,8)
LBB0_44:                                ##   in Loop: Header=BB0_38 Depth=1
	movl	(%r12), %esi
	movq	72(%r15), %rdx
	callq	_FS_Read
	movl	%eax, %ecx
	movq	40(%r15), %rax
	movl	%ecx, (%rax,%rbx,4)
	testl	%ecx, %ecx
	js	LBB0_45
## %bb.46:                              ##   in Loop: Header=BB0_38 Depth=1
	addl	32(%r15), %ecx
	movl	%ecx, 32(%r15)
	movq	8(%r15), %rax
	incq	%rax
	movq	%rax, 8(%r15)
	movq	%rax, %rdx
	subq	16(%r15), %rdx
	movq	(%r14), %rsi
	cmpq	%rsi, %rdx
	jb	LBB0_38
	jmp	LBB0_47
LBB0_3:
	leaq	72(%r15), %rax
	movq	%rax, -1104(%rbp)               ## 8-byte Spill
	movq	_qfalse@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -1084(%rbp)               ## 4-byte Spill
	leaq	L_.str(%rip), %rdx
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_Com_sprintf
	movq	%r12, %rdi
	movl	$46, %esi
	callq	_strrchr
	movb	$1, %bl
	testq	%rax, %rax
	movq	%r13, -1096(%rbp)               ## 8-byte Spill
	je	LBB0_4
## %bb.5:
	movl	-1084(%rbp), %ebx               ## 4-byte Reload
	movb	$0, (%rax)
	incq	%rax
	leaq	L_.str.1(%rip), %rsi
	movq	%rax, %rdi
	callq	_Q_stricmp
	testl	%eax, %eax
	je	LBB0_7
LBB0_6:
	xorl	%r13d, %r13d
LBB0_8:
	movl	%ebx, %edi
	movl	%ebx, %r8d
	movb	$1, %bl
	jmp	LBB0_15
LBB0_36:
	movl	32(%r15), %ecx
LBB0_47:
	cmpl	(%r15), %ecx
	jne	LBB0_54
## %bb.48:
	cmpq	$0, 64(%r15)
	jne	LBB0_54
	jmp	LBB0_49
LBB0_4:
	xorl	%r13d, %r13d
	movl	-1084(%rbp), %edi               ## 4-byte Reload
	movl	%edi, %r8d
LBB0_15:
	movq	-1104(%rbp), %rsi               ## 8-byte Reload
	movq	$0, (%rsi)
	movq	_sv_allowDownload@GOTPCREL(%rip), %r14
	movq	(%r14), %rax
	movl	(%rax), %eax
	movq	_DLF_ENABLE@GOTPCREL(%rip), %r12
	movl	(%r12), %ecx
	andl	%eax, %ecx
	je	LBB0_23
## %bb.16:
	movq	_DLF_NO_UDP@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	andl	%eax, %edx
	orl	%edi, %edx
	setne	%dl
	orb	%dl, %bl
	je	LBB0_17
LBB0_23:
	testb	%r13b, %r13b
	je	LBB0_24
## %bb.25:
	testl	%edi, %edi
	movq	-1096(%rbp), %r13               ## 8-byte Reload
	movq	-1080(%rbp), %rbx               ## 8-byte Reload
	je	LBB0_19
## %bb.26:
	movq	_svs@GOTPCREL(%rip), %rax
	movq	%r15, %rcx
	subq	8(%rax), %rcx
	shrq	$3, %rcx
	imull	$-1171354717, %ecx, %esi        ## imm = 0xBA2E8BA3
	movq	80(%r15), %rdx
	leaq	L_.str.4(%rip), %rdi
	movl	%r8d, %r14d
	callq	_Com_Printf
	movq	80(%r15), %rcx
	testl	%r14d, %r14d
	je	LBB0_28
## %bb.27:
	leaq	L_.str.5(%rip), %rdx
	jmp	LBB0_31
LBB0_24:
	movq	_svs@GOTPCREL(%rip), %rax
	movq	%r15, %rcx
	subq	8(%rax), %rcx
	shrq	$3, %rcx
	imull	$-1171354717, %ecx, %esi        ## imm = 0xBA2E8BA3
	movq	80(%r15), %rdx
	leaq	L_.str.2(%rip), %rdi
	callq	_Com_Printf
	movq	80(%r15), %rcx
	leaq	L_.str.3(%rip), %rdx
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_Com_sprintf
	movq	-1096(%rbp), %r13               ## 8-byte Reload
	movq	-1080(%rbp), %rbx               ## 8-byte Reload
	jmp	LBB0_32
LBB0_17:
	movq	80(%r15), %rdi
	callq	_FS_SV_FOpenFileRead
	movl	%eax, (%r15)
	testl	%eax, %eax
	movq	-1096(%rbp), %r13               ## 8-byte Reload
	js	LBB0_18
## %bb.34:
	movq	_svs@GOTPCREL(%rip), %rax
	movq	%r15, %rcx
	subq	8(%rax), %rcx
	shrq	$3, %rcx
	imull	$-1171354717, %ecx, %esi        ## imm = 0xBA2E8BA3
	movq	80(%r15), %rdx
	leaq	L_.str.12(%rip), %rdi
	callq	_Com_Printf
	xorps	%xmm0, %xmm0
	movups	%xmm0, 8(%r15)
	movups	%xmm0, 20(%r15)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r15)
	xorl	%ecx, %ecx
	xorl	%eax, %eax
	jmp	LBB0_35
LBB0_45:
	movl	(%r15), %eax
	movl	%eax, 32(%r15)
	cmpq	$0, 64(%r15)
	jne	LBB0_54
LBB0_49:
	movq	8(%r15), %rcx
	movq	%rcx, %rax
	subq	16(%r15), %rax
	movq	(%r14), %rdi
	cmpq	%rdi, %rax
	jae	LBB0_54
## %bb.50:
	movq	40(%r15), %rsi
	movq	%rcx, %rax
	orq	%rdi, %rax
	shrq	$32, %rax
	je	LBB0_51
## %bb.52:
	movq	%rcx, %rax
	xorl	%edx, %edx
	divq	%rdi
	jmp	LBB0_53
LBB0_7:
	xorl	%r13d, %r13d
	xorl	%eax, %eax
	callq	_FS_ReferencedPakNames
	movq	%rax, %rdi
	callq	_Cmd_TokenizeStringIgnoreQuotes
	xorl	%eax, %eax
	callq	_Cmd_Argc
	testl	%eax, %eax
	jle	LBB0_8
## %bb.10:
	movl	%eax, %r14d
	.p2align	4, 0x90
LBB0_11:                                ## =>This Inner Loop Header: Depth=1
	movl	%r13d, %edi
	callq	_Cmd_Argv
	movl	%eax, %edi
	movq	%r12, %rsi
	callq	_FS_FilenameCompare
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:                               ##   in Loop: Header=BB0_11 Depth=1
	incl	%r13d
	cmpl	%r13d, %r14d
	jne	LBB0_11
	jmp	LBB0_6
LBB0_18:
	movq	(%r14), %rax
	movl	(%rax), %eax
	movl	(%r12), %ecx
	andl	%eax, %ecx
	movq	-1080(%rbp), %rbx               ## 8-byte Reload
LBB0_19:
	testl	%ecx, %ecx
	je	LBB0_21
## %bb.20:
	movq	_DLF_NO_UDP@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_30
LBB0_21:
	movq	_svs@GOTPCREL(%rip), %rax
	movq	%r15, %rcx
	subq	8(%rax), %rcx
	shrq	$3, %rcx
	imull	$-1171354717, %ecx, %esi        ## imm = 0xBA2E8BA3
	movq	80(%r15), %rdx
	leaq	L_.str.7(%rip), %rdi
	callq	_Com_Printf
	movq	_sv_pure@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	movq	80(%r15), %rcx
	je	LBB0_29
## %bb.22:
	leaq	L_.str.8(%rip), %rdx
	jmp	LBB0_31
LBB0_28:
	leaq	L_.str.6(%rip), %rdx
	jmp	LBB0_31
LBB0_51:
	movl	%ecx, %eax
	xorl	%edx, %edx
	divl	%edi
                                        ## kill: def $edx killed $edx def $rdx
LBB0_53:
	movl	$0, (%rsi,%rdx,4)
	incq	%rcx
	movq	%rcx, 8(%r15)
	movq	_qtrue@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 64(%r15)
LBB0_54:
	movq	8(%r15), %rdx
	movq	16(%r15), %rcx
	cmpq	%rdx, %rcx
	jne	LBB0_56
## %bb.55:
	xorl	%eax, %eax
	jmp	LBB0_68
LBB0_56:
	movq	24(%r15), %rax
	cmpq	%rdx, %rax
	jne	LBB0_59
## %bb.57:
	movq	_svs@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	subl	48(%r15), %eax
	cmpl	$1001, %eax                     ## imm = 0x3E9
	movl	$0, %eax
	jl	LBB0_68
## %bb.58:
	movq	%rcx, 24(%r15)
	movq	%rcx, %rax
LBB0_59:
	movq	(%r14), %rcx
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_60
## %bb.61:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rdx, %rbx
	jmp	LBB0_62
LBB0_60:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%edx, %ebx
LBB0_62:
	movq	-1080(%rbp), %r14               ## 8-byte Reload
	movq	_svc_download@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_MSG_WriteByte
	movl	24(%r15), %esi
	movq	%r14, %rdi
	callq	_MSG_WriteShort
	cmpq	$0, 24(%r15)
	jne	LBB0_64
## %bb.63:
	movl	(%r15), %esi
	movq	%r14, %rdi
	callq	_MSG_WriteLong
LBB0_64:
	movq	40(%r15), %rax
	movslq	%ebx, %rbx
	movl	(%rax,%rbx,4), %esi
	movq	%r14, %rdi
	callq	_MSG_WriteShort
	movq	40(%r15), %rax
	movl	(%rax,%rbx,4), %edx
	testl	%edx, %edx
	je	LBB0_66
## %bb.65:
	movq	56(%r15), %rax
	movq	(%rax,%rbx,8), %rsi
	movq	%r14, %rdi
	callq	_MSG_WriteData
LBB0_66:
	movq	_svs@GOTPCREL(%rip), %rbx
	movq	%r15, %rax
	subq	8(%rbx), %rax
	shrq	$3, %rax
	imull	$-1171354717, %eax, %esi        ## imm = 0xBA2E8BA3
	movl	24(%r15), %edx
	leaq	L_.str.13(%rip), %rdi
	callq	_Com_DPrintf
	incq	24(%r15)
	movl	(%rbx), %eax
	movl	%eax, 48(%r15)
	jmp	LBB0_67
LBB0_12:
	movq	_BASETA@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NUM_TA_PAKS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	callq	_FS_idPak
	movl	%eax, %r8d
	movb	$1, %r13b
	movb	$1, %al
	testl	%r8d, %r8d
	jne	LBB0_14
## %bb.13:
	movq	_BASEGAME@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_NUM_ID_PAKS@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r8d, %ebx
	callq	_FS_idPak
	movl	%ebx, %r8d
	testl	%eax, %eax
	setne	%al
LBB0_14:
	movzbl	%al, %edi
	xorl	%ebx, %ebx
	jmp	LBB0_15
LBB0_29:
	leaq	L_.str.9(%rip), %rdx
	jmp	LBB0_31
LBB0_30:
	movq	_svs@GOTPCREL(%rip), %rax
	movq	%r15, %rcx
	subq	8(%rax), %rcx
	shrq	$3, %rcx
	imull	$-1171354717, %ecx, %esi        ## imm = 0xBA2E8BA3
	movq	80(%r15), %rdx
	leaq	L_.str.10(%rip), %rdi
	callq	_Com_Printf
	movq	80(%r15), %rcx
	leaq	L_.str.11(%rip), %rdx
LBB0_31:
	leaq	-1072(%rbp), %rdi
	movl	$1024, %esi                     ## imm = 0x400
	callq	_Com_sprintf
LBB0_32:
	movq	_svc_download@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_MSG_WriteByte
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_MSG_WriteShort
	movq	%rbx, %rdi
	movl	$-1, %esi
	callq	_MSG_WriteLong
	leaq	-1072(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_MSG_WriteString
	movq	80(%r15), %rax
	movq	$0, (%rax)
	movq	72(%r15), %rdi
	movl	$1, %eax
	testq	%rdi, %rdi
	je	LBB0_68
## %bb.33:
	callq	_FS_FCloseFile
LBB0_67:
	movl	$1, %eax
LBB0_68:
	movq	%r13, %rsp
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-48(%rbp), %rcx
	jne	LBB0_70
## %bb.69:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_70:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_QPATH,4,2                  ## @MAX_QPATH
	.comm	_qfalse,8,3                     ## @qfalse
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s"

L_.str.1:                               ## @.str.1
	.asciz	"pk3"

	.comm	_BASETA,4,2                     ## @BASETA
	.comm	_NUM_TA_PAKS,4,2                ## @NUM_TA_PAKS
	.comm	_BASEGAME,4,2                   ## @BASEGAME
	.comm	_NUM_ID_PAKS,4,2                ## @NUM_ID_PAKS
	.comm	_sv_allowDownload,8,3           ## @sv_allowDownload
	.comm	_DLF_ENABLE,4,2                 ## @DLF_ENABLE
	.comm	_DLF_NO_UDP,4,2                 ## @DLF_NO_UDP
L_.str.2:                               ## @.str.2
	.asciz	"clientDownload: %d : \"%s\" is not referenced and cannot be downloaded.\n"

	.comm	_svs,16,3                       ## @svs
L_.str.3:                               ## @.str.3
	.asciz	"File \"%s\" is not referenced and cannot be downloaded."

L_.str.4:                               ## @.str.4
	.asciz	"clientDownload: %d : \"%s\" cannot download id pk3 files\n"

L_.str.5:                               ## @.str.5
	.asciz	"Cannot autodownload Team Arena file \"%s\"\nThe Team Arena mission pack can be found in your local game store."

L_.str.6:                               ## @.str.6
	.asciz	"Cannot autodownload id pk3 file \"%s\""

L_.str.7:                               ## @.str.7
	.asciz	"clientDownload: %d : \"%s\" download disabled\n"

	.comm	_sv_pure,8,3                    ## @sv_pure
L_.str.8:                               ## @.str.8
	.asciz	"Could not download \"%s\" because autodownloading is disabled on the server.\n\nYou will need to get this file elsewhere before you can connect to this pure server.\n"

L_.str.9:                               ## @.str.9
	.asciz	"Could not download \"%s\" because autodownloading is disabled on the server.\n\nThe server you are connecting to is not a pure server, set autodownload to No in your settings and you might be able to join the game anyway.\n"

L_.str.10:                              ## @.str.10
	.asciz	"clientDownload: %d : \"%s\" file not found on server\n"

L_.str.11:                              ## @.str.11
	.asciz	"File \"%s\" not found on server for autodownloading.\n"

	.comm	_svc_download,4,2               ## @svc_download
L_.str.12:                              ## @.str.12
	.asciz	"clientDownload: %d : beginning \"%s\"\n"

	.comm	_MAX_DOWNLOAD_WINDOW,8,3        ## @MAX_DOWNLOAD_WINDOW
	.comm	_MAX_DOWNLOAD_BLKSIZE,4,2       ## @MAX_DOWNLOAD_BLKSIZE
	.comm	_qtrue,8,3                      ## @qtrue
L_.str.13:                              ## @.str.13
	.asciz	"clientDownload: %d : writing block %d\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_SV_WriteDownloadToClient       ; -- Begin function SV_WriteDownloadToClient
	.p2align	2
_SV_WriteDownloadToClient:              ; @SV_WriteDownloadToClient
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	sub	sp, sp, #1040
	mov	x19, sp
	mov	x21, x1
	mov	x20, x0
	mov	x26, sp
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-96]
Lloh3:
	adrp	x8, _MAX_QPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_QPATH@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x9, x1
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x1, #15
	and	x9, x9, #0x1fffffff0
	sub	x23, x8, x9
	mov	sp, x23
	ldr	x3, [x0, #80]
	ldr	x8, [x3]
	cbz	x8, LBB0_29
; %bb.1:
	mov	x22, x20
	ldr	x8, [x22, #72]!
	cbz	x8, LBB0_10
; %bb.2:
	ldp	x8, x9, [x20, #8]
LBB0_3:
Lloh8:
	adrp	x22, _MAX_DOWNLOAD_WINDOW@GOTPAGE
Lloh9:
	ldr	x22, [x22, _MAX_DOWNLOAD_WINDOW@GOTPAGEOFF]
	ldr	x10, [x22]
	sub	x9, x8, x9
	cmp	x9, x10
	b.hs	LBB0_19
; %bb.4:
	ldr	w9, [x20, #32]
Lloh10:
	adrp	x23, _MAX_DOWNLOAD_BLKSIZE@GOTPAGE
Lloh11:
	ldr	x23, [x23, _MAX_DOWNLOAD_BLKSIZE@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w11, [x20]
	cmp	w11, w9
	b.eq	LBB0_20
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	udiv	x9, x8, x10
	msub	x8, x9, x10, x8
	ldr	x9, [x20, #56]
	sxtw	x24, w8
	sbfiz	x8, x8, #3, #32
	ldr	x0, [x9, x8]
	cbnz	x0, LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w0, [x23]
	bl	_Z_Malloc
	ldr	x8, [x20, #56]
	str	x0, [x8, x24, lsl #3]
LBB0_8:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x23]
	ldr	x2, [x20, #72]
	bl	_FS_Read
	ldr	x8, [x20, #40]
	str	w0, [x8, x24, lsl #2]
	tbnz	w0, #31, LBB0_25
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x20, #32]
	add	w9, w8, w0
	str	w9, [x20, #32]
	ldp	x8, x11, [x20, #8]
	add	x8, x8, #1
	str	x8, [x20, #8]
	ldr	x10, [x22]
	sub	x11, x8, x11
	cmp	x11, x10
	b.lo	LBB0_5
	b	LBB0_20
LBB0_10:
Lloh12:
	adrp	x27, _qfalse@GOTPAGE
Lloh13:
	ldr	x27, [x27, _qfalse@GOTPAGEOFF]
	ldr	w28, [x27]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x23
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_Com_sprintf
	mov	x0, x23
	mov	w1, #46
	bl	_strrchr
	cbz	x0, LBB0_12
; %bb.11:
	strb	wzr, [x0], #1
Lloh16:
	adrp	x1, l_.str.1@PAGE
Lloh17:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_Q_stricmp
	cbz	w0, LBB0_38
LBB0_12:
	mov	w8, #0
	mov	w9, #1
	mov	x24, x28
LBB0_13:
	str	xzr, [x22]
Lloh18:
	adrp	x23, _sv_allowDownload@GOTPAGE
Lloh19:
	ldr	x23, [x23, _sv_allowDownload@GOTPAGEOFF]
	ldr	x10, [x23]
	ldr	w10, [x10]
Lloh20:
	adrp	x25, _DLF_ENABLE@GOTPAGE
Lloh21:
	ldr	x25, [x25, _DLF_ENABLE@GOTPAGEOFF]
	ldr	w11, [x25]
	ands	w11, w11, w10
	b.eq	LBB0_15
; %bb.14:
Lloh22:
	adrp	x12, _DLF_NO_UDP@GOTPAGE
Lloh23:
	ldr	x12, [x12, _DLF_NO_UDP@GOTPAGEOFF]
Lloh24:
	ldr	w12, [x12]
	and	w12, w12, w10
	orr	w12, w12, w28
	cmp	w12, #0
	cset	w12, ne
	orr	w9, w9, w12
	tbz	w9, #0, LBB0_23
LBB0_15:
	tbz	w8, #0, LBB0_22
; %bb.16:
	cbz	w28, LBB0_43
; %bb.17:
Lloh25:
	adrp	x8, _svs@GOTPAGE
Lloh26:
	ldr	x8, [x8, _svs@GOTPAGEOFF]
Lloh27:
	ldr	x8, [x8, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #3
	mov	w9, #35747
	movk	w9, #47662, lsl #16
	mul	w1, w8, w9
	ldr	x2, [x20, #80]
Lloh28:
	adrp	x0, l_.str.4@PAGE
Lloh29:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Com_Printf
	ldr	x3, [x20, #80]
	cbz	w24, LBB0_47
; %bb.18:
Lloh30:
	adrp	x2, l_.str.5@PAGE
Lloh31:
	add	x2, x2, l_.str.5@PAGEOFF
	b	LBB0_52
LBB0_19:
	ldr	w9, [x20, #32]
LBB0_20:
	ldr	w8, [x20]
	cmp	w9, w8
	b.ne	LBB0_28
; %bb.21:
	ldr	x8, [x20, #64]
	cbnz	x8, LBB0_28
	b	LBB0_26
LBB0_22:
Lloh32:
	adrp	x8, _svs@GOTPAGE
Lloh33:
	ldr	x8, [x8, _svs@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #3
	mov	w9, #35747
	movk	w9, #47662, lsl #16
	mul	w1, w8, w9
	ldr	x2, [x20, #80]
Lloh35:
	adrp	x0, l_.str.2@PAGE
Lloh36:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_Com_Printf
	ldr	x3, [x20, #80]
Lloh37:
	adrp	x2, l_.str.3@PAGE
Lloh38:
	add	x2, x2, l_.str.3@PAGEOFF
	b	LBB0_52
LBB0_23:
	ldr	x0, [x20, #80]
	mov	x1, x22
	bl	_FS_SV_FOpenFileRead
	str	w0, [x20]
	tbnz	w0, #31, LBB0_42
; %bb.24:
Lloh39:
	adrp	x8, _svs@GOTPAGE
Lloh40:
	ldr	x8, [x8, _svs@GOTPAGEOFF]
Lloh41:
	ldr	x8, [x8, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #3
	mov	w9, #35747
	movk	w9, #47662, lsl #16
	mul	w1, w8, w9
	ldr	x2, [x20, #80]
Lloh42:
	adrp	x0, l_.str.12@PAGE
Lloh43:
	add	x0, x0, l_.str.12@PAGEOFF
	bl	_Com_Printf
	mov	x9, #0
	mov	x8, #0
	stp	xzr, xzr, [x20, #16]
	str	xzr, [x20, #8]
	str	wzr, [x20, #32]
	ldr	x10, [x27]
	str	x10, [x20, #64]
	b	LBB0_3
LBB0_25:
	ldr	w8, [x20]
	str	w8, [x20, #32]
	ldr	x8, [x20, #64]
	cbnz	x8, LBB0_28
LBB0_26:
	ldp	x8, x10, [x20, #8]
	ldr	x9, [x22]
	sub	x10, x8, x10
	cmp	x10, x9
	b.hs	LBB0_28
; %bb.27:
	ldr	x10, [x20, #40]
	udiv	x11, x8, x9
	msub	x9, x11, x9, x8
	str	wzr, [x10, x9, lsl #2]
	add	x8, x8, #1
	str	x8, [x20, #8]
Lloh44:
	adrp	x8, _qtrue@GOTPAGE
Lloh45:
	ldr	x8, [x8, _qtrue@GOTPAGEOFF]
Lloh46:
	ldr	x8, [x8]
	str	x8, [x20, #64]
LBB0_28:
	ldp	x10, x8, [x20, #8]
	cmp	x8, x10
	b.ne	LBB0_30
LBB0_29:
	mov	w0, #0
	b	LBB0_55
LBB0_30:
	ldr	x9, [x20, #24]
Lloh47:
	adrp	x23, _svs@GOTPAGE
Lloh48:
	ldr	x23, [x23, _svs@GOTPAGEOFF]
	cmp	x9, x10
	b.ne	LBB0_33
; %bb.31:
	ldr	w9, [x23]
	ldr	w10, [x20, #48]
	sub	w9, w9, w10
	cmp	w9, #1001
	b.lt	LBB0_29
; %bb.32:
	str	x8, [x20, #24]
	mov	x9, x8
LBB0_33:
	ldr	x8, [x22]
	udiv	x10, x9, x8
	msub	x22, x10, x8, x9
Lloh49:
	adrp	x8, _svc_download@GOTPAGE
Lloh50:
	ldr	x8, [x8, _svc_download@GOTPAGEOFF]
Lloh51:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_MSG_WriteByte
	ldr	w1, [x20, #24]
	mov	x0, x21
	bl	_MSG_WriteShort
	ldr	x8, [x20, #24]
	cbnz	x8, LBB0_35
; %bb.34:
	ldr	w1, [x20]
	mov	x0, x21
	bl	_MSG_WriteLong
LBB0_35:
	ldr	x8, [x20, #40]
	sbfiz	x24, x22, #2, #32
	ldr	w1, [x8, x24]
	mov	x0, x21
	bl	_MSG_WriteShort
	ldr	x8, [x20, #40]
	ldr	w2, [x8, x24]
	cbz	w2, LBB0_37
; %bb.36:
	sxtw	x8, w22
	ldr	x9, [x20, #56]
	ldr	x1, [x9, x8, lsl #3]
	mov	x0, x21
	bl	_MSG_WriteData
LBB0_37:
	ldr	x8, [x23, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #3
	mov	w9, #35747
	movk	w9, #47662, lsl #16
	mul	w1, w8, w9
	ldr	w2, [x20, #24]
Lloh52:
	adrp	x0, l_.str.13@PAGE
Lloh53:
	add	x0, x0, l_.str.13@PAGEOFF
	bl	_Com_DPrintf
	ldr	x8, [x20, #24]
	add	x8, x8, #1
	str	x8, [x20, #24]
	ldr	w8, [x23]
	str	w8, [x20, #48]
	b	LBB0_54
LBB0_38:
	bl	_FS_ReferencedPakNames
	bl	_Cmd_TokenizeStringIgnoreQuotes
	bl	_Cmd_Argc
	cmp	w0, #1
	b.lt	LBB0_12
; %bb.39:
	mov	x24, x0
	mov	w25, #0
LBB0_40:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x25
	bl	_Cmd_Argv
	mov	x1, x23
	bl	_FS_FilenameCompare
	cbz	w0, LBB0_48
; %bb.41:                               ;   in Loop: Header=BB0_40 Depth=1
	add	w25, w25, #1
	cmp	w24, w25
	b.ne	LBB0_40
	b	LBB0_12
LBB0_42:
	ldr	x8, [x23]
	ldr	w10, [x8]
	ldr	w8, [x25]
	and	w11, w8, w10
LBB0_43:
	cbz	w11, LBB0_45
; %bb.44:
Lloh54:
	adrp	x8, _DLF_NO_UDP@GOTPAGE
Lloh55:
	ldr	x8, [x8, _DLF_NO_UDP@GOTPAGEOFF]
Lloh56:
	ldr	w8, [x8]
	tst	w8, w10
	b.eq	LBB0_51
LBB0_45:
Lloh57:
	adrp	x8, _svs@GOTPAGE
Lloh58:
	ldr	x8, [x8, _svs@GOTPAGEOFF]
Lloh59:
	ldr	x8, [x8, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #3
	mov	w9, #35747
	movk	w9, #47662, lsl #16
	mul	w1, w8, w9
	ldr	x2, [x20, #80]
Lloh60:
	adrp	x0, l_.str.7@PAGE
Lloh61:
	add	x0, x0, l_.str.7@PAGEOFF
	bl	_Com_Printf
Lloh62:
	adrp	x8, _sv_pure@GOTPAGE
Lloh63:
	ldr	x8, [x8, _sv_pure@GOTPAGEOFF]
Lloh64:
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	x3, [x20, #80]
	cbz	x8, LBB0_50
; %bb.46:
Lloh65:
	adrp	x2, l_.str.8@PAGE
Lloh66:
	add	x2, x2, l_.str.8@PAGEOFF
	b	LBB0_52
LBB0_47:
Lloh67:
	adrp	x2, l_.str.6@PAGE
Lloh68:
	add	x2, x2, l_.str.6@PAGEOFF
	b	LBB0_52
LBB0_48:
Lloh69:
	adrp	x8, _BASETA@GOTPAGE
Lloh70:
	ldr	x8, [x8, _BASETA@GOTPAGEOFF]
Lloh71:
	ldr	w1, [x8]
Lloh72:
	adrp	x8, _NUM_TA_PAKS@GOTPAGE
Lloh73:
	ldr	x8, [x8, _NUM_TA_PAKS@GOTPAGEOFF]
Lloh74:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_FS_idPak
	mov	x24, x0
	cbz	w0, LBB0_57
; %bb.49:
	mov	w28, #1
	b	LBB0_58
LBB0_50:
Lloh75:
	adrp	x2, l_.str.9@PAGE
Lloh76:
	add	x2, x2, l_.str.9@PAGEOFF
	b	LBB0_52
LBB0_51:
Lloh77:
	adrp	x8, _svs@GOTPAGE
Lloh78:
	ldr	x8, [x8, _svs@GOTPAGEOFF]
Lloh79:
	ldr	x8, [x8, #8]
	sub	x8, x20, x8
	lsr	x8, x8, #3
	mov	w9, #35747
	movk	w9, #47662, lsl #16
	mul	w1, w8, w9
	ldr	x2, [x20, #80]
Lloh80:
	adrp	x0, l_.str.10@PAGE
Lloh81:
	add	x0, x0, l_.str.10@PAGEOFF
	bl	_Com_Printf
	ldr	x3, [x20, #80]
Lloh82:
	adrp	x2, l_.str.11@PAGE
Lloh83:
	add	x2, x2, l_.str.11@PAGEOFF
LBB0_52:
	add	x0, x19, #0
	mov	w1, #1024
	bl	_Com_sprintf
Lloh84:
	adrp	x8, _svc_download@GOTPAGE
Lloh85:
	ldr	x8, [x8, _svc_download@GOTPAGEOFF]
Lloh86:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_MSG_WriteByte
	mov	x0, x21
	mov	w1, #0
	bl	_MSG_WriteShort
	mov	x0, x21
	mov	w1, #-1
	bl	_MSG_WriteLong
	add	x1, x19, #0
	mov	x0, x21
	bl	_MSG_WriteString
	ldr	x8, [x20, #80]
	str	xzr, [x8]
	ldr	x0, [x20, #72]
	cbz	x0, LBB0_54
; %bb.53:
	bl	_FS_FCloseFile
LBB0_54:
	mov	w0, #1
LBB0_55:
	mov	sp, x26
	ldur	x8, [x29, #-96]
Lloh87:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh88:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh89:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_59
; %bb.56:
	sub	sp, x29, #80
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
LBB0_57:
Lloh90:
	adrp	x8, _BASEGAME@GOTPAGE
Lloh91:
	ldr	x8, [x8, _BASEGAME@GOTPAGEOFF]
Lloh92:
	ldr	w1, [x8]
Lloh93:
	adrp	x8, _NUM_ID_PAKS@GOTPAGE
Lloh94:
	ldr	x8, [x8, _NUM_ID_PAKS@GOTPAGEOFF]
Lloh95:
	ldr	w2, [x8]
	mov	x0, x23
	bl	_FS_idPak
	cmp	w0, #0
	cset	w28, ne
LBB0_58:
	mov	w9, #0
	mov	w8, #1
	b	LBB0_13
LBB0_59:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh37, Lloh38
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpAdd	Lloh42, Lloh43
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh44, Lloh45, Lloh46
	.loh AdrpLdrGot	Lloh47, Lloh48
	.loh AdrpLdrGotLdr	Lloh49, Lloh50, Lloh51
	.loh AdrpAdd	Lloh52, Lloh53
	.loh AdrpLdrGotLdr	Lloh54, Lloh55, Lloh56
	.loh AdrpLdrGotLdr	Lloh62, Lloh63, Lloh64
	.loh AdrpAdd	Lloh60, Lloh61
	.loh AdrpLdrGotLdr	Lloh57, Lloh58, Lloh59
	.loh AdrpAdd	Lloh65, Lloh66
	.loh AdrpAdd	Lloh67, Lloh68
	.loh AdrpLdrGotLdr	Lloh72, Lloh73, Lloh74
	.loh AdrpLdrGotLdr	Lloh69, Lloh70, Lloh71
	.loh AdrpAdd	Lloh75, Lloh76
	.loh AdrpAdd	Lloh82, Lloh83
	.loh AdrpAdd	Lloh80, Lloh81
	.loh AdrpLdrGotLdr	Lloh77, Lloh78, Lloh79
	.loh AdrpLdrGotLdr	Lloh84, Lloh85, Lloh86
	.loh AdrpLdrGotLdr	Lloh87, Lloh88, Lloh89
	.loh AdrpLdrGotLdr	Lloh93, Lloh94, Lloh95
	.loh AdrpLdrGotLdr	Lloh90, Lloh91, Lloh92
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_QPATH,4,2                  ; @MAX_QPATH
	.comm	_qfalse,8,3                     ; @qfalse
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s"

l_.str.1:                               ; @.str.1
	.asciz	"pk3"

	.comm	_BASETA,4,2                     ; @BASETA
	.comm	_NUM_TA_PAKS,4,2                ; @NUM_TA_PAKS
	.comm	_BASEGAME,4,2                   ; @BASEGAME
	.comm	_NUM_ID_PAKS,4,2                ; @NUM_ID_PAKS
	.comm	_sv_allowDownload,8,3           ; @sv_allowDownload
	.comm	_DLF_ENABLE,4,2                 ; @DLF_ENABLE
	.comm	_DLF_NO_UDP,4,2                 ; @DLF_NO_UDP
l_.str.2:                               ; @.str.2
	.asciz	"clientDownload: %d : \"%s\" is not referenced and cannot be downloaded.\n"

	.comm	_svs,16,3                       ; @svs
l_.str.3:                               ; @.str.3
	.asciz	"File \"%s\" is not referenced and cannot be downloaded."

l_.str.4:                               ; @.str.4
	.asciz	"clientDownload: %d : \"%s\" cannot download id pk3 files\n"

l_.str.5:                               ; @.str.5
	.asciz	"Cannot autodownload Team Arena file \"%s\"\nThe Team Arena mission pack can be found in your local game store."

l_.str.6:                               ; @.str.6
	.asciz	"Cannot autodownload id pk3 file \"%s\""

l_.str.7:                               ; @.str.7
	.asciz	"clientDownload: %d : \"%s\" download disabled\n"

	.comm	_sv_pure,8,3                    ; @sv_pure
l_.str.8:                               ; @.str.8
	.asciz	"Could not download \"%s\" because autodownloading is disabled on the server.\n\nYou will need to get this file elsewhere before you can connect to this pure server.\n"

l_.str.9:                               ; @.str.9
	.asciz	"Could not download \"%s\" because autodownloading is disabled on the server.\n\nThe server you are connecting to is not a pure server, set autodownload to No in your settings and you might be able to join the game anyway.\n"

l_.str.10:                              ; @.str.10
	.asciz	"clientDownload: %d : \"%s\" file not found on server\n"

l_.str.11:                              ; @.str.11
	.asciz	"File \"%s\" not found on server for autodownloading.\n"

	.comm	_svc_download,4,2               ; @svc_download
l_.str.12:                              ; @.str.12
	.asciz	"clientDownload: %d : beginning \"%s\"\n"

	.comm	_MAX_DOWNLOAD_WINDOW,8,3        ; @MAX_DOWNLOAD_WINDOW
	.comm	_MAX_DOWNLOAD_BLKSIZE,4,2       ; @MAX_DOWNLOAD_BLKSIZE
	.comm	_qtrue,8,3                      ; @qtrue
l_.str.13:                              ; @.str.13
	.asciz	"clientDownload: %d : writing block %d\n"

.subsections_via_symbols
