// File: /workspace/github_c_makefile_star2_O1/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 0x33d3
movq (%r12), %rdi
callq 0x398d
xorl %r12d, %r12d
jmp 0x3955
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x8(%r12), %r15
movq 0x8(%r12), %r13
leaq 0x3d56(%rip), %rsi      # 0x7140
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x3467
leaq 0x405b(%rip), %rsi      # 0x7458
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x36cc
leaq 0x3d33(%rip), %rsi      # 0x7147
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x33c2
leaq 0x3d27(%rip), %rsi      # 0x714e
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x33c2
leaq 0x3d0f(%rip), %rsi      # 0x7149
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x33c2
movq (%r12), %rdx
leaq 0x3cfc(%rip), %rdi      # 0x7151
xorl %r12d, %r12d
movq %r13, %rsi
xorl %eax, %eax
callq 0x2150
jmp 0x3955
xorl %eax, %eax
movl %eax, 0x40(%rbx)
movq (%r12), %rcx
movq %rcx, -0x48(%rbp)
decl %r14d
leaq 0x7da2(%rip), %rcx      # 0xb220
movq %rcx, (%rbx)
movw $0x800, 0x3c(%rbx)      # imm = 0x800
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl $0xd90305dc, 0x38(%rbx) # imm = 0xD90305DC
movq $0x0, 0x18(%rbx)
leaq 0x7d84(%rip), %rcx      # 0xb228
movq %rcx, 0x28(%rbx)
leaq 0x7d84(%rip), %rcx      # 0xb233
movq %rcx, 0x30(%rbx)
leaq 0x7d85(%rip), %rcx      # 0xb23f
movq %rcx, 0x20(%rbx)
leaq -0x34(%rbp), %r8
movl %eax, (%r8)
leaq 0x3cb3(%rip), %rdx      # 0x717f
leaq 0x760d(%rip), %rcx      # 0xaae0
movl %r14d, %edi
movq %r15, %rsi
callq 0x2120
cmpl $-0x1, %eax
sete %r12b
je 0x3670
leaq 0x8(%rbx), %rcx
movq %rcx, -0x40(%rbp)
leaq -0x34(%rbp), %r13
cmpl $0x63, %eax
jg 0x3527
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
ja 0x3573
leaq 0x3c0d(%rip), %rdx      # 0x7118
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0x7abd(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x10(%rbx)
jmp 0x3640
cmpl $0x6f, %eax
jle 0x354f
cmpl $0x70, %eax
je 0x3609
cmpl $0x74, %eax
je 0x361e
cmpl $0x76, %eax
jne 0x397a
incb 0x3c(%rbx)
jmp 0x3640
cmpl $0x64, %eax
je 0x3632
cmpl $0x68, %eax
jne 0x397a
movq 0x7a70(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, (%rbx)
jmp 0x3640
cmpl $0x63, %eax
jne 0x397a
movq 0x7a55(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
jmp 0x3640
leaq 0x3cbc(%rip), %rdi      # 0x7255
movq -0x48(%rbp), %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x3e0c(%rip), %rdi      # 0x73b7
callq 0x2090
leaq 0x3d9c(%rip), %rdi      # 0x7353
callq 0x2090
leaq 0x3e29(%rip), %rdi      # 0x73ec
callq 0x2090
leaq 0x3db8(%rip), %rdi      # 0x7387
callq 0x2090
movq 0x79f5(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
jmp 0x3640
movq 0x79ec(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x3640
movq 0x79dc(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3c(%rbx)
jmp 0x3640
movq 0x79c8(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movw %ax, 0x3a(%rbx)
jmp 0x3640
movq 0x79b3(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3d(%rbx)
jmp 0x3640
movq 0x799f(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x18(%rbx)
movl $0x0, -0x34(%rbp)
movl %r14d, %edi
movq %r15, %rsi
leaq 0x3b2b(%rip), %rdx      # 0x717f
leaq 0x7485(%rip), %rcx      # 0xaae0
movq %r13, %r8
callq 0x2120
cmpl $-0x1, %eax
sete %r12b
jne 0x34f7
leaq 0x3ccb(%rip), %rdi      # 0x7342
callq 0x2090
movq (%rbx), %rsi
leaq 0x3b39(%rip), %rdi      # 0x71bf
xorl %eax, %eax
callq 0x2150
movzwl 0x3a(%rbx), %esi
leaq 0x3b36(%rip), %rdi      # 0x71ce
xorl %eax, %eax
callq 0x2150
movzbl 0x3d(%rbx), %esi
leaq 0x3b33(%rip), %rdi      # 0x71dd
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rsi
leaq 0x3b2e(%rip), %rdi      # 0x71ea
xorl %eax, %eax
callq 0x2150
movq 0x20(%rbx), %rsi
jmp 0x3926
movl $0x1, 0x40(%rbx)
movq (%r12), %rax
movq %rax, -0x48(%rbp)
decl %r14d
movq $0x0, (%rbx)
movw $0xd903, 0x3a(%rbx)     # imm = 0xD903
movb $0x0, 0x3c(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movw $0x5dc, 0x20(%rbx)      # imm = 0x5DC
leaq 0x7b3c(%rip), %rax      # 0xb23f
movq %rax, 0x18(%rbx)
leaq -0x34(%rbp), %r8
movl $0x0, (%r8)
leaq 0x3b59(%rip), %rdx      # 0x7272
leaq 0x7540(%rip), %rcx      # 0xac60
movl %r14d, %edi
movq %r15, %rsi
callq 0x2120
cmpl $-0x1, %eax
sete %r12b
je 0x38e1
leaq 0x8(%rbx), %rcx
movq %rcx, -0x40(%rbp)
xorl %r12d, %r12d
leaq 0x39a6(%rip), %r13      # 0x70f0
movq %r15, -0x50(%rbp)
cmpl $0x62, %eax
jg 0x3778
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
ja 0x37c4
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq 0x786c(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x10(%rbx)
jmp 0x38b0
cmpl $0x6f, %eax
jle 0x37a0
cmpl $0x70, %eax
je 0x3872
cmpl $0x75, %eax
je 0x3887
cmpl $0x76, %eax
jne 0x3981
incb 0x3c(%rbx)
jmp 0x38b0
cmpl $0x63, %eax
je 0x389f
cmpl $0x68, %eax
jne 0x3981
movq 0x781f(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, (%rbx)
jmp 0x38b0
cmpl $0x50, %eax
jne 0x3981
movq 0x7804(%rip), %rax      # 0xafd8
movq (%rax), %r12
movq %r13, %r15
leaq 0x7a7f(%rip), %r13      # 0xb260
movq %r13, %rdi
movq %r12, %rsi
callq 0x2070
movq %r13, 0x30(%rbx)
movq %r15, %r13
movq -0x50(%rbp), %r15
movq %r12, %rdi
callq 0x2100
movb %al, 0x39(%rbx)
jmp 0x38b0
leaq 0x3a75(%rip), %rdi      # 0x7283
movq -0x48(%rbp), %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x3b97(%rip), %rdi      # 0x73b7
callq 0x2090
leaq 0x3b9e(%rip), %rdi      # 0x73ca
callq 0x2090
leaq 0x3bb4(%rip), %rdi      # 0x73ec
callq 0x2090
movq 0x778c(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
jmp 0x38b0
movq 0x7783(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x18(%rbx)
jmp 0x38b0
movq 0x7773(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3c(%rbx)
jmp 0x38b0
movq 0x775f(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movw %ax, 0x3a(%rbx)
jmp 0x38b0
movq 0x774a(%rip), %rax      # 0xafd8
movq (%rax), %rdi
movq %rdi, 0x28(%rbx)
callq 0x2100
movb %al, 0x38(%rbx)
jmp 0x38b0
movq 0x7732(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movl $0x0, -0x34(%rbp)
movl %r14d, %edi
movq %r15, %rsi
leaq 0x39ae(%rip), %rdx      # 0x7272
leaq 0x7395(%rip), %rcx      # 0xac60
leaq -0x34(%rbp), %r8
callq 0x2120
cmpl $-0x1, %eax
sete %r12b
jne 0x374e
leaq 0x3a5a(%rip), %rdi      # 0x7342
callq 0x2090
movq (%rbx), %rsi
leaq 0x38c8(%rip), %rdi      # 0x71bf
xorl %eax, %eax
callq 0x2150
movzwl 0x3a(%rbx), %esi
leaq 0x38c5(%rip), %rdi      # 0x71ce
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rsi
leaq 0x38cf(%rip), %rdi      # 0x71ea
xorl %eax, %eax
callq 0x2150
movq 0x18(%rbx), %rsi
leaq 0x38d1(%rip), %rdi      # 0x71fe
xorl %eax, %eax
callq 0x2150
movq 0x8(%rbx), %rsi
leaq 0x38cd(%rip), %rdi      # 0x720c
xorl %eax, %eax
callq 0x2150
movq 0x7683(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3988
andb $0x1, %r12b
movl %r12d, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2452
jmp 0x3955
callq 0x2430
jmp 0x3955
callq 0x2110