	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function decode_thread_seek
_decode_thread_seek:                    ## @decode_thread_seek
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	movq	_AV_TIME_BASE@GOTPCREL(%rip), %rax
	movsd	(%rax), %xmm1                   ## xmm1 = mem[0],zero
	mulsd	%xmm0, %xmm1
	cvttsd2si	%xmm1, %rcx
	xorl	%eax, %eax
	testq	%rcx, %rcx
	cmovleq	%rax, %rcx
	movq	_decode_last_video_time@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	movq	_decode_last_audio_time@GOTPCREL(%rip), %rax
	movsd	%xmm0, (%rax)
	movq	_fctx@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movq	_INT64_MIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_INT64_MAX@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	movl	$-1, %esi
	xorl	%r9d, %r9d
	callq	_avformat_seek_file
	testl	%eax, %eax
	jns	LBB0_2
## %bb.1:
	movq	_RETRO_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_log_cb
LBB0_2:
	movq	_actx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_audio_streams_ptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.3:
	callq	_avcodec_flush_buffers
LBB0_4:
	movq	_vctx@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	testq	%rdi, %rdi
	je	LBB0_6
## %bb.5:
	callq	_avcodec_flush_buffers
LBB0_6:
	movq	_sctx@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	_subtitle_streams_ptr@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movq	(%rax,%rcx,8), %rdi
	testq	%rdi, %rdi
	je	LBB0_7
## %bb.8:
	popq	%rbp
	jmp	_avcodec_flush_buffers          ## TAILCALL
LBB0_7:
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_TIME_BASE,8,3               ## @AV_TIME_BASE
	.comm	_decode_last_video_time,8,3     ## @decode_last_video_time
	.comm	_decode_last_audio_time,8,3     ## @decode_last_audio_time
	.comm	_fctx,4,2                       ## @fctx
	.comm	_INT64_MIN,4,2                  ## @INT64_MIN
	.comm	_INT64_MAX,4,2                  ## @INT64_MAX
	.comm	_RETRO_LOG_ERROR,4,2            ## @RETRO_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"av_seek_frame() failed.\n"

	.comm	_actx,8,3                       ## @actx
	.comm	_audio_streams_ptr,8,3          ## @audio_streams_ptr
	.comm	_vctx,8,3                       ## @vctx
	.comm	_sctx,8,3                       ## @sctx
	.comm	_subtitle_streams_ptr,8,3       ## @subtitle_streams_ptr
	.comm	_ass_track,8,3                  ## @ass_track
	.no_dead_strip	_decode_thread_seek
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function decode_thread_seek
_decode_thread_seek:                    ; @decode_thread_seek
	.cfi_startproc
; %bb.0:
	stp	x29, x30, [sp, #-16]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 16
	mov	x29, sp
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
Lloh0:
	adrp	x8, _AV_TIME_BASE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_TIME_BASE@GOTPAGEOFF]
Lloh2:
	ldr	d1, [x8]
	fmul	d1, d1, d0
	fcvtzs	x8, d1
	cmp	x8, #0
	csel	x3, x8, xzr, gt
Lloh3:
	adrp	x8, _decode_last_video_time@GOTPAGE
Lloh4:
	ldr	x8, [x8, _decode_last_video_time@GOTPAGEOFF]
Lloh5:
	str	d0, [x8]
Lloh6:
	adrp	x8, _decode_last_audio_time@GOTPAGE
Lloh7:
	ldr	x8, [x8, _decode_last_audio_time@GOTPAGEOFF]
Lloh8:
	str	d0, [x8]
Lloh9:
	adrp	x8, _fctx@GOTPAGE
Lloh10:
	ldr	x8, [x8, _fctx@GOTPAGEOFF]
Lloh11:
	ldr	w0, [x8]
Lloh12:
	adrp	x8, _INT64_MIN@GOTPAGE
Lloh13:
	ldr	x8, [x8, _INT64_MIN@GOTPAGEOFF]
Lloh14:
	ldr	w2, [x8]
Lloh15:
	adrp	x8, _INT64_MAX@GOTPAGE
Lloh16:
	ldr	x8, [x8, _INT64_MAX@GOTPAGEOFF]
Lloh17:
	ldr	w4, [x8]
	mov	w1, #-1
	mov	w5, #0
	bl	_avformat_seek_file
	tbz	w0, #31, LBB0_2
; %bb.1:
Lloh18:
	adrp	x8, _RETRO_LOG_ERROR@GOTPAGE
Lloh19:
	ldr	x8, [x8, _RETRO_LOG_ERROR@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
Lloh21:
	adrp	x1, l_.str@PAGE
Lloh22:
	add	x1, x1, l_.str@PAGEOFF
	bl	_log_cb
LBB0_2:
Lloh23:
	adrp	x8, _actx@GOTPAGE
Lloh24:
	ldr	x8, [x8, _actx@GOTPAGEOFF]
Lloh25:
	ldr	x8, [x8]
Lloh26:
	adrp	x9, _audio_streams_ptr@GOTPAGE
Lloh27:
	ldr	x9, [x9, _audio_streams_ptr@GOTPAGEOFF]
Lloh28:
	ldr	x9, [x9]
	ldr	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_4
; %bb.3:
	bl	_avcodec_flush_buffers
LBB0_4:
Lloh29:
	adrp	x8, _vctx@GOTPAGE
Lloh30:
	ldr	x8, [x8, _vctx@GOTPAGEOFF]
Lloh31:
	ldr	x0, [x8]
	cbz	x0, LBB0_6
; %bb.5:
	bl	_avcodec_flush_buffers
LBB0_6:
Lloh32:
	adrp	x8, _sctx@GOTPAGE
Lloh33:
	ldr	x8, [x8, _sctx@GOTPAGEOFF]
Lloh34:
	ldr	x8, [x8]
Lloh35:
	adrp	x9, _subtitle_streams_ptr@GOTPAGE
Lloh36:
	ldr	x9, [x9, _subtitle_streams_ptr@GOTPAGEOFF]
Lloh37:
	ldr	x9, [x9]
	ldr	x0, [x8, x9, lsl #3]
	cbz	x0, LBB0_8
; %bb.7:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_avcodec_flush_buffers
LBB0_8:
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotStr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotStr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_TIME_BASE,8,3               ; @AV_TIME_BASE
	.comm	_decode_last_video_time,8,3     ; @decode_last_video_time
	.comm	_decode_last_audio_time,8,3     ; @decode_last_audio_time
	.comm	_fctx,4,2                       ; @fctx
	.comm	_INT64_MIN,4,2                  ; @INT64_MIN
	.comm	_INT64_MAX,4,2                  ; @INT64_MAX
	.comm	_RETRO_LOG_ERROR,4,2            ; @RETRO_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"av_seek_frame() failed.\n"

	.comm	_actx,8,3                       ; @actx
	.comm	_audio_streams_ptr,8,3          ; @audio_streams_ptr
	.comm	_vctx,8,3                       ; @vctx
	.comm	_sctx,8,3                       ; @sctx
	.comm	_subtitle_streams_ptr,8,3       ; @subtitle_streams_ptr
	.comm	_ass_track,8,3                  ; @ass_track
	.no_dead_strip	_decode_thread_seek
.subsections_via_symbols
