#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct stat {
  int dummy;
};
typedef int /*<<< orphan*/ num;
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ PATH_MAX;
int /*<<< orphan*/ errx(int, char *, int, char const *);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int format1(struct stat const *, char const *, char const *, int, char *, int,
            int, int, int, int, int, int);
int /*<<< orphan*/ fputc(char const, int /*<<< orphan*/);
scalar_t__ isdigit(unsigned int);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int /*<<< orphan*/ stdout;
void output(const struct stat *st, const char *file, const char *statfmt,
            int fn, int nonl) {
  int flags, size, prec, ofmt, hilo, what;
  char buf[PATH_MAX + 4 + 1];
  const char *subfmt;
  int nl, t, i;
  nl = 1;
  while (*statfmt != '\0') {
    if (*statfmt != '%') {
      do {
        (void)fputc((*statfmt), (stdout));
        (*&nl) = ((*statfmt) == '\n');
      } while (0);
      statfmt++;
      continue;
    }
    subfmt = statfmt;
    statfmt++;
    switch (*statfmt) {
    case 'n':
      do {
        (void)fputc(('\n'), (stdout));
        (*&nl) = (('\n') == '\n');
      } while (0);
      statfmt++;
      continue;
    case 't':
      do {
        (void)fputc(('\t'), (stdout));
        (*&nl) = (('\t') == '\n');
      } while (0);
      statfmt++;
      continue;
    case '%':
      do {
        (void)fputc(('%'), (stdout));
        (*&nl) = (('%') == '\n');
      } while (0);
      statfmt++;
      continue;
    case '@': {
      char num[12], *p;
      snprintf(num, sizeof(num), "%d", fn);
      for (p = &num[0]; *p; p++)
        do {
          (void)fputc((*p), (stdout));
          (*&nl) = ((*p) == '\n');
        } while (0);
      statfmt++;
      continue;
    }
    }
    flags = 0;
    do {
      if (*statfmt == '#')
        flags |= 0x01;
      else if (*statfmt == ' ')
        flags |= 0x02;
      else if (*statfmt == '+')
        flags |= 0x04;
      else if (*statfmt == '0')
        flags |= 0x08;
      else if (*statfmt == '-')
        flags |= 0x10;
      else
        break;
      statfmt++;
    } while (1);
    size = -1;
    if (isdigit((unsigned)*statfmt)) {
      size = 0;
      while (isdigit((unsigned)*statfmt)) {
        size = (size * 10) + (*statfmt - '0');
        statfmt++;
        if (size < 0)
          goto badfmt;
      }
    }
    prec = -1;
    if (*statfmt == '.') {
      statfmt++;
      prec = 0;
      while (isdigit((unsigned)*statfmt)) {
        prec = (prec * 10) + (*statfmt - '0');
        statfmt++;
        if (prec < 0)
          goto badfmt;
      }
    }
    switch (*statfmt) {
    case ('D'):
      (ofmt) = (0x01);
      statfmt++;
      break;
    case ('O'):
      (ofmt) = (0x02);
      statfmt++;
      break;
    case ('U'):
      (ofmt) = (0x04);
      statfmt++;
      break;
    case ('X'):
      (ofmt) = (0x08);
      statfmt++;
      break;
    case ('F'):
      (ofmt) = (0x10);
      statfmt++;
      break;
    case ('S'):
      (ofmt) = (0x20);
      statfmt++;
      break;
    default:
      ofmt = 0;
      break;
    }
    switch (*statfmt) {
    case ('H'):
      (hilo) = ('H');
      statfmt++;
      break;
    case ('M'):
      (hilo) = ('M');
      statfmt++;
      break;
    case ('L'):
      (hilo) = ('L');
      statfmt++;
      break;
    default:
      hilo = 0;
      break;
    }
    switch (*statfmt) {
    case ('R'):
      (what) = ('R');
      statfmt++;
      break;
    case ('d'):
      (what) = ('d');
      statfmt++;
      break;
    case ('i'):
      (what) = ('i');
      statfmt++;
      break;
    case ('p'):
      (what) = ('p');
      statfmt++;
      break;
    case ('l'):
      (what) = ('l');
      statfmt++;
      break;
    case ('u'):
      (what) = ('u');
      statfmt++;
      break;
    case ('g'):
      (what) = ('g');
      statfmt++;
      break;
    case ('r'):
      (what) = ('r');
      statfmt++;
      break;
    case ('a'):
      (what) = ('a');
      statfmt++;
      break;
    case ('m'):
      (what) = ('m');
      statfmt++;
      break;
    case ('c'):
      (what) = ('c');
      statfmt++;
      break;
    case ('B'):
      (what) = ('B');
      statfmt++;
      break;
    case ('z'):
      (what) = ('z');
      statfmt++;
      break;
    case ('b'):
      (what) = ('b');
      statfmt++;
      break;
    case ('k'):
      (what) = ('k');
      statfmt++;
      break;
    case ('f'):
      (what) = ('f');
      statfmt++;
      break;
    case ('v'):
      (what) = ('v');
      statfmt++;
      break;
    case ('Y'):
      (what) = ('Y');
      statfmt++;
      break;
    case ('T'):
      (what) = ('T');
      statfmt++;
      break;
    case ('N'):
      (what) = ('N');
      statfmt++;
      break;
    case ('Z'):
      (what) = ('Z');
      statfmt++;
      break;
    default:
      goto badfmt;
    }
    t = format1(st, file, subfmt, statfmt - subfmt, buf, sizeof(buf), flags,
                size, prec, ofmt, hilo, what);
    for (i = 0; i < t && i < (int)(sizeof(buf) - 1); i++)
      do {
        (void)fputc((buf[i]), (stdout));
        (*&nl) = ((buf[i]) == '\n');
      } while (0);
    continue;
  badfmt:
    errx(1, "%.*s: bad format", (int)(statfmt - subfmt + 1), subfmt);
  }
  if (!nl && !nonl)
    (void)fputc('\n', stdout);
  (void)fflush(stdout);
}


x86 assembly (clang, -O0):
<output>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0xa8,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x28(%rbp)
mov    %rdx,-0x30(%rbp)
mov    %ecx,-0x34(%rbp)
mov    %r8d,-0x38(%rbp)
mov    0x2e66(%rip),%rax
mov    (%rax),%eax
add    $0x5,%eax
mov    %rax,-0x98(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x58(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x90(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x60(%rbp)
movl   $0x1,-0x6c(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1a50 <output+0x8f0>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
je     122a <output+0xca>
jmp    11e8 <output+0x88>
mov    -0x30(%rbp),%rax
mov    (%rax),%al
mov    0x2de3(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1070 <fputc@plt>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x6c(%rbp)
jmp    1219 <output+0xb9>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11c3 <output+0x63>
mov    -0x30(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x9c(%rbp)
sub    $0x25,%eax
je     12ff <output+0x19f>
jmp    1259 <output+0xf9>
mov    -0x9c(%rbp),%eax
sub    $0x40,%eax
je     1334 <output+0x1d4>
jmp    126d <output+0x10d>
mov    -0x9c(%rbp),%eax
sub    $0x6e,%eax
je     1295 <output+0x135>
jmp    1281 <output+0x121>
mov    -0x9c(%rbp),%eax
sub    $0x74,%eax
je     12ca <output+0x16a>
jmp    13d0 <output+0x270>
jmp    129a <output+0x13a>
mov    0x2d37(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1070 <fputc@plt>
movl   $0x1,-0x6c(%rbp)
jmp    12b9 <output+0x159>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11c3 <output+0x63>
jmp    12cf <output+0x16f>
mov    0x2d02(%rip),%rax
mov    (%rax),%esi
mov    $0x9,%edi
call   1070 <fputc@plt>
movl   $0x0,-0x6c(%rbp)
jmp    12ee <output+0x18e>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11c3 <output+0x63>
jmp    1304 <output+0x1a4>
mov    0x2ccd(%rip),%rax
mov    (%rax),%esi
mov    $0x25,%edi
call   1070 <fputc@plt>
movl   $0x0,-0x6c(%rbp)
jmp    1323 <output+0x1c3>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11c3 <output+0x63>
lea    -0x80(%rbp),%rdi
mov    -0x34(%rbp),%ecx
mov    $0xc,%esi
lea    0xdf1(%rip),%rdx
call   1060 <snprintf@plt>
lea    -0x80(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x88(%rbp),%rax
cmpb   $0x0,(%rax)
je     13bf <output+0x25f>
jmp    136c <output+0x20c>
mov    -0x88(%rbp),%rax
mov    (%rax),%al
mov    0x2c5c(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1070 <fputc@plt>
mov    -0x88(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x6c(%rbp)
jmp    13a3 <output+0x243>
jmp    13a8 <output+0x248>
mov    -0x88(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x88(%rbp)
jmp    1357 <output+0x1f7>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    11c3 <output+0x63>
movl   $0x0,-0x3c(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    13f5 <output+0x295>
mov    -0x3c(%rbp),%eax
or     $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1486 <output+0x326>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x20,%eax
jne    1413 <output+0x2b3>
mov    -0x3c(%rbp),%eax
or     $0x2,%eax
mov    %eax,-0x3c(%rbp)
jmp    1481 <output+0x321>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
jne    1431 <output+0x2d1>
mov    -0x3c(%rbp),%eax
or     $0x4,%eax
mov    %eax,-0x3c(%rbp)
jmp    147c <output+0x31c>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jne    144f <output+0x2ef>
mov    -0x3c(%rbp),%eax
or     $0x8,%eax
mov    %eax,-0x3c(%rbp)
jmp    1477 <output+0x317>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    146d <output+0x30d>
mov    -0x3c(%rbp),%eax
or     $0x10,%eax
mov    %eax,-0x3c(%rbp)
jmp    1472 <output+0x312>
jmp    14a1 <output+0x341>
jmp    1477 <output+0x317>
jmp    147c <output+0x31c>
jmp    1481 <output+0x321>
jmp    1486 <output+0x326>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    13d7 <output+0x277>
jmp    14a1 <output+0x341>
movl   $0xffffffff,-0x40(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1513 <output+0x3b3>
movl   $0x0,-0x40(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     150e <output+0x3ae>
imul   $0xa,-0x40(%rbp),%eax
mov    -0x30(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x40(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x40(%rbp)
jge    1509 <output+0x3a9>
jmp    1a25 <output+0x8c5>
jmp    14c5 <output+0x365>
jmp    1513 <output+0x3b3>
movl   $0xffffffff,-0x44(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    158b <output+0x42b>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x44(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1586 <output+0x426>
imul   $0xa,-0x44(%rbp),%eax
mov    -0x30(%rbp),%rcx
movsbl (%rcx),%ecx
sub    $0x30,%ecx
add    %ecx,%eax
mov    %eax,-0x44(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
cmpl   $0x0,-0x44(%rbp)
jge    1581 <output+0x421>
jmp    1a25 <output+0x8c5>
jmp    153d <output+0x3dd>
jmp    158b <output+0x42b>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffbc,%eax
mov    %eax,%ecx
mov    %rcx,-0xa8(%rbp)
sub    $0x14,%eax
ja     164e <output+0x4ee>
mov    -0xa8(%rbp),%rax
lea    0xa4b(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1655 <output+0x4f5>
movl   $0x2,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1655 <output+0x4f5>
movl   $0x4,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1655 <output+0x4f5>
movl   $0x8,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1655 <output+0x4f5>
movl   $0x10,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1655 <output+0x4f5>
movl   $0x20,-0x48(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1655 <output+0x4f5>
movl   $0x0,-0x48(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0xac(%rbp)
sub    $0x48,%eax
je     1698 <output+0x538>
jmp    1670 <output+0x510>
mov    -0xac(%rbp),%eax
sub    $0x4c,%eax
je     16c8 <output+0x568>
jmp    1684 <output+0x524>
mov    -0xac(%rbp),%eax
sub    $0x4d,%eax
je     16b0 <output+0x550>
jmp    16e0 <output+0x580>
movl   $0x48,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    16e7 <output+0x587>
movl   $0x4d,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    16e7 <output+0x587>
movl   $0x4c,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    16e7 <output+0x587>
movl   $0x0,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
add    $0xffffffbe,%eax
mov    %eax,%ecx
mov    %rcx,-0xb8(%rbp)
sub    $0x38,%eax
ja     1912 <output+0x7b2>
mov    -0xb8(%rbp),%rax
lea    0x943(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x52,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x64,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x69,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x70,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x6c,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x75,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x67,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x72,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x61,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x6d,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x63,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x42,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x7a,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x62,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x6b,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x66,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x76,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x59,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x54,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x4e,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
movl   $0x5a,-0x50(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
jmp    1917 <output+0x7b7>
jmp    1a25 <output+0x8c5>
mov    -0x90(%rbp),%r8
mov    -0x98(%rbp),%rax
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x68(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x68(%rbp),%r9
sub    %r9,%rcx
mov    %eax,%r9d
mov    -0x3c(%rbp),%r15d
mov    -0x40(%rbp),%r14d
mov    -0x44(%rbp),%ebx
mov    -0x48(%rbp),%r11d
mov    -0x4c(%rbp),%r10d
mov    -0x50(%rbp),%eax
sub    $0x30,%rsp
mov    %r15d,(%rsp)
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
call   1040 <format1@plt>
add    $0x30,%rsp
mov    %eax,-0x70(%rbp)
movl   $0x0,-0x74(%rbp)
mov    -0x74(%rbp),%ecx
xor    %eax,%eax
cmp    -0x70(%rbp),%ecx
mov    %al,-0xb9(%rbp)
jge    19b4 <output+0x854>
mov    -0x98(%rbp),%rcx
mov    -0x74(%rbp),%eax
sub    $0x1,%rcx
cmp    %ecx,%eax
setl   %al
mov    %al,-0xb9(%rbp)
mov    -0xb9(%rbp),%al
test   $0x1,%al
jne    19c7 <output+0x867>
jmp    1a20 <output+0x8c0>
jmp    19cc <output+0x86c>
mov    -0x90(%rbp),%rax
movslq -0x74(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    0x25f7(%rip),%rcx
mov    (%rcx),%esi
movsbl %al,%edi
call   1070 <fputc@plt>
mov    -0x90(%rbp),%rax
movslq -0x74(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x6c(%rbp)
jmp    1a0d <output+0x8ad>
jmp    1a12 <output+0x8b2>
mov    -0x74(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x74(%rbp)
jmp    1987 <output+0x827>
jmp    11c3 <output+0x63>
mov    -0x30(%rbp),%rax
mov    -0x68(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edx
mov    -0x68(%rbp),%rcx
mov    $0x1,%edi
lea    0x6f5(%rip),%rsi
call   1050 <errx@plt>
jmp    11c3 <output+0x63>
cmpl   $0x0,-0x6c(%rbp)
jne    1a77 <output+0x917>
cmpl   $0x0,-0x38(%rbp)
jne    1a77 <output+0x917>
mov    0x256d(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1070 <fputc@plt>
mov    0x255a(%rip),%rax
mov    (%rax),%edi
call   1080 <fflush@plt>
mov    -0x58(%rbp),%rax
mov    %rax,%rsp
lea    -0x18(%rbp),%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<output>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x58,%rsp
mov    %r8d,-0x40(%rbp)
mov    %ecx,-0x3c(%rbp)
mov    %rdx,%r12
mov    %rsi,-0x70(%rbp)
mov    %rdi,-0x68(%rbp)
mov    0x2e66(%rip),%rax
mov    (%rax),%ecx
lea    0x5(%rcx),%eax
mov    %rsp,%rdx
mov    %rax,-0x60(%rbp)
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdx
mov    %rdx,-0x38(%rbp)
mov    %rdx,%rsp
add    $0x4,%ecx
mov    %rcx,-0x50(%rbp)
movslq %ecx,%rax
mov    %rax,-0x58(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    0x2e14(%rip),%r13
lea    0xe35(%rip),%r15
jmp    11f4 <output+0x94>
nopl   (%rax)
mov    %r12d,%edx
mov    -0x48(%rbp),%rcx
sub    %ecx,%edx
add    $0x1,%edx
mov    $0x1,%edi
lea    0xeb3(%rip),%rsi
call   1050 <errx@plt>
mov    0x2de4(%rip),%r13
mov    (%r12),%al
cmp    $0x25,%al
jne    13ec <output+0x28c>
mov    0x1(%r12),%al
movsbl %al,%ecx
cmp    $0x6d,%ecx
jg     1270 <output+0x110>
cmp    $0x25,%ecx
je     150a <output+0x3aa>
cmp    $0x40,%ecx
jne    1282 <output+0x122>
lea    -0x7c(%rbp),%rdi
mov    $0xc,%esi
lea    0xe6d(%rip),%rdx
mov    -0x3c(%rbp),%ecx
call   1060 <snprintf@plt>
mov    -0x7c(%rbp),%al
test   %al,%al
je     1263 <output+0x103>
lea    -0x7b(%rbp),%rbx
xchg   %ax,%ax
mov    0x0(%r13),%esi
movsbl %al,%edi
call   1070 <fputc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1240 <output+0xe0>
xor    %eax,%eax
cmpb   $0xa,-0x2(%rbx)
sete   %al
mov    %eax,-0x2c(%rbp)
add    $0x2,%r12
jmp    11f4 <output+0x94>
nopl   0x0(%rax)
cmp    $0x6e,%ecx
je     1515 <output+0x3b5>
cmp    $0x74,%ecx
je     1533 <output+0x3d3>
mov    %r12,-0x48(%rbp)
add    $0x1,%r12
xor    %ebx,%ebx
jmp    12ac <output+0x14c>
mov    $0x10,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
or     %ecx,%ebx
movzbl 0x1(%r12),%eax
add    $0x1,%r12
lea    -0x20(%rax),%edx
cmp    $0x10,%dl
ja     12e0 <output+0x180>
mov    $0x1,%ecx
movzbl %dl,%edx
movslq (%r15,%rdx,4),%rdx
add    %r15,%rdx
jmp    *%rdx
mov    $0x2,%ecx
jmp    12a0 <output+0x140>
mov    $0x4,%ecx
jmp    12a0 <output+0x140>
mov    $0x8,%ecx
jmp    12a0 <output+0x140>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <isdigit@plt>
mov    $0xffffffff,%r14d
test   %rax,%rax
je     1330 <output+0x1d0>
xor    %r13d,%r13d
cs nopw 0x0(%rax,%rax,1)
movsbl (%r12),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1336 <output+0x1d6>
lea    0x0(%r13,%r13,4),%eax
movsbl (%r12),%ecx
lea    (%rcx,%rax,2),%r13d
add    $0x1,%r12
add    $0xffffffd0,%r13d
jns    1300 <output+0x1a0>
jmp    11d0 <output+0x70>
nopl   0x0(%rax)
mov    $0xffffffff,%r13d
mov    (%r12),%al
cmp    $0x2e,%al
jne    137f <output+0x21f>
add    $0x1,%r12
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nop
movsbl (%r12),%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     137b <output+0x21b>
lea    (%r14,%r14,4),%eax
movsbl (%r12),%ecx
lea    (%rcx,%rax,2),%r14d
add    $0x1,%r12
add    $0xffffffd0,%r14d
jns    1350 <output+0x1f0>
jmp    11d0 <output+0x70>
mov    (%r12),%al
movsbl %al,%eax
xor    %r10d,%r10d
add    $0xffffffbc,%eax
cmp    $0x14,%eax
ja     1416 <output+0x2b6>
lea    0xcac(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
xor    %r11d,%r11d
jmp    *%rax
add    $0x1,%r12
mov    $0x1,%r11d
jmp    1420 <output+0x2c0>
add    $0x1,%r12
mov    $0x10,%r11d
jmp    1420 <output+0x2c0>
add    $0x1,%r12
mov    $0x2,%r11d
jmp    1420 <output+0x2c0>
add    $0x1,%r12
mov    $0x20,%r11d
jmp    1420 <output+0x2c0>
add    $0x1,%r12
mov    $0x4,%r11d
jmp    1420 <output+0x2c0>
add    $0x1,%r12
mov    $0x8,%r11d
jmp    1420 <output+0x2c0>
test   %al,%al
je     1551 <output+0x3f1>
mov    0x0(%r13),%esi
movsbl %al,%edi
call   1070 <fputc@plt>
xor    %eax,%eax
cmpb   $0xa,(%r12)
sete   %al
mov    %eax,-0x2c(%rbp)
add    $0x1,%r12
jmp    11f4 <output+0x94>
xor    %r11d,%r11d
nopl   0x0(%rax)
movsbl (%r12),%eax
cmp    $0x4d,%eax
je     1440 <output+0x2e0>
cmp    $0x4c,%eax
je     144c <output+0x2ec>
cmp    $0x48,%eax
jne    1456 <output+0x2f6>
add    $0x1,%r12
mov    $0x48,%r10d
jmp    1456 <output+0x2f6>
add    $0x1,%r12
mov    $0x4d,%r10d
jmp    1456 <output+0x2f6>
add    $0x1,%r12
mov    $0x4c,%r10d
movsbl (%r12),%eax
lea    -0x42(%rax),%ecx
cmp    $0x38,%ecx
ja     11d0 <output+0x70>
movabs $0x1194eb781851001,%rdx
4e 19 01
bt     %rcx,%rdx
jae    11d0 <output+0x70>
add    $0x1,%r12
mov    %r12d,%ecx
mov    -0x48(%rbp),%rdx
sub    %edx,%ecx
mov    -0x68(%rbp),%rdi
mov    -0x70(%rbp),%rsi
mov    -0x38(%rbp),%r8
mov    -0x60(%rbp),%r9
push   %rax
push   %r10
push   %r11
push   %r14
push   %r13
push   %rbx
call   1040 <format1@plt>
add    $0x30,%rsp
test   %eax,%eax
mov    0x2b24(%rip),%r13
jle    11f4 <output+0x94>
cmpl   $0x0,-0x50(%rbp)
jle    11f4 <output+0x94>
mov    %eax,%r14d
mov    $0x1,%ebx
nopl   0x0(%rax)
mov    -0x38(%rbp),%rax
movsbl -0x1(%rax,%rbx,1),%edi
mov    0x0(%r13),%esi
call   1070 <fputc@plt>
lea    0x1(%rbx),%rax
cmp    %r14,%rbx
jae    14f4 <output+0x394>
cmp    -0x58(%rbp),%rbx
mov    %rax,%rbx
jl     14d0 <output+0x370>
xor    %edx,%edx
mov    -0x38(%rbp),%rcx
cmpb   $0xa,-0x2(%rcx,%rax,1)
sete   %dl
mov    %edx,-0x2c(%rbp)
jmp    11f4 <output+0x94>
mov    0x0(%r13),%esi
mov    $0x25,%edi
jmp    153c <output+0x3dc>
mov    0x0(%r13),%esi
mov    $0xa,%edi
call   1070 <fputc@plt>
add    $0x2,%r12
movl   $0x1,-0x2c(%rbp)
jmp    11f4 <output+0x94>
mov    0x0(%r13),%esi
mov    $0x9,%edi
call   1070 <fputc@plt>
add    $0x2,%r12
movl   $0x0,-0x2c(%rbp)
jmp    11f4 <output+0x94>
mov    -0x2c(%rbp),%eax
or     -0x40(%rbp),%eax
jne    1567 <output+0x407>
mov    0x0(%r13),%esi
mov    $0xa,%edi
call   1070 <fputc@plt>
mov    0x0(%r13),%edi
call   1080 <fflush@plt>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@PATH_MAX = global i32 0
@stdout = global i32 0
@.str = [3 x i8] c"%d\00"
@.str.1 = [17 x i8] c"%.*s: bad format\00"
define void @output(%struct.stat* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = alloca [12 x i8]
%7 = load i32, i32* @PATH_MAX
%8 = add nsw i32 %7, 5
%9 = zext i32 %8 to i64
%10 = alloca i8, i64 %9
%11 = getelementptr inbounds [12 x i8], [12 x i8]* %6, i64 0, i64 0
%12 = add i32 %7, 4
%13 = icmp sgt i32 %12, 0
%14 = sext i32 %12 to i64
br label %21
15: ; preds = %175
%16 = and i64 %176, 4294967295
%17 = getelementptr inbounds i8, i8* %10, i64 %16
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 10
%20 = zext i1 %19 to i32
br label %44
21: ; preds = %44, %5
%22 = phi i32 [ 1, %5 ], [ %45, %44 ]
%23 = phi i8* [ %2, %5 ], [ %46, %44 ]
br label %24
24: ; preds = %21, %163
%25 = phi i8* [ %165, %163 ], [ %23, %21 ]
br label %26
26: ; preds = %24, %185
%27 = phi i8* [ %186, %185 ], [ %25, %24 ]
%28 = load i8, i8* %27
switch i8 %28, label %29 [
i8 0, label %193
i8 37, label %36
]
29: ; preds = %26
%30 = load i32, i32* @stdout
%31 = call i32 @fputc(i8 signext %28, i32 %30)
%32 = load i8, i8* %27
%33 = icmp eq i8 %32, 10
%34 = zext i1 %33 to i32
%35 = getelementptr inbounds i8, i8* %27, i64 1
br label %44
36: ; preds = %26
%37 = getelementptr inbounds i8, i8* %27, i64 1
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
switch i32 %39, label %74 [
i32 110, label %40
i32 116, label %47
i32 37, label %51
i32 64, label %55
]
40: ; preds = %36
%41 = load i32, i32* @stdout
%42 = call i32 @fputc(i8 signext 10, i32 %41)
%43 = getelementptr inbounds i8, i8* %27, i64 2
br label %44
44: ; preds = %40, %47, %51, %71, %29, %15
%45 = phi i32 [ %20, %15 ], [ %34, %29 ], [ %72, %71 ], [ 0, %51 ], [ 0, %47 ], [ 1, %40 ]
%46 = phi i8* [ %165, %15 ], [ %35, %29 ], [ %73, %71 ], [ %54, %51 ], [ %50, %47 ], [ %43, %40 ]
br label %21
47: ; preds = %36
%48 = load i32, i32* @stdout
%49 = call i32 @fputc(i8 signext 9, i32 %48)
%50 = getelementptr inbounds i8, i8* %27, i64 2
br label %44
51: ; preds = %36
%52 = load i32, i32* @stdout
%53 = call i32 @fputc(i8 signext 37, i32 %52)
%54 = getelementptr inbounds i8, i8* %27, i64 2
br label %44
55: ; preds = %36
%56 = call i32 @snprintf(i8* %11, i32 12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%57 = load i8, i8* %11
%58 = icmp eq i8 %57, 0
br i1 %58, label %71, label %59
59: ; preds = %55, %59
%60 = phi i8 [ %65, %59 ], [ %57, %55 ]
%61 = phi i8* [ %64, %59 ], [ %11, %55 ]
%62 = load i32, i32* @stdout
%63 = call i32 @fputc(i8 signext %60, i32 %62)
%64 = getelementptr inbounds i8, i8* %61, i64 1
%65 = load i8, i8* %64
%66 = icmp eq i8 %65, 0
br i1 %66, label %67, label %59
67: ; preds = %59
%68 = load i8, i8* %61
%69 = icmp eq i8 %68, 10
%70 = zext i1 %69 to i32
br label %71
71: ; preds = %67, %55
%72 = phi i32 [ %70, %67 ], [ %22, %55 ]
%73 = getelementptr inbounds i8, i8* %27, i64 2
br label %44
74: ; preds = %36, %82
%75 = phi i8 [ %86, %82 ], [ %38, %36 ]
%76 = phi i32 [ %84, %82 ], [ 0, %36 ]
%77 = phi i8* [ %85, %82 ], [ %37, %36 ]
switch i8 %75, label %87 [
i8 35, label %82
i8 32, label %78
i8 43, label %79
i8 48, label %80
i8 45, label %81
]
78: ; preds = %74
br label %82
79: ; preds = %74
br label %82
80: ; preds = %74
br label %82
81: ; preds = %74
br label %82
82: ; preds = %74, %78, %80, %81, %79
%83 = phi i32 [ 2, %78 ], [ 8, %80 ], [ 16, %81 ], [ 4, %79 ], [ 1, %74 ]
%84 = or i32 %76, %83
%85 = getelementptr inbounds i8, i8* %77, i64 1
%86 = load i8, i8* %85
br label %74
87: ; preds = %74
%88 = sext i8 %75 to i32
%89 = call i64 @isdigit(i32 %88)
%90 = icmp eq i64 %89, 0
br i1 %90, label %106, label %91
91: ; preds = %87, %98
%92 = phi i32 [ %103, %98 ], [ 0, %87 ]
%93 = phi i8* [ %104, %98 ], [ %77, %87 ]
%94 = load i8, i8* %93
%95 = sext i8 %94 to i32
%96 = call i64 @isdigit(i32 %95)
%97 = icmp eq i64 %96, 0
br i1 %97, label %106, label %98
98: ; preds = %91
%99 = mul nsw i32 %92, 10
%100 = load i8, i8* %93
%101 = sext i8 %100 to i32
%102 = add i32 %99, -48
%103 = add i32 %102, %101
%104 = getelementptr inbounds i8, i8* %93, i64 1
%105 = icmp slt i32 %103, 0
br i1 %105, label %185, label %91
106: ; preds = %91, %87
%107 = phi i32 [ -1, %87 ], [ %92, %91 ]
%108 = phi i8* [ %77, %87 ], [ %93, %91 ]
%109 = load i8, i8* %108
%110 = icmp eq i8 %109, 46
br i1 %110, label %111, label %130
111: ; preds = %106
%112 = getelementptr inbounds i8, i8* %108, i64 1
br label %113
113: ; preds = %120, %111
%114 = phi i32 [ 0, %111 ], [ %125, %120 ]
%115 = phi i8* [ %112, %111 ], [ %126, %120 ]
%116 = load i8, i8* %115
%117 = sext i8 %116 to i32
%118 = call i64 @isdigit(i32 %117)
%119 = icmp eq i64 %118, 0
br i1 %119, label %128, label %120
120: ; preds = %113
%121 = mul nsw i32 %114, 10
%122 = load i8, i8* %115
%123 = sext i8 %122 to i32
%124 = add i32 %121, -48
%125 = add i32 %124, %123
%126 = getelementptr inbounds i8, i8* %115, i64 1
%127 = icmp slt i32 %125, 0
br i1 %127, label %185, label %113
128: ; preds = %113
%129 = load i8, i8* %115
br label %130
130: ; preds = %128, %106
%131 = phi i8 [ %109, %106 ], [ %129, %128 ]
%132 = phi i32 [ -1, %106 ], [ %114, %128 ]
%133 = phi i8* [ %108, %106 ], [ %115, %128 ]
%134 = sext i8 %131 to i32
switch i32 %134, label %147 [
i32 68, label %135
i32 79, label %137
i32 85, label %139
i32 88, label %141
i32 70, label %143
i32 83, label %145
]
135: ; preds = %130
%136 = getelementptr inbounds i8, i8* %133, i64 1
br label %147
137: ; preds = %130
%138 = getelementptr inbounds i8, i8* %133, i64 1
br label %147
139: ; preds = %130
%140 = getelementptr inbounds i8, i8* %133, i64 1
br label %147
141: ; preds = %130
%142 = getelementptr inbounds i8, i8* %133, i64 1
br label %147
143: ; preds = %130
%144 = getelementptr inbounds i8, i8* %133, i64 1
br label %147
145: ; preds = %130
%146 = getelementptr inbounds i8, i8* %133, i64 1
br label %147
147: ; preds = %130, %145, %143, %141, %139, %137, %135
%148 = phi i32 [ 32, %145 ], [ 16, %143 ], [ 8, %141 ], [ 4, %139 ], [ 2, %137 ], [ 1, %135 ], [ 0, %130 ]
%149 = phi i8* [ %146, %145 ], [ %144, %143 ], [ %142, %141 ], [ %140, %139 ], [ %138, %137 ], [ %136, %135 ], [ %133, %130 ]
%150 = load i8, i8* %149
%151 = sext i8 %150 to i32
switch i32 %151, label %158 [
i32 72, label %152
i32 77, label %154
i32 76, label %156
]
152: ; preds = %147
%153 = getelementptr inbounds i8, i8* %149, i64 1
br label %158
154: ; preds = %147
%155 = getelementptr inbounds i8, i8* %149, i64 1
br label %158
156: ; preds = %147
%157 = getelementptr inbounds i8, i8* %149, i64 1
br label %158
158: ; preds = %147, %156, %154, %152
%159 = phi i32 [ 76, %156 ], [ 77, %154 ], [ 72, %152 ], [ 0, %147 ]
%160 = phi i8* [ %157, %156 ], [ %155, %154 ], [ %153, %152 ], [ %149, %147 ]
%161 = load i8, i8* %160
%162 = sext i8 %161 to i32
switch i32 %162, label %185 [
i32 82, label %163
i32 100, label %163
i32 105, label %163
i32 112, label %163
i32 108, label %163
i32 117, label %163
i32 103, label %163
i32 114, label %163
i32 97, label %163
i32 109, label %163
i32 99, label %163
i32 66, label %163
i32 122, label %163
i32 98, label %163
i32 107, label %163
i32 102, label %163
i32 118, label %163
i32 89, label %163
i32 84, label %163
i32 78, label %163
i32 90, label %163
]
163: ; preds = %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158, %158
%164 = sext i8 %161 to i32
%165 = getelementptr inbounds i8, i8* %160, i64 1
%166 = ptrtoint i8* %165 to i64
%167 = ptrtoint i8* %27 to i64
%168 = sub i64 %166, %167
%169 = trunc i64 %168 to i32
%170 = call i32 @format1(%struct.stat* %0, i8* %1, i8* %27, i32 %169, i8* %10, i32 %8, i32 %76, i32 %107, i32 %132, i32 %148, i32 %159, i32 %164)
%171 = icmp sgt i32 %170, 0
%172 = select i1 %171, i1 %13, i1 false
br i1 %172, label %173, label %24
173: ; preds = %163
%174 = zext i32 %170 to i64
br label %175
175: ; preds = %173, %175
%176 = phi i64 [ 0, %173 ], [ %181, %175 ]
%177 = getelementptr inbounds i8, i8* %10, i64 %176
%178 = load i8, i8* %177
%179 = load i32, i32* @stdout
%180 = call i32 @fputc(i8 signext %178, i32 %179)
%181 = add nuw nsw i64 %176, 1
%182 = icmp ult i64 %181, %174
%183 = icmp slt i64 %181, %14
%184 = select i1 %182, i1 %183, i1 false
br i1 %184, label %175, label %15
185: ; preds = %98, %120, %158
%186 = phi i8* [ %160, %158 ], [ %126, %120 ], [ %104, %98 ]
%187 = ptrtoint i8* %186 to i64
%188 = ptrtoint i8* %27 to i64
%189 = sub i64 %187, %188
%190 = trunc i64 %189 to i32
%191 = add i32 %190, 1
%192 = call i32 @errx(i32 1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 %191, i8* %27)
br label %26
193: ; preds = %26
%194 = or i32 %22, %4
%195 = icmp eq i32 %194, 0
br i1 %195, label %196, label %199
196: ; preds = %193
%197 = load i32, i32* @stdout
%198 = call i32 @fputc(i8 signext 10, i32 %197)
br label %199
199: ; preds = %196, %193
%200 = load i32, i32* @stdout
%201 = call i32 @fflush(i32 %200)
ret void
}