// File: /workspace/github_c_makefile_star2_O2/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, 0x18(%rsp)
cmpl $-0x1, %edi
movsd %xmm1, 0x10(%rsp)
je 0x4489
movl %edi, %r15d
leaq 0x1cf6(%rip), %rdi      # 0x6156
movl %r15d, %esi
xorl %eax, %eax
movsd %xmm0, (%rsp)
callq 0x2120
movsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x3f61
pushq $0x2c
popq %rdi
callq 0x2050
movl %r15d, %ebp
jmp 0x44c9
movl %esi, %ebp
cmpb $0x1, 0x8(%rbx)
jne 0x4497
movl 0x4(%rbx), %r15d
jmp 0x449b
pushq $0x8
popq %r15
movl (%rbx), %eax
leaq 0x490c(%rip), %rcx      # 0x8db0
movq (%rcx,%rax,8), %rdi
callq 0x20e0
leal (%rax,%r15), %esi
addl $0x5, %esi
leaq 0x1c94(%rip), %rdi      # 0x614f
leaq 0xbac(%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 0x18(%rsp), %xmm0
subsd %xmm1, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x44fc
sqrtsd %xmm0, %xmm0
jmp 0x4511
movsd %xmm3, (%rsp)
callq 0x2310
movsd (%rsp), %xmm3
movsd 0x10(%rsp), %xmm2
movapd %xmm2, %xmm1
divsd %xmm3, %xmm1
movsd %xmm1, (%rsp)
divsd %xmm3, %xmm0
movsd %xmm0, 0x20(%rsp)
cmpl $0x2, %ebp
jb 0x4547
movapd %xmm2, %xmm0
movsd 0x18(%rsp), %xmm1
movl %ebp, %edi
movl %r14d, %esi
callq 0x4636
movsd %xmm0, 0x8(%rsp)
movq 0x4a82(%rip), %r14      # 0x8fd0
movq (%r14), %rsi
leaq 0x1c04(%rip), %rdi      # 0x615c
callq 0x2150
movsd (%rsp), %xmm0
movq %rbx, %rdi
callq 0x3f61
movq (%r14), %rsi
leaq 0x1b92(%rip), %rdi      # 0x6106
callq 0x2150
movsd 0x20(%rsp), %xmm0
movq %rbx, %rdi
callq 0x3f61
movsd 0x20(%rsp), %xmm0
mulsd 0xa93(%rip), %xmm0      # 0x5028
divsd (%rsp), %xmm0
leaq 0x1bc2(%rip), %rdi      # 0x6163
movb $0x1, %al
callq 0x2120
cmpl $0x2, %ebp
jb 0x45eb
movq (%r14), %rsi
leaq 0x1bb8(%rip), %rdi      # 0x616f
callq 0x2150
movsd 0x8(%rsp), %xmm0
movq %rbx, %rdi
callq 0x3f61
movsd 0x8(%rsp), %xmm0
mulsd 0xa50(%rip), %xmm0      # 0x5028
divsd (%rsp), %xmm0
leaq 0x1b7f(%rip), %rdi      # 0x6163
movb $0x1, %al
callq 0x2120
pushq $0xa
popq %rdi
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x2050
nopl (%rax)