// File: /workspace/github_c_makefile_star2_O1/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 %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
jle 0x1897
movl %edi, %r14d
cmpl $0x5, %edi
jge 0x18a0
movq 0x8(%rsi), %rbx
leaq 0x3a53(%rip), %rsi      # 0x50a7
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
movl %eax, %r15d
leaq 0x3a50(%rip), %rsi      # 0x50be
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3a54(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3a9d(%rip), %rsi      # 0x5139
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3ab5(%rip), %rsi      # 0x5168
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3abe(%rip), %rsi      # 0x5188
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3a30(%rip), %rsi      # 0x5111
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3a02(%rip), %rsi      # 0x50f6
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3c7b(%rip), %rsi      # 0x5382
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x391c(%rip), %rsi      # 0x5036
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3927(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x392f(%rip), %rsi      # 0x506f
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1763
leaq 0x3939(%rip), %rsi      # 0x508c
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
jne 0x18b6
testl %r15d, %r15d
je 0x181b
leaq 0x394b(%rip), %rsi      # 0x50be
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x394f(%rip), %rsi      # 0x50d9
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x3998(%rip), %rsi      # 0x5139
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x39b4(%rip), %rsi      # 0x5168
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x386f(%rip), %rsi      # 0x5036
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x387a(%rip), %rsi      # 0x5054
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x3882(%rip), %rsi      # 0x506f
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x181b
leaq 0x388c(%rip), %rsi      # 0x508c
movq %rbx, %rdi
callq 0x11a0
cmpl $0x3, %r14d
je 0x1821
testl %eax, %eax
jne 0x1821
leaq 0x3a8f(%rip), %rdi      # 0x52a8
jmp 0x187a
cmpl $0x3, %r14d
jne 0x1812
leaq 0x3960(%rip), %rsi      # 0x5188
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1886
leaq 0x38d6(%rip), %rsi      # 0x5111
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1886
leaq 0x38a8(%rip), %rsi      # 0x50f6
movq %rbx, %rdi
callq 0x11a0
testl %eax, %eax
je 0x1886
leaq 0x3b21(%rip), %rsi      # 0x5382
movq %rbx, %rdi
callq 0x11a0
cmpl $0x3, %r14d
jne 0x188c
testl %eax, %eax
jne 0x188c
leaq 0x3a9b(%rip), %rdi      # 0x5315
movq %rbx, %rsi
xorl %eax, %eax
callq 0x1040
jmp 0x18ac
cmpl $0x3, %r14d
je 0x1873
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3e91(%rip), %rdi      # 0x572f
jmp 0x18a7
leaq 0x3e26(%rip), %rdi      # 0x56cd
callq 0x11d0
movl $0x1, %edi
callq 0x1170
leaq 0x38f8(%rip), %rdi      # 0x51b5
jmp 0x187a