// File: /workspace/github_c_makefile_star2_O0/GangZhuo[P]dohclient/src/config.c
// Function: conf_parse_args
int conf_parse_args(config_t *conf, int argc, char** argv)
{
	int ch;
	int option_index = 0;
	static struct option long_options[] = {
		{"daemon",       no_argument,       NULL, 1},
		{"pid",          required_argument, NULL, 2},
		{"log",          required_argument, NULL, 3},
		{"log-level",    required_argument, NULL, 4},
		{"config",       required_argument, NULL, 5},
		{"launch-log",   required_argument, NULL, 6},
		{"proxy",        required_argument, NULL, 7},
		{"chnroute",     required_argument, NULL, 8},
		{"channel",      required_argument, NULL, 9},
		{"channel-args", required_argument, NULL, 10},
		{"blacklist",    required_argument, NULL, 11},
		{"hosts",        required_argument, NULL, 12},
		{"cache-timeout",required_argument, NULL, 13},
		{"mode",         required_argument, NULL, 14},
		{"cache-api",    required_argument, NULL, 15},
		{"cache-db",     required_argument, NULL, 16},
		{"cache-autosave",required_argument, NULL,17},
		{"wwwroot",      required_argument, NULL, 18},
		{0, 0, 0, 0}
	};

	while ((ch = getopt_long(argc, argv, "hb:p:t:vV", long_options, &option_index)) != -1) {
		switch (ch) {
		case 1:
			conf->daemonize = 1;
			break;
		case 2:
			conf->pid_file = strdup(optarg);
			break;
		case 3:
			conf->log_file = strdup(optarg);
			break;
		case 4:
			conf->log_level = atoi(optarg);
			break;
		case 5:
			conf->config_file = strdup(optarg);
			break;
		case 6:
			conf->launch_log = strdup(optarg);
			break;
		case 7:
			conf->proxy = strdup(optarg);
			break;
		case 8:
			conf->chnroute = strdup(optarg);
			break;
		case 9:
			if (conf_add_channel(conf, optarg)) {
				return -1;
			}
			break;
		case 10:
			if (conf_add_channel_args(conf, optarg)) {
				return -1;
			}
			break;
		case 11:
			conf->blacklist = strdup(optarg);
			break;
		case 12:
			conf->hosts = strdup(optarg);
			break;
		case 13:
			conf->cache_timeout = atoi(optarg);
			break;
		case 14:
			conf->channel_choose_mode = atoi(optarg);
			break;
		case 15:
			conf->cache_api = strdup(optarg);
			break;
		case 16:
			conf->cachedb = strdup(optarg);
			break;
		case 17:
			conf->cachedb_autosave = strdup(optarg);
			break;
		case 18:
			conf->wwwroot = strdup(optarg);
			break;
		case 'h':
			conf->is_print_help = 1;
			break;
		case 'b':
			conf->listen_addr = strdup(optarg);
			break;
		case 'p':
			conf->listen_port = strdup(optarg);
			break;
		case 't':
			conf->timeout = atoi(optarg);
			break;
		case 'v':
			conf->log_level++;
			break;
		case 'V':
			conf->is_print_version = 1;
			break;
		default:
			return -1;
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
leaq 0x1ab38(%rip), %rdx     # 0x37180
leaq 0x25161(%rip), %rcx     # 0x417b0
leaq -0x28(%rbp), %r8
callq 0x35d0
movl %eax, -0x24(%rbp)
cmpl $-0x1, %eax
je 0x1c95f
movl -0x24(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x75, %eax
ja 0x1c951
movq -0x30(%rbp), %rax
leaq 0x1a8a5(%rip), %rcx     # 0x36f28
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movl $0x1, 0x84(%rax)
jmp 0x1c95a
movq 0x2492a(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x1c95a
movq 0x2490b(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x1c95a
movq 0x248ec(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3580
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x90(%rax)
jmp 0x1c95a
movq 0x248cc(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x1c95a
movq 0x248ad(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x1c95a
movq 0x2488e(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x1c95a
movq 0x2486f(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x1c95a
movq -0x10(%rbp), %rdi
movq 0x2484c(%rip), %rax     # 0x40fd0
movq (%rax), %rsi
callq 0x1c970
cmpl $0x0, %eax
je 0x1c79d
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1c966
jmp 0x1c95a
movq -0x10(%rbp), %rdi
movq 0x24823(%rip), %rax     # 0x40fd0
movq (%rax), %rsi
callq 0x1ca80
cmpl $0x0, %eax
je 0x1c7c6
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1c966
jmp 0x1c95a
movq 0x247fe(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x40(%rax)
jmp 0x1c95a
movq 0x247df(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0x1c95a
movq 0x247c0(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3580
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x8c(%rax)
jmp 0x1c95a
movq 0x247a0(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3580
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x80(%rax)
jmp 0x1c95a
movq 0x24780(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x68(%rax)
jmp 0x1c95a
movq 0x24761(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
jmp 0x1c95a
movq 0x24742(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x60(%rax)
jmp 0x1c95a
movq 0x24723(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
jmp 0x1c95a
movq -0x10(%rbp), %rax
movl $0x1, 0x98(%rax)
jmp 0x1c95a
movq 0x246f1(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
jmp 0x1c95a
movq 0x246d6(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3620
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x1c95a
movq 0x246ba(%rip), %rax     # 0x40fd0
movq (%rax), %rdi
callq 0x3580
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x88(%rax)
jmp 0x1c95a
movq -0x10(%rbp), %rax
movl 0x90(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x90(%rax)
jmp 0x1c95a
movq -0x10(%rbp), %rax
movl $0x1, 0x94(%rax)
jmp 0x1c95a
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0x1c966
jmp 0x1c63a
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop