	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function find_prev_closest_index
_find_prev_closest_index:               ## @find_prev_closest_index
	.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	$56, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r9, %r13
	movq	%r8, %r15
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movl	%edx, -56(%rbp)                 ## 4-byte Spill
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	24(%rbp), %r12
	movq	16(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	8(%rdi), %rax
	movq	%rax, -88(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movq	%r12, %rdi
	callq	_av_assert0
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	testq	%rax, %rax
	cmovgq	%rax, %rcx
	subq	%rcx, %r13
	movq	%rbx, 8(%r14)
	movl	-56(%rbp), %eax                 ## 4-byte Reload
	movl	%eax, (%r14)
	movq	_AVSEEK_FLAG_BACKWARD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	orl	16(%rbp), %edx
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%r14, %rdi
	movq	%r13, -48(%rbp)                 ## 8-byte Spill
	movq	%r13, %rsi
	callq	_av_index_search_timestamp
	movl	16(%rbp), %r9d
	movq	%rbx, %r8
	movq	%rax, (%r12)
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	_AVSEEK_FLAG_ANY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_AVINDEX_KEYFRAME@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movq	%rax, %rsi
	shlq	$4, %rsi
	addq	%r8, %rsi
	decq	%rax
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_5:                                 ##   in Loop: Header=BB0_2 Depth=1
	movq	%rax, (%r12)
LBB0_6:                                 ##   in Loop: Header=BB0_2 Depth=1
	addq	$-16, %rsi
	addq	$-1, %rax
	jae	LBB0_7
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rsi), %rdi
	cmpq	-16(%rsi), %rdi
	jne	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%r9d, %ecx
	jne	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_2 Depth=1
	testl	%edx, -8(%rsi)
	jne	LBB0_5
	jmp	LBB0_6
LBB0_7:
	movq	-80(%rbp), %rbx                 ## 8-byte Reload
	testq	%rbx, %rbx
	je	LBB0_23
## %bb.8:
	movq	%r8, -72(%rbp)                  ## 8-byte Spill
	movq	40(%rbp), %r14
	movq	32(%rbp), %r13
	movq	%r13, %rdi
	callq	_av_assert0
	movq	%r14, %rdi
	callq	_av_assert0
	movq	$0, (%r13)
	movq	$0, (%r14)
	cmpq	$0, (%r12)
	je	LBB0_9
## %bb.18:
	xorl	%edx, %edx
	xorl	%eax, %eax
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	jmp	LBB0_19
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	incq	%rax
	movq	(%r12), %rcx
	cmpq	%rcx, %rax
	jae	LBB0_10
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r15, (%r13)
	jae	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	incq	%rdx
	movq	%rdx, (%r14)
	movq	(%r13), %rcx
	movq	%rcx, %rsi
	shlq	$4, %rsi
	cmpq	%rdx, (%rbx,%rsi)
	jne	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	incq	%rcx
	movq	%rcx, (%r13)
	movq	$0, (%r14)
	xorl	%edx, %edx
	jmp	LBB0_22
LBB0_9:
	xorl	%ecx, %ecx
	movq	-48(%rbp), %r8                  ## 8-byte Reload
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
LBB0_10:
	movq	(%r13), %rdx
	cmpq	%r15, %rdx
	jae	LBB0_23
## %bb.11:
	movq	_AVINDEX_KEYFRAME@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	%rcx, %rsi
	shlq	$4, %rsi
	shlq	$4, %rdx
	movq	8(%rbx,%rdx), %rdx
	addq	(%rdi,%rsi), %rdx
	cmpq	%r8, %rdx
	ja	LBB0_14
## %bb.13:                              ##   in Loop: Header=BB0_12 Depth=1
	testl	%eax, 8(%rdi,%rsi)
	jne	LBB0_23
LBB0_14:                                ##   in Loop: Header=BB0_12 Depth=1
	decq	%rcx
	movq	%rcx, (%r12)
	movq	(%r14), %rcx
	testq	%rcx, %rcx
	jne	LBB0_16
## %bb.15:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r13), %rcx
	decq	%rcx
	movq	%rcx, (%r13)
	shlq	$4, %rcx
	movq	(%rbx,%rcx), %rcx
LBB0_16:                                ##   in Loop: Header=BB0_12 Depth=1
	decq	%rcx
	movq	%rcx, (%r14)
	movq	(%r13), %rdx
	cmpq	%r15, %rdx
	jae	LBB0_23
## %bb.17:                              ##   in Loop: Header=BB0_12 Depth=1
	movq	(%r12), %rcx
	jmp	LBB0_12
LBB0_23:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	-88(%rbp), %rcx                 ## 8-byte Reload
	movq	%rcx, 8(%rax)
	movl	-60(%rbp), %ecx                 ## 4-byte Reload
	movl	%ecx, (%rax)
	xorl	%eax, %eax
	addq	$56, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVSEEK_FLAG_BACKWARD,4,2       ## @AVSEEK_FLAG_BACKWARD
	.comm	_AVSEEK_FLAG_ANY,4,2            ## @AVSEEK_FLAG_ANY
	.comm	_AVINDEX_KEYFRAME,4,2           ## @AVINDEX_KEYFRAME
	.no_dead_strip	_find_prev_closest_index
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function find_prev_closest_index
_find_prev_closest_index:               ; @find_prev_closest_index
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x19, x7
	mov	x25, x6
	mov	x24, x5
	mov	x20, x4
	mov	x21, x3
	mov	x26, x2
	mov	x23, x1
	mov	x22, x0
	ldp	x8, x27, [x0, #8]
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w28, [x0]
	mov	x0, x7
	bl	_av_assert0
	ldr	x8, [x27]
	cmp	x8, #0
	csel	x8, x8, xzr, gt
	sub	x24, x24, x8
	str	x23, [x22, #8]
	str	w26, [x22]
Lloh0:
	adrp	x8, _AVSEEK_FLAG_BACKWARD@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVSEEK_FLAG_BACKWARD@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	orr	w2, w8, w25
	mov	x0, x22
	mov	x1, x24
	bl	_av_index_search_timestamp
	str	x0, [x19]
	cbz	x0, LBB0_7
; %bb.1:
Lloh3:
	adrp	x8, _AVSEEK_FLAG_ANY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVSEEK_FLAG_ANY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	and	w8, w8, w25
Lloh6:
	adrp	x9, _AVINDEX_KEYFRAME@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AVINDEX_KEYFRAME@GOTPAGEOFF]
Lloh8:
	ldr	w9, [x9]
	add	x10, x23, x0, lsl #4
	sub	x11, x0, #1
	b	LBB0_4
LBB0_2:                                 ;   in Loop: Header=BB0_4 Depth=1
	str	x11, [x19]
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	sub	x10, x10, #16
	sub	x11, x11, #1
	cmn	x11, #1
	b.eq	LBB0_7
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x12, [x10]
	ldur	x13, [x10, #-16]
	cmp	x12, x13
	b.ne	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	cbnz	w8, LBB0_2
; %bb.6:                                ;   in Loop: Header=BB0_4 Depth=1
	ldur	w12, [x10, #-8]
	tst	w9, w12
	b.ne	LBB0_2
	b	LBB0_3
LBB0_7:
	cbz	x21, LBB0_23
; %bb.8:
	ldp	x26, x25, [x29, #16]
	mov	x0, x26
	bl	_av_assert0
	mov	x0, x25
	bl	_av_assert0
	str	xzr, [x26]
	str	xzr, [x25]
	ldr	x8, [x19]
	cbz	x8, LBB0_14
; %bb.9:
	mov	x8, #0
	mov	x10, #0
	b	LBB0_11
LBB0_10:                                ;   in Loop: Header=BB0_11 Depth=1
	add	x10, x10, #1
	ldr	x9, [x19]
	cmp	x10, x9
	b.hs	LBB0_15
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x26]
	cmp	x9, x20
	b.hs	LBB0_10
; %bb.12:                               ;   in Loop: Header=BB0_11 Depth=1
	add	x8, x8, #1
	str	x8, [x25]
	ldr	x9, [x26]
	lsl	x11, x9, #4
	ldr	x11, [x21, x11]
	cmp	x11, x8
	b.ne	LBB0_10
; %bb.13:                               ;   in Loop: Header=BB0_11 Depth=1
	mov	x8, #0
	add	x9, x9, #1
	str	x9, [x26]
	str	xzr, [x25]
	b	LBB0_10
LBB0_14:
	mov	x9, #0
LBB0_15:
	ldr	x10, [x26]
	cmp	x10, x20
	b.hs	LBB0_23
; %bb.16:
Lloh9:
	adrp	x8, _AVINDEX_KEYFRAME@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AVINDEX_KEYFRAME@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
LBB0_17:                                ; =>This Inner Loop Header: Depth=1
	lsl	x11, x9, #4
	ldr	x11, [x23, x11]
	add	x10, x21, x10, lsl #4
	ldr	x10, [x10, #8]
	add	x10, x10, x11
	cmp	x10, x24
	b.hi	LBB0_19
; %bb.18:                               ;   in Loop: Header=BB0_17 Depth=1
	add	x10, x23, x9, lsl #4
	ldr	w10, [x10, #8]
	tst	w8, w10
	b.ne	LBB0_23
LBB0_19:                                ;   in Loop: Header=BB0_17 Depth=1
	sub	x9, x9, #1
	str	x9, [x19]
	ldr	x9, [x25]
	cbnz	x9, LBB0_21
; %bb.20:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x9, [x26]
	sub	x9, x9, #1
	str	x9, [x26]
	lsl	x9, x9, #4
	ldr	x9, [x21, x9]
LBB0_21:                                ;   in Loop: Header=BB0_17 Depth=1
	sub	x9, x9, #1
	str	x9, [x25]
	ldr	x10, [x26]
	cmp	x10, x20
	b.hs	LBB0_23
; %bb.22:                               ;   in Loop: Header=BB0_17 Depth=1
	ldr	x9, [x19]
	b	LBB0_17
LBB0_23:
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x8, [x22, #8]
	str	w28, [x22]
	mov	w0, #0
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_AVSEEK_FLAG_BACKWARD,4,2       ; @AVSEEK_FLAG_BACKWARD
	.comm	_AVSEEK_FLAG_ANY,4,2            ; @AVSEEK_FLAG_ANY
	.comm	_AVINDEX_KEYFRAME,4,2           ; @AVINDEX_KEYFRAME
	.no_dead_strip	_find_prev_closest_index
.subsections_via_symbols
