	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsv_movie_init_playback
_bsv_movie_init_playback:               ## @bsv_movie_init_playback
	.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	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	xorps	%xmm0, %xmm0
	movaps	%xmm0, -48(%rbp)
	movaps	%xmm0, -64(%rbp)
	movq	_RETRO_VFS_FILE_ACCESS_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%rbx, %rdi
	callq	_intfstream_open_file
	testq	%rax, %rax
	je	LBB0_1
## %bb.4:
	movq	%rax, 24(%r14)
	movl	$1, (%r14)
	leaq	-64(%rbp), %rsi
	movl	$32, %edx
	movq	%rax, %rdi
	callq	_intfstream_read
	movq	_MAGIC_INDEX@GOTPCREL(%rip), %r15
	movq	(%r15), %rax
	movq	-64(%rbp,%rax,8), %rdi
	callq	_swap_if_little32
	movq	_BSV_MAGIC@GOTPCREL(%rip), %rbx
	cmpq	(%rbx), %rax
	je	LBB0_8
## %bb.5:
	movq	(%r15), %rax
	movq	-64(%rbp,%rax,8), %rdi
	callq	_swap_if_big32
	cmpq	(%rbx), %rax
	jne	LBB0_6
LBB0_8:
	xorl	%eax, %eax
	callq	_content_get_crc
	testq	%rax, %rax
	je	LBB0_11
## %bb.9:
	movq	%rax, %rbx
	movq	_CRC_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-64(%rbp,%rax,8), %rdi
	callq	_swap_if_big32
	cmpq	%rbx, %rax
	je	LBB0_11
## %bb.10:
	movq	_MSG_CRC32_CHECKSUM_MISMATCH@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.2(%rip), %rdi
	movq	%rax, %rsi
	callq	_RARCH_WARN
LBB0_11:
	movq	_STATE_SIZE_INDEX@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	-64(%rbp,%rax,8), %rdi
	callq	_swap_if_big32
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_18
## %bb.12:
	movq	%rbx, %rdi
	callq	_malloc
	testq	%rax, %rax
	je	LBB0_3
## %bb.13:
	movq	%rax, 8(%r14)
	movq	%rbx, 32(%r14)
	movq	24(%r14), %rdi
	movq	%rax, %rsi
	movq	%rbx, %rdx
	callq	_intfstream_read
	cmpq	%rbx, %rax
	jne	LBB0_14
## %bb.15:
	leaq	-72(%rbp), %rdi
	callq	_core_serialize_size
	cmpq	%rbx, -72(%rbp)
	jne	LBB0_17
## %bb.16:
	movq	8(%r14), %rax
	movq	%rax, -88(%rbp)
	movq	%rbx, -80(%rbp)
	leaq	-88(%rbp), %rdi
	callq	_core_unserialize
	jmp	LBB0_18
LBB0_1:
	leaq	L_.str(%rip), %rdi
	movq	%rbx, %rsi
	jmp	LBB0_2
LBB0_6:
	movq	_MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_14:
	movq	_MSG_COULD_NOT_READ_STATE_FROM_MOVIE@GOTPCREL(%rip), %rax
LBB0_7:
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
LBB0_2:
	callq	_RARCH_ERR
LBB0_3:
	xorl	%eax, %eax
	jmp	LBB0_19
LBB0_17:
	movq	_MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msg_hash_to_str
	leaq	L_.str.1(%rip), %rdi
	movq	%rax, %rsi
	callq	_RARCH_WARN
LBB0_18:
	leal	32(%rbx), %eax
	movl	%eax, 16(%r14)
	movl	$1, %eax
LBB0_19:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_21
## %bb.20:
	addq	$72, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_21:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ## @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ## @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Could not open BSV file for playback, path : \"%s\".\n"

	.comm	_MAGIC_INDEX,8,3                ## @MAGIC_INDEX
	.comm	_BSV_MAGIC,8,3                  ## @BSV_MAGIC
L_.str.1:                               ## @.str.1
	.asciz	"%s\n"

	.comm	_MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE,4,2 ## @MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE
	.comm	_CRC_INDEX,8,3                  ## @CRC_INDEX
L_.str.2:                               ## @.str.2
	.asciz	"%s.\n"

	.comm	_MSG_CRC32_CHECKSUM_MISMATCH,4,2 ## @MSG_CRC32_CHECKSUM_MISMATCH
	.comm	_STATE_SIZE_INDEX,8,3           ## @STATE_SIZE_INDEX
	.comm	_MSG_COULD_NOT_READ_STATE_FROM_MOVIE,4,2 ## @MSG_COULD_NOT_READ_STATE_FROM_MOVIE
	.comm	_MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION,4,2 ## @MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION
	.no_dead_strip	_bsv_movie_init_playback
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function bsv_movie_init_playback
_bsv_movie_init_playback:               ; @bsv_movie_init_playback
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [sp, #32]
Lloh3:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGE
Lloh4:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_READ@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
Lloh6:
	adrp	x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _RETRO_VFS_FILE_ACCESS_HINT_NONE@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	mov	x0, x20
	bl	_intfstream_open_file
	cbz	x0, LBB0_11
; %bb.1:
	str	x0, [x19, #24]
	mov	w8, #1
	str	w8, [x19]
	add	x20, sp, #32
	add	x1, sp, #32
	mov	w2, #32
	bl	_intfstream_read
Lloh9:
	adrp	x21, _MAGIC_INDEX@GOTPAGE
Lloh10:
	ldr	x21, [x21, _MAGIC_INDEX@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	x0, [x20, x8, lsl #3]
	bl	_swap_if_little32
Lloh11:
	adrp	x22, _BSV_MAGIC@GOTPAGE
Lloh12:
	ldr	x22, [x22, _BSV_MAGIC@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_3
; %bb.2:
	ldr	x8, [x21]
	ldr	x0, [x20, x8, lsl #3]
	bl	_swap_if_big32
	ldr	x8, [x22]
	cmp	x0, x8
	b.ne	LBB0_12
LBB0_3:
	bl	_content_get_crc
	cbz	x0, LBB0_6
; %bb.4:
	mov	x20, x0
Lloh13:
	adrp	x8, _CRC_INDEX@GOTPAGE
Lloh14:
	ldr	x8, [x8, _CRC_INDEX@GOTPAGEOFF]
Lloh15:
	ldr	x8, [x8]
	add	x9, sp, #32
	ldr	x0, [x9, x8, lsl #3]
	bl	_swap_if_big32
	cmp	x0, x20
	b.eq	LBB0_6
; %bb.5:
Lloh16:
	adrp	x8, _MSG_CRC32_CHECKSUM_MISMATCH@GOTPAGE
Lloh17:
	ldr	x8, [x8, _MSG_CRC32_CHECKSUM_MISMATCH@GOTPAGEOFF]
Lloh18:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh19:
	adrp	x0, l_.str.2@PAGE
Lloh20:
	add	x0, x0, l_.str.2@PAGEOFF
	bl	_RARCH_WARN
LBB0_6:
Lloh21:
	adrp	x8, _STATE_SIZE_INDEX@GOTPAGE
Lloh22:
	ldr	x8, [x8, _STATE_SIZE_INDEX@GOTPAGEOFF]
Lloh23:
	ldr	x8, [x8]
	add	x9, sp, #32
	ldr	x0, [x9, x8, lsl #3]
	bl	_swap_if_big32
	mov	x20, x0
	cbz	x0, LBB0_17
; %bb.7:
	mov	x0, x20
	bl	_malloc
	cbz	x0, LBB0_18
; %bb.8:
	mov	x1, x0
	str	x0, [x19, #8]
	str	x20, [x19, #32]
	ldr	x0, [x19, #24]
	mov	x2, x20
	bl	_intfstream_read
	cmp	x0, x20
	b.ne	LBB0_13
; %bb.9:
	add	x0, sp, #24
	bl	_core_serialize_size
	ldr	x8, [sp, #24]
	cmp	x8, x20
	b.ne	LBB0_16
; %bb.10:
	ldr	x8, [x19, #8]
	stp	x8, x20, [sp, #8]
	add	x0, sp, #8
	bl	_core_unserialize
	b	LBB0_17
LBB0_11:
Lloh24:
	adrp	x0, l_.str@PAGE
Lloh25:
	add	x0, x0, l_.str@PAGEOFF
	mov	x1, x20
	b	LBB0_15
LBB0_12:
Lloh26:
	adrp	x8, _MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE@GOTPAGE
Lloh27:
	ldr	x8, [x8, _MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE@GOTPAGEOFF]
	b	LBB0_14
LBB0_13:
Lloh28:
	adrp	x8, _MSG_COULD_NOT_READ_STATE_FROM_MOVIE@GOTPAGE
Lloh29:
	ldr	x8, [x8, _MSG_COULD_NOT_READ_STATE_FROM_MOVIE@GOTPAGEOFF]
LBB0_14:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh30:
	adrp	x0, l_.str.1@PAGE
Lloh31:
	add	x0, x0, l_.str.1@PAGEOFF
LBB0_15:
	bl	_RARCH_ERR
	mov	w0, #0
	b	LBB0_18
LBB0_16:
Lloh32:
	adrp	x8, _MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION@GOTPAGE
Lloh33:
	ldr	x8, [x8, _MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION@GOTPAGEOFF]
Lloh34:
	ldr	w0, [x8]
	bl	_msg_hash_to_str
	mov	x1, x0
Lloh35:
	adrp	x0, l_.str.1@PAGE
Lloh36:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_RARCH_WARN
LBB0_17:
	add	w8, w20, #32
	str	w8, [x19, #16]
	mov	w0, #1
LBB0_18:
	ldur	x8, [x29, #-40]
Lloh37:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh38:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh39:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_20
; %bb.19:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_20:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.cfi_endproc
                                        ; -- End function
	.comm	_RETRO_VFS_FILE_ACCESS_READ,4,2 ; @RETRO_VFS_FILE_ACCESS_READ
	.comm	_RETRO_VFS_FILE_ACCESS_HINT_NONE,4,2 ; @RETRO_VFS_FILE_ACCESS_HINT_NONE
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Could not open BSV file for playback, path : \"%s\".\n"

	.comm	_MAGIC_INDEX,8,3                ; @MAGIC_INDEX
	.comm	_BSV_MAGIC,8,3                  ; @BSV_MAGIC
l_.str.1:                               ; @.str.1
	.asciz	"%s\n"

	.comm	_MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE,4,2 ; @MSG_MOVIE_FILE_IS_NOT_A_VALID_BSV1_FILE
	.comm	_CRC_INDEX,8,3                  ; @CRC_INDEX
l_.str.2:                               ; @.str.2
	.asciz	"%s.\n"

	.comm	_MSG_CRC32_CHECKSUM_MISMATCH,4,2 ; @MSG_CRC32_CHECKSUM_MISMATCH
	.comm	_STATE_SIZE_INDEX,8,3           ; @STATE_SIZE_INDEX
	.comm	_MSG_COULD_NOT_READ_STATE_FROM_MOVIE,4,2 ; @MSG_COULD_NOT_READ_STATE_FROM_MOVIE
	.comm	_MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION,4,2 ; @MSG_MOVIE_FORMAT_DIFFERENT_SERIALIZER_VERSION
	.no_dead_strip	_bsv_movie_init_playback
.subsections_via_symbols
