#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 dirent {
  scalar_t__ *d_name;
};
typedef int /*<<< orphan*/ FILE;
typedef int /*<<< orphan*/ DIR;

/* Variables and functions */
scalar_t__ ENOENT;
scalar_t__ ENOTDIR;
int /*<<< orphan*/ closedir(int /*<<< orphan*/ *);
scalar_t__ errno;
int /*<<< orphan*/ execlp(char *, char *, char *, char *, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int fork();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ *opendir(char *);
int /*<<< orphan*/ printf(char *, ...);
struct dirent *readdir(int /*<<< orphan*/ *);
int /*<<< orphan*/ sprintf(char *, char *, char *, scalar_t__ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
scalar_t__ strcmp(scalar_t__ *, char *);
char *strerror(scalar_t__);
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
void removeMissing(char *src, int srcPrefix, char *dest, int destPrefix,
                   int testMode) {
  int srcLen = 0, destLen = 0;
  while (src[srcLen])
    srcLen++;
  while (dest[destLen])
    destLen++;
  DIR *destDir = opendir(dest);
  if (destDir == NULL) {
    fprintf(stderr, "Could not open %s: %s\n", dest, strerror(errno));
    return;
  }
  DIR *srcDir = opendir(src);
  if (srcDir == NULL) {
    if (errno == ENOENT) {
      printf("- %s", dest + destPrefix);
      fflush(stdout);
      if (testMode == 0) {
        int pid = fork();
        if (pid == -1) {
          fprintf(stderr, "Could not fork: %s\n", strerror(errno));
          closedir(destDir);
          return;
        } else if (pid == 0) {
          execlp("rm", "rm", "-rf", dest, (char *)NULL);
        } else {
          wait(NULL);
        }
      }
      printf("\n");
      closedir(destDir);
      return;
    } else {
      fprintf(stderr, "Could not open %s: %s\n", src, strerror(errno));
      closedir(destDir);
      return;
    }
  }
  closedir(srcDir);
  struct dirent *item;
  while ((item = readdir(destDir)) != NULL) {
    if (strcmp(item->d_name, ".") == 0 || strcmp(item->d_name, "..") == 0)
      continue;
    int itemLen = 0;
    while (item->d_name[itemLen])
      itemLen++;
    char itemSrc[srcLen + itemLen + 2];
    char itemDest[destLen + itemLen + 2];
    sprintf(itemSrc, "%s%s", src, item->d_name);
    sprintf(itemDest, "%s%s", dest, item->d_name);
    int itemIsDir = 1;
    DIR *testDir = opendir(itemDest);
    if (testDir == NULL && errno == ENOTDIR)
      itemIsDir = 0;
    else if (testDir != NULL)
      closedir(testDir);
    if (itemIsDir == 1) {
      itemSrc[srcLen + itemLen] = '/';
      itemSrc[srcLen + itemLen + 1] = '\0';
      itemDest[destLen + itemLen] = '/';
      itemDest[destLen + itemLen + 1] = '\0';
      removeMissing(itemSrc, srcPrefix, itemDest, destPrefix, testMode);
    } else {
      FILE *srcFile = fopen(itemSrc, "r");
      if (srcFile == NULL) {
        if (errno == ENOENT) {
          printf("- %s", itemDest + destPrefix);
          fflush(stdout);
          if (testMode == 0) {
            int pid = fork();
            if (pid == -1) {
              fprintf(stderr, "Could not fork: %s\n", strerror(errno));
              continue;
            } else if (pid == 0) {
              execlp("rm", "rm", "-f", itemDest, (char *)NULL);
            } else {
              wait(NULL);
            }
          }
          printf("\n");
          continue;
        } else {
          fprintf(stderr, "Could not open %s: %s\n", itemSrc, strerror(errno));
          continue;
        }
      } else {
        fclose(srcFile);
      }
    }
  }
  closedir(destDir);
  return;
}


x86 assembly (clang, -O0):
<removeMissing>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x24(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     123b <removeMissing+0x4b>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    121b <removeMissing+0x2b>
jmp    1240 <removeMissing+0x50>
mov    -0x18(%rbp),%rax
movslq -0x28(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1260 <removeMissing+0x70>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1240 <removeMissing+0x50>
mov    -0x18(%rbp),%rdi
call   1040 <opendir@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12c4 <removeMissing+0xd4>
mov    0x2d59(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x94(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x90(%rbp)
mov    0x2d37(%rip),%rax
mov    (%rax),%rdi
call   10f0 <strerror@plt>
mov    -0x94(%rbp),%edi
mov    -0x90(%rbp),%rdx
mov    %rax,%rcx
lea    0xd48(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
jmp    17d5 <removeMissing+0x5e5>
mov    -0x8(%rbp),%rdi
call   1040 <opendir@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    1430 <removeMissing+0x240>
mov    0x2ced(%rip),%rax
mov    (%rax),%rax
mov    0x2ccb(%rip),%rcx
cmp    (%rcx),%rax
jne    13db <removeMissing+0x1eb>
mov    -0x18(%rbp),%rsi
movslq -0x1c(%rbp),%rax
add    %rax,%rsi
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2cb2(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
cmpl   $0x0,-0x20(%rbp)
jne    13bf <removeMissing+0x1cf>
mov    $0x0,%al
call   1110 <fork@plt>
mov    %eax,-0x3c(%rbp)
cmpl   $0xffffffff,-0x3c(%rbp)
jne    137e <removeMissing+0x18e>
mov    0x2c96(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x98(%rbp)
mov    0x2c7f(%rip),%rax
mov    (%rax),%rdi
call   10f0 <strerror@plt>
mov    -0x98(%rbp),%edi
mov    %rax,%rdx
lea    0xcb3(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1060 <closedir@plt>
jmp    17d5 <removeMissing+0x5e5>
cmpl   $0x0,-0x3c(%rbp)
jne    13ac <removeMissing+0x1bc>
mov    -0x18(%rbp),%rcx
lea    0xc9d(%rip),%rsi
lea    0xc99(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   10e0 <execlp@plt>
jmp    13b5 <removeMissing+0x1c5>
xor    %eax,%eax
mov    %eax,%edi
call   1100 <wait@plt>
jmp    13ba <removeMissing+0x1ca>
jmp    13bf <removeMissing+0x1cf>
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rdi
call   1060 <closedir@plt>
jmp    17d5 <removeMissing+0x5e5>
mov    0x2bf6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    0x2bd4(%rip),%rax
mov    (%rax),%rdi
call   10f0 <strerror@plt>
mov    -0xa4(%rbp),%edi
mov    -0xa0(%rbp),%rdx
mov    %rax,%rcx
lea    0xbe5(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x30(%rbp),%rdi
call   1060 <closedir@plt>
jmp    17d5 <removeMissing+0x5e5>
mov    -0x38(%rbp),%rdi
call   1060 <closedir@plt>
mov    -0x30(%rbp),%rdi
call   1090 <readdir@plt>
mov    %rax,-0x48(%rbp)
cmp    $0x0,%rax
je     17cc <removeMissing+0x5dc>
mov    -0x48(%rbp),%rax
mov    (%rax),%rdi
lea    0xbda(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
je     148a <removeMissing+0x29a>
mov    -0x48(%rbp),%rax
mov    (%rax),%rdi
lea    0xbbc(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    148f <removeMissing+0x29f>
jmp    1439 <removeMissing+0x249>
movl   $0x0,-0x4c(%rbp)
mov    -0x48(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     14ba <removeMissing+0x2ca>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1496 <removeMissing+0x2a6>
mov    -0x24(%rbp),%edx
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
mov    %edx,%eax
lea    0x2(%rax,%rcx,1),%eax
mov    %rsp,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rax,%rcx
add    $0xf,%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%rdi
sub    %rcx,%rdi
mov    %rdi,-0xb8(%rbp)
mov    %rdi,%rsp
mov    %rax,-0x60(%rbp)
mov    -0x28(%rbp),%edx
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
mov    %edx,%eax
lea    0x2(%rax,%rcx,1),%eax
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0xb0(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x68(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x48(%rbp),%rax
mov    (%rax),%rcx
lea    0xb0d(%rip),%rsi
call   10d0 <sprintf@plt>
mov    -0xb0(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x48(%rbp),%rax
mov    (%rax),%rcx
lea    0xaef(%rip),%rsi
call   10d0 <sprintf@plt>
mov    -0xb0(%rbp),%rdi
movl   $0x1,-0x6c(%rbp)
call   1040 <opendir@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    1598 <removeMissing+0x3a8>
mov    0x2a57(%rip),%rax
mov    (%rax),%rax
mov    0x2a75(%rip),%rcx
cmp    (%rcx),%rax
jne    1598 <removeMissing+0x3a8>
movl   $0x0,-0x6c(%rbp)
jmp    15b1 <removeMissing+0x3c1>
cmpq   $0x0,-0x78(%rbp)
je     15ac <removeMissing+0x3bc>
mov    -0x78(%rbp),%rdi
call   1060 <closedir@plt>
jmp    15b1 <removeMissing+0x3c1>
cmpl   $0x1,-0x6c(%rbp)
jne    1613 <removeMissing+0x423>
mov    -0xb0(%rbp),%rdx
mov    -0xb8(%rbp),%rdi
mov    -0x24(%rbp),%eax
add    -0x4c(%rbp),%eax
cltq
movb   $0x2f,(%rdi,%rax,1)
mov    -0x24(%rbp),%eax
add    -0x4c(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,(%rdi,%rax,1)
mov    -0x28(%rbp),%eax
add    -0x4c(%rbp),%eax
cltq
movb   $0x2f,(%rdx,%rax,1)
mov    -0x28(%rbp),%eax
add    -0x4c(%rbp),%eax
add    $0x1,%eax
cltq
movb   $0x0,(%rdx,%rax,1)
mov    -0xc(%rbp),%esi
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
call   10b0 <removeMissing@plt>
jmp    179e <removeMissing+0x5ae>
mov    -0xb8(%rbp),%rdi
lea    0xa1e(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x80(%rbp)
cmpq   $0x0,-0x80(%rbp)
jne    1790 <removeMissing+0x5a0>
mov    0x2994(%rip),%rax
mov    (%rax),%rax
mov    0x2972(%rip),%rcx
cmp    (%rcx),%rax
jne    1745 <removeMissing+0x555>
mov    -0xb0(%rbp),%rsi
movslq -0x1c(%rbp),%rax
add    %rax,%rsi
lea    0x9b3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    0x2956(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
cmpl   $0x0,-0x20(%rbp)
jne    1728 <removeMissing+0x538>
mov    $0x0,%al
call   1110 <fork@plt>
mov    %eax,-0x84(%rbp)
cmpl   $0xffffffff,-0x84(%rbp)
jne    16e1 <removeMissing+0x4f1>
mov    0x2934(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xbc(%rbp)
mov    0x291d(%rip),%rax
mov    (%rax),%rdi
call   10f0 <strerror@plt>
mov    -0xbc(%rbp),%edi
mov    %rax,%rdx
lea    0x951(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x6,-0x88(%rbp)
jmp    17a8 <removeMissing+0x5b8>
cmpl   $0x0,-0x84(%rbp)
jne    1715 <removeMissing+0x525>
mov    -0xb0(%rbp),%rcx
lea    0x934(%rip),%rsi
lea    0x93e(%rip),%rdx
xor    %eax,%eax
mov    %eax,%r8d
mov    %rsi,%rdi
call   10e0 <execlp@plt>
jmp    171e <removeMissing+0x52e>
xor    %eax,%eax
mov    %eax,%edi
call   1100 <wait@plt>
jmp    1723 <removeMissing+0x533>
jmp    1728 <removeMissing+0x538>
lea    0x8ff(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x6,-0x88(%rbp)
jmp    17a8 <removeMissing+0x5b8>
mov    0x288c(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc0(%rbp)
mov    0x2875(%rip),%rax
mov    (%rax),%rdi
call   10f0 <strerror@plt>
mov    -0xc0(%rbp),%edi
mov    -0xb8(%rbp),%rdx
mov    %rax,%rcx
lea    0x886(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
movl   $0x6,-0x88(%rbp)
jmp    17a8 <removeMissing+0x5b8>
mov    -0x80(%rbp),%rdi
call   1030 <fclose@plt>
jmp    179e <removeMissing+0x5ae>
movl   $0x0,-0x88(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,%rsp
mov    -0x88(%rbp),%eax
test   %eax,%eax
je     17c7 <removeMissing+0x5d7>
jmp    17c2 <removeMissing+0x5d2>
jmp    1439 <removeMissing+0x249>
jmp    1439 <removeMissing+0x249>
mov    -0x30(%rbp),%rdi
call   1060 <closedir@plt>
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<removeMissing>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %r8d,-0x2c(%rbp)
mov    %ecx,-0x30(%rbp)
mov    %rdx,%r13
mov    %esi,-0x3c(%rbp)
mov    %rdi,%rbx
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
cmpb   $0x0,(%rbx,%r14,1)
lea    0x1(%r14),%r14
jne    1230 <removeMissing+0x30>
add    $0xfffffffffffffffe,%r14
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
cmpb   $0x0,0x0(%r13,%r15,1)
lea    0x1(%r15),%r15
jne    1250 <removeMissing+0x50>
mov    %r13,%rdi
call   1050 <opendir@plt>
test   %rax,%rax
je     1547 <removeMissing+0x347>
mov    %rax,%r12
mov    %rbx,%rdi
call   1050 <opendir@plt>
test   %rax,%rax
je     1585 <removeMissing+0x385>
mov    %r14,-0x60(%rbp)
mov    %rbx,-0x68(%rbp)
mov    %r13,-0x70(%rbp)
mov    %rax,%rdi
call   1070 <closedir@plt>
mov    %r12,%rdi
call   10a0 <readdir@plt>
test   %rax,%rax
je     1530 <removeMissing+0x330>
mov    %rax,%r14
add    $0xfffffffffffffffe,%r15
movslq -0x30(%rbp),%rax
mov    %rax,-0x58(%rbp)
lea    0xd7c(%rip),%rbx
mov    %r12,-0x38(%rbp)
jmp    1335 <removeMissing+0x135>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rax,%rdi
call   1070 <closedir@plt>
mov    -0x48(%rbp),%r14
mov    %r12d,%eax
mov    -0x50(%rbp),%rdi
movb   $0x2f,(%rdi,%rax,1)
add    $0x1,%r12d
movb   $0x0,(%rdi,%r12,1)
mov    %ebx,%eax
movb   $0x2f,0x0(%r13,%rax,1)
add    $0x1,%ebx
movb   $0x0,0x0(%r13,%rbx,1)
mov    -0x3c(%rbp),%esi
mov    %r13,%rdx
mov    -0x30(%rbp),%ecx
mov    -0x2c(%rbp),%r8d
call   10c0 <removeMissing@plt>
mov    %r14,%rsp
mov    -0x38(%rbp),%r12
lea    0xd17(%rip),%rbx
mov    %r12,%rdi
call   10a0 <readdir@plt>
mov    %rax,%r14
test   %rax,%rax
je     1530 <removeMissing+0x330>
mov    (%r14),%rdi
mov    %rbx,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1321 <removeMissing+0x121>
mov    (%r14),%rdi
lea    0xce8(%rip),%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1321 <removeMissing+0x121>
mov    (%r14),%rax
mov    -0x60(%rbp),%r12
mov    %r15d,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
add    $0x1,%ebx
add    $0x1,%r12d
cmpq   $0x0,(%rax)
lea    0x8(%rax),%rax
jne    1370 <removeMissing+0x170>
mov    %rsp,-0x48(%rbp)
lea    0x2(%r12),%eax
mov    %rsp,%rdi
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
lea    0x2(%rbx),%eax
mov    %rsp,%r13
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    (%r14),%rcx
mov    %rdi,-0x50(%rbp)
lea    0xc7d(%rip),%rsi
mov    -0x68(%rbp),%rdx
call   10e0 <sprintf@plt>
mov    (%r14),%rcx
mov    %r13,%rdi
lea    0xc67(%rip),%rsi
mov    -0x70(%rbp),%rdx
call   10e0 <sprintf@plt>
mov    %r13,%rdi
call   1050 <opendir@plt>
test   %rax,%rax
jne    12d0 <removeMissing+0xd0>
mov    0x2bdc(%rip),%rax
mov    (%rax),%rax
mov    0x2bfa(%rip),%rcx
cmp    (%rcx),%rax
mov    -0x48(%rbp),%r14
jne    12dc <removeMissing+0xdc>
mov    -0x50(%rbp),%rbx
mov    %rbx,%rdi
lea    0xc26(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1430 <removeMissing+0x230>
mov    %rax,%rdi
call   1040 <fclose@plt>
jmp    1313 <removeMissing+0x113>
mov    0x2b99(%rip),%rax
mov    (%rax),%rdi
mov    0x2b77(%rip),%rax
cmp    (%rax),%rdi
mov    -0x38(%rbp),%r12
jne    148d <removeMissing+0x28d>
mov    -0x58(%rbp),%rax
lea    (%rax,%r13,1),%rsi
lea    0xbbe(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2b61(%rip),%rax
mov    (%rax),%edi
call   10b0 <fflush@plt>
cmpl   $0x0,-0x2c(%rbp)
lea    0xbbf(%rip),%rbx
je     14bc <removeMissing+0x2bc>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    %r14,%rsp
jmp    1321 <removeMissing+0x121>
mov    0x2b44(%rip),%rax
mov    %rbx,%r13
mov    (%rax),%ebx
call   1100 <strerror@plt>
mov    %ebx,%edi
lea    0xb59(%rip),%rsi
mov    %r13,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rsp
jmp    131a <removeMissing+0x11a>
xor    %eax,%eax
call   1120 <fork@plt>
cmp    $0xffffffff,%eax
je     14ea <removeMissing+0x2ea>
test   %eax,%eax
jne    1524 <removeMissing+0x324>
lea    0xb5d(%rip),%rdi
mov    %rdi,%rsi
lea    0xb64(%rip),%rdx
mov    %r13,%rcx
xor    %r8d,%r8d
call   10f0 <execlp@plt>
jmp    147b <removeMissing+0x27b>
mov    0x2ae7(%rip),%rax
mov    (%rax),%ebx
mov    0x2ad6(%rip),%rax
mov    (%rax),%rdi
call   1100 <strerror@plt>
mov    %ebx,%edi
lea    0xb2d(%rip),%rbx
lea    0xb0a(%rip),%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r14,%rsp
jmp    1321 <removeMissing+0x121>
xor    %edi,%edi
call   1110 <wait@plt>
jmp    147b <removeMissing+0x27b>
mov    %r12,%rdi
call   1070 <closedir@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2a8a(%rip),%rax
mov    (%rax),%r14d
mov    0x2a78(%rip),%rax
mov    (%rax),%rdi
call   1100 <strerror@plt>
lea    0xa99(%rip),%rsi
mov    %r14d,%edi
mov    %r13,%rdx
mov    %rax,%rcx
xor    %eax,%eax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <fprintf@plt>
mov    0x2a44(%rip),%r15
mov    (%r15),%rdi
mov    0x2a22(%rip),%rax
cmp    (%rax),%rdi
jne    15d0 <removeMissing+0x3d0>
movslq -0x30(%rbp),%rsi
add    %r13,%rsi
lea    0xa6e(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2a11(%rip),%rax
mov    (%rax),%edi
call   10b0 <fflush@plt>
cmpl   $0x0,-0x2c(%rbp)
je     160c <removeMissing+0x40c>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    15f6 <removeMissing+0x3f6>
mov    0x2a01(%rip),%rax
mov    (%rax),%r14d
call   1100 <strerror@plt>
lea    0xa1a(%rip),%rsi
mov    %r14d,%edi
mov    %rbx,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    %r12,%rdi
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1070 <closedir@plt>
xor    %eax,%eax
call   1120 <fork@plt>
cmp    $0xffffffff,%eax
je     163a <removeMissing+0x43a>
test   %eax,%eax
jne    1662 <removeMissing+0x462>
lea    0xa0d(%rip),%rdi
lea    0xa09(%rip),%rdx
mov    %rdi,%rsi
mov    %r13,%rcx
xor    %r8d,%r8d
call   10f0 <execlp@plt>
jmp    15c4 <removeMissing+0x3c4>
mov    0x2997(%rip),%rax
mov    (%rax),%r14d
mov    (%r15),%rdi
call   1100 <strerror@plt>
lea    0x9c9(%rip),%rsi
mov    %r14d,%edi
mov    %rax,%rdx
xor    %eax,%eax
call   1090 <fprintf@plt>
jmp    15f6 <removeMissing+0x3f6>
xor    %edi,%edi
call   1110 <wait@plt>
jmp    15c4 <removeMissing+0x3c4>

LLVM IR (-O0):
%struct.dirent = type { i64* }
@stderr = global i32 0
@.str = [23 x i8] c"Could not open %s: %s\0A\00"
@errno = global i64 0
@ENOENT = global i64 0
@.str.1 = [5 x i8] c"- %s\00"
@stdout = global i32 0
@.str.2 = [20 x i8] c"Could not fork: %s\0A\00"
@.str.3 = [3 x i8] c"rm\00"
@.str.4 = [4 x i8] c"-rf\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [2 x i8] c".\00"
@.str.7 = [3 x i8] c"..\00"
@.str.8 = [5 x i8] c"%s%s\00"
@ENOTDIR = global i64 0
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [3 x i8] c"-f\00"
define void @removeMissing(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i32
%16 = alloca %struct.dirent*
%17 = alloca i32
%18 = alloca i8*
%19 = alloca i64
%20 = alloca i64
%21 = alloca i32
%22 = alloca i32*
%23 = alloca i32*
%24 = alloca i32
%25 = alloca i32
store i8* %0, i8** %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
br label %26
26: ; preds = %33, %5
%27 = load i8*, i8** %6
%28 = load i32, i32* %11
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds i8, i8* %27, i64 %29
%31 = load i8, i8* %30
%32 = icmp ne i8 %31, 0
br i1 %32, label %33, label %36
33: ; preds = %26
%34 = load i32, i32* %11
%35 = add nsw i32 %34, 1
store i32 %35, i32* %11
br label %26
36: ; preds = %26
br label %37
37: ; preds = %44, %36
%38 = load i8*, i8** %8
%39 = load i32, i32* %12
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %38, i64 %40
%42 = load i8, i8* %41
%43 = icmp ne i8 %42, 0
br i1 %43, label %44, label %47
44: ; preds = %37
%45 = load i32, i32* %12
%46 = add nsw i32 %45, 1
store i32 %46, i32* %12
br label %37
47: ; preds = %37
%48 = load i8*, i8** %8
%49 = call i32* @opendir(i8* %48)
store i32* %49, i32** %13
%50 = load i32*, i32** %13
%51 = icmp eq i32* %50, null
br i1 %51, label %52, label %58
52: ; preds = %47
%53 = load i32, i32* @stderr
%54 = load i8*, i8** %8
%55 = load i64, i64* @errno
%56 = call i8* @strerror(i64 %55)
%57 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %54, i8* %56)
br label %265
58: ; preds = %47
%59 = load i8*, i8** %6
%60 = call i32* @opendir(i8* %59)
store i32* %60, i32** %14
%61 = load i32*, i32** %14
%62 = icmp eq i32* %61, null
br i1 %62, label %63, label %110
63: ; preds = %58
%64 = load i64, i64* @errno
%65 = load i64, i64* @ENOENT
%66 = icmp eq i64 %64, %65
br i1 %66, label %67, label %102
67: ; preds = %63
%68 = load i8*, i8** %8
%69 = load i32, i32* %9
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %71)
%73 = load i32, i32* @stdout
%74 = call i32 @fflush(i32 %73)
%75 = load i32, i32* %10
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %98
77: ; preds = %67
%78 = call i32 (...) @fork()
store i32 %78, i32* %15
%79 = load i32, i32* %15
%80 = icmp eq i32 %79, -1
br i1 %80, label %81, label %88
81: ; preds = %77
%82 = load i32, i32* @stderr
%83 = load i64, i64* @errno
%84 = call i8* @strerror(i64 %83)
%85 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %84)
%86 = load i32*, i32** %13
%87 = call i32 @closedir(i32* %86)
br label %265
88: ; preds = %77
%89 = load i32, i32* %15
%90 = icmp eq i32 %89, 0
br i1 %90, label %91, label %94
91: ; preds = %88
%92 = load i8*, i8** %8
%93 = call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %92, i8* null)
br label %96
94: ; preds = %88
%95 = call i32 @wait(i32* null)
br label %96
96: ; preds = %94, %91
br label %97
97: ; preds = %96
br label %98
98: ; preds = %97, %67
%99 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%100 = load i32*, i32** %13
%101 = call i32 @closedir(i32* %100)
br label %265
102: ; preds = %63
%103 = load i32, i32* @stderr
%104 = load i8*, i8** %6
%105 = load i64, i64* @errno
%106 = call i8* @strerror(i64 %105)
%107 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %104, i8* %106)
%108 = load i32*, i32** %13
%109 = call i32 @closedir(i32* %108)
br label %265
110: ; preds = %58
%111 = load i32*, i32** %14
%112 = call i32 @closedir(i32* %111)
br label %113
113: ; preds = %261, %258, %129, %110
%114 = load i32*, i32** %13
%115 = call %struct.dirent* @readdir(i32* %114)
store %struct.dirent* %115, %struct.dirent** %16
%116 = icmp ne %struct.dirent* %115, null
br i1 %116, label %117, label %262
117: ; preds = %113
%118 = load %struct.dirent*, %struct.dirent** %16
%119 = getelementptr inbounds %struct.dirent, %struct.dirent* %118, i32 0, i32 0
%120 = load i64*, i64** %119
%121 = call i64 @strcmp(i64* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%122 = icmp eq i64 %121, 0
br i1 %122, label %129, label %123
123: ; preds = %117
%124 = load %struct.dirent*, %struct.dirent** %16
%125 = getelementptr inbounds %struct.dirent, %struct.dirent* %124, i32 0, i32 0
%126 = load i64*, i64** %125
%127 = call i64 @strcmp(i64* %126, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%128 = icmp eq i64 %127, 0
br i1 %128, label %129, label %130
129: ; preds = %123, %117
br label %113
130: ; preds = %123
store i32 0, i32* %17
br label %131
131: ; preds = %140, %130
%132 = load %struct.dirent*, %struct.dirent** %16
%133 = getelementptr inbounds %struct.dirent, %struct.dirent* %132, i32 0, i32 0
%134 = load i64*, i64** %133
%135 = load i32, i32* %17
%136 = sext i32 %135 to i64
%137 = getelementptr inbounds i64, i64* %134, i64 %136
%138 = load i64, i64* %137
%139 = icmp ne i64 %138, 0
br i1 %139, label %140, label %143
140: ; preds = %131
%141 = load i32, i32* %17
%142 = add nsw i32 %141, 1
store i32 %142, i32* %17
br label %131
143: ; preds = %131
%144 = load i32, i32* %11
%145 = load i32, i32* %17
%146 = add nsw i32 %144, %145
%147 = add nsw i32 %146, 2
%148 = zext i32 %147 to i64
%149 = call i8* @llvm.stacksave()
store i8* %149, i8** %18
%150 = alloca i8, i64 %148
store i64 %148, i64* %19
%151 = load i32, i32* %12
%152 = load i32, i32* %17
%153 = add nsw i32 %151, %152
%154 = add nsw i32 %153, 2
%155 = zext i32 %154 to i64
%156 = alloca i8, i64 %155
store i64 %155, i64* %20
%157 = load i8*, i8** %6
%158 = load %struct.dirent*, %struct.dirent** %16
%159 = getelementptr inbounds %struct.dirent, %struct.dirent* %158, i32 0, i32 0
%160 = load i64*, i64** %159
%161 = call i32 @sprintf(i8* %150, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %157, i64* %160)
%162 = load i8*, i8** %8
%163 = load %struct.dirent*, %struct.dirent** %16
%164 = getelementptr inbounds %struct.dirent, %struct.dirent* %163, i32 0, i32 0
%165 = load i64*, i64** %164
%166 = call i32 @sprintf(i8* %156, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %162, i64* %165)
store i32 1, i32* %21
%167 = call i32* @opendir(i8* %156)
store i32* %167, i32** %22
%168 = load i32*, i32** %22
%169 = icmp eq i32* %168, null
br i1 %169, label %170, label %175
170: ; preds = %143
%171 = load i64, i64* @errno
%172 = load i64, i64* @ENOTDIR
%173 = icmp eq i64 %171, %172
br i1 %173, label %174, label %175
174: ; preds = %170
store i32 0, i32* %21
br label %182
175: ; preds = %170, %143
%176 = load i32*, i32** %22
%177 = icmp ne i32* %176, null
br i1 %177, label %178, label %181
178: ; preds = %175
%179 = load i32*, i32** %22
%180 = call i32 @closedir(i32* %179)
br label %181
181: ; preds = %178, %175
br label %182
182: ; preds = %181, %174
%183 = load i32, i32* %21
%184 = icmp eq i32 %183, 1
br i1 %184, label %185, label %211
185: ; preds = %182
%186 = load i32, i32* %11
%187 = load i32, i32* %17
%188 = add nsw i32 %186, %187
%189 = sext i32 %188 to i64
%190 = getelementptr inbounds i8, i8* %150, i64 %189
store i8 47, i8* %190
%191 = load i32, i32* %11
%192 = load i32, i32* %17
%193 = add nsw i32 %191, %192
%194 = add nsw i32 %193, 1
%195 = sext i32 %194 to i64
%196 = getelementptr inbounds i8, i8* %150, i64 %195
store i8 0, i8* %196
%197 = load i32, i32* %12
%198 = load i32, i32* %17
%199 = add nsw i32 %197, %198
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8, i8* %156, i64 %200
store i8 47, i8* %201
%202 = load i32, i32* %12
%203 = load i32, i32* %17
%204 = add nsw i32 %202, %203
%205 = add nsw i32 %204, 1
%206 = sext i32 %205 to i64
%207 = getelementptr inbounds i8, i8* %156, i64 %206
store i8 0, i8* %207
%208 = load i32, i32* %7
%209 = load i32, i32* %9
%210 = load i32, i32* %10
br label %257
211: ; preds = %182
%212 = call i32* @fopen(i8* %150, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
store i32* %212, i32** %23
%213 = load i32*, i32** %23
%214 = icmp eq i32* %213, null
br i1 %214, label %215, label %253
215: ; preds = %211
%216 = load i64, i64* @errno
%217 = load i64, i64* @ENOENT
%218 = icmp eq i64 %216, %217
br i1 %218, label %219, label %248
219: ; preds = %215
%220 = load i32, i32* %9
%221 = sext i32 %220 to i64
%222 = getelementptr inbounds i8, i8* %156, i64 %221
%223 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %222)
%224 = load i32, i32* @stdout
%225 = call i32 @fflush(i32 %224)
%226 = load i32, i32* %10
%227 = icmp eq i32 %226, 0
br i1 %227, label %228, label %246
228: ; preds = %219
%229 = call i32 (...) @fork()
store i32 %229, i32* %24
%230 = load i32, i32* %24
%231 = icmp eq i32 %230, -1
br i1 %231, label %232, label %237
232: ; preds = %228
%233 = load i32, i32* @stderr
%234 = load i64, i64* @errno
%235 = call i8* @strerror(i64 %234)
%236 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %233, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %235)
store i32 6, i32* %25
br label %258
237: ; preds = %228
%238 = load i32, i32* %24
%239 = icmp eq i32 %238, 0
br i1 %239, label %240, label %242
240: ; preds = %237
%241 = call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %156, i8* null)
br label %244
242: ; preds = %237
%243 = call i32 @wait(i32* null)
br label %244
244: ; preds = %242, %240
br label %245
245: ; preds = %244
br label %246
246: ; preds = %245, %219
%247 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
store i32 6, i32* %25
br label %258
248: ; preds = %215
%249 = load i32, i32* @stderr
%250 = load i64, i64* @errno
%251 = call i8* @strerror(i64 %250)
%252 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %249, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %150, i8* %251)
store i32 6, i32* %25
br label %258
253: ; preds = %211
%254 = load i32*, i32** %23
%255 = call i32 @fclose(i32* %254)
br label %256
256: ; preds = %253
br label %257
257: ; preds = %256, %185
store i32 0, i32* %25
br label %258
258: ; preds = %257, %248, %246, %232
%259 = load i8*, i8** %18
%260 = load i32, i32* %25
switch i32 %260, label %266 [
i32 0, label %261
i32 6, label %113
]
261: ; preds = %258
br label %113
262: ; preds = %113
%263 = load i32*, i32** %13
%264 = call i32 @closedir(i32* %263)
br label %265
265: ; preds = %262, %102, %98, %81, %52
ret void
266: ; preds = %258
unreachable
}

LLVM IR (-O2):
%struct.dirent = type { i64* }
@stderr = global i32 0
@.str = [23 x i8] c"Could not open %s: %s\0A\00"
@errno = global i64 0
@ENOENT = global i64 0
@.str.1 = [5 x i8] c"- %s\00"
@stdout = global i32 0
@.str.2 = [20 x i8] c"Could not fork: %s\0A\00"
@.str.3 = [3 x i8] c"rm\00"
@.str.4 = [4 x i8] c"-rf\00"
@.str.6 = [2 x i8] c".\00"
@.str.7 = [3 x i8] c"..\00"
@.str.8 = [5 x i8] c"%s%s\00"
@ENOTDIR = global i64 0
@.str.9 = [2 x i8] c"r\00"
@.str.10 = [3 x i8] c"-f\00"
define void @removeMissing(i8* %0, i32 %1, i8* %2, i32 %3, i32 %4) {
br label %6
6: ; preds = %6, %5
%7 = phi i64 [ %11, %6 ], [ 0, %5 ]
%8 = getelementptr inbounds i8, i8* %0, i64 %7
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
%11 = add nuw i64 %7, 1
br i1 %10, label %12, label %6
12: ; preds = %6, %12
%13 = phi i64 [ %17, %12 ], [ 0, %6 ]
%14 = getelementptr inbounds i8, i8* %2, i64 %13
%15 = load i8, i8* %14
%16 = icmp eq i8 %15, 0
%17 = add nuw i64 %13, 1
br i1 %16, label %18, label %12
18: ; preds = %12
%19 = trunc i64 %7 to i32
%20 = trunc i64 %13 to i32
%21 = tail call i32* @opendir(i8* %2)
%22 = icmp eq i32* %21, null
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load i32, i32* @stderr
%25 = load i64, i64* @errno
%26 = tail call i8* @strerror(i64 %25)
%27 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2, i8* %26)
br label %158
28: ; preds = %18
%29 = tail call i32* @opendir(i8* %0)
%30 = icmp eq i32* %29, null
br i1 %30, label %31, label %62
31: ; preds = %28
%32 = load i64, i64* @errno
%33 = load i64, i64* @ENOENT
%34 = icmp eq i64 %32, %33
br i1 %34, label %35, label %57
35: ; preds = %31
%36 = sext i32 %3 to i64
%37 = getelementptr inbounds i8, i8* %2, i64 %36
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %37)
%39 = load i32, i32* @stdout
%40 = tail call i32 @fflush(i32 %39)
%41 = icmp eq i32 %4, 0
br i1 %41, label %42, label %54
42: ; preds = %35
%43 = tail call i32 (...) @fork()
switch i32 %43, label %46 [
i32 -1, label %48
i32 0, label %44
]
44: ; preds = %42
%45 = tail call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %2, i8* null)
br label %54
46: ; preds = %42
%47 = tail call i32 @wait(i32* null)
br label %54
48: ; preds = %42
%49 = load i32, i32* @stderr
%50 = load i64, i64* @errno
%51 = tail call i8* @strerror(i64 %50)
%52 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %51)
%53 = tail call i32 @closedir(i32* %21)
br label %158
54: ; preds = %44, %46, %35
%55 = tail call i32 @putchar(i32 10)
%56 = tail call i32 @closedir(i32* %21)
br label %158
57: ; preds = %31
%58 = load i32, i32* @stderr
%59 = tail call i8* @strerror(i64 %32)
%60 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %58, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %59)
%61 = tail call i32 @closedir(i32* %21)
br label %158
62: ; preds = %28
%63 = tail call i32 @closedir(i32* %29)
%64 = call %struct.dirent* @readdir(i32* %21)
%65 = icmp eq %struct.dirent* %64, null
br i1 %65, label %156, label %66
66: ; preds = %62
%67 = sext i32 %3 to i64
%68 = icmp eq i32 %4, 0
br label %69
69: ; preds = %66, %81
%70 = phi %struct.dirent* [ %64, %66 ], [ %82, %81 ]
%71 = getelementptr inbounds %struct.dirent, %struct.dirent* %70, i64 0, i32 0
%72 = load i64*, i64** %71
%73 = call i64 @strcmp(i64* %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
%74 = icmp eq i64 %73, 0
br i1 %74, label %81, label %75
75: ; preds = %69
%76 = load i64*, i64** %71
%77 = call i64 @strcmp(i64* %76, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %81, label %79
79: ; preds = %75
%80 = load i64*, i64** %71
br label %84
81: ; preds = %69, %75, %155
%82 = call %struct.dirent* @readdir(i32* %21)
%83 = icmp eq %struct.dirent* %82, null
br i1 %83, label %156, label %69
84: ; preds = %84, %79
%85 = phi i64 [ %89, %84 ], [ 0, %79 ]
%86 = getelementptr inbounds i64, i64* %80, i64 %85
%87 = load i64, i64* %86
%88 = icmp eq i64 %87, 0
%89 = add nuw i64 %85, 1
br i1 %88, label %90, label %84
90: ; preds = %84
%91 = trunc i64 %85 to i32
%92 = add nuw nsw i32 %91, %19
%93 = add nuw nsw i32 %92, 2
%94 = zext i32 %93 to i64
%95 = call i8* @llvm.stacksave()
%96 = alloca i8, i64 %94
%97 = add nuw nsw i32 %91, %20
%98 = add nuw nsw i32 %97, 2
%99 = zext i32 %98 to i64
%100 = alloca i8, i64 %99
%101 = load i64*, i64** %71
%102 = call i32 @sprintf(i8* %96, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %0, i64* %101)
%103 = load i64*, i64** %71
%104 = call i32 @sprintf(i8* %100, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* %2, i64* %103)
%105 = call i32* @opendir(i8* %100)
%106 = icmp eq i32* %105, null
br i1 %106, label %107, label %111
107: ; preds = %90
%108 = load i64, i64* @errno
%109 = load i64, i64* @ENOTDIR
%110 = icmp eq i64 %108, %109
br i1 %110, label %124, label %113
111: ; preds = %90
%112 = call i32 @closedir(i32* %105)
br label %113
113: ; preds = %107, %111
%114 = zext i32 %92 to i64
%115 = getelementptr inbounds i8, i8* %96, i64 %114
store i8 47, i8* %115
%116 = add nuw nsw i32 %92, 1
%117 = zext i32 %116 to i64
%118 = getelementptr inbounds i8, i8* %96, i64 %117
store i8 0, i8* %118
%119 = zext i32 %97 to i64
%120 = getelementptr inbounds i8, i8* %100, i64 %119
store i8 47, i8* %120
%121 = add nuw nsw i32 %97, 1
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %100, i64 %122
store i8 0, i8* %123
br label %155
124: ; preds = %107
%125 = call i32* @fopen(i8* %96, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%126 = icmp eq i32* %125, null
br i1 %126, label %127, label %153
127: ; preds = %124
%128 = load i64, i64* @errno
%129 = load i64, i64* @ENOENT
%130 = icmp eq i64 %128, %129
br i1 %130, label %131, label %149
131: ; preds = %127
%132 = getelementptr inbounds i8, i8* %100, i64 %67
%133 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %132)
%134 = load i32, i32* @stdout
%135 = call i32 @fflush(i32 %134)
br i1 %68, label %136, label %147
136: ; preds = %131
%137 = call i32 (...) @fork()
switch i32 %137, label %140 [
i32 -1, label %142
i32 0, label %138
]
138: ; preds = %136
%139 = call i32 @execlp(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i8* %100, i8* null)
br label %147
140: ; preds = %136
%141 = call i32 @wait(i32* null)
br label %147
142: ; preds = %136
%143 = load i32, i32* @stderr
%144 = load i64, i64* @errno
%145 = call i8* @strerror(i64 %144)
%146 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %143, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %145)
br label %155
147: ; preds = %138, %140, %131
%148 = call i32 @putchar(i32 10)
br label %155
149: ; preds = %127
%150 = load i32, i32* @stderr
%151 = call i8* @strerror(i64 %128)
%152 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %150, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %96, i8* %151)
br label %155
153: ; preds = %124
%154 = call i32 @fclose(i32* %125)
br label %155
155: ; preds = %142, %147, %149, %153, %113
br label %81
156: ; preds = %81, %62
%157 = call i32 @closedir(i32* %21)
br label %158
158: ; preds = %48, %54, %57, %156, %23
ret void
}