// File: /workspace/github_c_makefile_star2_O1/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 0x470b
movl %edi, %r15d
leaq 0x1a58(%rip), %rdi      # 0x6136
movl %r15d, %esi
xorl %eax, %eax
movsd %xmm0, 0x8(%rsp)
callq 0x2120
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x41c1
movl $0x2c, %edi
callq 0x2050
movl %r15d, %ebp
jmp 0x474b
movl %esi, %ebp
movl $0x8, %r15d
cmpb $0x1, 0x8(%rbx)
jne 0x471d
movl 0x4(%rbx), %r15d
movl (%rbx), %eax
leaq 0x468a(%rip), %rcx      # 0x8db0
movq (%rcx,%rax,8), %rdi
callq 0x20e0
leal (%rax,%r15), %esi
addl $0x5, %esi
leaq 0x19f2(%rip), %rdi      # 0x612f
leaq 0x92a(%rip), %rdx       # 0x506e
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 0x477e
sqrtsd %xmm0, %xmm0
jmp 0x4795
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 0x47cc
movapd %xmm2, %xmm0
movsd 0x20(%rsp), %xmm1
movl %ebp, %edi
movl %r14d, %esi
callq 0x48c4
movsd %xmm0, 0x18(%rsp)
movq 0x47fd(%rip), %r14      # 0x8fd0
movq (%r14), %rsi
leaq 0x195f(%rip), %rdi      # 0x613c
callq 0x2150
movsd 0x10(%rsp), %xmm0
movq %rbx, %rdi
callq 0x41c1
movq (%r14), %rsi
leaq 0x18ec(%rip), %rdi      # 0x60e6
callq 0x2150
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x41c1
movsd 0x8(%rsp), %xmm0
mulsd 0x815(%rip), %xmm0      # 0x5030
divsd 0x10(%rsp), %xmm0
leaq 0x191b(%rip), %rdi      # 0x6143
movb $0x1, %al
callq 0x2120
cmpl $0x2, %ebp
jb 0x4873
movq (%r14), %rsi
leaq 0x1911(%rip), %rdi      # 0x614f
callq 0x2150
movsd 0x18(%rsp), %xmm0
movq %rbx, %rdi
callq 0x41c1
movsd 0x18(%rsp), %xmm0
mulsd 0x7d1(%rip), %xmm0      # 0x5030
divsd 0x10(%rsp), %xmm0
leaq 0x18d7(%rip), %rdi      # 0x6143
movb $0x1, %al
callq 0x2120
movl $0xa, %edi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
nop