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

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ err_exit(char *, int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int getpid();
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
size_t read(int, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main(int argc, char *argv[]) {
  pid_t pid;
  int fd, i;
  char buf[64], read_buf[1024];
  size_t num_bytes_read;
  pid = getpid();
  printf("Environment variables affecting current process(%d)\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "/proc/%d/environ", pid);
  fd = open(buf, O_RDONLY);
  if (fd == -1) {
    err_exit("Error on open, %s\n", strerror(errno));
  }
  while ((num_bytes_read = read(fd, read_buf, 1024)) != 0) {
    if (num_bytes_read != -1) {
      for (i = 0; i < num_bytes_read; i++) {
        if (read_buf[i] != '\0') {
          printf("%c", read_buf[i]);
        } else {
          printf("\n");
        }
      }
    } else {
      err_exit("Error on read, %s\n", strerror(errno));
    }
  }
  close(fd);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Process(%d) info:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "cat /proc/%d/status", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Process(%d) current working directory:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "ls -l /proc/%d/cwd", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Process(%d) commandline arguments:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "cat /proc/%d/cmdline", pid);
  system(buf);
  printf("\n----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Symlink to process(%d) executable:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "ls -l /proc/%d/exe", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Process(%d) memory mappings:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "cat /proc/%d/maps", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Process(%d) virtual memory:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "cat /proc/%d/mem", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("Process(%d) mounts:\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "cat /proc/%d/mounts", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("symlinks to files opened by Process(%d):\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "ls -l /proc/%d/fd", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("symlink to root directory of Process(%d):\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "ls -l /proc/%d/root", pid);
  system(buf);
  printf("----------------------------------------------\n");
  memset(buf, 0, 64);
  printf("directories of threads for Process(%d):\n", pid);
  printf("----------------------------------------------\n");
  sprintf(buf, "ls -l /proc/%d/task", pid);
  system(buf);
  printf("----------------------------------------------\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x470,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe23(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xf20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xe35(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
mov    0x2dd8(%rip),%rax
mov    (%rax),%esi
call   10a0 <open@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0xffffffff,-0x18(%rbp)
jne    1240 <main+0x90>
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xe0b(%rip),%rdi
call   1090 <err_exit@plt>
jmp    1245 <main+0x95>
mov    -0x18(%rbp),%edi
lea    -0x460(%rbp),%rsi
mov    $0x400,%edx
call   1080 <read@plt>
mov    %rax,-0x468(%rbp)
cmp    $0x0,%rax
je     130b <main+0x15b>
cmpq   $0xffffffffffffffff,-0x468(%rbp)
ff
je     12ea <main+0x13a>
movl   $0x0,-0x1c(%rbp)
movslq -0x1c(%rbp),%rax
cmp    -0x468(%rbp),%rax
jae    12e5 <main+0x135>
movslq -0x1c(%rbp),%rax
movsbl -0x460(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     12c4 <main+0x114>
movslq -0x1c(%rbp),%rax
movsbl -0x460(%rbp,%rax,1),%esi
ff
lea    0xda1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12d2 <main+0x122>
lea    0xd68(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12d7 <main+0x127>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    127f <main+0xcf>
jmp    1306 <main+0x156>
mov    0x2ce7(%rip),%rax
mov    (%rax),%edi
call   10d0 <strerror@plt>
mov    %eax,%esi
lea    0xd5b(%rip),%rdi
call   1090 <err_exit@plt>
jmp    1245 <main+0x95>
mov    -0x18(%rbp),%edi
call   1070 <close@plt>
lea    0xdf1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xd34(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdc2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xd24(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xd98(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xd02(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd69(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xd07(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xd3f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xce4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd10(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xce5(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xce5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xcf5(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xcb7(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xcf6(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xc8d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xcd3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc5e(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xcce(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xc34(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xcaa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc05(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xca4(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xbdb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xc7f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xbac(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xc71(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xb82(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xc4f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xb53(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xc56(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xb29(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xc32(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xafa(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xc3a(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xad0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1060 <memset@plt>
mov    -0x14(%rbp),%esi
lea    0xc18(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xaa1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    -0x60(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xc1e(%rip),%rsi
call   10b0 <sprintf@plt>
lea    -0x60(%rbp),%rdi
call   1040 <system@plt>
lea    0xa77(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x292e(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x448,%rsp
xor    %eax,%eax
call   1050 <getpid@plt>
mov    %eax,%r12d
lea    0xe0e(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1070 <printf@plt>
lea    0x107c(%rip),%rdi
call   1040 <puts@plt>
lea    0xe27(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    0x2dc5(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   10c0 <open@plt>
mov    %eax,%r15d
lea    0xe0f(%rip),%rbx
cmp    $0xffffffff,%eax
je     1245 <main+0x75>
jmp    125d <main+0x8d>
lea    0xe14(%rip),%rbx
mov    0x2d8c(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   10b0 <err_exit@plt>
lea    0x40(%rsp),%r14
mov    $0xa,%r13d
nopl   0x0(%rax,%rax,1)
mov    %r15d,%edi
mov    %r14,%rsi
mov    $0x400,%edx
call   10a0 <read@plt>
cmp    $0xffffffffffffffff,%rax
je     123e <main+0x6e>
mov    %rax,%rbx
test   %rax,%rax
je     12ae <main+0xde>
xor    %ebp,%ebp
movzbl 0x40(%rsp,%rbp,1),%eax
test   %al,%al
cmove  %r13d,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
add    $0x1,%rbp
cmp    %rbp,%rbx
jne    1290 <main+0xc0>
jmp    1270 <main+0xa0>
mov    %r15d,%edi
call   1090 <close@plt>
lea    0xfc1(%rip),%r14
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %rsp,%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xd8e(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd88(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xd6b(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd7a(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xd5c(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd67(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xd47(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd52(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xd34(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd39(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xd1a(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xd1e(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xcfe(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xcfa(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xcdd(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xcee(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xccf(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xce1(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1080 <memset@plt>
lea    0xcc4(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
lea    0xcd4(%rip),%rsi
mov    %r15,%rdi
mov    %r12d,%edx
call   10d0 <sprintf@plt>
mov    %r15,%rdi
call   1060 <system@plt>
mov    %r14,%rdi
call   1040 <puts@plt>
mov    0x2a19(%rip),%rax
mov    (%rax),%edi
call   10e0 <exit@plt>

LLVM IR (-O0):
@.str = [53 x i8] c"Environment variables affecting current process(%d)\0A\00"
@.str.1 = [48 x i8] c"----------------------------------------------\0A\00"
@.str.2 = [17 x i8] c"/proc/%d/environ\00"
@O_RDONLY = global i32 0
@.str.3 = [19 x i8] c"Error on open, %s\0A\00"
@errno = global i32 0
@.str.4 = [3 x i8] c"%c\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [19 x i8] c"Error on read, %s\0A\00"
@.str.7 = [19 x i8] c"Process(%d) info:\0A\00"
@.str.8 = [20 x i8] c"cat /proc/%d/status\00"
@.str.9 = [40 x i8] c"Process(%d) current working directory:\0A\00"
@.str.10 = [19 x i8] c"ls -l /proc/%d/cwd\00"
@.str.11 = [36 x i8] c"Process(%d) commandline arguments:\0A\00"
@.str.12 = [21 x i8] c"cat /proc/%d/cmdline\00"
@.str.13 = [49 x i8] c"\0A----------------------------------------------\0A\00"
@.str.14 = [36 x i8] c"Symlink to process(%d) executable:\0A\00"
@.str.15 = [19 x i8] c"ls -l /proc/%d/exe\00"
@.str.16 = [30 x i8] c"Process(%d) memory mappings:\0A\00"
@.str.17 = [18 x i8] c"cat /proc/%d/maps\00"
@.str.18 = [29 x i8] c"Process(%d) virtual memory:\0A\00"
@.str.19 = [17 x i8] c"cat /proc/%d/mem\00"
@.str.20 = [21 x i8] c"Process(%d) mounts:\0A\00"
@.str.21 = [20 x i8] c"cat /proc/%d/mounts\00"
@.str.22 = [42 x i8] c"symlinks to files opened by Process(%d):\0A\00"
@.str.23 = [18 x i8] c"ls -l /proc/%d/fd\00"
@.str.24 = [43 x i8] c"symlink to root directory of Process(%d):\0A\00"
@.str.25 = [20 x i8] c"ls -l /proc/%d/root\00"
@.str.26 = [41 x i8] c"directories of threads for Process(%d):\0A\00"
@.str.27 = [20 x i8] c"ls -l /proc/%d/task\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca [64 x i8]
%10 = alloca [1024 x i8]
%11 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%12 = call i32 (...) @getpid()
store i32 %12, i32* %6
%13 = load i32, i32* %6
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %13)
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%17 = load i32, i32* %6
%18 = call i32 @sprintf(i8* %16, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %17)
%19 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%20 = load i32, i32* @O_RDONLY
%21 = call i32 @open(i8* %19, i32 %20)
store i32 %21, i32* %7
%22 = load i32, i32* %7
%23 = icmp eq i32 %22, -1
br i1 %23, label %24, label %28
24: ; preds = %2
%25 = load i32, i32* @errno
%26 = call i32 @strerror(i32 %25)
%27 = call i32 @err_exit(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i32 %26)
br label %28
28: ; preds = %24, %2
br label %29
29: ; preds = %68, %28
%30 = load i32, i32* %7
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 0
%32 = call i64 @read(i32 %30, i8* %31, i32 1024)
store i64 %32, i64* %11
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %69
34: ; preds = %29
%35 = load i64, i64* %11
%36 = icmp ne i64 %35, -1
br i1 %36, label %37, label %64
37: ; preds = %34
store i32 0, i32* %8
br label %38
38: ; preds = %60, %37
%39 = load i32, i32* %8
%40 = sext i32 %39 to i64
%41 = load i64, i64* %11
%42 = icmp ult i64 %40, %41
br i1 %42, label %43, label %63
43: ; preds = %38
%44 = load i32, i32* %8
%45 = sext i32 %44 to i64
%46 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 %45
%47 = load i8, i8* %46
%48 = sext i8 %47 to i32
%49 = icmp ne i32 %48, 0
br i1 %49, label %50, label %57
50: ; preds = %43
%51 = load i32, i32* %8
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds [1024 x i8], [1024 x i8]* %10, i64 0, i64 %52
%54 = load i8, i8* %53
%55 = sext i8 %54 to i32
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 %55)
br label %59
57: ; preds = %43
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
br label %59
59: ; preds = %57, %50
br label %60
60: ; preds = %59
%61 = load i32, i32* %8
%62 = add nsw i32 %61, 1
store i32 %62, i32* %8
br label %38
63: ; preds = %38
br label %68
64: ; preds = %34
%65 = load i32, i32* @errno
%66 = call i32 @strerror(i32 %65)
%67 = call i32 @err_exit(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %66)
br label %68
68: ; preds = %64, %63
br label %29
69: ; preds = %29
%70 = load i32, i32* %7
%71 = call i32 @close(i32 %70)
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%73 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%74 = call i32 @memset(i8* %73, i32 0, i32 64)
%75 = load i32, i32* %6
%76 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %75)
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%78 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%79 = load i32, i32* %6
%80 = call i32 @sprintf(i8* %78, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%82 = call i32 @system(i8* %81)
%83 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%84 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%85 = call i32 @memset(i8* %84, i32 0, i32 64)
%86 = load i32, i32* %6
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %86)
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%89 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%90 = load i32, i32* %6
%91 = call i32 @sprintf(i8* %89, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %90)
%92 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%93 = call i32 @system(i8* %92)
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%95 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%96 = call i32 @memset(i8* %95, i32 0, i32 64)
%97 = load i32, i32* %6
%98 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %97)
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%100 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%101 = load i32, i32* %6
%102 = call i32 @sprintf(i8* %100, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i32 %101)
%103 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%104 = call i32 @system(i8* %103)
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.13, i64 0, i64 0))
%106 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%107 = call i32 @memset(i8* %106, i32 0, i32 64)
%108 = load i32, i32* %6
%109 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0), i32 %108)
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%111 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%112 = load i32, i32* %6
%113 = call i32 @sprintf(i8* %111, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i32 %112)
%114 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%115 = call i32 @system(i8* %114)
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%117 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%118 = call i32 @memset(i8* %117, i32 0, i32 64)
%119 = load i32, i32* %6
%120 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i32 %119)
%121 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%122 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%123 = load i32, i32* %6
%124 = call i32 @sprintf(i8* %122, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i32 %123)
%125 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%126 = call i32 @system(i8* %125)
%127 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%128 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%129 = call i32 @memset(i8* %128, i32 0, i32 64)
%130 = load i32, i32* %6
%131 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0), i32 %130)
%132 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%133 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%134 = load i32, i32* %6
%135 = call i32 @sprintf(i8* %133, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i32 %134)
%136 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%137 = call i32 @system(i8* %136)
%138 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%139 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%140 = call i32 @memset(i8* %139, i32 0, i32 64)
%141 = load i32, i32* %6
%142 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i32 %141)
%143 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%144 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%145 = load i32, i32* %6
%146 = call i32 @sprintf(i8* %144, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i32 %145)
%147 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%148 = call i32 @system(i8* %147)
%149 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%150 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%151 = call i32 @memset(i8* %150, i32 0, i32 64)
%152 = load i32, i32* %6
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0), i32 %152)
%154 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%155 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%156 = load i32, i32* %6
%157 = call i32 @sprintf(i8* %155, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0), i32 %156)
%158 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%159 = call i32 @system(i8* %158)
%160 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%161 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%162 = call i32 @memset(i8* %161, i32 0, i32 64)
%163 = load i32, i32* %6
%164 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.24, i64 0, i64 0), i32 %163)
%165 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%166 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%167 = load i32, i32* %6
%168 = call i32 @sprintf(i8* %166, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.25, i64 0, i64 0), i32 %167)
%169 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%170 = call i32 @system(i8* %169)
%171 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%172 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%173 = call i32 @memset(i8* %172, i32 0, i32 64)
%174 = load i32, i32* %6
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.26, i64 0, i64 0), i32 %174)
%176 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%177 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%178 = load i32, i32* %6
%179 = call i32 @sprintf(i8* %177, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0), i32 %178)
%180 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i64 0, i64 0
%181 = call i32 @system(i8* %180)
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%183 = load i32, i32* @EXIT_SUCCESS
%184 = call i32 @exit(i32 %183)
unreachable
}

LLVM IR (-O2):
@.str = [53 x i8] c"Environment variables affecting current process(%d)\0A\00"
@.str.2 = [17 x i8] c"/proc/%d/environ\00"
@O_RDONLY = global i32 0
@.str.3 = [19 x i8] c"Error on open, %s\0A\00"
@errno = global i32 0
@.str.6 = [19 x i8] c"Error on read, %s\0A\00"
@.str.7 = [19 x i8] c"Process(%d) info:\0A\00"
@.str.8 = [20 x i8] c"cat /proc/%d/status\00"
@.str.9 = [40 x i8] c"Process(%d) current working directory:\0A\00"
@.str.10 = [19 x i8] c"ls -l /proc/%d/cwd\00"
@.str.11 = [36 x i8] c"Process(%d) commandline arguments:\0A\00"
@.str.12 = [21 x i8] c"cat /proc/%d/cmdline\00"
@.str.14 = [36 x i8] c"Symlink to process(%d) executable:\0A\00"
@.str.15 = [19 x i8] c"ls -l /proc/%d/exe\00"
@.str.16 = [30 x i8] c"Process(%d) memory mappings:\0A\00"
@.str.17 = [18 x i8] c"cat /proc/%d/maps\00"
@.str.18 = [29 x i8] c"Process(%d) virtual memory:\0A\00"
@.str.19 = [17 x i8] c"cat /proc/%d/mem\00"
@.str.20 = [21 x i8] c"Process(%d) mounts:\0A\00"
@.str.21 = [20 x i8] c"cat /proc/%d/mounts\00"
@.str.22 = [42 x i8] c"symlinks to files opened by Process(%d):\0A\00"
@.str.23 = [18 x i8] c"ls -l /proc/%d/fd\00"
@.str.24 = [43 x i8] c"symlink to root directory of Process(%d):\0A\00"
@.str.25 = [20 x i8] c"ls -l /proc/%d/root\00"
@.str.26 = [41 x i8] c"directories of threads for Process(%d):\0A\00"
@.str.27 = [20 x i8] c"ls -l /proc/%d/task\00"
@EXIT_SUCCESS = global i32 0
@str.34 = [48 x i8] c"\0A----------------------------------------------\00"
@str.48 = [47 x i8] c"----------------------------------------------\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [64 x i8]
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = tail call i32 (...) @getpid()
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%10 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i32 %7)
%11 = load i32, i32* @O_RDONLY
%12 = call i32 @open(i8* %5, i32 %11)
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %19
14: ; preds = %20, %2
%15 = phi i8* [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), %2 ], [ getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), %20 ]
%16 = load i32, i32* @errno
%17 = tail call i32 @strerror(i32 %16)
%18 = tail call i32 @err_exit(i8* %15, i32 %17)
br label %19
19: ; preds = %2, %14
br label %20
20: ; preds = %22, %19
%21 = call i64 @read(i32 %12, i8* %6, i32 1024)
switch i64 %21, label %22 [
i64 0, label %32
i64 -1, label %14
]
22: ; preds = %20, %22
%23 = phi i64 [ %30, %22 ], [ 0, %20 ]
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %23
%25 = load i8, i8* %24
%26 = icmp eq i8 %25, 0
%27 = select i1 %26, i8 10, i8 %25
%28 = sext i8 %27 to i32
%29 = tail call i32 @putchar(i32 %28)
%30 = add nuw i64 %23, 1
%31 = icmp eq i64 %30, %21
br i1 %31, label %20, label %22
32: ; preds = %20
%33 = tail call i32 @close(i32 %12)
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%35 = call i32 @memset(i8* %5, i32 0, i32 64)
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %7)
%37 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%38 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i32 %7)
%39 = call i32 @system(i8* %5)
%40 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%41 = call i32 @memset(i8* %5, i32 0, i32 64)
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.9, i64 0, i64 0), i32 %7)
%43 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%44 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.10, i64 0, i64 0), i32 %7)
%45 = call i32 @system(i8* %5)
%46 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%47 = call i32 @memset(i8* %5, i32 0, i32 64)
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.11, i64 0, i64 0), i32 %7)
%49 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%50 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.12, i64 0, i64 0), i32 %7)
%51 = call i32 @system(i8* %5)
%52 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @str.34, i64 0, i64 0))
%53 = call i32 @memset(i8* %5, i32 0, i32 64)
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.14, i64 0, i64 0), i32 %7)
%55 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%56 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.15, i64 0, i64 0), i32 %7)
%57 = call i32 @system(i8* %5)
%58 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%59 = call i32 @memset(i8* %5, i32 0, i32 64)
%60 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.16, i64 0, i64 0), i32 %7)
%61 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%62 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.17, i64 0, i64 0), i32 %7)
%63 = call i32 @system(i8* %5)
%64 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%65 = call i32 @memset(i8* %5, i32 0, i32 64)
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.18, i64 0, i64 0), i32 %7)
%67 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%68 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str.19, i64 0, i64 0), i32 %7)
%69 = call i32 @system(i8* %5)
%70 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%71 = call i32 @memset(i8* %5, i32 0, i32 64)
%72 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.20, i64 0, i64 0), i32 %7)
%73 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%74 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.21, i64 0, i64 0), i32 %7)
%75 = call i32 @system(i8* %5)
%76 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%77 = call i32 @memset(i8* %5, i32 0, i32 64)
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.22, i64 0, i64 0), i32 %7)
%79 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%80 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.23, i64 0, i64 0), i32 %7)
%81 = call i32 @system(i8* %5)
%82 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%83 = call i32 @memset(i8* %5, i32 0, i32 64)
%84 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.24, i64 0, i64 0), i32 %7)
%85 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%86 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.25, i64 0, i64 0), i32 %7)
%87 = call i32 @system(i8* %5)
%88 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%89 = call i32 @memset(i8* %5, i32 0, i32 64)
%90 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.26, i64 0, i64 0), i32 %7)
%91 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%92 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.27, i64 0, i64 0), i32 %7)
%93 = call i32 @system(i8* %5)
%94 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str.48, i64 0, i64 0))
%95 = load i32, i32* @EXIT_SUCCESS
%96 = call i32 @exit(i32 %95)
unreachable
}