	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_bsv_movie_frame_rewind         ## -- Begin function bsv_movie_frame_rewind
	.p2align	4, 0x90
_bsv_movie_frame_rewind:                ## @bsv_movie_frame_rewind
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_bsv_movie_state_handle@GOTPCREL(%rip), %rax
	movq	(%rax), %rbx
	testq	%rbx, %rbx
	je	LBB0_8
## %bb.1:
	movl	$1, (%rbx)
	movl	4(%rbx), %ecx
	movq	8(%rbx), %rax
	cmpl	$1, %ecx
	jg	LBB0_4
## %bb.2:
	movq	(%rax), %rsi
	cmpq	16(%rbx), %rsi
	jne	LBB0_4
## %bb.3:
	movl	$0, 4(%rbx)
	jmp	LBB0_5
LBB0_4:
	xorl	%edx, %edx
	cmpq	$0, 48(%rbx)
	sete	%dl
	notl	%edx
	addl	%ecx, %edx
	andl	24(%rbx), %edx
	movslq	%edx, %rcx
	movl	%ecx, 4(%rbx)
	movq	(%rax,%rcx,8), %rsi
LBB0_5:
	movl	28(%rbx), %edi
	movq	_SEEK_SET@GOTPCREL(%rip), %r14
	movl	(%r14), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_intfstream_seek
	movl	28(%rbx), %edi
	callq	_intfstream_tell
	movq	16(%rbx), %rsi
	cmpq	%rsi, %rax
	jg	LBB0_8
## %bb.6:
	cmpl	$0, 40(%rbx)
	je	LBB0_7
## %bb.9:
	movl	28(%rbx), %edi
	movl	(%r14), %edx
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_intfstream_seek                ## TAILCALL
LBB0_7:
	movl	28(%rbx), %edi
	movl	(%r14), %edx
	movl	$16, %esi
	callq	_intfstream_seek
	movl	36(%rbx), %eax
	movl	%eax, -20(%rbp)
	movl	32(%rbx), %eax
	movl	%eax, -24(%rbp)
	leaq	-24(%rbp), %rdi
	callq	_core_serialize
	movl	36(%rbx), %esi
	movl	28(%rbx), %edi
	movl	32(%rbx), %edx
	callq	_intfstream_write
LBB0_8:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_bsv_movie_state_handle,8,3     ## @bsv_movie_state_handle
	.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	_bsv_movie_frame_rewind         ; -- Begin function bsv_movie_frame_rewind
	.p2align	2
_bsv_movie_frame_rewind:                ; @bsv_movie_frame_rewind
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
Lloh0:
	adrp	x8, _bsv_movie_state_handle@GOTPAGE
Lloh1:
	ldr	x8, [x8, _bsv_movie_state_handle@GOTPAGEOFF]
Lloh2:
	ldr	x19, [x8]
	cbz	x19, LBB0_9
; %bb.1:
	mov	w8, #1
	str	w8, [x19]
	ldr	w9, [x19, #4]
	ldr	x8, [x19, #8]
	cmp	w9, #1
	b.gt	LBB0_4
; %bb.2:
	ldr	x1, [x8]
	ldr	x10, [x19, #16]
	cmp	x1, x10
	b.ne	LBB0_4
; %bb.3:
	str	wzr, [x19, #4]
	b	LBB0_5
LBB0_4:
	ldr	x10, [x19, #48]
	cmp	x10, #0
	mov	w10, #-2
	cinc	w10, w10, ne
	ldr	w11, [x19, #24]
	add	w9, w10, w9
	and	w9, w9, w11
	str	w9, [x19, #4]
	ldr	x1, [x8, w9, sxtw #3]
LBB0_5:
	ldr	w0, [x19, #28]
Lloh3:
	adrp	x20, _SEEK_SET@GOTPAGE
Lloh4:
	ldr	x20, [x20, _SEEK_SET@GOTPAGEOFF]
	ldr	w2, [x20]
                                        ; kill: def $w1 killed $w1 killed $x1
	bl	_intfstream_seek
	ldr	w0, [x19, #28]
	bl	_intfstream_tell
	ldr	x1, [x19, #16]
	cmp	x0, x1
	b.gt	LBB0_9
; %bb.6:
	ldr	w8, [x19, #40]
	cbz	w8, LBB0_8
; %bb.7:
	ldr	w0, [x19, #28]
	ldr	w2, [x20]
                                        ; kill: def $w1 killed $w1 killed $x1
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	b	_intfstream_seek
LBB0_8:
	ldr	w0, [x19, #28]
	ldr	w2, [x20]
	mov	w1, #16
	bl	_intfstream_seek
	ldr	d0, [x19, #32]
	str	d0, [sp, #8]
	add	x0, sp, #8
	bl	_core_serialize
	ldp	w2, w1, [x19, #32]
	ldr	w0, [x19, #28]
	bl	_intfstream_write
LBB0_9:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_bsv_movie_state_handle,8,3     ; @bsv_movie_state_handle
	.comm	_SEEK_SET,4,2                   ; @SEEK_SET
.subsections_via_symbols
