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

	ret = parse_cmdline(argc, argv, &server_config);
	if (ret < 0)
		return 1;

	printf("port: %hu\n", server_config.port);

	ret = server_init();
	if (ret < 0)
		return 2;
	sd = setup_ctrl(&server_config);
	if (sd < 0)
		return 2;

	ret = server_loop(sd);
	if (ret < 0)
		return 3;
	if (ret > 0) /* child */
		ret = ctrl_main(sd);

	close(sd);
	return ret ? 3 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3a0a(%rip), %r14      # 0x4d70
movq 0x3c6b(%rip), %r13      # 0x4fd8
leaq 0x1c99(%rip), %r15      # 0x300d
leaq 0x8(%rsp), %r12
movq 0x3db8(%rip), %rdx      # 0x5138
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x1090
cmpl $0x70, %eax
jne 0x13be
movq (%r13), %rsi
movl $0xffff, %r8d           # imm = 0xFFFF
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x1f97
testl %eax, %eax
js 0x13ed
movzwl 0x8(%rsp), %eax
movw %ax, 0x3d84(%rip)       # 0x5140
jmp 0x1379
cmpl $-0x1, %eax
je 0x13f4
cmpl $0x3f, %eax
jne 0x143b
movq 0x3c01(%rip), %rbx      # 0x4fd0
movq (%rbx), %rsi
leaq 0x1c44(%rip), %rdi      # 0x301d
callq 0x10d0
movq (%rbx), %rsi
leaq 0x1c53(%rip), %rdi      # 0x303b
callq 0x10d0
movl $0x1, %ebp
jmp 0x142a
movzwl 0x3d45(%rip), %esi      # 0x5140
leaq 0x1c10(%rip), %rdi      # 0x3012
xorl %eax, %eax
callq 0x10b0
movl $0xd, %edi
callq 0x20c9
movl $0x2, %ebp
testl %eax, %eax
js 0x142a
movl $0x11, %edi
callq 0x20c9
testl %eax, %eax
jns 0x1460
movl %ebp, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x68, %eax
je 0x15e6
movq 0x3bad(%rip), %rcx      # 0x4ff8
movq (%rcx), %rdi
leaq 0x1bd0(%rip), %rsi      # 0x3025
movl %eax, %edx
xorl %eax, %eax
callq 0x1100
jmp 0x13ed
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rsp)
movq $0x0, 0x1c(%rsp)
movw $0xa, 0x8(%rsp)
movzwl 0x3cc1(%rip), %eax      # 0x5140
rolw $0x8, %ax
movw %ax, 0xa(%rsp)
movl $0xa, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x1230
testl %eax, %eax
jns 0x14ac
leaq 0x1e39(%rip), %r14      # 0x32e0
jmp 0x1541
movl %eax, %ebx
leaq 0x4(%rsp), %rcx
movl $0x0, (%rcx)
movl %eax, %edi
movl $0x29, %esi
movl $0x1a, %edx
movl $0x4, %r8d
callq 0x1070
testl %eax, %eax
jns 0x14dd
leaq 0x1e0c(%rip), %r14      # 0x32e7
jmp 0x1541
leaq 0x4(%rsp), %rcx
movl $0x1, (%rcx)
movl %ebx, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x1070
testl %eax, %eax
jns 0x150c
leaq 0x1df5(%rip), %r14      # 0x32ff
jmp 0x1541
leaq 0x8(%rsp), %rsi
movl %ebx, %edi
movl $0x1c, %edx
callq 0x1140
testl %eax, %eax
jns 0x152a
leaq 0x1df0(%rip), %r14      # 0x3318
jmp 0x1541
movl %ebx, %edi
movl $0x10, %esi
callq 0x1110
testl %eax, %eax
jns 0x155a
leaq 0x1ddc(%rip), %r14      # 0x331d
callq 0x1040
movl (%rax), %ebx
movq %r14, %rdi
callq 0x1160
testl %ebx, %ebx
jg 0x142a
negl %ebx
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
testl %eax, %eax
jns 0x15a0
callq 0x1040
movl (%rax), %r14d
leaq 0x1dac(%rip), %rdi      # 0x3324
callq 0x1160
movl $0x3, %ebp
testl %r14d, %r14d
jg 0x142a
je 0x15d8
movl %ebx, %edi
callq 0x1614
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
jmp 0x15da
movl %eax, %ebp
leaq 0x1d82(%rip), %r14      # 0x332b
callq 0x1220
testl %eax, %eax
js 0x15ce
je 0x1603
movl %ebp, %edi
callq 0x10e0
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movl %eax, %ebp
testl %eax, %eax
jns 0x15a9
jmp 0x1569
movq %r14, %rdi
callq 0x1160
jmp 0x15bb
xorl %ebp, %ebp
movl %ebx, %edi
callq 0x10e0
jmp 0x142a
movq 0x39e3(%rip), %rax      # 0x4fd0
movq (%rax), %rsi
leaq 0x1a44(%rip), %rdi      # 0x303b
callq 0x10d0
xorl %edi, %edi
callq 0x11c0
movl %ebx, %edi
callq 0x10e0
movl %ebp, %edi
callq 0x1614
jmp 0x15fc
nop