// File: /workspace/github_c_makefile_star2_O2/evanwire[P]GitClone/client.c
// Function: checkArgs
void checkArgs(int argc, char** argv){

  //Checking if there is an appropiate number of command line arguments
  if(argc < 3){
    printf("\nError: too few command line arguments. Please double check your arguments before running again.\n");
    exit(1);
  }
  if(argc > 4){
    printf("\nError: too many command line arguments. Please double check your arguments before running again.\n");
    exit(1);
  }

  //Checking to make sure a valid command is specified
  if(strcmp(argv[1], "push") != 0 && strcmp(argv[1], "create") != 0 && strcmp(argv[1], "destroy") != 0 && strcmp(argv[1], "currentversion") != 0 && strcmp(argv[1], "history") != 0 && strcmp(argv[1], "rollback") != 0 && strcmp(argv[1], "remove") != 0 && strcmp(argv[1], "add") != 0 && strcmp(argv[1], "configure") != 0 && strcmp(argv[1], "checkout") != 0 && strcmp(argv[1], "update") != 0 && strcmp(argv[1], "upgrade") != 0 && strcmp(argv[1], "commit") != 0) {
    printf("\nError: %s is not a valid command. Please make sure you specify a command from the following list:\n\t- push\n\t- create\n\t- destroy\n\t- add\n\t- remove\n\t- currentversion\n\t- history\n\t- rollback\n\t- configure\n\t- checkout\n\t- update\n\t- upgrade\n\t- commit\n", argv[1]);
    exit(1);
  }

  //Checking if there is an appropriate number of command line arguments depending on the command specified
  if((strcmp(argv[1], "push") == 0 || strcmp(argv[1], "create") == 0 || strcmp(argv[1], "destroy") == 0 || strcmp(argv[1], "currentversion") == 0 || strcmp(argv[1], "history") == 0 || strcmp(argv[1], "checkout") == 0 || strcmp(argv[1], "update") == 0 || strcmp(argv[1], "upgrade") == 0 || strcmp(argv[1], "commit") == 0) && argc > 3){
    printf("\nError: too many command line arguments to run %s. Please double check your arguments before running again.\n", argv[1]);
    exit(1);
  }
  if((strcmp(argv[1], "push") == 0 || strcmp(argv[1], "create") == 0 || strcmp(argv[1], "destroy") == 0 || strcmp(argv[1], "currentversion") == 0 || strcmp(argv[1], "history") == 0 || strcmp(argv[1], "checkout") == 0 || strcmp(argv[1], "update") == 0 || strcmp(argv[1], "upgrade") == 0 || strcmp(argv[1], "commit") == 0) && argc < 3){
    printf("\nError: too few command line arguments to run %s. Please double check your arguments before running again.\n", argv[1]);
    exit(1);
  }

  if((strcmp(argv[1], "rollback") == 0 || strcmp(argv[1], "remove") == 0 || strcmp(argv[1], "add") == 0 || strcmp(argv[1], "configure") == 0 ) && argc > 4){
    printf("\nError: too many command line arguments to run %s. Please double check your arguments before running again.\n", argv[1]);
    exit(1);
  }
  if((strcmp(argv[1], "rollback") == 0 || strcmp(argv[1], "remove") == 0 || strcmp(argv[1], "add") == 0 || strcmp(argv[1], "configure") == 0) && argc < 4){
    printf("\nError: too few command line arguments to run %s. Please double check your arguments before running again.\n", argv[1]);
    exit(1);
  }


}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
cmpl $0x2, %edi
jle 0x186b
movl %edi, %r14d
cmpl $0x5, %edi
jae 0x1874
movq 0x8(%rsi), %rbx
leaq 0x3a56(%rip), %rsi      # 0x50a7
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x3a56(%rip), %rsi      # 0x50be
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x3a5a(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3aa3(%rip), %rsi      # 0x5139
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3abb(%rip), %rsi      # 0x5168
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3ac4(%rip), %rsi      # 0x5188
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3a36(%rip), %rsi      # 0x5111
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3a08(%rip), %rsi      # 0x50f6
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3c81(%rip), %rsi      # 0x5382
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3922(%rip), %rsi      # 0x5036
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x392d(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x3935(%rip), %rsi      # 0x506f
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x175d
leaq 0x393f(%rip), %rsi      # 0x508c
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
jne 0x1888
leaq 0x3975(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x39be(%rip), %rsi      # 0x5139
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x39da(%rip), %rsi      # 0x5168
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x3895(%rip), %rsi      # 0x5036
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x38a0(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x38a8(%rip), %rsi      # 0x506f
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x17f5
leaq 0x38b2(%rip), %rsi      # 0x508c
movq %rbx, %rdi
callq 0x11a0
cmpl $0x3, %r14d
je 0x17fb
testl %eax, %eax
jne 0x17fb
leaq 0x3ab5(%rip), %rdi      # 0x52a8
jmp 0x1854
cmpl $0x3, %r14d
jne 0x17ec
leaq 0x3986(%rip), %rsi      # 0x5188
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1860
leaq 0x38fc(%rip), %rsi      # 0x5111
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1860
leaq 0x38ce(%rip), %rsi      # 0x50f6
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1860
leaq 0x3b47(%rip), %rsi      # 0x5382
movq %rbx, %rdi
callq 0x11a0
cmpl $0x3, %r14d
jne 0x1866
testl %eax, %eax
jne 0x1866
leaq 0x3ac1(%rip), %rdi      # 0x5315
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1040
jmp 0x1880
cmpl $0x3, %r14d
je 0x184d
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3ebd(%rip), %rdi      # 0x572f
jmp 0x187b
leaq 0x3e52(%rip), %rdi      # 0x56cd
callq 0x11d0
pushq $0x1
popq %rdi
callq 0x1170
leaq 0x3926(%rip), %rdi      # 0x51b5
jmp 0x1854