// File: /workspace/github_c_makefile_star2_O3/mkubecek[P]nperf/stats.c
// Function: print_iter_result
void print_iter_result(unsigned int iter, unsigned int n_iter, double result,
		       double sum, double sum_sqr, enum confid_level level,
		       const struct print_options *opts)
{
        double avg, mdev, confid;
	unsigned int n;
	int width;

        if (iter == XFER_STATS_TOTAL) {
                n = n_iter;
		width = opts->exact ? opts->width : 8;
		width += strlen(unit_names[opts->unit]);
                printf("all%*s", width + 5, "");
        } else {
                n = iter;
                printf("%-3u ", iter);
		print_rate(result, opts);
		putchar(',');
        }

	avg = sum / n;
        mdev = mdev_n(sum, sum_sqr, n);
	if (n > 1)
		confid = confid_interval(sum, sum_sqr, n, level);

	fputs("  avg ", stdout);
	print_rate(avg, opts);
	fputs(", mdev ", stdout);
	print_rate(mdev, opts);
	printf(" (%5.1lf%%)", 100.0 * mdev / avg);
	if (n > 1) {
		fputs(", confid. +/- ", stdout);
		print_rate(confid, opts);
		printf(" (%5.1lf%%)", 100.0 * confid / avg);
	}
	putchar('\n');
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movl %edx, %r14d
movsd %xmm2, 0x20(%rsp)
movsd %xmm1, 0x10(%rsp)
cmpl $-0x1, %edi
je 0x488d
movl %edi, %r15d
leaq 0x1946(%rip), %rdi      # 0x61a6
movl %r15d, %esi
xorl %eax, %eax
movsd %xmm0, 0x8(%rsp)
callq 0x2120
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x4339
movl $0x2c, %edi
callq 0x2050
movl %r15d, %ebp
jmp 0x48cd
movl %esi, %ebp
movl $0x8, %r15d
cmpb $0x1, 0x8(%rbx)
jne 0x489f
movl 0x4(%rbx), %r15d
movl (%rbx), %eax
leaq 0x4508(%rip), %rcx      # 0x8db0
movq (%rcx,%rax,8), %rdi
callq 0x20e0
leal (%rax,%r15), %esi
addl $0x5, %esi
leaq 0x18e0(%rip), %rdi      # 0x619f
leaq 0x7f0(%rip), %rdx       # 0x50b6
xorl %eax, %eax
callq 0x2120
movl %ebp, %eax
cvtsi2sd %rax, %xmm3
movsd 0x10(%rsp), %xmm2
movapd %xmm2, %xmm1
mulsd %xmm2, %xmm1
movapd %xmm3, %xmm0
mulsd 0x20(%rsp), %xmm0
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x4900
sqrtsd %xmm0, %xmm0
jmp 0x4917
movsd %xmm3, 0x8(%rsp)
callq 0x2310
movsd 0x8(%rsp), %xmm3
movsd 0x10(%rsp), %xmm2
movapd %xmm2, %xmm1
divsd %xmm3, %xmm1
movsd %xmm1, 0x10(%rsp)
divsd %xmm3, %xmm0
movsd %xmm0, 0x8(%rsp)
cmpl $0x2, %ebp
jb 0x494e
movapd %xmm2, %xmm0
movsd 0x20(%rsp), %xmm1
movl %ebp, %edi
movl %r14d, %esi
callq 0x4a48
movsd %xmm0, 0x18(%rsp)
movq 0x467b(%rip), %r14      # 0x8fd0
movq (%r14), %rsi
leaq 0x184d(%rip), %rdi      # 0x61ac
callq 0x2150
movsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x4339
movq (%r14), %rsi
leaq 0x17da(%rip), %rdi      # 0x6156
callq 0x2150
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x4339
movsd 0x8(%rsp), %xmm0
mulsd 0x68b(%rip), %xmm0      # 0x5028
divsd 0x10(%rsp), %xmm0
leaq 0x1809(%rip), %rdi      # 0x61b3
movb $0x1, %al
callq 0x2120
cmpl $0x2, %ebp
jb 0x49f5
movq (%r14), %rsi
leaq 0x17ff(%rip), %rdi      # 0x61bf
callq 0x2150
movsd 0x18(%rsp), %xmm0
movq %rbx, %rdi
callq 0x4339
movsd 0x18(%rsp), %xmm0
mulsd 0x647(%rip), %xmm0      # 0x5028
divsd 0x10(%rsp), %xmm0
leaq 0x17c5(%rip), %rdi      # 0x61b3
movb $0x1, %al
callq 0x2120
movl $0xa, %edi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
nopl (%rax)