// File: /workspace/github_c_makefile_star2_O1/GangZhuo[P]dohclient/src/main.c
// Function: main
int main(int argc, char** argv)
{
#ifdef WINDOWS
	win_init();
	log_init();
#endif

	conf.log_level = loglevel;

	if (conf_parse_args(&conf, argc, argv) != 0) {
		usage();
		exit(-1);
		return EXIT_FAILURE;
	}

	if (conf.is_print_help) {
		usage();
		exit(0);
		return EXIT_SUCCESS;
	}

	if (conf.is_print_version) {
		printf(DOHCLIENT_NAME " v" DOHCLIENT_VERSION "%s\n", git_version());
		exit(0);
		return EXIT_SUCCESS;
	}

	loglevel = conf.log_level;

	if (conf.daemonize) {
		run_as_daemonize();
		return EXIT_SUCCESS;
	}

	if (init_dohclient() != 0)
		return EXIT_FAILURE;

	if (do_loop() != 0) {
		loge("Exit with error\n");
		return EXIT_FAILURE;
	}

	uninit_dohclient();

	conf_free(&conf);

	print_leak();

	return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
xorl %eax, %eax
callq 0x17d59
movl (%rax), %eax
movl %eax, 0xeb88(%rip)      # 0x2d6c0
leaq 0xeaf1(%rip), %rdi      # 0x2d630
movl %ebp, %esi
movq %rbx, %rdx
callq 0x12dcc
testl %eax, %eax
jne 0x1ecde
cmpl $0x0, 0xeb70(%rip)      # 0x2d6c8
jne 0x1eced
cmpl $0x0, 0xeb5f(%rip)      # 0x2d6c4
jne 0x1ecf7
movl 0xeb4f(%rip), %ebx      # 0x2d6c0
xorl %eax, %eax
callq 0x17d59
movl %ebx, (%rax)
cmpl $0x0, 0xeb33(%rip)      # 0x2d6b4
je 0x1ec3c
cmpq $0x0, 0xeab1(%rip)      # 0x2d640
jne 0x1eba4
leaq 0x73ae(%rip), %rdi      # 0x25f46
callq 0x3610
movq %rax, 0xea9c(%rip)      # 0x2d640
callq 0x30e0
testl %eax, %eax
js 0x1eda4
jne 0x1ed11
callq 0x1edfd
testl %eax, %eax
jne 0x1eda4
xorl %edi, %edi
callq 0x35e0
movq 0xea76(%rip), %rax      # 0x2d648
testq %rax, %rax
je 0x1ebdc
cmpb $0x0, (%rax)
jne 0x1ebe8
leaq 0x73c9(%rip), %rdi      # 0x25fac
callq 0x1804e
callq 0x33e0
testl %eax, %eax
js 0x1eda4
leaq 0x5d3d(%rip), %rdi      # 0x24939
callq 0x3520
testl %eax, %eax
js 0x1eda4
leaq 0x7374(%rip), %rdi      # 0x25f84
movl $0x1, %esi
xorl %eax, %eax
callq 0x3260
testl %eax, %eax
je 0x1ec87
movl %eax, %ebx
movl %eax, %edi
movl $0x1, %esi
callq 0x3320
movl %ebx, %edi
movl $0x2, %esi
callq 0x3320
jmp 0x1ec9b
callq 0x1edfd
movl $0x1, %ebx
testl %eax, %eax
jne 0x1ecc2
callq 0x1f551
testl %eax, %eax
je 0x1ecc9
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x1ecc2
leaq 0x672c(%rip), %rsi      # 0x25392
leaq 0x6730(%rip), %rdx      # 0x2539d
leaq 0x672e(%rip), %r8       # 0x253a2
movl $0x3, %edi
movl $0x5d6, %ecx            # imm = 0x5D6
xorl %eax, %eax
callq 0x17d92
jmp 0x1ecc2
movl $0x1, %edi
callq 0x3670
movl $0x2, %edi
callq 0x3670
xorl %ebx, %ebx
xorl %edi, %edi
callq 0x3670
callq 0x1f551
testl %eax, %eax
jne 0x1ed72
callq 0x20d35
leaq 0xe973(%rip), %rdi      # 0x2d630
callq 0x13fb0
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
callq 0x20d35
leaq 0xe95b(%rip), %rdi      # 0x2d630
callq 0x13fb0
xorl %ebx, %ebx
jmp 0x1ecc2
callq 0x1edd3
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3460
callq 0x1edd3
jmp 0x1edcc
leaq 0x6680(%rip), %rdi      # 0x2537e
leaq 0x7238(%rip), %rsi      # 0x25f3d
xorl %eax, %eax
callq 0x3050
jmp 0x1edcc
movq 0xe928(%rip), %rdi      # 0x2d640
testq %rdi, %rdi
je 0x1edcc
movl %eax, %ebx
leaq 0x74d3(%rip), %rsi      # 0x261fd
callq 0x3430
testq %rax, %rax
jne 0x1edae
xorl %eax, %eax
callq 0x17d59
cmpl $0x2, (%rax)
jl 0x1ece3
movq 0xe8f9(%rip), %r9       # 0x2d640
leaq 0x6644(%rip), %rsi      # 0x25392
leaq 0x7208(%rip), %rdx      # 0x25f5d
leaq 0x7212(%rip), %r8       # 0x25f6e
movl $0x2, %edi
movl $0x57c, %ecx            # imm = 0x57C
xorl %eax, %eax
callq 0x17d92
jmp 0x1ece3
xorl %eax, %eax
callq 0x17d59
cmpl $0x3, (%rax)
jl 0x1eda4
leaq 0x660d(%rip), %rsi      # 0x25392
leaq 0x71d1(%rip), %rdx      # 0x25f5d
leaq 0x71fb(%rip), %r8       # 0x25f8e
movl $0x3, %edi
movl $0x5a5, %ecx            # imm = 0x5A5
xorl %eax, %eax
callq 0x17d92
movl $0x1, %edi
callq 0x3460
movq %rax, %r14
leaq 0x592d(%rip), %rsi      # 0x246e5
movq %rax, %rdi
movl %ebx, %edx
xorl %eax, %eax
callq 0x3510
movq %r14, %rdi
callq 0x3380
xorl %edi, %edi
callq 0x3460