	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_PlayCinematic_f             ## -- Begin function CL_PlayCinematic_f
	.p2align	4, 0x90
_CL_PlayCinematic_f:                    ## @CL_PlayCinematic_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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	_CIN_system@GOTPCREL(%rip), %rax
	movl	(%rax), %r15d
	leaq	L_.str(%rip), %rdi
	callq	_Com_DPrintf
	movq	_clc@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CA_CINEMATIC@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	_SCR_StopCinematic
LBB0_2:
	movl	$1, %edi
	callq	_Cmd_Argv
	movq	%rax, %r14
	movl	$2, %edi
	callq	_Cmd_Argv
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	cmpb	$49, (%rbx)
	je	LBB0_6
LBB0_4:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_Q_stricmp
	testq	%rax, %rax
	je	LBB0_6
## %bb.5:
	leaq	L_.str.2(%rip), %rsi
	movq	%r14, %rdi
	callq	_Q_stricmp
	testq	%rax, %rax
	jne	LBB0_7
LBB0_6:
	movq	_CIN_hold@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_7:
	testq	%rbx, %rbx
	je	LBB0_10
## %bb.8:
	cmpb	$50, (%rbx)
	jne	LBB0_10
## %bb.9:
	movq	_CIN_loop@GOTPCREL(%rip), %rax
	orl	(%rax), %r15d
LBB0_10:
	xorl	%eax, %eax
	callq	_S_StopAllSounds
	movq	_SCREEN_WIDTH@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_SCREEN_HEIGHT@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movq	%r14, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	movl	%r15d, %r9d
	callq	_CIN_PlayCinematic
	movq	_CL_handle@GOTPCREL(%rip), %rcx
	movq	%rax, (%rcx)
	testq	%rax, %rax
	js	LBB0_14
## %bb.11:
	movq	_cinTable@GOTPCREL(%rip), %r14
	movq	_currentHandle@GOTPCREL(%rip), %rbx
	movq	_FMV_PLAY@GOTPCREL(%rip), %r15
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	xorl	%eax, %eax
	callq	_SCR_RunCinematic
	movq	(%r14), %rax
	movq	(%rbx), %rcx
	shlq	$4, %rcx
	cmpq	$0, 8(%rax,%rcx)
	jne	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%rax,%rcx), %rax
	cmpq	(%r15), %rax
	je	LBB0_12
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CIN_system,4,2                 ## @CIN_system
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"CL_PlayCinematic_f\n"

	.comm	_clc,8,3                        ## @clc
	.comm	_CA_CINEMATIC,8,3               ## @CA_CINEMATIC
L_.str.1:                               ## @.str.1
	.asciz	"demoend.roq"

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

	.comm	_CIN_hold,4,2                   ## @CIN_hold
	.comm	_CIN_loop,4,2                   ## @CIN_loop
	.comm	_SCREEN_WIDTH,4,2               ## @SCREEN_WIDTH
	.comm	_SCREEN_HEIGHT,4,2              ## @SCREEN_HEIGHT
	.comm	_CL_handle,8,3                  ## @CL_handle
	.comm	_cinTable,8,3                   ## @cinTable
	.comm	_currentHandle,8,3              ## @currentHandle
	.comm	_FMV_PLAY,8,3                   ## @FMV_PLAY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CL_PlayCinematic_f             ; -- Begin function CL_PlayCinematic_f
	.p2align	2
_CL_PlayCinematic_f:                    ; @CL_PlayCinematic_f
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
Lloh0:
	adrp	x8, _CIN_system@GOTPAGE
Lloh1:
	ldr	x8, [x8, _CIN_system@GOTPAGEOFF]
Lloh2:
	ldr	w19, [x8]
Lloh3:
	adrp	x0, l_.str@PAGE
Lloh4:
	add	x0, x0, l_.str@PAGEOFF
	bl	_Com_DPrintf
Lloh5:
	adrp	x8, _clc@GOTPAGE
Lloh6:
	ldr	x8, [x8, _clc@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
Lloh8:
	adrp	x9, _CA_CINEMATIC@GOTPAGE
Lloh9:
	ldr	x9, [x9, _CA_CINEMATIC@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_2
; %bb.1:
	bl	_SCR_StopCinematic
LBB0_2:
	mov	w0, #1
	bl	_Cmd_Argv
	mov	x20, x0
	mov	w0, #2
	bl	_Cmd_Argv
	mov	x21, x0
	cbz	x0, LBB0_4
; %bb.3:
	ldrb	w8, [x21]
	cmp	w8, #49
	b.eq	LBB0_6
LBB0_4:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_Q_stricmp
	cbz	x0, LBB0_6
; %bb.5:
Lloh13:
	adrp	x1, l_.str.2@PAGE
Lloh14:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_Q_stricmp
	cbnz	x0, LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _CIN_hold@GOTPAGE
Lloh16:
	ldr	x8, [x8, _CIN_hold@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	orr	w19, w8, w19
LBB0_7:
	cbz	x21, LBB0_10
; %bb.8:
	ldrb	w8, [x21]
	cmp	w8, #50
	b.ne	LBB0_10
; %bb.9:
Lloh18:
	adrp	x8, _CIN_loop@GOTPAGE
Lloh19:
	ldr	x8, [x8, _CIN_loop@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	orr	w19, w8, w19
LBB0_10:
	bl	_S_StopAllSounds
Lloh21:
	adrp	x8, _SCREEN_WIDTH@GOTPAGE
Lloh22:
	ldr	x8, [x8, _SCREEN_WIDTH@GOTPAGEOFF]
Lloh23:
	ldr	w3, [x8]
Lloh24:
	adrp	x8, _SCREEN_HEIGHT@GOTPAGE
Lloh25:
	ldr	x8, [x8, _SCREEN_HEIGHT@GOTPAGEOFF]
Lloh26:
	ldr	w4, [x8]
	mov	x0, x20
	mov	w1, #0
	mov	w2, #0
	mov	x5, x19
	bl	_CIN_PlayCinematic
Lloh27:
	adrp	x8, _CL_handle@GOTPAGE
Lloh28:
	ldr	x8, [x8, _CL_handle@GOTPAGEOFF]
Lloh29:
	str	x0, [x8]
	tbnz	x0, #63, LBB0_14
; %bb.11:
Lloh30:
	adrp	x19, _cinTable@GOTPAGE
Lloh31:
	ldr	x19, [x19, _cinTable@GOTPAGEOFF]
Lloh32:
	adrp	x20, _currentHandle@GOTPAGE
Lloh33:
	ldr	x20, [x20, _currentHandle@GOTPAGEOFF]
Lloh34:
	adrp	x21, _FMV_PLAY@GOTPAGE
Lloh35:
	ldr	x21, [x21, _FMV_PLAY@GOTPAGEOFF]
LBB0_12:                                ; =>This Inner Loop Header: Depth=1
	bl	_SCR_RunCinematic
	ldr	x8, [x19]
	ldr	x9, [x20]
	add	x10, x8, x9, lsl #4
	ldr	x10, [x10, #8]
	cbnz	x10, LBB0_14
; %bb.13:                               ;   in Loop: Header=BB0_12 Depth=1
	lsl	x9, x9, #4
	ldr	x8, [x8, x9]
	ldr	x9, [x21]
	cmp	x8, x9
	b.eq	LBB0_12
LBB0_14:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotStr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh32, Lloh33
	.loh AdrpLdrGot	Lloh30, Lloh31
	.cfi_endproc
                                        ; -- End function
	.comm	_CIN_system,4,2                 ; @CIN_system
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"CL_PlayCinematic_f\n"

	.comm	_clc,8,3                        ; @clc
	.comm	_CA_CINEMATIC,8,3               ; @CA_CINEMATIC
l_.str.1:                               ; @.str.1
	.asciz	"demoend.roq"

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

	.comm	_CIN_hold,4,2                   ; @CIN_hold
	.comm	_CIN_loop,4,2                   ; @CIN_loop
	.comm	_SCREEN_WIDTH,4,2               ; @SCREEN_WIDTH
	.comm	_SCREEN_HEIGHT,4,2              ; @SCREEN_HEIGHT
	.comm	_CL_handle,8,3                  ; @CL_handle
	.comm	_cinTable,8,3                   ; @cinTable
	.comm	_currentHandle,8,3              ; @currentHandle
	.comm	_FMV_PLAY,8,3                   ; @FMV_PLAY
.subsections_via_symbols
