// File: /workspace/github_c_makefile_star2_O3/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 0x33c2
movq (%r12), %rdi
callq 0x394a
xorl %ebx, %ebx
jmp 0x3911
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x8(%r12), %r15
movq 0x8(%r12), %r13
leaq 0x3d67(%rip), %rsi      # 0x7140
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x3457
leaq 0x4049(%rip), %rsi      # 0x7435
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x36b7
leaq 0x3d44(%rip), %rsi      # 0x7147
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x33b2
cmpb $0x2d, (%r13)
jne 0x3424
cmpb $0x68, 0x1(%r13)
jne 0x3424
cmpb $0x0, 0x2(%r13)
je 0x33b2
leaq 0x3d1e(%rip), %rsi      # 0x7149
movq %r13, %rdi
callq 0x2220
testl %eax, %eax
je 0x33b2
movq (%r12), %rdx
leaq 0x3d08(%rip), %rdi      # 0x714e
xorl %ebx, %ebx
movq %r13, %rsi
xorl %eax, %eax
callq 0x2150
jmp 0x3911
xorl %eax, %eax
movl %eax, 0x40(%rbx)
movq (%r12), %rcx
movq %rcx, -0x48(%rbp)
decl %r14d
leaq 0x7db2(%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 0x7d94(%rip), %rcx      # 0xb228
movq %rcx, 0x28(%rbx)
leaq 0x7d94(%rip), %rcx      # 0xb233
movq %rcx, 0x30(%rbx)
leaq 0x7d95(%rip), %rcx      # 0xb23f
movq %rcx, 0x20(%rbx)
leaq -0x34(%rbp), %r8
movl %eax, (%r8)
leaq 0x3cc0(%rip), %rdx      # 0x717c
leaq 0x761d(%rip), %rcx      # 0xaae0
movl %r14d, %edi
movq %r15, %rsi
callq 0x2120
cmpl $-0x1, %eax
je 0x365b
leaq 0x8(%rbx), %rcx
movq %rcx, -0x40(%rbp)
leaq 0x75fa(%rip), %r12      # 0xaae0
leaq -0x34(%rbp), %r13
cmpl $0x63, %eax
jg 0x351a
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
ja 0x3566
leaq 0x3c1a(%rip), %rdx      # 0x7118
movslq (%rdx,%rcx,4), %rax
addq %rdx, %rax
jmpq *%rax
movq 0x7aca(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x10(%rbx)
jmp 0x3633
cmpl $0x6f, %eax
jle 0x3542
cmpl $0x70, %eax
je 0x35fc
cmpl $0x74, %eax
je 0x3611
cmpl $0x76, %eax
jne 0x3931
incb 0x3c(%rbx)
jmp 0x3633
cmpl $0x64, %eax
je 0x3625
cmpl $0x68, %eax
jne 0x3931
movq 0x7a7d(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, (%rbx)
jmp 0x3633
cmpl $0x63, %eax
jne 0x3931
movq 0x7a62(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
jmp 0x3633
leaq 0x3cc6(%rip), %rdi      # 0x7252
movq -0x48(%rbp), %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x3e16(%rip), %rdi      # 0x73b4
callq 0x2090
leaq 0x3da6(%rip), %rdi      # 0x7350
callq 0x2090
leaq 0x3e33(%rip), %rdi      # 0x73e9
callq 0x2090
leaq 0x3dc2(%rip), %rdi      # 0x7384
callq 0x2090
movq 0x7a02(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
jmp 0x3633
movq 0x79f9(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x20(%rbx)
jmp 0x3633
movq 0x79e9(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3c(%rbx)
jmp 0x3633
movq 0x79d5(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movw %ax, 0x3a(%rbx)
jmp 0x3633
movq 0x79c0(%rip), %rax      # 0xafd8
movq (%rax), %rdi
callq 0x2380
movb %al, 0x3d(%rbx)
jmp 0x3633
movq 0x79ac(%rip), %rax      # 0xafd8
movq (%rax), %rax
movq %rax, 0x18(%rbx)
movl $0x0, -0x34(%rbp)
movl %r14d, %edi
movq %r15, %rsi
leaq 0x3b35(%rip), %rdx      # 0x717c
movq %r12, %rcx
movq %r13, %r8
callq 0x2120
cmpl $-0x1, %eax
jne 0x34ea
leaq 0x3cdd(%rip), %rdi      # 0x733f
callq 0x2090
movq (%rbx), %rsi
leaq 0x3b4b(%rip), %rdi      # 0x71bc
xorl %eax, %eax
callq 0x2150
movzwl 0x3a(%rbx), %esi
leaq 0x3b48(%rip), %rdi      # 0x71cb
xorl %eax, %eax
callq 0x2150
movzbl 0x3d(%rbx), %esi
leaq 0x3b45(%rip), %rdi      # 0x71da
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rsi
leaq 0x3b40(%rip), %rdi      # 0x71e7
xorl %eax, %eax
callq 0x2150
movq 0x20(%rbx), %rsi
jmp 0x38e0
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 0x7b51(%rip), %rax      # 0xb23f
movq %rax, 0x18(%rbx)
leaq -0x34(%rbp), %r8
movl $0x0, (%r8)
leaq 0x3b6b(%rip), %rdx      # 0x726f
leaq 0x7555(%rip), %rcx      # 0xac60
movl %r14d, %edi
movq %r15, %rsi
callq 0x2120
cmpl $-0x1, %eax
je 0x389b
leaq 0x8(%rbx), %rcx
movq %rcx, -0x40(%rbp)
movq 0x78aa(%rip), %r12      # 0xafd8
leaq 0x39bb(%rip), %r13      # 0x70f0
cmpl $0x62, %eax
jg 0x3759
leal -0x1(%rax), %ecx
cmpl $0x9, %ecx
ja 0x379f
movslq (%r13,%rcx,4), %rax
addq %r13, %rax
jmpq *%rax
movq (%r12), %rax
movq %rax, 0x10(%rbx)
jmp 0x386e
cmpl $0x6f, %eax
jle 0x3781
cmpl $0x70, %eax
je 0x3842
cmpl $0x75, %eax
je 0x3851
cmpl $0x76, %eax
jne 0x393b
incb 0x3c(%rbx)
jmp 0x386e
cmpl $0x63, %eax
je 0x3863
cmpl $0x68, %eax
jne 0x393b
movq (%r12), %rax
movq %rax, (%rbx)
jmp 0x386e
cmpl $0x50, %eax
jne 0x393b
movq %r12, %r13
movq (%r12), %r12
leaq 0x7aaa(%rip), %rdi      # 0xb260
movq %r12, %rsi
callq 0x2070
leaq 0x7a9b(%rip), %rax      # 0xb260
movq %rax, 0x30(%rbx)
movq %r12, %rdi
movq %r13, %r12
leaq 0x391a(%rip), %r13      # 0x70f0
callq 0x2100
movb %al, 0x39(%rbx)
jmp 0x386e
leaq 0x3a96(%rip), %rdi      # 0x7280
movq -0x48(%rbp), %rsi
xorl %eax, %eax
callq 0x2150
leaq 0x3bb8(%rip), %rdi      # 0x73b4
callq 0x2090
leaq 0x3bbf(%rip), %rdi      # 0x73c7
callq 0x2090
leaq 0x3bd5(%rip), %rdi      # 0x73e9
callq 0x2090
movq 0x77b0(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
jmp 0x386e
movq (%r12), %rax
movq %rax, 0x18(%rbx)
jmp 0x386e
movq (%r12), %rdi
callq 0x2380
movb %al, 0x3c(%rbx)
jmp 0x386e
movq (%r12), %rdi
callq 0x2380
movw %ax, 0x3a(%rbx)
jmp 0x386e
movq (%r12), %rdi
movq %rdi, 0x28(%rbx)
callq 0x2100
movb %al, 0x38(%rbx)
jmp 0x386e
movq (%r12), %rax
movq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movl $0x0, -0x34(%rbp)
movl %r14d, %edi
movq %r15, %rsi
leaq 0x39ed(%rip), %rdx      # 0x726f
leaq 0x73d7(%rip), %rcx      # 0xac60
leaq -0x34(%rbp), %r8
callq 0x2120
cmpl $-0x1, %eax
jne 0x3735
leaq 0x3a9d(%rip), %rdi      # 0x733f
callq 0x2090
movq (%rbx), %rsi
leaq 0x390b(%rip), %rdi      # 0x71bc
xorl %eax, %eax
callq 0x2150
movzwl 0x3a(%rbx), %esi
leaq 0x3908(%rip), %rdi      # 0x71cb
xorl %eax, %eax
callq 0x2150
movq 0x10(%rbx), %rsi
leaq 0x3912(%rip), %rdi      # 0x71e7
xorl %eax, %eax
callq 0x2150
movq 0x18(%rbx), %rsi
leaq 0x3914(%rip), %rdi      # 0x71fb
xorl %eax, %eax
callq 0x2150
movq 0x8(%rbx), %rsi
leaq 0x3910(%rip), %rdi      # 0x7209
xorl %eax, %eax
callq 0x2150
movq 0x76c9(%rip), %rax      # 0xafd0
movq (%rax), %rdi
callq 0x22d0
movb $0x1, %bl
movq %fs:0x28, %rax
cmpq -0x30(%rbp), %rax
jne 0x3945
movl %ebx, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2452
jmp 0x33bb
callq 0x2430
jmp 0x33bb
callq 0x2110