// File: /workspace/github_c_makefile_star2_O0/mkubecek[P]nperf/client/main.c
// Function: all_iterations
int all_iterations(struct client_config *config)
{
	double confid_target_hw, confid_ival_hw;
	unsigned int n_iter, iter;
	unsigned int stats_mask;
	bool confid_target_set;
	double sum, sum_sqr;
	int ret = 0;

	stats_mask = config->stats_mask;
	confid_target_hw = 0.999 * config->confid_target / 200.0;
	confid_target_set = config->confid_target_set;
	confid_ival_hw = HUGE_VAL;

	sum = sum_sqr = 0.0;
	n_iter = 0;
	for (iter = 0; iter < config->max_iter; iter++) {
		double iter_result;

		if (stats_mask & (STATS_F_THREAD | STATS_F_RAW))
			printf("iteration %u\n", iter + 1);
		ret = one_iteration(&client_config, &iter_result);
		if (ret < 0)
			break;
		n_iter++;

		iter_results[iter] = iter_result;
		sum += iter_result;
		sum_sqr += iter_result * iter_result;
		if (iter > 0)
			confid_ival_hw = confid_interval(sum, sum_sqr, iter + 1,
							 config->confid_level) /
					 (sum / (iter + 1));
		if (stats_mask & STATS_F_ITER) {
			print_iter_result(iter + 1, iter + 1, iter_result,
					  sum, sum_sqr, config->confid_level,
					  &config->print_opts);
			if (stats_mask & (STATS_F_THREAD | STATS_F_RAW))
				putchar('\n');
		}
		fflush(stdout);

		if (confid_target_set && (n_iter >= config->min_iter) &&
		    (confid_ival_hw <= confid_target_hw))
			break;
	}
	if (ret < 0) {
		fprintf(stderr, "*** Iteration %u failed, quitting. ***\n\n",
			iter + 1);
		if (!n_iter)
			return ret;
	}

	if (n_iter > 1 &&
	    (stats_mask & STATS_F_ITER) &&
	    (stats_mask & (STATS_F_THREAD | STATS_F_RAW))) {
		sum = sum_sqr = 0.0;
		for (iter = 0; iter < n_iter; iter++) {
			double result = iter_results[iter];

			sum += result;
			sum_sqr += result * result;
			print_iter_result(iter + 1, n_iter, result, sum,
					  sum_sqr, config->confid_level,
					  &config->print_opts);
		}
	}

	if (config->confid_target_set &&
	    ((n_iter < 2) || (200.0 * confid_ival_hw > config->confid_target)))
		fprintf(stderr,
			"*** Failed to reach confidence target.\n"
			"*** Confidence interval width is %.4lg%% (+/- %.4lg%%), requested %.4lg%%.\n"
			"*** The result is not reliable enough.\n",
			200.0 * confid_ival_hw, 100.0 * confid_ival_hw,
			config->confid_target);
	if (stats_mask & STATS_F_TOTAL)
		print_iter_result(XFER_STATS_TOTAL, n_iter, 0.0,
				  sum, sum_sqr, config->confid_level,
				  &config->print_opts);

	return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movl $0x0, -0x44(%rbp)
movq -0x10(%rbp), %rax
movl 0x34(%rax), %eax
movl %eax, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movsd 0x4287(%rip), %xmm0     # 0x7020
mulsd 0x28(%rax), %xmm0
movsd 0x4272(%rip), %xmm1     # 0x7018
divsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movb 0x30(%rax), %al
andb $0x1, %al
movb %al, -0x2d(%rbp)
movsd 0x424d(%rip), %xmm0     # 0x7010
movsd %xmm0, -0x20(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x24(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jae 0x2f4c
movl -0x2c(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x2e15
movl -0x28(%rbp), %esi
addl $0x1, %esi
leaq 0x422a(%rip), %rdi      # 0x7038
movb $0x0, %al
callq 0x2130
leaq 0x83e4(%rip), %rdi      # 0xb200
leaq -0x50(%rbp), %rsi
callq 0x24d0
movl %eax, -0x44(%rbp)
cmpl $0x0, -0x44(%rbp)
jge 0x2e33
jmp 0x2f4c
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movsd -0x50(%rbp), %xmm0
movq 0x8b30(%rip), %rax      # 0xb978
movl -0x28(%rbp), %ecx
movsd %xmm0, (%rax,%rcx,8)
movsd -0x50(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x50(%rbp), %xmm0
movsd -0x50(%rbp), %xmm2
movsd -0x40(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
cmpl $0x0, -0x28(%rbp)
jbe 0x2eb8
movsd -0x38(%rbp), %xmm0
movsd -0x40(%rbp), %xmm1
movl -0x28(%rbp), %edi
incl %edi
movq -0x10(%rbp), %rax
movl 0x20(%rax), %esi
callq 0x5c20
movsd -0x38(%rbp), %xmm1
movl -0x28(%rbp), %eax
incl %eax
cvtsi2sd %rax, %xmm2
divsd %xmm2, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x2f09
movl -0x28(%rbp), %edi
addl $0x1, %edi
movl -0x28(%rbp), %esi
addl $0x1, %esi
movsd -0x50(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rcx
addq $0x48, %rcx
callq 0x59f0
movl -0x2c(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x2f07
movl $0xa, %edi
callq 0x2050
jmp 0x2f09
movq 0x80c0(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x2230
testb $0x1, -0x2d(%rbp)
je 0x2f3c
movl -0x24(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x14(%rcx), %eax
jb 0x2f3c
movsd -0x20(%rbp), %xmm1
movsd -0x18(%rbp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x2f3c
jmp 0x2f4c
jmp 0x2f3e
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2de6
cmpl $0x0, -0x44(%rbp)
jge 0x2f83
movq 0x809f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movl -0x28(%rbp), %edx
addl $0x1, %edx
leaq 0x40dd(%rip), %rsi      # 0x7046
movb $0x0, %al
callq 0x21f0
cmpl $0x0, -0x24(%rbp)
jne 0x2f81
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x30df
jmp 0x2f83
cmpl $0x1, -0x24(%rbp)
jbe 0x3042
movl -0x2c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3042
movl -0x2c(%rbp), %eax
andl $0xc, %eax
cmpl $0x0, %eax
je 0x3042
xorps %xmm0, %xmm0
movsd %xmm0, -0x40(%rbp)
xorps %xmm0, %xmm0
movsd %xmm0, -0x38(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x3040
movq 0x89a7(%rip), %rax      # 0xb978
movl -0x28(%rbp), %ecx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, -0x58(%rbp)
movsd -0x58(%rbp), %xmm0
addsd -0x38(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x58(%rbp), %xmm0
movsd -0x58(%rbp), %xmm2
movsd -0x40(%rbp), %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x40(%rbp)
movl -0x28(%rbp), %edi
addl $0x1, %edi
movl -0x24(%rbp), %esi
movsd -0x58(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rcx
addq $0x48, %rcx
callq 0x59f0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x2fc2
jmp 0x3042
movq -0x10(%rbp), %rax
testb $0x1, 0x30(%rax)
je 0x30a5
cmpl $0x2, -0x24(%rbp)
jb 0x306a
movsd 0x3fbe(%rip), %xmm0     # 0x7018
mulsd -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
ucomisd 0x28(%rax), %xmm0
jbe 0x30a5
movq 0x7f87(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movsd 0x3f9c(%rip), %xmm0     # 0x7018
mulsd -0x20(%rbp), %xmm0
movsd 0x3f9f(%rip), %xmm1     # 0x7028
mulsd -0x20(%rbp), %xmm1
movq -0x10(%rbp), %rax
movsd 0x28(%rax), %xmm2
leaq 0x3fd1(%rip), %rsi      # 0x706f
movb $0x3, %al
callq 0x21f0
movl -0x2c(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x30d9
movl -0x24(%rbp), %esi
movsd -0x38(%rbp), %xmm1
movsd -0x40(%rbp), %xmm2
movq -0x10(%rbp), %rax
movl 0x20(%rax), %edx
movq -0x10(%rbp), %rcx
addq $0x48, %rcx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
xorps %xmm0, %xmm0
callq 0x59f0
movl -0x44(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)