#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 {
  scalar_t__ tv_usec;
  scalar_t__ tv_sec;
};
struct stat {
  int dummy;
};
typedef int /*<<< orphan*/ runlabel;
typedef int /*<<< orphan*/ label;

/* Variables and functions */
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int, ...);
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int lgetxattr(char *, char *, char *, int);
scalar_t__ mkdir(char *, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *, int, int, int);
int read(int, char *, int);
scalar_t__ seteuid(int);
scalar_t__ setxattr(char *, char *, char *, scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ sprintf(char *, char *, ...);
int stat(char *, struct stat *);
int /*<<< orphan*/ stderr;
char *strchr(char *, char);
scalar_t__ strlen(char *);
int /*<<< orphan*/ system(char *);
scalar_t__ write(int, char *, scalar_t__);
int writeload();
int writeload2();
int main(int argc, char *argv[]) {
  struct timeval start_time;
  struct timeval end_time;
  struct stat buf;
  char runlabel[256];
  char label[256];
  char path[256];
  char *cp;
  int sub;
  int obj;
  int cfd;
  int rc;
  int i;
  cfd = open("/proc/self/attr/smack/current", O_RDWR);
  if (cfd < 0)
    cfd = open("/proc/self/attr/current", O_RDWR);
  if (cfd < 0)
    perror("Preparing to read Smack label");
  rc = read(cfd, runlabel, sizeof(runlabel));
  runlabel[rc] = '\0';
  if ((cp = strchr(runlabel, '\n')) != NULL)
    *cp = '\0';
  close(cfd);
  cfd = open("/proc/self/attr/smack/current", O_RDWR);
  if (cfd < 0)
    cfd = open("/proc/self/attr/current", O_RDWR);
  if (cfd < 0)
    perror("Preparing to set Smack labels");
  if (writeload() == -1)
    exit(1);
  system("/bin/rm -rf "
         "/tmp/smack-speed-test");
  if (mkdir("/tmp/smack-speed-test", 0777) < 0) {
    perror("mkdir of "
           "/tmp/smack-speed-test");
    exit(1);
  }
  for (obj = 1; obj <= 200; obj++) {
    sprintf(label, "speed-%d", obj);
    sprintf(path, "%s/speed-%d", "/tmp/smack-speed-test", obj);
    if (mkdir(path, 0777) < 0) {
      perror(path);
      exit(1);
    }
    if (setxattr(path, "security.SMACK64", label, strlen(label), 0) < 0) {
      perror(path);
      exit(1);
    }
  }
  gettimeofday(&start_time, NULL);
  for (sub = 1; sub <= 200; sub++) {
    sprintf(path, "speed-%d", sub);
    if (write(cfd, path, strlen(path) + 1) < 0)
      perror("Setting process Smack");
    if (seteuid(99) < 0) {
      perror("seteuid(99)");
      exit(1);
    }
    for (obj = 1; obj <= 200; obj++) {
      sprintf(path, "%s/speed-%d", "/tmp/smack-speed-test", obj);
      rc = stat(path, &buf);
      if (sub == obj && rc < 0)
        fprintf(stderr, "Unexpected failure for %d %d\n", sub, obj);
      else if (sub == obj + 1) {
        if (rc < 0)
          fprintf(stderr, "Unexpected failure for %d %d\n", sub, obj);
      } else if (sub != obj && rc >= 0)
        fprintf(stderr, "Unexpected success for %d %d\n", sub, obj);
    }
    if (seteuid(0) < 0) {
      perror("seteuid(0)");
      exit(1);
    }
  }
  gettimeofday(&end_time, NULL);
  if (start_time.tv_usec > end_time.tv_usec) {
    end_time.tv_usec += 1000000;
    end_time.tv_sec -= 1;
  }
  printf("%s: short label speed factor %d %d.%06d seconds\n", argv[0], 200,
         (int)end_time.tv_sec - (int)start_time.tv_sec,
         (int)end_time.tv_usec - (int)start_time.tv_usec);
  seteuid(0);
  write(cfd, runlabel, strlen(runlabel) + 1);
  if (writeload2() == -1)
    exit(1);
  system("/bin/rm -rf "
         "/tmp/smack-speed-test");
  if (mkdir("/tmp/smack-speed-test", 0777) < 0) {
    perror("mkdir of "
           "/tmp/smack-speed-test");
    exit(1);
  }
  for (obj = 1; obj <= 200; obj++) {
    sprintf(label,
            "com.smack-laboritories-duty-now-for-the-future"
            "-%d",
            obj);
    sprintf(path, "%s/speed-%d", "/tmp/smack-speed-test", obj);
    if (mkdir(path, 0777) < 0) {
      perror(path);
      exit(1);
    }
    if (setxattr(path, "security.SMACK64", label, strlen(label), 0) < 0) {
      perror(path);
      exit(1);
    }
  }
  gettimeofday(&start_time, NULL);
  for (sub = 1; sub <= 200; sub++) {
    sprintf(path,
            "com.smack-laboritories-duty-now-for-the-future"
            "-%d",
            sub);
    if (write(cfd, path, strlen(path)) < 0)
      perror("Setting process Smack");
    if (seteuid(99) < 0) {
      perror("seteuid(99)");
      exit(1);
    }
    for (obj = 1; obj <= 200; obj++) {
      sprintf(path, "%s/speed-%d", "/tmp/smack-speed-test", obj);
      rc = stat(path, &buf);
      if (sub == obj && rc < 0) {
        seteuid(0);
        i = lgetxattr(path, "security.SMACK64", label, sizeof(label));
        seteuid(99);
        if (i >= 0)
          label[i] = '\0';
        else
          label[0] = '\0';
        fprintf(stderr, "Unexpected failure for %d %d (%s)\n", sub, obj, label);
      } else if (sub == obj + 1) {
        seteuid(0);
        i = lgetxattr(path, "security.SMACK64", label, sizeof(label));
        seteuid(99);
        if (i >= 0)
          label[i] = '\0';
        else
          label[0] = '\0';
        if (rc < 0)
          fprintf(stderr,
                  "Unexpected failure for "
                  "%d %d (%s)\n",
                  sub, obj, label);
      } else if (sub != obj && rc >= 0)
        fprintf(stderr, "Unexpected success for %d %d\n", sub, obj);
    }
    if (seteuid(0) < 0) {
      perror("seteuid(0)");
      exit(1);
    }
  }
  gettimeofday(&end_time, NULL);
  if (start_time.tv_usec > end_time.tv_usec) {
    end_time.tv_usec += 1000000;
    end_time.tv_sec -= 1;
  }
  printf("%s: long label speed factor %d %d.%06d seconds\n", argv[0], 200,
         (int)end_time.tv_sec - (int)start_time.tv_sec,
         (int)end_time.tv_usec - (int)start_time.tv_usec);
  system("/bin/rm -rf "
         "/tmp/smack-speed-test");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2d88(%rip),%rax
mov    (%rax),%esi
lea    0xd97(%rip),%rdi
call   1100 <open@plt>
mov    %eax,-0x354(%rbp)
cmpl   $0x0,-0x354(%rbp)
jge    129c <main+0x5c>
mov    0x2d60(%rip),%rax
mov    (%rax),%esi
lea    0xd8d(%rip),%rdi
call   1100 <open@plt>
mov    %eax,-0x354(%rbp)
cmpl   $0x0,-0x354(%rbp)
jge    12b5 <main+0x75>
lea    0xd86(%rip),%rdi
call   1110 <perror@plt>
mov    -0x354(%rbp),%edi
lea    -0x140(%rbp),%rsi
mov    $0x100,%edx
call   10d0 <read@plt>
mov    %eax,-0x358(%rbp)
movslq -0x358(%rbp),%rax
movb   $0x0,-0x140(%rbp,%rax,1)
lea    -0x140(%rbp),%rdi
mov    $0xa,%esi
call   1080 <strchr@plt>
mov    %rax,-0x348(%rbp)
cmp    $0x0,%rax
je     130d <main+0xcd>
mov    -0x348(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x354(%rbp),%edi
call   10c0 <close@plt>
mov    0x2cc9(%rip),%rax
mov    (%rax),%esi
lea    0xcd8(%rip),%rdi
call   1100 <open@plt>
mov    %eax,-0x354(%rbp)
cmpl   $0x0,-0x354(%rbp)
jge    135b <main+0x11b>
mov    0x2ca1(%rip),%rax
mov    (%rax),%esi
lea    0xcce(%rip),%rdi
call   1100 <open@plt>
mov    %eax,-0x354(%rbp)
cmpl   $0x0,-0x354(%rbp)
jge    1374 <main+0x134>
lea    0xce5(%rip),%rdi
call   1110 <perror@plt>
mov    $0x0,%al
call   10a0 <writeload@plt>
cmp    $0xffffffff,%eax
jne    138e <main+0x14e>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    0xcdd(%rip),%rdi
call   1070 <system@plt>
lea    0xcfc(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    13cb <main+0x18b>
lea    0xcd8(%rip),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
movl   $0x1,-0x350(%rbp)
cmpl   $0xc8,-0x350(%rbp)
jg     14d4 <main+0x294>
lea    -0x240(%rbp),%rdi
mov    -0x350(%rbp),%edx
lea    0xcbd(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x340(%rbp),%rdi
mov    -0x350(%rbp),%ecx
lea    0xc9f(%rip),%rsi
lea    0xc82(%rip),%rdx
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x340(%rbp),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    1453 <main+0x213>
lea    -0x340(%rbp),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    -0x340(%rbp),%rax
mov    %rax,-0x370(%rbp)
lea    -0x240(%rbp),%rax
mov    %rax,-0x368(%rbp)
lea    -0x240(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x370(%rbp),%rdi
mov    -0x368(%rbp),%rdx
mov    %rax,%rcx
lea    0xc2c(%rip),%rsi
xor    %r8d,%r8d
call   1150 <setxattr@plt>
cmp    $0x0,%rax
jge    14bb <main+0x27b>
lea    -0x340(%rbp),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
jmp    14c0 <main+0x280>
mov    -0x350(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x350(%rbp)
jmp    13d5 <main+0x195>
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10b0 <gettimeofday@plt>
movl   $0x1,-0x34c(%rbp)
cmpl   $0xc8,-0x34c(%rbp)
jg     171f <main+0x4df>
lea    -0x340(%rbp),%rdi
mov    -0x34c(%rbp),%edx
lea    0xba7(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x354(%rbp),%eax
mov    %eax,-0x37c(%rbp)
lea    -0x340(%rbp),%rax
mov    %rax,-0x378(%rbp)
lea    -0x340(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x37c(%rbp),%edi
mov    -0x378(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <write@plt>
cmp    $0x0,%rax
jge    156b <main+0x32b>
lea    0xb6a(%rip),%rdi
call   1110 <perror@plt>
mov    $0x63,%edi
call   1160 <seteuid@plt>
cmp    $0x0,%rax
jge    1595 <main+0x355>
lea    0xb60(%rip),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
movl   $0x1,-0x350(%rbp)
cmpl   $0xc8,-0x350(%rbp)
jg     16df <main+0x49f>
lea    -0x340(%rbp),%rdi
mov    -0x350(%rbp),%ecx
lea    0xaf0(%rip),%rsi
lea    0xad3(%rip),%rdx
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x340(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10f0 <stat@plt>
mov    %eax,-0x358(%rbp)
mov    -0x34c(%rbp),%eax
cmp    -0x350(%rbp),%eax
jne    162e <main+0x3ee>
cmpl   $0x0,-0x358(%rbp)
jge    162e <main+0x3ee>
mov    0x29cb(%rip),%rax
mov    (%rax),%edi
mov    -0x34c(%rbp),%edx
mov    -0x350(%rbp),%ecx
lea    0xad0(%rip),%rsi
mov    $0x0,%al
call   10e0 <fprintf@plt>
jmp    16c6 <main+0x486>
mov    -0x34c(%rbp),%eax
mov    -0x350(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    167a <main+0x43a>
cmpl   $0x0,-0x358(%rbp)
jge    1675 <main+0x435>
mov    0x297f(%rip),%rax
mov    (%rax),%edi
mov    -0x34c(%rbp),%edx
mov    -0x350(%rbp),%ecx
lea    0xa84(%rip),%rsi
mov    $0x0,%al
call   10e0 <fprintf@plt>
jmp    16c1 <main+0x481>
mov    -0x34c(%rbp),%eax
cmp    -0x350(%rbp),%eax
je     16bc <main+0x47c>
cmpl   $0x0,-0x358(%rbp)
jl     16bc <main+0x47c>
mov    0x2938(%rip),%rax
mov    (%rax),%edi
mov    -0x34c(%rbp),%edx
mov    -0x350(%rbp),%ecx
lea    0xa5b(%rip),%rsi
mov    $0x0,%al
call   10e0 <fprintf@plt>
jmp    16c1 <main+0x481>
jmp    16c6 <main+0x486>
jmp    16cb <main+0x48b>
mov    -0x350(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x350(%rbp)
jmp    159f <main+0x35f>
xor    %edi,%edi
call   1160 <seteuid@plt>
cmp    $0x0,%rax
jge    1706 <main+0x4c6>
lea    0xa37(%rip),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
jmp    170b <main+0x4cb>
mov    -0x34c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34c(%rbp)
jmp    14eb <main+0x2ab>
lea    -0x30(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10b0 <gettimeofday@plt>
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jle    1754 <main+0x514>
mov    -0x30(%rbp),%rax
add    $0xf4240,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x28(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %eax,%r8d
mov    -0x20(%rbp),%rax
sub    %eax,%r8d
lea    0x9bd(%rip),%rdi
mov    $0xc8,%edx
call   1090 <printf@plt>
xor    %edi,%edi
call   1160 <seteuid@plt>
mov    -0x354(%rbp),%eax
mov    %eax,-0x38c(%rbp)
lea    -0x140(%rbp),%rax
mov    %rax,-0x388(%rbp)
lea    -0x140(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x38c(%rbp),%edi
mov    -0x388(%rbp),%rsi
mov    %rax,%rdx
add    $0x1,%rdx
call   1040 <write@plt>
mov    $0x0,%al
call   1120 <writeload2@plt>
cmp    $0xffffffff,%eax
jne    17e6 <main+0x5a6>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    0x885(%rip),%rdi
call   1070 <system@plt>
lea    0x8a4(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    1823 <main+0x5e3>
lea    0x880(%rip),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
movl   $0x1,-0x350(%rbp)
cmpl   $0xc8,-0x350(%rbp)
jg     192c <main+0x6ec>
lea    -0x240(%rbp),%rdi
mov    -0x350(%rbp),%edx
lea    0x919(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x340(%rbp),%rdi
mov    -0x350(%rbp),%ecx
lea    0x847(%rip),%rsi
lea    0x82a(%rip),%rdx
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x340(%rbp),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
cmp    $0x0,%rax
jge    18ab <main+0x66b>
lea    -0x340(%rbp),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    -0x340(%rbp),%rax
mov    %rax,-0x3a0(%rbp)
lea    -0x240(%rbp),%rax
mov    %rax,-0x398(%rbp)
lea    -0x240(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x3a0(%rbp),%rdi
mov    -0x398(%rbp),%rdx
mov    %rax,%rcx
lea    0x7d4(%rip),%rsi
xor    %r8d,%r8d
call   1150 <setxattr@plt>
cmp    $0x0,%rax
jge    1913 <main+0x6d3>
lea    -0x340(%rbp),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
jmp    1918 <main+0x6d8>
mov    -0x350(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x350(%rbp)
jmp    182d <main+0x5ed>
lea    -0x20(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10b0 <gettimeofday@plt>
movl   $0x1,-0x34c(%rbp)
cmpl   $0xc8,-0x34c(%rbp)
jg     1c3d <main+0x9fd>
lea    -0x340(%rbp),%rdi
mov    -0x34c(%rbp),%edx
lea    0x803(%rip),%rsi
mov    $0x0,%al
call   1130 <sprintf@plt>
mov    -0x354(%rbp),%eax
mov    %eax,-0x3ac(%rbp)
lea    -0x340(%rbp),%rax
mov    %rax,-0x3a8(%rbp)
lea    -0x340(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x3ac(%rbp),%edi
mov    -0x3a8(%rbp),%rsi
mov    %rax,%rdx
call   1040 <write@plt>
cmp    $0x0,%rax
jge    19bf <main+0x77f>
lea    0x716(%rip),%rdi
call   1110 <perror@plt>
mov    $0x63,%edi
call   1160 <seteuid@plt>
cmp    $0x0,%rax
jge    19e9 <main+0x7a9>
lea    0x70c(%rip),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
movl   $0x1,-0x350(%rbp)
cmpl   $0xc8,-0x350(%rbp)
jg     1bfd <main+0x9bd>
lea    -0x340(%rbp),%rdi
mov    -0x350(%rbp),%ecx
lea    0x69c(%rip),%rsi
lea    0x67f(%rip),%rdx
mov    $0x0,%al
call   1130 <sprintf@plt>
lea    -0x340(%rbp),%rdi
lea    -0x38(%rbp),%rsi
call   10f0 <stat@plt>
mov    %eax,-0x358(%rbp)
mov    -0x34c(%rbp),%eax
cmp    -0x350(%rbp),%eax
jne    1ae7 <main+0x8a7>
cmpl   $0x0,-0x358(%rbp)
jge    1ae7 <main+0x8a7>
xor    %edi,%edi
call   1160 <seteuid@plt>
lea    -0x340(%rbp),%rdi
lea    -0x240(%rbp),%rdx
lea    0x649(%rip),%rsi
mov    $0x100,%ecx
call   1050 <lgetxattr@plt>
mov    %eax,-0x35c(%rbp)
mov    $0x63,%edi
call   1160 <seteuid@plt>
cmpl   $0x0,-0x35c(%rbp)
jl     1ab1 <main+0x871>
movslq -0x35c(%rbp),%rax
movb   $0x0,-0x240(%rbp,%rax,1)
jmp    1ab8 <main+0x878>
movb   $0x0,-0x240(%rbp)
mov    0x2519(%rip),%rax
mov    (%rax),%edi
mov    -0x34c(%rbp),%edx
mov    -0x350(%rbp),%ecx
lea    -0x240(%rbp),%r8
lea    0x6c1(%rip),%rsi
mov    $0x0,%al
call   10e0 <fprintf@plt>
jmp    1be4 <main+0x9a4>
mov    -0x34c(%rbp),%eax
mov    -0x350(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jne    1b98 <main+0x958>
xor    %edi,%edi
call   1160 <seteuid@plt>
lea    -0x340(%rbp),%rdi
lea    -0x240(%rbp),%rdx
lea    0x5a5(%rip),%rsi
mov    $0x100,%ecx
call   1050 <lgetxattr@plt>
mov    %eax,-0x35c(%rbp)
mov    $0x63,%edi
call   1160 <seteuid@plt>
cmpl   $0x0,-0x35c(%rbp)
jl     1b55 <main+0x915>
movslq -0x35c(%rbp),%rax
movb   $0x0,-0x240(%rbp,%rax,1)
jmp    1b5c <main+0x91c>
movb   $0x0,-0x240(%rbp)
cmpl   $0x0,-0x358(%rbp)
jge    1b93 <main+0x953>
mov    0x2468(%rip),%rax
mov    (%rax),%edi
mov    -0x34c(%rbp),%edx
mov    -0x350(%rbp),%ecx
lea    -0x240(%rbp),%r8
lea    0x610(%rip),%rsi
mov    $0x0,%al
call   10e0 <fprintf@plt>
jmp    1bdf <main+0x99f>
mov    -0x34c(%rbp),%eax
cmp    -0x350(%rbp),%eax
je     1bda <main+0x99a>
cmpl   $0x0,-0x358(%rbp)
jl     1bda <main+0x99a>
mov    0x241a(%rip),%rax
mov    (%rax),%edi
mov    -0x34c(%rbp),%edx
mov    -0x350(%rbp),%ecx
lea    0x53d(%rip),%rsi
mov    $0x0,%al
call   10e0 <fprintf@plt>
jmp    1bdf <main+0x99f>
jmp    1be4 <main+0x9a4>
jmp    1be9 <main+0x9a9>
mov    -0x350(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x350(%rbp)
jmp    19f3 <main+0x7b3>
xor    %edi,%edi
call   1160 <seteuid@plt>
cmp    $0x0,%rax
jge    1c24 <main+0x9e4>
lea    0x519(%rip),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
jmp    1c29 <main+0x9e9>
mov    -0x34c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34c(%rbp)
jmp    1943 <main+0x703>
lea    -0x30(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   10b0 <gettimeofday@plt>
mov    -0x20(%rbp),%rax
cmp    -0x30(%rbp),%rax
jle    1c72 <main+0xa32>
mov    -0x30(%rbp),%rax
add    $0xf4240,%rax
mov    %rax,-0x30(%rbp)
mov    -0x28(%rbp),%rax
sub    $0x1,%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    -0x28(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
sub    %eax,%ecx
mov    -0x30(%rbp),%rax
mov    %eax,%r8d
mov    -0x20(%rbp),%rax
sub    %eax,%r8d
lea    0x525(%rip),%rdi
mov    $0xc8,%edx
call   1090 <printf@plt>
lea    0x3c7(%rip),%rdi
call   1070 <system@plt>
xor    %edi,%edi
call   1140 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x348,%rsp
mov    %rsi,0x28(%rsp)
mov    0x2d8b(%rip),%r14
mov    (%r14),%esi
lea    0xd99(%rip),%rdi
call   1100 <open@plt>
test   %eax,%eax
jns    1975 <main+0x735>
mov    (%r14),%esi
lea    0xda0(%rip),%rdi
call   1100 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    1295 <main+0x55>
lea    0xda6(%rip),%rdi
call   1110 <perror@plt>
lea    0x240(%rsp),%rbp
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0x100,%edx
call   10d0 <read@plt>
cltq
movb   $0x0,0x240(%rsp,%rax,1)
mov    %rbp,%rdi
mov    $0xa,%esi
call   1080 <strchr@plt>
test   %rax,%rax
je     12cb <main+0x8b>
movb   $0x0,(%rax)
mov    %ebx,%edi
call   10c0 <close@plt>
mov    (%r14),%esi
lea    0xd24(%rip),%rdi
call   1100 <open@plt>
test   %eax,%eax
jns    197c <main+0x73c>
mov    (%r14),%esi
lea    0xd2b(%rip),%rdi
call   1100 <open@plt>
mov    %eax,%ebx
test   %eax,%eax
jns    130a <main+0xca>
lea    0xd4f(%rip),%rdi
call   1110 <perror@plt>
xor    %eax,%eax
call   10a0 <writeload@plt>
cmp    $0xffffffff,%eax
jne    1320 <main+0xe0>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    0xd4b(%rip),%rdi
call   1070 <system@plt>
lea    0xd6a(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
jns    134e <main+0x10e>
lea    0xd4b(%rip),%rdi
jmp    18e5 <main+0x6a5>
mov    %ebx,0xc(%rsp)
mov    $0x1,%ebx
lea    0x140(%rsp),%r13
lea    0xd4d(%rip),%r15
lea    0xd30(%rip),%r12
lea    0x40(%rsp),%rbp
lea    0xd46(%rip),%r14
nopl   0x0(%rax)
mov    %r13,%rdi
lea    0xd2c(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbp,%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
js     18e0 <main+0x6a0>
mov    %r13,%rdi
call   1060 <strlen@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %rax,%rcx
xor    %r8d,%r8d
call   1150 <setxattr@plt>
test   %rax,%rax
js     18e0 <main+0x6a0>
add    $0x1,%ebx
cmp    $0xc9,%ebx
jne    1380 <main+0x140>
lea    0x30(%rsp),%rdi
xor    %esi,%esi
call   10b0 <gettimeofday@plt>
mov    $0x1,%ebx
lea    0x40(%rsp),%rbp
lea    0xc95(%rip),%r13
lea    0x20(%rsp),%r15
nopl   (%rax)
mov    %rbp,%rdi
lea    0xc9c(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbp,%rdi
call   1060 <strlen@plt>
lea    0x1(%rax),%rdx
mov    0xc(%rsp),%edi
mov    %rbp,%rsi
call   1040 <write@plt>
test   %rax,%rax
js     1531 <main+0x2f1>
mov    $0x63,%edi
call   1160 <seteuid@plt>
test   %rax,%rax
js     18f4 <main+0x6b4>
mov    $0x1,%r14d
jmp    1492 <main+0x252>
nop
mov    0x2b71(%rip),%rax
mov    (%rax),%edi
lea    0xc82(%rip),%rsi
mov    %ebx,%edx
mov    %ebx,%ecx
xor    %eax,%eax
call   10e0 <fprintf@plt>
add    $0x1,%r14d
mov    %r14d,%r12d
mov    %r12d,%r14d
cmp    $0xc9,%r12d
je     1510 <main+0x2d0>
mov    %rbp,%rdi
lea    0xc17(%rip),%rsi
mov    %r13,%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   10f0 <stat@plt>
cmp    %r14d,%ebx
jne    14bd <main+0x27d>
test   %eax,%eax
js     1460 <main+0x220>
lea    0x1(%r14),%r12d
cmp    %r12d,%ebx
jne    14e0 <main+0x2a0>
test   %eax,%eax
jns    1482 <main+0x242>
mov    0x2b07(%rip),%rax
mov    (%rax),%edi
lea    0xc18(%rip),%rsi
jmp    14f9 <main+0x2b9>
nopl   0x0(%rax)
cmp    %r14d,%ebx
je     1482 <main+0x242>
test   %eax,%eax
js     1482 <main+0x242>
mov    0x2ae8(%rip),%rax
mov    (%rax),%edi
lea    0xc17(%rip),%rsi
mov    %ebx,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   10e0 <fprintf@plt>
jmp    1482 <main+0x242>
nopw   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1160 <seteuid@plt>
test   %rax,%rax
js     18fd <main+0x6bd>
add    $0x1,%ebx
cmp    $0xc9,%ebx
jne    1410 <main+0x1d0>
jmp    1542 <main+0x302>
lea    0xb98(%rip),%rdi
call   1110 <perror@plt>
jmp    1444 <main+0x204>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   10b0 <gettimeofday@plt>
mov    0x30(%rsp),%rax
mov    0x10(%rsp),%r8
cmp    %r8,%rax
mov    0xc(%rsp),%ebp
jle    157d <main+0x33d>
add    $0xf4240,%r8
mov    %r8,0x10(%rsp)
mov    0x18(%rsp),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,0x18(%rsp)
jmp    1582 <main+0x342>
mov    0x18(%rsp),%rcx
mov    0x28(%rsp),%rdx
mov    (%rdx),%rsi
sub    0x38(%rsp),%ecx
sub    %eax,%r8d
lea    0xba1(%rip),%rdi
mov    $0xc8,%edx
call   1090 <printf@plt>
xor    %edi,%edi
call   1160 <seteuid@plt>
lea    0x240(%rsp),%rbx
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    0x1(%rax),%rdx
mov    %ebp,%edi
mov    %rbx,%rsi
call   1040 <write@plt>
xor    %eax,%eax
call   1120 <writeload2@plt>
cmp    $0xffffffff,%eax
je     1316 <main+0xd6>
lea    0xa94(%rip),%rdi
call   1070 <system@plt>
lea    0xab3(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
js     1342 <main+0x102>
mov    $0x1,%ebx
lea    0x140(%rsp),%r13
lea    0xaa2(%rip),%r15
lea    0xa85(%rip),%r12
lea    0x40(%rsp),%rbp
lea    0xa9b(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
lea    0xb30(%rip),%rsi
mov    %ebx,%edx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
mov    %r12,%rdx
mov    %ebx,%ecx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbp,%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
test   %rax,%rax
js     18e0 <main+0x6a0>
mov    %r13,%rdi
call   1060 <strlen@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %rax,%rcx
xor    %r8d,%r8d
call   1150 <setxattr@plt>
test   %rax,%rax
js     18e0 <main+0x6a0>
add    $0x1,%ebx
cmp    $0xc9,%ebx
jne    1630 <main+0x3f0>
lea    0x30(%rsp),%rdi
xor    %esi,%esi
call   10b0 <gettimeofday@plt>
mov    $0x1,%r12d
lea    0x40(%rsp),%rbx
lea    0x9fa(%rip),%r15
nopl   0x0(%rax)
mov    %rbx,%rdi
lea    0xaa0(%rip),%rsi
mov    %r12d,%edx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
mov    0xc(%rsp),%edi
mov    %rbx,%rsi
mov    %rax,%rdx
call   1040 <write@plt>
test   %rax,%rax
js     18cf <main+0x68f>
mov    $0x63,%edi
call   1160 <seteuid@plt>
test   %rax,%rax
js     18f4 <main+0x6b4>
mov    $0x1,%r14d
jmp    1755 <main+0x515>
nop
mov    %ebp,%eax
movb   $0x0,0x140(%rsp,%rax,1)
mov    0x28b7(%rip),%rax
mov    (%rax),%edi
lea    0xa72(%rip),%rsi
mov    %r12d,%edx
mov    %r12d,%ecx
lea    0x140(%rsp),%r8
xor    %eax,%eax
call   10e0 <fprintf@plt>
add    $0x1,%r14d
mov    %r14d,%ebp
mov    %ebp,%r14d
cmp    $0xc9,%ebp
je     18b0 <main+0x670>
mov    %rbx,%rdi
mov    %r15,%rsi
lea    0x93b(%rip),%rdx
mov    %r14d,%ecx
xor    %eax,%eax
call   1130 <sprintf@plt>
mov    %rbx,%rdi
lea    0x20(%rsp),%rsi
call   10f0 <stat@plt>
mov    %eax,%r13d
cmp    %r14d,%r12d
jne    17d0 <main+0x590>
test   %r13d,%r13d
jns    17d0 <main+0x590>
xor    %edi,%edi
call   1160 <seteuid@plt>
mov    %rbx,%rdi
lea    0x928(%rip),%rsi
lea    0x140(%rsp),%rdx
mov    $0x100,%ecx
call   1050 <lgetxattr@plt>
mov    %eax,%ebp
mov    $0x63,%edi
call   1160 <seteuid@plt>
test   %ebp,%ebp
jns    1710 <main+0x4d0>
movb   $0x0,0x140(%rsp)
jmp    171a <main+0x4da>
nopw   0x0(%rax,%rax,1)
lea    0x1(%r14),%ebp
cmp    %ebp,%r12d
jne    1820 <main+0x5e0>
xor    %edi,%edi
call   1160 <seteuid@plt>
mov    %rbx,%rdi
lea    0x8d5(%rip),%rsi
lea    0x140(%rsp),%rdx
mov    $0x100,%ecx
call   1050 <lgetxattr@plt>
mov    %eax,%r15d
mov    $0x63,%edi
call   1160 <seteuid@plt>
test   %r15d,%r15d
js     1854 <main+0x614>
mov    %r15d,%eax
movb   $0x0,0x140(%rsp,%rax,1)
jmp    185c <main+0x61c>
nopl   0x0(%rax,%rax,1)
cmp    %r14d,%r12d
je     1746 <main+0x506>
test   %r13d,%r13d
js     1746 <main+0x506>
mov    0x279f(%rip),%rax
mov    (%rax),%edi
lea    0x8ce(%rip),%rsi
mov    %r12d,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   10e0 <fprintf@plt>
jmp    1746 <main+0x506>
movb   $0x0,0x140(%rsp)
test   %r13d,%r13d
lea    0x84d(%rip),%r15
js     1872 <main+0x632>
lea    0x40(%rsp),%rbx
jmp    1746 <main+0x506>
mov    0x275f(%rip),%rax
mov    (%rax),%edi
lea    0x91a(%rip),%rsi
mov    %r12d,%edx
mov    %r14d,%ecx
lea    0x140(%rsp),%r8
xor    %eax,%eax
call   10e0 <fprintf@plt>
lea    0x40(%rsp),%rbx
jmp    1746 <main+0x506>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1160 <seteuid@plt>
test   %rax,%rax
js     18fd <main+0x6bd>
add    $0x1,%r12d
cmp    $0xc9,%r12d
jne    16c0 <main+0x480>
jmp    1906 <main+0x6c6>
lea    0x7fa(%rip),%rdi
call   1110 <perror@plt>
jmp    16f4 <main+0x4b4>
lea    0x40(%rsp),%rdi
call   1110 <perror@plt>
mov    $0x1,%edi
call   1140 <exit@plt>
lea    0x7eb(%rip),%rdi
jmp    18e5 <main+0x6a5>
lea    0x82a(%rip),%rdi
jmp    18e5 <main+0x6a5>
lea    0x10(%rsp),%rdi
xor    %esi,%esi
call   10b0 <gettimeofday@plt>
mov    0x30(%rsp),%rax
mov    0x10(%rsp),%r8
cmp    %r8,%rax
jle    193d <main+0x6fd>
add    $0xf4240,%r8
mov    %r8,0x10(%rsp)
mov    0x18(%rsp),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,0x18(%rsp)
jmp    1942 <main+0x702>
mov    0x18(%rsp),%rcx
mov    0x28(%rsp),%rdx
mov    (%rdx),%rsi
sub    0x38(%rsp),%ecx
sub    %eax,%r8d
lea    0x867(%rip),%rdi
mov    $0xc8,%edx
call   1090 <printf@plt>
lea    0x709(%rip),%rdi
call   1070 <system@plt>
xor    %edi,%edi
call   1140 <exit@plt>
mov    %eax,%ebx
jmp    1295 <main+0x55>
mov    %eax,%ebx
jmp    130a <main+0xca>

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

LLVM IR (-O2):
%struct.timeval = type { i64, i64 }
%struct.stat = type { i32 }
@.str = [30 x i8] c"/proc/self/attr/smack/current\00"
@O_RDWR = global i32 0
@.str.1 = [24 x i8] c"/proc/self/attr/current\00"
@.str.2 = [30 x i8] c"Preparing to read Smack label\00"
@.str.3 = [30 x i8] c"Preparing to set Smack labels\00"
@.str.4 = [34 x i8] c"/bin/rm -rf /tmp/smack-speed-test\00"
@.str.5 = [22 x i8] c"/tmp/smack-speed-test\00"
@.str.6 = [31 x i8] c"mkdir of /tmp/smack-speed-test\00"
@.str.7 = [9 x i8] c"speed-%d\00"
@.str.8 = [12 x i8] c"%s/speed-%d\00"
@.str.9 = [17 x i8] c"security.SMACK64\00"
@.str.10 = [22 x i8] c"Setting process Smack\00"
@.str.11 = [12 x i8] c"seteuid(99)\00"
@stderr = global i32 0
@.str.12 = [30 x i8] c"Unexpected failure for %d %d\0A\00"
@.str.13 = [30 x i8] c"Unexpected success for %d %d\0A\00"
@.str.14 = [11 x i8] c"seteuid(0)\00"
@.str.15 = [49 x i8] c"%s: short label speed factor %d %d.%06d seconds\0A\00"
@.str.16 = [50 x i8] c"com.smack-laboritories-duty-now-for-the-future-%d\00"
@.str.17 = [35 x i8] c"Unexpected failure for %d %d (%s)\0A\00"
@.str.18 = [48 x i8] c"%s: long label speed factor %d %d.%06d seconds\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.timeval
%4 = alloca %struct.timeval
%5 = alloca %struct.stat
%6 = alloca [256 x i8]
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = bitcast %struct.timeval* %3 to i8*
%10 = bitcast %struct.timeval* %4 to i8*
%11 = bitcast %struct.stat* %5 to i8*
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 0
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%14 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%15 = load i32, i32* @O_RDWR
%16 = tail call i32 @open(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %15)
%17 = icmp slt i32 %16, 0
br i1 %17, label %18, label %24
18: ; preds = %2
%19 = load i32, i32* @O_RDWR
%20 = tail call i32 @open(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %19)
%21 = icmp slt i32 %20, 0
br i1 %21, label %22, label %24
22: ; preds = %18
%23 = tail call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.2, i64 0, i64 0))
br label %24
24: ; preds = %2, %22, %18
%25 = phi i32 [ %20, %22 ], [ %20, %18 ], [ %16, %2 ]
%26 = call i32 @read(i32 %25, i8* %12, i32 256)
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds [256 x i8], [256 x i8]* %6, i64 0, i64 %27
store i8 0, i8* %28
%29 = call i8* @strchr(i8* %12, i8 signext 10)
%30 = icmp eq i8* %29, null
br i1 %30, label %32, label %31
31: ; preds = %24
store i8 0, i8* %29
br label %32
32: ; preds = %31, %24
%33 = call i32 @close(i32 %25)
%34 = load i32, i32* @O_RDWR
%35 = call i32 @open(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0), i32 %34)
%36 = icmp slt i32 %35, 0
br i1 %36, label %37, label %43
37: ; preds = %32
%38 = load i32, i32* @O_RDWR
%39 = call i32 @open(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i32 %38)
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %43
41: ; preds = %37
%42 = call i32 @perror(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %43
43: ; preds = %32, %41, %37
%44 = phi i32 [ %39, %41 ], [ %39, %37 ], [ %35, %32 ]
%45 = call i32 (...) @writeload()
%46 = icmp eq i32 %45, -1
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @exit(i32 1)
unreachable
49: ; preds = %43
%50 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%51 = call i64 @mkdir(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 511)
%52 = icmp slt i64 %51, 0
br i1 %52, label %53, label %59
53: ; preds = %49
%54 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%55 = call i32 @exit(i32 1)
unreachable
56: ; preds = %68
%57 = add nuw nsw i32 %60, 1
%58 = icmp eq i32 %57, 201
br i1 %58, label %75, label %59
59: ; preds = %49, %56
%60 = phi i32 [ %57, %56 ], [ 1, %49 ]
%61 = call i32 (i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %60)
%62 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %60)
%63 = call i64 @mkdir(i8* %14, i32 511)
%64 = icmp slt i64 %63, 0
br i1 %64, label %65, label %68
65: ; preds = %59
%66 = call i32 @perror(i8* %14)
%67 = call i32 @exit(i32 1)
unreachable
68: ; preds = %59
%69 = call i64 @strlen(i8* %13)
%70 = call i64 @setxattr(i8* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* %13, i64 %69, i32 0)
%71 = icmp slt i64 %70, 0
br i1 %71, label %72, label %56
72: ; preds = %68
%73 = call i32 @perror(i8* %14)
%74 = call i32 @exit(i32 1)
unreachable
75: ; preds = %56
%76 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
br label %80
77: ; preds = %123
%78 = add nuw nsw i32 %81, 1
%79 = icmp eq i32 %78, 201
br i1 %79, label %129, label %80
80: ; preds = %75, %77
%81 = phi i32 [ 1, %75 ], [ %78, %77 ]
%82 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0), i32 %81)
%83 = call i64 @strlen(i8* %14)
%84 = add nsw i64 %83, 1
%85 = call i64 @write(i32 %44, i8* %14, i64 %84)
%86 = icmp slt i64 %85, 0
br i1 %86, label %87, label %89
87: ; preds = %80
%88 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %89
89: ; preds = %87, %80
%90 = call i64 @seteuid(i32 99)
%91 = icmp slt i64 %90, 0
br i1 %91, label %92, label %95
92: ; preds = %89
%93 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%94 = call i32 @exit(i32 1)
unreachable
95: ; preds = %89, %120
%96 = phi i32 [ %121, %120 ], [ 1, %89 ]
%97 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %96)
%98 = call i32 @stat(i8* %14, %struct.stat* %5)
%99 = icmp eq i32 %81, %96
%100 = icmp slt i32 %98, 0
%101 = and i1 %99, %100
br i1 %101, label %102, label %106
102: ; preds = %95
%103 = load i32, i32* @stderr
%104 = call i32 (i32, i8*, i32, i32, ...) @fprintf(i32 %103, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %81, i32 %81)
%105 = add nuw nsw i32 %96, 1
br label %120
106: ; preds = %95
%107 = add nuw nsw i32 %96, 1
%108 = icmp eq i32 %81, %107
br i1 %108, label %109, label %113
109: ; preds = %106
br i1 %100, label %110, label %120
110: ; preds = %109
%111 = load i32, i32* @stderr
%112 = call i32 (i32, i8*, i32, i32, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.12, i64 0, i64 0), i32 %81, i32 %96)
br label %120
113: ; preds = %106
%114 = icmp ne i32 %81, %96
%115 = icmp sgt i32 %98, -1
%116 = and i1 %114, %115
br i1 %116, label %117, label %120
117: ; preds = %113
%118 = load i32, i32* @stderr
%119 = call i32 (i32, i8*, i32, i32, ...) @fprintf(i32 %118, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), i32 %81, i32 %96)
br label %120
120: ; preds = %102, %113, %117, %109, %110
%121 = phi i32 [ %105, %102 ], [ %107, %113 ], [ %107, %117 ], [ %107, %109 ], [ %107, %110 ]
%122 = icmp eq i32 %121, 201
br i1 %122, label %123, label %95
123: ; preds = %120
%124 = call i64 @seteuid(i32 0)
%125 = icmp slt i64 %124, 0
br i1 %125, label %126, label %77
126: ; preds = %123
%127 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
%128 = call i32 @exit(i32 1)
unreachable
129: ; preds = %77
%130 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%131 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 0
%132 = load i64, i64* %131
%133 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 0
%134 = load i64, i64* %133
%135 = icmp sgt i64 %132, %134
br i1 %135, label %139, label %136
136: ; preds = %129
%137 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%138 = load i64, i64* %137
br label %144
139: ; preds = %129
%140 = add nsw i64 %134, 1000000
store i64 %140, i64* %133
%141 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%142 = load i64, i64* %141
%143 = add nsw i64 %142, -1
store i64 %143, i64* %141
br label %144
144: ; preds = %136, %139
%145 = phi i64 [ %134, %136 ], [ %140, %139 ]
%146 = phi i64 [ %138, %136 ], [ %143, %139 ]
%147 = load i8*, i8** %1
%148 = getelementptr inbounds %struct.timeval, %struct.timeval* %4, i64 0, i32 1
%149 = trunc i64 %146 to i32
%150 = getelementptr inbounds %struct.timeval, %struct.timeval* %3, i64 0, i32 1
%151 = load i64, i64* %150
%152 = trunc i64 %151 to i32
%153 = sub nsw i32 %149, %152
%154 = trunc i64 %145 to i32
%155 = trunc i64 %132 to i32
%156 = sub nsw i32 %154, %155
%157 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.15, i64 0, i64 0), i8* %147, i32 200, i32 %153, i32 %156)
%158 = call i64 @seteuid(i32 0)
%159 = call i64 @strlen(i8* %12)
%160 = add nsw i64 %159, 1
%161 = call i64 @write(i32 %44, i8* %12, i64 %160)
%162 = call i32 (...) @writeload2()
%163 = icmp eq i32 %162, -1
br i1 %163, label %164, label %166
164: ; preds = %144
%165 = call i32 @exit(i32 1)
unreachable
166: ; preds = %144
%167 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%168 = call i64 @mkdir(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 511)
%169 = icmp slt i64 %168, 0
br i1 %169, label %170, label %176
170: ; preds = %166
%171 = call i32 @perror(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.6, i64 0, i64 0))
%172 = call i32 @exit(i32 1)
unreachable
173: ; preds = %185
%174 = add nuw nsw i32 %177, 1
%175 = icmp eq i32 %174, 201
br i1 %175, label %192, label %176
176: ; preds = %166, %173
%177 = phi i32 [ %174, %173 ], [ 1, %166 ]
%178 = call i32 (i8*, i8*, ...) @sprintf(i8* %13, i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i32 %177)
%179 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %177)
%180 = call i64 @mkdir(i8* %14, i32 511)
%181 = icmp slt i64 %180, 0
br i1 %181, label %182, label %185
182: ; preds = %176
%183 = call i32 @perror(i8* %14)
%184 = call i32 @exit(i32 1)
unreachable
185: ; preds = %176
%186 = call i64 @strlen(i8* %13)
%187 = call i64 @setxattr(i8* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* %13, i64 %186, i32 0)
%188 = icmp slt i64 %187, 0
br i1 %188, label %189, label %173
189: ; preds = %185
%190 = call i32 @perror(i8* %14)
%191 = call i32 @exit(i32 1)
unreachable
192: ; preds = %173
%193 = call i32 @gettimeofday(%struct.timeval* %3, i32* null)
br label %197
194: ; preds = %257
%195 = add nuw nsw i32 %198, 1
%196 = icmp eq i32 %195, 201
br i1 %196, label %263, label %197
197: ; preds = %192, %194
%198 = phi i32 [ 1, %192 ], [ %195, %194 ]
%199 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.16, i64 0, i64 0), i32 %198)
%200 = call i64 @strlen(i8* %14)
%201 = call i64 @write(i32 %44, i8* %14, i64 %200)
%202 = icmp slt i64 %201, 0
br i1 %202, label %203, label %205
203: ; preds = %197
%204 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.10, i64 0, i64 0))
br label %205
205: ; preds = %203, %197
%206 = call i64 @seteuid(i32 99)
%207 = icmp slt i64 %206, 0
br i1 %207, label %208, label %211
208: ; preds = %205
%209 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.11, i64 0, i64 0))
%210 = call i32 @exit(i32 1)
unreachable
211: ; preds = %205, %254
%212 = phi i32 [ %255, %254 ], [ 1, %205 ]
%213 = call i32 (i8*, i8*, ...) @sprintf(i8* %14, i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i32 %212)
%214 = call i32 @stat(i8* %14, %struct.stat* %5)
%215 = icmp eq i32 %198, %212
%216 = icmp slt i32 %214, 0
%217 = and i1 %215, %216
br i1 %217, label %218, label %231
218: ; preds = %211
%219 = call i64 @seteuid(i32 0)
%220 = call i32 @lgetxattr(i8* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* %13, i32 256)
%221 = call i64 @seteuid(i32 99)
%222 = icmp sgt i32 %220, -1
br i1 %222, label %223, label %226
223: ; preds = %218
%224 = zext i32 %220 to i64
%225 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %224
store i8 0, i8* %225
br label %227
226: ; preds = %218
store i8 0, i8* %13
br label %227
227: ; preds = %226, %223
%228 = load i32, i32* @stderr
%229 = call i32 (i32, i8*, i32, i32, ...) @fprintf(i32 %228, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i32 %198, i32 %198, i8* %13)
%230 = add nuw nsw i32 %212, 1
br label %254
231: ; preds = %211
%232 = add nuw nsw i32 %212, 1
%233 = icmp eq i32 %198, %232
br i1 %233, label %234, label %247
234: ; preds = %231
%235 = call i64 @seteuid(i32 0)
%236 = call i32 @lgetxattr(i8* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.9, i64 0, i64 0), i8* %13, i32 256)
%237 = call i64 @seteuid(i32 99)
%238 = icmp sgt i32 %236, -1
br i1 %238, label %239, label %242
239: ; preds = %234
%240 = zext i32 %236 to i64
%241 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %240
store i8 0, i8* %241
br label %243
242: ; preds = %234
store i8 0, i8* %13
br label %243
243: ; preds = %242, %239
br i1 %216, label %244, label %254
244: ; preds = %243
%245 = load i32, i32* @stderr
%246 = call i32 (i32, i8*, i32, i32, ...) @fprintf(i32 %245, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.17, i64 0, i64 0), i32 %198, i32 %212, i8* %13)
br label %254
247: ; preds = %231
%248 = icmp ne i32 %198, %212
%249 = icmp sgt i32 %214, -1
%250 = and i1 %248, %249
br i1 %250, label %251, label %254
251: ; preds = %247
%252 = load i32, i32* @stderr
%253 = call i32 (i32, i8*, i32, i32, ...) @fprintf(i32 %252, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.13, i64 0, i64 0), i32 %198, i32 %212)
br label %254
254: ; preds = %227, %247, %251, %243, %244
%255 = phi i32 [ %230, %227 ], [ %232, %247 ], [ %232, %251 ], [ %232, %243 ], [ %232, %244 ]
%256 = icmp eq i32 %255, 201
br i1 %256, label %257, label %211
257: ; preds = %254
%258 = call i64 @seteuid(i32 0)
%259 = icmp slt i64 %258, 0
br i1 %259, label %260, label %194
260: ; preds = %257
%261 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.14, i64 0, i64 0))
%262 = call i32 @exit(i32 1)
unreachable
263: ; preds = %194
%264 = call i32 @gettimeofday(%struct.timeval* %4, i32* null)
%265 = load i64, i64* %131
%266 = load i64, i64* %133
%267 = icmp sgt i64 %265, %266
br i1 %267, label %270, label %268
268: ; preds = %263
%269 = load i64, i64* %148
br label %274
270: ; preds = %263
%271 = add nsw i64 %266, 1000000
store i64 %271, i64* %133
%272 = load i64, i64* %148
%273 = add nsw i64 %272, -1
store i64 %273, i64* %148
br label %274
274: ; preds = %268, %270
%275 = phi i64 [ %266, %268 ], [ %271, %270 ]
%276 = phi i64 [ %269, %268 ], [ %273, %270 ]
%277 = load i8*, i8** %1
%278 = trunc i64 %276 to i32
%279 = load i64, i64* %150
%280 = trunc i64 %279 to i32
%281 = sub nsw i32 %278, %280
%282 = trunc i64 %275 to i32
%283 = trunc i64 %265 to i32
%284 = sub nsw i32 %282, %283
%285 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.18, i64 0, i64 0), i8* %277, i32 200, i32 %281, i32 %284)
%286 = call i32 @system(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%287 = call i32 @exit(i32 0)
unreachable
}