#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 */

/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int main() {
  char string[100], w[100], process_name[100], newstring[100], *arglist[6];
  int i, len = 0, start = 0, p = 0, flag = 0;
  printf("Enter the combination of programs to be used\n");
  scanf("%[^\n]s", string);
  len = strlen(string) - 1;
  for (i = len; i >= 0; i--) {
    if (string[i] != ' ') {
      if (string[i] >= '0' && string[i] <= '9')
        len--;
      else {
        flag = 1;
        break;
      }
    } else
      break;
  }
  if (i == -1 || flag == 1 || len == strlen(string) - 1) {
    printf("Insufficient Arguments");
    exit(0);
  }
  for (i = 0; i <= len; i++)
    newstring[start++] = string[i];
  newstring[start] = '\0';
  start = 0;
  for (i = len + 1; i < strlen(string); i++) {
    w[start++] = string[i];
  }
  w[start] = '\0';
  for (i = 0; i <= len; i++) {
    if (string[i] == ' ') {
      process_name[p] = '\0';
      if (!strcmp(process_name, "twice")) {
        arglist[0] = (char *)malloc(8 * sizeof(char));
        strcpy(arglist[0], "./twice");
        arglist[1] = (char *)malloc((start + 1) * sizeof(char));
        strcpy(arglist[1], w);
        arglist[2] = (char *)malloc(10 * sizeof(char));
        sprintf(arglist[2], "%d", i);
        arglist[3] = (char *)malloc(10 * sizeof(char));
        sprintf(arglist[3], "%d", len);
        arglist[4] = (char *)malloc(len * sizeof(char));
        strcpy(arglist[4], newstring);
        arglist[5] = NULL;
        execvp("./twice", arglist);
        printf("This statement is not executed if execvp succeeds.\n");
      } else if (!strcmp(process_name, "square")) {
        arglist[0] = (char *)malloc(8 * sizeof(char));
        strcpy(arglist[0], "./square");
        arglist[1] = (char *)malloc((start + 1) * sizeof(char));
        strcpy(arglist[1], w);
        arglist[2] = (char *)malloc(10 * sizeof(char));
        sprintf(arglist[2], "%d", i);
        arglist[3] = (char *)malloc(10 * sizeof(char));
        sprintf(arglist[3], "%d", len);
        arglist[4] = (char *)malloc(len * sizeof(char));
        strcpy(arglist[4], newstring);
        arglist[5] = NULL;
        execvp("./square", arglist);
        printf("This statement is not executed if execvp succeeds.\n");
      } else if (!strcmp(process_name, "half")) {
        arglist[0] = (char *)malloc(8 * sizeof(char));
        strcpy(arglist[0], "./square");
        arglist[1] = (char *)malloc((start + 1) * sizeof(char));
        strcpy(arglist[1], w);
        arglist[2] = (char *)malloc(10 * sizeof(char));
        sprintf(arglist[2], "%d", i);
        arglist[3] = (char *)malloc(10 * sizeof(char));
        sprintf(arglist[3], "%d", len);
        arglist[4] = (char *)malloc(len * sizeof(char));
        strcpy(arglist[4], newstring);
        arglist[5] = NULL;
        execvp("./half", arglist);
        printf("This statement is not executed if execvp succeeds.\n");
      } else if (strlen(process_name)) {
        printf("Error! No such %s Process Exist", process_name);
        exit(0);
      }
    } else {
      process_name[p] = string[i];
      p++;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1f8(%rbp)
movl   $0x0,-0x1fc(%rbp)
movl   $0x0,-0x200(%rbp)
movl   $0x0,-0x204(%rbp)
lea    0xe2f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x70(%rbp),%rsi
lea    0xe4b(%rip),%rdi
call   1080 <scanf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x1f8(%rbp)
mov    -0x1f8(%rbp),%eax
mov    %eax,-0x1f4(%rbp)
cmpl   $0x0,-0x1f4(%rbp)
jl     1298 <main+0x108>
movslq -0x1f4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
je     127a <main+0xea>
movslq -0x1f4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x30,%eax
jl     1266 <main+0xd6>
movslq -0x1f4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x39,%eax
jg     1266 <main+0xd6>
mov    -0x1f8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1f8(%rbp)
jmp    1275 <main+0xe5>
movl   $0x1,-0x204(%rbp)
jmp    1298 <main+0x108>
jmp    127f <main+0xef>
jmp    1298 <main+0x108>
jmp    1284 <main+0xf4>
mov    -0x1f4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1f4(%rbp)
jmp    1206 <main+0x76>
cmpl   $0xffffffff,-0x1f4(%rbp)
je     12da <main+0x14a>
cmpl   $0x1,-0x204(%rbp)
je     12da <main+0x14a>
mov    -0x1f8(%rbp),%eax
mov    %eax,-0x208(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x208(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    12ef <main+0x15f>
lea    0xd54(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
movl   $0x0,-0x1f4(%rbp)
mov    -0x1f4(%rbp),%eax
cmp    -0x1f8(%rbp),%eax
jg     1344 <main+0x1b4>
movslq -0x1f4(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%cl
mov    -0x1fc(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1fc(%rbp)
cltq
mov    %cl,-0x1c0(%rbp,%rax,1)
mov    -0x1f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
jmp    12f9 <main+0x169>
movslq -0x1fc(%rbp),%rax
movb   $0x0,-0x1c0(%rbp,%rax,1)
movl   $0x0,-0x1fc(%rbp)
mov    -0x1f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
mov    -0x1f4(%rbp),%eax
mov    %eax,-0x20c(%rbp)
lea    -0x70(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x20c(%rbp),%eax
cmp    %ecx,%eax
jge    13ca <main+0x23a>
movslq -0x1f4(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%cl
mov    -0x1fc(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x1fc(%rbp)
cltq
mov    %cl,-0xe0(%rbp,%rax,1)
mov    -0x1f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
jmp    136c <main+0x1dc>
movslq -0x1fc(%rbp),%rax
movb   $0x0,-0xe0(%rbp,%rax,1)
movl   $0x0,-0x1f4(%rbp)
mov    -0x1f4(%rbp),%eax
cmp    -0x1f8(%rbp),%eax
jg     1802 <main+0x672>
movslq -0x1f4(%rbp),%rax
movsbl -0x70(%rbp,%rax,1),%eax
cmp    $0x20,%eax
jne    17c1 <main+0x631>
movslq -0x200(%rbp),%rax
movb   $0x0,-0x150(%rbp,%rax,1)
lea    -0x150(%rbp),%rdi
lea    0xc27(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    153a <main+0x3aa>
mov    $0x8,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1f0(%rbp)
mov    -0x1f0(%rbp),%rdi
lea    0xbf8(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x1fc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1e8(%rbp)
mov    -0x1e8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1e0(%rbp)
mov    -0x1e0(%rbp),%rdi
mov    -0x1f4(%rbp),%edx
lea    0xba6(%rip),%rsi
call   10a0 <sprintf@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1d8(%rbp)
mov    -0x1d8(%rbp),%rdi
mov    -0x1f8(%rbp),%edx
lea    0xb7c(%rip),%rsi
call   10a0 <sprintf@plt>
movslq -0x1f8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1d0(%rbp)
mov    -0x1d0(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1030 <strcpy@plt>
movq   $0x0,-0x1c8(%rbp)
lea    -0x1f0(%rbp),%rsi
lea    0xb2a(%rip),%rdi
call   1090 <execvp@plt>
lea    0xb29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    17bc <main+0x62c>
lea    -0x150(%rbp),%rdi
lea    0xb45(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    165b <main+0x4cb>
mov    $0x8,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1f0(%rbp)
mov    -0x1f0(%rbp),%rdi
lea    0xb16(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x1fc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1e8(%rbp)
mov    -0x1e8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1e0(%rbp)
mov    -0x1e0(%rbp),%rdi
mov    -0x1f4(%rbp),%edx
lea    0xa85(%rip),%rsi
call   10a0 <sprintf@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1d8(%rbp)
mov    -0x1d8(%rbp),%rdi
mov    -0x1f8(%rbp),%edx
lea    0xa5b(%rip),%rsi
call   10a0 <sprintf@plt>
movslq -0x1f8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1d0(%rbp)
mov    -0x1d0(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1030 <strcpy@plt>
movq   $0x0,-0x1c8(%rbp)
lea    -0x1f0(%rbp),%rsi
lea    0xa48(%rip),%rdi
call   1090 <execvp@plt>
lea    0xa08(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    17b7 <main+0x627>
lea    -0x150(%rbp),%rdi
lea    0xa2d(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%eax
jne    177c <main+0x5ec>
mov    $0x8,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1f0(%rbp)
mov    -0x1f0(%rbp),%rdi
lea    0x9f5(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x1fc(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1e8(%rbp)
mov    -0x1e8(%rbp),%rdi
lea    -0xe0(%rbp),%rsi
call   1030 <strcpy@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1e0(%rbp)
mov    -0x1e0(%rbp),%rdi
mov    -0x1f4(%rbp),%edx
lea    0x964(%rip),%rsi
call   10a0 <sprintf@plt>
mov    $0xa,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1d8(%rbp)
mov    -0x1d8(%rbp),%rdi
mov    -0x1f8(%rbp),%edx
lea    0x93a(%rip),%rsi
call   10a0 <sprintf@plt>
movslq -0x1f8(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1070 <malloc@plt>
mov    %rax,-0x1d0(%rbp)
mov    -0x1d0(%rbp),%rdi
lea    -0x1c0(%rbp),%rsi
call   1030 <strcpy@plt>
movq   $0x0,-0x1c8(%rbp)
lea    -0x1f0(%rbp),%rsi
lea    0x930(%rip),%rdi
call   1090 <execvp@plt>
lea    0x8e7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    17b2 <main+0x622>
lea    -0x150(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%eax
je     17ad <main+0x61d>
lea    -0x150(%rbp),%rsi
lea    0x8fc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %edi,%edi
call   10b0 <exit@plt>
jmp    17b2 <main+0x622>
jmp    17b7 <main+0x627>
jmp    17bc <main+0x62c>
jmp    17e9 <main+0x659>
movslq -0x1f4(%rbp),%rax
mov    -0x70(%rbp,%rax,1),%cl
movslq -0x200(%rbp),%rax
mov    %cl,-0x150(%rbp,%rax,1)
mov    -0x200(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x200(%rbp)
jmp    17ee <main+0x65e>
mov    -0x1f4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1f4(%rbp)
jmp    13e3 <main+0x253>
xor    %eax,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1e8,%rsp
lea    0xea1(%rip),%rdi
call   1040 <puts@plt>
lea    0xe3c(%rip),%rdi
lea    0xa0(%rsp),%rbx
mov    %rbx,%rsi
call   1090 <scanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
lea    -0x1(%rax),%r15d
test   %eax,%eax
jle    1226 <main+0x86>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15d,%eax
movzbl 0xa0(%rsp,%rax,1),%eax
cmp    $0x20,%al
je     1228 <main+0x88>
add    $0xd0,%al
cmp    $0x9,%al
ja     1211 <main+0x71>
lea    -0x1(%r15),%eax
test   %r15d,%r15d
mov    %eax,%r15d
jg     11f0 <main+0x50>
lea    0xdef(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>
je     1211 <main+0x71>
lea    0xa0(%rsp),%rdi
call   1050 <strlen@plt>
add    $0xffffffff,%eax
cmp    %eax,%r15d
je     1211 <main+0x71>
xor    %r14d,%r14d
test   %r15d,%r15d
js     1266 <main+0xc6>
mov    %r15d,%ebx
add    $0x1,%rbx
lea    0x110(%rsp),%rdi
lea    0xa0(%rsp),%rsi
mov    %rbx,%rdx
call   1070 <memcpy@plt>
jmp    1268 <main+0xc8>
xor    %ebx,%ebx
movslq %r15d,%r13
add    $0x1,%r13
movb   $0x0,0x110(%rsp,%rbx,1)
lea    0xa0(%rsp),%rdi
call   1050 <strlen@plt>
cmp    %eax,%r13d
jge    12cd <main+0x12d>
lea    (%rsp,%r13,1),%rbx
add    $0xa0,%rbx
xor    %r14d,%r14d
lea    0xa0(%rsp),%r12
nop
mov    %r14,%rbp
movzbl (%rbx,%r14,1),%eax
add    $0x1,%r14
mov    %al,0x180(%rsp,%rbp,1)
mov    %r12,%rdi
call   1050 <strlen@plt>
cltq
lea    0x1(,%rbp,1),%rcx
add    %r13,%rcx
cmp    %rax,%rcx
jl     12a0 <main+0x100>
mov    %r14d,%eax
movb   $0x0,0x180(%rsp,%rax,1)
test   %r15d,%r15d
js     15a9 <main+0x409>
add    $0x1,%r14d
mov    %r13d,%r13d
xor    %ebx,%ebx
xor    %r12d,%r12d
jmp    1307 <main+0x167>
nop
mov    %cl,0x30(%rsp,%rax,1)
add    $0x1,%eax
mov    %eax,%r12d
add    $0x1,%rbx
cmp    %rbx,%r13
je     15a9 <main+0x409>
movzbl 0xa0(%rsp,%rbx,1),%ecx
movslq %r12d,%rax
cmp    $0x20,%cl
jne    12f0 <main+0x150>
movb   $0x0,0x30(%rsp,%rax,1)
mov    0x30(%rsp),%eax
mov    $0x63697774,%ecx
xor    %ecx,%eax
movzwl 0x34(%rsp),%ecx
xor    $0x65,%ecx
or     %eax,%ecx
je     137c <main+0x1dc>
mov    0x30(%rsp),%eax
mov    $0x61757173,%ecx
xor    %ecx,%eax
mov    0x33(%rsp),%ecx
mov    $0x657261,%edx
xor    %edx,%ecx
or     %eax,%ecx
je     142e <main+0x28e>
mov    0x30(%rsp),%eax
mov    $0x666c6168,%ecx
xor    %ecx,%eax
movzbl 0x34(%rsp),%ecx
or     %eax,%ecx
je     14da <main+0x33a>
lea    0x30(%rsp),%rdi
call   1050 <strlen@plt>
test   %eax,%eax
je     12fa <main+0x15a>
jmp    15bd <main+0x41d>
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,(%rsp)
mov    %rax,%rdi
lea    0xc8a(%rip),%rsi
call   1030 <strcpy@plt>
mov    %r14d,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
lea    0x180(%rsp),%rsi
call   1030 <strcpy@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %rax,%rdi
mov    %r13,%rbp
lea    0xc54(%rip),%r13
mov    %r13,%rsi
mov    %ebx,%edx
call   10b0 <sprintf@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %rax,%rdi
mov    %r13,%rsi
mov    %rbp,%r13
mov    %r15d,%edx
call   10b0 <sprintf@plt>
mov    %r15d,%edi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rax,%rdi
lea    0x110(%rsp),%rsi
call   1030 <strcpy@plt>
movq   $0x0,0x28(%rsp)
lea    0xbf5(%rip),%rdi
jmp    1590 <main+0x3f0>
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,(%rsp)
mov    %rax,%rdi
lea    0xbe3(%rip),%rsi
call   1030 <strcpy@plt>
mov    %r14d,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
lea    0x180(%rsp),%rsi
call   1030 <strcpy@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %rax,%rdi
lea    0xba5(%rip),%rbp
mov    %rbp,%rsi
mov    %ebx,%edx
call   10b0 <sprintf@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
call   10b0 <sprintf@plt>
mov    %r15d,%edi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rax,%rdi
lea    0x110(%rsp),%rsi
call   1030 <strcpy@plt>
movq   $0x0,0x28(%rsp)
lea    0xb54(%rip),%rdi
jmp    1590 <main+0x3f0>
mov    $0x8,%edi
call   1080 <malloc@plt>
mov    %rax,(%rsp)
mov    %rax,%rdi
lea    0xb37(%rip),%rsi
call   1030 <strcpy@plt>
mov    %r14d,%edi
call   1080 <malloc@plt>
mov    %rax,0x8(%rsp)
mov    %rax,%rdi
lea    0x180(%rsp),%rsi
call   1030 <strcpy@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,0x10(%rsp)
mov    %rax,%rdi
lea    0xaf9(%rip),%rbp
mov    %rbp,%rsi
mov    %ebx,%edx
call   10b0 <sprintf@plt>
mov    $0xa,%edi
call   1080 <malloc@plt>
mov    %rax,0x18(%rsp)
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
call   10b0 <sprintf@plt>
mov    %r15d,%edi
call   1080 <malloc@plt>
mov    %rax,0x20(%rsp)
mov    %rax,%rdi
lea    0x110(%rsp),%rsi
call   1030 <strcpy@plt>
movq   $0x0,0x28(%rsp)
lea    0xab1(%rip),%rdi
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %rsp,%rsi
call   10a0 <execvp@plt>
lea    0xae7(%rip),%rdi
call   1040 <puts@plt>
jmp    12fa <main+0x15a>
xor    %eax,%eax
add    $0x1e8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xa75(%rip),%rdi
lea    0x30(%rsp),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %edi,%edi
call   10c0 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"Enter the combination of programs to be used\0A\00"
@.str.1 = [7 x i8] c"%[^\0A]s\00"
@.str.2 = [23 x i8] c"Insufficient Arguments\00"
@.str.3 = [6 x i8] c"twice\00"
@.str.4 = [8 x i8] c"./twice\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.6 = [52 x i8] c"This statement is not executed if execvp succeeds.\0A\00"
@.str.7 = [7 x i8] c"square\00"
@.str.8 = [9 x i8] c"./square\00"
@.str.9 = [5 x i8] c"half\00"
@.str.10 = [7 x i8] c"./half\00"
@.str.11 = [32 x i8] c"Error! No such %s Process Exist\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [100 x i8]
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = alloca [6 x i8*]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%14 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%16 = call i32 @strlen(i8* %15)
%17 = sub nsw i32 %16, 1
store i32 %17, i32* %8
%18 = load i32, i32* %8
store i32 %18, i32* %7
br label %19
19: ; preds = %50, %0
%20 = load i32, i32* %7
%21 = icmp sge i32 %20, 0
br i1 %21, label %22, label %53
22: ; preds = %19
%23 = load i32, i32* %7
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %24
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = icmp ne i32 %27, 32
br i1 %28, label %29, label %48
29: ; preds = %22
%30 = load i32, i32* %7
%31 = sext i32 %30 to i64
%32 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %31
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
%35 = icmp sge i32 %34, 48
br i1 %35, label %36, label %46
36: ; preds = %29
%37 = load i32, i32* %7
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %38
%40 = load i8, i8* %39
%41 = sext i8 %40 to i32
%42 = icmp sle i32 %41, 57
br i1 %42, label %43, label %46
43: ; preds = %36
%44 = load i32, i32* %8
%45 = add nsw i32 %44, -1
store i32 %45, i32* %8
br label %47
46: ; preds = %36, %29
store i32 1, i32* %11
br label %53
47: ; preds = %43
br label %49
48: ; preds = %22
br label %53
49: ; preds = %47
br label %50
50: ; preds = %49
%51 = load i32, i32* %7
%52 = add nsw i32 %51, -1
store i32 %52, i32* %7
br label %19
53: ; preds = %48, %46, %19
%54 = load i32, i32* %7
%55 = icmp eq i32 %54, -1
br i1 %55, label %65, label %56
56: ; preds = %53
%57 = load i32, i32* %11
%58 = icmp eq i32 %57, 1
br i1 %58, label %65, label %59
59: ; preds = %56
%60 = load i32, i32* %8
%61 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%62 = call i32 @strlen(i8* %61)
%63 = sub nsw i32 %62, 1
%64 = icmp eq i32 %60, %63
br i1 %64, label %65, label %68
65: ; preds = %59, %56, %53
%66 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%67 = call i32 @exit(i32 0)
unreachable
68: ; preds = %59
store i32 0, i32* %7
br label %69
69: ; preds = %82, %68
%70 = load i32, i32* %7
%71 = load i32, i32* %8
%72 = icmp sle i32 %70, %71
br i1 %72, label %73, label %85
73: ; preds = %69
%74 = load i32, i32* %7
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %75
%77 = load i8, i8* %76
%78 = load i32, i32* %9
%79 = add nsw i32 %78, 1
store i32 %79, i32* %9
%80 = sext i32 %78 to i64
%81 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %80
store i8 %77, i8* %81
br label %82
82: ; preds = %73
%83 = load i32, i32* %7
%84 = add nsw i32 %83, 1
store i32 %84, i32* %7
br label %69
85: ; preds = %69
%86 = load i32, i32* %9
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %87
store i8 0, i8* %88
store i32 0, i32* %9
%89 = load i32, i32* %8
%90 = add nsw i32 %89, 1
store i32 %90, i32* %7
br label %91
91: ; preds = %105, %85
%92 = load i32, i32* %7
%93 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%94 = call i32 @strlen(i8* %93)
%95 = icmp slt i32 %92, %94
br i1 %95, label %96, label %108
96: ; preds = %91
%97 = load i32, i32* %7
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = load i32, i32* %9
%102 = add nsw i32 %101, 1
store i32 %102, i32* %9
%103 = sext i32 %101 to i64
%104 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %103
store i8 %100, i8* %104
br label %105
105: ; preds = %96
%106 = load i32, i32* %7
%107 = add nsw i32 %106, 1
store i32 %107, i32* %7
br label %91
108: ; preds = %91
%109 = load i32, i32* %9
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %110
store i8 0, i8* %111
store i32 0, i32* %7
br label %112
112: ; preds = %305, %108
%113 = load i32, i32* %7
%114 = load i32, i32* %8
%115 = icmp sle i32 %113, %114
br i1 %115, label %116, label %308
116: ; preds = %112
%117 = load i32, i32* %7
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %118
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %121, 32
br i1 %122, label %123, label %294
123: ; preds = %116
%124 = load i32, i32* %10
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %125
store i8 0, i8* %126
%127 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%128 = call i32 @strcmp(i8* %127, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%129 = icmp ne i32 %128, 0
br i1 %129, label %178, label %130
130: ; preds = %123
%131 = call i64 @malloc(i32 8)
%132 = inttoptr i64 %131 to i8*
%133 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
store i8* %132, i8** %133
%134 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
%135 = load i8*, i8** %134
%136 = call i32 @strcpy(i8* %135, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%137 = load i32, i32* %9
%138 = add nsw i32 %137, 1
%139 = sext i32 %138 to i64
%140 = mul i64 %139, 1
%141 = trunc i64 %140 to i32
%142 = call i64 @malloc(i32 %141)
%143 = inttoptr i64 %142 to i8*
%144 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 1
store i8* %143, i8** %144
%145 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 1
%146 = load i8*, i8** %145
%147 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%148 = call i32 @strcpy(i8* %146, i8* %147)
%149 = call i64 @malloc(i32 10)
%150 = inttoptr i64 %149 to i8*
%151 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 2
store i8* %150, i8** %151
%152 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 2
%153 = load i8*, i8** %152
%154 = load i32, i32* %7
%155 = call i32 @sprintf(i8* %153, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %154)
%156 = call i64 @malloc(i32 10)
%157 = inttoptr i64 %156 to i8*
%158 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 3
store i8* %157, i8** %158
%159 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 3
%160 = load i8*, i8** %159
%161 = load i32, i32* %8
%162 = call i32 @sprintf(i8* %160, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %161)
%163 = load i32, i32* %8
%164 = sext i32 %163 to i64
%165 = mul i64 %164, 1
%166 = trunc i64 %165 to i32
%167 = call i64 @malloc(i32 %166)
%168 = inttoptr i64 %167 to i8*
%169 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 4
store i8* %168, i8** %169
%170 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 4
%171 = load i8*, i8** %170
%172 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%173 = call i32 @strcpy(i8* %171, i8* %172)
%174 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 5
store i8* null, i8** %174
%175 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
%176 = call i32 @execvp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %175)
%177 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
br label %293
178: ; preds = %123
%179 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%180 = call i32 @strcmp(i8* %179, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%181 = icmp ne i32 %180, 0
br i1 %181, label %230, label %182
182: ; preds = %178
%183 = call i64 @malloc(i32 8)
%184 = inttoptr i64 %183 to i8*
%185 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
store i8* %184, i8** %185
%186 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
%187 = load i8*, i8** %186
%188 = call i32 @strcpy(i8* %187, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%189 = load i32, i32* %9
%190 = add nsw i32 %189, 1
%191 = sext i32 %190 to i64
%192 = mul i64 %191, 1
%193 = trunc i64 %192 to i32
%194 = call i64 @malloc(i32 %193)
%195 = inttoptr i64 %194 to i8*
%196 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 1
store i8* %195, i8** %196
%197 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 1
%198 = load i8*, i8** %197
%199 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%200 = call i32 @strcpy(i8* %198, i8* %199)
%201 = call i64 @malloc(i32 10)
%202 = inttoptr i64 %201 to i8*
%203 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 2
store i8* %202, i8** %203
%204 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 2
%205 = load i8*, i8** %204
%206 = load i32, i32* %7
%207 = call i32 @sprintf(i8* %205, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %206)
%208 = call i64 @malloc(i32 10)
%209 = inttoptr i64 %208 to i8*
%210 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 3
store i8* %209, i8** %210
%211 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 3
%212 = load i8*, i8** %211
%213 = load i32, i32* %8
%214 = call i32 @sprintf(i8* %212, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %213)
%215 = load i32, i32* %8
%216 = sext i32 %215 to i64
%217 = mul i64 %216, 1
%218 = trunc i64 %217 to i32
%219 = call i64 @malloc(i32 %218)
%220 = inttoptr i64 %219 to i8*
%221 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 4
store i8* %220, i8** %221
%222 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 4
%223 = load i8*, i8** %222
%224 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%225 = call i32 @strcpy(i8* %223, i8* %224)
%226 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 5
store i8* null, i8** %226
%227 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
%228 = call i32 @execvp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8** %227)
%229 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
br label %292
230: ; preds = %178
%231 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%232 = call i32 @strcmp(i8* %231, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%233 = icmp ne i32 %232, 0
br i1 %233, label %282, label %234
234: ; preds = %230
%235 = call i64 @malloc(i32 8)
%236 = inttoptr i64 %235 to i8*
%237 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
store i8* %236, i8** %237
%238 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
%239 = load i8*, i8** %238
%240 = call i32 @strcpy(i8* %239, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%241 = load i32, i32* %9
%242 = add nsw i32 %241, 1
%243 = sext i32 %242 to i64
%244 = mul i64 %243, 1
%245 = trunc i64 %244 to i32
%246 = call i64 @malloc(i32 %245)
%247 = inttoptr i64 %246 to i8*
%248 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 1
store i8* %247, i8** %248
%249 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 1
%250 = load i8*, i8** %249
%251 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%252 = call i32 @strcpy(i8* %250, i8* %251)
%253 = call i64 @malloc(i32 10)
%254 = inttoptr i64 %253 to i8*
%255 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 2
store i8* %254, i8** %255
%256 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 2
%257 = load i8*, i8** %256
%258 = load i32, i32* %7
%259 = call i32 @sprintf(i8* %257, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %258)
%260 = call i64 @malloc(i32 10)
%261 = inttoptr i64 %260 to i8*
%262 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 3
store i8* %261, i8** %262
%263 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 3
%264 = load i8*, i8** %263
%265 = load i32, i32* %8
%266 = call i32 @sprintf(i8* %264, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %265)
%267 = load i32, i32* %8
%268 = sext i32 %267 to i64
%269 = mul i64 %268, 1
%270 = trunc i64 %269 to i32
%271 = call i64 @malloc(i32 %270)
%272 = inttoptr i64 %271 to i8*
%273 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 4
store i8* %272, i8** %273
%274 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 4
%275 = load i8*, i8** %274
%276 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%277 = call i32 @strcpy(i8* %275, i8* %276)
%278 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 5
store i8* null, i8** %278
%279 = getelementptr inbounds [6 x i8*], [6 x i8*]* %6, i64 0, i64 0
%280 = call i32 @execvp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8** %279)
%281 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.6, i64 0, i64 0))
br label %291
282: ; preds = %230
%283 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%284 = call i32 @strlen(i8* %283)
%285 = icmp ne i32 %284, 0
br i1 %285, label %286, label %290
286: ; preds = %282
%287 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%288 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i8* %287)
%289 = call i32 @exit(i32 0)
unreachable
290: ; preds = %282
br label %291
291: ; preds = %290, %234
br label %292
292: ; preds = %291, %182
br label %293
293: ; preds = %292, %130
br label %304
294: ; preds = %116
%295 = load i32, i32* %7
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 %296
%298 = load i8, i8* %297
%299 = load i32, i32* %10
%300 = sext i32 %299 to i64
%301 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %300
store i8 %298, i8* %301
%302 = load i32, i32* %10
%303 = add nsw i32 %302, 1
store i32 %303, i32* %10
br label %304
304: ; preds = %294, %293
br label %305
305: ; preds = %304
%306 = load i32, i32* %7
%307 = add nsw i32 %306, 1
store i32 %307, i32* %7
br label %112
308: ; preds = %112
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"%[^\0A]s\00"
@.str.2 = [23 x i8] c"Insufficient Arguments\00"
@.str.3 = [6 x i8] c"twice\00"
@.str.4 = [8 x i8] c"./twice\00"
@.str.5 = [3 x i8] c"%d\00"
@.str.7 = [7 x i8] c"square\00"
@.str.8 = [9 x i8] c"./square\00"
@.str.9 = [5 x i8] c"half\00"
@.str.10 = [7 x i8] c"./half\00"
@.str.11 = [32 x i8] c"Error! No such %s Process Exist\00"
@str = [45 x i8] c"Enter the combination of programs to be used\00"
@str.14 = [51 x i8] c"This statement is not executed if execvp succeeds.\00"
define i32 @main() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca [100 x i8]
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%7 = alloca [6 x i8*]
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%12 = bitcast [6 x i8*]* %7 to i8*
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%14 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %8)
%15 = call i32 @strlen(i8* %8)
%16 = add nsw i32 %15, -1
%17 = icmp sgt i32 %15, 0
br i1 %17, label %18, label %30
18: ; preds = %0, %24
%19 = phi i32 [ %27, %24 ], [ %16, %0 ]
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %20
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 32
br i1 %23, label %32, label %24
24: ; preds = %18
%25 = add i8 %22, -48
%26 = icmp ult i8 %25, 10
%27 = add nsw i32 %19, -1
%28 = icmp sgt i32 %19, 0
%29 = select i1 %26, i1 %28, i1 false
br i1 %29, label %18, label %42
30: ; preds = %0
%31 = icmp eq i32 %15, 0
br i1 %31, label %42, label %32
32: ; preds = %18, %30
%33 = phi i32 [ %16, %30 ], [ %19, %18 ]
%34 = call i32 @strlen(i8* %8)
%35 = add nsw i32 %34, -1
%36 = icmp eq i32 %33, %35
br i1 %36, label %42, label %37
37: ; preds = %32
%38 = icmp slt i32 %33, 0
br i1 %38, label %45, label %39
39: ; preds = %37
%40 = zext i32 %33 to i64
%41 = add nuw nsw i64 %40, 1
br label %45
42: ; preds = %24, %32, %30
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.2, i64 0, i64 0))
%44 = call i32 @exit(i32 0)
unreachable
45: ; preds = %37, %39
%46 = phi i64 [ %41, %39 ], [ 0, %37 ]
%47 = add nsw i32 %33, 1
%48 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 %46
store i8 0, i8* %48
%49 = call i32 @strlen(i8* %8)
%50 = icmp slt i32 %47, %49
br i1 %50, label %51, label %66
51: ; preds = %45
%52 = sext i32 %47 to i64
br label %53
53: ; preds = %51, %53
%54 = phi i64 [ 0, %51 ], [ %58, %53 ]
%55 = phi i64 [ %52, %51 ], [ %60, %53 ]
%56 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = add nuw nsw i64 %54, 1
%59 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %54
store i8 %57, i8* %59
%60 = add nsw i64 %55, 1
%61 = call i32 @strlen(i8* %8)
%62 = sext i32 %61 to i64
%63 = icmp slt i64 %60, %62
br i1 %63, label %53, label %64
64: ; preds = %53
%65 = trunc i64 %58 to i32
br label %66
66: ; preds = %64, %45
%67 = phi i32 [ 0, %45 ], [ %65, %64 ]
%68 = zext i32 %67 to i64
%69 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 %68
store i8 0, i8* %69
br i1 %38, label %165, label %70
70: ; preds = %66
%71 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i64 0, i64 0
%72 = add nuw nsw i32 %67, 1
%73 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i64 0, i64 1
%74 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i64 0, i64 2
%75 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i64 0, i64 3
%76 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i64 0, i64 4
%77 = getelementptr inbounds [6 x i8*], [6 x i8*]* %7, i64 0, i64 5
%78 = zext i32 %47 to i64
br label %79
79: ; preds = %70, %161
%80 = phi i64 [ 0, %70 ], [ %163, %161 ]
%81 = phi i32 [ 0, %70 ], [ %162, %161 ]
%82 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 %80
%83 = load i8, i8* %82
%84 = icmp eq i8 %83, 32
%85 = sext i32 %81 to i64
%86 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 %85
br i1 %84, label %87, label %159
87: ; preds = %79
store i8 0, i8* %86
%88 = call i32 @bcmp(i8* dereferenceable(6) %10, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 6)
%89 = icmp eq i32 %88, 0
br i1 %89, label %90, label %109
90: ; preds = %87
%91 = call i64 @malloc(i32 8)
%92 = inttoptr i64 %91 to i8*
store i8* %92, i8** %71
%93 = call i32 @strcpy(i8* %92, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%94 = call i64 @malloc(i32 %72)
%95 = inttoptr i64 %94 to i8*
store i8* %95, i8** %73
%96 = call i32 @strcpy(i8* %95, i8* %9)
%97 = call i64 @malloc(i32 10)
%98 = inttoptr i64 %97 to i8*
store i8* %98, i8** %74
%99 = trunc i64 %80 to i32
%100 = call i32 @sprintf(i8* dereferenceable(1) %98, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %99)
%101 = call i64 @malloc(i32 10)
%102 = inttoptr i64 %101 to i8*
store i8* %102, i8** %75
%103 = call i32 @sprintf(i8* dereferenceable(1) %102, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %33)
%104 = call i64 @malloc(i32 %33)
%105 = inttoptr i64 %104 to i8*
store i8* %105, i8** %76
%106 = call i32 @strcpy(i8* %105, i8* %11)
store i8* null, i8** %77
%107 = call i32 @execvp(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8** %71)
%108 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.14, i64 0, i64 0))
br label %161
109: ; preds = %87
%110 = call i32 @bcmp(i8* dereferenceable(7) %10, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i64 7)
%111 = icmp eq i32 %110, 0
br i1 %111, label %112, label %131
112: ; preds = %109
%113 = call i64 @malloc(i32 8)
%114 = inttoptr i64 %113 to i8*
store i8* %114, i8** %71
%115 = call i32 @strcpy(i8* %114, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%116 = call i64 @malloc(i32 %72)
%117 = inttoptr i64 %116 to i8*
store i8* %117, i8** %73
%118 = call i32 @strcpy(i8* %117, i8* %9)
%119 = call i64 @malloc(i32 10)
%120 = inttoptr i64 %119 to i8*
store i8* %120, i8** %74
%121 = trunc i64 %80 to i32
%122 = call i32 @sprintf(i8* dereferenceable(1) %120, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %121)
%123 = call i64 @malloc(i32 10)
%124 = inttoptr i64 %123 to i8*
store i8* %124, i8** %75
%125 = call i32 @sprintf(i8* dereferenceable(1) %124, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %33)
%126 = call i64 @malloc(i32 %33)
%127 = inttoptr i64 %126 to i8*
store i8* %127, i8** %76
%128 = call i32 @strcpy(i8* %127, i8* %11)
store i8* null, i8** %77
%129 = call i32 @execvp(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0), i8** %71)
%130 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.14, i64 0, i64 0))
br label %161
131: ; preds = %109
%132 = call i32 @bcmp(i8* dereferenceable(5) %10, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0), i64 5)
%133 = icmp eq i32 %132, 0
br i1 %133, label %134, label %153
134: ; preds = %131
%135 = call i64 @malloc(i32 8)
%136 = inttoptr i64 %135 to i8*
store i8* %136, i8** %71
%137 = call i32 @strcpy(i8* %136, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.8, i64 0, i64 0))
%138 = call i64 @malloc(i32 %72)
%139 = inttoptr i64 %138 to i8*
store i8* %139, i8** %73
%140 = call i32 @strcpy(i8* %139, i8* %9)
%141 = call i64 @malloc(i32 10)
%142 = inttoptr i64 %141 to i8*
store i8* %142, i8** %74
%143 = trunc i64 %80 to i32
%144 = call i32 @sprintf(i8* dereferenceable(1) %142, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %143)
%145 = call i64 @malloc(i32 10)
%146 = inttoptr i64 %145 to i8*
store i8* %146, i8** %75
%147 = call i32 @sprintf(i8* dereferenceable(1) %146, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 %33)
%148 = call i64 @malloc(i32 %33)
%149 = inttoptr i64 %148 to i8*
store i8* %149, i8** %76
%150 = call i32 @strcpy(i8* %149, i8* %11)
store i8* null, i8** %77
%151 = call i32 @execvp(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0), i8** %71)
%152 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([51 x i8], [51 x i8]* @str.14, i64 0, i64 0))
br label %161
153: ; preds = %131
%154 = call i32 @strlen(i8* %10)
%155 = icmp eq i32 %154, 0
br i1 %155, label %161, label %156
156: ; preds = %153
%157 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.11, i64 0, i64 0), i8* %10)
%158 = call i32 @exit(i32 0)
unreachable
159: ; preds = %79
store i8 %83, i8* %86
%160 = add nsw i32 %81, 1
br label %161
161: ; preds = %159, %112, %153, %134, %90
%162 = phi i32 [ %81, %153 ], [ %81, %134 ], [ %81, %112 ], [ %81, %90 ], [ %160, %159 ]
%163 = add nuw nsw i64 %80, 1
%164 = icmp eq i64 %163, %78
br i1 %164, label %165, label %79
165: ; preds = %161, %66
ret i32 0
}