	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadMovieInState               ## -- Begin function ReadMovieInState
	.p2align	4, 0x90
_ReadMovieInState:                      ## @ReadMovieInState
	.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
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	_Movie@GOTPCREL(%rip), %r13
	movq	(%r13), %rax
	movq	_Recording@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_3
## %bb.1:
	movq	_Playback@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_4
## %bb.2:
	cmpq	$0, 8(%r13)
	jne	LBB0_4
LBB0_3:
	movq	%r12, %rdi
	callq	_ftell
	movl	%eax, %r15d
	leaq	-56(%rbp), %rdi
	movl	$4, %esi
	movl	$1, %edx
	movq	%r12, %rcx
	callq	_fread
	movsbl	-56(%rbp), %r14d
	movl	%r14d, %edi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_4
## %bb.5:
	movq	%rax, %rbx
	movq	%rax, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	movq	%r12, %rcx
	callq	_fread
	movq	_SEEK_SET@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movl	%r15d, %esi
	callq	_fseek
	movl	16(%r13), %edi
	callq	_rewind
	movl	16(%r13), %ecx
	movq	%rbx, %rdi
	movl	$1, %esi
	movl	%r14d, %edx
	callq	_fwrite
	movl	16(%r13), %edi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_rewind                         ## TAILCALL
LBB0_4:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_Movie,24,3                     ## @Movie
	.comm	_Recording,8,3                  ## @Recording
	.comm	_Playback,8,3                   ## @Playback
	.comm	_SEEK_SET,4,2                   ## @SEEK_SET
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ReadMovieInState               ; -- Begin function ReadMovieInState
	.p2align	2
_ReadMovieInState:                      ; @ReadMovieInState
	.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
	mov	x19, x0
Lloh0:
	adrp	x23, _Movie@GOTPAGE
Lloh1:
	ldr	x23, [x23, _Movie@GOTPAGEOFF]
	ldr	x8, [x23]
Lloh2:
	adrp	x9, _Recording@GOTPAGE
Lloh3:
	ldr	x9, [x9, _Recording@GOTPAGEOFF]
Lloh4:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_2
; %bb.1:
Lloh5:
	adrp	x9, _Playback@GOTPAGE
Lloh6:
	ldr	x9, [x9, _Playback@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	ldr	x10, [x23, #8]
	cmp	x8, x9
	ccmp	x10, #0, #0, eq
	b.ne	LBB0_4
LBB0_2:
	mov	x0, x19
	bl	_ftell
	mov	x21, x0
	mov	x0, sp
	mov	w1, #4
	mov	w2, #1
	mov	x3, x19
	bl	_fread
	ldrsb	w20, [sp]
	mov	x0, x20
	bl	_malloc
	cbz	x0, LBB0_4
; %bb.3:
	mov	x22, x0
	mov	w1, #1
	mov	x2, x20
	mov	x3, x19
	bl	_fread
Lloh8:
	adrp	x8, _SEEK_SET@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SEEK_SET@GOTPAGEOFF]
Lloh10:
	ldr	w2, [x8]
	mov	x0, x19
	mov	x1, x21
	bl	_fseek
	ldr	w0, [x23, #16]
	bl	_rewind
	ldr	w3, [x23, #16]
	mov	x0, x22
	mov	w1, #1
	mov	x2, x20
	bl	_fwrite
	ldr	w0, [x23, #16]
	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
	b	_rewind
LBB0_4:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_Movie,24,3                     ; @Movie
	.comm	_Recording,8,3                  ; @Recording
	.comm	_Playback,8,3                   ; @Playback
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
.subsections_via_symbols
