// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x39da(%rip), %r14      # 0x4d70
movq 0x3c3b(%rip), %r13      # 0x4fd8
leaq 0x1c69(%rip), %r15      # 0x300d
leaq 0x10(%rsp), %r12
movq 0x3d88(%rip), %rdx      # 0x5138
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x1090
cmpl $0x70, %eax
jne 0x13ee
movq (%r13), %rsi
movl $0xffff, %r8d           # imm = 0xFFFF
movq %r15, %rdi
movq %r12, %rdx
xorl %ecx, %ecx
callq 0x1ffc
testl %eax, %eax
js 0x1421
movzwl 0x10(%rsp), %eax
movw %ax, 0x3d54(%rip)       # 0x5140
jmp 0x13a9
cmpl $-0x1, %eax
je 0x1437
cmpl $0x3f, %eax
jne 0x152d
movq 0x3bcd(%rip), %rbx      # 0x4fd0
movq (%rbx), %rsi
leaq 0x1c10(%rip), %rdi      # 0x301d
callq 0x10d0
movq (%rbx), %rsi
leaq 0x1c1f(%rip), %rdi      # 0x303b
callq 0x10d0
movl $0x1, %ebp
movl %ebp, %eax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movzwl 0x3d02(%rip), %esi      # 0x5140
leaq 0x1bcd(%rip), %rdi      # 0x3012
xorl %eax, %eax
callq 0x10b0
movl $0xd, %edi
callq 0x212e
movl $0x2, %ebp
testl %eax, %eax
js 0x1426
movl $0x11, %edi
callq 0x212e
testl %eax, %eax
js 0x1426
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movups %xmm0, 0x1c(%rsp)
movw $0xa, 0x10(%rsp)
movzwl 0x3cb8(%rip), %eax      # 0x5140
rolw $0x8, %ax
movw %ax, 0x12(%rsp)
movl $0xa, %edi
movl $0x1, %esi
movl $0x6, %edx
callq 0x1230
testl %eax, %eax
js 0x1555
movl %eax, %ebx
leaq 0xc(%rsp), %rcx
movl $0x0, (%rcx)
movl %eax, %edi
movl $0x29, %esi
movl $0x1a, %edx
movl $0x4, %r8d
callq 0x1070
testl %eax, %eax
js 0x155e
leaq 0xc(%rsp), %rcx
movl $0x1, (%rcx)
movl %ebx, %edi
movl $0x1, %esi
movl $0x2, %edx
movl $0x4, %r8d
callq 0x1070
testl %eax, %eax
js 0x1567
leaq 0x10(%rsp), %rsi
movl %ebx, %edi
movl $0x1c, %edx
callq 0x1140
testl %eax, %eax
js 0x1570
movl %ebx, %edi
movl $0x10, %esi
callq 0x1110
testl %eax, %eax
jns 0x1588
leaq 0x1df2(%rip), %r14      # 0x331d
jmp 0x1577
cmpl $0x68, %eax
je 0x161c
movq 0x3abb(%rip), %rcx      # 0x4ff8
movq (%rcx), %rdi
leaq 0x1ade(%rip), %rsi      # 0x3025
movl %eax, %edx
xorl %eax, %eax
callq 0x1100
jmp 0x1421
leaq 0x1d84(%rip), %r14      # 0x32e0
jmp 0x1577
leaq 0x1d82(%rip), %r14      # 0x32e7
jmp 0x1577
leaq 0x1d91(%rip), %r14      # 0x32ff
jmp 0x1577
leaq 0x1da1(%rip), %r14      # 0x3318
callq 0x1040
xorl %ebx, %ebx
subl (%rax), %ebx
movq %r14, %rdi
callq 0x1160
testl %ebx, %ebx
js 0x1426
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
testl %eax, %eax
jns 0x15d6
callq 0x1040
movl (%rax), %r14d
leaq 0x1d76(%rip), %rdi      # 0x3324
callq 0x1160
movl $0x3, %ebp
testl %r14d, %r14d
jg 0x1426
je 0x160e
movl %ebx, %edi
callq 0x164c
xorl %ecx, %ecx
testl %eax, %eax
setne %cl
leal (%rcx,%rcx,2), %ebp
jmp 0x1610
movl %eax, %ebp
leaq 0x1d4c(%rip), %r14      # 0x332b
callq 0x1220
testl %eax, %eax
js 0x1604
je 0x1639
movl %ebp, %edi
callq 0x10e0
movl %ebx, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x1180
movl %eax, %ebp
testl %eax, %eax
jns 0x15df
jmp 0x159f
movq %r14, %rdi
callq 0x1160
jmp 0x15f1
xorl %ebp, %ebp
movl %ebx, %edi
callq 0x10e0
jmp 0x1426
movq 0x39ad(%rip), %rax      # 0x4fd0
movq (%rax), %rsi
leaq 0x1a0e(%rip), %rdi      # 0x303b
callq 0x10d0
xorl %edi, %edi
callq 0x11c0
movl %ebx, %edi
callq 0x10e0
movl %ebp, %edi
callq 0x164c
jmp 0x1632
nopl (%rax)