#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 timeval {
  int tv_usec;
  int /*<<< orphan*/ tv_sec;
};

/* Variables and functions */
int /*<<< orphan*/ diod_log_init(char *);
int /*<<< orphan*/ err_exit(char *, ...);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fsobj_create(char **, int, int);
int /*<<< orphan*/ fsobj_destroy(char **, int, int);
int getopt(int, char **, char *);
scalar_t__ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
scalar_t__ mkdir(char *, int);
int /*<<< orphan*/ msg(char *, int, int, int, ...);
int /*<<< orphan*/ optarg;
scalar_t__ opterr;
int optind;
int pathwalk(char **, int, int, int);
scalar_t__ rmdir(char *);
char **searchpath_create(char *, int);
int /*<<< orphan*/ searchpath_destroy(char **, int);
int strtoul(int /*<<< orphan*/, int /*<<< orphan*/ *, int);
int /*<<< orphan*/ timersub(struct timeval *, struct timeval *,
                            struct timeval *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char *root = NULL;
  int length = 16;
  int files = 10000;
  int cflag = 0;
  int rflag = 0;
  int tflag = 0;
  int Cflag = 0;
  int Fflag = 0;
  int qflag = 0;
  int c;
  char **searchpath;
  struct timeval t1, t2, elapsed;
  int target, count;
  diod_log_init(argv[0]);
  opterr = 0;
  while ((c = getopt(argc, argv, "l:f:crtCFq")) != -1) {
    switch (c) {
    case 'l':
      length = strtoul(optarg, NULL, 10);
      break;
    case 'f':
      files = strtoul(optarg, NULL, 10);
      break;
    case 'c':
      cflag = 1;
      break;
    case 'r':
      rflag = 1;
      break;
    case 't':
      tflag = 1;
      break;
    case 'C':
      Cflag = 1;
      break;
    case 'F':
      Fflag = 1;
      break;
    case 'q':
      qflag = 1;
      break;
    default:
      usage();
    }
  }
  if (optind != argc - 1 || (!cflag && !rflag && !tflag))
    usage();
  root = argv[optind++];
  searchpath = searchpath_create(root, length);
  target = Fflag ? -1 : length - 1;
  if (cflag) {
    if (gettimeofday(&t1, NULL) < 0)
      err_exit("gettimeofday");
    if (mkdir(root, 0777) < 0)
      err_exit("mkdir %s", root);
    fsobj_create(searchpath, length, files);
    if (gettimeofday(&t2, NULL) < 0)
      err_exit("gettimeofday");
    timersub(&t2, &t1, &elapsed);
    if (!qflag)
      msg("Created %d objects in %lu.%.3lus", length * files + 1,
          elapsed.tv_sec, elapsed.tv_usec / 1000);
  }
  if (tflag) {
    if (Cflag) {
      if (gettimeofday(&t1, NULL) < 0)
        err_exit("gettimeofday");
      count = pathwalk(searchpath, length, 1, target);
      if (gettimeofday(&t2, NULL) < 0)
        err_exit("gettimeofday");
      timersub(&t2, &t1, &elapsed);
      if (!qflag)
        msg("Found %d/%d files in %d directories in %lu.%.3lus", count, 1,
            length, elapsed.tv_sec, elapsed.tv_usec / 1000);
    }
    if (gettimeofday(&t1, NULL) < 0)
      err_exit("gettimeofday");
    count = pathwalk(searchpath, length, files, target);
    if (gettimeofday(&t2, NULL) < 0)
      err_exit("gettimeofday");
    timersub(&t2, &t1, &elapsed);
    if (!qflag)
      msg("Found %d/%d files in %d directories in %lu.%.3lus", count, files,
          length, elapsed.tv_sec, elapsed.tv_usec / 1000);
  }
  if (rflag) {
    if (gettimeofday(&t1, NULL) < 0)
      err_exit("gettimeofday");
    fsobj_destroy(searchpath, length, files);
    if (rmdir(root) < 0)
      err_exit("rmdir %s", root);
    if (gettimeofday(&t2, NULL) < 0)
      err_exit("gettimeofday");
    timersub(&t2, &t1, &elapsed);
    if (!qflag)
      msg("Removed %d objects in %lu.%.3lus", length * files + 1,
          elapsed.tv_sec, elapsed.tv_usec / 1000);
  }
  searchpath_destroy(searchpath, length);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x10,-0x1c(%rbp)
movl   $0x2710,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10e0 <diod_log_init@plt>
mov    0x2d64(%rip),%rax
movq   $0x0,(%rax)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe47(%rip),%rdx
call   10b0 <getopt@plt>
mov    %eax,-0x3c(%rbp)
cmp    $0xffffffff,%eax
je     134d <main+0x14d>
mov    -0x3c(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x70(%rbp)
sub    $0x31,%eax
ja     1341 <main+0x141>
mov    -0x70(%rbp),%rax
lea    0xd4e(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    0x2d36(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10c0 <strtoul@plt>
mov    %eax,-0x1c(%rbp)
jmp    1348 <main+0x148>
mov    0x2d17(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
mov    $0xa,%edx
call   10c0 <strtoul@plt>
mov    %eax,-0x20(%rbp)
jmp    1348 <main+0x148>
movl   $0x1,-0x24(%rbp)
jmp    1348 <main+0x148>
movl   $0x1,-0x28(%rbp)
jmp    1348 <main+0x148>
movl   $0x1,-0x2c(%rbp)
jmp    1348 <main+0x148>
movl   $0x1,-0x30(%rbp)
jmp    1348 <main+0x148>
movl   $0x1,-0x34(%rbp)
jmp    1348 <main+0x148>
movl   $0x1,-0x38(%rbp)
jmp    1348 <main+0x148>
mov    $0x0,%al
call   1090 <usage@plt>
jmp    1273 <main+0x73>
mov    0x2c8c(%rip),%rax
mov    (%rax),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jne    1382 <main+0x182>
cmpl   $0x0,-0x24(%rbp)
jne    1389 <main+0x189>
cmpl   $0x0,-0x28(%rbp)
jne    1389 <main+0x189>
cmpl   $0x0,-0x2c(%rbp)
jne    1389 <main+0x189>
mov    $0x0,%al
call   1090 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x2c4c(%rip),%rcx
mov    (%rcx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    0x2c3e(%rip),%rdx
mov    %esi,(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   10a0 <searchpath_create@plt>
mov    %rax,-0x48(%rbp)
cmpl   $0x0,-0x34(%rbp)
je     13d6 <main+0x1d6>
mov    $0xffffffff,%eax
mov    %eax,-0x74(%rbp)
jmp    13df <main+0x1df>
mov    -0x1c(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x74(%rbp)
mov    -0x74(%rbp),%eax
mov    %eax,-0x64(%rbp)
cmpl   $0x0,-0x24(%rbp)
je     14c0 <main+0x2c0>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    1414 <main+0x214>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
mov    -0x18(%rbp),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    143e <main+0x23e>
mov    -0x18(%rbp),%rsi
lea    0xca9(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
mov    -0x48(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1060 <fsobj_create@plt>
lea    -0x58(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    1472 <main+0x272>
lea    0xc68(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
lea    -0x58(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   10f0 <timersub@plt>
cmpl   $0x0,-0x38(%rbp)
jne    14bb <main+0x2bb>
mov    -0x1c(%rbp),%esi
imul   -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x5c(%rbp),%eax
mov    %eax,-0x78(%rbp)
mov    -0x60(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x78(%rbp),%edx
mov    %eax,%ecx
lea    0xc35(%rip),%rdi
mov    $0x0,%al
call   1120 <msg@plt>
jmp    14c0 <main+0x2c0>
cmpl   $0x0,-0x2c(%rbp)
je     162e <main+0x42e>
cmpl   $0x0,-0x30(%rbp)
je     1580 <main+0x380>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    14f9 <main+0x2f9>
lea    0xbe1(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
mov    -0x48(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x64(%rbp),%ecx
mov    $0x1,%edx
call   1080 <pathwalk@plt>
mov    %eax,-0x68(%rbp)
lea    -0x58(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    1535 <main+0x335>
lea    0xba5(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
lea    -0x58(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   10f0 <timersub@plt>
cmpl   $0x0,-0x38(%rbp)
jne    157b <main+0x37b>
mov    -0x68(%rbp),%esi
mov    -0x1c(%rbp),%ecx
mov    -0x5c(%rbp),%r8d
mov    -0x60(%rbp),%eax
mov    $0x3e8,%edi
cltd
idiv   %edi
mov    %eax,%r9d
lea    0xb9b(%rip),%rdi
mov    $0x1,%edx
mov    $0x0,%al
call   1120 <msg@plt>
jmp    1580 <main+0x380>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    15a5 <main+0x3a5>
lea    0xb35(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
mov    -0x48(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
mov    -0x64(%rbp),%ecx
call   1080 <pathwalk@plt>
mov    %eax,-0x68(%rbp)
lea    -0x58(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    15df <main+0x3df>
lea    0xafb(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
lea    -0x58(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   10f0 <timersub@plt>
cmpl   $0x0,-0x38(%rbp)
jne    1629 <main+0x429>
mov    -0x68(%rbp),%esi
mov    -0x20(%rbp),%eax
mov    %eax,-0x7c(%rbp)
mov    -0x1c(%rbp),%ecx
mov    -0x5c(%rbp),%r8d
mov    -0x60(%rbp),%eax
mov    $0x3e8,%edi
cltd
idiv   %edi
mov    -0x7c(%rbp),%edx
mov    %eax,%r9d
lea    0xae8(%rip),%rdi
mov    $0x0,%al
call   1120 <msg@plt>
jmp    162e <main+0x42e>
cmpl   $0x0,-0x28(%rbp)
je     1704 <main+0x504>
lea    -0x50(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    165d <main+0x45d>
lea    0xa7d(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
mov    -0x48(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x20(%rbp),%edx
call   1100 <fsobj_destroy@plt>
mov    -0x18(%rbp),%rdi
call   1040 <rmdir@plt>
cmp    $0x0,%rax
jge    1691 <main+0x491>
mov    -0x18(%rbp),%rsi
lea    0xab2(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
lea    -0x58(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1050 <gettimeofday@plt>
cmp    $0x0,%rax
jge    16b6 <main+0x4b6>
lea    0xa24(%rip),%rdi
mov    $0x0,%al
call   1070 <err_exit@plt>
lea    -0x58(%rbp),%rdi
lea    -0x50(%rbp),%rsi
lea    -0x60(%rbp),%rdx
call   10f0 <timersub@plt>
cmpl   $0x0,-0x38(%rbp)
jne    16ff <main+0x4ff>
mov    -0x1c(%rbp),%esi
imul   -0x20(%rbp),%esi
add    $0x1,%esi
mov    -0x5c(%rbp),%eax
mov    %eax,-0x80(%rbp)
mov    -0x60(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    -0x80(%rbp),%edx
mov    %eax,%ecx
lea    0xa4d(%rip),%rdi
mov    $0x0,%al
call   1120 <msg@plt>
jmp    1704 <main+0x504>
mov    -0x48(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1110 <searchpath_destroy@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
call   10e0 <diod_log_init@plt>
mov    0x2dae(%rip),%rax
movq   $0x0,(%rax)
mov    $0x10,%eax
mov    %rax,0x30(%rsp)
mov    $0x2710,%r12d
lea    0xe88(%rip),%r15
lea    0xdb9(%rip),%r14
xor    %eax,%eax
movl   $0x0,0x20(%rsp)
movl   $0x0,0xc(%rsp)
movl   $0x0,0x24(%rsp)
movl   $0x0,0x28(%rsp)
movl   $0x0,0x2c(%rsp)
jmp    1280 <main+0x80>
movl   $0x1,0x2c(%rsp)
mov    %r13d,%eax
xchg   %ax,%ax
mov    %eax,%r13d
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r15,%rdx
call   10b0 <getopt@plt>
lea    -0x43(%rax),%ecx
cmp    $0x31,%ecx
ja     1320 <main+0x120>
mov    $0x1,%eax
movslq (%r14,%rcx,4),%rcx
add    %r14,%rcx
jmp    *%rcx
movl   $0x1,0x24(%rsp)
mov    %r13d,%eax
jmp    1280 <main+0x80>
movl   $0x1,0x28(%rsp)
mov    %r13d,%eax
jmp    1280 <main+0x80>
mov    0x2d2d(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0xa,%edx
call   10c0 <strtoul@plt>
mov    %eax,%r12d
mov    %r13d,%eax
jmp    1280 <main+0x80>
mov    0x2d10(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
mov    $0xa,%edx
call   10c0 <strtoul@plt>
mov    %rax,0x30(%rsp)
mov    %r13d,%eax
jmp    1280 <main+0x80>
movl   $0x1,0x20(%rsp)
mov    %r13d,%eax
jmp    1280 <main+0x80>
movl   $0x1,0xc(%rsp)
mov    %r13d,%eax
jmp    1280 <main+0x80>
cmp    $0xffffffff,%eax
je     1334 <main+0x134>
xor    %eax,%eax
call   1090 <usage@plt>
mov    %r13d,%eax
jmp    1280 <main+0x80>
mov    0x2ca5(%rip),%r14
mov    (%r14),%eax
add    $0xffffffff,%ebp
cmp    %ebp,%eax
jne    1358 <main+0x158>
test   %r13d,%r13d
jne    1362 <main+0x162>
cmpl   $0x0,0x20(%rsp)
jne    1362 <main+0x162>
cmpl   $0x0,0xc(%rsp)
jne    1362 <main+0x162>
xor    %eax,%eax
call   1090 <usage@plt>
mov    (%r14),%eax
lea    0x1(%rax),%ecx
mov    %ecx,(%r14)
cltq
mov    (%rbx,%rax,8),%r15
mov    %r15,%rdi
mov    0x30(%rsp),%rbx
mov    %ebx,%esi
call   10a0 <searchpath_create@plt>
mov    %rax,%r14
negl   0x28(%rsp)
sbb    %ebp,%ebp
test   %r13d,%r13d
mov    0x2c(%rsp),%r13d
je     144c <main+0x24c>
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    13b3 <main+0x1b3>
lea    0xd27(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
mov    %r15,%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
jns    13d6 <main+0x1d6>
lea    0xd14(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <err_exit@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
call   1060 <fsobj_create@plt>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    1402 <main+0x202>
lea    0xcd8(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %rsp,%rdx
call   10f0 <timersub@plt>
test   %r13d,%r13d
jne    144c <main+0x24c>
mov    %ebx,%esi
imul   %r12d,%esi
add    $0x1,%esi
mov    0x4(%rsp),%edx
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x26,%rcx
add    %eax,%ecx
lea    0xca4(%rip),%rdi
xor    %eax,%eax
call   1120 <msg@plt>
cmpl   $0x0,0xc(%rsp)
je     15a1 <main+0x3a1>
lea    -0x1(%rbx),%eax
or     %eax,%ebp
cmpl   $0x0,0x24(%rsp)
je     1508 <main+0x308>
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    1486 <main+0x286>
lea    0xc54(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    $0x1,%edx
mov    %ebp,%ecx
call   1080 <pathwalk@plt>
mov    %eax,0xc(%rsp)
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    14ba <main+0x2ba>
lea    0xc20(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %rsp,%rdx
call   10f0 <timersub@plt>
test   %r13d,%r13d
jne    1508 <main+0x308>
mov    0x4(%rsp),%r8d
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%r9
mov    %r9,%rax
shr    $0x3f,%rax
sar    $0x26,%r9
add    %eax,%r9d
lea    0xc14(%rip),%rdi
mov    0xc(%rsp),%esi
mov    $0x1,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1120 <msg@plt>
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    1527 <main+0x327>
lea    0xbb3(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
mov    %ebp,%ecx
call   1080 <pathwalk@plt>
mov    %eax,%ebp
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    1557 <main+0x357>
lea    0xb83(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %rsp,%rdx
call   10f0 <timersub@plt>
test   %r13d,%r13d
jne    15a1 <main+0x3a1>
mov    0x4(%rsp),%r8d
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%r9
mov    %r9,%rax
shr    $0x3f,%rax
sar    $0x26,%r9
add    %eax,%r9d
lea    0xb77(%rip),%rdi
mov    %ebp,%esi
mov    %r12d,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   1120 <msg@plt>
cmpl   $0x0,0x20(%rsp)
je     1661 <main+0x461>
lea    0x18(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    15cb <main+0x3cb>
lea    0xb0f(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %r12d,%edx
call   1100 <fsobj_destroy@plt>
mov    %r15,%rdi
call   1040 <rmdir@plt>
test   %rax,%rax
jns    15f6 <main+0x3f6>
lea    0xb50(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
call   1070 <err_exit@plt>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   1050 <gettimeofday@plt>
test   %rax,%rax
jns    1615 <main+0x415>
lea    0xac5(%rip),%rdi
xor    %eax,%eax
call   1070 <err_exit@plt>
lea    0x10(%rsp),%rdi
lea    0x18(%rsp),%rsi
mov    %rsp,%rdx
call   10f0 <timersub@plt>
test   %r13d,%r13d
jne    1661 <main+0x461>
imul   %ebx,%r12d
add    $0x1,%r12d
mov    0x4(%rsp),%edx
movslq (%rsp),%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x26,%rcx
add    %eax,%ecx
lea    0xaee(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
call   1120 <msg@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1110 <searchpath_destroy@plt>
xor    %edi,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
@opterr = global i64 0
@.str = [11 x i8] c"l:f:crtCFq\00"
@optarg = global i32 0
@optind = global i32 0
@.str.1 = [13 x i8] c"gettimeofday\00"
@.str.2 = [9 x i8] c"mkdir %s\00"
@.str.3 = [33 x i8] c"Created %d objects in %lu.%.3lus\00"
@.str.4 = [50 x i8] c"Found %d/%d files in %d directories in %lu.%.3lus\00"
@.str.5 = [9 x i8] c"rmdir %s\00"
@.str.6 = [33 x i8] c"Removed %d objects in %lu.%.3lus\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8**
%17 = alloca %struct.timeval
%18 = alloca %struct.timeval
%19 = alloca %struct.timeval
%20 = alloca i32
%21 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i32 16, i32* %7
store i32 10000, i32* %8
store i32 0, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %12
store i32 0, i32* %13
store i32 0, i32* %14
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 0
%24 = load i8*, i8** %23
%25 = call i32 @diod_log_init(i8* %24)
store i64 0, i64* @opterr
br label %26
26: ; preds = %47, %2
%27 = load i32, i32* %4
%28 = load i8**, i8*** %5
%29 = call i32 @getopt(i32 %27, i8** %28, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i32 %29, i32* %15
%30 = icmp ne i32 %29, -1
br i1 %30, label %31, label %48
31: ; preds = %26
%32 = load i32, i32* %15
switch i32 %32, label %45 [
i32 108, label %33
i32 102, label %36
i32 99, label %39
i32 114, label %40
i32 116, label %41
i32 67, label %42
i32 70, label %43
i32 113, label %44
]
33: ; preds = %31
%34 = load i32, i32* @optarg
%35 = call i32 @strtoul(i32 %34, i32* null, i32 10)
store i32 %35, i32* %7
br label %47
36: ; preds = %31
%37 = load i32, i32* @optarg
%38 = call i32 @strtoul(i32 %37, i32* null, i32 10)
store i32 %38, i32* %8
br label %47
39: ; preds = %31
store i32 1, i32* %9
br label %47
40: ; preds = %31
store i32 1, i32* %10
br label %47
41: ; preds = %31
store i32 1, i32* %11
br label %47
42: ; preds = %31
store i32 1, i32* %12
br label %47
43: ; preds = %31
store i32 1, i32* %13
br label %47
44: ; preds = %31
store i32 1, i32* %14
br label %47
45: ; preds = %31
%46 = call i32 (...) @usage()
br label %47
47: ; preds = %45, %44, %43, %42, %41, %40, %39, %36, %33
br label %26
48: ; preds = %26
%49 = load i32, i32* @optind
%50 = load i32, i32* %4
%51 = sub nsw i32 %50, 1
%52 = icmp ne i32 %49, %51
br i1 %52, label %62, label %53
53: ; preds = %48
%54 = load i32, i32* %9
%55 = icmp ne i32 %54, 0
br i1 %55, label %64, label %56
56: ; preds = %53
%57 = load i32, i32* %10
%58 = icmp ne i32 %57, 0
br i1 %58, label %64, label %59
59: ; preds = %56
%60 = load i32, i32* %11
%61 = icmp ne i32 %60, 0
br i1 %61, label %64, label %62
62: ; preds = %59, %48
%63 = call i32 (...) @usage()
br label %64
64: ; preds = %62, %59, %56, %53
%65 = load i8**, i8*** %5
%66 = load i32, i32* @optind
%67 = add nsw i32 %66, 1
store i32 %67, i32* @optind
%68 = sext i32 %66 to i64
%69 = getelementptr inbounds i8*, i8** %65, i64 %68
%70 = load i8*, i8** %69
store i8* %70, i8** %6
%71 = load i8*, i8** %6
%72 = load i32, i32* %7
%73 = call i8** @searchpath_create(i8* %71, i32 %72)
store i8** %73, i8*** %16
%74 = load i32, i32* %13
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %77
76: ; preds = %64
br label %80
77: ; preds = %64
%78 = load i32, i32* %7
%79 = sub nsw i32 %78, 1
br label %80
80: ; preds = %77, %76
%81 = phi i32 [ -1, %76 ], [ %79, %77 ]
store i32 %81, i32* %20
%82 = load i32, i32* %9
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %121
84: ; preds = %80
%85 = call i64 @gettimeofday(%struct.timeval* %17, i32* null)
%86 = icmp slt i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %84
%88 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %89
89: ; preds = %87, %84
%90 = load i8*, i8** %6
%91 = call i64 @mkdir(i8* %90, i32 511)
%92 = icmp slt i64 %91, 0
br i1 %92, label %93, label %96
93: ; preds = %89
%94 = load i8*, i8** %6
%95 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %94)
br label %96
96: ; preds = %93, %89
%97 = load i8**, i8*** %16
%98 = load i32, i32* %7
%99 = load i32, i32* %8
%100 = call i32 @fsobj_create(i8** %97, i32 %98, i32 %99)
%101 = call i64 @gettimeofday(%struct.timeval* %18, i32* null)
%102 = icmp slt i64 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %96
%104 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %105
105: ; preds = %103, %96
%106 = call i32 @timersub(%struct.timeval* %18, %struct.timeval* %17, %struct.timeval* %19)
%107 = load i32, i32* %14
%108 = icmp ne i32 %107, 0
br i1 %108, label %120, label %109
109: ; preds = %105
%110 = load i32, i32* %7
%111 = load i32, i32* %8
%112 = mul nsw i32 %110, %111
%113 = add nsw i32 %112, 1
%114 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 1
%115 = load i32, i32* %114
%116 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 0
%117 = load i32, i32* %116
%118 = sdiv i32 %117, 1000
%119 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %113, i32 %115, i32 %118)
br label %120
120: ; preds = %109, %105
br label %121
121: ; preds = %120, %80
%122 = load i32, i32* %11
%123 = icmp ne i32 %122, 0
br i1 %123, label %124, label %185
124: ; preds = %121
%125 = load i32, i32* %12
%126 = icmp ne i32 %125, 0
br i1 %126, label %127, label %155
127: ; preds = %124
%128 = call i64 @gettimeofday(%struct.timeval* %17, i32* null)
%129 = icmp slt i64 %128, 0
br i1 %129, label %130, label %132
130: ; preds = %127
%131 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %132
132: ; preds = %130, %127
%133 = load i8**, i8*** %16
%134 = load i32, i32* %7
%135 = load i32, i32* %20
%136 = call i32 @pathwalk(i8** %133, i32 %134, i32 1, i32 %135)
store i32 %136, i32* %21
%137 = call i64 @gettimeofday(%struct.timeval* %18, i32* null)
%138 = icmp slt i64 %137, 0
br i1 %138, label %139, label %141
139: ; preds = %132
%140 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %141
141: ; preds = %139, %132
%142 = call i32 @timersub(%struct.timeval* %18, %struct.timeval* %17, %struct.timeval* %19)
%143 = load i32, i32* %14
%144 = icmp ne i32 %143, 0
br i1 %144, label %154, label %145
145: ; preds = %141
%146 = load i32, i32* %21
%147 = load i32, i32* %7
%148 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 1
%149 = load i32, i32* %148
%150 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 0
%151 = load i32, i32* %150
%152 = sdiv i32 %151, 1000
%153 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i32 %146, i32 1, i32 %147, i32 %149, i32 %152)
br label %154
154: ; preds = %145, %141
br label %155
155: ; preds = %154, %124
%156 = call i64 @gettimeofday(%struct.timeval* %17, i32* null)
%157 = icmp slt i64 %156, 0
br i1 %157, label %158, label %160
158: ; preds = %155
%159 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %160
160: ; preds = %158, %155
%161 = load i8**, i8*** %16
%162 = load i32, i32* %7
%163 = load i32, i32* %8
%164 = load i32, i32* %20
%165 = call i32 @pathwalk(i8** %161, i32 %162, i32 %163, i32 %164)
store i32 %165, i32* %21
%166 = call i64 @gettimeofday(%struct.timeval* %18, i32* null)
%167 = icmp slt i64 %166, 0
br i1 %167, label %168, label %170
168: ; preds = %160
%169 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %170
170: ; preds = %168, %160
%171 = call i32 @timersub(%struct.timeval* %18, %struct.timeval* %17, %struct.timeval* %19)
%172 = load i32, i32* %14
%173 = icmp ne i32 %172, 0
br i1 %173, label %184, label %174
174: ; preds = %170
%175 = load i32, i32* %21
%176 = load i32, i32* %8
%177 = load i32, i32* %7
%178 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 1
%179 = load i32, i32* %178
%180 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 0
%181 = load i32, i32* %180
%182 = sdiv i32 %181, 1000
%183 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i32 %175, i32 %176, i32 %177, i32 %179, i32 %182)
br label %184
184: ; preds = %174, %170
br label %185
185: ; preds = %184, %121
%186 = load i32, i32* %10
%187 = icmp ne i32 %186, 0
br i1 %187, label %188, label %225
188: ; preds = %185
%189 = call i64 @gettimeofday(%struct.timeval* %17, i32* null)
%190 = icmp slt i64 %189, 0
br i1 %190, label %191, label %193
191: ; preds = %188
%192 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %193
193: ; preds = %191, %188
%194 = load i8**, i8*** %16
%195 = load i32, i32* %7
%196 = load i32, i32* %8
%197 = call i32 @fsobj_destroy(i8** %194, i32 %195, i32 %196)
%198 = load i8*, i8** %6
%199 = call i64 @rmdir(i8* %198)
%200 = icmp slt i64 %199, 0
br i1 %200, label %201, label %204
201: ; preds = %193
%202 = load i8*, i8** %6
%203 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %202)
br label %204
204: ; preds = %201, %193
%205 = call i64 @gettimeofday(%struct.timeval* %18, i32* null)
%206 = icmp slt i64 %205, 0
br i1 %206, label %207, label %209
207: ; preds = %204
%208 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %209
209: ; preds = %207, %204
%210 = call i32 @timersub(%struct.timeval* %18, %struct.timeval* %17, %struct.timeval* %19)
%211 = load i32, i32* %14
%212 = icmp ne i32 %211, 0
br i1 %212, label %224, label %213
213: ; preds = %209
%214 = load i32, i32* %7
%215 = load i32, i32* %8
%216 = mul nsw i32 %214, %215
%217 = add nsw i32 %216, 1
%218 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 1
%219 = load i32, i32* %218
%220 = getelementptr inbounds %struct.timeval, %struct.timeval* %19, i32 0, i32 0
%221 = load i32, i32* %220
%222 = sdiv i32 %221, 1000
%223 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %217, i32 %219, i32 %222)
br label %224
224: ; preds = %213, %209
br label %225
225: ; preds = %224, %185
%226 = load i8**, i8*** %16
%227 = load i32, i32* %7
%228 = call i32 @searchpath_destroy(i8** %226, i32 %227)
%229 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
@opterr = global i64 0
@.str = [11 x i8] c"l:f:crtCFq\00"
@optarg = global i32 0
@optind = global i32 0
@.str.1 = [13 x i8] c"gettimeofday\00"
@.str.2 = [9 x i8] c"mkdir %s\00"
@.str.3 = [33 x i8] c"Created %d objects in %lu.%.3lus\00"
@.str.4 = [50 x i8] c"Found %d/%d files in %d directories in %lu.%.3lus\00"
@.str.5 = [9 x i8] c"rmdir %s\00"
@.str.6 = [33 x i8] c"Removed %d objects in %lu.%.3lus\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca %struct.timeval
%6 = bitcast %struct.timeval* %3 to i8*
%7 = bitcast %struct.timeval* %4 to i8*
%8 = bitcast %struct.timeval* %5 to i8*
%9 = load i8*, i8** %1
%10 = tail call i32 @diod_log_init(i8* %9)
store i64 0, i64* @opterr
br label %11
11: ; preds = %21, %2
%12 = phi i32 [ 0, %2 ], [ %22, %21 ]
%13 = phi i32 [ 0, %2 ], [ %23, %21 ]
%14 = phi i32 [ 0, %2 ], [ %24, %21 ]
%15 = phi i32 [ 0, %2 ], [ %25, %21 ]
%16 = phi i32 [ 0, %2 ], [ %26, %21 ]
%17 = phi i32 [ 0, %2 ], [ %27, %21 ]
%18 = phi i32 [ 10000, %2 ], [ %28, %21 ]
%19 = phi i32 [ 16, %2 ], [ %29, %21 ]
%20 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
switch i32 %20, label %41 [
i32 -1, label %43
i32 108, label %30
i32 102, label %33
i32 99, label %21
i32 114, label %36
i32 116, label %37
i32 67, label %38
i32 70, label %39
i32 113, label %40
]
21: ; preds = %11, %41, %40, %39, %38, %37, %36, %33, %30
%22 = phi i32 [ %12, %41 ], [ %12, %40 ], [ %12, %39 ], [ %12, %38 ], [ %12, %37 ], [ %12, %36 ], [ %12, %33 ], [ %12, %30 ], [ 1, %11 ]
%23 = phi i32 [ %13, %41 ], [ %13, %40 ], [ %13, %39 ], [ %13, %38 ], [ %13, %37 ], [ 1, %36 ], [ %13, %33 ], [ %13, %30 ], [ %13, %11 ]
%24 = phi i32 [ %14, %41 ], [ %14, %40 ], [ %14, %39 ], [ %14, %38 ], [ 1, %37 ], [ %14, %36 ], [ %14, %33 ], [ %14, %30 ], [ %14, %11 ]
%25 = phi i32 [ %15, %41 ], [ %15, %40 ], [ %15, %39 ], [ 1, %38 ], [ %15, %37 ], [ %15, %36 ], [ %15, %33 ], [ %15, %30 ], [ %15, %11 ]
%26 = phi i32 [ %16, %41 ], [ %16, %40 ], [ 1, %39 ], [ %16, %38 ], [ %16, %37 ], [ %16, %36 ], [ %16, %33 ], [ %16, %30 ], [ %16, %11 ]
%27 = phi i32 [ %17, %41 ], [ 1, %40 ], [ %17, %39 ], [ %17, %38 ], [ %17, %37 ], [ %17, %36 ], [ %17, %33 ], [ %17, %30 ], [ %17, %11 ]
%28 = phi i32 [ %18, %41 ], [ %18, %40 ], [ %18, %39 ], [ %18, %38 ], [ %18, %37 ], [ %18, %36 ], [ %35, %33 ], [ %18, %30 ], [ %18, %11 ]
%29 = phi i32 [ %19, %41 ], [ %19, %40 ], [ %19, %39 ], [ %19, %38 ], [ %19, %37 ], [ %19, %36 ], [ %19, %33 ], [ %32, %30 ], [ %19, %11 ]
br label %11
30: ; preds = %11
%31 = load i32, i32* @optarg
%32 = tail call i32 @strtoul(i32 %31, i32* null, i32 10)
br label %21
33: ; preds = %11
%34 = load i32, i32* @optarg
%35 = tail call i32 @strtoul(i32 %34, i32* null, i32 10)
br label %21
36: ; preds = %11
br label %21
37: ; preds = %11
br label %21
38: ; preds = %11
br label %21
39: ; preds = %11
br label %21
40: ; preds = %11
br label %21
41: ; preds = %11
%42 = tail call i32 (...) @usage()
br label %21
43: ; preds = %11
%44 = load i32, i32* @optind
%45 = add nsw i32 %0, -1
%46 = icmp eq i32 %44, %45
br i1 %46, label %47, label %53
47: ; preds = %43
%48 = icmp ne i32 %12, 0
%49 = icmp ne i32 %13, 0
%50 = select i1 %48, i1 true, i1 %49
%51 = icmp ne i32 %14, 0
%52 = select i1 %50, i1 true, i1 %51
br i1 %52, label %56, label %53
53: ; preds = %47, %43
%54 = tail call i32 (...) @usage()
%55 = load i32, i32* @optind
br label %56
56: ; preds = %53, %47
%57 = phi i32 [ %55, %53 ], [ %44, %47 ]
%58 = add nsw i32 %57, 1
store i32 %58, i32* @optind
%59 = sext i32 %57 to i64
%60 = getelementptr inbounds i8*, i8** %1, i64 %59
%61 = load i8*, i8** %60
%62 = tail call i8** @searchpath_create(i8* %61, i32 %19)
%63 = icmp eq i32 %16, 0
%64 = add nsw i32 %19, -1
%65 = select i1 %63, i32 %64, i32 -1
%66 = icmp eq i32 %12, 0
br i1 %66, label %95, label %67
67: ; preds = %56
%68 = call i64 @gettimeofday(%struct.timeval* %3, i32* null)
%69 = icmp slt i64 %68, 0
br i1 %69, label %70, label %72
70: ; preds = %67
%71 = tail call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %72
72: ; preds = %70, %67
%73 = tail call i64 @mkdir(i8* %61, i32 511)
%74 = icmp slt i64 %73, 0
br i1 %74, label %75, label %77
75: ; preds = %72
%76 = tail call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i8* %61)
br label %77
77: ; preds = %75, %72
%78 = tail call i32 @fsobj_create(i8** %62, i32 %19, i32 %18)
%79 = call i64 @gettimeofday(%struct.timeval* %4, i32* null)
%80 = icmp slt i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = tail call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %83
83: ; preds = %81, %77
%84 = call i32 @timersub(%struct.timeval* %4, %struct.timeval* %3, %struct.timeval* %5)
%85 = icmp eq i32 %17, 0
br i1 %85, label %86, label %95
86: ; preds = %83
%87 = mul nsw i32 %19, %18
%88 = add nsw i32 %87, 1
%89 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%90 = load i32, i32* %89
%91 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%92 = load i32, i32* %91
%93 = sdiv i32 %92, 1000
%94 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), i32 %88, i32 %90, i32 %93)
br label %95
95: ; preds = %83, %86, %56
%96 = icmp eq i32 %14, 0
br i1 %96, label %141, label %97
97: ; preds = %95
%98 = icmp eq i32 %15, 0
br i1 %98, label %120, label %99
99: ; preds = %97
%100 = call i64 @gettimeofday(%struct.timeval* %3, i32* null)
%101 = icmp slt i64 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %99
%103 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %104
104: ; preds = %102, %99
%105 = call i32 @pathwalk(i8** %62, i32 %19, i32 1, i32 %65)
%106 = call i64 @gettimeofday(%struct.timeval* %4, i32* null)
%107 = icmp slt i64 %106, 0
br i1 %107, label %108, label %110
108: ; preds = %104
%109 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %110
110: ; preds = %108, %104
%111 = call i32 @timersub(%struct.timeval* %4, %struct.timeval* %3, %struct.timeval* %5)
%112 = icmp eq i32 %17, 0
br i1 %112, label %113, label %120
113: ; preds = %110
%114 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%115 = load i32, i32* %114
%116 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%117 = load i32, i32* %116
%118 = sdiv i32 %117, 1000
%119 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i32 %105, i32 1, i32 %19, i32 %115, i32 %118)
br label %120
120: ; preds = %110, %113, %97
%121 = call i64 @gettimeofday(%struct.timeval* %3, i32* null)
%122 = icmp slt i64 %121, 0
br i1 %122, label %123, label %125
123: ; preds = %120
%124 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %125
125: ; preds = %123, %120
%126 = call i32 @pathwalk(i8** %62, i32 %19, i32 %18, i32 %65)
%127 = call i64 @gettimeofday(%struct.timeval* %4, i32* null)
%128 = icmp slt i64 %127, 0
br i1 %128, label %129, label %131
129: ; preds = %125
%130 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %131
131: ; preds = %129, %125
%132 = call i32 @timersub(%struct.timeval* %4, %struct.timeval* %3, %struct.timeval* %5)
%133 = icmp eq i32 %17, 0
br i1 %133, label %134, label %141
134: ; preds = %131
%135 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%136 = load i32, i32* %135
%137 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%138 = load i32, i32* %137
%139 = sdiv i32 %138, 1000
%140 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.4, i64 0, i64 0), i32 %126, i32 %18, i32 %19, i32 %136, i32 %139)
br label %141
141: ; preds = %131, %134, %95
%142 = icmp eq i32 %13, 0
br i1 %142, label %171, label %143
143: ; preds = %141
%144 = call i64 @gettimeofday(%struct.timeval* %3, i32* null)
%145 = icmp slt i64 %144, 0
br i1 %145, label %146, label %148
146: ; preds = %143
%147 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %148
148: ; preds = %146, %143
%149 = call i32 @fsobj_destroy(i8** %62, i32 %19, i32 %18)
%150 = call i64 @rmdir(i8* %61)
%151 = icmp slt i64 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %148
%153 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %61)
br label %154
154: ; preds = %152, %148
%155 = call i64 @gettimeofday(%struct.timeval* %4, i32* null)
%156 = icmp slt i64 %155, 0
br i1 %156, label %157, label %159
157: ; preds = %154
%158 = call i32 (i8*, ...) @err_exit(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %159
159: ; preds = %157, %154
%160 = call i32 @timersub(%struct.timeval* %4, %struct.timeval* %3, %struct.timeval* %5)
%161 = icmp eq i32 %17, 0
br i1 %161, label %162, label %171
162: ; preds = %159
%163 = mul nsw i32 %19, %18
%164 = add nsw i32 %163, 1
%165 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 1
%166 = load i32, i32* %165
%167 = getelementptr inbounds %struct.timeval, %struct.timeval* %5, i64 0, i32 0
%168 = load i32, i32* %167
%169 = sdiv i32 %168, 1000
%170 = call i32 (i8*, i32, i32, i32, ...) @msg(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i32 %164, i32 %166, i32 %169)
br label %171
171: ; preds = %159, %162, %141
%172 = call i32 @searchpath_destroy(i8** %62, i32 %19)
%173 = call i32 @exit(i32 0)
unreachable
}