// File: /workspace/github_c_makefile_star2_O2/TeaInside[P]teavpn/src/teavpn/cli_arg.c
// Function: argv_parser
bool argv_parser(teavpn_config *config, int argc, char **argv, char **envp)
{
	if (argc == 1) {
		show_help_command(argv[0]);
		return false;
	}

	if (!strcmp(argv[1], "server")) {
		config->type = teavpn_server_config;
		return server_argv_parser(argv[0], &(config->config.server), argc - 1, &(argv[1]), envp);
	} else if (!strcmp(argv[1], "connect")) {
		config->type = teavpn_client_config;
		return client_argv_parser(argv[0], &(config->config.client), argc - 1, &(argv[1]), envp);
	} else if (
		(!strcmp(argv[1], "--help")) || (!strcmp(argv[1], "-h")) || (!strcmp(argv[1], "help"))
	) {
		show_help_command(argv[0]);
	} else {
		printf("Invalid command \"%s\"!\n\nShow usage: %s --help\n", argv[1], argv[0]);
	}

	return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r12
movq %fs:0x28, %rax
movq %rax, -0x30(%rbp)
cmpl $0x1, %esi
jne 0x2edb
movq (%r12), %rdi
callq 0x343b
xorl %r12d, %r12d
jmp 0x33f7
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x8(%r12), %r15
movq 0x8(%r12), %r13
leaq 0x424e(%rip), %rsi      # 0x7140
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x2f71
leaq 0x4530(%rip), %rsi      # 0x7435
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x31a9
leaq 0x422b(%rip), %rsi      # 0x7147
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x2eca
cmpb $0x2d, (%r13)
jne 0x2f3d
cmpb $0x68, 0x1(%r13)
jne 0x2f3d
cmpb $0x0, 0x2(%r13)
je 0x2eca
leaq 0x4205(%rip), %rsi      # 0x7149
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x2eca
movq (%r12), %rdx
leaq 0x41ef(%rip), %rdi      # 0x714e
xorl %r12d, %r12d
movq %r13, %rsi
xorl %eax, %eax
callq 0x2150
jmp 0x33f7
andl $0x0, 0x40(%rbx)
movq (%r12), %rax
movq %rax, -0x48(%rbp)
decl %r14d
leaq 0x8299(%rip), %rax      # 0xb220
movq %rax, (%rbx)
movw $0x800, 0x3c(%rbx)      # imm = 0x800
leaq 0x8(%rbx), %rax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl $0xd90305dc, 0x38(%rbx) # imm = 0xD90305DC
andq $0x0, 0x18(%rbx)
leaq 0x8276(%rip), %rax      # 0xb228
movq %rax, 0x28(%rbx)
leaq 0x8276(%rip), %rax      # 0xb233
movq %rax, 0x30(%rbx)
leaq 0x8277(%rip), %rax      # 0xb23f
movq %rax, 0x20(%rbx)
leaq -0x34(%rbp), %r13
andl $0x0, -0x34(%rbp)
movl %r14d, %edi
movq %r15, %rsi
leaq 0x419b(%rip), %rdx      # 0x717c
leaq 0x7af8(%rip), %rcx      # 0xaae0
movq %r13, %r8
callq 0x2120
cmpl $-0x1, %eax
sete %r12b
je 0x314d
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
jbe 0x304a
cmpl $0x63, %eax
je 0x310c
cmpl $0x64, %eax
je 0x3122
cmpl $0x76, %eax
je 0x30ed
cmpl $0x70, %eax
je 0x3135
cmpl $0x74, %eax
je 0x30f5
cmpl $0x68, %eax
jne 0x3418
movq 0x7f96(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, (%rbx)
jmp 0x2fd0
leaq 0x40c7(%rip), %rdx      # 0x7118
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0x7f77(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x10(%rbx)
jmp 0x2fd0
leaq 0x41de(%rip), %rdi      # 0x7252
movq -0x48(%rbp), %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x432e(%rip), %rdi      # 0x73b4
callq 0x2090
leaq 0x42be(%rip), %rdi      # 0x7350
callq 0x2090
leaq 0x434b(%rip), %rdi      # 0x73e9
callq 0x2090
leaq 0x42da(%rip), %rdi      # 0x7384
callq 0x2090
movq 0x7f1a(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
jmp 0x2fd0
movq 0x7f0e(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3c(%rbx)
jmp 0x2fd0
movq 0x7ef7(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x2fd0
incb 0x3c(%rbx)
jmp 0x2fd0
movq 0x7edc(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3d(%rbx)
jmp 0x2fd0
movq 0x7ec5(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
jmp 0x2fd0
movq 0x7eaf(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x18(%rbx)
jmp 0x2fd0
movq 0x7e9c(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movw %ax, 0x3a(%rbx)
jmp 0x2fd0
leaq 0x41eb(%rip), %rdi      # 0x733f
callq 0x2090
movq (%rbx), %rsi
leaq 0x4059(%rip), %rdi      # 0x71bc
xorl %eax, %eax
callq 0x2150
movzwl 0x3a(%rbx), %esi
leaq 0x4056(%rip), %rdi      # 0x71cb
xorl %eax, %eax
callq 0x2150
movzbl 0x3d(%rbx), %esi
leaq 0x4053(%rip), %rdi      # 0x71da
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rsi
leaq 0x404e(%rip), %rdi      # 0x71e7
xorl %eax, %eax
callq 0x2150
movq 0x20(%rbx), %rsi
jmp 0x33c8
movl $0x1, 0x40(%rbx)
movq (%r12), %rax
movq %rax, -0x48(%rbp)
andq $0x0, (%rbx)
decl %r14d
movw $0xd903, 0x3a(%rbx)     # imm = 0xD903
movb $0x0, 0x3c(%rbx)
leaq 0x8(%rbx), %rax
movq %rax, -0x40(%rbp)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movw $0x5dc, 0x20(%rbx)      # imm = 0x5DC
leaq 0x805a(%rip), %rax      # 0xb23f
movq %rax, 0x18(%rbx)
leaq -0x34(%rbp), %r13
andl $0x0, -0x34(%rbp)
movl %r14d, %edi
movq %r15, %rsi
leaq 0x4071(%rip), %rdx      # 0x726f
leaq 0x7a5b(%rip), %rcx      # 0xac60
movq %r13, %r8
callq 0x2120
cmpl $-0x1, %eax
sete %r12b
je 0x3383
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
jbe 0x3267
cmpl $0x50, %eax
je 0x3321
cmpl $0x63, %eax
je 0x3355
cmpl $0x76, %eax
je 0x32fe
cmpl $0x70, %eax
je 0x336b
cmpl $0x75, %eax
je 0x3306
cmpl $0x68, %eax
jne 0x3418
movq 0x7d79(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, (%rbx)
jmp 0x31ed
leaq 0x3e82(%rip), %rdx      # 0x70f0
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0x7d5a(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x10(%rbx)
jmp 0x31ed
leaq 0x3fef(%rip), %rdi      # 0x7280
movq -0x48(%rbp), %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x4111(%rip), %rdi      # 0x73b4
callq 0x2090
leaq 0x4118(%rip), %rdi      # 0x73c7
callq 0x2090
leaq 0x412e(%rip), %rdi      # 0x73e9
callq 0x2090
movq 0x7d09(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
jmp 0x31ed
movq 0x7cfd(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3c(%rbx)
jmp 0x31ed
movq 0x7ce6(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x18(%rbx)
jmp 0x31ed
incb 0x3c(%rbx)
jmp 0x31ed
movq 0x7ccb(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq %rdi, 0x28(%rbx)
callq 0x2100
movb %al, 0x38(%rbx)
jmp 0x31ed
movq 0x7cb0(%rip), %rax      # 0xafd8
movq (%rax), %r12
leaq 0x7f2e(%rip), %r13      # 0xb260
movq %r13, %rdi
movq %r12, %rsi
callq 0x2070
movq %r13, 0x30(%rbx)
leaq -0x34(%rbp), %r13
movq %r12, %rdi
callq 0x2100
movb %al, 0x39(%rbx)
jmp 0x31ed
movq 0x7c7c(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
jmp 0x31ed
movq 0x7c66(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movw %ax, 0x3a(%rbx)
jmp 0x31ed
leaq 0x3fb5(%rip), %rdi      # 0x733f
callq 0x2090
movq (%rbx), %rsi
leaq 0x3e23(%rip), %rdi      # 0x71bc
xorl %eax, %eax
callq 0x2150
movzwl 0x3a(%rbx), %esi
leaq 0x3e20(%rip), %rdi      # 0x71cb
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rsi
leaq 0x3e2a(%rip), %rdi      # 0x71e7
xorl %eax, %eax
callq 0x2150
movq 0x18(%rbx), %rsi
leaq 0x3e2c(%rip), %rdi      # 0x71fb
xorl %eax, %eax
callq 0x2150
movq 0x8(%rbx), %rsi
leaq 0x3e28(%rip), %rdi      # 0x7209
xorl %eax, %eax
callq 0x2150
movq 0x7be1(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3436
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x7bd9(%rip), %rax      # 0xaff8
movq (%rax), %rcx
leaq 0x3d61(%rip), %rdi      # 0x718a
pushq $0x31
popq %rsi
pushq $0x1
popq %rdx
callq 0x23b0
jmp 0x33f7
callq 0x2110