	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function bsv_movie_init_internal
_bsv_movie_init_internal:               ## @bsv_movie_init_internal
	.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
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	$1, %edi
	movl	$24, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movq	%rax, %rbx
	movq	_RARCH_MOVIE_PLAYBACK@GOTPCREL(%rip), %rax
	cmpl	%r15d, (%rax)
	jne	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bsv_movie_init_playback
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_3:
	movq	%rbx, %rdi
	movq	%r14, %rsi
	callq	_bsv_movie_init_record
	testl	%eax, %eax
	je	LBB0_7
LBB0_5:
	movl	$1048576, %edi                  ## imm = 0x100000
	movl	$8, %esi
	callq	_calloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	%rax, (%rbx)
	movq	8(%rbx), %rcx
	movq	%rcx, (%rax)
	movl	$1048575, 16(%rbx)              ## imm = 0xFFFFF
	jmp	LBB0_9
LBB0_7:
	movq	%rbx, %rdi
	callq	_bsv_movie_free
LBB0_8:
	xorl	%ebx, %ebx
LBB0_9:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_RARCH_MOVIE_PLAYBACK,4,2       ## @RARCH_MOVIE_PLAYBACK
	.no_dead_strip	_bsv_movie_init_internal
.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_internal
_bsv_movie_init_internal:               ; @bsv_movie_init_internal
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x21, x1
	mov	x20, x0
	mov	w0, #1
	mov	w1, #24
	bl	_calloc
	mov	x19, x0
	cbz	x0, LBB0_7
; %bb.1:
Lloh0:
	adrp	x8, _RARCH_MOVIE_PLAYBACK@GOTPAGE
Lloh1:
	ldr	x8, [x8, _RARCH_MOVIE_PLAYBACK@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	mov	x0, x19
	mov	x1, x20
	cmp	w8, w21
	b.ne	LBB0_3
; %bb.2:
	bl	_bsv_movie_init_playback
	cbnz	w0, LBB0_4
	b	LBB0_6
LBB0_3:
	bl	_bsv_movie_init_record
	cbz	w0, LBB0_6
LBB0_4:
	mov	w0, #1048576
	mov	w1, #8
	bl	_calloc
	cbz	x0, LBB0_6
; %bb.5:
	str	x0, [x19]
	ldr	x8, [x19, #8]
	str	x8, [x0]
	mov	w8, #1048575
	str	w8, [x19, #16]
	b	LBB0_7
LBB0_6:
	mov	x0, x19
	bl	_bsv_movie_free
	mov	x19, #0
LBB0_7:
	mov	x0, x19
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_RARCH_MOVIE_PLAYBACK,4,2       ; @RARCH_MOVIE_PLAYBACK
	.no_dead_strip	_bsv_movie_init_internal
.subsections_via_symbols
