	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_UploadCinematic             ## -- Begin function RE_UploadCinematic
	.p2align	4, 0x90
_RE_UploadCinematic:                    ## @RE_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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %eax
	movl	%edx, %ebx
	movq	_tr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movslq	%r9d, %rdx
	movq	(%rcx,%rdx,8), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.1:
	movq	%r8, %r10
	movl	16(%rcx), %r14d
	cmpl	%ebx, (%rcx)
	jne	LBB0_7
## %bb.2:
	cmpl	%eax, 4(%rcx)
	jne	LBB0_7
## %bb.3:
	cmpq	$0, 16(%rbp)
	je	LBB0_5
## %bb.4:
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	_GL_RGBA@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r11d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %r15d
	movl	%r14d, %edi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	xorl	%r8d, %r8d
	movl	%ebx, %r9d
	pushq	%r10
	pushq	%r15
	pushq	%r11
	pushq	%rax
	callq	_qglTextureSubImage2DEXT
	addq	$32, %rsp
LBB0_5:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movl	%ebx, 8(%rcx)
	movl	%ebx, (%rcx)
	movl	%eax, 12(%rcx)
	movl	%eax, 4(%rcx)
	movq	_GL_TEXTURE_2D@GOTPCREL(%rip), %r15
	movl	(%r15), %esi
	movq	_GL_RGB8@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_GL_RGBA@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r11d
	movq	_GL_UNSIGNED_BYTE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %r12d
	movl	%r14d, %edi
	xorl	%edx, %edx
	movl	%ebx, %r8d
	movl	%eax, %r9d
	pushq	%r10
	pushq	%r12
	pushq	%r11
	pushq	$0
	callq	_qglTextureImage2DEXT
	addq	$32, %rsp
	movl	(%r15), %esi
	movq	_GL_TEXTURE_MIN_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GL_LINEAR@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%r14d, %edi
	callq	_qglTextureParameterfEXT
	movl	(%r15), %esi
	movq	_GL_TEXTURE_MAG_FILTER@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movl	%r14d, %edi
	callq	_qglTextureParameterfEXT
	movl	(%r15), %esi
	movq	_GL_TEXTURE_WRAP_S@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_GL_CLAMP_TO_EDGE@GOTPCREL(%rip), %rbx
	movl	(%rbx), %ecx
	movl	%r14d, %edi
	callq	_qglTextureParameterfEXT
	movl	(%r15), %esi
	movq	_GL_TEXTURE_WRAP_T@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movl	(%rbx), %ecx
	movl	%r14d, %edi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_qglTextureParameterfEXT        ## TAILCALL
LBB0_6:
	movq	_ri@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_PRINT_WARNING@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edi
	leaq	L_.str(%rip), %rsi
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_tr,8,3                         ## @tr
	.comm	_ri,8,3                         ## @ri
	.comm	_PRINT_WARNING,4,2              ## @PRINT_WARNING
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"RE_UploadCinematic: scratch images not initialized\n"

	.comm	_GL_TEXTURE_2D,4,2              ## @GL_TEXTURE_2D
	.comm	_GL_RGB8,4,2                    ## @GL_RGB8
	.comm	_GL_RGBA,4,2                    ## @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ## @GL_UNSIGNED_BYTE
	.comm	_GL_TEXTURE_MIN_FILTER,4,2      ## @GL_TEXTURE_MIN_FILTER
	.comm	_GL_LINEAR,4,2                  ## @GL_LINEAR
	.comm	_GL_TEXTURE_MAG_FILTER,4,2      ## @GL_TEXTURE_MAG_FILTER
	.comm	_GL_TEXTURE_WRAP_S,4,2          ## @GL_TEXTURE_WRAP_S
	.comm	_GL_CLAMP_TO_EDGE,4,2           ## @GL_CLAMP_TO_EDGE
	.comm	_GL_TEXTURE_WRAP_T,4,2          ## @GL_TEXTURE_WRAP_T
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_RE_UploadCinematic             ; -- Begin function RE_UploadCinematic
	.p2align	2
_RE_UploadCinematic:                    ; @RE_UploadCinematic
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
Lloh0:
	adrp	x10, _tr@GOTPAGE
Lloh1:
	ldr	x10, [x10, _tr@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	ldr	x10, [x10, w5, sxtw #3]
	cbz	x10, LBB0_7
; %bb.1:
	mov	x8, x3
	mov	x9, x2
	ldr	w19, [x10, #16]
	ldr	w11, [x10]
	cmp	w11, w2
	b.ne	LBB0_6
; %bb.2:
	ldr	w11, [x10, #4]
	cmp	w11, w8
	b.ne	LBB0_6
; %bb.3:
	cbz	x6, LBB0_5
; %bb.4:
Lloh3:
	adrp	x10, _GL_TEXTURE_2D@GOTPAGE
Lloh4:
	ldr	x10, [x10, _GL_TEXTURE_2D@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x10]
Lloh6:
	adrp	x10, _GL_RGBA@GOTPAGE
Lloh7:
	ldr	x10, [x10, _GL_RGBA@GOTPAGEOFF]
Lloh8:
	ldr	w7, [x10]
Lloh9:
	adrp	x10, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh10:
	ldr	x10, [x10, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh11:
	ldr	w10, [x10]
	str	x4, [sp, #8]
	str	w10, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	w3, #0
	mov	w4, #0
	mov	x5, x9
	mov	x6, x8
	bl	_qglTextureSubImage2DEXT
LBB0_5:
	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
	add	sp, sp, #64
	ret
LBB0_6:
	stp	w9, w8, [x10, #8]
	stp	w9, w8, [x10]
Lloh12:
	adrp	x20, _GL_TEXTURE_2D@GOTPAGE
Lloh13:
	ldr	x20, [x20, _GL_TEXTURE_2D@GOTPAGEOFF]
	ldr	w1, [x20]
Lloh14:
	adrp	x10, _GL_RGB8@GOTPAGE
Lloh15:
	ldr	x10, [x10, _GL_RGB8@GOTPAGEOFF]
Lloh16:
	ldr	w3, [x10]
Lloh17:
	adrp	x10, _GL_RGBA@GOTPAGE
Lloh18:
	ldr	x10, [x10, _GL_RGBA@GOTPAGEOFF]
Lloh19:
	ldr	w7, [x10]
Lloh20:
	adrp	x10, _GL_UNSIGNED_BYTE@GOTPAGE
Lloh21:
	ldr	x10, [x10, _GL_UNSIGNED_BYTE@GOTPAGEOFF]
Lloh22:
	ldr	w10, [x10]
	str	x4, [sp, #8]
	str	w10, [sp]
	mov	x0, x19
	mov	w2, #0
	mov	x4, x9
	mov	x5, x8
	mov	w6, #0
	bl	_qglTextureImage2DEXT
	ldr	w1, [x20]
Lloh23:
	adrp	x8, _GL_TEXTURE_MIN_FILTER@GOTPAGE
Lloh24:
	ldr	x8, [x8, _GL_TEXTURE_MIN_FILTER@GOTPAGEOFF]
Lloh25:
	ldr	w2, [x8]
Lloh26:
	adrp	x21, _GL_LINEAR@GOTPAGE
Lloh27:
	ldr	x21, [x21, _GL_LINEAR@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_qglTextureParameterfEXT
	ldr	w1, [x20]
Lloh28:
	adrp	x8, _GL_TEXTURE_MAG_FILTER@GOTPAGE
Lloh29:
	ldr	x8, [x8, _GL_TEXTURE_MAG_FILTER@GOTPAGEOFF]
Lloh30:
	ldr	w2, [x8]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_qglTextureParameterfEXT
	ldr	w1, [x20]
Lloh31:
	adrp	x8, _GL_TEXTURE_WRAP_S@GOTPAGE
Lloh32:
	ldr	x8, [x8, _GL_TEXTURE_WRAP_S@GOTPAGEOFF]
Lloh33:
	ldr	w2, [x8]
Lloh34:
	adrp	x21, _GL_CLAMP_TO_EDGE@GOTPAGE
Lloh35:
	ldr	x21, [x21, _GL_CLAMP_TO_EDGE@GOTPAGEOFF]
	ldr	w3, [x21]
	mov	x0, x19
	bl	_qglTextureParameterfEXT
	ldr	w1, [x20]
Lloh36:
	adrp	x8, _GL_TEXTURE_WRAP_T@GOTPAGE
Lloh37:
	ldr	x8, [x8, _GL_TEXTURE_WRAP_T@GOTPAGEOFF]
Lloh38:
	ldr	w2, [x8]
	ldr	w3, [x21]
	mov	x0, x19
	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
	add	sp, sp, #64
	b	_qglTextureParameterfEXT
LBB0_7:
Lloh39:
	adrp	x8, _ri@GOTPAGE
Lloh40:
	ldr	x8, [x8, _ri@GOTPAGEOFF]
Lloh41:
	adrp	x9, _PRINT_WARNING@GOTPAGE
Lloh42:
	ldr	x9, [x9, _PRINT_WARNING@GOTPAGEOFF]
Lloh43:
	ldr	x2, [x8]
Lloh44:
	ldr	w0, [x9]
Lloh45:
	adrp	x1, l_.str@PAGE
Lloh46:
	add	x1, x1, l_.str@PAGEOFF
	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
	add	sp, sp, #64
	br	x2
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh31, Lloh32, Lloh33
	.loh AdrpLdrGotLdr	Lloh28, Lloh29, Lloh30
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh45, Lloh46
	.loh AdrpLdrGotLdr	Lloh41, Lloh42, Lloh44
	.loh AdrpLdrGotLdr	Lloh39, Lloh40, Lloh43
	.cfi_endproc
                                        ; -- End function
	.comm	_tr,8,3                         ; @tr
	.comm	_ri,8,3                         ; @ri
	.comm	_PRINT_WARNING,4,2              ; @PRINT_WARNING
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"RE_UploadCinematic: scratch images not initialized\n"

	.comm	_GL_TEXTURE_2D,4,2              ; @GL_TEXTURE_2D
	.comm	_GL_RGB8,4,2                    ; @GL_RGB8
	.comm	_GL_RGBA,4,2                    ; @GL_RGBA
	.comm	_GL_UNSIGNED_BYTE,4,2           ; @GL_UNSIGNED_BYTE
	.comm	_GL_TEXTURE_MIN_FILTER,4,2      ; @GL_TEXTURE_MIN_FILTER
	.comm	_GL_LINEAR,4,2                  ; @GL_LINEAR
	.comm	_GL_TEXTURE_MAG_FILTER,4,2      ; @GL_TEXTURE_MAG_FILTER
	.comm	_GL_TEXTURE_WRAP_S,4,2          ; @GL_TEXTURE_WRAP_S
	.comm	_GL_CLAMP_TO_EDGE,4,2           ; @GL_CLAMP_TO_EDGE
	.comm	_GL_TEXTURE_WRAP_T,4,2          ; @GL_TEXTURE_WRAP_T
.subsections_via_symbols
