	.file	"extr_vfr.c_adjust_frame_rate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	adjust_frame_rate, @function
adjust_frame_rate:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 56
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR fs:40
	mov	QWORD PTR 40[rsp], rax
	xor	eax, eax
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	je	.L28
	mov	edi, DWORD PTR 48[rdi]
	test	rsi, rsi
	je	.L4
	pxor	xmm0, xmm0
	cvtsi2sd	xmm0, QWORD PTR AV_NOPTS_VALUE[rip]
	ucomisd	xmm0, QWORD PTR 8[rbx]
	jp	.L5
	jne	.L5
	movsd	xmm0, QWORD PTR 8[rsi]
	movsd	QWORD PTR 8[rbx], xmm0
.L5:
	call	hb_list_add@PLT
	mov	edi, DWORD PTR 48[rbx]
	call	hb_list_count@PLT
	mov	r13d, eax
	cmp	eax, 1
	jle	.L26
	mov	edi, DWORD PTR 48[rbx]
	lea	esi, -2[rax]
	call	hb_list_item@PLT
	mov	edi, DWORD PTR 48[rbx]
	lea	esi, -1[r13]
	mov	rbp, rax
	call	hb_list_item@PLT
	mov	rcx, QWORD PTR 40[rbx]
	mov	edi, DWORD PTR 56[rbx]
	mov	rsi, rbp
	mov	rdx, rax
	movsx	rax, r13d
	lea	r12, -8[rcx+rax*8]
	call	motion_metric@PLT
	mov	QWORD PTR [r12], rax
	cmp	DWORD PTR 16[rbx], r13d
	jg	.L26
.L9:
	lea	rbp, 28[rsp]
	mov	rdi, rbp
	call	hb_buffer_list_clear@PLT
	mov	rdi, rbx
	mov	esi, r13d
	call	find_drop_frame@PLT
	mov	edi, DWORD PTR 48[rbx]
	mov	r12d, eax
	test	eax, eax
	jns	.L29
	xor	esi, esi
	call	hb_list_item@PLT
	mov	edi, DWORD PTR 48[rbx]
	mov	rsi, rax
	mov	QWORD PTR 32[rsp], rax
	call	hb_list_rem@PLT
	mov	rsi, QWORD PTR 32[rsp]
	mov	rdi, rbp
	call	hb_buffer_list_append@PLT
	mov	rdi, QWORD PTR 40[rbx]
	xor	esi, esi
	mov	edx, r13d
	call	delete_metric@PLT
	mov	rdi, QWORD PTR 32[rsp]
	movsd	xmm0, QWORD PTR 8[rbx]
	movsd	xmm2, QWORD PTR 24[rbx]
	movsd	QWORD PTR 8[rdi], xmm0
	movsd	xmm1, QWORD PTR [rdi]
	add	DWORD PTR 32[rbx], 1
	cmp	DWORD PTR [rbx], 1
	addsd	xmm0, xmm2
	jle	.L11
	comisd	xmm0, xmm1
	ja	.L30
	movsd	QWORD PTR 8[rbx], xmm1
.L14:
	mov	rdi, rbp
	call	hb_buffer_list_clear@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L29:
	mov	esi, eax
	call	hb_list_item@PLT
	mov	edi, DWORD PTR 48[rbx]
	mov	rsi, rax
	mov	QWORD PTR 32[rsp], rax
	call	hb_list_rem@PLT
	lea	rdi, 32[rsp]
	call	hb_buffer_close@PLT
	mov	rdi, QWORD PTR 40[rbx]
	mov	edx, r13d
	mov	esi, r12d
	call	delete_metric@PLT
	add	DWORD PTR 52[rbx], 1
.L26:
	xor	eax, eax
.L1:
	mov	rcx, QWORD PTR 40[rsp]
	xor	rcx, QWORD PTR fs:40
	jne	.L31
	add	rsp, 56
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	movsd	xmm0, QWORD PTR [rsi]
	add	DWORD PTR 32[rdi], 1
	mov	rax, rsi
	movsd	QWORD PTR 8[rdi], xmm0
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L30:
	movsd	QWORD PTR 8[rbx], xmm0
	movsd	QWORD PTR [rdi], xmm0
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L11:
	subsd	xmm1, xmm0
	movsd	QWORD PTR 8[rbx], xmm0
	movsd	QWORD PTR [rdi], xmm0
	comisd	xmm1, xmm2
	jnb	.L18
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L32:
	mov	rdi, QWORD PTR 32[rsp]
	movsd	xmm0, QWORD PTR [rsp]
.L18:
	movsd	QWORD PTR 8[rsp], xmm1
	movsd	QWORD PTR [rsp], xmm0
	call	hb_buffer_dup@PLT
	movsd	xmm0, QWORD PTR [rsp]
	mov	rdi, rbp
	mov	QWORD PTR 24[rax], 0
	mov	rsi, rax
	movsd	QWORD PTR 8[rax], xmm0
	addsd	xmm0, QWORD PTR 24[rbx]
	movsd	QWORD PTR 8[rbx], xmm0
	movsd	QWORD PTR [rax], xmm0
	movsd	QWORD PTR [rsp], xmm0
	call	hb_buffer_list_append@PLT
	movsd	xmm2, QWORD PTR 24[rbx]
	movsd	xmm1, QWORD PTR 8[rsp]
	add	DWORD PTR 36[rbx], 1
	subsd	xmm1, xmm2
	add	DWORD PTR 32[rbx], 1
	comisd	xmm1, xmm2
	jnb	.L32
	jmp	.L14
	.p2align 4,,10
	.p2align 3
.L4:
	call	hb_list_count@PLT
	mov	r13d, eax
	jmp	.L9
.L31:
	call	__stack_chk_fail@PLT
	.cfi_endproc
.LFE0:
	.size	adjust_frame_rate, .-adjust_frame_rate
	.comm	stderr,4,4
	.comm	AV_NOPTS_VALUE,8,8
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_vfr.c_adjust_frame_rate.c"
	.text
	.global	__aeabi_i2d
	.global	__aeabi_dcmpeq
	.global	__aeabi_dadd
	.global	__aeabi_dcmplt
	.global	__aeabi_dsub
	.global	__aeabi_dcmple
	.section	.rodata.cst4,"aM",%progbits,4
	.align	2
.LC0:
	.word	__stack_chk_guard
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	adjust_frame_rate, %function
adjust_frame_rate:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, [r0]
	sub	sp, sp, #20
	cmp	r3, #0
	ldr	r3, .L31
	mov	r10, r0
	mov	r4, r1
	ldr	r3, [r3]
	str	r3, [sp, #12]
	mov	r3,#0
	beq	.L26
	cmp	r1, #0
	ldr	r5, [r0, #44]
	beq	.L4
	ldr	r3, .L31+4
	ldr	r0, [r3]
	bl	__aeabi_i2d
	mov	r2, r0
	mov	r3, r1
	add	r1, r10, #8
	ldmia	r1, {r0-r1}
	bl	__aeabi_dcmpeq
	cmp	r0, #0
	addne	r3, r4, #8
	ldmiane	r3, {r2-r3}
	strne	r2, [r10, #8]
	strne	r3, [r10, #12]
.L5:
	mov	r1, r4
	mov	r0, r5
	bl	hb_list_add
	ldr	r0, [r10, #44]
	bl	hb_list_count
	cmp	r0, #1
	mov	r5, r0
	ble	.L8
	sub	r1, r0, #2
	ldr	r0, [r10, #44]
	bl	hb_list_item
	sub	r1, r5, #1
	mov	r4, r0
	ldr	r0, [r10, #44]
	bl	hb_list_item
	mov	r1, r4
	mov	r2, r0
	ldr	r0, [r10, #52]
	ldr	r4, [r10, #40]
	bl	motion_metric
	ldr	r2, [r10, #16]
	sub	r3, r5, #-1073741823
	cmp	r2, r5
	str	r0, [r4, r3, lsl #2]
	bgt	.L8
.L9:
	add	r0, sp, #4
	bl	hb_buffer_list_clear
	mov	r1, r5
	mov	r0, r10
	bl	find_drop_frame
	subs	r4, r0, #0
	bge	.L27
	mov	r1, #0
	ldr	r0, [r10, #44]
	bl	hb_list_item
	mov	r1, r0
	ldr	r0, [r10, #44]
	str	r1, [sp, #8]
	bl	hb_list_rem
	ldr	r1, [sp, #8]
	add	r0, sp, #4
	bl	hb_buffer_list_append
	mov	r2, r5
	mov	r1, #0
	ldr	r0, [r10, #40]
	bl	delete_metric
	add	r3, r10, #8
	ldmia	r3, {r2-r3}
	add	r9, r10, #24
	ldmia	r9, {r8-r9}
	ldr	fp, [sp, #8]
	mov	r0, r2
	str	r2, [fp, #8]
	str	r3, [fp, #12]
	mov	r1, r3
	mov	r2, r8
	mov	r3, r9
	bl	__aeabi_dadd
	ldr	r3, [r10, #32]
	ldr	r2, [r10]
	add	r3, r3, #1
	cmp	r2, #1
	mov	r4, r0
	mov	r5, r1
	str	r3, [r10, #32]
	ble	.L11
	ldmia	fp, {r6-r7}
	mov	r2, r0
	mov	r3, r1
	mov	r0, r6
	mov	r1, r7
	bl	__aeabi_dcmplt
	cmp	r0, #0
	bne	.L28
	str	r6, [r10, #8]
	str	r7, [r10, #12]
.L14:
	add	r0, sp, #4
	bl	hb_buffer_list_clear
	b	.L1
.L26:
	ldmia	r1, {r2-r3}
	ldr	r1, [r0, #32]
	str	r2, [r0, #8]
	str	r3, [r0, #12]
	add	r3, r1, #1
	str	r3, [r0, #32]
	mov	r0, r4
.L1:
	ldr	r3, .L31
	ldr	r2, [r3]
	ldr	r3, [sp, #12]
	eors	r2, r3, r2
	mov	r3, #0
	bne	.L29
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L8:
	mov	r0, #0
	b	.L1
.L28:
	str	r4, [r10, #8]
	str	r5, [r10, #12]
	stm	fp, {r4-r5}
	b	.L14
.L11:
	mov	r2, r0
	mov	r3, r1
	ldmia	fp, {r0-r1}
	bl	__aeabi_dsub
	mov	r6, r0
	mov	r7, r1
	str	r4, [r10, #8]
	str	r5, [r10, #12]
	mov	r0, r8
	mov	r1, r9
	mov	r2, r6
	mov	r3, r7
	stm	fp, {r4-r5}
	bl	__aeabi_dcmple
	cmp	r0, #0
	bne	.L18
	b	.L14
.L30:
	ldr	fp, [sp, #8]
.L18:
	mov	r0, fp
	bl	hb_buffer_dup
	add	r3, r10, #24
	ldmia	r3, {r2-r3}
	mov	r1, #0
	mov	r8, r0
	str	r4, [r0, #8]
	str	r5, [r0, #12]
	str	r1, [r0, #24]
	mov	r0, r4
	mov	r1, r5
	bl	__aeabi_dadd
	mov	r4, r0
	mov	r5, r1
	add	r0, sp, #4
	mov	r1, r8
	str	r4, [r10, #8]
	str	r5, [r10, #12]
	stm	r8, {r4-r5}
	bl	hb_buffer_list_append
	add	r9, r10, #24
	ldmia	r9, {r8-r9}
	ldr	r2, [r10, #36]
	ldr	r3, [r10, #32]
	add	r2, r2, #1
	add	r3, r3, #1
	mov	r0, r6
	mov	r1, r7
	str	r2, [r10, #36]
	str	r3, [r10, #32]
	mov	r2, r8
	mov	r3, r9
	bl	__aeabi_dsub
	mov	r6, r0
	mov	r7, r1
	mov	r0, r8
	mov	r1, r9
	mov	r2, r6
	mov	r3, r7
	bl	__aeabi_dcmple
	cmp	r0, #0
	bne	.L30
	b	.L14
.L4:
	mov	r0, r5
	bl	hb_list_count
	mov	r5, r0
	b	.L9
.L27:
	mov	r1, r4
	ldr	r0, [r10, #44]
	bl	hb_list_item
	mov	r1, r0
	ldr	r0, [r10, #44]
	str	r1, [sp, #8]
	bl	hb_list_rem
	add	r0, sp, #8
	bl	hb_buffer_close
	mov	r2, r5
	mov	r1, r4
	ldr	r0, [r10, #40]
	bl	delete_metric
	ldr	r3, [r10, #48]
	mov	r0, #0
	add	r3, r3, #1
	str	r3, [r10, #48]
	b	.L1
.L29:
	bl	__stack_chk_fail
.L32:
	.align	2
.L31:
	.word	.LC0
	.word	AV_NOPTS_VALUE
	.size	adjust_frame_rate, .-adjust_frame_rate
	.comm	stderr,4,4
	.comm	AV_NOPTS_VALUE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
