// File: /workspace/github_c_makefile_star2_O3/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 0x187b
movl %edi, %r14d
cmpl $0x5, %edi
jae 0x1884
movq 0x8(%rsi), %rbx
leaq 0x3a46(%rip), %rsi      # 0x50a7
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x3a46(%rip), %rsi      # 0x50be
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x3a4a(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3a93(%rip), %rsi      # 0x5139
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3aab(%rip), %rsi      # 0x5168
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3ab4(%rip), %rsi      # 0x5188
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3a26(%rip), %rsi      # 0x5111
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x39f8(%rip), %rsi      # 0x50f6
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3c71(%rip), %rsi      # 0x5382
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3912(%rip), %rsi      # 0x5036
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x391d(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x3925(%rip), %rsi      # 0x506f
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x176d
leaq 0x392f(%rip), %rsi      # 0x508c
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
jne 0x189a
leaq 0x3965(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x39ae(%rip), %rsi      # 0x5139
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x39ca(%rip), %rsi      # 0x5168
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x3885(%rip), %rsi      # 0x5036
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x3890(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x3898(%rip), %rsi      # 0x506f
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1805
leaq 0x38a2(%rip), %rsi      # 0x508c
movq %rbx, %rdi
callq 0x11b0
cmpl $0x3, %r14d
je 0x180b
testl %eax, %eax
jne 0x180b
leaq 0x3aa5(%rip), %rdi      # 0x52a8
jmp 0x1864
cmpl $0x3, %r14d
jne 0x17fc
leaq 0x3976(%rip), %rsi      # 0x5188
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1870
leaq 0x38ec(%rip), %rsi      # 0x5111
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1870
leaq 0x38be(%rip), %rsi      # 0x50f6
movq %rbx, %rdi
callq 0x11b0
testl %eax, %eax
je 0x1870
leaq 0x3b37(%rip), %rsi      # 0x5382
movq %rbx, %rdi
callq 0x11b0
cmpl $0x3, %r14d
jne 0x1876
testl %eax, %eax
jne 0x1876
leaq 0x3ab1(%rip), %rdi      # 0x5315
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1040
jmp 0x1890
cmpl $0x3, %r14d
je 0x185d
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x3ead(%rip), %rdi      # 0x572f
jmp 0x188b
leaq 0x3e42(%rip), %rdi      # 0x56cd
callq 0x11e0
movl $0x1, %edi
callq 0x1180
leaq 0x3914(%rip), %rdi      # 0x51b5
jmp 0x1864