	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function adjust_frame_rate
_adjust_frame_rate:                     ## @adjust_frame_rate
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %rbx
	cmpl	$0, (%rdi)
	je	LBB0_6
## %bb.1:
	testq	%rsi, %rsi
	je	LBB0_7
## %bb.2:
	movsd	8(%rbx), %xmm0                  ## xmm0 = mem[0],zero
	movq	_AV_NOPTS_VALUE@GOTPCREL(%rip), %rax
	cvtsi2sdq	(%rax), %xmm1
	ucomisd	%xmm1, %xmm0
	jne	LBB0_4
	jp	LBB0_4
## %bb.3:
	movsd	8(%rsi), %xmm0                  ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rbx)
LBB0_4:
	movl	48(%rbx), %edi
	callq	_hb_list_add
	movl	48(%rbx), %edi
	callq	_hb_list_count
	cmpl	$2, %eax
	jl	LBB0_5
## %bb.8:
	movl	%eax, %r14d
	movl	48(%rbx), %edi
	leal	-2(%r14), %esi
	callq	_hb_list_item
	movq	%rax, %r15
	movl	48(%rbx), %edi
	movl	%r14d, %r12d
	decl	%r12d
	movl	%r12d, %esi
	callq	_hb_list_item
	movl	56(%rbx), %edi
	movq	%r15, %rsi
	movq	%rax, %rdx
	callq	_motion_metric
	movq	40(%rbx), %rcx
	movq	%rax, (%rcx,%r12,8)
	cmpl	16(%rbx), %r14d
	jge	LBB0_10
LBB0_5:
	xorl	%esi, %esi
	jmp	LBB0_20
LBB0_6:
	incl	32(%rbx)
	movsd	(%rsi), %xmm0                   ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rbx)
	jmp	LBB0_20
LBB0_7:
	movl	48(%rbx), %edi
	callq	_hb_list_count
	movl	%eax, %r14d
LBB0_10:
	leaq	-36(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	%rbx, %rdi
	movl	%r14d, %esi
	callq	_find_drop_frame
	movl	48(%rbx), %edi
	testl	%eax, %eax
	js	LBB0_12
## %bb.11:
	movl	%eax, %r15d
	movl	%eax, %esi
	callq	_hb_list_item
	movq	%rax, -64(%rbp)
	movl	48(%rbx), %edi
	movq	%rax, %rsi
	callq	_hb_list_rem
	leaq	-64(%rbp), %rdi
	callq	_hb_buffer_close
	movq	40(%rbx), %rdi
	movl	%r15d, %esi
	movl	%r14d, %edx
	callq	_delete_metric
	incl	52(%rbx)
	xorl	%esi, %esi
	jmp	LBB0_20
LBB0_12:
	xorl	%esi, %esi
	callq	_hb_list_item
	movq	%rax, %r15
	movl	48(%rbx), %edi
	movq	%rax, %rsi
	callq	_hb_list_rem
	leaq	-36(%rbp), %rdi
	movq	%r15, %rsi
	callq	_hb_buffer_list_append
	movq	40(%rbx), %rdi
	xorl	%esi, %esi
	movl	%r14d, %edx
	callq	_delete_metric
	movsd	8(%rbx), %xmm1                  ## xmm1 = mem[0],zero
	movsd	%xmm1, 8(%r15)
	movsd	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero
	incl	32(%rbx)
	addsd	%xmm0, %xmm1
	cmpl	$2, (%rbx)
	movsd	(%r15), %xmm2                   ## xmm2 = mem[0],zero
	jl	LBB0_15
## %bb.13:
	ucomisd	%xmm2, %xmm1
	jbe	LBB0_18
## %bb.14:
	movsd	%xmm1, 8(%rbx)
	movsd	%xmm1, (%r15)
	jmp	LBB0_19
LBB0_15:
	subsd	%xmm1, %xmm2
	movsd	%xmm1, 8(%rbx)
	movsd	%xmm1, (%r15)
	ucomisd	%xmm0, %xmm2
	movsd	%xmm1, -48(%rbp)                ## 8-byte Spill
	jb	LBB0_19
## %bb.16:
	leaq	-36(%rbp), %r14
	.p2align	4, 0x90
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movsd	%xmm2, -56(%rbp)                ## 8-byte Spill
	movq	%r15, %rdi
	callq	_hb_buffer_dup
	movq	$0, 24(%rax)
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	movsd	%xmm0, 8(%rax)
	addsd	24(%rbx), %xmm0
	movsd	%xmm0, 8(%rbx)
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	movsd	%xmm0, (%rax)
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	movsd	-56(%rbp), %xmm2                ## 8-byte Reload
                                        ## xmm2 = mem[0],zero
	incl	36(%rbx)
	incl	32(%rbx)
	movsd	24(%rbx), %xmm0                 ## xmm0 = mem[0],zero
	subsd	%xmm0, %xmm2
	ucomisd	%xmm0, %xmm2
	jae	LBB0_17
	jmp	LBB0_19
LBB0_18:
	movsd	%xmm2, 8(%rbx)
LBB0_19:
	leaq	-36(%rbp), %rdi
	callq	_hb_buffer_list_clear
	movq	%rax, %rsi
LBB0_20:
	movq	%rsi, %rax
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ## @AV_NOPTS_VALUE
	.comm	_stderr,4,2                     ## @stderr
	.no_dead_strip	_adjust_frame_rate
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function adjust_frame_rate
_adjust_frame_rate:                     ; @adjust_frame_rate
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	d11, d10, [sp, #16]             ; 16-byte Folded Spill
	stp	d9, d8, [sp, #32]               ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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 b8, -56
	.cfi_offset b9, -64
	.cfi_offset b10, -72
	.cfi_offset b11, -80
	mov	x19, x0
	ldr	w8, [x0]
	cbz	w8, LBB0_7
; %bb.1:
	cbz	x1, LBB0_8
; %bb.2:
	ldr	d0, [x19, #8]
Lloh0:
	adrp	x8, _AV_NOPTS_VALUE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_NOPTS_VALUE@GOTPAGEOFF]
Lloh2:
	ldr	d1, [x8]
	scvtf	d1, d1
	fcmp	d0, d1
	b.ne	LBB0_4
; %bb.3:
	ldr	d0, [x1, #8]
	str	d0, [x19, #8]
LBB0_4:
	ldr	w0, [x19, #48]
	bl	_hb_list_add
	ldr	w0, [x19, #48]
	bl	_hb_list_count
	subs	w1, w0, #2
	b.lt	LBB0_6
; %bb.5:
	mov	x20, x0
	ldr	w0, [x19, #48]
	bl	_hb_list_item
	mov	x21, x0
	ldr	w0, [x19, #48]
	sub	w22, w20, #1
	mov	x1, x22
	bl	_hb_list_item
	mov	x2, x0
	ldr	w0, [x19, #56]
	mov	x1, x21
	bl	_motion_metric
	ldr	x8, [x19, #40]
	str	x0, [x8, w22, uxtw #3]
	ldr	w8, [x19, #16]
	cmp	w20, w8
	b.ge	LBB0_9
LBB0_6:
	mov	x1, #0
	b	LBB0_19
LBB0_7:
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	ldr	d0, [x1]
	str	d0, [x19, #8]
	b	LBB0_19
LBB0_8:
	ldr	w0, [x19, #48]
	bl	_hb_list_count
	mov	x20, x0
LBB0_9:
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	mov	x0, x19
	mov	x1, x20
	bl	_find_drop_frame
	mov	x21, x0
	ldr	w0, [x19, #48]
	tbnz	w21, #31, LBB0_11
; %bb.10:
	mov	x1, x21
	bl	_hb_list_item
	mov	x1, x0
	str	x0, [sp]
	ldr	w0, [x19, #48]
	bl	_hb_list_rem
	mov	x0, sp
	bl	_hb_buffer_close
	ldr	x0, [x19, #40]
	mov	x1, x21
	mov	x2, x20
	bl	_delete_metric
	mov	x1, #0
	ldr	w8, [x19, #52]
	add	w8, w8, #1
	str	w8, [x19, #52]
	b	LBB0_19
LBB0_11:
	mov	w1, #0
	bl	_hb_list_item
	mov	x21, x0
	ldr	w0, [x19, #48]
	mov	x1, x21
	bl	_hb_list_rem
	add	x0, sp, #12
	mov	x1, x21
	bl	_hb_buffer_list_append
	ldr	x0, [x19, #40]
	mov	w1, #0
	mov	x2, x20
	bl	_delete_metric
	ldr	d1, [x19, #8]
	str	d1, [x21, #8]
	ldr	d0, [x19, #24]
	fadd	d8, d1, d0
	ldr	w8, [x19, #32]
	add	w8, w8, #1
	str	w8, [x19, #32]
	ldr	w8, [x19]
	ldr	d1, [x21]
	cmp	w8, #2
	b.lt	LBB0_14
; %bb.12:
	fcmp	d1, d8
	b.pl	LBB0_17
; %bb.13:
	str	d8, [x19, #8]
	str	d8, [x21]
	b	LBB0_18
LBB0_14:
	fsub	d9, d1, d8
	str	d8, [x19, #8]
	str	d8, [x21]
	fcmp	d9, d0
	b.lt	LBB0_18
; %bb.15:
	movi.2s	v10, #1
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	mov	x0, x21
	bl	_hb_buffer_dup
	mov	x1, x0
	str	xzr, [x0, #24]
	str	d8, [x0, #8]
	ldr	d0, [x19, #24]
	fadd	d8, d8, d0
	str	d8, [x19, #8]
	str	d8, [x0]
	add	x0, sp, #12
	bl	_hb_buffer_list_append
	ldp	d1, d0, [x19, #24]
	add.2s	v0, v0, v10
	str	d0, [x19, #32]
	fsub	d9, d9, d1
	fcmp	d9, d1
	b.ge	LBB0_16
	b	LBB0_18
LBB0_17:
	str	d1, [x19, #8]
LBB0_18:
	add	x0, sp, #12
	bl	_hb_buffer_list_clear
	mov	x1, x0
LBB0_19:
	mov	x0, x1
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	ldp	d11, d10, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_NOPTS_VALUE,8,3             ; @AV_NOPTS_VALUE
	.comm	_stderr,4,2                     ; @stderr
	.no_dead_strip	_adjust_frame_rate
.subsections_via_symbols
