	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CIN_RunCinematic               ## -- Begin function CIN_RunCinematic
	.p2align	4, 0x90
_CIN_RunCinematic:                      ## @CIN_RunCinematic
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edi, %edi
	js	LBB0_7
## %bb.1:
	movq	_MAX_VIDEO_HANDLES@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_7
## %bb.2:
	movq	_cinTable@GOTPCREL(%rip), %r14
	movq	(%r14), %rcx
	movl	%edi, %r13d
	imulq	$56, %r13, %rbx
	movq	(%rcx,%rbx), %rax
	movq	_FMV_EOF@GOTPCREL(%rip), %r15
	movq	(%r15), %rdx
	cmpq	%rdx, %rax
	je	LBB0_8
## %bb.3:
	movq	_cin@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	je	LBB0_5
## %bb.4:
	addq	%rbx, %rcx
	movq	_currentHandle@GOTPCREL(%rip), %rsi
	movq	%r13, (%rsi)
	movl	%edi, (%rax)
	movq	%rdx, (%rcx)
	xorl	%eax, %eax
	callq	_RoQReset
	movq	(%r14), %rcx
LBB0_5:
	cmpl	$-2, 8(%rcx,%rbx)
	jle	LBB0_6
## %bb.9:
	movq	_currentHandle@GOTPCREL(%rip), %r12
	movq	%r13, (%r12)
	cmpq	$0, 48(%rcx,%rbx)
	je	LBB0_11
## %bb.10:
	movq	_cls@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_CA_CINEMATIC@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	jne	LBB0_6
LBB0_11:
	movq	(%rcx,%rbx), %rax
	movq	_FMV_IDLE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_8
## %bb.12:
	xorl	%eax, %eax
	callq	_CL_ScaledMilliseconds
	movq	_com_timescale@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imull	(%rcx), %eax
	movq	(%r14), %rdi
	imulq	$56, (%r12), %rcx
	cmpq	$0, 40(%rdi,%rcx)
	je	LBB0_15
## %bb.13:
	movl	%eax, %edx
	subl	12(%rdi,%rcx), %edx
	movl	%edx, %esi
	negl	%esi
	cmovsl	%edx, %esi
	cmpl	$101, %esi
	jb	LBB0_15
## %bb.14:
	addl	%edx, 16(%rdi,%rcx)
LBB0_15:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	xorl	%eax, %eax
	callq	_CL_ScaledMilliseconds
                                        ## kill: def $eax killed $eax def $rax
	movq	_com_timescale@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imull	(%rcx), %eax
	movq	(%r14), %rcx
	movq	(%r12), %rdx
	imulq	$56, %rdx, %rsi
	movl	16(%rcx,%rsi), %r13d
	subl	%r13d, %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rdi
	shrq	$63, %rdi
	sarq	$37, %rax
	addl	%edi, %eax
	movl	%eax, 20(%rcx,%rsi)
	cmpl	24(%rcx,%rsi), %eax
	jne	LBB0_22
LBB0_16:
	imulq	$56, %rdx, %rax
	movl	-44(%rbp), %esi                 ## 4-byte Reload
	movl	%esi, 12(%rcx,%rax)
	movq	(%rcx,%rax), %rsi
	movq	_FMV_LOOPED@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rsi
	jne	LBB0_18
## %bb.17:
	addq	%rcx, %rax
	movq	_FMV_PLAY@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movq	%rdx, (%rax)
	movq	(%r12), %rdx
	imulq	$56, %rdx, %rax
	movq	(%rcx,%rax), %rsi
LBB0_18:
	cmpq	(%r15), %rsi
	jne	LBB0_29
## %bb.19:
	imulq	$56, %rdx, %rax
	cmpq	$0, 32(%rcx,%rax)
	je	LBB0_28
## %bb.20:
	xorl	%eax, %eax
	callq	_RoQReset
	jmp	LBB0_29
LBB0_7:
	movq	_FMV_EOF@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_8
LBB0_6:
	movq	(%rcx,%rbx), %rax
	jmp	LBB0_8
LBB0_22:
	movq	_FMV_PLAY@GOTPCREL(%rip), %rbx
	jmp	LBB0_25
LBB0_23:                                ##   in Loop: Header=BB0_25 Depth=1
	xorl	%eax, %eax
	callq	_CL_ScaledMilliseconds
                                        ## kill: def $eax killed $eax def $rax
	movq	_com_timescale@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	imull	(%rcx), %eax
	movq	(%r14), %rcx
	movq	(%r12), %rdx
	imulq	$56, %rdx, %rsi
	movl	16(%rcx,%rsi), %r13d
	subl	%r13d, %eax
	leal	(%rax,%rax,2), %eax
	cltq
	imulq	$1374389535, %rax, %rax         ## imm = 0x51EB851F
	movq	%rax, %rdi
	shrq	$63, %rdi
	sarq	$37, %rax
	addl	%edi, %eax
	movl	%eax, 20(%rcx,%rsi)
LBB0_24:                                ##   in Loop: Header=BB0_25 Depth=1
	imulq	$56, %rdx, %rsi
	cmpl	24(%rcx,%rsi), %eax
	je	LBB0_16
LBB0_25:                                ## =>This Inner Loop Header: Depth=1
	imulq	$56, %rdx, %rax
	movq	(%rcx,%rax), %rax
	cmpq	(%rbx), %rax
	jne	LBB0_16
## %bb.26:                              ##   in Loop: Header=BB0_25 Depth=1
	xorl	%eax, %eax
	callq	_RoQInterrupt
	movq	(%r14), %rcx
	movq	(%r12), %rdx
	imulq	$56, %rdx, %rax
	cmpl	16(%rcx,%rax), %r13d
	jne	LBB0_23
## %bb.27:                              ##   in Loop: Header=BB0_25 Depth=1
	movl	20(%rcx,%rax), %eax
	jmp	LBB0_24
LBB0_28:
	xorl	%eax, %eax
	callq	_RoQShutdown
LBB0_29:
	movq	(%r14), %rax
	imulq	$56, (%r12), %rcx
	movq	(%rax,%rcx), %rax
LBB0_8:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_VIDEO_HANDLES,4,2          ## @MAX_VIDEO_HANDLES
	.comm	_cinTable,8,3                   ## @cinTable
	.comm	_FMV_EOF,8,3                    ## @FMV_EOF
	.comm	_cin,4,2                        ## @cin
	.comm	_currentHandle,8,3              ## @currentHandle
	.comm	_cls,8,3                        ## @cls
	.comm	_CA_CINEMATIC,8,3               ## @CA_CINEMATIC
	.comm	_FMV_IDLE,8,3                   ## @FMV_IDLE
	.comm	_com_timescale,8,3              ## @com_timescale
	.comm	_FMV_PLAY,8,3                   ## @FMV_PLAY
	.comm	_FMV_LOOPED,8,3                 ## @FMV_LOOPED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CIN_RunCinematic               ; -- Begin function CIN_RunCinematic
	.p2align	2
_CIN_RunCinematic:                      ; @CIN_RunCinematic
	.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
	tbnz	w0, #31, LBB0_18
; %bb.1:
Lloh0:
	adrp	x8, _MAX_VIDEO_HANDLES@GOTPAGE
Lloh1:
	ldr	x8, [x8, _MAX_VIDEO_HANDLES@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	cmp	w8, w0
	b.le	LBB0_18
; %bb.2:
Lloh3:
	adrp	x19, _cinTable@GOTPAGE
Lloh4:
	ldr	x19, [x19, _cinTable@GOTPAGEOFF]
	ldr	x9, [x19]
	mov	w8, #56
	umaddl	x10, w0, w8, x9
	ldr	x8, [x10]
Lloh5:
	adrp	x21, _FMV_EOF@GOTPAGE
Lloh6:
	ldr	x21, [x21, _FMV_EOF@GOTPAGEOFF]
	ldr	x11, [x21]
	cmp	x8, x11
	b.eq	LBB0_28
; %bb.3:
	mov	w22, w0
Lloh7:
	adrp	x8, _cin@GOTPAGE
Lloh8:
	ldr	x8, [x8, _cin@GOTPAGEOFF]
	ldr	w12, [x8]
Lloh9:
	adrp	x20, _currentHandle@GOTPAGE
Lloh10:
	ldr	x20, [x20, _currentHandle@GOTPAGEOFF]
	cmp	w12, w0
	b.eq	LBB0_5
; %bb.4:
	str	x22, [x20]
	str	w0, [x8]
	str	x11, [x10]
	bl	_RoQReset
	ldr	x9, [x19]
LBB0_5:
	mov	w8, #56
	madd	x8, x22, x8, x9
	ldr	w8, [x8, #8]
	cmn	w8, #2
	b.le	LBB0_19
; %bb.6:
	str	x22, [x20]
	mov	w8, #56
	madd	x8, x22, x8, x9
	ldr	x8, [x8, #48]
	cbz	x8, LBB0_8
; %bb.7:
Lloh11:
	adrp	x8, _cls@GOTPAGE
Lloh12:
	ldr	x8, [x8, _cls@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
Lloh14:
	adrp	x10, _CA_CINEMATIC@GOTPAGE
Lloh15:
	ldr	x10, [x10, _CA_CINEMATIC@GOTPAGEOFF]
Lloh16:
	ldr	x10, [x10]
	cmp	x8, x10
	b.ne	LBB0_19
LBB0_8:
	mov	w8, #56
	mul	x8, x22, x8
	ldr	x8, [x9, x8]
Lloh17:
	adrp	x9, _FMV_IDLE@GOTPAGE
Lloh18:
	ldr	x9, [x9, _FMV_IDLE@GOTPAGEOFF]
Lloh19:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_28
; %bb.9:
	bl	_CL_ScaledMilliseconds
Lloh20:
	adrp	x23, _com_timescale@GOTPAGE
Lloh21:
	ldr	x23, [x23, _com_timescale@GOTPAGEOFF]
	ldr	x8, [x23]
	ldr	w8, [x8]
	mul	w22, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	mov	w10, #56
	madd	x10, x9, x10, x8
	ldr	x10, [x10, #40]
	cbz	x10, LBB0_12
; %bb.10:
	mov	w10, #56
	madd	x10, x9, x10, x8
	ldr	w10, [x10, #12]
	subs	w10, w22, w10
	cneg	w11, w10, mi
	cmp	w11, #101
	b.lo	LBB0_12
; %bb.11:
	mov	w11, #56
	madd	x8, x9, x11, x8
	ldr	w9, [x8, #16]
	add	w9, w9, w10
	str	w9, [x8, #16]
LBB0_12:
	bl	_CL_ScaledMilliseconds
	ldr	x8, [x23]
	ldr	w8, [x8]
	mul	w10, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	mov	w11, #56
	madd	x11, x9, x11, x8
	ldr	w26, [x11, #16]
	sub	w10, w10, w26
	add	w10, w10, w10, lsl #1
	mov	w25, #34079
	movk	w25, #20971, lsl #16
	smull	x10, w10, w25
	lsr	x12, x10, #63
	asr	x10, x10, #37
	ldr	w13, [x11, #24]
	add	w10, w10, w12
	cmp	w10, w13
	str	w10, [x11, #20]
Lloh22:
	adrp	x24, _FMV_PLAY@GOTPAGE
Lloh23:
	ldr	x24, [x24, _FMV_PLAY@GOTPAGEOFF]
	b.ne	LBB0_20
LBB0_13:
	mov	w10, #56
	madd	x11, x9, x10, x8
	str	w22, [x11, #12]
	ldr	x10, [x11]
Lloh24:
	adrp	x12, _FMV_LOOPED@GOTPAGE
Lloh25:
	ldr	x12, [x12, _FMV_LOOPED@GOTPAGEOFF]
Lloh26:
	ldr	x12, [x12]
	cmp	x10, x12
	b.ne	LBB0_15
; %bb.14:
	ldr	x9, [x24]
	str	x9, [x11]
	ldr	x9, [x20]
	mov	w10, #56
	mul	x10, x9, x10
	ldr	x10, [x8, x10]
LBB0_15:
	ldr	x11, [x21]
	cmp	x10, x11
	b.ne	LBB0_27
; %bb.16:
	mov	w10, #56
	madd	x8, x9, x10, x8
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_26
; %bb.17:
	bl	_RoQReset
	b	LBB0_27
LBB0_18:
Lloh27:
	adrp	x8, _FMV_EOF@GOTPAGE
Lloh28:
	ldr	x8, [x8, _FMV_EOF@GOTPAGEOFF]
Lloh29:
	ldr	x8, [x8]
	b	LBB0_28
LBB0_19:
	mov	w8, #56
	mul	x8, x22, x8
	ldr	x8, [x9, x8]
	b	LBB0_28
LBB0_20:
	mov	w27, #56
	b	LBB0_23
LBB0_21:                                ;   in Loop: Header=BB0_23 Depth=1
	bl	_CL_ScaledMilliseconds
	ldr	x8, [x23]
	ldr	w8, [x8]
	mul	w10, w8, w0
	ldr	x8, [x19]
	ldr	x9, [x20]
	madd	x11, x9, x27, x8
	ldr	w26, [x11, #16]
	sub	w10, w10, w26
	add	w10, w10, w10, lsl #1
	smull	x10, w10, w25
	lsr	x12, x10, #63
	asr	x10, x10, #37
	add	w10, w10, w12
	str	w10, [x11, #20]
LBB0_22:                                ;   in Loop: Header=BB0_23 Depth=1
	madd	x11, x9, x27, x8
	ldr	w11, [x11, #24]
	cmp	w10, w11
	b.eq	LBB0_13
LBB0_23:                                ; =>This Inner Loop Header: Depth=1
	mul	x10, x9, x27
	ldr	x10, [x8, x10]
	ldr	x11, [x24]
	cmp	x10, x11
	b.ne	LBB0_13
; %bb.24:                               ;   in Loop: Header=BB0_23 Depth=1
	bl	_RoQInterrupt
	ldr	x8, [x19]
	ldr	x9, [x20]
	madd	x10, x9, x27, x8
	ldr	w10, [x10, #16]
	cmp	w26, w10
	b.ne	LBB0_21
; %bb.25:                               ;   in Loop: Header=BB0_23 Depth=1
	madd	x10, x9, x27, x8
	ldr	w10, [x10, #20]
	b	LBB0_22
LBB0_26:
	bl	_RoQShutdown
LBB0_27:
	ldr	x8, [x19]
	ldr	x9, [x20]
	mov	w10, #56
	mul	x9, x9, x10
	ldr	x8, [x8, x9]
LBB0_28:
	mov	x0, x8
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_VIDEO_HANDLES,4,2          ; @MAX_VIDEO_HANDLES
	.comm	_cinTable,8,3                   ; @cinTable
	.comm	_FMV_EOF,8,3                    ; @FMV_EOF
	.comm	_cin,4,2                        ; @cin
	.comm	_currentHandle,8,3              ; @currentHandle
	.comm	_cls,8,3                        ; @cls
	.comm	_CA_CINEMATIC,8,3               ; @CA_CINEMATIC
	.comm	_FMV_IDLE,8,3                   ; @FMV_IDLE
	.comm	_com_timescale,8,3              ; @com_timescale
	.comm	_FMV_PLAY,8,3                   ; @FMV_PLAY
	.comm	_FMV_LOOPED,8,3                 ; @FMV_LOOPED
.subsections_via_symbols
