#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 scalar_t__ pid_t;

/* Variables and functions */
int SHRT_MAX;
int execlp(char *, char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ exit(int);
scalar_t__ fork();
char getchar();
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int /*<<< orphan*/ system(char *);
int /*<<< orphan*/ waitpid(scalar_t__, int *, int /*<<< orphan*/);
void main() {
  char c;
  char input[SHRT_MAX], prompt[SHRT_MAX];
  int lock, sprompt, i;
  prompt[0] = '>';
  while (1) {
    printf("%s ", prompt);
    for (i = 0; i < SHRT_MAX; i++) {
      input[i] = '\0';
    }
    i = 0;
    do {
      c = getchar();
      input[i++] = c;
    } while (c != '\n');
    if (input[0] == '\n') {
      system("clear");
    } else {
      if ((input[0] == 'Q' || input[0] == 'q') &&
          (input[1] == '\n' || input[1] == '\0')) {
        exit(0);
      } else if ((input[0] == 'Q' || input[0] == 'q') &&
                 (input[1] == 'U' || input[1] == 'u') &&
                 (input[2] == 'I' || input[2] == 'i') &&
                 (input[3] == 'T' || input[3] == 't') && (input[4] == '\n')) {
        exit(0);
      }
      if ((input[0] == 't') && (input[1] == 'l') && (input[2] == 'o') &&
          (input[3] == 'c') && (input[4] == 'k') && (input[5] == '\n')) {
        while (1) {
          for (i = 0; i < SHRT_MAX; i++) {
            input[i] = '\0';
          }
          lock = 0;
          printf("unlock: ");
          i = 0;
          do {
            c = getchar();
            input[i++] = c;
          } while (c != '\n');
          if ((input[0] == "NOTSOSECRET"[0]) &&
              (input[1] == "NOTSOSECRET"[1]) &&
              (input[2] == "NOTSOSECRET"[2]) &&
              (input[3] == "NOTSOSECRET"[3]) &&
              (input[4] == "NOTSOSECRET"[4]) &&
              (input[5] == "NOTSOSECRET"[5]) &&
              (input[6] == "NOTSOSECRET"[6]) &&
              (input[7] == "NOTSOSECRET"[7]) &&
              (input[8] == "NOTSOSECRET"[8]) &&
              (input[9] == "NOTSOSECRET"[9]) &&
              (input[10] == "NOTSOSECRET"[10]) && (input[11] == '\n')) {
            lock = 1;
          }
          if (lock == 1) {
            break;
          }
        }
      }
      if ((input[0] == 'c') && (input[1] == 'p') && (input[2] == 'r') &&
          (input[3] == 'o') && (input[4] == 'm') && (input[5] == 'p') &&
          (input[6] == 't')) {
        int j = 0;
        if (input[7] == ' ') {
          i = 8;
        } else {
          i = 7;
        }
        for (i; i < SHRT_MAX; i++) {
          prompt[j] = input[i];
          if (prompt[j] == '\n') {
            prompt[j] = '\0';
          }
          j++;
        }
        sprompt = 1;
      } else if ((input[0] == 'd') && (input[1] == 'p') && (input[2] == 'r') &&
                 (input[3] == 'o') && (input[4] == 'm') && (input[5] == 'p') &&
                 (input[6] == 't')) {
        prompt[0] = '>';
        for (i = 1; i < SHRT_MAX; i++) {
          prompt[i] = '\0';
        }
        sprompt = 1;
      }
      pid_t pid1;
      int status, len;
      if (lock == 0 && sprompt == 0) {
        len = strlen(input);
        input[len - 1] = '\0';
        pid1 = fork();
        if (pid1 == 0) {
          if (execlp(input, input, NULL) == -1) {
            printf("command not found: %s\n", input);
            exit(1);
          }
        } else {
          waitpid(pid1, &status, 0);
        }
      }
      lock = 0;
      sprompt = 0;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    0x2e51(%rip),%rax
mov    (%rax),%ecx
mov    %rsp,%rdx
mov    %rdx,-0x10(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x50(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,%ecx
mov    %rcx,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,-0x48(%rbp)
mov    %rax,%rsp
mov    %rcx,-0x20(%rbp)
movb   $0x3e,(%rax)
jmp    11dc <main+0x5c>
mov    -0x48(%rbp),%rsi
lea    0xe19(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    0x2de1(%rip),%rcx
cmp    (%rcx),%eax
jge    1221 <main+0xa1>
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    11f5 <main+0x75>
movl   $0x0,-0x2c(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,%cl
mov    -0x50(%rbp),%rax
mov    %cl,-0x1(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x2c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x2c(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1228 <main+0xa8>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    127a <main+0xfa>
lea    0xd94(%rip),%rdi
call   1040 <system@plt>
jmp    17ec <main+0x66c>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x51,%eax
je     129a <main+0x11a>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x71,%eax
jne    12c3 <main+0x143>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0xa,%eax
je     12bc <main+0x13c>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    12c3 <main+0x143>
xor    %edi,%edi
call   1080 <exit@plt>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x51,%eax
je     12e3 <main+0x163>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x71,%eax
jne    1361 <main+0x1e1>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x55,%eax
je     1305 <main+0x185>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x75,%eax
jne    1361 <main+0x1e1>
mov    -0x50(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x49,%eax
je     1327 <main+0x1a7>
mov    -0x50(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x69,%eax
jne    1361 <main+0x1e1>
mov    -0x50(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x54,%eax
je     1349 <main+0x1c9>
mov    -0x50(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x74,%eax
jne    1361 <main+0x1e1>
mov    -0x50(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0xa,%eax
jne    1361 <main+0x1e1>
xor    %edi,%edi
call   1080 <exit@plt>
jmp    1366 <main+0x1e6>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x74,%eax
jne    1582 <main+0x402>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6c,%eax
jne    1582 <main+0x402>
mov    -0x50(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x6f,%eax
jne    1582 <main+0x402>
mov    -0x50(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x63,%eax
jne    1582 <main+0x402>
mov    -0x50(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x6b,%eax
jne    1582 <main+0x402>
mov    -0x50(%rbp),%rax
movsbl 0x5(%rax),%eax
cmp    $0xa,%eax
jne    1582 <main+0x402>
jmp    13d0 <main+0x250>
jmp    13d5 <main+0x255>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    0x2bfa(%rip),%rcx
cmp    (%rcx),%eax
jge    1408 <main+0x288>
mov    -0x50(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    13dc <main+0x25c>
movl   $0x0,-0x24(%rbp)
lea    0xbf4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x2c(%rbp)
mov    $0x0,%al
call   1060 <getchar@plt>
mov    %al,%cl
mov    -0x50(%rbp),%rax
mov    %cl,-0x1(%rbp)
mov    -0x1(%rbp),%dl
mov    -0x2c(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x2c(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
jne    1424 <main+0x2a4>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
movsbl 0xbb0(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
movsbl 0xb9a(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x2(%rax),%eax
movsbl 0xb84(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x3(%rax),%eax
movsbl 0xb6e(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x4(%rax),%eax
movsbl 0xb58(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x5(%rax),%eax
movsbl 0xb42(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x6(%rax),%eax
movsbl 0xb2c(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x7(%rax),%eax
movsbl 0xb16(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x8(%rax),%eax
movsbl 0xb00(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0x9(%rax),%eax
movsbl 0xaea(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0xa(%rax),%eax
movsbl 0xad4(%rip),%ecx
cmp    %ecx,%eax
jne    1569 <main+0x3e9>
mov    -0x50(%rbp),%rax
movsbl 0xb(%rax),%eax
cmp    $0xa,%eax
jne    1569 <main+0x3e9>
movl   $0x1,-0x24(%rbp)
cmpl   $0x1,-0x24(%rbp)
jne    1578 <main+0x3f8>
jmp    157d <main+0x3fd>
jmp    13d0 <main+0x250>
jmp    1582 <main+0x402>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x63,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x70,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x72,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x6f,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x6d,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movsbl 0x5(%rax),%eax
cmp    $0x70,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movsbl 0x6(%rax),%eax
cmp    $0x74,%eax
jne    168b <main+0x50b>
mov    -0x50(%rbp),%rax
movl   $0x0,-0x30(%rbp)
movsbl 0x7(%rax),%eax
cmp    $0x20,%eax
jne    161c <main+0x49c>
movl   $0x8,-0x2c(%rbp)
jmp    1623 <main+0x4a3>
movl   $0x7,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    0x29b3(%rip),%rcx
cmp    (%rcx),%eax
jge    167f <main+0x4ff>
mov    -0x48(%rbp),%rax
mov    -0x50(%rbp),%rcx
movslq -0x2c(%rbp),%rdx
mov    (%rcx,%rdx,1),%dl
movslq -0x30(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
movslq -0x30(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1668 <main+0x4e8>
mov    -0x48(%rbp),%rax
movslq -0x30(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x30(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x30(%rbp)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1623 <main+0x4a3>
movl   $0x1,-0x28(%rbp)
jmp    1747 <main+0x5c7>
mov    -0x50(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x64,%eax
jne    1742 <main+0x5c2>
mov    -0x50(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x70,%eax
jne    1742 <main+0x5c2>
mov    -0x50(%rbp),%rax
movsbl 0x2(%rax),%eax
cmp    $0x72,%eax
jne    1742 <main+0x5c2>
mov    -0x50(%rbp),%rax
movsbl 0x3(%rax),%eax
cmp    $0x6f,%eax
jne    1742 <main+0x5c2>
mov    -0x50(%rbp),%rax
movsbl 0x4(%rax),%eax
cmp    $0x6d,%eax
jne    1742 <main+0x5c2>
mov    -0x50(%rbp),%rax
movsbl 0x5(%rax),%eax
cmp    $0x70,%eax
jne    1742 <main+0x5c2>
mov    -0x50(%rbp),%rax
movsbl 0x6(%rax),%eax
cmp    $0x74,%eax
jne    1742 <main+0x5c2>
mov    -0x48(%rbp),%rax
movb   $0x3e,(%rax)
movl   $0x1,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    0x28c7(%rip),%rcx
cmp    (%rcx),%eax
jge    173b <main+0x5bb>
mov    -0x48(%rbp),%rax
movslq -0x2c(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    170f <main+0x58f>
movl   $0x1,-0x28(%rbp)
jmp    1747 <main+0x5c7>
cmpl   $0x0,-0x24(%rbp)
jne    17de <main+0x65e>
cmpl   $0x0,-0x28(%rbp)
jne    17de <main+0x65e>
mov    -0x50(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x50(%rbp),%rax
mov    %ecx,-0x40(%rbp)
mov    -0x40(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    $0x0,%al
call   10a0 <fork@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    17ca <main+0x64a>
mov    -0x50(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edx
mov    %rsi,%rdi
call   1090 <execlp@plt>
cmp    $0xffffffff,%eax
jne    17c5 <main+0x645>
mov    -0x50(%rbp),%rsi
lea    0x86b(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
call   1080 <exit@plt>
jmp    17d9 <main+0x659>
mov    -0x38(%rbp),%rdi
lea    -0x3c(%rbp),%rsi
xor    %edx,%edx
call   1070 <waitpid@plt>
jmp    17de <main+0x65e>
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
jmp    11d7 <main+0x57>

x86 assembly (clang, -O2):
<main>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    0x2e38(%rip),%r15
mov    (%r15),%eax
mov    %rsp,%r12
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r12
mov    %r12,%rsp
mov    %rsp,%r14
sub    %rax,%r14
mov    %r14,%rsp
movb   $0x3e,(%r14)
lea    0x1(%r14),%rax
mov    %rax,-0x30(%rbp)
lea    0xf66(%rip),%r13
jmp    120e <main+0x7e>
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
call   1030 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r12,1)
xor    %eax,%eax
call   10b0 <fork@plt>
test   %rax,%rax
je     1360 <main+0x1d0>
mov    %rax,%rdi
lea    -0x34(%rbp),%rsi
xor    %edx,%edx
call   1080 <waitpid@plt>
lea    0xf1f(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15),%edx
test   %edx,%edx
jle    1230 <main+0xa0>
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r12,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
xor    %eax,%eax
call   1070 <getchar@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1240 <main+0xb0>
mov    (%r12),%sil
lea    -0x51(%rsi),%ecx
cmp    $0x23,%cl
ja     13f0 <main+0x260>
movzbl %cl,%edx
lea    0xdb5(%rip),%rdi
movslq (%rdi,%rdx,4),%rax
add    %rdi,%rax
jmp    *%rax
mov    0x1(%r12),%al
cmp    $0xa,%al
je     168e <main+0x4fe>
test   %al,%al
je     168e <main+0x4fe>
cmp    $0x20,%cl
ja     11e0 <main+0x50>
lea    0xe17(%rip),%rdi
movslq (%rdi,%rdx,4),%rcx
add    %rdi,%rcx
jmp    *%rcx
or     $0x20,%al
cmp    $0x75,%al
jne    12ca <main+0x13a>
mov    0x2(%r12),%al
or     $0x20,%al
cmp    $0x69,%al
jne    12ca <main+0x13a>
mov    0x3(%r12),%al
or     $0x20,%al
cmp    $0x74,%al
jne    12ca <main+0x13a>
cmpb   $0xa,0x4(%r12)
je     168e <main+0x4fe>
cmp    $0x64,%sil
je     1380 <main+0x1f0>
cmp    $0x63,%sil
jne    11e0 <main+0x50>
xchg   %ax,%ax
cmpb   $0x70,0x1(%r12)
jne    11e0 <main+0x50>
cmpb   $0x72,0x2(%r12)
jne    11e0 <main+0x50>
cmpb   $0x6f,0x3(%r12)
jne    11e0 <main+0x50>
cmpb   $0x6d,0x4(%r12)
jne    11e0 <main+0x50>
cmpb   $0x70,0x5(%r12)
jne    11e0 <main+0x50>
cmpb   $0x74,0x6(%r12)
jne    11e0 <main+0x50>
xor    %ecx,%ecx
cmpb   $0x20,0x7(%r12)
sete   %cl
add    $0x7,%ecx
mov    (%r15),%eax
sub    %ecx,%eax
mov    $0x0,%r9d
jle    120e <main+0x7e>
mov    %ecx,%edx
cmp    $0x8,%eax
jae    14ed <main+0x35d>
mov    %rdx,%rsi
xor    %ecx,%ecx
jmp    1657 <main+0x4c7>
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r12,%rsi
xor    %edx,%edx
call   10a0 <execlp@plt>
cmp    $0xffffffff,%eax
jne    120e <main+0x7e>
jmp    1695 <main+0x505>
nopl   0x0(%rax,%rax,1)
cmpb   $0x70,0x1(%r12)
jne    11e0 <main+0x50>
cmpb   $0x72,0x2(%r12)
jne    11e0 <main+0x50>
cmpb   $0x6f,0x3(%r12)
jne    11e0 <main+0x50>
cmpb   $0x6d,0x4(%r12)
jne    11e0 <main+0x50>
cmpb   $0x70,0x5(%r12)
jne    11e0 <main+0x50>
cmpb   $0x74,0x6(%r12)
jne    11e0 <main+0x50>
movb   $0x3e,(%r14)
mov    (%r15),%edx
cmp    $0x2,%edx
jl     120e <main+0x7e>
add    $0xffffffff,%edx
mov    -0x30(%rbp),%rdi
xor    %esi,%esi
call   1060 <memset@plt>
jmp    120e <main+0x7e>
nopl   0x0(%rax,%rax,1)
cmp    $0xa,%sil
jne    11e0 <main+0x50>
lea    0xd37(%rip),%rdi
call   1040 <system@plt>
jmp    120e <main+0x7e>
cmpb   $0x6c,0x1(%r12)
jne    11e0 <main+0x50>
cmpb   $0x6f,0x2(%r12)
jne    11e0 <main+0x50>
cmpb   $0x63,0x3(%r12)
jne    11e0 <main+0x50>
cmpb   $0x6b,0x4(%r12)
jne    11e0 <main+0x50>
cmpb   $0xa,0x5(%r12)
jne    11e0 <main+0x50>
nopw   0x0(%rax,%rax,1)
mov    (%r15),%edx
test   %edx,%edx
jle    1461 <main+0x2d1>
mov    %r12,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r12,%rbx
xchg   %ax,%ax
xor    %eax,%eax
call   1070 <getchar@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
cmp    $0xa,%al
jne    1470 <main+0x2e0>
cmpb   $0x4e,(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x4f,0x1(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x54,0x2(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x53,0x3(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x4f,0x4(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x53,0x5(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x45,0x6(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x43,0x7(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x52,0x8(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x45,0x9(%r12)
jne    1450 <main+0x2c0>
cmpb   $0x54,0xa(%r12)
jne    1450 <main+0x2c0>
cmpb   $0xa,0xb(%r12)
jne    1450 <main+0x2c0>
jmp    120e <main+0x7e>
cmp    $0x20,%eax
jae    14f9 <main+0x369>
xor    %ecx,%ecx
jmp    15f7 <main+0x467>
mov    %eax,%ecx
and    $0xffffffe0,%ecx
lea    -0x20(%rcx),%rsi
mov    %rsi,%r8
shr    $0x5,%r8
add    $0x1,%r8
test   %rsi,%rsi
je     163b <main+0x4ab>
mov    %r8,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ebx,%ebx
movdqa 0xad9(%rip),%xmm3
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rsi
or     %rdx,%rsi
movdqu (%r12,%rsi,1),%xmm0
movdqu 0x10(%r12,%rsi,1),%xmm1
movdqa %xmm0,%xmm2
pcmpeqb %xmm3,%xmm2
pandn  %xmm0,%xmm2
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
pandn  %xmm1,%xmm0
movdqa %xmm2,(%r14,%rbx,1)
movdqa %xmm0,0x10(%r14,%rbx,1)
lea    0x20(%rbx),%rsi
or     %rdx,%rsi
movdqu (%r12,%rsi,1),%xmm0
movdqu 0x10(%r12,%rsi,1),%xmm1
movdqa %xmm0,%xmm2
pcmpeqb %xmm3,%xmm2
pandn  %xmm0,%xmm2
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
pandn  %xmm1,%xmm0
movdqa %xmm2,0x20(%r14,%rbx,1)
movdqa %xmm0,0x30(%r14,%rbx,1)
add    $0x40,%rbx
add    $0xfffffffffffffffe,%rdi
jne    1530 <main+0x3a0>
test   $0x1,%r8b
je     15ea <main+0x45a>
mov    %rbx,%rsi
or     %rdx,%rsi
movdqu (%r12,%rsi,1),%xmm0
movdqu 0x10(%r12,%rsi,1),%xmm1
movdqa %xmm0,%xmm2
pcmpeqb %xmm3,%xmm2
pandn  %xmm0,%xmm2
movdqa %xmm1,%xmm0
pcmpeqb %xmm3,%xmm0
pandn  %xmm1,%xmm0
movdqa %xmm2,(%r14,%rbx,1)
movdqa %xmm0,0x10(%r14,%rbx,1)
cmp    %rax,%rcx
je     120e <main+0x7e>
test   $0x18,%al
je     1651 <main+0x4c1>
movdqa 0xa11(%rip),%xmm2
mov    %rcx,%rdi
mov    %eax,%ecx
and    $0xfffffff8,%ecx
lea    (%rcx,%rdx,1),%rsi
add    %r12,%rdx
xchg   %ax,%ax
movq   (%rdx,%rdi,1),%xmm0
movdqa %xmm0,%xmm1
pcmpeqb %xmm2,%xmm1
pandn  %xmm0,%xmm1
movq   %xmm1,(%r14,%rdi,1)
add    $0x8,%rdi
cmp    %rdi,%rcx
jne    1610 <main+0x480>
cmp    %rax,%rcx
je     120e <main+0x7e>
jmp    1657 <main+0x4c7>
xor    %ebx,%ebx
movdqa 0x9bb(%rip),%xmm3
test   $0x1,%r8b
jne    15b2 <main+0x422>
jmp    15ea <main+0x45a>
or     %rcx,%rdx
mov    %rdx,%rsi
add    %r12,%rsi
lea    (%r14,%rcx,1),%rdx
sub    %rcx,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%rsi,%rcx,1),%edi
cmp    $0xa,%dil
cmove  %r9d,%edi
mov    %dil,(%rdx,%rcx,1)
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1670 <main+0x4e0>
jmp    120e <main+0x7e>
xor    %edi,%edi
call   1090 <exit@plt>
lea    0xaab(%rip),%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@SHRT_MAX = global i32 0
@.str = [4 x i8] c"%s \00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [9 x i8] c"unlock: \00"
@.str.3 = [12 x i8] c"NOTSOSECRET\00"
@.str.4 = [23 x i8] c"command not found: %s\0A\00"
define void @main() {
%1 = alloca i8
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i64
%10 = alloca i32
%11 = alloca i32
%12 = load i32, i32* @SHRT_MAX
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %2
%15 = alloca i8, i64 %13
store i64 %13, i64* %3
%16 = load i32, i32* @SHRT_MAX
%17 = zext i32 %16 to i64
%18 = alloca i8, i64 %17
store i64 %17, i64* %4
%19 = getelementptr inbounds i8, i8* %18, i64 0
store i8 62, i8* %19
br label %20
20: ; preds = %419, %0
br label %21
21: ; preds = %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 0, i32* %7
br label %23
23: ; preds = %31, %21
%24 = load i32, i32* %7
%25 = load i32, i32* @SHRT_MAX
%26 = icmp slt i32 %24, %25
br i1 %26, label %27, label %34
27: ; preds = %23
%28 = load i32, i32* %7
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %15, i64 %29
store i8 0, i8* %30
br label %31
31: ; preds = %27
%32 = load i32, i32* %7
%33 = add nsw i32 %32, 1
store i32 %33, i32* %7
br label %23
34: ; preds = %23
store i32 0, i32* %7
br label %35
35: ; preds = %42, %34
%36 = call signext i8 (...) @getchar()
store i8 %36, i8* %1
%37 = load i8, i8* %1
%38 = load i32, i32* %7
%39 = add nsw i32 %38, 1
store i32 %39, i32* %7
%40 = sext i32 %38 to i64
%41 = getelementptr inbounds i8, i8* %15, i64 %40
store i8 %37, i8* %41
br label %42
42: ; preds = %35
%43 = load i8, i8* %1
%44 = sext i8 %43 to i32
%45 = icmp ne i32 %44, 10
br i1 %45, label %35, label %46
46: ; preds = %42
%47 = getelementptr inbounds i8, i8* %15, i64 0
%48 = load i8, i8* %47
%49 = sext i8 %48 to i32
%50 = icmp eq i32 %49, 10
br i1 %50, label %51, label %53
51: ; preds = %46
%52 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %419
53: ; preds = %46
%54 = getelementptr inbounds i8, i8* %15, i64 0
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 81
br i1 %57, label %63, label %58
58: ; preds = %53
%59 = getelementptr inbounds i8, i8* %15, i64 0
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 113
br i1 %62, label %63, label %75
63: ; preds = %58, %53
%64 = getelementptr inbounds i8, i8* %15, i64 1
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp eq i32 %66, 10
br i1 %67, label %73, label %68
68: ; preds = %63
%69 = getelementptr inbounds i8, i8* %15, i64 1
%70 = load i8, i8* %69
%71 = sext i8 %70 to i32
%72 = icmp eq i32 %71, 0
br i1 %72, label %73, label %75
73: ; preds = %68, %63
%74 = call i32 @exit(i32 0)
unreachable
75: ; preds = %68, %58
%76 = getelementptr inbounds i8, i8* %15, i64 0
%77 = load i8, i8* %76
%78 = sext i8 %77 to i32
%79 = icmp eq i32 %78, 81
br i1 %79, label %85, label %80
80: ; preds = %75
%81 = getelementptr inbounds i8, i8* %15, i64 0
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %83, 113
br i1 %84, label %85, label %122
85: ; preds = %80, %75
%86 = getelementptr inbounds i8, i8* %15, i64 1
%87 = load i8, i8* %86
%88 = sext i8 %87 to i32
%89 = icmp eq i32 %88, 85
br i1 %89, label %95, label %90
90: ; preds = %85
%91 = getelementptr inbounds i8, i8* %15, i64 1
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 117
br i1 %94, label %95, label %122
95: ; preds = %90, %85
%96 = getelementptr inbounds i8, i8* %15, i64 2
%97 = load i8, i8* %96
%98 = sext i8 %97 to i32
%99 = icmp eq i32 %98, 73
br i1 %99, label %105, label %100
100: ; preds = %95
%101 = getelementptr inbounds i8, i8* %15, i64 2
%102 = load i8, i8* %101
%103 = sext i8 %102 to i32
%104 = icmp eq i32 %103, 105
br i1 %104, label %105, label %122
105: ; preds = %100, %95
%106 = getelementptr inbounds i8, i8* %15, i64 3
%107 = load i8, i8* %106
%108 = sext i8 %107 to i32
%109 = icmp eq i32 %108, 84
br i1 %109, label %115, label %110
110: ; preds = %105
%111 = getelementptr inbounds i8, i8* %15, i64 3
%112 = load i8, i8* %111
%113 = sext i8 %112 to i32
%114 = icmp eq i32 %113, 116
br i1 %114, label %115, label %122
115: ; preds = %110, %105
%116 = getelementptr inbounds i8, i8* %15, i64 4
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = icmp eq i32 %118, 10
br i1 %119, label %120, label %122
120: ; preds = %115
%121 = call i32 @exit(i32 0)
unreachable
122: ; preds = %115, %110, %100, %90, %80
br label %123
123: ; preds = %122
%124 = getelementptr inbounds i8, i8* %15, i64 0
%125 = load i8, i8* %124
%126 = sext i8 %125 to i32
%127 = icmp eq i32 %126, 116
br i1 %127, label %128, label %269
128: ; preds = %123
%129 = getelementptr inbounds i8, i8* %15, i64 1
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = icmp eq i32 %131, 108
br i1 %132, label %133, label %269
133: ; preds = %128
%134 = getelementptr inbounds i8, i8* %15, i64 2
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp eq i32 %136, 111
br i1 %137, label %138, label %269
138: ; preds = %133
%139 = getelementptr inbounds i8, i8* %15, i64 3
%140 = load i8, i8* %139
%141 = sext i8 %140 to i32
%142 = icmp eq i32 %141, 99
br i1 %142, label %143, label %269
143: ; preds = %138
%144 = getelementptr inbounds i8, i8* %15, i64 4
%145 = load i8, i8* %144
%146 = sext i8 %145 to i32
%147 = icmp eq i32 %146, 107
br i1 %147, label %148, label %269
148: ; preds = %143
%149 = getelementptr inbounds i8, i8* %15, i64 5
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
%152 = icmp eq i32 %151, 10
br i1 %152, label %153, label %269
153: ; preds = %148
br label %154
154: ; preds = %267, %153
br label %155
155: ; preds = %154
store i32 0, i32* %7
br label %156
156: ; preds = %164, %155
%157 = load i32, i32* %7
%158 = load i32, i32* @SHRT_MAX
%159 = icmp slt i32 %157, %158
br i1 %159, label %160, label %167
160: ; preds = %156
%161 = load i32, i32* %7
%162 = sext i32 %161 to i64
%163 = getelementptr inbounds i8, i8* %15, i64 %162
store i8 0, i8* %163
br label %164
164: ; preds = %160
%165 = load i32, i32* %7
%166 = add nsw i32 %165, 1
store i32 %166, i32* %7
br label %156
167: ; preds = %156
store i32 0, i32* %5
%168 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %7
br label %169
169: ; preds = %176, %167
%170 = call signext i8 (...) @getchar()
store i8 %170, i8* %1
%171 = load i8, i8* %1
%172 = load i32, i32* %7
%173 = add nsw i32 %172, 1
store i32 %173, i32* %7
%174 = sext i32 %172 to i64
%175 = getelementptr inbounds i8, i8* %15, i64 %174
store i8 %171, i8* %175
br label %176
176: ; preds = %169
%177 = load i8, i8* %1
%178 = sext i8 %177 to i32
%179 = icmp ne i32 %178, 10
br i1 %179, label %169, label %180
180: ; preds = %176
%181 = getelementptr inbounds i8, i8* %15, i64 0
%182 = load i8, i8* %181
%183 = sext i8 %182 to i32
%184 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0)
%185 = sext i8 %184 to i32
%186 = icmp eq i32 %183, %185
br i1 %186, label %187, label %263
187: ; preds = %180
%188 = getelementptr inbounds i8, i8* %15, i64 1
%189 = load i8, i8* %188
%190 = sext i8 %189 to i32
%191 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 1)
%192 = sext i8 %191 to i32
%193 = icmp eq i32 %190, %192
br i1 %193, label %194, label %263
194: ; preds = %187
%195 = getelementptr inbounds i8, i8* %15, i64 2
%196 = load i8, i8* %195
%197 = sext i8 %196 to i32
%198 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 2)
%199 = sext i8 %198 to i32
%200 = icmp eq i32 %197, %199
br i1 %200, label %201, label %263
201: ; preds = %194
%202 = getelementptr inbounds i8, i8* %15, i64 3
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 3)
%206 = sext i8 %205 to i32
%207 = icmp eq i32 %204, %206
br i1 %207, label %208, label %263
208: ; preds = %201
%209 = getelementptr inbounds i8, i8* %15, i64 4
%210 = load i8, i8* %209
%211 = sext i8 %210 to i32
%212 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 4)
%213 = sext i8 %212 to i32
%214 = icmp eq i32 %211, %213
br i1 %214, label %215, label %263
215: ; preds = %208
%216 = getelementptr inbounds i8, i8* %15, i64 5
%217 = load i8, i8* %216
%218 = sext i8 %217 to i32
%219 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 5)
%220 = sext i8 %219 to i32
%221 = icmp eq i32 %218, %220
br i1 %221, label %222, label %263
222: ; preds = %215
%223 = getelementptr inbounds i8, i8* %15, i64 6
%224 = load i8, i8* %223
%225 = sext i8 %224 to i32
%226 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 6)
%227 = sext i8 %226 to i32
%228 = icmp eq i32 %225, %227
br i1 %228, label %229, label %263
229: ; preds = %222
%230 = getelementptr inbounds i8, i8* %15, i64 7
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 7)
%234 = sext i8 %233 to i32
%235 = icmp eq i32 %232, %234
br i1 %235, label %236, label %263
236: ; preds = %229
%237 = getelementptr inbounds i8, i8* %15, i64 8
%238 = load i8, i8* %237
%239 = sext i8 %238 to i32
%240 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 8)
%241 = sext i8 %240 to i32
%242 = icmp eq i32 %239, %241
br i1 %242, label %243, label %263
243: ; preds = %236
%244 = getelementptr inbounds i8, i8* %15, i64 9
%245 = load i8, i8* %244
%246 = sext i8 %245 to i32
%247 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 9)
%248 = sext i8 %247 to i32
%249 = icmp eq i32 %246, %248
br i1 %249, label %250, label %263
250: ; preds = %243
%251 = getelementptr inbounds i8, i8* %15, i64 10
%252 = load i8, i8* %251
%253 = sext i8 %252 to i32
%254 = load i8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 10)
%255 = sext i8 %254 to i32
%256 = icmp eq i32 %253, %255
br i1 %256, label %257, label %263
257: ; preds = %250
%258 = getelementptr inbounds i8, i8* %15, i64 11
%259 = load i8, i8* %258
%260 = sext i8 %259 to i32
%261 = icmp eq i32 %260, 10
br i1 %261, label %262, label %263
262: ; preds = %257
store i32 1, i32* %5
br label %263
263: ; preds = %262, %257, %250, %243, %236, %229, %222, %215, %208, %201, %194, %187, %180
%264 = load i32, i32* %5
%265 = icmp eq i32 %264, 1
br i1 %265, label %266, label %267
266: ; preds = %263
br label %268
267: ; preds = %263
br label %154
268: ; preds = %266
br label %269
269: ; preds = %268, %148, %143, %138, %133, %128, %123
%270 = getelementptr inbounds i8, i8* %15, i64 0
%271 = load i8, i8* %270
%272 = sext i8 %271 to i32
%273 = icmp eq i32 %272, 99
br i1 %273, label %274, label %342
274: ; preds = %269
%275 = getelementptr inbounds i8, i8* %15, i64 1
%276 = load i8, i8* %275
%277 = sext i8 %276 to i32
%278 = icmp eq i32 %277, 112
br i1 %278, label %279, label %342
279: ; preds = %274
%280 = getelementptr inbounds i8, i8* %15, i64 2
%281 = load i8, i8* %280
%282 = sext i8 %281 to i32
%283 = icmp eq i32 %282, 114
br i1 %283, label %284, label %342
284: ; preds = %279
%285 = getelementptr inbounds i8, i8* %15, i64 3
%286 = load i8, i8* %285
%287 = sext i8 %286 to i32
%288 = icmp eq i32 %287, 111
br i1 %288, label %289, label %342
289: ; preds = %284
%290 = getelementptr inbounds i8, i8* %15, i64 4
%291 = load i8, i8* %290
%292 = sext i8 %291 to i32
%293 = icmp eq i32 %292, 109
br i1 %293, label %294, label %342
294: ; preds = %289
%295 = getelementptr inbounds i8, i8* %15, i64 5
%296 = load i8, i8* %295
%297 = sext i8 %296 to i32
%298 = icmp eq i32 %297, 112
br i1 %298, label %299, label %342
299: ; preds = %294
%300 = getelementptr inbounds i8, i8* %15, i64 6
%301 = load i8, i8* %300
%302 = sext i8 %301 to i32
%303 = icmp eq i32 %302, 116
br i1 %303, label %304, label %342
304: ; preds = %299
store i32 0, i32* %8
%305 = getelementptr inbounds i8, i8* %15, i64 7
%306 = load i8, i8* %305
%307 = sext i8 %306 to i32
%308 = icmp eq i32 %307, 32
br i1 %308, label %309, label %310
309: ; preds = %304
store i32 8, i32* %7
br label %311
310: ; preds = %304
store i32 7, i32* %7
br label %311
311: ; preds = %310, %309
%312 = load i32, i32* %7
br label %313
313: ; preds = %338, %311
%314 = load i32, i32* %7
%315 = load i32, i32* @SHRT_MAX
%316 = icmp slt i32 %314, %315
br i1 %316, label %317, label %341
317: ; preds = %313
%318 = load i32, i32* %7
%319 = sext i32 %318 to i64
%320 = getelementptr inbounds i8, i8* %15, i64 %319
%321 = load i8, i8* %320
%322 = load i32, i32* %8
%323 = sext i32 %322 to i64
%324 = getelementptr inbounds i8, i8* %18, i64 %323
store i8 %321, i8* %324
%325 = load i32, i32* %8
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds i8, i8* %18, i64 %326
%328 = load i8, i8* %327
%329 = sext i8 %328 to i32
%330 = icmp eq i32 %329, 10
br i1 %330, label %331, label %335
331: ; preds = %317
%332 = load i32, i32* %8
%333 = sext i32 %332 to i64
%334 = getelementptr inbounds i8, i8* %18, i64 %333
store i8 0, i8* %334
br label %335
335: ; preds = %331, %317
%336 = load i32, i32* %8
%337 = add nsw i32 %336, 1
store i32 %337, i32* %8
br label %338
338: ; preds = %335
%339 = load i32, i32* %7
%340 = add nsw i32 %339, 1
store i32 %340, i32* %7
br label %313
341: ; preds = %313
store i32 1, i32* %6
br label %392
342: ; preds = %299, %294, %289, %284, %279, %274, %269
%343 = getelementptr inbounds i8, i8* %15, i64 0
%344 = load i8, i8* %343
%345 = sext i8 %344 to i32
%346 = icmp eq i32 %345, 100
br i1 %346, label %347, label %391
347: ; preds = %342
%348 = getelementptr inbounds i8, i8* %15, i64 1
%349 = load i8, i8* %348
%350 = sext i8 %349 to i32
%351 = icmp eq i32 %350, 112
br i1 %351, label %352, label %391
352: ; preds = %347
%353 = getelementptr inbounds i8, i8* %15, i64 2
%354 = load i8, i8* %353
%355 = sext i8 %354 to i32
%356 = icmp eq i32 %355, 114
br i1 %356, label %357, label %391
357: ; preds = %352
%358 = getelementptr inbounds i8, i8* %15, i64 3
%359 = load i8, i8* %358
%360 = sext i8 %359 to i32
%361 = icmp eq i32 %360, 111
br i1 %361, label %362, label %391
362: ; preds = %357
%363 = getelementptr inbounds i8, i8* %15, i64 4
%364 = load i8, i8* %363
%365 = sext i8 %364 to i32
%366 = icmp eq i32 %365, 109
br i1 %366, label %367, label %391
367: ; preds = %362
%368 = getelementptr inbounds i8, i8* %15, i64 5
%369 = load i8, i8* %368
%370 = sext i8 %369 to i32
%371 = icmp eq i32 %370, 112
br i1 %371, label %372, label %391
372: ; preds = %367
%373 = getelementptr inbounds i8, i8* %15, i64 6
%374 = load i8, i8* %373
%375 = sext i8 %374 to i32
%376 = icmp eq i32 %375, 116
br i1 %376, label %377, label %391
377: ; preds = %372
%378 = getelementptr inbounds i8, i8* %18, i64 0
store i8 62, i8* %378
store i32 1, i32* %7
br label %379
379: ; preds = %387, %377
%380 = load i32, i32* %7
%381 = load i32, i32* @SHRT_MAX
%382 = icmp slt i32 %380, %381
br i1 %382, label %383, label %390
383: ; preds = %379
%384 = load i32, i32* %7
%385 = sext i32 %384 to i64
%386 = getelementptr inbounds i8, i8* %18, i64 %385
store i8 0, i8* %386
br label %387
387: ; preds = %383
%388 = load i32, i32* %7
%389 = add nsw i32 %388, 1
store i32 %389, i32* %7
br label %379
390: ; preds = %379
store i32 1, i32* %6
br label %391
391: ; preds = %390, %372, %367, %362, %357, %352, %347, %342
br label %392
392: ; preds = %391, %341
%393 = load i32, i32* %5
%394 = icmp eq i32 %393, 0
br i1 %394, label %395, label %418
395: ; preds = %392
%396 = load i32, i32* %6
%397 = icmp eq i32 %396, 0
br i1 %397, label %398, label %418
398: ; preds = %395
%399 = call i32 @strlen(i8* %15)
store i32 %399, i32* %11
%400 = load i32, i32* %11
%401 = sub nsw i32 %400, 1
%402 = sext i32 %401 to i64
%403 = getelementptr inbounds i8, i8* %15, i64 %402
store i8 0, i8* %403
%404 = call i64 (...) @fork()
store i64 %404, i64* %9
%405 = load i64, i64* %9
%406 = icmp eq i64 %405, 0
br i1 %406, label %407, label %414
407: ; preds = %398
%408 = call i32 @execlp(i8* %15, i8* %15, i32* null)
%409 = icmp eq i32 %408, -1
br i1 %409, label %410, label %413
410: ; preds = %407
%411 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %15)
%412 = call i32 @exit(i32 1)
unreachable
413: ; preds = %407
br label %417
414: ; preds = %398
%415 = load i64, i64* %9
%416 = call i32 @waitpid(i64 %415, i32* %10, i32 0)
br label %417
417: ; preds = %414, %413
br label %418
418: ; preds = %417, %395, %392
store i32 0, i32* %5
store i32 0, i32* %6
br label %419
419: ; preds = %418, %51
br label %20
}

LLVM IR (-O2):
@SHRT_MAX = global i32 0
@.str = [4 x i8] c"%s \00"
@.str.1 = [6 x i8] c"clear\00"
@.str.2 = [9 x i8] c"unlock: \00"
@.str.4 = [23 x i8] c"command not found: %s\0A\00"
define void @main() {
%1 = alloca i32
%2 = load i32, i32* @SHRT_MAX
%3 = zext i32 %2 to i64
%4 = alloca i8, i64 %3
%5 = alloca i8, i64 %3
store i8 62, i8* %5
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = getelementptr inbounds i8, i8* %4, i64 2
%8 = getelementptr inbounds i8, i8* %4, i64 3
%9 = getelementptr inbounds i8, i8* %4, i64 4
%10 = getelementptr inbounds i8, i8* %4, i64 5
%11 = getelementptr inbounds i8, i8* %4, i64 11
%12 = getelementptr inbounds i8, i8* %4, i64 6
%13 = getelementptr inbounds i8, i8* %4, i64 7
%14 = getelementptr inbounds i8, i8* %4, i64 8
%15 = getelementptr inbounds i8, i8* %4, i64 9
%16 = getelementptr inbounds i8, i8* %4, i64 10
%17 = bitcast i32* %1 to i8*
%18 = getelementptr inbounds i8, i8* %5, i64 1
br label %19
19: ; preds = %295, %0
%20 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %5)
%21 = load i32, i32* @SHRT_MAX
%22 = icmp sgt i32 %21, 0
br i1 %22, label %23, label %25
23: ; preds = %19
%24 = zext i32 %21 to i64
br label %25
25: ; preds = %23, %19
br label %26
26: ; preds = %25, %26
%27 = phi i64 [ %29, %26 ], [ 0, %25 ]
%28 = call signext i8 (...) @getchar()
%29 = add nuw i64 %27, 1
%30 = getelementptr inbounds i8, i8* %4, i64 %27
store i8 %28, i8* %30
%31 = icmp eq i8 %28, 10
br i1 %31, label %32, label %26
32: ; preds = %26
%33 = load i8, i8* %4
switch i8 %33, label %276 [
i8 10, label %37
i8 81, label %39
i8 113, label %39
i8 116, label %34
i8 99, label %117
i8 100, label %251
]
34: ; preds = %32
%35 = load i8, i8* %6
%36 = icmp eq i8 %35, 108
br i1 %36, label %54, label %277
37: ; preds = %32
%38 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %295
39: ; preds = %32, %32
%40 = load i8, i8* %6
switch i8 %40, label %43 [
i8 10, label %41
i8 0, label %41
]
41: ; preds = %39, %39
%42 = call i32 @exit(i32 0)
unreachable
43: ; preds = %39
switch i8 %33, label %276 [
i8 81, label %44
i8 113, label %44
i8 99, label %117
i8 100, label %251
]
44: ; preds = %43, %43
switch i8 %40, label %116 [
i8 85, label %45
i8 117, label %45
]
45: ; preds = %44, %44
%46 = load i8, i8* %7
switch i8 %46, label %116 [
i8 73, label %47
i8 105, label %47
]
47: ; preds = %45, %45
%48 = load i8, i8* %8
switch i8 %48, label %116 [
i8 84, label %49
i8 116, label %49
]
49: ; preds = %47, %47
%50 = load i8, i8* %9
%51 = icmp eq i8 %50, 10
br i1 %51, label %52, label %116
52: ; preds = %49
%53 = call i32 @exit(i32 0)
unreachable
54: ; preds = %34
%55 = load i8, i8* %7
%56 = icmp eq i8 %55, 111
br i1 %56, label %57, label %277
57: ; preds = %54
%58 = load i8, i8* %8
%59 = icmp eq i8 %58, 99
br i1 %59, label %60, label %277
60: ; preds = %57
%61 = load i8, i8* %9
%62 = icmp eq i8 %61, 107
br i1 %62, label %63, label %277
63: ; preds = %60
%64 = load i8, i8* %10
%65 = icmp eq i8 %64, 10
br i1 %65, label %66, label %277
66: ; preds = %63, %115
%67 = load i32, i32* @SHRT_MAX
%68 = icmp sgt i32 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %66
%70 = zext i32 %67 to i64
br label %71
71: ; preds = %69, %66
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
br label %73
73: ; preds = %73, %71
%74 = phi i64 [ %76, %73 ], [ 0, %71 ]
%75 = call signext i8 (...) @getchar()
%76 = add nuw i64 %74, 1
%77 = getelementptr inbounds i8, i8* %4, i64 %74
store i8 %75, i8* %77
%78 = icmp eq i8 %75, 10
br i1 %78, label %79, label %73
79: ; preds = %73
%80 = load i8, i8* %4
%81 = icmp eq i8 %80, 78
br i1 %81, label %82, label %115
82: ; preds = %79
%83 = load i8, i8* %6
%84 = icmp eq i8 %83, 79
br i1 %84, label %85, label %115
85: ; preds = %82
%86 = load i8, i8* %7
%87 = icmp eq i8 %86, 84
br i1 %87, label %88, label %115
88: ; preds = %85
%89 = load i8, i8* %8
%90 = icmp eq i8 %89, 83
br i1 %90, label %91, label %115
91: ; preds = %88
%92 = load i8, i8* %9
%93 = icmp eq i8 %92, 79
br i1 %93, label %94, label %115
94: ; preds = %91
%95 = load i8, i8* %10
%96 = icmp eq i8 %95, 83
br i1 %96, label %97, label %115
97: ; preds = %94
%98 = load i8, i8* %12
%99 = icmp eq i8 %98, 69
br i1 %99, label %100, label %115
100: ; preds = %97
%101 = load i8, i8* %13
%102 = icmp eq i8 %101, 67
br i1 %102, label %103, label %115
103: ; preds = %100
%104 = load i8, i8* %14
%105 = icmp eq i8 %104, 82
br i1 %105, label %106, label %115
106: ; preds = %103
%107 = load i8, i8* %15
%108 = icmp eq i8 %107, 69
br i1 %108, label %109, label %115
109: ; preds = %106
%110 = load i8, i8* %16
%111 = icmp eq i8 %110, 84
br i1 %111, label %112, label %115
112: ; preds = %109
%113 = load i8, i8* %11
%114 = icmp eq i8 %113, 10
br i1 %114, label %278, label %115
115: ; preds = %112, %109, %106, %103, %100, %97, %94, %91, %88, %85, %82, %79
br label %66
116: ; preds = %49, %44, %45, %47
switch i8 %33, label %276 [
i8 99, label %117
i8 100, label %251
]
117: ; preds = %32, %43, %116
%118 = load i8, i8* %6
%119 = icmp eq i8 %118, 112
br i1 %119, label %120, label %276
120: ; preds = %117
%121 = load i8, i8* %7
%122 = icmp eq i8 %121, 114
br i1 %122, label %123, label %276
123: ; preds = %120
%124 = load i8, i8* %8
%125 = icmp eq i8 %124, 111
br i1 %125, label %126, label %276
126: ; preds = %123
%127 = load i8, i8* %9
%128 = icmp eq i8 %127, 109
br i1 %128, label %129, label %276
129: ; preds = %126
%130 = load i8, i8* %10
%131 = icmp eq i8 %130, 112
br i1 %131, label %132, label %276
132: ; preds = %129
%133 = load i8, i8* %12
%134 = icmp eq i8 %133, 116
br i1 %134, label %135, label %276
135: ; preds = %132
%136 = load i8, i8* %13
%137 = icmp eq i8 %136, 32
%138 = select i1 %137, i32 8, i32 7
%139 = load i32, i32* @SHRT_MAX
%140 = icmp sgt i32 %139, %138
br i1 %140, label %141, label %275
141: ; preds = %135
%142 = zext i32 %138 to i64
%143 = sub i32 %139, %138
%144 = zext i32 %143 to i64
%145 = icmp ult i32 %143, 8
br i1 %145, label %237, label %146
146: ; preds = %141
%147 = icmp ult i32 %143, 32
br i1 %147, label %219, label %148
148: ; preds = %146
%149 = and i64 %144, 4294967264
%150 = add nsw i64 %149, -32
%151 = lshr exact i64 %150, 5
%152 = add nuw nsw i64 %151, 1
%153 = and i64 %152, 1
%154 = icmp eq i64 %150, 0
br i1 %154, label %194, label %155
155: ; preds = %148
%156 = and i64 %152, 1152921504606846974
br label %157
157: ; preds = %157, %155
%158 = phi i64 [ 0, %155 ], [ %191, %157 ]
%159 = phi i64 [ 0, %155 ], [ %192, %157 ]
%160 = or i64 %158, %142
%161 = getelementptr inbounds i8, i8* %4, i64 %160
%162 = bitcast i8* %161 to <16 x i8>*
%163 = load <16 x i8>, <16 x i8>* %162
%164 = getelementptr inbounds i8, i8* %161, i64 16
%165 = bitcast i8* %164 to <16 x i8>*
%166 = load <16 x i8>, <16 x i8>* %165
%167 = getelementptr inbounds i8, i8* %5, i64 %158
%168 = icmp eq <16 x i8> %163, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%169 = icmp eq <16 x i8> %166, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%170 = select <16 x i1> %168, <16 x i8> zeroinitializer, <16 x i8> %163
%171 = select <16 x i1> %169, <16 x i8> zeroinitializer, <16 x i8> %166
%172 = bitcast i8* %167 to <16 x i8>*
store <16 x i8> %170, <16 x i8>* %172
%173 = getelementptr inbounds i8, i8* %167, i64 16
%174 = bitcast i8* %173 to <16 x i8>*
store <16 x i8> %171, <16 x i8>* %174
%175 = or i64 %158, 32
%176 = or i64 %175, %142
%177 = getelementptr inbounds i8, i8* %4, i64 %176
%178 = bitcast i8* %177 to <16 x i8>*
%179 = load <16 x i8>, <16 x i8>* %178
%180 = getelementptr inbounds i8, i8* %177, i64 16
%181 = bitcast i8* %180 to <16 x i8>*
%182 = load <16 x i8>, <16 x i8>* %181
%183 = getelementptr inbounds i8, i8* %5, i64 %175
%184 = icmp eq <16 x i8> %179, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%185 = icmp eq <16 x i8> %182, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%186 = select <16 x i1> %184, <16 x i8> zeroinitializer, <16 x i8> %179
%187 = select <16 x i1> %185, <16 x i8> zeroinitializer, <16 x i8> %182
%188 = bitcast i8* %183 to <16 x i8>*
store <16 x i8> %186, <16 x i8>* %188
%189 = getelementptr inbounds i8, i8* %183, i64 16
%190 = bitcast i8* %189 to <16 x i8>*
store <16 x i8> %187, <16 x i8>* %190
%191 = add nuw i64 %158, 64
%192 = add i64 %159, 2
%193 = icmp eq i64 %192, %156
br i1 %193, label %194, label %157
194: ; preds = %157, %148
%195 = phi i64 [ 0, %148 ], [ %191, %157 ]
%196 = icmp eq i64 %153, 0
br i1 %196, label %213, label %197
197: ; preds = %194
%198 = or i64 %195, %142
%199 = getelementptr inbounds i8, i8* %4, i64 %198
%200 = bitcast i8* %199 to <16 x i8>*
%201 = load <16 x i8>, <16 x i8>* %200
%202 = getelementptr inbounds i8, i8* %199, i64 16
%203 = bitcast i8* %202 to <16 x i8>*
%204 = load <16 x i8>, <16 x i8>* %203
%205 = getelementptr inbounds i8, i8* %5, i64 %195
%206 = icmp eq <16 x i8> %201, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%207 = icmp eq <16 x i8> %204, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%208 = select <16 x i1> %206, <16 x i8> zeroinitializer, <16 x i8> %201
%209 = select <16 x i1> %207, <16 x i8> zeroinitializer, <16 x i8> %204
%210 = bitcast i8* %205 to <16 x i8>*
store <16 x i8> %208, <16 x i8>* %210
%211 = getelementptr inbounds i8, i8* %205, i64 16
%212 = bitcast i8* %211 to <16 x i8>*
store <16 x i8> %209, <16 x i8>* %212
br label %213
213: ; preds = %194, %197
%214 = icmp eq i64 %149, %144
br i1 %214, label %275, label %215
215: ; preds = %213
%216 = or i64 %149, %142
%217 = and i64 %144, 24
%218 = icmp eq i64 %217, 0
br i1 %218, label %237, label %219
219: ; preds = %146, %215
%220 = phi i64 [ %149, %215 ], [ 0, %146 ]
%221 = and i64 %144, 4294967288
%222 = add nuw nsw i64 %221, %142
br label %223
223: ; preds = %223, %219
%224 = phi i64 [ %220, %219 ], [ %233, %223 ]
%225 = add i64 %224, %142
%226 = getelementptr inbounds i8, i8* %4, i64 %225
%227 = bitcast i8* %226 to <8 x i8>*
%228 = load <8 x i8>, <8 x i8>* %227
%229 = getelementptr inbounds i8, i8* %5, i64 %224
%230 = icmp eq <8 x i8> %228, <i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10, i8 10>
%231 = select <8 x i1> %230, <8 x i8> zeroinitializer, <8 x i8> %228
%232 = bitcast i8* %229 to <8 x i8>*
store <8 x i8> %231, <8 x i8>* %232
%233 = add nuw i64 %224, 8
%234 = icmp eq i64 %233, %221
br i1 %234, label %235, label %223
235: ; preds = %223
%236 = icmp eq i64 %221, %144
br i1 %236, label %275, label %237
237: ; preds = %141, %215, %235
%238 = phi i64 [ %142, %141 ], [ %216, %215 ], [ %222, %235 ]
%239 = phi i64 [ 0, %141 ], [ %149, %215 ], [ %221, %235 ]
br label %240
240: ; preds = %237, %240
%241 = phi i64 [ %249, %240 ], [ %238, %237 ]
%242 = phi i64 [ %248, %240 ], [ %239, %237 ]
%243 = getelementptr inbounds i8, i8* %4, i64 %241
%244 = load i8, i8* %243
%245 = getelementptr inbounds i8, i8* %5, i64 %242
%246 = icmp eq i8 %244, 10
%247 = select i1 %246, i8 0, i8 %244
store i8 %247, i8* %245
%248 = add nuw nsw i64 %242, 1
%249 = add nuw nsw i64 %241, 1
%250 = icmp eq i64 %248, %144
br i1 %250, label %275, label %240
251: ; preds = %32, %43, %116
%252 = load i8, i8* %6
%253 = icmp eq i8 %252, 112
br i1 %253, label %254, label %276
254: ; preds = %251
%255 = load i8, i8* %7
%256 = icmp eq i8 %255, 114
br i1 %256, label %257, label %276
257: ; preds = %254
%258 = load i8, i8* %8
%259 = icmp eq i8 %258, 111
br i1 %259, label %260, label %276
260: ; preds = %257
%261 = load i8, i8* %9
%262 = icmp eq i8 %261, 109
br i1 %262, label %263, label %276
263: ; preds = %260
%264 = load i8, i8* %10
%265 = icmp eq i8 %264, 112
br i1 %265, label %266, label %276
266: ; preds = %263
%267 = load i8, i8* %12
%268 = icmp eq i8 %267, 116
br i1 %268, label %269, label %276
269: ; preds = %266
store i8 62, i8* %5
%270 = load i32, i32* @SHRT_MAX
%271 = icmp sgt i32 %270, 1
br i1 %271, label %272, label %275
272: ; preds = %269
%273 = add nsw i32 %270, -1
%274 = zext i32 %273 to i64
br label %275
275: ; preds = %240, %213, %235, %272, %269, %135
br label %294
276: ; preds = %32, %43, %116, %117, %120, %123, %126, %129, %132, %251, %254, %257, %260, %263, %266
br label %279
277: ; preds = %34, %54, %57, %60, %63
br label %279
278: ; preds = %112
br label %294
279: ; preds = %277, %276
%280 = call i32 @strlen(i8* %4)
%281 = add nsw i32 %280, -1
%282 = sext i32 %281 to i64
%283 = getelementptr inbounds i8, i8* %4, i64 %282
store i8 0, i8* %283
%284 = call i64 (...) @fork()
%285 = icmp eq i64 %284, 0
br i1 %285, label %286, label %292
286: ; preds = %279
%287 = call i32 @execlp(i8* %4, i8* %4, i32* null)
%288 = icmp eq i32 %287, -1
br i1 %288, label %289, label %294
289: ; preds = %286
%290 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.4, i64 0, i64 0), i8* %4)
%291 = call i32 @exit(i32 1)
unreachable
292: ; preds = %279
%293 = call i32 @waitpid(i64 %284, i32* %1, i32 0)
br label %294
294: ; preds = %278, %275, %292, %286
br label %295
295: ; preds = %294, %37
br label %19
}