// File: /workspace/github_c_makefile_star2_O0/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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
leaq 0x80ec(%rip), %rdx      # 0xb200
callq 0x4840
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x312e
movl $0x1, -0x4(%rbp)
jmp 0x32da
movl 0x80e4(%rip), %eax      # 0xb218
movl %eax, %edi
movl $0x8, %esi
callq 0x21d0
movq %rax, 0x8831(%rip)      # 0xb978
cmpq $0x0, 0x8829(%rip)      # 0xb978
jne 0x315d
movl $0x2, -0x4(%rbp)
jmp 0x32da
movq 0x809c(%rip), %rsi      # 0xb200
movzwl 0x809d(%rip), %edx      # 0xb208
leaq 0x3f97(%rip), %rdi      # 0x7109
movb $0x0, %al
callq 0x2130
movl 0x8095(%rip), %eax      # 0xb214
cmpl 0x8093(%rip), %eax      # 0xb218
jae 0x31a3
movl 0x8087(%rip), %esi      # 0xb214
movl 0x8085(%rip), %edx      # 0xb218
leaq 0x3f85(%rip), %rdi      # 0x711f
movb $0x0, %al
callq 0x2130
jmp 0x31b7
movl 0x806b(%rip), %esi      # 0xb214
leaq 0x3f81(%rip), %rdi      # 0x7131
movb $0x0, %al
callq 0x2130
movl 0x805f(%rip), %esi      # 0xb21c
movl 0x804d(%rip), %edx      # 0xb210
leaq 0x3f76(%rip), %rdi      # 0x7140
movb $0x0, %al
callq 0x2130
testb $0x1, 0x8058(%rip)      # 0xb230
je 0x3225
movsd 0x8046(%rip), %xmm0     # 0xb228
movsd %xmm0, -0x28(%rbp)
movsd 0x8039(%rip), %xmm0     # 0xb228
movsd 0x3e39(%rip), %xmm1     # 0x7030
divsd %xmm1, %xmm0
movsd %xmm0, -0x20(%rbp)
movl 0x801a(%rip), %edi      # 0xb220
callq 0x32f0
movsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
movl %eax, %esi
leaq 0x3f42(%rip), %rdi      # 0x7160
movb $0x2, %al
callq 0x2130
movl 0x7fe1(%rip), %eax      # 0xb20c
movl %eax, %ecx
leaq 0x7b8c(%rip), %rax      # 0xadc0
movq (%rax,%rcx,8), %rsi
movl 0x8002(%rip), %edx      # 0xb240
leaq 0x3f4d(%rip), %rdi      # 0x7192
movb $0x0, %al
callq 0x2130
movl $0xa, %edi
callq 0x2050
callq 0x3330
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x3266
jmp 0x32bb
leaq 0x8733(%rip), %rdi      # 0xb9a0
callq 0x3370
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x327d
jmp 0x32bb
leaq 0x7f7c(%rip), %rdi      # 0xb200
callq 0x3400
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x3294
jmp 0x32af
leaq 0x7f65(%rip), %rdi      # 0xb200
callq 0x2d70
movl %eax, -0x14(%rbp)
leaq 0x7f56(%rip), %rdi      # 0xb200
callq 0x3550
leaq 0x86ea(%rip), %rdi      # 0xb9a0
callq 0x3580
movq 0x86b6(%rip), %rdi      # 0xb978
callq 0x2030
movl -0x14(%rbp), %edx
xorl %eax, %eax
movl $0x2, %ecx
cmpl $0x0, %edx
cmovll %ecx, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)