// File: /workspace/github_c_makefile_star2_O2/uhlin[P]enhanced-duc/source/main.c
// Function: main
int
main(int argc, char *argv[])
{
	char conf[DUC_PATH_MAX] = "/etc/enhanced-duc.conf";
	struct program_options opt = {
		.want_usage              = false,
		.want_create_config_file = false,
		.want_debug              = false,
		.want_update_once        = false,
		.want_daemon             = false,
	};

	if (sighand_init() == -1)
		log_warn(0, "Initialization of signal handling failed");
	if (atexit(program_clean_up) == -1)
		log_warn(errno, "Failed to register a clean up function");
	block_signals();
	duc_set_terminate();

	(void) setlocale(LC_ALL, "");
	process_options(argc, argv, &opt, &conf[0], nitems(conf));

	if (opt.want_usage) {
		usage();
		/* NOTREACHED */
	}
	if (opt.want_create_config_file) {
		char *path = NULL;

		while ((path = get_answer("Create where?",
					  TYPE_STRING,
					  &conf[0])) == NULL) {
			/* continue */;
		}

		create_config_file(path);
		free(path);
		exit(0);
	}
	if (opt.want_debug)
		turn_on_debug_mode();
	if (opt.want_update_once)
		set_cycle_off();
	if (opt.want_daemon) {
		/*
		 * Detach the program from the controlling terminal
		 * and continue execution...
		 */

		daemonize();
	}

	log_msg("%s %s has started", g_programName, g_programVersion);
	log_msg("reading %s...", conf);
	read_config_file(conf);
	check_some_settings_strictly();

	/* Drop root privileges. */
	if (geteuid() == UID_SUPER_USER) {
		force_priv_drop();
		log_msg("EUID = %ld", (long int) geteuid());
	}

	net_init();
	start_update_cycle();

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x428, %rsp            # imm = 0x428
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x3c0b(%rip), %rsi      # 0x94a0
leaq 0x230(%rsp), %rdi
movl $0x1f4, %edx            # imm = 0x1F4
callq 0x4350
xorl %eax, %eax
movb %al, 0x7(%rsp)
movb %al, 0x6(%rsp)
callq 0x7f23
cmpl $-0x1, %eax
jne 0x58cb
leaq 0x3e20(%rip), %rsi      # 0x96e2
xorl %edi, %edi
xorl %eax, %eax
callq 0x57ea
leaq 0x25f7(%rip), %rdi      # 0x7ec9
callq 0x86b0
cmpl $-0x1, %eax
jne 0x58f1
callq 0x4050
movl (%rax), %edi
leaq 0x3e21(%rip), %rsi      # 0x970b
xorl %eax, %eax
callq 0x57ea
callq 0x7e4c
callq 0x814c
leaq 0x45c9(%rip), %rsi      # 0x9ecb
pushq $0x6
popq %rdi
callq 0x43a0
movabsq $0x426f443a7863683a, %rax # imm = 0x426F443A7863683A
leaq 0x30(%rsp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movl $0x0, 0x8(%rsp)
leaq 0x451d(%rip), %r15      # 0x9e4d
leaq 0x230(%rsp), %r12
movl $0x0, 0x10(%rsp)
movl $0x0, 0x18(%rsp)
movl %ebp, %edi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x40d0
cmpl $0x78, %eax
je 0x5990
cmpl $-0x1, %eax
je 0x59db
cmpl $0x42, %eax
je 0x59ae
cmpl $0x44, %eax
je 0x59be
cmpl $0x63, %eax
je 0x59c6
leaq 0x7(%rsp), %r13
cmpl $0x68, %eax
je 0x59cb
cmpl $0x6f, %eax
je 0x59b6
cmpl $0x3a, %eax
je 0x5b41
cmpl $0x3f, %eax
jne 0x5948
jmp 0x5b38
movq 0x85f9(%rip), %rax      # 0xdf90
movq (%rax), %rcx
movl $0x1f4, %esi            # imm = 0x1F4
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x4700
jmp 0x5948
movb $0x1, %al
movl %eax, 0x18(%rsp)
jmp 0x5948
movb $0x1, %al
movl %eax, 0x10(%rsp)
jmp 0x5948
movb $0x1, %al
movl %eax, 0x8(%rsp)
jmp 0x5948
leaq 0x6(%rsp), %r13
movb $0x1, (%r13)
testb $0x1, 0x7(%rsp)
jne 0x5bbc
cmpb $0x1, 0x6(%rsp)
je 0x5b67
testb $0x1, 0x8(%rsp)
je 0x59f7
leaq 0x8d1e(%rip), %rax      # 0xe712
movb $0x1, (%rax)
testb $0x1, 0x10(%rsp)
je 0x5a05
movb $0x1, 0x8d7f(%rip)      # 0xe784
testb $0x1, 0x18(%rsp)
je 0x5a11
callq 0x4d44
leaq 0x3d28(%rip), %rdi      # 0x9740
leaq 0x3a41(%rip), %rsi      # 0x9460
leaq 0x3a47(%rip), %rdx      # 0x946d
xorl %eax, %eax
callq 0x5757
leaq 0x3d1e(%rip), %rdi      # 0x9752
leaq 0x230(%rsp), %rbx
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5757
movq %rbx, %rdi
callq 0x7c8c
callq 0x7879
callq 0x4280
testl %eax, %eax
jne 0x5b07
leaq 0x3c2d(%rip), %rdi      # 0x9694
callq 0x4340
movq %rax, %rbx
leaq 0x3f8a(%rip), %rdi      # 0x9a00
xorl %eax, %eax
callq 0x5757
testq %rbx, %rbx
je 0x5bc1
leaq 0x3c0e(%rip), %rdi      # 0x969b
callq 0x81be
testb %al, %al
je 0x5ba5
leaq 0x3bfa(%rip), %rdi      # 0x969b
callq 0x4690
testl %eax, %eax
jne 0x5ba5
movl 0x14(%rbx), %edi
callq 0x4790
cmpl $-0x1, %eax
je 0x5bd8
movl 0x14(%rbx), %edi
callq 0x45c0
cmpl $-0x1, %eax
je 0x5beb
movl 0x10(%rbx), %edi
callq 0x47c0
cmpl $-0x1, %eax
je 0x5bfe
movl 0x10(%rbx), %edi
callq 0x41b0
cmpl $-0x1, %eax
je 0x5c11
callq 0x4280
movl %eax, %esi
leaq 0x3c60(%rip), %rdi      # 0x9760
xorl %eax, %eax
callq 0x5757
callq 0x737d
xorl %eax, %eax
leaq 0x8c7b(%rip), %rcx      # 0xe790
cmpq $0x4f, %rax
ja 0x5b26
andq $0x0, (%rax,%rcx)
addq $0x8, %rax
jmp 0x5b15
cmpb $0x0, 0x8c57(%rip)      # 0xe784
je 0x5c24
jmp 0x5caa
leaq 0x3c58(%rip), %rsi      # 0x9797
jmp 0x5b48
leaq 0x3c2c(%rip), %rsi      # 0x9774
movq 0x8471(%rip), %rax      # 0xdfc0
movq (%rax), %rdi
movq 0x845f(%rip), %rax      # 0xdfb8
movl (%rax), %edx
xorl %eax, %eax
callq 0x4670
jmp 0x59cb
leaq 0x3bc4(%rip), %rbx      # 0x9732
pushq $0x2
popq %rbp
leaq 0x230(%rsp), %r14
movq %rbx, %rdi
movl %ebp, %esi
movq %r14, %rdx
callq 0x749a
testq %rax, %rax
je 0x5b79
movq %rax, %r15
movq %rax, %rdi
callq 0x7b15
movq %r15, %rdi
callq 0x4530
xorl %edi, %edi
callq 0x4540
callq 0x4050
movl (%rax), %edi
leaq 0x3e83(%rip), %rsi      # 0x9a36
leaq 0x3ae1(%rip), %rdx      # 0x969b
jmp 0x5bd1
callq 0x62e4
leaq 0x3e54(%rip), %rsi      # 0x9a1c
leaq 0x3ac5(%rip), %rdx      # 0x9694
xorl %edi, %edi
xorl %eax, %eax
callq 0x5513
callq 0x4050
movl (%rax), %edi
leaq 0x3e59(%rip), %rsi      # 0x9a3f
jmp 0x629c
callq 0x4050
movl (%rax), %edi
leaq 0x3e4d(%rip), %rsi      # 0x9a46
jmp 0x629c
callq 0x4050
movl (%rax), %edi
leaq 0x3e42(%rip), %rsi      # 0x9a4e
jmp 0x629c
callq 0x4050
movl (%rax), %edi
leaq 0x3e36(%rip), %rsi      # 0x9a55
jmp 0x629c
callq 0x715c
xorl %ebp, %ebp
testl %eax, %eax
je 0x5caa
cmpb $0x0, 0x8b4e(%rip)      # 0xe784
jne 0x5c96
movups 0x7ec1(%rip), %xmm0     # 0xdb00
movaps %xmm0, 0x40(%rsp)
movups 0x7ea5(%rip), %xmm0     # 0xdaf0
movaps %xmm0, 0x30(%rsp)
movl $0x708, %esi            # imm = 0x708
testb $0x1, %bpl
jne 0x5c68
leaq 0x30(%rsp), %rdi
callq 0x77c6
movq %rax, %rsi
leaq 0x20(%rsp), %rbx
movq %rsi, (%rbx)
andq $0x0, 0x8(%rbx)
leaq 0x3e2f(%rip), %rdi      # 0x9aab
xorl %eax, %eax
callq 0x5684
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4130
cmpb $0x1, 0x8af0(%rip)      # 0xe784
jne 0x5c24
xorl %eax, %eax
addq $0x428, %rsp            # imm = 0x428
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3dd9(%rip), %rdi      # 0x9a8a
callq 0x776a
movq %rax, %rdi
callq 0x851e
movq %rax, %rbx
leaq 0x4203(%rip), %rsi      # 0x9ecb
movq %rax, %rdi
callq 0x63a1
testb %al, %al
jne 0x62a3
leaq 0x39c1(%rip), %r14      # 0x96a0
pushq $0x42
popq %r15
movq %rbx, %r12
movsbl (%r12), %ebp
testl %ebp, %ebp
je 0x5d16
movq %r14, %rdi
movl %ebp, %esi
movq %r15, %rdx
callq 0x44c0
incq %r12
testq %rax, %rax
jne 0x5ce6
leaq 0x3dfa(%rip), %rsi      # 0x9b05
xorl %edi, %edi
movl %ebp, %edx
xorl %eax, %eax
callq 0x5513
xorl %r14d, %r14d
leaq 0x3e34(%rip), %r15      # 0x9b54
leaq 0x8a69(%rip), %r12      # 0xe790
testq %r14, %r14
movl $0x0, %edi
cmoveq %rbx, %rdi
movq %r15, %rsi
callq 0x46e0
cmpq $0x9, %r14
ja 0x5d5b
testq %rax, %rax
je 0x5d5b
movq %rax, %rdi
callq 0x851e
movq %rax, (%r12)
incq %r14
addq $0x8, %r12
jmp 0x5d27
testq %r14, %r14
je 0x62ac
leaq 0x3e1e(%rip), %rdi      # 0x9b89
movq %r14, %rsi
xorl %eax, %eax
callq 0x5684
movq %rbx, %rdi
callq 0x4530
leaq 0x8a0c(%rip), %r12      # 0xe790
leaq 0x30(%rsp), %rbx
xorl %ebp, %ebp
xorl %r14d, %r14d
cmpq $0x50, %r14
jae 0x6272
movq (%r14,%r12), %rsi
testq %rsi, %rsi
je 0x6272
testb $0x1, %bpl
jne 0x6272
leaq 0x3ca7(%rip), %rdi      # 0x9a5d
xorl %eax, %eax
callq 0x5757
movq (%r14,%r12), %r15
leaq 0x3ca9(%rip), %rdi      # 0x9a71
callq 0x776a
testq %r15, %r15
je 0x6292
movq %rax, %r13
testq %rax, %rax
je 0x6292
callq 0x6f6b
cmpl $-0x1, %eax
movq %r14, 0x18(%rsp)
je 0x5e32
movl $0x1f4, %edx            # imm = 0x1F4
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4220
movq %r13, %rdi
leaq 0x3f6a(%rip), %rsi      # 0x9d74
callq 0x63a1
testb %al, %al
movq %rbp, 0x10(%rsp)
je 0x5e3d
leaq 0x3f61(%rip), %rdi      # 0x9d80
leaq 0x3f76(%rip), %rsi      # 0x9d9c
movq %r15, %rdx
xorl %eax, %eax
callq 0x8468
jmp 0x5e58
xorl %r15d, %r15d
xorl %r14d, %r14d
jmp 0x5fc2
leaq 0x3f64(%rip), %rdi      # 0x9da8
leaq 0x3f51(%rip), %rsi      # 0x9d9c
movq %r15, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x8468
movq %rax, 0x8(%rsp)
leaq 0x3f71(%rip), %rdi      # 0x9dd5
callq 0x776a
leaq 0x3f5c(%rip), %rdi      # 0x9dcc
movq %rax, %rsi
xorl %eax, %eax
callq 0x8468
movq %rax, %r13
leaq 0x3f63(%rip), %rdi      # 0x9de7
callq 0x776a
movq %rax, %rbx
leaq 0x4941(%rip), %rdi      # 0xa7d4
callq 0x776a
leaq 0x3f42(%rip), %rdi      # 0x9de1
movq %rbx, %rsi
movq %rax, %rdx
xorl %eax, %eax
callq 0x8468
movq %rax, %rbp
movq %rax, %rdi
callq 0x41c0
movl $0x1f4, %ecx            # imm = 0x1F4
movq %rbp, %rdi
movq %rax, %rsi
leaq 0x30(%rsp), %rbx
movq %rbx, %rdx
callq 0x4bf8
testl %eax, %eax
js 0x5f8c
leaq 0x3f32(%rip), %rdi      # 0x9e10
movq %rbx, %rsi
xorl %eax, %eax
callq 0x8468
movq %rax, %rbx
leaq 0x46b8(%rip), %rdi      # 0xa5aa
leaq 0x3567(%rip), %rsi      # 0x9460
leaq 0x356d(%rip), %rdx      # 0x946d
leaq 0x3579(%rip), %rcx      # 0x9480
xorl %eax, %eax
callq 0x8468
movq %rax, %r14
leaq 0x3f10(%rip), %rdi      # 0x9e28
xorl %eax, %eax
callq 0x5684
leaq 0x3f1b(%rip), %rdi      # 0x9e41
movq 0x8(%rsp), %r15
movq %r15, %rsi
movq %r13, %rdx
movq %rbx, %rcx
movq %r14, %r8
xorl %eax, %eax
leaq 0x8500(%rip), %r9       # 0xe440
callq *(%r9)
movl %eax, %r12d
movq %r15, %rdi
callq 0x4530
movq %r13, %rdi
callq 0x4530
movq %rbp, %rdi
callq 0x4530
movq %rbx, %rdi
callq 0x4530
movq %r14, %rdi
callq 0x4530
testl %r12d, %r12d
je 0x5ff2
xorl %r14d, %r14d
leaq 0x8813(%rip), %r12      # 0xe790
leaq 0x30(%rsp), %rbx
movq 0x10(%rsp), %rbp
xorl %r15d, %r15d
jmp 0x5fc2
xorl %r15d, %r15d
pushq $0x5a
popq %rdi
leaq 0x3e57(%rip), %rsi      # 0x9df0
xorl %eax, %eax
callq 0x57ea
movq 0x8(%rsp), %rdi
callq 0x4530
movq %r13, %rdi
callq 0x4530
movq %rbp, %rdi
callq 0x4530
xorl %r14d, %r14d
movq 0x10(%rsp), %rbp
callq 0x7100
movq %r14, %rdi
callq 0x4530
testb %r15b, %r15b
jne 0x5fe4
xorl %edi, %edi
leaq 0x3a9c(%rip), %rsi      # 0x9a79
xorl %eax, %eax
callq 0x57ea
movq 0x18(%rsp), %r14
addq $0x8, %r14
jmp 0x5d8e
movl $0x7d0, %edi            # imm = 0x7D0
pushq $0x1
popq %rsi
callq 0x85a7
movq %rax, %r14
movl $0x7d0, %esi            # imm = 0x7D0
movq %rax, %rdi
leaq 0x8437(%rip), %r15      # 0xe448
callq *(%r15)
cmpl $-0x1, %eax
leaq 0x8772(%rip), %r12      # 0xe790
movq 0x10(%rsp), %rbp
je 0x60da
movl $0x1f4, %edx            # imm = 0x1F4
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x4220
movl $0x1f4, %esi            # imm = 0x1F4
movq %rbx, %rdi
callq *(%r15)
movq %rbx, %rdi
leaq 0x3e79(%rip), %rsi      # 0x9ecb
callq 0x63a1
testb %al, %al
jne 0x608b
movl $0x7d0, %edx            # imm = 0x7D0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x80a0
cmpq $0x7d0, %rax            # imm = 0x7D0
jb 0x608b
xorl %r15d, %r15d
xorl %edi, %edi
leaq 0x3dd1(%rip), %rsi      # 0x9e50
xorl %eax, %eax
callq 0x57ea
jmp 0x5fc2
testq %r14, %r14
je 0x6253
movq %r14, %rdi
leaq 0x3e2d(%rip), %rsi      # 0x9ecb
callq 0x63a1
testb %al, %al
jne 0x6253
movq %r14, %rdi
callq 0x851e
movq %rax, %rbx
movq %rbx, %rdi
leaq 0x3e09(%rip), %rsi      # 0x9ec9
callq 0x4770
testq %rax, %rax
je 0x60e7
cmpb $0xd, (%rax)
sete %cl
shlb $0x2, %cl
addb $0x4e, %cl
movb %cl, (%rax)
jmp 0x60b6
xorl %r15d, %r15d
leaq 0x30(%rsp), %rbx
jmp 0x5fc2
leaq 0x3dde(%rip), %rdi      # 0x9ecc
movq %rbx, %rsi
xorl %eax, %eax
callq 0x5684
movq %rbx, %rdi
callq 0x4530
movq %r14, %rdi
callq 0x851e
movq %rax, %rdi
callq 0x8332
movq %rax, %rbx
movq %rax, %rdi
pushq $0xa
popq %rsi
callq 0x44b0
testq %rax, %rax
je 0x6246
incq %rax
movq %rax, %rdi
callq 0x851e
movq %rax, %rdi
callq 0x82bf
movq %rax, %r13
movq %rbx, %rdi
callq 0x4530
leaq 0x3db0(%rip), %rdi      # 0x9efc
movq %r13, %rsi
xorl %eax, %eax
callq 0x5684
movq %r13, %rdi
leaq 0x3db6(%rip), %rsi      # 0x9f16
pushq $0x5
popq %rdx
callq 0x41d0
testl %eax, %eax
je 0x620a
movq %r13, %rdi
leaq 0x3da2(%rip), %rsi      # 0x9f1c
pushq $0x6
popq %rdx
callq 0x41d0
testl %eax, %eax
je 0x6220
xorl %ebx, %ebx
cmpq $0x7f, %rbx
ja 0x6243
leaq 0x7973(%rip), %rax      # 0xdb10
movq (%rbx,%rax), %rdi
movq %r13, %rsi
callq 0x63a1
addq $0x10, %rbx
testb %al, %al
je 0x618c
movq %r13, %rdi
callq 0x4530
leaq 0x7950(%rip), %rax      # 0xdb10
movl -0x8(%rbx,%rax), %eax
cmpq $0x7, %rax
leaq 0x30(%rsp), %rbx
ja 0x6253
leaq 0x3266(%rip), %rcx      # 0x9440
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
cmpb $0x0, 0x859a(%rip)      # 0xe784
leaq 0x3b07(%rip), %rsi      # 0x9cf8
leaq 0x3b44(%rip), %rax      # 0x9d3c
cmovneq %rax, %rsi
xorl %edi, %edi
xorl %eax, %eax
callq 0x57ea
movb $0x1, %bpl
jmp 0x623b
movq %r13, %rdi
callq 0x4530
leaq 0x30(%rsp), %rbx
leaq 0x39b2(%rip), %rdi      # 0x9bd0
jmp 0x6234
movq %r13, %rdi
callq 0x4530
leaq 0x30(%rsp), %rbx
leaq 0x39bb(%rip), %rdi      # 0x9bef
xorl %eax, %eax
callq 0x5757
movb $0x1, %r15b
jmp 0x5fc2
movq %r13, %rbx
movq %rbx, %rdi
callq 0x4530
leaq 0x30(%rsp), %rbx
xorl %r15d, %r15d
xorl %edi, %edi
leaq 0x3bee(%rip), %rsi      # 0x9e4d
leaq 0x3af5(%rip), %rdx      # 0x9d5b
xorl %eax, %eax
callq 0x57ea
jmp 0x5fc2
xorl %ebx, %ebx
cmpq $0x4f, %rbx
ja 0x5c2f
movq (%rbx,%r12), %rdi
callq 0x4530
andq $0x0, (%rbx,%r12)
addq $0x8, %rbx
jmp 0x6274
leaq 0x392b(%rip), %rsi      # 0x9bc4
pushq $0x16
popq %rdi
xorl %eax, %eax
callq 0x5513
leaq 0x381a(%rip), %rsi      # 0x9ac4
jmp 0x6299
leaq 0x38a3(%rip), %rsi      # 0x9b56
xorl %edi, %edi
jmp 0x629c
leaq 0x3981(%rip), %rsi      # 0x9c3f
jmp 0x62b3
leaq 0x399f(%rip), %rsi      # 0x9c66
jmp 0x62b3
leaq 0x39de(%rip), %rsi      # 0x9cae
jmp 0x62b3
leaq 0x3a00(%rip), %rsi      # 0x9cd9
jmp 0x62b3
leaq 0x3923(%rip), %rsi      # 0x9c05
jmp 0x62b3