	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_PlayDemo_f                  ## -- Begin function CL_PlayDemo_f
	.p2align	4, 0x90
_CL_PlayDemo_f:                         ## @CL_PlayDemo_f
	.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	$40, %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	_MAX_OSPATH@GOTPCREL(%rip), %rax
	movl	(%rax), %r12d
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r15
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %r14
	movq	%r12, %rax
	callq	____chkstk_darwin
	addq	$15, %rax
	andq	$-16, %rax
	subq	%rax, %rsp
	movq	%rsp, %rbx
	xorl	%eax, %eax
	callq	_Cmd_Argc
	cmpl	$2, %eax
	jne	LBB0_1
## %bb.3:
	movq	%rbx, -72(%rbp)                 ## 8-byte Spill
	leaq	L_.str.1(%rip), %rdi
	leaq	L_.str.2(%rip), %rsi
	callq	_Cvar_Set
	movl	$1, %edi
	callq	_Cmd_Argv
	movq	%r14, %rdi
	movq	%rax, %rsi
	movl	%r12d, %edx
	callq	_Q_strncpyz
	movq	_qtrue@GOTPCREL(%rip), %r13
	movq	(%r13), %rdi
	callq	_CL_Disconnect
	movq	%r14, %rdi
	movl	$46, %esi
	callq	_strrchr
	testq	%rax, %rax
	movq	%r14, -64(%rbp)                 ## 8-byte Spill
	je	LBB0_14
## %bb.4:
	movq	%r15, %r13
	leaq	1(%rax), %r15
	movq	_DEMOEXT@GOTPCREL(%rip), %rbx
	movq	(%rbx), %r14
	movq	%r14, %rdi
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	callq	_ARRAY_LEN
                                        ## kill: def $eax killed $eax def $rax
	leal	-1(%rax), %edx
	movq	%r15, %rdi
	movq	%r13, %r15
	movq	_qtrue@GOTPCREL(%rip), %r13
	movq	%r14, %rsi
	movq	-64(%rbp), %r14                 ## 8-byte Reload
	callq	_Q_stricmpn
	testl	%eax, %eax
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	je	LBB0_5
LBB0_14:
	movq	_clc@GOTPCREL(%rip), %rdx
	addq	$48, %rdx
	movq	%r14, %rdi
LBB0_15:
	movq	%r15, %rsi
	callq	_CL_WalkDemoExt
LBB0_16:
	movq	_clc@GOTPCREL(%rip), %r14
	cmpl	$0, 48(%r14)
	je	LBB0_17
## %bb.18:
	movq	(%r14), %rdi
	movq	-64(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_Q_strncpyz
	xorl	%eax, %eax
	callq	_Con_Close
	movq	_CA_CONNECTED@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	%rax, 8(%r14)
	movq	(%r13), %rax
	movq	%rax, 40(%r14)
	movq	16(%r14), %rdi
	movq	%rbx, %rsi
	movl	$8, %edx
	callq	_Q_strncpyz
	movq	8(%r14), %rax
	cmpq	(%r15), %rax
	jl	LBB0_22
## %bb.19:
	movq	_CA_PRIMED@GOTPCREL(%rip), %rbx
	.p2align	4, 0x90
LBB0_20:                                ## =>This Inner Loop Header: Depth=1
	cmpq	(%rbx), %rax
	jge	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_20 Depth=1
	xorl	%eax, %eax
	callq	_CL_ReadDemoMessage
	movq	8(%r14), %rax
	cmpq	(%r15), %rax
	jge	LBB0_20
LBB0_22:
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 24(%r14)
	jmp	LBB0_23
LBB0_1:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.2:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_Com_Printf                     ## TAILCALL
LBB0_17:
	movq	_ERR_DROP@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str.5(%rip), %rsi
	movq	%r15, %rdx
	callq	_Com_Error
LBB0_23:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_25
## %bb.24:
	leaq	-40(%rbp), %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	(%rbx), %rdi
	movq	%rax, %rbx
	callq	_ARRAY_LEN
	movslq	%eax, %rdi
	addq	%rbx, %rdi
	callq	_atoi
	movq	_demo_protocols@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%rcx), %edx
	testl	%edx, %edx
	je	LBB0_8
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=1
	addq	$4, %rcx
	cmpl	%eax, %edx
	jne	LBB0_6
LBB0_8:
	testl	%edx, %edx
	jne	LBB0_10
## %bb.9:
	movq	_com_protocol@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpl	(%rcx), %eax
	jne	LBB0_11
LBB0_10:
	leaq	L_.str.3(%rip), %rdx
	movq	%r15, %rdi
	movl	%r12d, %esi
	movq	%r14, %rcx
	callq	_Com_sprintf
	movq	(%r13), %rdx
	movq	_clc@GOTPCREL(%rip), %rsi
	addq	$48, %rsi
	movq	%r15, %rdi
	callq	_FS_FOpenFileRead
	jmp	LBB0_16
LBB0_11:
	leaq	L_.str.4(%rip), %rdi
	movl	%eax, %esi
	xorl	%eax, %eax
	callq	_Com_Printf
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	subl	%r14d, %ebx
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	movq	%r12, %rdi
	callq	_ARRAY_LEN
	cmpl	%ebx, %eax
	movq	%rbx, %rax
	jg	LBB0_13
## %bb.12:
	movq	%r12, %rdi
	callq	_ARRAY_LEN
                                        ## kill: def $eax killed $eax def $rax
	decl	%eax
LBB0_13:
	leal	1(%rax), %edx
	movq	%r12, %rdi
	movq	%r14, %rsi
	movq	%rax, %rbx
	callq	_Q_strncpyz
	movslq	%ebx, %rax
	movb	$0, (%r12,%rax)
	movq	_clc@GOTPCREL(%rip), %rdx
	addq	$48, %rdx
	movq	%r12, %rdi
	jmp	LBB0_15
LBB0_25:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_OSPATH,4,2                 ## @MAX_OSPATH
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"demo <demoname>\n"

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

L_.str.2:                               ## @.str.2
	.asciz	"2"

	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_DEMOEXT,8,3                    ## @DEMOEXT
	.comm	_demo_protocols,8,3             ## @demo_protocols
	.comm	_com_protocol,8,3               ## @com_protocol
L_.str.3:                               ## @.str.3
	.asciz	"demos/%s"

	.comm	_clc,56,3                       ## @clc
L_.str.4:                               ## @.str.4
	.asciz	"Protocol %d not supported for demos\n"

	.comm	_ERR_DROP,4,2                   ## @ERR_DROP
L_.str.5:                               ## @.str.5
	.asciz	"couldn't open %s"

	.comm	_CA_CONNECTED,8,3               ## @CA_CONNECTED
	.comm	_CA_PRIMED,8,3                  ## @CA_PRIMED
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_com_legacyprotocol,8,3         ## @com_legacyprotocol
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_PlayDemo_f                  ; -- Begin function CL_PlayDemo_f
	.p2align	2
_CL_PlayDemo_f:                         ; @CL_PlayDemo_f
	.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, #16
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-88]
Lloh3:
	adrp	x8, _MAX_OSPATH@GOTPAGE
Lloh4:
	ldr	x8, [x8, _MAX_OSPATH@GOTPAGEOFF]
Lloh5:
	ldr	w22, [x8]
	mov	x9, x22
Lloh6:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh7:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	add	x9, x22, #15
	and	x12, x9, #0x1fffffff0
	sub	x20, x8, x12
	mov	sp, x20
	mov	x9, x22
Lloh8:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh9:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x19, x8, x12
	mov	sp, x19
	mov	x9, x22
Lloh10:
	adrp	x16, ___chkstk_darwin@GOTPAGE
Lloh11:
	ldr	x16, [x16, ___chkstk_darwin@GOTPAGEOFF]
	blr	x16
	mov	x8, sp
	sub	x21, x8, x12
	mov	sp, x21
	bl	_Cmd_Argc
	cmp	w0, #2
	b.ne	LBB0_8
; %bb.1:
Lloh12:
	adrp	x0, l_.str.1@PAGE
Lloh13:
	add	x0, x0, l_.str.1@PAGEOFF
Lloh14:
	adrp	x1, l_.str.2@PAGE
Lloh15:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_Cvar_Set
	mov	w0, #1
	bl	_Cmd_Argv
	mov	x1, x0
	mov	x0, x19
	mov	x2, x22
	bl	_Q_strncpyz
Lloh16:
	adrp	x27, _qtrue@GOTPAGE
Lloh17:
	ldr	x27, [x27, _qtrue@GOTPAGEOFF]
	ldr	x0, [x27]
	bl	_CL_Disconnect
	mov	x0, x19
	mov	w1, #46
	bl	_strrchr
Lloh18:
	adrp	x26, _clc@GOTPAGE
Lloh19:
	ldr	x26, [x26, _clc@GOTPAGEOFF]
	cbz	x0, LBB0_3
; %bb.2:
	mov	x23, x0
	add	x24, x0, #1
Lloh20:
	adrp	x28, _DEMOEXT@GOTPAGE
Lloh21:
	ldr	x28, [x28, _DEMOEXT@GOTPAGEOFF]
	ldr	x25, [x28]
	mov	x0, x25
	bl	_ARRAY_LEN
	sub	w2, w0, #1
	mov	x0, x24
	mov	x1, x25
	bl	_Q_stricmpn
	cbz	w0, LBB0_11
LBB0_3:
	add	x2, x26, #48
	mov	x0, x19
LBB0_4:
	mov	x1, x20
	bl	_CL_WalkDemoExt
	ldr	w8, [x26, #48]
	cbz	w8, LBB0_16
LBB0_5:
	ldr	x0, [x26]
	mov	x1, x19
	mov	w2, #8
	bl	_Q_strncpyz
	bl	_Con_Close
Lloh22:
	adrp	x20, _CA_CONNECTED@GOTPAGE
Lloh23:
	ldr	x20, [x20, _CA_CONNECTED@GOTPAGEOFF]
	ldr	x8, [x20]
	str	x8, [x26, #8]
	ldr	x8, [x27]
	str	x8, [x26, #40]
	ldr	x0, [x26, #16]
	mov	x1, x19
	mov	w2, #8
	bl	_Q_strncpyz
	ldr	x8, [x26, #8]
	ldr	x9, [x20]
Lloh24:
	adrp	x19, _CA_PRIMED@GOTPAGE
Lloh25:
	ldr	x19, [x19, _CA_PRIMED@GOTPAGEOFF]
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x19]
	cmp	x8, x9
	ccmp	x8, x10, #0, ge
	b.ge	LBB0_10
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=1
	bl	_CL_ReadDemoMessage
	ldr	x8, [x26, #8]
	ldr	x9, [x20]
	b	LBB0_6
LBB0_8:
	ldur	x8, [x29, #-88]
Lloh26:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh27:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.9:
Lloh29:
	adrp	x0, l_.str@PAGE
Lloh30:
	add	x0, x0, l_.str@PAGEOFF
	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
	b	_Com_Printf
LBB0_10:
Lloh31:
	adrp	x8, _qfalse@GOTPAGE
Lloh32:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh33:
	ldr	x8, [x8]
	str	x8, [x26, #24]
	b	LBB0_17
LBB0_11:
	ldr	x0, [x28]
	bl	_ARRAY_LEN
	add	x0, x23, w0, sxtw
	bl	_atoi
                                        ; kill: def $w0 killed $w0 def $x0
Lloh34:
	adrp	x8, _demo_protocols@GOTPAGE
Lloh35:
	ldr	x8, [x8, _demo_protocols@GOTPAGEOFF]
Lloh36:
	ldr	x8, [x8]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	ldr	w9, [x8], #4
	cmp	w9, #0
	ccmp	w9, w0, #4, ne
	b.ne	LBB0_12
; %bb.13:
	cbnz	w9, LBB0_15
; %bb.14:
Lloh37:
	adrp	x8, _com_protocol@GOTPAGE
Lloh38:
	ldr	x8, [x8, _com_protocol@GOTPAGEOFF]
Lloh39:
	ldr	x8, [x8]
	ldr	w8, [x8]
	cmp	w0, w8
	b.ne	LBB0_19
LBB0_15:
Lloh40:
	adrp	x2, l_.str.3@PAGE
Lloh41:
	add	x2, x2, l_.str.3@PAGEOFF
	mov	x0, x20
	mov	x1, x22
	mov	x3, x19
	bl	_Com_sprintf
	ldr	x2, [x27]
	add	x1, x26, #48
	mov	x0, x20
	bl	_FS_FOpenFileRead
	ldr	w8, [x26, #48]
	cbnz	w8, LBB0_5
LBB0_16:
Lloh42:
	adrp	x8, _ERR_DROP@GOTPAGE
Lloh43:
	ldr	x8, [x8, _ERR_DROP@GOTPAGEOFF]
Lloh44:
	ldr	w0, [x8]
Lloh45:
	adrp	x1, l_.str.5@PAGE
Lloh46:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x20
	bl	_Com_Error
LBB0_17:
	ldur	x8, [x29, #-88]
Lloh47:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh48:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh49:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_22
; %bb.18:
	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_19:
	str	x0, [sp, #-16]!
Lloh50:
	adrp	x0, l_.str.4@PAGE
Lloh51:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_Com_Printf
	add	sp, sp, #16
	sub	w22, w23, w19
	mov	x0, x21
	bl	_ARRAY_LEN
	cmp	w0, w22
	b.gt	LBB0_21
; %bb.20:
	mov	x0, x21
	bl	_ARRAY_LEN
	sub	w22, w0, #1
LBB0_21:
	add	w2, w22, #1
	mov	x0, x21
	mov	x1, x19
	bl	_Q_strncpyz
	strb	wzr, [x21, w22, sxtw]
	add	x2, x26, #48
	mov	x0, x21
	b	LBB0_4
LBB0_22:
	bl	___stack_chk_fail
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh34, Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh47, Lloh48, Lloh49
	.loh AdrpAdd	Lloh50, Lloh51
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_OSPATH,4,2                 ; @MAX_OSPATH
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"demo <demoname>\n"

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

l_.str.2:                               ; @.str.2
	.asciz	"2"

	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_DEMOEXT,8,3                    ; @DEMOEXT
	.comm	_demo_protocols,8,3             ; @demo_protocols
	.comm	_com_protocol,8,3               ; @com_protocol
l_.str.3:                               ; @.str.3
	.asciz	"demos/%s"

	.comm	_clc,56,3                       ; @clc
l_.str.4:                               ; @.str.4
	.asciz	"Protocol %d not supported for demos\n"

	.comm	_ERR_DROP,4,2                   ; @ERR_DROP
l_.str.5:                               ; @.str.5
	.asciz	"couldn't open %s"

	.comm	_CA_CONNECTED,8,3               ; @CA_CONNECTED
	.comm	_CA_PRIMED,8,3                  ; @CA_PRIMED
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_com_legacyprotocol,8,3         ; @com_legacyprotocol
.subsections_via_symbols
