	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CIN_UploadCinematic            ## -- Begin function CIN_UploadCinematic
	.p2align	4, 0x90
_CIN_UploadCinematic:                   ## @CIN_UploadCinematic
	.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_20
## %bb.1:
	movl	%edi, %ebx
	movq	_MAX_VIDEO_HANDLES@GOTPCREL(%rip), %rax
	cmpl	%edi, (%rax)
	jle	LBB0_20
## %bb.2:
	movq	_cinTable@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	%ebx, %r13d
	leaq	(,%r13,4), %r15
	addq	%r13, %r15
	cmpq	$0, 32(%rax,%r15,8)
	je	LBB0_20
## %bb.3:
	movl	(%rax,%r15,8), %ecx
	testl	%ecx, %ecx
	jle	LBB0_4
LBB0_10:
	movq	24(%rax,%r15,8), %r9
	movl	4(%rax,%r15,8), %edi
	testq	%r9, %r9
	je	LBB0_11
## %bb.13:
	cmpl	8(%rax,%r15,8), %edi
	jne	LBB0_15
## %bb.14:
	movl	12(%rax,%r15,8), %ecx
	movl	%edi, %edx
	movl	%ecx, %esi
	cmpl	16(%rax,%r15,8), %ecx
	je	LBB0_12
LBB0_15:
	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
	movq	(%r12), %rcx
	shlq	$3, %r13
	leaq	(%r13,%r13,4), %r13
	movl	4(%rcx,%r13), %edi
	movl	12(%rcx,%r13), %esi
	movq	_qtrue@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rsp)
	movl	$256, %edx                      ## imm = 0x100
	movl	$256, %ecx                      ## imm = 0x100
	movq	%r14, %r8
	movl	%ebx, %r9d
	callq	*(%rax)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	%rax, 24(%rcx,%r13)
	movq	%r14, %rdi
	callq	_Hunk_FreeTempMemory
	jmp	LBB0_16
LBB0_4:
	cmpq	$0, 24(%rax,%r15,8)
	je	LBB0_10
## %bb.5:
	leaq	(%rax,%r15,8), %rdx
	cmpl	$-1, %ecx
	je	LBB0_8
## %bb.6:
	testl	%ecx, %ecx
	jne	LBB0_9
## %bb.7:
	movl	$-1, (%rdx)
	jmp	LBB0_10
LBB0_11:
	movl	8(%rax,%r15,8), %edx
	movl	12(%rax,%r15,8), %esi
	movl	16(%rax,%r15,8), %ecx
LBB0_12:
	movq	_re@GOTPCREL(%rip), %r10
	shlq	$3, %r13
	leaq	(,%r13,4), %r14
	addq	%r13, %r14
	movq	32(%rax,%r14), %r8
	movq	%r9, (%rsp)
	movl	%ebx, %r9d
	callq	*(%r10)
	movq	_qfalse@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	%rax, 24(%rcx,%r14)
LBB0_16:
	movq	_cl_inGameVideo@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	$0, (%rax)
	movq	(%r12), %rax
	movl	(%rax,%r15,8), %edx
	je	LBB0_17
## %bb.18:
	movl	$1, %ecx
	cmpl	$1, %edx
	je	LBB0_20
LBB0_19:
	leaq	(%rax,%r15,8), %rax
	movl	%ecx, (%rax)
LBB0_20:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_17:
	xorl	%ecx, %ecx
	cmpl	$1, %edx
	je	LBB0_19
	jmp	LBB0_20
LBB0_8:
	movl	$-2, (%rdx)
	jmp	LBB0_10
LBB0_9:
	leaq	(%rax,%r15,8), %rax
	addq	$24, %rax
	movq	_qfalse@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	%rcx, (%rax)
	movq	(%r12), %rax
	jmp	LBB0_10
	.cfi_endproc
                                        ## -- End function
	.comm	_MAX_VIDEO_HANDLES,4,2          ## @MAX_VIDEO_HANDLES
	.comm	_cinTable,8,3                   ## @cinTable
	.comm	_qfalse,8,3                     ## @qfalse
	.comm	_re,8,3                         ## @re
	.comm	_qtrue,8,3                      ## @qtrue
	.comm	_cl_inGameVideo,8,3             ## @cl_inGameVideo
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_CIN_UploadCinematic            ; -- Begin function CIN_UploadCinematic
	.p2align	2
_CIN_UploadCinematic:                   ; @CIN_UploadCinematic
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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_20
; %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_20
; %bb.2:
Lloh3:
	adrp	x21, _cinTable@GOTPAGE
Lloh4:
	ldr	x21, [x21, _cinTable@GOTPAGEOFF]
	ldr	x8, [x21]
	mov	w9, #40
	umaddl	x9, w19, w9, x8
	ldr	x9, [x9, #32]
	cbz	x9, LBB0_20
; %bb.3:
	mov	w22, w19
	mov	w9, #40
	madd	x9, x22, x9, x8
	ldr	w10, [x9]
	cmp	w10, #0
	b.le	LBB0_8
LBB0_4:
	mov	w9, #40
	madd	x9, x22, x9, x8
	ldr	x6, [x9, #24]
	ldr	w0, [x9, #4]
	mov	w9, #40
	madd	x9, x22, x9, x8
	cbz	x6, LBB0_12
; %bb.5:
	ldr	w9, [x9, #8]
	cmp	w0, w9
	b.ne	LBB0_7
; %bb.6:
	mov	w9, #40
	madd	x9, x22, x9, x8
	ldp	w3, w9, [x9, #12]
	mov	x2, x0
	mov	x1, x3
	cmp	w3, w9
	b.eq	LBB0_13
LBB0_7:
	mov	w0, #262144
	bl	_Hunk_AllocateTempMemory
	mov	x20, x0
	mov	x0, x19
	mov	x1, x20
	bl	_CIN_ResampleCinematic
Lloh5:
	adrp	x8, _re@GOTPAGE
Lloh6:
	ldr	x8, [x8, _re@GOTPAGEOFF]
Lloh7:
	ldr	x8, [x8]
	ldr	x9, [x21]
	add	x10, x22, x22, lsl #2
	lsl	x23, x10, #3
	add	x9, x9, x23
	ldr	w0, [x9, #4]
	ldr	w1, [x9, #12]
Lloh8:
	adrp	x9, _qtrue@GOTPAGE
Lloh9:
	ldr	x9, [x9, _qtrue@GOTPAGEOFF]
Lloh10:
	ldr	x6, [x9]
	mov	w2, #256
	mov	w3, #256
	mov	x4, x20
	mov	x5, x19
	blr	x8
Lloh11:
	adrp	x8, _qfalse@GOTPAGE
Lloh12:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh13:
	ldr	x8, [x8]
	ldr	x9, [x21]
	add	x9, x9, x23
	str	x8, [x9, #24]
	mov	x0, x20
	bl	_Hunk_FreeTempMemory
	b	LBB0_14
LBB0_8:
	mov	w11, #40
	madd	x11, x22, x11, x8
	ldr	x12, [x11, #24]!
	cbz	x12, LBB0_4
; %bb.9:
	cmn	w10, #1
	b.eq	LBB0_21
; %bb.10:
	cbnz	w10, LBB0_22
; %bb.11:
	mov	w10, #-1
	str	w10, [x9]
	b	LBB0_4
LBB0_12:
	ldp	w2, w1, [x9, #8]
	ldr	w3, [x9, #16]
LBB0_13:
Lloh14:
	adrp	x9, _re@GOTPAGE
Lloh15:
	ldr	x9, [x9, _re@GOTPAGEOFF]
Lloh16:
	ldr	x9, [x9]
	add	x10, x22, x22, lsl #2
	lsl	x20, x10, #3
	add	x8, x8, x20
	ldr	x4, [x8, #32]
	mov	x5, x19
	blr	x9
Lloh17:
	adrp	x8, _qfalse@GOTPAGE
Lloh18:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh19:
	ldr	x8, [x8]
	ldr	x9, [x21]
	add	x9, x9, x20
	str	x8, [x9, #24]
LBB0_14:
Lloh20:
	adrp	x8, _cl_inGameVideo@GOTPAGE
Lloh21:
	ldr	x8, [x8, _cl_inGameVideo@GOTPAGEOFF]
Lloh22:
	ldr	x8, [x8]
	ldr	x10, [x8]
	ldr	x8, [x21]
	mov	w9, #40
	madd	x8, x22, x9, x8
	ldr	w9, [x8]
	cmp	w9, #1
	cbz	x10, LBB0_17
; %bb.15:
	b.eq	LBB0_20
; %bb.16:
	mov	w9, #1
	b	LBB0_19
LBB0_17:
	b.ne	LBB0_20
; %bb.18:
	mov	w9, #0
LBB0_19:
	str	w9, [x8]
LBB0_20:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_21:
	mov	w10, #-2
	str	w10, [x9]
	b	LBB0_4
LBB0_22:
Lloh23:
	adrp	x8, _qfalse@GOTPAGE
Lloh24:
	ldr	x8, [x8, _qfalse@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
	str	x8, [x11]
	ldr	x8, [x21]
	b	LBB0_4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_MAX_VIDEO_HANDLES,4,2          ; @MAX_VIDEO_HANDLES
	.comm	_cinTable,8,3                   ; @cinTable
	.comm	_qfalse,8,3                     ; @qfalse
	.comm	_re,8,3                         ; @re
	.comm	_qtrue,8,3                      ; @qtrue
	.comm	_cl_inGameVideo,8,3             ; @cl_inGameVideo
.subsections_via_symbols
