// File: /workspace/github_c_makefile_star2_O3/mkubecek[P]nperf/client/main.c
// Function: main
int main(int argc, char *argv[])
{
	int ret;

	ret = parse_cmdline(argc, argv, &client_config);
	if (ret < 0)
		return 1;
	iter_results = calloc(client_config.max_iter, sizeof(iter_results[0]));
	if (!iter_results)
		return 2;

	printf("server: %s, port %hu\n", client_config.server_host,
	       client_config.ctrl_port);
	if (client_config.min_iter < client_config.max_iter)
		printf("iterations: %u-%u", client_config.min_iter,
		       client_config.max_iter);
	else
		printf("iterations: %u", client_config.min_iter);
	printf(", threads: %u, test length: %u\n",
	       client_config.n_threads, client_config.test_length);
	if (client_config.confid_target_set)
		printf("confidence target: %.1lf%% (+/- %.1lf%%) at %u%%\n",
		       client_config.confid_target,
		       client_config.confid_target / 2,
		       confid_level_output(client_config.confid_level));
	printf("test: %s, message size: %u\n",
	       test_mode_names[client_config.test_mode],
	       client_config.msg_size);
	putchar('\n');

	ret = client_init();
	if (ret < 0)
		goto out_results;
	ret = wsync_init(&client_worker_sync);
	if (ret < 0)
		goto out_results;
	ret = alloc_buffers(&client_config);
	if (ret < 0)
		goto out_ws;
	ret = all_iterations(&client_config);

	free_buffers(&client_config);
out_ws:
	wsync_destroy(&client_worker_sync);
out_results:
	free(iter_results);
	return (ret < 0) ? 2 : 0;
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
leaq 0x5ce5(%rip), %rdx      # 0x91e0
callq 0x3c58
testl %eax, %eax
js 0x355c
movl 0x5cee(%rip), %edi      # 0x91f8
movl $0x8, %esi
callq 0x21b0
movq %rax, 0x5d55(%rip)      # 0x9270
testq %rax, %rax
je 0x3566
movq 0x5cb9(%rip), %rsi      # 0x91e0
movzwl 0x5cba(%rip), %edx      # 0x91e8
leaq 0x1c1c(%rip), %rdi      # 0x5151
xorl %eax, %eax
callq 0x2120
movl 0x5cb2(%rip), %esi      # 0x91f4
movl 0x5cb0(%rip), %edx      # 0x91f8
cmpl %edx, %esi
jae 0x3570
leaq 0x1c14(%rip), %rdi      # 0x5167
xorl %eax, %eax
callq 0x2120
jmp 0x357e
movl $0x1, %ebx
jmp 0x37a2
movl $0x2, %ebx
jmp 0x37a2
leaq 0x1c02(%rip), %rdi      # 0x5179
xorl %eax, %eax
callq 0x2120
movl 0x5c78(%rip), %esi      # 0x91fc
movl 0x5c66(%rip), %edx      # 0x91f0
leaq 0x1bf7(%rip), %rdi      # 0x5188
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x2120
cmpb $0x1, 0x5c6f(%rip)      # 0x9210
jne 0x35e0
movsd 0x5c5d(%rip), %xmm0     # 0x9208
movsd 0x1a7d(%rip), %xmm1     # 0x5030
mulsd %xmm0, %xmm1
movl 0x5c43(%rip), %eax      # 0x9200
cmpl $0x1, %eax
movl $0x63, %ecx
cmovel %ecx, %ebx
testl %eax, %eax
movl $0x5f, %esi
cmovnel %ebx, %esi
leaq 0x1bcf(%rip), %rdi      # 0x51a8
movb $0x2, %al
callq 0x2120
movl 0x5c06(%rip), %eax      # 0x91ec
leaq 0x57d3(%rip), %rcx      # 0x8dc0
movq (%rcx,%rax,8), %rsi
movl 0x5c29(%rip), %edx      # 0x9220
leaq 0x1bdc(%rip), %rdi      # 0x51da
xorl %eax, %eax
callq 0x2120
movl $0xa, %edi
callq 0x2050
leaq 0x8(%rsp), %rdx
movl $0xa, %edi
xorl %esi, %esi
callq 0x2090
testl %eax, %eax
js 0x3647
leaq 0x8(%rsp), %rsi
movq $0x1, (%rsi)
andb $-0x11, 0x8b(%rsi)
movl $0xa, %edi
xorl %edx, %edx
callq 0x2090
testl %eax, %eax
jns 0x3656
callq 0x2070
movl (%rax), %eax
testl %eax, %eax
jle 0x3656
negl %eax
jmp 0x3660
movl $0xd, %edi
callq 0x4e05
movl $0x2, %ebx
testl %eax, %eax
js 0x3796
leaq 0x8(%rsp), %rdi
callq 0x2240
testl %eax, %eax
jne 0x36b1
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
callq 0x21a0
testl %eax, %eax
jne 0x36b1
leaq 0x5c03(%rip), %rdi      # 0x9298
addq $0x28, %rdi
leaq 0x8(%rsp), %rsi
callq 0x21f0
testl %eax, %eax
jne 0x36b1
leaq 0x8(%rsp), %rdi
callq 0x2170
testl %eax, %eax
jg 0x3796
movl $0x1e, %edi
callq 0x2290
movl $0x2, %ebx
testq %rax, %rax
js 0x3786
movq %rax, %rcx
movl 0x5b46(%rip), %eax      # 0x9220
leaq (%rcx,%rax), %rsi
decq %rsi
movq %rsi, %rax
cqto
idivq %rcx
subq %rdx, %rsi
movq %rsi, 0x5b4d(%rip)      # 0x9240
movl 0x5b03(%rip), %eax      # 0x91fc
imulq %rax, %rsi
shlq $0x7, %rax
leaq (%rax,%rcx), %r8
decq %r8
movq %r8, %rax
xorl %edx, %edx
divq %rcx
subq %rdx, %r8
addq %rsi, %r8
movq %r8, 0x5b2b(%rip)       # 0x9248
xorl %edi, %edi
movq %r8, %rsi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x20f0
movq %rax, 0x5af7(%rip)      # 0x9238
cmpq $-0x1, %rax
je 0x37ad
movl 0x5aaf(%rip), %ecx      # 0x91fc
imulq 0x5aeb(%rip), %rcx      # 0x9240
addq %rcx, %rax
movq %rax, 0x5af1(%rip)      # 0x9250
leaq 0x5a7a(%rip), %rdi      # 0x91e0
callq 0x31a4
movl %eax, %ebx
movq 0x5ac4(%rip), %rdi      # 0x9238
movq 0x5acd(%rip), %rsi      # 0x9248
callq 0x2230
shrl $0x1e, %ebx
andl $-0x2, %ebx
leaq 0x5b0b(%rip), %rdi      # 0x9298
addq $0x28, %rdi
callq 0x2270
movq 0x5ad3(%rip), %rdi      # 0x9270
callq 0x2030
movl %ebx, %eax
addq $0xa0, %rsp
popq %rbx
retq
callq 0x240e
testb $0x1, %al
je 0x375f
jmp 0x3786