	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CIN_DrawCinematic              ## -- Begin function CIN_DrawCinematic
	.p2align	4, 0x90
_CIN_DrawCinematic:                     ## @CIN_DrawCinematic
	.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	%r12
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edi, %edi
	js	LBB0_10
## %bb.1:
	movl	%edi, %ebx
	movq	_MAX_VIDEO_HANDLES@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_10
## %bb.2:
	movq	_cinTable@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movl	%ebx, %ecx
	imulq	$56, %rcx, %r12
	movq	(%rax,%r12), %rcx
	movq	_FMV_EOF@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	je	LBB0_10
## %bb.3:
	movq	48(%rax,%r12), %r14
	testq	%r14, %r14
	je	LBB0_10
## %bb.4:
	movss	8(%rax,%r12), %xmm0             ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -48(%rbp)
	movss	12(%rax,%r12), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -44(%rbp)
	movss	16(%rax,%r12), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -40(%rbp)
	movss	20(%rax,%r12), %xmm0            ## xmm0 = mem[0],zero,zero,zero
	movss	%xmm0, -36(%rbp)
	leaq	-48(%rbp), %rdi
	leaq	-44(%rbp), %rsi
	leaq	-40(%rbp), %rdx
	leaq	-36(%rbp), %rcx
	callq	_SCR_AdjustFrom640
	movq	(%r15), %rax
	movq	40(%rax,%r12), %r8
	testq	%r8, %r8
	je	LBB0_5
## %bb.7:
	movl	24(%rax,%r12), %edi
	cmpl	28(%rax,%r12), %edi
	jne	LBB0_9
## %bb.8:
	movl	32(%rax,%r12), %esi
	cmpl	36(%rax,%r12), %esi
	je	LBB0_6
LBB0_9:
	movl	$262144, %edi                   ## imm = 0x40000
	callq	_Hunk_AllocateTempMemory
	movq	%rax, %r14
	movl	%ebx, %edi
	movq	%rax, %rsi
	callq	_CIN_ResampleCinematic
	movq	_re@GOTPCREL(%rip), %rax
	movss	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	movss	-40(%rbp), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	movss	-36(%rbp), %xmm3                ## xmm3 = mem[0],zero,zero,zero
	movq	_qtrue@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r8
	movl	$256, %edi                      ## imm = 0x100
	movl	$256, %esi                      ## imm = 0x100
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	*(%rax)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movq	%rax, 40(%rcx,%r12)
	movq	%r14, %rdi
	callq	_Hunk_FreeTempMemory
	jmp	LBB0_10
LBB0_5:
	movl	28(%rax,%r12), %edi
	movl	36(%rax,%r12), %esi
LBB0_6:
	movq	_re@GOTPCREL(%rip), %rax
	movss	-48(%rbp), %xmm0                ## xmm0 = mem[0],zero,zero,zero
	movss	-44(%rbp), %xmm1                ## xmm1 = mem[0],zero,zero,zero
	movss	-40(%rbp), %xmm2                ## xmm2 = mem[0],zero,zero,zero
	movss	-36(%rbp), %xmm3                ## xmm3 = mem[0],zero,zero,zero
	movq	%r14, %rdx
	movl	%ebx, %ecx
	callq	*(%rax)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r15), %rcx
	movq	%rax, 40(%rcx,%r12)
LBB0_10:
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	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	_re,8,3                         ## @re
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_qfalse,8,3                     ## @qfalse
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CIN_DrawCinematic              ; -- Begin function CIN_DrawCinematic
	.p2align	2
_CIN_DrawCinematic:                     ; @CIN_DrawCinematic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	tbnz	w0, #31, LBB0_10
; %bb.1:
	mov	x19, x0
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_10
; %bb.2:
Lloh3:
	adrp	x21, _cinTable@GOTPAGE
Lloh4:
	ldr	x21, [x21, _cinTable@GOTPAGEOFF]
	ldr	x8, [x21]
	mov	w9, #56
	umull	x9, w19, w9
	ldr	x9, [x8, x9]
Lloh5:
	adrp	x10, _FMV_EOF@GOTPAGE
Lloh6:
	ldr	x10, [x10, _FMV_EOF@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x9, x10
	b.eq	LBB0_10
; %bb.3:
	mov	w22, w19
	mov	w9, #56
	madd	x9, x22, x9, x8
	ldr	x20, [x9, #48]
	cbz	x20, LBB0_10
; %bb.4:
	mov	w9, #56
	mul	x23, x22, x9
	add	x8, x8, x23
	ldr	s0, [x8, #8]
	str	s0, [sp, #12]
	ldr	s0, [x8, #12]
	str	s0, [sp, #8]
	ldr	s0, [x8, #16]
	str	s0, [sp, #4]
	ldr	s0, [x8, #20]
	str	s0, [sp]
	add	x0, sp, #12
	add	x1, sp, #8
	add	x2, sp, #4
	mov	x3, sp
	bl	_SCR_AdjustFrom640
	ldr	x8, [x21]
	add	x9, x8, x23
	ldr	x4, [x9, #40]
	cbz	x4, LBB0_8
; %bb.5:
	mov	w9, #56
	madd	x9, x22, x9, x8
	ldp	w0, w9, [x9, #24]
	cmp	w0, w9
	b.ne	LBB0_7
; %bb.6:
	mov	w9, #56
	madd	x8, x22, x9, x8
	ldp	w1, w8, [x8, #32]
	cmp	w1, w8
	b.eq	LBB0_9
LBB0_7:
	mov	w0, #262144
	bl	_Hunk_AllocateTempMemory
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_CIN_ResampleCinematic
Lloh8:
	adrp	x8, _re@GOTPAGE
Lloh9:
	ldr	x8, [x8, _re@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	ldp	s1, s0, [sp, #8]
	ldp	s3, s2, [sp]
Lloh11:
	adrp	x9, _qtrue@GOTPAGE
Lloh12:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
Lloh13:
	ldr	x4, [x9]
	mov	x2, x20
	mov	x3, x19
	mov	w0, #256
	mov	w1, #256
	blr	x8
Lloh14:
	adrp	x8, _qfalse@GOTPAGE
Lloh15:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh16:
	ldr	x8, [x8]
	ldr	x9, [x21]
	mov	w10, #56
	madd	x9, x22, x10, x9
	str	x8, [x9, #40]
	mov	x0, x20
	bl	_Hunk_FreeTempMemory
	b	LBB0_10
LBB0_8:
	mov	w9, #56
	madd	x8, x22, x9, x8
	ldr	w0, [x8, #28]
	ldr	w1, [x8, #36]
LBB0_9:
Lloh17:
	adrp	x8, _re@GOTPAGE
Lloh18:
	ldr	x8, [x8, _re@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldp	s1, s0, [sp, #8]
	ldp	s3, s2, [sp]
	mov	x2, x20
	mov	x3, x19
	blr	x8
Lloh20:
	adrp	x8, _qfalse@GOTPAGE
Lloh21:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x9, [x21]
	mov	w10, #56
	madd	x9, x22, x10, x9
	str	x8, [x9, #40]
LBB0_10:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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	_re,8,3                         ; @re
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_qfalse,8,3                     ; @qfalse
.subsections_via_symbols
