#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 */
struct stat {
  int st_mode;
};

/* Variables and functions */
int S_IFDIR;
int S_IFLNK;
int S_IFMT;
int S_IFREG;
int /*<<< orphan*/ _exit(int);
int /*<<< orphan*/ listdir(char **, int, int, int, int);
scalar_t__ lstat(char *, struct stat *);
int mystrlen(char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printinginfo(struct stat, char **, int, int);
int /*<<< orphan*/ read_link(char *, struct stat);
int /*<<< orphan*/ write(int, char *, int);
int main(int args, char **argv) {
  if (args < 2) {
    perror("Provide folder name\n");
    _exit(1);
  }
  int k, arg, direct;
  for (k = 0; k < args; k++) {
    if (argv[k][0] == '-')
      arg = k;
    else
      direct = k;
  }
  struct stat fileStat;
  char path[102];
  if (lstat(argv[direct], &fileStat) < 0) {
    perror(argv[direct]);
    return 1;
  }
  if ((args == 2)) {
    if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
      write(1, argv[direct], (size_t)mystrlen(argv[direct]));
      write(1, "\n", 1);
    } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
      listdir(argv, direct, 0, 0, 0);
    }
  } else if (args == 3) {
    if ((mystrlen(argv[arg]) == 2 && argv[arg][1] == 'l')) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        printinginfo(fileStat, argv, direct, 0);
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 1, 0, 0);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFLNK) {
        printinginfo(fileStat, argv, direct, 0);
        write(1, "\033[1m\x1b[36m", mystrlen("\033[1m\x1b[36m"));
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\x1b[0m", mystrlen("\x1b[0m"));
        write(1, " -> ", 4);
        read_link(argv[direct], fileStat);
        write(1, "\n", 1);
      }
    } else if ((mystrlen(argv[arg]) == 2 && argv[arg][1] == 'a')) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 0, 1, 0);
      }
    } else if ((mystrlen(argv[arg]) == 2 && argv[arg][1] == 'h')) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 0, 0, 1);
      }
    } else if ((mystrlen(argv[arg]) == 3) &&
               ((argv[arg][1] == 'a' && argv[arg][2] == 'l') ||
                (argv[arg][1] == 'l' && argv[arg][2] == 'a'))) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        printinginfo(fileStat, argv, direct, 0);
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 1, 1, 0);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFLNK) {
        printinginfo(fileStat, argv, direct, 0);
        write(1, "\033[1m\x1b[36m", mystrlen("\033[1m\x1b[36m"));
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\x1b[0m", mystrlen("\x1b[0m"));
        write(1, " -> ", 4);
        read_link(argv[direct], fileStat);
        write(1, "\n", 1);
      }
    } else if ((mystrlen(argv[arg]) == 3) &&
               ((argv[arg][1] == 'a' && argv[arg][2] == 'h') ||
                (argv[arg][1] == 'h' && argv[arg][2] == 'a'))) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 0, 1, 1);
      }
    } else if ((mystrlen(argv[arg]) == 3) &&
               ((argv[arg][1] == 'h' && argv[arg][2] == 'l') ||
                (argv[arg][1] == 'l' && argv[arg][2] == 'h'))) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        printinginfo(fileStat, argv, direct, 1);
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 1, 0, 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFLNK) {
        printinginfo(fileStat, argv, direct, 0);
        write(1, "\033[1m\x1b[36m", mystrlen("\033[1m\x1b[36m"));
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\x1b[0m", mystrlen("\x1b[0m"));
        write(1, " -> ", 4);
        read_link(argv[direct], fileStat);
        write(1, "\n", 1);
      }
    } else if (mystrlen(argv[arg]) == 4) {
      if ((fileStat.st_mode & S_IFMT) == S_IFREG) {
        printinginfo(fileStat, argv, direct, 1);
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\n", 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFDIR) {
        listdir(argv, direct, 1, 1, 1);
      } else if ((fileStat.st_mode & S_IFMT) == S_IFLNK) {
        printinginfo(fileStat, argv, direct, 0);
        write(1, "\033[1m\x1b[36m", mystrlen("\033[1m\x1b[36m"));
        write(1, argv[direct], (size_t)mystrlen(argv[direct]));
        write(1, "\x1b[0m", mystrlen("\x1b[0m"));
        write(1, " -> ", 4);
        read_link(argv[direct], fileStat);
        write(1, "\n", 1);
      }
    } else
      write(1, "command not recognized\n", 24);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11b9 <main+0x39>
lea    0xe56(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1208 <main+0x88>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11ef <main+0x6f>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    11f5 <main+0x75>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    11fa <main+0x7a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    11c0 <main+0x40>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    -0x20(%rbp),%rsi
call   1060 <lstat@plt>
cmp    $0x0,%rax
jge    1244 <main+0xc4>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   10a0 <perror@plt>
movl   $0x1,-0x4(%rbp)
jmp    1df2 <main+0xc72>
cmpl   $0x2,-0x8(%rbp)
jne    12f4 <main+0x174>
mov    -0x20(%rbp),%eax
mov    0x2d78(%rip),%rcx
and    (%rcx),%eax
mov    0x2d87(%rip),%rcx
cmp    (%rcx),%eax
jne    12ba <main+0x13a>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x98(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0x98(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0xd91(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    12ef <main+0x16f>
mov    -0x20(%rbp),%eax
mov    0x2d0c(%rip),%rcx
and    (%rcx),%eax
mov    0x2cf3(%rip),%rcx
cmp    (%rcx),%eax
jne    12ea <main+0x16a>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <listdir@plt>
jmp    12ef <main+0x16f>
jmp    1df2 <main+0xc72>
cmpl   $0x3,-0x8(%rbp)
jne    1ded <main+0xc6d>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x2,%eax
jne    14d4 <main+0x354>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6c,%eax
jne    14d4 <main+0x354>
mov    -0x20(%rbp),%eax
mov    0x2c95(%rip),%rcx
and    (%rcx),%eax
mov    0x2ca4(%rip),%rcx
cmp    (%rcx),%eax
jne    13ae <main+0x22e>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xa0(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0xc9d(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    14cf <main+0x34f>
mov    -0x20(%rbp),%eax
mov    0x2c18(%rip),%rcx
and    (%rcx),%eax
mov    0x2bff(%rip),%rcx
cmp    (%rcx),%eax
jne    13e5 <main+0x265>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x1,%edx
xor    %r8d,%r8d
mov    %r8d,%ecx
call   1050 <listdir@plt>
jmp    14ca <main+0x34a>
mov    -0x20(%rbp),%eax
mov    0x2be1(%rip),%rcx
and    (%rcx),%eax
mov    0x2be8(%rip),%rcx
cmp    (%rcx),%eax
jne    14c5 <main+0x345>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
lea    0xbfd(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xbea(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xa8(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xa8(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
lea    0xbaf(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0xb9c(%rip),%rsi
call   1040 <write@plt>
mov    $0x1,%edi
lea    0xb90(%rip),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%esi
call   1080 <read_link@plt>
mov    $0x1,%edx
lea    0xb81(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    14ca <main+0x34a>
jmp    14cf <main+0x34f>
jmp    1de8 <main+0xc68>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x2,%eax
jne    15af <main+0x42f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x61,%eax
jne    15af <main+0x42f>
mov    -0x20(%rbp),%eax
mov    0x2abf(%rip),%rcx
and    (%rcx),%eax
mov    0x2ace(%rip),%rcx
cmp    (%rcx),%eax
jne    1573 <main+0x3f3>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xb0(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0xad8(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    15aa <main+0x42a>
mov    -0x20(%rbp),%eax
mov    0x2a53(%rip),%rcx
and    (%rcx),%eax
mov    0x2a3a(%rip),%rcx
cmp    (%rcx),%eax
jne    15a5 <main+0x425>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
xor    %r8d,%r8d
mov    $0x1,%ecx
mov    %r8d,%edx
call   1050 <listdir@plt>
jmp    15aa <main+0x42a>
jmp    1de3 <main+0xc63>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x2,%eax
jne    1689 <main+0x509>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x68,%eax
jne    1689 <main+0x509>
mov    -0x20(%rbp),%eax
mov    0x29e4(%rip),%rcx
and    (%rcx),%eax
mov    0x29f3(%rip),%rcx
cmp    (%rcx),%eax
jne    164e <main+0x4ce>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xb8(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0x9fd(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1684 <main+0x504>
mov    -0x20(%rbp),%eax
mov    0x2978(%rip),%rcx
and    (%rcx),%eax
mov    0x295f(%rip),%rcx
cmp    (%rcx),%eax
jne    167f <main+0x4ff>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
xor    %ecx,%ecx
mov    $0x1,%r8d
mov    %ecx,%edx
call   1050 <listdir@plt>
jmp    1684 <main+0x504>
jmp    1dde <main+0xc5e>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x3,%eax
jne    18a9 <main+0x729>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x61,%eax
jne    16d5 <main+0x555>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x6c,%eax
je     1707 <main+0x587>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6c,%eax
jne    18a9 <main+0x729>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x61,%eax
jne    18a9 <main+0x729>
mov    -0x20(%rbp),%eax
mov    0x28bf(%rip),%rcx
and    (%rcx),%eax
mov    0x28ce(%rip),%rcx
cmp    (%rcx),%eax
jne    1784 <main+0x604>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xc0(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xc0(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0x8c7(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    18a4 <main+0x724>
mov    -0x20(%rbp),%eax
mov    0x2842(%rip),%rcx
and    (%rcx),%eax
mov    0x2829(%rip),%rcx
cmp    (%rcx),%eax
jne    17ba <main+0x63a>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x1,%ecx
xor    %r8d,%r8d
mov    %ecx,%edx
call   1050 <listdir@plt>
jmp    189f <main+0x71f>
mov    -0x20(%rbp),%eax
mov    0x280c(%rip),%rcx
and    (%rcx),%eax
mov    0x2813(%rip),%rcx
cmp    (%rcx),%eax
jne    189a <main+0x71a>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
lea    0x828(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x815(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xc8(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xc8(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
lea    0x7da(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x7c7(%rip),%rsi
call   1040 <write@plt>
mov    $0x1,%edi
lea    0x7bb(%rip),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%esi
call   1080 <read_link@plt>
mov    $0x1,%edx
lea    0x7ac(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    189f <main+0x71f>
jmp    18a4 <main+0x724>
jmp    1dd9 <main+0xc59>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x3,%eax
jne    19cf <main+0x84f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x61,%eax
jne    18f5 <main+0x775>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x68,%eax
je     1927 <main+0x7a7>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x68,%eax
jne    19cf <main+0x84f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x61,%eax
jne    19cf <main+0x84f>
mov    -0x20(%rbp),%eax
mov    0x269f(%rip),%rcx
and    (%rcx),%eax
mov    0x26ae(%rip),%rcx
cmp    (%rcx),%eax
jne    1993 <main+0x813>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xd0(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xd0(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0x6b8(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    19ca <main+0x84a>
mov    -0x20(%rbp),%eax
mov    0x2633(%rip),%rcx
and    (%rcx),%eax
mov    0x261a(%rip),%rcx
cmp    (%rcx),%eax
jne    19c5 <main+0x845>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
xor    %edx,%edx
mov    $0x1,%r8d
mov    %r8d,%ecx
call   1050 <listdir@plt>
jmp    19ca <main+0x84a>
jmp    1dd4 <main+0xc54>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x3,%eax
jne    1bf3 <main+0xa73>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x68,%eax
jne    1a1b <main+0x89b>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x6c,%eax
je     1a4d <main+0x8cd>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x1(%rax),%eax
cmp    $0x6c,%eax
jne    1bf3 <main+0xa73>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl 0x2(%rax),%eax
cmp    $0x68,%eax
jne    1bf3 <main+0xa73>
mov    -0x20(%rbp),%eax
mov    0x2579(%rip),%rcx
and    (%rcx),%eax
mov    0x2588(%rip),%rcx
cmp    (%rcx),%eax
jne    1acd <main+0x94d>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
mov    $0x1,%ecx
call   1090 <printinginfo@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xd8(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xd8(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0x57e(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1bee <main+0xa6e>
mov    -0x20(%rbp),%eax
mov    0x24f9(%rip),%rcx
and    (%rcx),%eax
mov    0x24e0(%rip),%rcx
cmp    (%rcx),%eax
jne    1b04 <main+0x984>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x1,%r8d
xor    %ecx,%ecx
mov    %r8d,%edx
call   1050 <listdir@plt>
jmp    1be9 <main+0xa69>
mov    -0x20(%rbp),%eax
mov    0x24c2(%rip),%rcx
and    (%rcx),%eax
mov    0x24c9(%rip),%rcx
cmp    (%rcx),%eax
jne    1be4 <main+0xa64>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
lea    0x4de(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x4cb(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xe0(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xe0(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
lea    0x490(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x47d(%rip),%rsi
call   1040 <write@plt>
mov    $0x1,%edi
lea    0x471(%rip),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%esi
call   1080 <read_link@plt>
mov    $0x1,%edx
lea    0x462(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1be9 <main+0xa69>
jmp    1bee <main+0xa6e>
jmp    1dcf <main+0xc4f>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
cmp    $0x4,%eax
jne    1db4 <main+0xc34>
mov    -0x20(%rbp),%eax
mov    0x23b9(%rip),%rcx
and    (%rcx),%eax
mov    0x23c8(%rip),%rcx
cmp    (%rcx),%eax
jne    1c8d <main+0xb0d>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
mov    $0x1,%ecx
call   1090 <printinginfo@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xe8(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xe8(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
mov    $0x1,%edx
lea    0x3be(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1daf <main+0xc2f>
mov    -0x20(%rbp),%eax
mov    0x2339(%rip),%rcx
and    (%rcx),%eax
mov    0x2320(%rip),%rcx
cmp    (%rcx),%eax
jne    1cc5 <main+0xb45>
mov    -0x10(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    $0x1,%r8d
mov    %r8d,%edx
mov    %r8d,%ecx
call   1050 <listdir@plt>
jmp    1daa <main+0xc2a>
mov    -0x20(%rbp),%eax
mov    0x2301(%rip),%rcx
and    (%rcx),%eax
mov    0x2308(%rip),%rcx
cmp    (%rcx),%eax
jne    1da5 <main+0xc25>
mov    -0x10(%rbp),%rsi
mov    -0x1c(%rbp),%edx
mov    -0x20(%rbp),%edi
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
lea    0x31d(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x30a(%rip),%rsi
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xf0(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <mystrlen@plt>
mov    -0xf0(%rbp),%rsi
cltq
mov    %eax,%edx
mov    $0x1,%edi
call   1040 <write@plt>
lea    0x2cf(%rip),%rdi
call   1070 <mystrlen@plt>
mov    %eax,%edx
mov    $0x1,%edi
lea    0x2bc(%rip),%rsi
call   1040 <write@plt>
mov    $0x1,%edi
lea    0x2b0(%rip),%rsi
mov    $0x4,%edx
call   1040 <write@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x20(%rbp),%esi
call   1080 <read_link@plt>
mov    $0x1,%edx
lea    0x2a1(%rip),%rsi
mov    %edx,%edi
call   1040 <write@plt>
jmp    1daa <main+0xc2a>
jmp    1daf <main+0xc2f>
jmp    1dca <main+0xc4a>
mov    $0x1,%edi
lea    0x269(%rip),%rsi
mov    $0x18,%edx
call   1040 <write@plt>
jmp    1dcf <main+0xc4f>
jmp    1dd4 <main+0xc54>
jmp    1dd9 <main+0xc59>
jmp    1dde <main+0xc5e>
jmp    1de3 <main+0xc63>
jmp    1de8 <main+0xc68>
jmp    1ded <main+0xc6d>
jmp    1df2 <main+0xc72>
mov    -0x4(%rbp),%eax
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     167b <main+0x4fb>
mov    %rsi,%r13
mov    %edi,%r12d
mov    %edi,%edx
lea    -0x1(%rdx),%rcx
mov    %edx,%eax
and    $0x3,%eax
cmp    $0x3,%rcx
jae    11af <main+0x2f>
xor    %ecx,%ecx
jmp    120a <main+0x8a>
and    $0xfffffffc,%edx
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    0x0(%r13,%rcx,8),%rsi
cmpb   $0x2d,(%rsi)
cmove  %ecx,%ebx
mov    0x8(%r13,%rcx,8),%rsi
cmovne %ecx,%ebp
lea    0x1(%rcx),%edi
cmpb   $0x2d,(%rsi)
cmove  %edi,%ebx
cmovne %edi,%ebp
mov    0x10(%r13,%rcx,8),%rsi
lea    0x2(%rcx),%edi
cmpb   $0x2d,(%rsi)
cmove  %edi,%ebx
cmovne %edi,%ebp
mov    0x18(%r13,%rcx,8),%rsi
lea    0x3(%rcx),%edi
cmpb   $0x2d,(%rsi)
cmove  %edi,%ebx
cmovne %edi,%ebp
add    $0x4,%rcx
cmp    %rdx,%rcx
jne    11c0 <main+0x40>
test   %rax,%rax
je     1228 <main+0xa8>
nop
mov    0x0(%r13,%rcx,8),%rdx
cmpb   $0x2d,(%rdx)
cmove  %ecx,%ebx
cmovne %ecx,%ebp
add    $0x1,%rcx
add    $0xffffffffffffffff,%rax
jne    1210 <main+0x90>
movslq %ebp,%r15
mov    0x0(%r13,%r15,8),%rdi
mov    %rsp,%rsi
call   1060 <lstat@plt>
test   %rax,%rax
js     1453 <main+0x2d3>
xor    %r14d,%r14d
cmp    $0x3,%r12d
je     128a <main+0x10a>
cmp    $0x2,%r12d
jne    155f <main+0x3df>
mov    0x2d75(%rip),%rax
mov    (%rax),%eax
and    (%rsp),%eax
mov    0x2d81(%rip),%rcx
cmp    (%rcx),%eax
je     152d <main+0x3ad>
mov    0x2d4a(%rip),%rcx
cmp    (%rcx),%eax
jne    155f <main+0x3df>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
xor    %edx,%edx
jmp    12e2 <main+0x162>
movslq %ebx,%rbx
mov    0x0(%r13,%rbx,8),%rdi
call   1070 <mystrlen@plt>
mov    0x0(%r13,%rbx,8),%rdi
cmp    $0x2,%eax
jne    12f1 <main+0x171>
cmpb   $0x6c,0x1(%rdi)
jne    12f1 <main+0x171>
mov    (%rsp),%r12d
mov    0x2d1e(%rip),%rax
mov    (%rax),%eax
and    %r12d,%eax
mov    0x2d2a(%rip),%rcx
cmp    (%rcx),%eax
je     14a7 <main+0x327>
mov    0x2cf3(%rip),%rcx
cmp    (%rcx),%eax
jne    15be <main+0x43e>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
xor    %r8d,%r8d
call   1050 <listdir@plt>
jmp    155f <main+0x3df>
call   1070 <mystrlen@plt>
mov    0x0(%r13,%rbx,8),%rdi
cmp    $0x2,%eax
jne    1341 <main+0x1c1>
cmpb   $0x61,0x1(%rdi)
jne    1341 <main+0x1c1>
mov    0x2cc3(%rip),%rax
mov    (%rax),%eax
and    (%rsp),%eax
mov    0x2ccf(%rip),%rcx
cmp    (%rcx),%eax
je     152d <main+0x3ad>
mov    0x2c98(%rip),%rcx
cmp    (%rcx),%eax
jne    155f <main+0x3df>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    12e4 <main+0x164>
call   1070 <mystrlen@plt>
mov    0x0(%r13,%rbx,8),%rdi
cmp    $0x2,%eax
jne    138f <main+0x20f>
cmpb   $0x68,0x1(%rdi)
jne    138f <main+0x20f>
mov    0x2c73(%rip),%rax
mov    (%rax),%eax
and    (%rsp),%eax
mov    0x2c7f(%rip),%rcx
cmp    (%rcx),%eax
je     152d <main+0x3ad>
mov    0x2c48(%rip),%rcx
cmp    (%rcx),%eax
jne    155f <main+0x3df>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
xor    %edx,%edx
jmp    15af <main+0x42f>
call   1070 <mystrlen@plt>
mov    0x0(%r13,%rbx,8),%rdi
cmp    $0x3,%eax
jne    13b7 <main+0x237>
mov    0x1(%rdi),%al
cmp    $0x6c,%al
je     147e <main+0x2fe>
cmp    $0x61,%al
jne    13b7 <main+0x237>
cmpb   $0x6c,0x2(%rdi)
je     1488 <main+0x308>
call   1070 <mystrlen@plt>
mov    0x0(%r13,%rbx,8),%rdi
cmp    $0x3,%eax
jne    13df <main+0x25f>
mov    0x1(%rdi),%al
cmp    $0x68,%al
je     14b6 <main+0x336>
cmp    $0x61,%al
jne    13df <main+0x25f>
cmpb   $0x68,0x2(%rdi)
je     14c0 <main+0x340>
call   1070 <mystrlen@plt>
mov    0x0(%r13,%rbx,8),%rdi
cmp    $0x3,%eax
jne    1407 <main+0x287>
mov    0x1(%rdi),%al
cmp    $0x6c,%al
je     14f6 <main+0x376>
cmp    $0x68,%al
jne    1407 <main+0x287>
cmpb   $0x6c,0x2(%rdi)
je     1500 <main+0x380>
call   1070 <mystrlen@plt>
cmp    $0x4,%eax
jne    1468 <main+0x2e8>
mov    (%rsp),%r12d
mov    0x2bb4(%rip),%rax
mov    (%rax),%eax
and    %r12d,%eax
mov    0x2bc0(%rip),%rcx
cmp    (%rcx),%eax
je     151b <main+0x39b>
mov    0x2b89(%rip),%rcx
cmp    (%rcx),%eax
jne    15be <main+0x43e>
mov    %r13,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    15b1 <main+0x431>
mov    0x0(%r13,%r15,8),%rdi
call   10a0 <perror@plt>
mov    $0x1,%r14d
jmp    155f <main+0x3df>
lea    0xbba(%rip),%rsi
mov    $0x1,%edi
mov    $0x18,%edx
jmp    155a <main+0x3da>
cmpb   $0x61,0x2(%rdi)
jne    13b7 <main+0x237>
mov    (%rsp),%r12d
mov    0x2b3d(%rip),%rax
mov    (%rax),%eax
and    %r12d,%eax
mov    0x2b49(%rip),%rcx
cmp    (%rcx),%eax
jne    1571 <main+0x3f1>
xor    %r14d,%r14d
mov    %r12d,%edi
mov    %r13,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
jmp    1528 <main+0x3a8>
cmpb   $0x61,0x2(%rdi)
jne    13df <main+0x25f>
mov    0x2b09(%rip),%rax
mov    (%rax),%eax
and    (%rsp),%eax
mov    0x2b15(%rip),%rcx
cmp    (%rcx),%eax
je     152d <main+0x3ad>
mov    0x2ae2(%rip),%rcx
cmp    (%rcx),%eax
jne    155f <main+0x3df>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
xor    %edx,%edx
mov    $0x1,%ecx
jmp    15b1 <main+0x431>
cmpb   $0x68,0x2(%rdi)
jne    1407 <main+0x287>
mov    (%rsp),%r12d
mov    0x2ac5(%rip),%rax
mov    (%rax),%eax
and    %r12d,%eax
mov    0x2ad1(%rip),%rcx
cmp    (%rcx),%eax
jne    1597 <main+0x417>
mov    %r12d,%edi
mov    %r13,%rsi
mov    %ebp,%edx
mov    $0x1,%ecx
call   1090 <printinginfo@plt>
mov    0x0(%r13,%r15,8),%rbx
mov    %rbx,%rdi
call   1070 <mystrlen@plt>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
lea    0xaef(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1040 <write@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a48(%rip),%rcx
cmp    (%rcx),%eax
jne    165b <main+0x4db>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
jmp    12e4 <main+0x164>
mov    0x2a22(%rip),%rcx
cmp    (%rcx),%eax
jne    15be <main+0x43e>
xor    %r14d,%r14d
mov    %r13,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    $0x1,%r8d
call   1050 <listdir@plt>
jmp    155f <main+0x3df>
mov    0x2a1b(%rip),%rcx
cmp    (%rcx),%eax
jne    155f <main+0x3df>
xor    %r14d,%r14d
mov    %r12d,%edi
mov    %r13,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
call   1090 <printinginfo@plt>
lea    0xa33(%rip),%rbp
mov    %rbp,%rdi
call   1070 <mystrlen@plt>
mov    $0x1,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    0x0(%r13,%r15,8),%rbp
mov    %rbp,%rdi
call   1070 <mystrlen@plt>
mov    $0x1,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1040 <write@plt>
lea    0xa03(%rip),%rbp
mov    %rbp,%rdi
call   1070 <mystrlen@plt>
mov    $0x1,%edi
mov    %rbp,%rsi
mov    %eax,%edx
call   1040 <write@plt>
lea    0x9ea(%rip),%rsi
mov    $0x1,%edi
mov    $0x4,%edx
call   1040 <write@plt>
mov    0x0(%r13,%r15,8),%rdi
mov    %r12d,%esi
call   1080 <read_link@plt>
jmp    1549 <main+0x3c9>
mov    0x297e(%rip),%rcx
cmp    (%rcx),%eax
jne    155f <main+0x3df>
xor    %r14d,%r14d
mov    %r12d,%edi
mov    %r13,%rsi
mov    %r15d,%edx
jmp    15d4 <main+0x454>
lea    0x97e(%rip),%rdi
call   10a0 <perror@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
@.str = [21 x i8] c"Provide folder name\0A\00"
@S_IFMT = global i32 0
@S_IFREG = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@S_IFDIR = global i32 0
@S_IFLNK = global i32 0
@.str.2 = [10 x i8] c"\1B[1m\1B[36m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [5 x i8] c" -> \00"
@.str.5 = [24 x i8] c"command not recognized\0A\00"
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 %struct.stat
%10 = alloca [102 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 2
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @_exit(i32 1)
unreachable
16: ; preds = %2
store i32 0, i32* %6
br label %17
17: ; preds = %36, %16
%18 = load i32, i32* %6
%19 = load i32, i32* %4
%20 = icmp slt i32 %18, %19
br i1 %20, label %21, label %39
21: ; preds = %17
%22 = load i8**, i8*** %5
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
%26 = load i8*, i8** %25
%27 = getelementptr inbounds i8, i8* %26, i64 0
%28 = load i8, i8* %27
%29 = sext i8 %28 to i32
%30 = icmp eq i32 %29, 45
br i1 %30, label %31, label %33
31: ; preds = %21
%32 = load i32, i32* %6
store i32 %32, i32* %7
br label %35
33: ; preds = %21
%34 = load i32, i32* %6
store i32 %34, i32* %8
br label %35
35: ; preds = %33, %31
br label %36
36: ; preds = %35
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
br label %17
39: ; preds = %17
%40 = load i8**, i8*** %5
%41 = load i32, i32* %8
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i8*, i8** %40, i64 %42
%44 = load i8*, i8** %43
%45 = call i64 @lstat(i8* %44, %struct.stat* %9)
%46 = icmp slt i64 %45, 0
br i1 %46, label %47, label %54
47: ; preds = %39
%48 = load i8**, i8*** %5
%49 = load i32, i32* %8
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds i8*, i8** %48, i64 %50
%52 = load i8*, i8** %51
%53 = call i32 @perror(i8* %52)
store i32 1, i32* %3
br label %752
54: ; preds = %39
%55 = load i32, i32* %4
%56 = icmp eq i32 %55, 2
br i1 %56, label %57, label %93
57: ; preds = %54
%58 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%59 = load i32, i32* %58
%60 = load i32, i32* @S_IFMT
%61 = and i32 %59, %60
%62 = load i32, i32* @S_IFREG
%63 = icmp eq i32 %61, %62
br i1 %63, label %64, label %80
64: ; preds = %57
%65 = load i8**, i8*** %5
%66 = load i32, i32* %8
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds i8*, i8** %65, i64 %67
%69 = load i8*, i8** %68
%70 = load i8**, i8*** %5
%71 = load i32, i32* %8
%72 = sext i32 %71 to i64
%73 = getelementptr inbounds i8*, i8** %70, i64 %72
%74 = load i8*, i8** %73
%75 = call i32 @mystrlen(i8* %74)
%76 = sext i32 %75 to i64
%77 = trunc i64 %76 to i32
%78 = call i32 @write(i32 1, i8* %69, i32 %77)
%79 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %92
80: ; preds = %57
%81 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%82 = load i32, i32* %81
%83 = load i32, i32* @S_IFMT
%84 = and i32 %82, %83
%85 = load i32, i32* @S_IFDIR
%86 = icmp eq i32 %84, %85
br i1 %86, label %87, label %91
87: ; preds = %80
%88 = load i8**, i8*** %5
%89 = load i32, i32* %8
%90 = call i32 @listdir(i8** %88, i32 %89, i32 0, i32 0, i32 0)
br label %91
91: ; preds = %87, %80
br label %92
92: ; preds = %91, %64
br label %752
93: ; preds = %54
%94 = load i32, i32* %4
%95 = icmp eq i32 %94, 3
br i1 %95, label %96, label %751
96: ; preds = %93
%97 = load i8**, i8*** %5
%98 = load i32, i32* %7
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds i8*, i8** %97, i64 %99
%101 = load i8*, i8** %100
%102 = call i32 @mystrlen(i8* %101)
%103 = icmp eq i32 %102, 2
br i1 %103, label %104, label %197
104: ; preds = %96
%105 = load i8**, i8*** %5
%106 = load i32, i32* %7
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8*, i8** %105, i64 %107
%109 = load i8*, i8** %108
%110 = getelementptr inbounds i8, i8* %109, i64 1
%111 = load i8, i8* %110
%112 = sext i8 %111 to i32
%113 = icmp eq i32 %112, 108
br i1 %113, label %114, label %197
114: ; preds = %104
%115 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%116 = load i32, i32* %115
%117 = load i32, i32* @S_IFMT
%118 = and i32 %116, %117
%119 = load i32, i32* @S_IFREG
%120 = icmp eq i32 %118, %119
br i1 %120, label %121, label %142
121: ; preds = %114
%122 = load i8**, i8*** %5
%123 = load i32, i32* %8
%124 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%125 = load i32, i32* %124
%126 = call i32 @printinginfo(i32 %125, i8** %122, i32 %123, i32 0)
%127 = load i8**, i8*** %5
%128 = load i32, i32* %8
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds i8*, i8** %127, i64 %129
%131 = load i8*, i8** %130
%132 = load i8**, i8*** %5
%133 = load i32, i32* %8
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds i8*, i8** %132, i64 %134
%136 = load i8*, i8** %135
%137 = call i32 @mystrlen(i8* %136)
%138 = sext i32 %137 to i64
%139 = trunc i64 %138 to i32
%140 = call i32 @write(i32 1, i8* %131, i32 %139)
%141 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %196
142: ; preds = %114
%143 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%144 = load i32, i32* %143
%145 = load i32, i32* @S_IFMT
%146 = and i32 %144, %145
%147 = load i32, i32* @S_IFDIR
%148 = icmp eq i32 %146, %147
br i1 %148, label %149, label %153
149: ; preds = %142
%150 = load i8**, i8*** %5
%151 = load i32, i32* %8
%152 = call i32 @listdir(i8** %150, i32 %151, i32 1, i32 0, i32 0)
br label %195
153: ; preds = %142
%154 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%155 = load i32, i32* %154
%156 = load i32, i32* @S_IFMT
%157 = and i32 %155, %156
%158 = load i32, i32* @S_IFLNK
%159 = icmp eq i32 %157, %158
br i1 %159, label %160, label %194
160: ; preds = %153
%161 = load i8**, i8*** %5
%162 = load i32, i32* %8
%163 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%164 = load i32, i32* %163
%165 = call i32 @printinginfo(i32 %164, i8** %161, i32 %162, i32 0)
%166 = call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%167 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %166)
%168 = load i8**, i8*** %5
%169 = load i32, i32* %8
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i8*, i8** %168, i64 %170
%172 = load i8*, i8** %171
%173 = load i8**, i8*** %5
%174 = load i32, i32* %8
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i8*, i8** %173, i64 %175
%177 = load i8*, i8** %176
%178 = call i32 @mystrlen(i8* %177)
%179 = sext i32 %178 to i64
%180 = trunc i64 %179 to i32
%181 = call i32 @write(i32 1, i8* %172, i32 %180)
%182 = call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%183 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %182)
%184 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%185 = load i8**, i8*** %5
%186 = load i32, i32* %8
%187 = sext i32 %186 to i64
%188 = getelementptr inbounds i8*, i8** %185, i64 %187
%189 = load i8*, i8** %188
%190 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%191 = load i32, i32* %190
%192 = call i32 @read_link(i8* %189, i32 %191)
%193 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %194
194: ; preds = %160, %153
br label %195
195: ; preds = %194, %149
br label %196
196: ; preds = %195, %121
br label %750
197: ; preds = %104, %96
%198 = load i8**, i8*** %5
%199 = load i32, i32* %7
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8*, i8** %198, i64 %200
%202 = load i8*, i8** %201
%203 = call i32 @mystrlen(i8* %202)
%204 = icmp eq i32 %203, 2
br i1 %204, label %205, label %251
205: ; preds = %197
%206 = load i8**, i8*** %5
%207 = load i32, i32* %7
%208 = sext i32 %207 to i64
%209 = getelementptr inbounds i8*, i8** %206, i64 %208
%210 = load i8*, i8** %209
%211 = getelementptr inbounds i8, i8* %210, i64 1
%212 = load i8, i8* %211
%213 = sext i8 %212 to i32
%214 = icmp eq i32 %213, 97
br i1 %214, label %215, label %251
215: ; preds = %205
%216 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%217 = load i32, i32* %216
%218 = load i32, i32* @S_IFMT
%219 = and i32 %217, %218
%220 = load i32, i32* @S_IFREG
%221 = icmp eq i32 %219, %220
br i1 %221, label %222, label %238
222: ; preds = %215
%223 = load i8**, i8*** %5
%224 = load i32, i32* %8
%225 = sext i32 %224 to i64
%226 = getelementptr inbounds i8*, i8** %223, i64 %225
%227 = load i8*, i8** %226
%228 = load i8**, i8*** %5
%229 = load i32, i32* %8
%230 = sext i32 %229 to i64
%231 = getelementptr inbounds i8*, i8** %228, i64 %230
%232 = load i8*, i8** %231
%233 = call i32 @mystrlen(i8* %232)
%234 = sext i32 %233 to i64
%235 = trunc i64 %234 to i32
%236 = call i32 @write(i32 1, i8* %227, i32 %235)
%237 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %250
238: ; preds = %215
%239 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%240 = load i32, i32* %239
%241 = load i32, i32* @S_IFMT
%242 = and i32 %240, %241
%243 = load i32, i32* @S_IFDIR
%244 = icmp eq i32 %242, %243
br i1 %244, label %245, label %249
245: ; preds = %238
%246 = load i8**, i8*** %5
%247 = load i32, i32* %8
%248 = call i32 @listdir(i8** %246, i32 %247, i32 0, i32 1, i32 0)
br label %249
249: ; preds = %245, %238
br label %250
250: ; preds = %249, %222
br label %749
251: ; preds = %205, %197
%252 = load i8**, i8*** %5
%253 = load i32, i32* %7
%254 = sext i32 %253 to i64
%255 = getelementptr inbounds i8*, i8** %252, i64 %254
%256 = load i8*, i8** %255
%257 = call i32 @mystrlen(i8* %256)
%258 = icmp eq i32 %257, 2
br i1 %258, label %259, label %305
259: ; preds = %251
%260 = load i8**, i8*** %5
%261 = load i32, i32* %7
%262 = sext i32 %261 to i64
%263 = getelementptr inbounds i8*, i8** %260, i64 %262
%264 = load i8*, i8** %263
%265 = getelementptr inbounds i8, i8* %264, i64 1
%266 = load i8, i8* %265
%267 = sext i8 %266 to i32
%268 = icmp eq i32 %267, 104
br i1 %268, label %269, label %305
269: ; preds = %259
%270 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%271 = load i32, i32* %270
%272 = load i32, i32* @S_IFMT
%273 = and i32 %271, %272
%274 = load i32, i32* @S_IFREG
%275 = icmp eq i32 %273, %274
br i1 %275, label %276, label %292
276: ; preds = %269
%277 = load i8**, i8*** %5
%278 = load i32, i32* %8
%279 = sext i32 %278 to i64
%280 = getelementptr inbounds i8*, i8** %277, i64 %279
%281 = load i8*, i8** %280
%282 = load i8**, i8*** %5
%283 = load i32, i32* %8
%284 = sext i32 %283 to i64
%285 = getelementptr inbounds i8*, i8** %282, i64 %284
%286 = load i8*, i8** %285
%287 = call i32 @mystrlen(i8* %286)
%288 = sext i32 %287 to i64
%289 = trunc i64 %288 to i32
%290 = call i32 @write(i32 1, i8* %281, i32 %289)
%291 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %304
292: ; preds = %269
%293 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%294 = load i32, i32* %293
%295 = load i32, i32* @S_IFMT
%296 = and i32 %294, %295
%297 = load i32, i32* @S_IFDIR
%298 = icmp eq i32 %296, %297
br i1 %298, label %299, label %303
299: ; preds = %292
%300 = load i8**, i8*** %5
%301 = load i32, i32* %8
%302 = call i32 @listdir(i8** %300, i32 %301, i32 0, i32 0, i32 1)
br label %303
303: ; preds = %299, %292
br label %304
304: ; preds = %303, %276
br label %748
305: ; preds = %259, %251
%306 = load i8**, i8*** %5
%307 = load i32, i32* %7
%308 = sext i32 %307 to i64
%309 = getelementptr inbounds i8*, i8** %306, i64 %308
%310 = load i8*, i8** %309
%311 = call i32 @mystrlen(i8* %310)
%312 = icmp eq i32 %311, 3
br i1 %312, label %313, label %436
313: ; preds = %305
%314 = load i8**, i8*** %5
%315 = load i32, i32* %7
%316 = sext i32 %315 to i64
%317 = getelementptr inbounds i8*, i8** %314, i64 %316
%318 = load i8*, i8** %317
%319 = getelementptr inbounds i8, i8* %318, i64 1
%320 = load i8, i8* %319
%321 = sext i8 %320 to i32
%322 = icmp eq i32 %321, 97
br i1 %322, label %323, label %333
323: ; preds = %313
%324 = load i8**, i8*** %5
%325 = load i32, i32* %7
%326 = sext i32 %325 to i64
%327 = getelementptr inbounds i8*, i8** %324, i64 %326
%328 = load i8*, i8** %327
%329 = getelementptr inbounds i8, i8* %328, i64 2
%330 = load i8, i8* %329
%331 = sext i8 %330 to i32
%332 = icmp eq i32 %331, 108
br i1 %332, label %353, label %333
333: ; preds = %323, %313
%334 = load i8**, i8*** %5
%335 = load i32, i32* %7
%336 = sext i32 %335 to i64
%337 = getelementptr inbounds i8*, i8** %334, i64 %336
%338 = load i8*, i8** %337
%339 = getelementptr inbounds i8, i8* %338, i64 1
%340 = load i8, i8* %339
%341 = sext i8 %340 to i32
%342 = icmp eq i32 %341, 108
br i1 %342, label %343, label %436
343: ; preds = %333
%344 = load i8**, i8*** %5
%345 = load i32, i32* %7
%346 = sext i32 %345 to i64
%347 = getelementptr inbounds i8*, i8** %344, i64 %346
%348 = load i8*, i8** %347
%349 = getelementptr inbounds i8, i8* %348, i64 2
%350 = load i8, i8* %349
%351 = sext i8 %350 to i32
%352 = icmp eq i32 %351, 97
br i1 %352, label %353, label %436
353: ; preds = %343, %323
%354 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%355 = load i32, i32* %354
%356 = load i32, i32* @S_IFMT
%357 = and i32 %355, %356
%358 = load i32, i32* @S_IFREG
%359 = icmp eq i32 %357, %358
br i1 %359, label %360, label %381
360: ; preds = %353
%361 = load i8**, i8*** %5
%362 = load i32, i32* %8
%363 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%364 = load i32, i32* %363
%365 = call i32 @printinginfo(i32 %364, i8** %361, i32 %362, i32 0)
%366 = load i8**, i8*** %5
%367 = load i32, i32* %8
%368 = sext i32 %367 to i64
%369 = getelementptr inbounds i8*, i8** %366, i64 %368
%370 = load i8*, i8** %369
%371 = load i8**, i8*** %5
%372 = load i32, i32* %8
%373 = sext i32 %372 to i64
%374 = getelementptr inbounds i8*, i8** %371, i64 %373
%375 = load i8*, i8** %374
%376 = call i32 @mystrlen(i8* %375)
%377 = sext i32 %376 to i64
%378 = trunc i64 %377 to i32
%379 = call i32 @write(i32 1, i8* %370, i32 %378)
%380 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %435
381: ; preds = %353
%382 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%383 = load i32, i32* %382
%384 = load i32, i32* @S_IFMT
%385 = and i32 %383, %384
%386 = load i32, i32* @S_IFDIR
%387 = icmp eq i32 %385, %386
br i1 %387, label %388, label %392
388: ; preds = %381
%389 = load i8**, i8*** %5
%390 = load i32, i32* %8
%391 = call i32 @listdir(i8** %389, i32 %390, i32 1, i32 1, i32 0)
br label %434
392: ; preds = %381
%393 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%394 = load i32, i32* %393
%395 = load i32, i32* @S_IFMT
%396 = and i32 %394, %395
%397 = load i32, i32* @S_IFLNK
%398 = icmp eq i32 %396, %397
br i1 %398, label %399, label %433
399: ; preds = %392
%400 = load i8**, i8*** %5
%401 = load i32, i32* %8
%402 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%403 = load i32, i32* %402
%404 = call i32 @printinginfo(i32 %403, i8** %400, i32 %401, i32 0)
%405 = call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%406 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %405)
%407 = load i8**, i8*** %5
%408 = load i32, i32* %8
%409 = sext i32 %408 to i64
%410 = getelementptr inbounds i8*, i8** %407, i64 %409
%411 = load i8*, i8** %410
%412 = load i8**, i8*** %5
%413 = load i32, i32* %8
%414 = sext i32 %413 to i64
%415 = getelementptr inbounds i8*, i8** %412, i64 %414
%416 = load i8*, i8** %415
%417 = call i32 @mystrlen(i8* %416)
%418 = sext i32 %417 to i64
%419 = trunc i64 %418 to i32
%420 = call i32 @write(i32 1, i8* %411, i32 %419)
%421 = call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%422 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %421)
%423 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%424 = load i8**, i8*** %5
%425 = load i32, i32* %8
%426 = sext i32 %425 to i64
%427 = getelementptr inbounds i8*, i8** %424, i64 %426
%428 = load i8*, i8** %427
%429 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%430 = load i32, i32* %429
%431 = call i32 @read_link(i8* %428, i32 %430)
%432 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %433
433: ; preds = %399, %392
br label %434
434: ; preds = %433, %388
br label %435
435: ; preds = %434, %360
br label %747
436: ; preds = %343, %333, %305
%437 = load i8**, i8*** %5
%438 = load i32, i32* %7
%439 = sext i32 %438 to i64
%440 = getelementptr inbounds i8*, i8** %437, i64 %439
%441 = load i8*, i8** %440
%442 = call i32 @mystrlen(i8* %441)
%443 = icmp eq i32 %442, 3
br i1 %443, label %444, label %520
444: ; preds = %436
%445 = load i8**, i8*** %5
%446 = load i32, i32* %7
%447 = sext i32 %446 to i64
%448 = getelementptr inbounds i8*, i8** %445, i64 %447
%449 = load i8*, i8** %448
%450 = getelementptr inbounds i8, i8* %449, i64 1
%451 = load i8, i8* %450
%452 = sext i8 %451 to i32
%453 = icmp eq i32 %452, 97
br i1 %453, label %454, label %464
454: ; preds = %444
%455 = load i8**, i8*** %5
%456 = load i32, i32* %7
%457 = sext i32 %456 to i64
%458 = getelementptr inbounds i8*, i8** %455, i64 %457
%459 = load i8*, i8** %458
%460 = getelementptr inbounds i8, i8* %459, i64 2
%461 = load i8, i8* %460
%462 = sext i8 %461 to i32
%463 = icmp eq i32 %462, 104
br i1 %463, label %484, label %464
464: ; preds = %454, %444
%465 = load i8**, i8*** %5
%466 = load i32, i32* %7
%467 = sext i32 %466 to i64
%468 = getelementptr inbounds i8*, i8** %465, i64 %467
%469 = load i8*, i8** %468
%470 = getelementptr inbounds i8, i8* %469, i64 1
%471 = load i8, i8* %470
%472 = sext i8 %471 to i32
%473 = icmp eq i32 %472, 104
br i1 %473, label %474, label %520
474: ; preds = %464
%475 = load i8**, i8*** %5
%476 = load i32, i32* %7
%477 = sext i32 %476 to i64
%478 = getelementptr inbounds i8*, i8** %475, i64 %477
%479 = load i8*, i8** %478
%480 = getelementptr inbounds i8, i8* %479, i64 2
%481 = load i8, i8* %480
%482 = sext i8 %481 to i32
%483 = icmp eq i32 %482, 97
br i1 %483, label %484, label %520
484: ; preds = %474, %454
%485 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%486 = load i32, i32* %485
%487 = load i32, i32* @S_IFMT
%488 = and i32 %486, %487
%489 = load i32, i32* @S_IFREG
%490 = icmp eq i32 %488, %489
br i1 %490, label %491, label %507
491: ; preds = %484
%492 = load i8**, i8*** %5
%493 = load i32, i32* %8
%494 = sext i32 %493 to i64
%495 = getelementptr inbounds i8*, i8** %492, i64 %494
%496 = load i8*, i8** %495
%497 = load i8**, i8*** %5
%498 = load i32, i32* %8
%499 = sext i32 %498 to i64
%500 = getelementptr inbounds i8*, i8** %497, i64 %499
%501 = load i8*, i8** %500
%502 = call i32 @mystrlen(i8* %501)
%503 = sext i32 %502 to i64
%504 = trunc i64 %503 to i32
%505 = call i32 @write(i32 1, i8* %496, i32 %504)
%506 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %519
507: ; preds = %484
%508 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%509 = load i32, i32* %508
%510 = load i32, i32* @S_IFMT
%511 = and i32 %509, %510
%512 = load i32, i32* @S_IFDIR
%513 = icmp eq i32 %511, %512
br i1 %513, label %514, label %518
514: ; preds = %507
%515 = load i8**, i8*** %5
%516 = load i32, i32* %8
%517 = call i32 @listdir(i8** %515, i32 %516, i32 0, i32 1, i32 1)
br label %518
518: ; preds = %514, %507
br label %519
519: ; preds = %518, %491
br label %746
520: ; preds = %474, %464, %436
%521 = load i8**, i8*** %5
%522 = load i32, i32* %7
%523 = sext i32 %522 to i64
%524 = getelementptr inbounds i8*, i8** %521, i64 %523
%525 = load i8*, i8** %524
%526 = call i32 @mystrlen(i8* %525)
%527 = icmp eq i32 %526, 3
br i1 %527, label %528, label %651
528: ; preds = %520
%529 = load i8**, i8*** %5
%530 = load i32, i32* %7
%531 = sext i32 %530 to i64
%532 = getelementptr inbounds i8*, i8** %529, i64 %531
%533 = load i8*, i8** %532
%534 = getelementptr inbounds i8, i8* %533, i64 1
%535 = load i8, i8* %534
%536 = sext i8 %535 to i32
%537 = icmp eq i32 %536, 104
br i1 %537, label %538, label %548
538: ; preds = %528
%539 = load i8**, i8*** %5
%540 = load i32, i32* %7
%541 = sext i32 %540 to i64
%542 = getelementptr inbounds i8*, i8** %539, i64 %541
%543 = load i8*, i8** %542
%544 = getelementptr inbounds i8, i8* %543, i64 2
%545 = load i8, i8* %544
%546 = sext i8 %545 to i32
%547 = icmp eq i32 %546, 108
br i1 %547, label %568, label %548
548: ; preds = %538, %528
%549 = load i8**, i8*** %5
%550 = load i32, i32* %7
%551 = sext i32 %550 to i64
%552 = getelementptr inbounds i8*, i8** %549, i64 %551
%553 = load i8*, i8** %552
%554 = getelementptr inbounds i8, i8* %553, i64 1
%555 = load i8, i8* %554
%556 = sext i8 %555 to i32
%557 = icmp eq i32 %556, 108
br i1 %557, label %558, label %651
558: ; preds = %548
%559 = load i8**, i8*** %5
%560 = load i32, i32* %7
%561 = sext i32 %560 to i64
%562 = getelementptr inbounds i8*, i8** %559, i64 %561
%563 = load i8*, i8** %562
%564 = getelementptr inbounds i8, i8* %563, i64 2
%565 = load i8, i8* %564
%566 = sext i8 %565 to i32
%567 = icmp eq i32 %566, 104
br i1 %567, label %568, label %651
568: ; preds = %558, %538
%569 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%570 = load i32, i32* %569
%571 = load i32, i32* @S_IFMT
%572 = and i32 %570, %571
%573 = load i32, i32* @S_IFREG
%574 = icmp eq i32 %572, %573
br i1 %574, label %575, label %596
575: ; preds = %568
%576 = load i8**, i8*** %5
%577 = load i32, i32* %8
%578 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%579 = load i32, i32* %578
%580 = call i32 @printinginfo(i32 %579, i8** %576, i32 %577, i32 1)
%581 = load i8**, i8*** %5
%582 = load i32, i32* %8
%583 = sext i32 %582 to i64
%584 = getelementptr inbounds i8*, i8** %581, i64 %583
%585 = load i8*, i8** %584
%586 = load i8**, i8*** %5
%587 = load i32, i32* %8
%588 = sext i32 %587 to i64
%589 = getelementptr inbounds i8*, i8** %586, i64 %588
%590 = load i8*, i8** %589
%591 = call i32 @mystrlen(i8* %590)
%592 = sext i32 %591 to i64
%593 = trunc i64 %592 to i32
%594 = call i32 @write(i32 1, i8* %585, i32 %593)
%595 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %650
596: ; preds = %568
%597 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%598 = load i32, i32* %597
%599 = load i32, i32* @S_IFMT
%600 = and i32 %598, %599
%601 = load i32, i32* @S_IFDIR
%602 = icmp eq i32 %600, %601
br i1 %602, label %603, label %607
603: ; preds = %596
%604 = load i8**, i8*** %5
%605 = load i32, i32* %8
%606 = call i32 @listdir(i8** %604, i32 %605, i32 1, i32 0, i32 1)
br label %649
607: ; preds = %596
%608 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%609 = load i32, i32* %608
%610 = load i32, i32* @S_IFMT
%611 = and i32 %609, %610
%612 = load i32, i32* @S_IFLNK
%613 = icmp eq i32 %611, %612
br i1 %613, label %614, label %648
614: ; preds = %607
%615 = load i8**, i8*** %5
%616 = load i32, i32* %8
%617 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%618 = load i32, i32* %617
%619 = call i32 @printinginfo(i32 %618, i8** %615, i32 %616, i32 0)
%620 = call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%621 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %620)
%622 = load i8**, i8*** %5
%623 = load i32, i32* %8
%624 = sext i32 %623 to i64
%625 = getelementptr inbounds i8*, i8** %622, i64 %624
%626 = load i8*, i8** %625
%627 = load i8**, i8*** %5
%628 = load i32, i32* %8
%629 = sext i32 %628 to i64
%630 = getelementptr inbounds i8*, i8** %627, i64 %629
%631 = load i8*, i8** %630
%632 = call i32 @mystrlen(i8* %631)
%633 = sext i32 %632 to i64
%634 = trunc i64 %633 to i32
%635 = call i32 @write(i32 1, i8* %626, i32 %634)
%636 = call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%637 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %636)
%638 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%639 = load i8**, i8*** %5
%640 = load i32, i32* %8
%641 = sext i32 %640 to i64
%642 = getelementptr inbounds i8*, i8** %639, i64 %641
%643 = load i8*, i8** %642
%644 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%645 = load i32, i32* %644
%646 = call i32 @read_link(i8* %643, i32 %645)
%647 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %648
648: ; preds = %614, %607
br label %649
649: ; preds = %648, %603
br label %650
650: ; preds = %649, %575
br label %745
651: ; preds = %558, %548, %520
%652 = load i8**, i8*** %5
%653 = load i32, i32* %7
%654 = sext i32 %653 to i64
%655 = getelementptr inbounds i8*, i8** %652, i64 %654
%656 = load i8*, i8** %655
%657 = call i32 @mystrlen(i8* %656)
%658 = icmp eq i32 %657, 4
br i1 %658, label %659, label %742
659: ; preds = %651
%660 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%661 = load i32, i32* %660
%662 = load i32, i32* @S_IFMT
%663 = and i32 %661, %662
%664 = load i32, i32* @S_IFREG
%665 = icmp eq i32 %663, %664
br i1 %665, label %666, label %687
666: ; preds = %659
%667 = load i8**, i8*** %5
%668 = load i32, i32* %8
%669 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%670 = load i32, i32* %669
%671 = call i32 @printinginfo(i32 %670, i8** %667, i32 %668, i32 1)
%672 = load i8**, i8*** %5
%673 = load i32, i32* %8
%674 = sext i32 %673 to i64
%675 = getelementptr inbounds i8*, i8** %672, i64 %674
%676 = load i8*, i8** %675
%677 = load i8**, i8*** %5
%678 = load i32, i32* %8
%679 = sext i32 %678 to i64
%680 = getelementptr inbounds i8*, i8** %677, i64 %679
%681 = load i8*, i8** %680
%682 = call i32 @mystrlen(i8* %681)
%683 = sext i32 %682 to i64
%684 = trunc i64 %683 to i32
%685 = call i32 @write(i32 1, i8* %676, i32 %684)
%686 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %741
687: ; preds = %659
%688 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%689 = load i32, i32* %688
%690 = load i32, i32* @S_IFMT
%691 = and i32 %689, %690
%692 = load i32, i32* @S_IFDIR
%693 = icmp eq i32 %691, %692
br i1 %693, label %694, label %698
694: ; preds = %687
%695 = load i8**, i8*** %5
%696 = load i32, i32* %8
%697 = call i32 @listdir(i8** %695, i32 %696, i32 1, i32 1, i32 1)
br label %740
698: ; preds = %687
%699 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%700 = load i32, i32* %699
%701 = load i32, i32* @S_IFMT
%702 = and i32 %700, %701
%703 = load i32, i32* @S_IFLNK
%704 = icmp eq i32 %702, %703
br i1 %704, label %705, label %739
705: ; preds = %698
%706 = load i8**, i8*** %5
%707 = load i32, i32* %8
%708 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%709 = load i32, i32* %708
%710 = call i32 @printinginfo(i32 %709, i8** %706, i32 %707, i32 0)
%711 = call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%712 = call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %711)
%713 = load i8**, i8*** %5
%714 = load i32, i32* %8
%715 = sext i32 %714 to i64
%716 = getelementptr inbounds i8*, i8** %713, i64 %715
%717 = load i8*, i8** %716
%718 = load i8**, i8*** %5
%719 = load i32, i32* %8
%720 = sext i32 %719 to i64
%721 = getelementptr inbounds i8*, i8** %718, i64 %720
%722 = load i8*, i8** %721
%723 = call i32 @mystrlen(i8* %722)
%724 = sext i32 %723 to i64
%725 = trunc i64 %724 to i32
%726 = call i32 @write(i32 1, i8* %717, i32 %725)
%727 = call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%728 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %727)
%729 = call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%730 = load i8**, i8*** %5
%731 = load i32, i32* %8
%732 = sext i32 %731 to i64
%733 = getelementptr inbounds i8*, i8** %730, i64 %732
%734 = load i8*, i8** %733
%735 = getelementptr inbounds %struct.stat, %struct.stat* %9, i32 0, i32 0
%736 = load i32, i32* %735
%737 = call i32 @read_link(i8* %734, i32 %736)
%738 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %739
739: ; preds = %705, %698
br label %740
740: ; preds = %739, %694
br label %741
741: ; preds = %740, %666
br label %744
742: ; preds = %651
%743 = call i32 @write(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 24)
br label %744
744: ; preds = %742, %741
br label %745
745: ; preds = %744, %650
br label %746
746: ; preds = %745, %519
br label %747
747: ; preds = %746, %435
br label %748
748: ; preds = %747, %304
br label %749
749: ; preds = %748, %250
br label %750
750: ; preds = %749, %196
br label %751
751: ; preds = %750, %93
br label %752
752: ; preds = %47, %751, %92
%753 = load i32, i32* %3
ret i32 %753
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@.str = [21 x i8] c"Provide folder name\0A\00"
@S_IFMT = global i32 0
@S_IFREG = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@S_IFDIR = global i32 0
@S_IFLNK = global i32 0
@.str.2 = [10 x i8] c"\1B[1m\1B[36m\00"
@.str.3 = [5 x i8] c"\1B[0m\00"
@.str.4 = [5 x i8] c" -> \00"
@.str.5 = [24 x i8] c"command not recognized\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.stat
%4 = icmp slt i32 %0, 2
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = zext i32 %0 to i64
%7 = add nsw i64 %6, -1
%8 = and i64 %6, 3
%9 = icmp ult i64 %7, 3
br i1 %9, label %54, label %10
10: ; preds = %5
%11 = and i64 %6, 4294967292
br label %15
12: ; preds = %2
%13 = tail call i32 @perror(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%14 = tail call i32 @_exit(i32 1)
unreachable
15: ; preds = %15, %10
%16 = phi i64 [ 0, %10 ], [ %51, %15 ]
%17 = phi i32 [ undef, %10 ], [ %50, %15 ]
%18 = phi i32 [ undef, %10 ], [ %49, %15 ]
%19 = phi i64 [ 0, %10 ], [ %52, %15 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 %16
%21 = load i8*, i8** %20
%22 = load i8, i8* %21
%23 = icmp eq i8 %22, 45
%24 = trunc i64 %16 to i32
%25 = select i1 %23, i32 %24, i32 %18
%26 = select i1 %23, i32 %17, i32 %24
%27 = or i64 %16, 1
%28 = getelementptr inbounds i8*, i8** %1, i64 %27
%29 = load i8*, i8** %28
%30 = load i8, i8* %29
%31 = icmp eq i8 %30, 45
%32 = trunc i64 %27 to i32
%33 = select i1 %31, i32 %32, i32 %25
%34 = select i1 %31, i32 %26, i32 %32
%35 = or i64 %16, 2
%36 = getelementptr inbounds i8*, i8** %1, i64 %35
%37 = load i8*, i8** %36
%38 = load i8, i8* %37
%39 = icmp eq i8 %38, 45
%40 = trunc i64 %35 to i32
%41 = select i1 %39, i32 %40, i32 %33
%42 = select i1 %39, i32 %34, i32 %40
%43 = or i64 %16, 3
%44 = getelementptr inbounds i8*, i8** %1, i64 %43
%45 = load i8*, i8** %44
%46 = load i8, i8* %45
%47 = icmp eq i8 %46, 45
%48 = trunc i64 %43 to i32
%49 = select i1 %47, i32 %48, i32 %41
%50 = select i1 %47, i32 %42, i32 %48
%51 = add nuw nsw i64 %16, 4
%52 = add i64 %19, 4
%53 = icmp eq i64 %52, %11
br i1 %53, label %54, label %15
54: ; preds = %15, %5
%55 = phi i64 [ 0, %5 ], [ %51, %15 ]
%56 = phi i32 [ undef, %5 ], [ %50, %15 ]
%57 = phi i32 [ undef, %5 ], [ %49, %15 ]
%58 = icmp eq i64 %8, 0
br i1 %58, label %74, label %59
59: ; preds = %54, %59
%60 = phi i64 [ %71, %59 ], [ %55, %54 ]
%61 = phi i32 [ %70, %59 ], [ %56, %54 ]
%62 = phi i32 [ %69, %59 ], [ %57, %54 ]
%63 = phi i64 [ %72, %59 ], [ 0, %54 ]
%64 = getelementptr inbounds i8*, i8** %1, i64 %60
%65 = load i8*, i8** %64
%66 = load i8, i8* %65
%67 = icmp eq i8 %66, 45
%68 = trunc i64 %60 to i32
%69 = select i1 %67, i32 %68, i32 %62
%70 = select i1 %67, i32 %61, i32 %68
%71 = add nuw nsw i64 %60, 1
%72 = add i64 %63, 1
%73 = icmp eq i64 %72, %8
br i1 %73, label %74, label %59
74: ; preds = %59, %54
%75 = phi i32 [ %57, %54 ], [ %69, %59 ]
%76 = phi i32 [ %56, %54 ], [ %70, %59 ]
%77 = bitcast %struct.stat* %3 to i8*
%78 = sext i32 %76 to i64
%79 = getelementptr inbounds i8*, i8** %1, i64 %78
%80 = load i8*, i8** %79
%81 = call i64 @lstat(i8* %80, %struct.stat* %3)
%82 = icmp slt i64 %81, 0
br i1 %82, label %83, label %86
83: ; preds = %74
%84 = load i8*, i8** %79
%85 = tail call i32 @perror(i8* %84)
br label %368
86: ; preds = %74
switch i32 %0, label %368 [
i32 2, label %87
i32 3, label %104
]
87: ; preds = %86
%88 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%89 = load i32, i32* %88
%90 = load i32, i32* @S_IFMT
%91 = and i32 %90, %89
%92 = load i32, i32* @S_IFREG
%93 = icmp eq i32 %91, %92
br i1 %93, label %94, label %99
94: ; preds = %87
%95 = load i8*, i8** %79
%96 = tail call i32 @mystrlen(i8* %95)
%97 = tail call i32 @write(i32 1, i8* %95, i32 %96)
%98 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
99: ; preds = %87
%100 = load i32, i32* @S_IFDIR
%101 = icmp eq i32 %91, %100
br i1 %101, label %102, label %368
102: ; preds = %99
%103 = tail call i32 @listdir(i8** %1, i32 %76, i32 0, i32 0, i32 0)
br label %368
104: ; preds = %86
%105 = sext i32 %75 to i64
%106 = getelementptr inbounds i8*, i8** %1, i64 %105
%107 = load i8*, i8** %106
%108 = tail call i32 @mystrlen(i8* %107)
%109 = icmp eq i32 %108, 2
%110 = load i8*, i8** %106
br i1 %109, label %111, label %149
111: ; preds = %104
%112 = getelementptr inbounds i8, i8* %110, i64 1
%113 = load i8, i8* %112
%114 = icmp eq i8 %113, 108
br i1 %114, label %115, label %149
115: ; preds = %111
%116 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%117 = load i32, i32* %116
%118 = load i32, i32* @S_IFMT
%119 = and i32 %118, %117
%120 = load i32, i32* @S_IFREG
%121 = icmp eq i32 %119, %120
br i1 %121, label %122, label %128
122: ; preds = %115
%123 = tail call i32 @printinginfo(i32 %117, i8** %1, i32 %76, i32 0)
%124 = load i8*, i8** %79
%125 = tail call i32 @mystrlen(i8* %124)
%126 = tail call i32 @write(i32 1, i8* %124, i32 %125)
%127 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
128: ; preds = %115
%129 = load i32, i32* @S_IFDIR
%130 = icmp eq i32 %119, %129
br i1 %130, label %131, label %133
131: ; preds = %128
%132 = tail call i32 @listdir(i8** %1, i32 %76, i32 1, i32 0, i32 0)
br label %368
133: ; preds = %128
%134 = load i32, i32* @S_IFLNK
%135 = icmp eq i32 %119, %134
br i1 %135, label %136, label %368
136: ; preds = %133
%137 = tail call i32 @printinginfo(i32 %117, i8** %1, i32 %76, i32 0)
%138 = tail call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%139 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %138)
%140 = load i8*, i8** %79
%141 = tail call i32 @mystrlen(i8* %140)
%142 = tail call i32 @write(i32 1, i8* %140, i32 %141)
%143 = tail call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%144 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %143)
%145 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%146 = load i8*, i8** %79
%147 = tail call i32 @read_link(i8* %146, i32 %117)
%148 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
149: ; preds = %104, %111
%150 = tail call i32 @mystrlen(i8* %110)
%151 = icmp eq i32 %150, 2
%152 = load i8*, i8** %106
br i1 %151, label %153, label %174
153: ; preds = %149
%154 = getelementptr inbounds i8, i8* %152, i64 1
%155 = load i8, i8* %154
%156 = icmp eq i8 %155, 97
br i1 %156, label %157, label %174
157: ; preds = %153
%158 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%159 = load i32, i32* %158
%160 = load i32, i32* @S_IFMT
%161 = and i32 %160, %159
%162 = load i32, i32* @S_IFREG
%163 = icmp eq i32 %161, %162
br i1 %163, label %164, label %169
164: ; preds = %157
%165 = load i8*, i8** %79
%166 = tail call i32 @mystrlen(i8* %165)
%167 = tail call i32 @write(i32 1, i8* %165, i32 %166)
%168 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
169: ; preds = %157
%170 = load i32, i32* @S_IFDIR
%171 = icmp eq i32 %161, %170
br i1 %171, label %172, label %368
172: ; preds = %169
%173 = tail call i32 @listdir(i8** %1, i32 %76, i32 0, i32 1, i32 0)
br label %368
174: ; preds = %149, %153
%175 = tail call i32 @mystrlen(i8* %152)
%176 = icmp eq i32 %175, 2
%177 = load i8*, i8** %106
br i1 %176, label %178, label %199
178: ; preds = %174
%179 = getelementptr inbounds i8, i8* %177, i64 1
%180 = load i8, i8* %179
%181 = icmp eq i8 %180, 104
br i1 %181, label %182, label %199
182: ; preds = %178
%183 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%184 = load i32, i32* %183
%185 = load i32, i32* @S_IFMT
%186 = and i32 %185, %184
%187 = load i32, i32* @S_IFREG
%188 = icmp eq i32 %186, %187
br i1 %188, label %189, label %194
189: ; preds = %182
%190 = load i8*, i8** %79
%191 = tail call i32 @mystrlen(i8* %190)
%192 = tail call i32 @write(i32 1, i8* %190, i32 %191)
%193 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
194: ; preds = %182
%195 = load i32, i32* @S_IFDIR
%196 = icmp eq i32 %186, %195
br i1 %196, label %197, label %368
197: ; preds = %194
%198 = tail call i32 @listdir(i8** %1, i32 %76, i32 0, i32 0, i32 1)
br label %368
199: ; preds = %174, %178
%200 = tail call i32 @mystrlen(i8* %177)
%201 = icmp eq i32 %200, 3
%202 = load i8*, i8** %106
br i1 %201, label %203, label %248
203: ; preds = %199
%204 = getelementptr inbounds i8, i8* %202, i64 1
%205 = load i8, i8* %204
switch i8 %205, label %248 [
i8 97, label %206
i8 108, label %210
]
206: ; preds = %203
%207 = getelementptr inbounds i8, i8* %202, i64 2
%208 = load i8, i8* %207
%209 = icmp eq i8 %208, 108
br i1 %209, label %214, label %248
210: ; preds = %203
%211 = getelementptr inbounds i8, i8* %202, i64 2
%212 = load i8, i8* %211
%213 = icmp eq i8 %212, 97
br i1 %213, label %214, label %248
214: ; preds = %210, %206
%215 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%216 = load i32, i32* %215
%217 = load i32, i32* @S_IFMT
%218 = and i32 %217, %216
%219 = load i32, i32* @S_IFREG
%220 = icmp eq i32 %218, %219
br i1 %220, label %221, label %227
221: ; preds = %214
%222 = tail call i32 @printinginfo(i32 %216, i8** %1, i32 %76, i32 0)
%223 = load i8*, i8** %79
%224 = tail call i32 @mystrlen(i8* %223)
%225 = tail call i32 @write(i32 1, i8* %223, i32 %224)
%226 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
227: ; preds = %214
%228 = load i32, i32* @S_IFDIR
%229 = icmp eq i32 %218, %228
br i1 %229, label %230, label %232
230: ; preds = %227
%231 = tail call i32 @listdir(i8** %1, i32 %76, i32 1, i32 1, i32 0)
br label %368
232: ; preds = %227
%233 = load i32, i32* @S_IFLNK
%234 = icmp eq i32 %218, %233
br i1 %234, label %235, label %368
235: ; preds = %232
%236 = tail call i32 @printinginfo(i32 %216, i8** %1, i32 %76, i32 0)
%237 = tail call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%238 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %237)
%239 = load i8*, i8** %79
%240 = tail call i32 @mystrlen(i8* %239)
%241 = tail call i32 @write(i32 1, i8* %239, i32 %240)
%242 = tail call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%243 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %242)
%244 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%245 = load i8*, i8** %79
%246 = tail call i32 @read_link(i8* %245, i32 %216)
%247 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
248: ; preds = %199, %203, %206, %210
%249 = tail call i32 @mystrlen(i8* %202)
%250 = icmp eq i32 %249, 3
%251 = load i8*, i8** %106
br i1 %250, label %252, label %280
252: ; preds = %248
%253 = getelementptr inbounds i8, i8* %251, i64 1
%254 = load i8, i8* %253
switch i8 %254, label %280 [
i8 97, label %255
i8 104, label %259
]
255: ; preds = %252
%256 = getelementptr inbounds i8, i8* %251, i64 2
%257 = load i8, i8* %256
%258 = icmp eq i8 %257, 104
br i1 %258, label %263, label %280
259: ; preds = %252
%260 = getelementptr inbounds i8, i8* %251, i64 2
%261 = load i8, i8* %260
%262 = icmp eq i8 %261, 97
br i1 %262, label %263, label %280
263: ; preds = %259, %255
%264 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%265 = load i32, i32* %264
%266 = load i32, i32* @S_IFMT
%267 = and i32 %266, %265
%268 = load i32, i32* @S_IFREG
%269 = icmp eq i32 %267, %268
br i1 %269, label %270, label %275
270: ; preds = %263
%271 = load i8*, i8** %79
%272 = tail call i32 @mystrlen(i8* %271)
%273 = tail call i32 @write(i32 1, i8* %271, i32 %272)
%274 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
275: ; preds = %263
%276 = load i32, i32* @S_IFDIR
%277 = icmp eq i32 %267, %276
br i1 %277, label %278, label %368
278: ; preds = %275
%279 = tail call i32 @listdir(i8** %1, i32 %76, i32 0, i32 1, i32 1)
br label %368
280: ; preds = %248, %252, %255, %259
%281 = tail call i32 @mystrlen(i8* %251)
%282 = icmp eq i32 %281, 3
%283 = load i8*, i8** %106
br i1 %282, label %284, label %329
284: ; preds = %280
%285 = getelementptr inbounds i8, i8* %283, i64 1
%286 = load i8, i8* %285
switch i8 %286, label %329 [
i8 104, label %287
i8 108, label %291
]
287: ; preds = %284
%288 = getelementptr inbounds i8, i8* %283, i64 2
%289 = load i8, i8* %288
%290 = icmp eq i8 %289, 108
br i1 %290, label %295, label %329
291: ; preds = %284
%292 = getelementptr inbounds i8, i8* %283, i64 2
%293 = load i8, i8* %292
%294 = icmp eq i8 %293, 104
br i1 %294, label %295, label %329
295: ; preds = %291, %287
%296 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%297 = load i32, i32* %296
%298 = load i32, i32* @S_IFMT
%299 = and i32 %298, %297
%300 = load i32, i32* @S_IFREG
%301 = icmp eq i32 %299, %300
br i1 %301, label %302, label %308
302: ; preds = %295
%303 = tail call i32 @printinginfo(i32 %297, i8** %1, i32 %76, i32 1)
%304 = load i8*, i8** %79
%305 = tail call i32 @mystrlen(i8* %304)
%306 = tail call i32 @write(i32 1, i8* %304, i32 %305)
%307 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
308: ; preds = %295
%309 = load i32, i32* @S_IFDIR
%310 = icmp eq i32 %299, %309
br i1 %310, label %311, label %313
311: ; preds = %308
%312 = tail call i32 @listdir(i8** %1, i32 %76, i32 1, i32 0, i32 1)
br label %368
313: ; preds = %308
%314 = load i32, i32* @S_IFLNK
%315 = icmp eq i32 %299, %314
br i1 %315, label %316, label %368
316: ; preds = %313
%317 = tail call i32 @printinginfo(i32 %297, i8** %1, i32 %76, i32 0)
%318 = tail call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%319 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %318)
%320 = load i8*, i8** %79
%321 = tail call i32 @mystrlen(i8* %320)
%322 = tail call i32 @write(i32 1, i8* %320, i32 %321)
%323 = tail call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%324 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %323)
%325 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%326 = load i8*, i8** %79
%327 = tail call i32 @read_link(i8* %326, i32 %297)
%328 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
329: ; preds = %280, %284, %287, %291
%330 = tail call i32 @mystrlen(i8* %283)
%331 = icmp eq i32 %330, 4
br i1 %331, label %332, label %366
332: ; preds = %329
%333 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%334 = load i32, i32* %333
%335 = load i32, i32* @S_IFMT
%336 = and i32 %335, %334
%337 = load i32, i32* @S_IFREG
%338 = icmp eq i32 %336, %337
br i1 %338, label %339, label %345
339: ; preds = %332
%340 = tail call i32 @printinginfo(i32 %334, i8** %1, i32 %76, i32 1)
%341 = load i8*, i8** %79
%342 = tail call i32 @mystrlen(i8* %341)
%343 = tail call i32 @write(i32 1, i8* %341, i32 %342)
%344 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
345: ; preds = %332
%346 = load i32, i32* @S_IFDIR
%347 = icmp eq i32 %336, %346
br i1 %347, label %348, label %350
348: ; preds = %345
%349 = tail call i32 @listdir(i8** %1, i32 %76, i32 1, i32 1, i32 1)
br label %368
350: ; preds = %345
%351 = load i32, i32* @S_IFLNK
%352 = icmp eq i32 %336, %351
br i1 %352, label %353, label %368
353: ; preds = %350
%354 = tail call i32 @printinginfo(i32 %334, i8** %1, i32 %76, i32 0)
%355 = tail call i32 @mystrlen(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%356 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %355)
%357 = load i8*, i8** %79
%358 = tail call i32 @mystrlen(i8* %357)
%359 = tail call i32 @write(i32 1, i8* %357, i32 %358)
%360 = tail call i32 @mystrlen(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%361 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %360)
%362 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 4)
%363 = load i8*, i8** %79
%364 = tail call i32 @read_link(i8* %363, i32 %334)
%365 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i32 1)
br label %368
366: ; preds = %329
%367 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.5, i64 0, i64 0), i32 24)
br label %368
368: ; preds = %99, %102, %94, %131, %136, %133, %122, %194, %197, %189, %275, %278, %270, %366, %348, %353, %350, %339, %302, %313, %316, %311, %221, %232, %235, %230, %164, %172, %169, %86, %83
%369 = phi i32 [ 1, %83 ], [ 0, %86 ], [ 0, %169 ], [ 0, %172 ], [ 0, %164 ], [ 0, %230 ], [ 0, %235 ], [ 0, %232 ], [ 0, %221 ], [ 0, %311 ], [ 0, %316 ], [ 0, %313 ], [ 0, %302 ], [ 0, %339 ], [ 0, %350 ], [ 0, %353 ], [ 0, %348 ], [ 0, %366 ], [ 0, %270 ], [ 0, %278 ], [ 0, %275 ], [ 0, %189 ], [ 0, %197 ], [ 0, %194 ], [ 0, %122 ], [ 0, %133 ], [ 0, %136 ], [ 0, %131 ], [ 0, %94 ], [ 0, %102 ], [ 0, %99 ]
ret i32 %369
}