	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal8,8byte_literals
	.p2align	3                               ## -- Begin function do_video_stats
LCPI0_0:
	.quad	0x406fe00000000000              ## double 255
LCPI0_1:
	.quad	0x3f847ae147ae147b              ## double 0.01
LCPI0_2:
	.quad	0x408f400000000000              ## double 1000
LCPI0_3:
	.quad	0x3f50000000000000              ## double 9.765625E-4
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_do_video_stats:                        ## @do_video_stats
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_vstats_file@GOTPCREL(%rip), %r13
	cmpq	$0, (%r13)
	jne	LBB0_3
## %bb.1:
	movq	_vstats_filename@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	leaq	L_.str(%rip), %rsi
	callq	_fopen
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_2
LBB0_3:
	movq	40(%r12), %r15
	movq	(%r15), %rax
	movq	_AVMEDIA_TYPE_VIDEO@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_14
## %bb.4:
	movq	32(%r12), %rax
	movl	(%rax), %r8d
	movq	_vstats_version@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	movq	(%r13), %rdi
	jg	LBB0_6
## %bb.5:
	movq	_FF_QP2LAMBDA@GOTPCREL(%rip), %rax
	cvtsi2ssq	(%rax), %xmm0
	movss	(%r12), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	leaq	L_.str.2(%rip), %rsi
	movl	%r8d, %edx
	movb	$1, %al
	callq	_fprintf
	jmp	LBB0_7
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_6:
	movl	4(%r12), %edx
	movq	_FF_QP2LAMBDA@GOTPCREL(%rip), %rax
	cvtsi2ssq	(%rax), %xmm0
	movl	8(%r12), %ecx
	movss	(%r12), %xmm1                   ## xmm1 = mem[0],zero,zero,zero
	divss	%xmm0, %xmm1
	xorps	%xmm0, %xmm0
	cvtss2sd	%xmm1, %xmm0
	leaq	L_.str.3(%rip), %rsi
	movb	$1, %al
	callq	_fprintf
LBB0_7:
	movq	16(%r12), %rax
	movsd	(%rax), %xmm0                   ## xmm0 = mem[0],zero
	xorps	%xmm1, %xmm1
	ucomisd	%xmm1, %xmm0
	jb	LBB0_10
## %bb.8:
	movq	_AV_CODEC_FLAG_PSNR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r15)
	je	LBB0_10
## %bb.9:
	movq	(%r13), %rbx
	movsd	16(%r15), %xmm1                 ## xmm1 = mem[0],zero
	mulsd	24(%r15), %xmm1
	movsd	LCPI0_0(%rip), %xmm2            ## xmm2 = mem[0],zero
	mulsd	%xmm2, %xmm1
	mulsd	%xmm2, %xmm1
	divsd	%xmm1, %xmm0
	callq	_psnr
	cvttsd2si	%xmm0, %edx
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_fprintf
LBB0_10:
	movq	(%r13), %rdi
	leaq	L_.str.5(%rip), %rsi
	movl	%r14d, %edx
	xorl	%eax, %eax
	callq	_fprintf
	movq	32(%r12), %rdi
	callq	_av_stream_get_end_pts
	movl	%eax, %ebx
	movq	32(%r12), %rax
	movl	4(%rax), %edi
	callq	_av_q2d
	imull	%ebx, %eax
	testl	%eax, %eax
	jle	LBB0_11
## %bb.12:
	xorps	%xmm0, %xmm0
	cvtsi2sd	%eax, %xmm0
	jmp	LBB0_13
LBB0_11:
	movsd	LCPI0_1(%rip), %xmm0            ## xmm0 = mem[0],zero
LBB0_13:
	movsd	%xmm0, -48(%rbp)                ## 8-byte Spill
	shll	$3, %r14d
	movl	32(%r15), %edi
	callq	_av_q2d
	movl	%eax, %ecx
	movl	%r14d, %eax
	cltd
	idivl	%ecx
	xorps	%xmm1, %xmm1
	cvtsi2sd	%eax, %xmm1
	movsd	LCPI0_2(%rip), %xmm3            ## xmm3 = mem[0],zero
	divsd	%xmm3, %xmm1
	movl	24(%r12), %eax
	leal	(,%rax,8), %ecx
	xorps	%xmm2, %xmm2
	cvtsi2sd	%ecx, %xmm2
	movsd	-48(%rbp), %xmm0                ## 8-byte Reload
                                        ## xmm0 = mem[0],zero
	divsd	%xmm0, %xmm2
	divsd	%xmm3, %xmm2
	movq	(%r13), %rdi
	xorps	%xmm3, %xmm3
	cvtsi2sd	%eax, %xmm3
	mulsd	LCPI0_3(%rip), %xmm3
	cvttsd2si	%xmm3, %edx
	leaq	L_.str.6(%rip), %rsi
	movb	$3, %al
	callq	_fprintf
	movq	(%r13), %rbx
	movl	28(%r12), %edi
	callq	_av_get_picture_type_char
	leaq	L_.str.7(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_fprintf                        ## TAILCALL
LBB0_2:
	callq	_do_video_stats.cold.1
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.p2align	4, 0x90                         ## -- Begin function do_video_stats.cold.1
_do_video_stats.cold.1:                 ## @do_video_stats.cold.1
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	leaq	L_.str.1(%rip), %rdi
	callq	_perror
	pushq	$1
	popq	%rdi
	popq	%rbp
	jmp	_exit_program                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_vstats_file,8,3                ## @vstats_file
	.comm	_vstats_filename,4,2            ## @vstats_filename
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"w"

L_.str.1:                               ## @.str.1
	.asciz	"fopen"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ## @AVMEDIA_TYPE_VIDEO
	.comm	_vstats_version,4,2             ## @vstats_version
L_.str.2:                               ## @.str.2
	.asciz	"frame= %5d q= %2.1f "

	.comm	_FF_QP2LAMBDA,8,3               ## @FF_QP2LAMBDA
L_.str.3:                               ## @.str.3
	.asciz	"out= %2d st= %2d frame= %5d q= %2.1f "

	.comm	_AV_CODEC_FLAG_PSNR,4,2         ## @AV_CODEC_FLAG_PSNR
L_.str.4:                               ## @.str.4
	.asciz	"PSNR= %6.2f "

L_.str.5:                               ## @.str.5
	.asciz	"f_size= %6d "

L_.str.6:                               ## @.str.6
	.asciz	"s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s "

L_.str.7:                               ## @.str.7
	.asciz	"type= %c\n"

	.no_dead_strip	_do_video_stats
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function do_video_stats
_do_video_stats:                        ; @do_video_stats
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	d9, d8, [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 b8, -72
	.cfi_offset b9, -80
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x22, _vstats_file@GOTPAGE
Lloh1:
	ldr	x22, [x22, _vstats_file@GOTPAGEOFF]
	ldr	x8, [x22]
	cbnz	x8, LBB0_2
; %bb.1:
Lloh2:
	adrp	x8, _vstats_filename@GOTPAGE
Lloh3:
	ldr	x8, [x8, _vstats_filename@GOTPAGEOFF]
Lloh4:
	ldr	w0, [x8]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	bl	_fopen
	str	x0, [x22]
	cbz	x0, LBB0_11
LBB0_2:
	ldr	x23, [x19, #40]
	ldr	x8, [x23]
Lloh7:
	adrp	x9, _AVMEDIA_TYPE_VIDEO@GOTPAGE
Lloh8:
	ldr	x9, [x9, _AVMEDIA_TYPE_VIDEO@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_5
; %bb.3:
	ldr	x8, [x19, #32]
	ldr	w2, [x8]
Lloh10:
	adrp	x8, _vstats_version@GOTPAGE
Lloh11:
	ldr	x8, [x8, _vstats_version@GOTPAGEOFF]
Lloh12:
	ldr	w8, [x8]
	ldr	x0, [x22]
	cmp	w8, #1
	b.gt	LBB0_6
; %bb.4:
Lloh13:
	adrp	x8, _FF_QP2LAMBDA@GOTPAGE
Lloh14:
	ldr	x8, [x8, _FF_QP2LAMBDA@GOTPAGEOFF]
	ldr	s0, [x19]
Lloh15:
	ldr	x8, [x8]
	scvtf	s1, x8
	fdiv	s0, s0, s1
	fcvt	d0, s0
	str	d0, [sp]
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
                                        ; kill: def $w2 killed $w2 killed $x2
	b	LBB0_7
LBB0_5:
	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	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_6:
	ldr	s0, [x19]
Lloh18:
	adrp	x8, _FF_QP2LAMBDA@GOTPAGE
Lloh19:
	ldr	x8, [x8, _FF_QP2LAMBDA@GOTPAGEOFF]
Lloh20:
	ldr	x8, [x8]
	scvtf	s1, x8
	fdiv	s0, s0, s1
	fcvt	d0, s0
	ldp	w8, w9, [x19, #4]
	str	d0, [sp, #16]
	stp	x9, x2, [sp]
Lloh21:
	adrp	x1, l_.str.3@PAGE
Lloh22:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x2, x8
LBB0_7:
	bl	_fprintf
	ldr	x8, [x19, #16]
	ldr	d0, [x8]
	fcmp	d0, #0.0
	b.lt	LBB0_10
; %bb.8:
	ldr	w8, [x23, #8]
Lloh23:
	adrp	x9, _AV_CODEC_FLAG_PSNR@GOTPAGE
Lloh24:
	ldr	x9, [x9, _AV_CODEC_FLAG_PSNR@GOTPAGEOFF]
Lloh25:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_10
; %bb.9:
	ldr	x21, [x22]
	ldp	d1, d2, [x23, #16]
	fmul	d1, d1, d2
	mov	x8, #246290604621824
	movk	x8, #16495, lsl #48
	fmov	d2, x8
	fmul	d1, d1, d2
	fmul	d1, d1, d2
	fdiv	d0, d0, d1
	bl	_psnr
	fcvtzs	w2, d0
Lloh26:
	adrp	x1, l_.str.4@PAGE
Lloh27:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_fprintf
LBB0_10:
	ldr	x0, [x22]
Lloh28:
	adrp	x1, l_.str.5@PAGE
Lloh29:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x2, x20
	bl	_fprintf
	ldr	x0, [x19, #32]
	bl	_av_stream_get_end_pts
	mov	x21, x0
	ldr	x8, [x19, #32]
	ldr	w0, [x8, #4]
	bl	_av_q2d
	mul	w8, w0, w21
	scvtf	d0, w8
	cmp	w8, #1
	mov	x8, #5243
	movk	x8, #18350, lsl #16
	movk	x8, #31457, lsl #32
	movk	x8, #16260, lsl #48
	fmov	d1, x8
	fcsel	d8, d1, d0, lt
	lsl	w20, w20, #3
	ldr	w0, [x23, #32]
	bl	_av_q2d
	sdiv	w8, w20, w0
	scvtf	d0, w8
	mov	x8, #70368744177664
	movk	x8, #16527, lsl #48
	fmov	d1, x8
	fdiv	d0, d0, d1
	ldr	w8, [x19, #24]
	lsl	w9, w8, #3
	scvtf	d2, w9
	fdiv	d2, d2, d8
	fdiv	d1, d2, d1
	scvtf	d2, w8
	ldr	x0, [x22]
	mov	x8, #4562146422526312448
	fmov	d3, x8
	fmul	d2, d2, d3
	fcvtzs	w2, d2
	stp	d8, d0, [sp]
	str	d1, [sp, #16]
Lloh30:
	adrp	x1, l_.str.6@PAGE
Lloh31:
	add	x1, x1, l_.str.6@PAGEOFF
	bl	_fprintf
	ldr	x20, [x22]
	ldr	w0, [x19, #28]
	bl	_av_get_picture_type_char
	mov	x2, x0
Lloh32:
	adrp	x1, l_.str.7@PAGE
Lloh33:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x20
	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	d9, d8, [sp, #32]               ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_fprintf
LBB0_11:
	bl	_do_video_stats.cold.1
	b	LBB0_2
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpAdd	Lloh26, Lloh27
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.cfi_endproc
                                        ; -- End function
	.p2align	2                               ; -- Begin function do_video_stats.cold.1
_do_video_stats.cold.1:                 ; @do_video_stats.cold.1
	.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
Lloh34:
	adrp	x0, l_.str.1@PAGE
Lloh35:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_perror
	mov	w0, #1
	ldp	x29, x30, [sp], #16             ; 16-byte Folded Reload
	b	_exit_program
	.loh AdrpAdd	Lloh34, Lloh35
	.cfi_endproc
                                        ; -- End function
	.comm	_vstats_file,8,3                ; @vstats_file
	.comm	_vstats_filename,4,2            ; @vstats_filename
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"w"

l_.str.1:                               ; @.str.1
	.asciz	"fopen"

	.comm	_AVMEDIA_TYPE_VIDEO,8,3         ; @AVMEDIA_TYPE_VIDEO
	.comm	_vstats_version,4,2             ; @vstats_version
l_.str.2:                               ; @.str.2
	.asciz	"frame= %5d q= %2.1f "

	.comm	_FF_QP2LAMBDA,8,3               ; @FF_QP2LAMBDA
l_.str.3:                               ; @.str.3
	.asciz	"out= %2d st= %2d frame= %5d q= %2.1f "

	.comm	_AV_CODEC_FLAG_PSNR,4,2         ; @AV_CODEC_FLAG_PSNR
l_.str.4:                               ; @.str.4
	.asciz	"PSNR= %6.2f "

l_.str.5:                               ; @.str.5
	.asciz	"f_size= %6d "

l_.str.6:                               ; @.str.6
	.asciz	"s_size= %8.0fkB time= %0.3f br= %7.1fkbits/s avg_br= %7.1fkbits/s "

l_.str.7:                               ; @.str.7
	.asciz	"type= %c\n"

	.no_dead_strip	_do_video_stats
.subsections_via_symbols
