#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ push1_tut;
typedef int /*<<< orphan*/ push1_input;
typedef int /*<<< orphan*/ merge_tut;
typedef int /*<<< orphan*/ merge_input;
typedef int /*<<< orphan*/ fetch_tut;
typedef int /*<<< orphan*/ fetch_input;
typedef int /*<<< orphan*/ commit_tut;
typedef int /*<<< orphan*/ add_tut;
typedef int /*<<< orphan*/ add_input;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ chdir(char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ mkdir(char *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ status(char *, char *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char const *, char *);
int /*<<< orphan*/ string_compare(char *, char *, char *);
int /*<<< orphan*/ system(char *);
int cmd_tutor(int argc, const char **argv, const char *prefix) {
  system("rm -rf ./master");
  system("rm -rf ./origin.git");
  system("rm -rf ./upstream");
  char *Gui1 = "--gui";
  char *Gui2 = "-g";
  if (argc == 2 && (strcmp(argv[1], Gui1) == 0 || strcmp(argv[1], Gui2) == 0)) {
    mkdir("./.gittutor");
    chdir("./.gittutor");
    if (access("GitTutor.html", F_OK) != 0) {
      printf("Launching GUI... Please wait.\n");
      system("curl -so GitTutor.html "
             "https://raw.githubusercontent.com/joey-walker/"
             "COMP650-SeniorProject/master/GitTutor/GitTutor.html");
      system("curl -so Picture1.png  "
             "https://raw.githubusercontent.com/joey-walker/"
             "COMP650-SeniorProject/master/GitTutor/Picture1.png");
      system("curl -so local.PNG "
             "https://raw.githubusercontent.com/joey-walker/"
             "COMP650-SeniorProject/master/GitTutor/local.PNG");
      system("curl -so padnote.PNG "
             "https://raw.githubusercontent.com/joey-walker/"
             "COMP650-SeniorProject/master/GitTutor/padnote.PNG");
      system("curl -so repo_created.png "
             "https://raw.githubusercontent.com/joey-walker/"
             "COMP650-SeniorProject/master/GitTutor/repo_created.png");
    }
    system("start GitTutor.html");
    exit(1);
  } else if (argc >= 2) {
    if (strcmp(argv[1], Gui1) != 0 || strcmp(argv[1], Gui2) != 0) {
      printf("Git Tutor did not recognize the additional argument\n Correct "
             "usage is 'git tutor --gui' or 'git tutor -g'");
      exit(1);
    }
  }
  char begin_end[3];
  char yes_no[4];
  char yes1[] = "Yes";
  char yes2[] = "yes";
  int loopi = 0;
  FILE *dummyfile;
  char read_input[100];
  char fetch_str[] = "fetched";
  char merge_str[] = "merged";
  char push_str[] = "pushed";
  char add_str[] = "added";
  char commit_str[] = "committed";
  char fetch_tut[] = "git fetch upstream";
  char fetch_input[sizeof(fetch_tut)];
  char merge_tut[] = "git merge upstream/master";
  char merge_input[sizeof(merge_tut)];
  char push1_tut[] = "git push origin master";
  char push1_input[sizeof(push1_tut)];
  char add_tut[] = "git add .";
  char add_input[sizeof(add_tut)];
  char commit_tut[] = "git commit -m \"";
  char push2_tut[] = "git push origin/master";
  char diff_tut[] = "git diff";
  char status_tut[] = "git status";
  int T_F = 0;
  for (; loopi < 1000; loopi++) {
    printf("\n");
  }
  printf("Git Tutor is a tutorial that seeks to teach Git through a step-by "
         "step approach.\n");
  printf("Do you wish to continue? (Yes or No) \n");
  printf("Input >> ");
  scanf("%s", begin_end);
  if ((strcmp(yes1, begin_end) != 0) && (strcmp(begin_end, yes2) != 0)) {
    printf("Exiting tutorial.\n");
    exit(1);
  }
  mkdir("./upstream/");
  mkdir("./master/");
  system("git init -q --bare ./origin.git/");
  system("git init -q ./upstream/");
  system("git clone -q ./origin.git ./master");
  dummyfile = fopen("./upstream/test.txt", "w");
  fclose(dummyfile);
  chdir("./upstream");
  system("git add .");
  system("git commit -qm \"Initializing contents of repository\"");
  chdir("..");
  chdir("./master");
  system("git remote add upstream ../upstream");
  loopi = 0;
  for (; loopi < 1000; loopi++) {
    printf("\n");
  }
  printf("Beginning Git Tutor\n");
  printf("The following three repositories are created:\n1. master - our local "
         "repository \n2. origin.git - Our repository to which we will send "
         "our changes \n3. upstream - Our repository where we will grab "
         "changes from\n\n");
  printf("Tutorial 1: Fetching \n");
  printf(
      "Summary: 'git fetch' allows us to retrieve references to changes in "
      "other\ngit repositories and bring it to our current git repository.\n");
  printf("Instructions:  Fetch the changes from the upstream repository.\n");
  printf("\nHint: git fetch <Repository Name> \n");
  while (1) {
    printf("Input >> ");
    fflush(stdin);
    fgets(fetch_input, sizeof(fetch_input), stdin);
    if (strcmp(fetch_tut, fetch_input) == 0)
      break;
    else
      printf("incorrect please try again\n");
  }
  system("git fetch upstream");
  printf("\n\nTutorial 2: Merging \n");
  printf("Summary: 'git merge will combine the references from another "
         "repository with a branch located on local repository\n");
  printf("Instructions: Merge the changes from the upstream repository into "
         "the master branch \n");
  printf("\nHint: git merge [Repository Name/LocalBranch]\n");
  while (1) {
    printf("Input >> ");
    fflush(stdin);
    fgets(merge_input, sizeof(merge_input), stdin);
    if (strcmp(merge_tut, merge_input) == 0)
      break;
    else
      printf("incorrect please try again\n");
  }
  system("git merge upstream/master");
  printf("\nTutorial 3: Pushing \n");
  printf("Summary: 'git push allows us to move our changes from one repository "
         "to a new host.\n");
  printf("Instructions: Push the changes in our master repository to our "
         "origin repository on our master branch\n");
  printf("\nHint: git push [target Repository Name] [Local Branch]\n");
  while (1) {
    printf("Input >> ");
    fflush(stdin);
    fgets(push1_input, sizeof(push1_input), stdin);
    if (strcmp(push1_tut, push1_input) == 0)
      break;
    else
      printf("incorrect please try again\n");
  }
  system("git push origin master");
  printf("\nTutorial 4: Adding to staging \n");
  printf("Summary: 'git add' allows us to move our current changes to staging, "
         "a step before committing the work.\n");
  printf("Instructions: Add this directory's contents and onwards to move all "
         "changed items to staging\n");
  printf("\nHint: git add [directory/specific file]\n");
  while (1) {
    printf("Input >> ");
    fflush(stdin);
    fgets(add_input, sizeof(add_input), stdin);
    if (strcmp(add_tut, add_input) == 0)
      break;
    else
      printf("incorrect please try again\n");
  }
  system("git add .");
  printf("Git Tutor tutorials are complete, congratulations!\n");
  return 0;
  printf("Tutorial 5: Committing \n");
  printf("\nRecord changes to the repository");
  printf("\nHint: git commit [option] [Branch]...\nType the command: ");
  int c = 1;
  int len = sizeof(commit_tut);
  while (1) {
    if ((c % 5) == 0) {
      printf("Do you want to get the answer? (yes or no) If no, you will "
             "continue: ");
      gets(yes_no);
      if ((strcmp(yes1, yes_no) == 0) || (strcmp(yes_no, yes2) == 0)) {
        printf("git commit -m \"type any message\"");
        printf("\nLets try it now: ");
      } else {
        printf("Type the command to commit: ");
      }
    }
    gets(read_input);
    c++;
    int count = 0;
    while (count < len - 1) {
      if (commit_tut[count] == read_input[count]) {
        T_F = 0;
      } else {
        T_F = 1;
      }
      count++;
    }
    if (T_F != 0) {
      printf("Correct! Your file(s) are %s\n", commit_str);
      break;
    } else {
      printf("Wrong! try again: ");
    }
  }
  printf("Tutorial 6: Pushing \n");
  printf("Push Command: Update remote refs along with associated objects");
  printf("\nHint: git push [Repository Name] [Local Branch]...\nType the "
         "command: ");
  gets(read_input);
  string_compare(push1_tut, read_input, push_str);
  system("git push origin master");
  read_input[0] = '\0';
  printf("\nDiff Command: Show changes between commits, commit and working "
         "tree, etc");
  printf("\nHint: git diff...\nType the command: ");
  gets(read_input);
  status(diff_tut, read_input);
  read_input[0] = '\0';
  printf("Tutorial complete, congratulations\n");
  return 0;
}


x86 assembly (clang, -O0):
<cmd_tutor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xe23(%rip),%rdi
call   1060 <system@plt>
lea    0xe27(%rip),%rdi
call   1060 <system@plt>
lea    0xe2f(%rip),%rdi
call   1060 <system@plt>
lea    0xe35(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xe30(%rip),%rax
mov    %rax,-0x28(%rbp)
cmpl   $0x2,-0x4(%rbp)
jne    12e7 <cmd_tutor+0x127>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     1250 <cmd_tutor+0x90>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x28(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    12e7 <cmd_tutor+0x127>
lea    0xde8(%rip),%rdi
call   1030 <mkdir@plt>
lea    0xddc(%rip),%rdi
call   1050 <chdir@plt>
mov    0x2d61(%rip),%rax
mov    (%rax),%esi
lea    0x104e(%rip),%rdi
call   10c0 <access@plt>
cmp    $0x0,%rax
je     12d1 <cmd_tutor+0x111>
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xdce(%rip),%rdi
call   1060 <system@plt>
lea    0xe3b(%rip),%rdi
call   1060 <system@plt>
lea    0xea7(%rip),%rdi
call   1060 <system@plt>
lea    0xf0c(%rip),%rdi
call   1060 <system@plt>
lea    0xf75(%rip),%rdi
call   1060 <system@plt>
lea    0xfe8(%rip),%rdi
call   1060 <system@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
cmpl   $0x2,-0x4(%rbp)
jl     1344 <cmd_tutor+0x184>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x20(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1327 <cmd_tutor+0x167>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x28(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     133f <cmd_tutor+0x17f>
lea    0xfa6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
jmp    1344 <cmd_tutor+0x184>
jmp    1349 <cmd_tutor+0x189>
mov    0xfef(%rip),%eax
mov    %eax,-0x33(%rbp)
mov    0xfea(%rip),%eax
mov    %eax,-0x37(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    0xfdd(%rip),%rax
mov    %rax,-0xb8(%rbp)
mov    0xfd8(%rip),%eax
mov    %eax,-0xbf(%rbp)
mov    0xfcf(%rip),%ax
mov    %ax,-0xbb(%rbp)
mov    0xfc4(%rip),%al
mov    %al,-0xb9(%rbp)
mov    0xfb9(%rip),%eax
mov    %eax,-0xc6(%rbp)
mov    0xfb0(%rip),%ax
mov    %ax,-0xc2(%rbp)
mov    0xfa5(%rip),%al
mov    %al,-0xc0(%rbp)
mov    0xf9a(%rip),%eax
mov    %eax,-0xcc(%rbp)
mov    0xf91(%rip),%ax
mov    %ax,-0xc8(%rbp)
mov    0xf85(%rip),%rax
mov    %rax,-0xd6(%rbp)
mov    0xf7f(%rip),%ax
mov    %ax,-0xce(%rbp)
mov    0x16b7(%rip),%rax
mov    %rax,-0xf0(%rbp)
mov    0x16b1(%rip),%rax
mov    %rax,-0xe8(%rbp)
mov    0x16ab(%rip),%ax
mov    %ax,-0xe0(%rbp)
mov    0x16a0(%rip),%al
mov    %al,-0xde(%rbp)
mov    0x16a1(%rip),%rax
mov    %rax,-0x130(%rbp)
mov    0x169b(%rip),%rax
mov    %rax,-0x128(%rbp)
mov    0x1695(%rip),%rax
mov    %rax,-0x120(%rbp)
mov    0x168f(%rip),%ax
mov    %ax,-0x118(%rbp)
mov    0x1689(%rip),%rax
mov    %rax,-0x170(%rbp)
mov    0x1683(%rip),%rax
mov    %rax,-0x168(%rbp)
mov    0x167e(%rip),%eax
mov    %eax,-0x160(%rbp)
mov    0x1675(%rip),%ax
mov    %ax,-0x15c(%rbp)
mov    0x166a(%rip),%al
mov    %al,-0x15a(%rbp)
mov    0xec3(%rip),%rax
mov    %rax,-0x19a(%rbp)
mov    0xebd(%rip),%ax
mov    %ax,-0x192(%rbp)
mov    0x164b(%rip),%rax
mov    %rax,-0x1c0(%rbp)
mov    0x1645(%rip),%rax
mov    %rax,-0x1b8(%rbp)
mov    0x163f(%rip),%rax
mov    %rax,-0x1e0(%rbp)
mov    0x1639(%rip),%rax
mov    %rax,-0x1d8(%rbp)
mov    0x1634(%rip),%eax
mov    %eax,-0x1d0(%rbp)
mov    0x162b(%rip),%ax
mov    %ax,-0x1cc(%rbp)
mov    0x1620(%rip),%al
mov    %al,-0x1ca(%rbp)
mov    0xe53(%rip),%rax
mov    %rax,-0x1e9(%rbp)
mov    0xe4e(%rip),%al
mov    %al,-0x1e1(%rbp)
mov    0xe42(%rip),%rax
mov    %rax,-0x1f4(%rbp)
mov    0xe3c(%rip),%ax
mov    %ax,-0x1ec(%rbp)
mov    0xe31(%rip),%al
mov    %al,-0x1ea(%rbp)
movl   $0x0,-0x1f8(%rbp)
cmpl   $0x3e8,-0x3c(%rbp)
jge    1591 <cmd_tutor+0x3d1>
lea    0x1063(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1568 <cmd_tutor+0x3a8>
lea    0xdf2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe36(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe4f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    -0x2b(%rbp),%rsi
lea    0xe47(%rip),%rdi
call   10b0 <scanf@plt>
lea    -0x33(%rbp),%rdi
lea    -0x2b(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     1611 <cmd_tutor+0x451>
lea    -0x2b(%rbp),%rdi
lea    -0x37(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     1611 <cmd_tutor+0x451>
lea    0xe10(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    $0x1,%edi
call   10e0 <exit@plt>
lea    0xe42(%rip),%rdi
call   1030 <mkdir@plt>
lea    0xdff(%rip),%rdi
call   1030 <mkdir@plt>
lea    0xdfd(%rip),%rdi
call   1060 <system@plt>
lea    0xe12(%rip),%rdi
call   1060 <system@plt>
lea    0xe1e(%rip),%rdi
call   1060 <system@plt>
lea    0xe35(%rip),%rdi
lea    0xe42(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
call   1040 <fclose@plt>
lea    0x9b7(%rip),%rdi
call   1050 <chdir@plt>
lea    0xcec(%rip),%rdi
call   1060 <system@plt>
lea    0xe13(%rip),%rdi
call   1060 <system@plt>
lea    0xe3c(%rip),%rdi
call   1050 <chdir@plt>
lea    0x963(%rip),%rdi
call   1050 <chdir@plt>
lea    0xe27(%rip),%rdi
call   1060 <system@plt>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x3e8,-0x3c(%rbp)
jge    16e5 <cmd_tutor+0x525>
lea    0xf0f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    16bc <cmd_tutor+0x4fc>
lea    0xe0f(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xed9(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xee2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xf5c(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xf8e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xcc3(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x289a(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
lea    -0x110(%rbp),%rdi
mov    0x2885(%rip),%rax
mov    (%rax),%edx
mov    $0x13,%esi
call   1080 <fgets@plt>
lea    -0xf0(%rbp),%rdi
lea    -0x110(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1791 <cmd_tutor+0x5d1>
jmp    17a4 <cmd_tutor+0x5e4>
lea    0xf4d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1739 <cmd_tutor+0x579>
lea    0xf56(%rip),%rdi
call   1060 <system@plt>
lea    0xf5d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xf67(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xfcc(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0x1014(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xc14(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x27eb(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
lea    -0x150(%rbp),%rdi
mov    0x27d6(%rip),%rax
mov    (%rax),%edx
mov    $0x1a,%esi
call   1080 <fgets@plt>
lea    -0x130(%rbp),%rdi
lea    -0x150(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    1840 <cmd_tutor+0x680>
jmp    1853 <cmd_tutor+0x693>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    17e8 <cmd_tutor+0x628>
lea    0xfcb(%rip),%rdi
call   1060 <system@plt>
lea    0xfd9(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xfe2(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0x1029(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0x1082(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xb65(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x273c(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
lea    -0x190(%rbp),%rdi
mov    0x2727(%rip),%rax
mov    (%rax),%edx
mov    $0x17,%esi
call   1080 <fgets@plt>
lea    -0x170(%rbp),%rdi
lea    -0x190(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    18ef <cmd_tutor+0x72f>
jmp    1902 <cmd_tutor+0x742>
lea    0xdef(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1897 <cmd_tutor+0x6d7>
lea    0x1042(%rip),%rdi
call   1060 <system@plt>
lea    0x104d(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0x1060(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0x10bb(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0x110b(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
lea    0xab6(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x268d(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
lea    -0x1a4(%rbp),%rdi
mov    0x2678(%rip),%rax
mov    (%rax),%edx
mov    $0xa,%esi
call   1080 <fgets@plt>
lea    -0x19a(%rbp),%rdi
lea    -0x1a4(%rbp),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
jne    199e <cmd_tutor+0x7de>
jmp    19b1 <cmd_tutor+0x7f1>
lea    0xd40(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
jmp    1946 <cmd_tutor+0x786>
lea    0x9b4(%rip),%rdi
call   1060 <system@plt>
lea    0x10b0(%rip),%rdi
mov    $0x0,%al
call   1070 <printf@plt>
xor    %eax,%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_tutor>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0xe0,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xe05(%rip),%rdi
call   1080 <system@plt>
lea    0xe09(%rip),%rdi
call   1080 <system@plt>
lea    0xe11(%rip),%rdi
call   1080 <system@plt>
cmp    $0x2,%ebp
jne    12de <cmd_tutor+0xfe>
mov    0x8(%rbx),%rdi
lea    0xe0a(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     124f <cmd_tutor+0x6f>
mov    0x8(%rbx),%rdi
lea    0xdfb(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    12e0 <cmd_tutor+0x100>
lea    0xde9(%rip),%rbx
mov    %rbx,%rdi
call   1040 <mkdir@plt>
mov    %rbx,%rdi
call   1070 <chdir@plt>
mov    0x2d63(%rip),%rax
mov    (%rax),%esi
lea    0x1031(%rip),%rdi
call   10e0 <access@plt>
test   %rax,%rax
je     12c8 <cmd_tutor+0xe8>
lea    0x1765(%rip),%rdi
call   1050 <puts@plt>
lea    0xdb8(%rip),%rdi
call   1080 <system@plt>
lea    0xe25(%rip),%rdi
call   1080 <system@plt>
lea    0xe91(%rip),%rdi
call   1080 <system@plt>
lea    0xef6(%rip),%rdi
call   1080 <system@plt>
lea    0xf5f(%rip),%rdi
call   1080 <system@plt>
lea    0xfd2(%rip),%rdi
call   1080 <system@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
jl     1312 <cmd_tutor+0x132>
mov    0x8(%rbx),%rdi
lea    0xd4b(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1864 <cmd_tutor+0x684>
mov    0x8(%rbx),%rdi
lea    0xd38(%rip),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1864 <cmd_tutor+0x684>
movl   $0x736559,0xc(%rsp)
movl   $0x736579,0x8(%rsp)
movaps 0x16e7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movl   $0x6d6165,0x2f(%rsp)
movups 0x16fd(%rip),%xmm0
movups %xmm0,0x6a(%rsp)
movaps 0x16e7(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movabs $0x72657473616d20,%rax
mov    %rax,0x4f(%rsp)
movaps 0x16ec(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movabs $0x2064646120746967,%rax
64 64 20
mov    %rax,0x10(%rsp)
movw   $0x2e,0x18(%rsp)
mov    $0x3e8,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1390 <cmd_tutor+0x1b0>
lea    0x1068(%rip),%rdi
call   1050 <puts@plt>
lea    0x10ad(%rip),%rdi
call   1050 <puts@plt>
lea    0xf61(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
lea    0xf5d(%rip),%rdi
lea    0x5(%rsp),%rbx
mov    %rbx,%rsi
call   10d0 <scanf@plt>
lea    0xc(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     1403 <cmd_tutor+0x223>
lea    0x5(%rsp),%rdi
lea    0x8(%rsp),%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    187c <cmd_tutor+0x69c>
lea    0xf59(%rip),%rdi
call   1040 <mkdir@plt>
lea    0xf16(%rip),%rdi
call   1040 <mkdir@plt>
lea    0xf14(%rip),%rdi
call   1080 <system@plt>
lea    0xf29(%rip),%rdi
call   1080 <system@plt>
lea    0xf35(%rip),%rdi
call   1080 <system@plt>
lea    0xf4c(%rip),%rdi
lea    0xf59(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,%rdi
call   1060 <fclose@plt>
lea    0xbca(%rip),%rdi
call   1070 <chdir@plt>
lea    0xf3b(%rip),%rdi
call   1080 <system@plt>
lea    0xf39(%rip),%rdi
call   1080 <system@plt>
lea    0xf62(%rip),%rdi
call   1070 <chdir@plt>
lea    0xb76(%rip),%rdi
call   1070 <chdir@plt>
lea    0xf4d(%rip),%rdi
call   1080 <system@plt>
mov    $0x3e8,%ebx
nopw   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    14b0 <cmd_tutor+0x2d0>
lea    0xfbf(%rip),%rdi
call   1050 <puts@plt>
lea    0xfc7(%rip),%rdi
call   1050 <puts@plt>
lea    0x108b(%rip),%rdi
call   1050 <puts@plt>
lea    0x1095(%rip),%rdi
call   1050 <puts@plt>
lea    0x1110(%rip),%rdi
call   1050 <puts@plt>
lea    0x1143(%rip),%rdi
call   1050 <puts@plt>
lea    0xe11(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x2acc(%rip),%rbp
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
lea    0x80(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x13,%esi
call   10a0 <fgets@plt>
lea    0x20(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     15aa <cmd_tutor+0x3ca>
lea    0x1437(%rip),%r14
lea    0xdc3(%rip),%r15
lea    0x80(%rsp),%rbx
lea    0x20(%rsp),%r12
nopl   0x0(%rax)
mov    %r14,%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0x13,%esi
call   10a0 <fgets@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1570 <cmd_tutor+0x390>
lea    0x145f(%rip),%rdi
call   1080 <system@plt>
lea    0x10ac(%rip),%rdi
call   1050 <puts@plt>
lea    0x10b7(%rip),%rdi
call   1050 <puts@plt>
lea    0x111d(%rip),%rdi
call   1050 <puts@plt>
lea    0x1166(%rip),%rdi
call   1050 <puts@plt>
lea    0xd32(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
lea    0xc0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x1a,%esi
call   10a0 <fgets@plt>
lea    0x60(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     168a <cmd_tutor+0x4aa>
lea    0x135f(%rip),%r14
lea    0xceb(%rip),%r15
lea    0xc0(%rsp),%rbx
lea    0x60(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0x1a,%esi
call   10a0 <fgets@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1650 <cmd_tutor+0x470>
lea    0x139f(%rip),%rdi
call   1080 <system@plt>
lea    0x10d9(%rip),%rdi
call   1050 <puts@plt>
lea    0x10e3(%rip),%rdi
call   1050 <puts@plt>
lea    0x112b(%rip),%rdi
call   1050 <puts@plt>
lea    0x1185(%rip),%rdi
call   1050 <puts@plt>
lea    0xc52(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
lea    0xa0(%rsp),%rbx
mov    %rbx,%rdi
mov    $0x17,%esi
call   10a0 <fgets@plt>
lea    0x40(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     176a <cmd_tutor+0x58a>
lea    0x127f(%rip),%r14
lea    0xc0b(%rip),%r15
lea    0xa0(%rsp),%rbx
lea    0x40(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0x17,%esi
call   10a0 <fgets@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1730 <cmd_tutor+0x550>
lea    0x12df(%rip),%rdi
call   1080 <system@plt>
lea    0x1101(%rip),%rdi
call   1050 <puts@plt>
lea    0x1115(%rip),%rdi
call   1050 <puts@plt>
lea    0x1171(%rip),%rdi
call   1050 <puts@plt>
lea    0x11c2(%rip),%rdi
call   1050 <puts@plt>
lea    0xb72(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
lea    0x36(%rsp),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <fgets@plt>
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
je     183a <cmd_tutor+0x65a>
lea    0x11a2(%rip),%r14
lea    0xb2e(%rip),%r15
lea    0x36(%rsp),%rbx
lea    0x10(%rsp),%r12
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <puts@plt>
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    0x0(%rbp),%edi
call   10c0 <fflush@plt>
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0xa,%esi
call   10a0 <fgets@plt>
mov    %r12,%rdi
mov    %rbx,%rsi
call   10b0 <strcmp@plt>
test   %rax,%rax
jne    1800 <cmd_tutor+0x620>
lea    0xb67(%rip),%rdi
call   1080 <system@plt>
lea    0x115a(%rip),%rdi
call   1050 <puts@plt>
xor    %eax,%eax
add    $0xe0,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa4a(%rip),%rdi
xor    %eax,%eax
call   1090 <printf@plt>
mov    $0x1,%edi
call   1100 <exit@plt>
lea    0x1157(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1100 <exit@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"rm -rf ./master\00"
@.str.1 = [20 x i8] c"rm -rf ./origin.git\00"
@.str.2 = [18 x i8] c"rm -rf ./upstream\00"
@.str.3 = [6 x i8] c"--gui\00"
@.str.4 = [3 x i8] c"-g\00"
@.str.5 = [12 x i8] c"./.gittutor\00"
@.str.6 = [14 x i8] c"GitTutor.html\00"
@F_OK = global i32 0
@.str.7 = [31 x i8] c"Launching GUI... Please wait.\0A\00"
@.str.8 = [121 x i8] c"curl -so GitTutor.html https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/GitTutor.html\00"
@.str.9 = [120 x i8] c"curl -so Picture1.png https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/Picture1.png\00"
@.str.10 = [113 x i8] c"curl -so local.PNG https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/local.PNG\00"
@.str.11 = [117 x i8] c"curl -so padnote.PNG https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/padnote.PNG\00"
@.str.12 = [127 x i8] c"curl -so repo_created.png https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/repo_created.png\00"
@.str.13 = [20 x i8] c"start GitTutor.html\00"
@.str.14 = [106 x i8] c"Git Tutor did not recognize the additional argument\0A Correct usage is 'git tutor --gui' or 'git tutor -g'\00"
@__const.cmd_tutor.yes1 = [4 x i8] c"Yes\00"
@__const.cmd_tutor.yes2 = [4 x i8] c"yes\00"
@__const.cmd_tutor.fetch_str = [8 x i8] c"fetched\00"
@__const.cmd_tutor.merge_str = [7 x i8] c"merged\00"
@__const.cmd_tutor.push_str = [7 x i8] c"pushed\00"
@__const.cmd_tutor.add_str = [6 x i8] c"added\00"
@__const.cmd_tutor.commit_str = [10 x i8] c"committed\00"
@__const.cmd_tutor.fetch_tut = [19 x i8] c"git fetch upstream\00"
@__const.cmd_tutor.merge_tut = [26 x i8] c"git merge upstream/master\00"
@__const.cmd_tutor.push1_tut = [23 x i8] c"git push origin master\00"
@__const.cmd_tutor.add_tut = [10 x i8] c"git add .\00"
@__const.cmd_tutor.commit_tut = [16 x i8] c"git commit -m \22\00"
@__const.cmd_tutor.push2_tut = [23 x i8] c"git push origin/master\00"
@__const.cmd_tutor.diff_tut = [9 x i8] c"git diff\00"
@__const.cmd_tutor.status_tut = [11 x i8] c"git status\00"
@.str.15 = [2 x i8] c"\0A\00"
@.str.16 = [82 x i8] c"Git Tutor is a tutorial that seeks to teach Git through a step-by step approach.\0A\00"
@.str.17 = [39 x i8] c"Do you wish to continue? (Yes or No) \0A\00"
@.str.18 = [10 x i8] c"Input >> \00"
@.str.19 = [3 x i8] c"%s\00"
@.str.20 = [19 x i8] c"Exiting tutorial.\0A\00"
@.str.21 = [12 x i8] c"./upstream/\00"
@.str.22 = [10 x i8] c"./master/\00"
@.str.23 = [33 x i8] c"git init -q --bare ./origin.git/\00"
@.str.24 = [24 x i8] c"git init -q ./upstream/\00"
@.str.25 = [35 x i8] c"git clone -q ./origin.git ./master\00"
@.str.26 = [20 x i8] c"./upstream/test.txt\00"
@.str.27 = [2 x i8] c"w\00"
@.str.28 = [11 x i8] c"./upstream\00"
@.str.29 = [10 x i8] c"git add .\00"
@.str.30 = [53 x i8] c"git commit -qm \22Initializing contents of repository\22\00"
@.str.31 = [3 x i8] c"..\00"
@.str.32 = [9 x i8] c"./master\00"
@.str.33 = [36 x i8] c"git remote add upstream ../upstream\00"
@.str.34 = [21 x i8] c"Beginning Git Tutor\0A\00"
@.str.35 = [209 x i8] c"The following three repositories are created:\0A1. master - our local repository \0A2. origin.git - Our repository to which we will send our changes \0A3. upstream - Our repository where we will grab changes from\0A\0A\00"
@.str.36 = [23 x i8] c"Tutorial 1: Fetching \0A\00"
@.str.37 = [136 x i8] c"Summary: 'git fetch' allows us to retrieve references to changes in other\0Agit repositories and bring it to our current git repository.\0A\00"
@.str.38 = [64 x i8] c"Instructions: Fetch the changes from the upstream repository.\0A\00"
@.str.39 = [37 x i8] c"\0AHint: git fetch <Repository Name> \0A\00"
@stdin = global i32 0
@.str.40 = [28 x i8] c"incorrect please try again\0A\00"
@.str.41 = [19 x i8] c"git fetch upstream\00"
@.str.42 = [24 x i8] c"\0A\0ATutorial 2: Merging \0A\00"
@.str.43 = [115 x i8] c"Summary: 'git merge will combine the references from another repository with a branch located on local repository\0A\00"
@.str.44 = [86 x i8] c"Instructions: Merge the changes from the upstream repository into the master branch \0A\00"
@.str.45 = [48 x i8] c"\0AHint: git merge [Repository Name/LocalBranch]\0A\00"
@.str.46 = [26 x i8] c"git merge upstream/master\00"
@.str.47 = [23 x i8] c"\0ATutorial 3: Pushing \0A\00"
@.str.48 = [85 x i8] c"Summary: 'git push allows us to move our changes from one repository to a new host.\0A\00"
@.str.49 = [103 x i8] c"Instructions: Push the changes in our master repository to our origin repository on our master branch\0A\00"
@.str.50 = [57 x i8] c"\0AHint: git push [target Repository Name] [Local Branch]\0A\00"
@.str.51 = [23 x i8] c"git push origin master\00"
@.str.52 = [33 x i8] c"\0ATutorial 4: Adding to staging \0A\00"
@.str.53 = [105 x i8] c"Summary: 'git add' allows us to move our current changes to staging, a step before committing the work.\0A\00"
@.str.54 = [94 x i8] c"Instructions: Add this directory's contents and onwards to move all changed items to staging\0A\00"
@.str.55 = [42 x i8] c"\0AHint: git add [directory/specific file]\0A\00"
@.str.56 = [52 x i8] c"Git Tutor tutorials are complete, congratulations!\0A\00"
define i32 @cmd_tutor(i32 %0, i8** %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [3 x i8]
%10 = alloca [4 x i8]
%11 = alloca [4 x i8]
%12 = alloca [4 x i8]
%13 = alloca i32
%14 = alloca i32*
%15 = alloca [100 x i8]
%16 = alloca [8 x i8]
%17 = alloca [7 x i8]
%18 = alloca [7 x i8]
%19 = alloca [6 x i8]
%20 = alloca [10 x i8]
%21 = alloca [19 x i8]
%22 = alloca [19 x i8]
%23 = alloca [26 x i8]
%24 = alloca [26 x i8]
%25 = alloca [23 x i8]
%26 = alloca [23 x i8]
%27 = alloca [10 x i8]
%28 = alloca [10 x i8]
%29 = alloca [16 x i8]
%30 = alloca [23 x i8]
%31 = alloca [9 x i8]
%32 = alloca [11 x i8]
%33 = alloca i32
%34 = alloca i32
%35 = alloca i32
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* %2, i8** %6
%36 = call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%37 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%38 = call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8** %7
store i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i8** %8
%39 = load i32, i32* %4
%40 = icmp eq i32 %39, 2
br i1 %40, label %41, label %71
41: ; preds = %3
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = load i8*, i8** %7
%46 = call i64 @strcmp(i8* %44, i8* %45)
%47 = icmp eq i64 %46, 0
br i1 %47, label %55, label %48
48: ; preds = %41
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = load i8*, i8** %8
%53 = call i64 @strcmp(i8* %51, i8* %52)
%54 = icmp eq i64 %53, 0
br i1 %54, label %55, label %71
55: ; preds = %48, %41
%56 = call i32 @mkdir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%57 = call i32 @chdir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%58 = load i32, i32* @F_OK
%59 = call i64 @access(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %58)
%60 = icmp ne i64 %59, 0
br i1 %60, label %61, label %68
61: ; preds = %55
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.7, i64 0, i64 0))
%63 = call i32 @system(i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.8, i64 0, i64 0))
%64 = call i32 @system(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.9, i64 0, i64 0))
%65 = call i32 @system(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.10, i64 0, i64 0))
%66 = call i32 @system(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.11, i64 0, i64 0))
%67 = call i32 @system(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.12, i64 0, i64 0))
br label %68
68: ; preds = %61, %55
%69 = call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%70 = call i32 @exit(i32 1)
unreachable
71: ; preds = %48, %3
%72 = load i32, i32* %4
%73 = icmp sge i32 %72, 2
br i1 %73, label %74, label %92
74: ; preds = %71
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds i8*, i8** %75, i64 1
%77 = load i8*, i8** %76
%78 = load i8*, i8** %7
%79 = call i64 @strcmp(i8* %77, i8* %78)
%80 = icmp ne i64 %79, 0
br i1 %80, label %88, label %81
81: ; preds = %74
%82 = load i8**, i8*** %5
%83 = getelementptr inbounds i8*, i8** %82, i64 1
%84 = load i8*, i8** %83
%85 = load i8*, i8** %8
%86 = call i64 @strcmp(i8* %84, i8* %85)
%87 = icmp ne i64 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %81, %74
%89 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([106 x i8], [106 x i8]* @.str.14, i64 0, i64 0))
%90 = call i32 @exit(i32 1)
unreachable
91: ; preds = %81
br label %92
92: ; preds = %91, %71
br label %93
93: ; preds = %92
%94 = bitcast [4 x i8]* %11 to i8*
%95 = bitcast [4 x i8]* %12 to i8*
store i32 0, i32* %13
%96 = bitcast [8 x i8]* %16 to i8*
%97 = bitcast [7 x i8]* %17 to i8*
%98 = bitcast [7 x i8]* %18 to i8*
%99 = bitcast [6 x i8]* %19 to i8*
%100 = bitcast [10 x i8]* %20 to i8*
%101 = bitcast [19 x i8]* %21 to i8*
%102 = bitcast [26 x i8]* %23 to i8*
%103 = bitcast [23 x i8]* %25 to i8*
%104 = bitcast [10 x i8]* %27 to i8*
%105 = bitcast [16 x i8]* %29 to i8*
%106 = bitcast [23 x i8]* %30 to i8*
%107 = bitcast [9 x i8]* %31 to i8*
%108 = bitcast [11 x i8]* %32 to i8*
store i32 0, i32* %33
br label %109
109: ; preds = %114, %93
%110 = load i32, i32* %13
%111 = icmp slt i32 %110, 1000
br i1 %111, label %112, label %117
112: ; preds = %109
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %114
114: ; preds = %112
%115 = load i32, i32* %13
%116 = add nsw i32 %115, 1
store i32 %116, i32* %13
br label %109
117: ; preds = %109
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.16, i64 0, i64 0))
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0))
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%121 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%122 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* %121)
%123 = getelementptr inbounds [4 x i8], [4 x i8]* %11, i64 0, i64 0
%124 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%125 = call i64 @strcmp(i8* %123, i8* %124)
%126 = icmp ne i64 %125, 0
br i1 %126, label %127, label %135
127: ; preds = %117
%128 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%129 = getelementptr inbounds [4 x i8], [4 x i8]* %12, i64 0, i64 0
%130 = call i64 @strcmp(i8* %128, i8* %129)
%131 = icmp ne i64 %130, 0
br i1 %131, label %132, label %135
132: ; preds = %127
%133 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.20, i64 0, i64 0))
%134 = call i32 @exit(i32 1)
unreachable
135: ; preds = %127, %117
%136 = call i32 @mkdir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0))
%137 = call i32 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0))
%138 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0))
%139 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0))
%140 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.25, i64 0, i64 0))
%141 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0))
store i32* %141, i32** %14
%142 = load i32*, i32** %14
%143 = call i32 @fclose(i32* %142)
%144 = call i32 @chdir(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0))
%145 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0))
%146 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.30, i64 0, i64 0))
%147 = call i32 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0))
%148 = call i32 @chdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0))
%149 = call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
store i32 0, i32* %13
br label %150
150: ; preds = %155, %135
%151 = load i32, i32* %13
%152 = icmp slt i32 %151, 1000
br i1 %152, label %153, label %158
153: ; preds = %150
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.15, i64 0, i64 0))
br label %155
155: ; preds = %153
%156 = load i32, i32* %13
%157 = add nsw i32 %156, 1
store i32 %157, i32* %13
br label %150
158: ; preds = %150
%159 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.34, i64 0, i64 0))
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([209 x i8], [209 x i8]* @.str.35, i64 0, i64 0))
%161 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.36, i64 0, i64 0))
%162 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([136 x i8], [136 x i8]* @.str.37, i64 0, i64 0))
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.38, i64 0, i64 0))
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.39, i64 0, i64 0))
br label %165
165: ; preds = %158, %179
%166 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%167 = load i32, i32* @stdin
%168 = call i32 @fflush(i32 %167)
%169 = getelementptr inbounds [19 x i8], [19 x i8]* %22, i64 0, i64 0
%170 = load i32, i32* @stdin
%171 = call i32 @fgets(i8* %169, i32 19, i32 %170)
%172 = getelementptr inbounds [19 x i8], [19 x i8]* %21, i64 0, i64 0
%173 = getelementptr inbounds [19 x i8], [19 x i8]* %22, i64 0, i64 0
%174 = call i64 @strcmp(i8* %172, i8* %173)
%175 = icmp eq i64 %174, 0
br i1 %175, label %176, label %177
176: ; preds = %165
br label %180
177: ; preds = %165
%178 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.40, i64 0, i64 0))
br label %179
179: ; preds = %177
br label %165
180: ; preds = %176
%181 = call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.41, i64 0, i64 0))
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.42, i64 0, i64 0))
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str.43, i64 0, i64 0))
%184 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str.44, i64 0, i64 0))
%185 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.45, i64 0, i64 0))
br label %186
186: ; preds = %180, %200
%187 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%188 = load i32, i32* @stdin
%189 = call i32 @fflush(i32 %188)
%190 = getelementptr inbounds [26 x i8], [26 x i8]* %24, i64 0, i64 0
%191 = load i32, i32* @stdin
%192 = call i32 @fgets(i8* %190, i32 26, i32 %191)
%193 = getelementptr inbounds [26 x i8], [26 x i8]* %23, i64 0, i64 0
%194 = getelementptr inbounds [26 x i8], [26 x i8]* %24, i64 0, i64 0
%195 = call i64 @strcmp(i8* %193, i8* %194)
%196 = icmp eq i64 %195, 0
br i1 %196, label %197, label %198
197: ; preds = %186
br label %201
198: ; preds = %186
%199 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.40, i64 0, i64 0))
br label %200
200: ; preds = %198
br label %186
201: ; preds = %197
%202 = call i32 @system(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.46, i64 0, i64 0))
%203 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.47, i64 0, i64 0))
%204 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str.48, i64 0, i64 0))
%205 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.49, i64 0, i64 0))
%206 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.50, i64 0, i64 0))
br label %207
207: ; preds = %201, %221
%208 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%209 = load i32, i32* @stdin
%210 = call i32 @fflush(i32 %209)
%211 = getelementptr inbounds [23 x i8], [23 x i8]* %26, i64 0, i64 0
%212 = load i32, i32* @stdin
%213 = call i32 @fgets(i8* %211, i32 23, i32 %212)
%214 = getelementptr inbounds [23 x i8], [23 x i8]* %25, i64 0, i64 0
%215 = getelementptr inbounds [23 x i8], [23 x i8]* %26, i64 0, i64 0
%216 = call i64 @strcmp(i8* %214, i8* %215)
%217 = icmp eq i64 %216, 0
br i1 %217, label %218, label %219
218: ; preds = %207
br label %222
219: ; preds = %207
%220 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.40, i64 0, i64 0))
br label %221
221: ; preds = %219
br label %207
222: ; preds = %218
%223 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.51, i64 0, i64 0))
%224 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.52, i64 0, i64 0))
%225 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([105 x i8], [105 x i8]* @.str.53, i64 0, i64 0))
%226 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([94 x i8], [94 x i8]* @.str.54, i64 0, i64 0))
%227 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.55, i64 0, i64 0))
br label %228
228: ; preds = %222, %242
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%230 = load i32, i32* @stdin
%231 = call i32 @fflush(i32 %230)
%232 = getelementptr inbounds [10 x i8], [10 x i8]* %28, i64 0, i64 0
%233 = load i32, i32* @stdin
%234 = call i32 @fgets(i8* %232, i32 10, i32 %233)
%235 = getelementptr inbounds [10 x i8], [10 x i8]* %27, i64 0, i64 0
%236 = getelementptr inbounds [10 x i8], [10 x i8]* %28, i64 0, i64 0
%237 = call i64 @strcmp(i8* %235, i8* %236)
%238 = icmp eq i64 %237, 0
br i1 %238, label %239, label %240
239: ; preds = %228
br label %243
240: ; preds = %228
%241 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.40, i64 0, i64 0))
br label %242
242: ; preds = %240
br label %228
243: ; preds = %239
%244 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0))
%245 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.56, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"rm -rf ./master\00"
@.str.1 = [20 x i8] c"rm -rf ./origin.git\00"
@.str.2 = [18 x i8] c"rm -rf ./upstream\00"
@.str.3 = [6 x i8] c"--gui\00"
@.str.4 = [3 x i8] c"-g\00"
@.str.5 = [12 x i8] c"./.gittutor\00"
@.str.6 = [14 x i8] c"GitTutor.html\00"
@F_OK = global i32 0
@.str.8 = [121 x i8] c"curl -so GitTutor.html https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/GitTutor.html\00"
@.str.9 = [120 x i8] c"curl -so Picture1.png https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/Picture1.png\00"
@.str.10 = [113 x i8] c"curl -so local.PNG https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/local.PNG\00"
@.str.11 = [117 x i8] c"curl -so padnote.PNG https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/padnote.PNG\00"
@.str.12 = [127 x i8] c"curl -so repo_created.png https://raw.githubusercontent.com/joey-walker/COMP650-SeniorProject/master/GitTutor/repo_created.png\00"
@.str.13 = [20 x i8] c"start GitTutor.html\00"
@.str.14 = [106 x i8] c"Git Tutor did not recognize the additional argument\0A Correct usage is 'git tutor --gui' or 'git tutor -g'\00"
@.str.18 = [10 x i8] c"Input >> \00"
@.str.19 = [3 x i8] c"%s\00"
@.str.21 = [12 x i8] c"./upstream/\00"
@.str.22 = [10 x i8] c"./master/\00"
@.str.23 = [33 x i8] c"git init -q --bare ./origin.git/\00"
@.str.24 = [24 x i8] c"git init -q ./upstream/\00"
@.str.25 = [35 x i8] c"git clone -q ./origin.git ./master\00"
@.str.26 = [20 x i8] c"./upstream/test.txt\00"
@.str.27 = [2 x i8] c"w\00"
@.str.28 = [11 x i8] c"./upstream\00"
@.str.29 = [10 x i8] c"git add .\00"
@.str.30 = [53 x i8] c"git commit -qm \22Initializing contents of repository\22\00"
@.str.31 = [3 x i8] c"..\00"
@.str.32 = [9 x i8] c"./master\00"
@.str.33 = [36 x i8] c"git remote add upstream ../upstream\00"
@stdin = global i32 0
@.str.41 = [19 x i8] c"git fetch upstream\00"
@.str.46 = [26 x i8] c"git merge upstream/master\00"
@.str.51 = [23 x i8] c"git push origin master\00"
@str = [81 x i8] c"Git Tutor is a tutorial that seeks to teach Git through a step-by step approach.\00"
@str.57 = [38 x i8] c"Do you wish to continue? (Yes or No) \00"
@str.58 = [20 x i8] c"Beginning Git Tutor\00"
@str.59 = [208 x i8] c"The following three repositories are created:\0A1. master - our local repository \0A2. origin.git - Our repository to which we will send our changes \0A3. upstream - Our repository where we will grab changes from\0A\00"
@str.60 = [22 x i8] c"Tutorial 1: Fetching \00"
@str.61 = [135 x i8] c"Summary: 'git fetch' allows us to retrieve references to changes in other\0Agit repositories and bring it to our current git repository.\00"
@str.62 = [63 x i8] c"Instructions: Fetch the changes from the upstream repository.\00"
@str.63 = [36 x i8] c"\0AHint: git fetch <Repository Name> \00"
@str.65 = [23 x i8] c"\0A\0ATutorial 2: Merging \00"
@str.66 = [114 x i8] c"Summary: 'git merge will combine the references from another repository with a branch located on local repository\00"
@str.67 = [85 x i8] c"Instructions: Merge the changes from the upstream repository into the master branch \00"
@str.68 = [47 x i8] c"\0AHint: git merge [Repository Name/LocalBranch]\00"
@str.70 = [22 x i8] c"\0ATutorial 3: Pushing \00"
@str.71 = [84 x i8] c"Summary: 'git push allows us to move our changes from one repository to a new host.\00"
@str.72 = [102 x i8] c"Instructions: Push the changes in our master repository to our origin repository on our master branch\00"
@str.73 = [56 x i8] c"\0AHint: git push [target Repository Name] [Local Branch]\00"
@str.75 = [32 x i8] c"\0ATutorial 4: Adding to staging \00"
@str.76 = [104 x i8] c"Summary: 'git add' allows us to move our current changes to staging, a step before committing the work.\00"
@str.77 = [93 x i8] c"Instructions: Add this directory's contents and onwards to move all changed items to staging\00"
@str.78 = [41 x i8] c"\0AHint: git add [directory/specific file]\00"
@str.79 = [27 x i8] c"incorrect please try again\00"
@str.80 = [51 x i8] c"Git Tutor tutorials are complete, congratulations!\00"
@str.81 = [18 x i8] c"Exiting tutorial.\00"
@str.82 = [30 x i8] c"Launching GUI... Please wait.\00"
define i32 @cmd_tutor(i32 %0, i8** nocapture %1, i8* nocapture readnone %2) {
%4 = alloca [3 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = alloca [19 x i8]
%8 = alloca [19 x i8]
%9 = alloca [26 x i8]
%10 = alloca [26 x i8]
%11 = alloca [23 x i8]
%12 = alloca [23 x i8]
%13 = alloca [10 x i8]
%14 = alloca [10 x i8]
%15 = tail call i32 @system(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%16 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%17 = tail call i32 @system(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i32 %0, 2
br i1 %18, label %19, label %44
19: ; preds = %3
%20 = getelementptr inbounds i8*, i8** %1, i64 1
%21 = load i8*, i8** %20
%22 = tail call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %28, label %24
24: ; preds = %19
%25 = load i8*, i8** %20
%26 = tail call i64 @strcmp(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%27 = icmp eq i64 %26, 0
br i1 %27, label %28, label %46
28: ; preds = %24, %19
%29 = tail call i32 @mkdir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%30 = tail call i32 @chdir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
%31 = load i32, i32* @F_OK
%32 = tail call i64 @access(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i32 %31)
%33 = icmp eq i64 %32, 0
br i1 %33, label %41, label %34
34: ; preds = %28
%35 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str.82, i64 0, i64 0))
%36 = tail call i32 @system(i8* getelementptr inbounds ([121 x i8], [121 x i8]* @.str.8, i64 0, i64 0))
%37 = tail call i32 @system(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.9, i64 0, i64 0))
%38 = tail call i32 @system(i8* getelementptr inbounds ([113 x i8], [113 x i8]* @.str.10, i64 0, i64 0))
%39 = tail call i32 @system(i8* getelementptr inbounds ([117 x i8], [117 x i8]* @.str.11, i64 0, i64 0))
%40 = tail call i32 @system(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.12, i64 0, i64 0))
br label %41
41: ; preds = %34, %28
%42 = tail call i32 @system(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.13, i64 0, i64 0))
%43 = tail call i32 @exit(i32 1)
unreachable
44: ; preds = %3
%45 = icmp sgt i32 %0, 1
br i1 %45, label %46, label %58
46: ; preds = %24, %44
%47 = getelementptr inbounds i8*, i8** %1, i64 1
%48 = load i8*, i8** %47
%49 = tail call i64 @strcmp(i8* %48, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %55
51: ; preds = %46
%52 = load i8*, i8** %47
%53 = tail call i64 @strcmp(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%54 = icmp eq i64 %53, 0
br i1 %54, label %58, label %55
55: ; preds = %51, %46
%56 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @.str.14, i64 0, i64 0))
%57 = tail call i32 @exit(i32 1)
unreachable
58: ; preds = %44, %51
%59 = getelementptr inbounds [3 x i8], [3 x i8]* %4, i64 0, i64 0
%60 = bitcast i32* %5 to i8*
store i32 7562585, i32* %5
%61 = bitcast i32* %6 to i8*
store i32 7562617, i32* %6
%62 = getelementptr inbounds [19 x i8], [19 x i8]* %7, i64 0, i64 0
%63 = getelementptr inbounds [19 x i8], [19 x i8]* %8, i64 0, i64 0
%64 = getelementptr inbounds [26 x i8], [26 x i8]* %9, i64 0, i64 0
%65 = getelementptr inbounds [26 x i8], [26 x i8]* %10, i64 0, i64 0
%66 = getelementptr inbounds [23 x i8], [23 x i8]* %11, i64 0, i64 0
%67 = getelementptr inbounds [23 x i8], [23 x i8]* %12, i64 0, i64 0
%68 = getelementptr inbounds [10 x i8], [10 x i8]* %13, i64 0, i64 0
%69 = getelementptr inbounds [10 x i8], [10 x i8]* %14, i64 0, i64 0
br label %70
70: ; preds = %58, %70
%71 = phi i32 [ 0, %58 ], [ %73, %70 ]
%72 = tail call i32 @putchar(i32 10)
%73 = add nuw nsw i32 %71, 1
%74 = icmp eq i32 %73, 1000
br i1 %74, label %75, label %70
75: ; preds = %70
%76 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @str, i64 0, i64 0))
%77 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str.57, i64 0, i64 0))
%78 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%79 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.19, i64 0, i64 0), i8* %59)
%80 = call i64 @strcmp(i8* %60, i8* %59)
%81 = icmp eq i64 %80, 0
br i1 %81, label %88, label %82
82: ; preds = %75
%83 = call i64 @strcmp(i8* %59, i8* %61)
%84 = icmp eq i64 %83, 0
br i1 %84, label %88, label %85
85: ; preds = %82
%86 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @str.81, i64 0, i64 0))
%87 = call i32 @exit(i32 1)
unreachable
88: ; preds = %82, %75
%89 = call i32 @mkdir(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.21, i64 0, i64 0))
%90 = call i32 @mkdir(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.22, i64 0, i64 0))
%91 = call i32 @system(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.23, i64 0, i64 0))
%92 = call i32 @system(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.24, i64 0, i64 0))
%93 = call i32 @system(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.25, i64 0, i64 0))
%94 = call i32* @fopen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.26, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.27, i64 0, i64 0))
%95 = call i32 @fclose(i32* %94)
%96 = call i32 @chdir(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.28, i64 0, i64 0))
%97 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0))
%98 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.30, i64 0, i64 0))
%99 = call i32 @chdir(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.31, i64 0, i64 0))
%100 = call i32 @chdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.32, i64 0, i64 0))
%101 = call i32 @system(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.33, i64 0, i64 0))
br label %102
102: ; preds = %88, %102
%103 = phi i32 [ 0, %88 ], [ %105, %102 ]
%104 = call i32 @putchar(i32 10)
%105 = add nuw nsw i32 %103, 1
%106 = icmp eq i32 %105, 1000
br i1 %106, label %107, label %102
107: ; preds = %102
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str.58, i64 0, i64 0))
%109 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([208 x i8], [208 x i8]* @str.59, i64 0, i64 0))
%110 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.60, i64 0, i64 0))
%111 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([135 x i8], [135 x i8]* @str.61, i64 0, i64 0))
%112 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @str.62, i64 0, i64 0))
%113 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str.63, i64 0, i64 0))
%114 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%115 = load i32, i32* @stdin
%116 = call i32 @fflush(i32 %115)
%117 = load i32, i32* @stdin
%118 = call i32 @fgets(i8* %63, i32 19, i32 %117)
%119 = call i64 @strcmp(i8* %62, i8* %63)
%120 = icmp eq i64 %119, 0
br i1 %120, label %130, label %121
121: ; preds = %107, %121
%122 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.79, i64 0, i64 0))
%123 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%124 = load i32, i32* @stdin
%125 = call i32 @fflush(i32 %124)
%126 = load i32, i32* @stdin
%127 = call i32 @fgets(i8* %63, i32 19, i32 %126)
%128 = call i64 @strcmp(i8* %62, i8* %63)
%129 = icmp eq i64 %128, 0
br i1 %129, label %130, label %121
130: ; preds = %121, %107
%131 = call i32 @system(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.41, i64 0, i64 0))
%132 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str.65, i64 0, i64 0))
%133 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([114 x i8], [114 x i8]* @str.66, i64 0, i64 0))
%134 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @str.67, i64 0, i64 0))
%135 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.68, i64 0, i64 0))
%136 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%137 = load i32, i32* @stdin
%138 = call i32 @fflush(i32 %137)
%139 = load i32, i32* @stdin
%140 = call i32 @fgets(i8* %65, i32 26, i32 %139)
%141 = call i64 @strcmp(i8* %64, i8* %65)
%142 = icmp eq i64 %141, 0
br i1 %142, label %152, label %143
143: ; preds = %130, %143
%144 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.79, i64 0, i64 0))
%145 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%146 = load i32, i32* @stdin
%147 = call i32 @fflush(i32 %146)
%148 = load i32, i32* @stdin
%149 = call i32 @fgets(i8* %65, i32 26, i32 %148)
%150 = call i64 @strcmp(i8* %64, i8* %65)
%151 = icmp eq i64 %150, 0
br i1 %151, label %152, label %143
152: ; preds = %143, %130
%153 = call i32 @system(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.46, i64 0, i64 0))
%154 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str.70, i64 0, i64 0))
%155 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([84 x i8], [84 x i8]* @str.71, i64 0, i64 0))
%156 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([102 x i8], [102 x i8]* @str.72, i64 0, i64 0))
%157 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([56 x i8], [56 x i8]* @str.73, i64 0, i64 0))
%158 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%159 = load i32, i32* @stdin
%160 = call i32 @fflush(i32 %159)
%161 = load i32, i32* @stdin
%162 = call i32 @fgets(i8* %67, i32 23, i32 %161)
%163 = call i64 @strcmp(i8* %66, i8* %67)
%164 = icmp eq i64 %163, 0
br i1 %164, label %174, label %165
165: ; preds = %152, %165
%166 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.79, i64 0, i64 0))
%167 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%168 = load i32, i32* @stdin
%169 = call i32 @fflush(i32 %168)
%170 = load i32, i32* @stdin
%171 = call i32 @fgets(i8* %67, i32 23, i32 %170)
%172 = call i64 @strcmp(i8* %66, i8* %67)
%173 = icmp eq i64 %172, 0
br i1 %173, label %174, label %165
174: ; preds = %165, %152
%175 = call i32 @system(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.51, i64 0, i64 0))
%176 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.75, i64 0, i64 0))
%177 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([104 x i8], [104 x i8]* @str.76, i64 0, i64 0))
%178 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([93 x i8], [93 x i8]* @str.77, i64 0, i64 0))
%179 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @str.78, i64 0, i64 0))
%180 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%181 = load i32, i32* @stdin
%182 = call i32 @fflush(i32 %181)
%183 = load i32, i32* @stdin
%184 = call i32 @fgets(i8* %69, i32 10, i32 %183)
%185 = call i64 @strcmp(i8* %68, i8* %69)
%186 = icmp eq i64 %185, 0
br i1 %186, label %196, label %187
187: ; preds = %174, %187
%188 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.79, i64 0, i64 0))
%189 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.18, i64 0, i64 0))
%190 = load i32, i32* @stdin
%191 = call i32 @fflush(i32 %190)
%192 = load i32, i32* @stdin
%193 = call i32 @fgets(i8* %69, i32 10, i32 %192)
%194 = call i64 @strcmp(i8* %68, i8* %69)
%195 = icmp eq i64 %194, 0
br i1 %195, label %196, label %187
196: ; preds = %187, %174
%197 = call i32 @system(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.29, i64 0, i64 0))
%198 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.80, i64 0, i64 0))
ret i32 0
}