#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 */
typedef int /*<<< orphan*/ buf;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ stderr;
scalar_t__ strtol(char *, char **, int);
int unifold_simple(char *name) {
  FILE *f;
  char buf[1024];
  unsigned in_low, in_high;
  unsigned out_low, out_high;
  int line = 0;
  int first = 0;
  f = fopen(name, "r");
  if (!f) {
    fprintf(stderr, "couldn't open %s\n", name);
    return -1;
  }
  in_low = 0;
  out_low = 0;
  printf("\n");
  printf("struct casefold tolower_table[] = {\n");
  while (fgets(buf, sizeof(buf), f)) {
    int x, y, c;
    unsigned inval;
    char flag;
    unsigned outval[8];
    int outval_ptr;
    char *endp;
    ++line;
    for (outval_ptr = 0; outval_ptr != 8; ++outval_ptr)
      outval[outval_ptr] = 0;
    do {
      for (x = 0; buf[x] == ' ' || buf[x] == '\t'; ++x)
        ;
    } while (0);
    if (buf[x] == '\r' || buf[x] == '\n' || buf[x] == '#' || !buf[x])
      continue;
    do {
      for (y = x; buf[y] && buf[y] != '#' && buf[y] != ';' && buf[y] != ' ' &&
                  buf[y] != '\t' && buf[y] != '\n' && buf[y] != '\r';
           ++y)
        ;
      c = buf[y];
      buf[y] = 0;
    } while (0);
    inval = (unsigned int)strtol(buf + x, &endp, 16);
    if (endp != buf + y || endp == buf + x) {
      fprintf(stderr, "%s %d: invalid input character code\n", name, line);
      return -1;
    }
    do {
      buf[y] = (char)c;
      x = y;
      if (buf[x] == ';')
        ++x;
      while (buf[x] == ' ' || buf[x] == '\t')
        ++x;
    } while (0);
    do {
      for (y = x; buf[y] && buf[y] != '#' && buf[y] != ';' && buf[y] != ' ' &&
                  buf[y] != '\t' && buf[y] != '\n' && buf[y] != '\r';
           ++y)
        ;
      c = buf[y];
      buf[y] = 0;
    } while (0);
    if (!buf[x] && buf[x + 1]) {
      fprintf(stderr, "%s %d: bad flag character\n", name, line);
      return -1;
    }
    flag = buf[x];
    if (flag == 'T' || flag == 'F')
      continue;
    if (flag != 'S' && flag != 'C') {
      fprintf(stderr, "%s %d: unknown flag", name, line);
      return -1;
    }
    for (outval_ptr = 0;; ++outval_ptr) {
      do {
        buf[y] = (char)c;
        x = y;
        if (buf[x] == ';')
          ++x;
        while (buf[x] == ' ' || buf[x] == '\t')
          ++x;
      } while (0);
      do {
        for (y = x; buf[y] && buf[y] != '#' && buf[y] != ';' && buf[y] != ' ' &&
                    buf[y] != '\t' && buf[y] != '\n' && buf[y] != '\r';
             ++y)
          ;
        c = buf[y];
        buf[y] = 0;
      } while (0);
      if (!buf[x])
        break;
      outval[outval_ptr] = (unsigned int)strtol(buf + x, &endp, 16);
      if (endp != buf + y || endp == buf + x) {
        fprintf(stderr, "%s %d: invalid output character code\n", name, line);
        return -1;
      }
    }
    if (!outval_ptr || outval_ptr > 1) {
      fprintf(stderr, "%s %d: invalid output string\n", name, line);
      return -1;
    }
    if (outval_ptr == 1) {
      if (in_low == 0) {
        in_low = in_high = inval;
        out_low = out_high = outval[0];
      } else if (in_high + 1 == inval && out_high + 1 == outval[0]) {
        in_high = inval;
        out_high = outval[0];
      } else {
        do {
          if (first) {
            printf(",\n");
          } else {
            first = 1;
          }
        } while (0);
        printf("	{ 0x%x, 0x%x, 0x%x, 0x0, 0x0 }", in_low, in_high,
               out_low);
        in_low = in_high = inval;
        out_low = out_high = outval[0];
      }
    } else {
      if (in_low != 0) {
        do {
          if (first) {
            printf(",\n");
          } else {
            first = 1;
          }
        } while (0);
        printf("	{ 0x%x, 0x%x, 0x%x, 0x0, 0x0 }", in_low, in_high,
               out_low);
        in_low = 0;
      }
      do {
        if (first) {
          printf(",\n");
        } else {
          first = 1;
        }
      } while (0);
      printf("	{ 0x%x, 0x%x, 0x%x, 0x%x, 0x%x }", inval, inval, outval[0],
             outval[1], outval[2]);
    }
  }
  if (in_low != 0) {
    do {
      if (first) {
        printf(",\n");
      } else {
        first = 1;
      }
    } while (0);
    printf("	{ 0x%x, 0x%x, 0x%x, 0x0, 0x0 }", in_low, in_high, out_low);
  }
  do {
    if (first) {
      printf(",\n");
    } else {
      first = 1;
    }
  } while (0);
  printf("	{ 0x0, 0x0, 0x0, 0x0, 0x0 }");
  printf("\n};\n");
  fclose(f);
  return 0;
}


x86 assembly (clang, -O0):
<unifold_simple>:
push   %rbp
mov    %rsp,%rbp
sub    $0x490,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x434(%rbp)
movl   $0x0,-0x438(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe72(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    11c9 <unifold_simple+0x69>
mov    0x2e37(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe4c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1da8 <unifold_simple+0xc48>
movl   $0x0,-0x424(%rbp)
movl   $0x0,-0x42c(%rbp)
lea    0xeee(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x420(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x400,%esi
call   1050 <fgets@plt>
cmp    $0x0,%rax
je     1ce7 <unifold_simple+0xb87>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
movl   $0x0,-0x474(%rbp)
cmpl   $0x8,-0x474(%rbp)
je     1264 <unifold_simple+0x104>
movslq -0x474(%rbp),%rax
movl   $0x0,-0x470(%rbp,%rax,4)
mov    -0x474(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x474(%rbp)
jmp    1231 <unifold_simple+0xd1>
jmp    1269 <unifold_simple+0x109>
movl   $0x0,-0x43c(%rbp)
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x481(%rbp)
je     12ae <unifold_simple+0x14e>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
sete   %al
mov    %al,-0x481(%rbp)
mov    -0x481(%rbp),%al
test   $0x1,%al
jne    12c1 <unifold_simple+0x161>
jmp    12da <unifold_simple+0x17a>
jmp    12c6 <unifold_simple+0x166>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    1273 <unifold_simple+0x113>
jmp    12df <unifold_simple+0x17f>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0xd,%eax
je     133c <unifold_simple+0x1dc>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
je     133c <unifold_simple+0x1dc>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x23,%eax
je     133c <unifold_simple+0x1dc>
movslq -0x43c(%rbp),%rax
cmpb   $0x0,-0x420(%rbp,%rax,1)
jne    1341 <unifold_simple+0x1e1>
jmp    11f9 <unifold_simple+0x99>
jmp    1346 <unifold_simple+0x1e6>
mov    -0x43c(%rbp),%eax
mov    %eax,-0x440(%rbp)
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x482(%rbp)
je     142d <unifold_simple+0x2cd>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x23,%ecx
mov    %al,-0x482(%rbp)
je     142d <unifold_simple+0x2cd>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x3b,%ecx
mov    %al,-0x482(%rbp)
je     142d <unifold_simple+0x2cd>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x482(%rbp)
je     142d <unifold_simple+0x2cd>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x482(%rbp)
je     142d <unifold_simple+0x2cd>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x482(%rbp)
je     142d <unifold_simple+0x2cd>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0xd,%eax
setne  %al
mov    %al,-0x482(%rbp)
mov    -0x482(%rbp),%al
test   $0x1,%al
jne    1440 <unifold_simple+0x2e0>
jmp    1459 <unifold_simple+0x2f9>
jmp    1445 <unifold_simple+0x2e5>
mov    -0x440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x440(%rbp)
jmp    1352 <unifold_simple+0x1f2>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
mov    %eax,-0x444(%rbp)
movslq -0x440(%rbp),%rax
movb   $0x0,-0x420(%rbp,%rax,1)
lea    -0x420(%rbp),%rdi
movslq -0x43c(%rbp),%rax
add    %rax,%rdi
lea    -0x480(%rbp),%rsi
mov    $0x10,%edx
call   1070 <strtol@plt>
mov    %eax,-0x448(%rbp)
mov    -0x480(%rbp),%rax
lea    -0x420(%rbp),%rcx
movslq -0x440(%rbp),%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    14e7 <unifold_simple+0x387>
mov    -0x480(%rbp),%rax
lea    -0x420(%rbp),%rcx
movslq -0x43c(%rbp),%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    1514 <unifold_simple+0x3b4>
mov    0x2af2(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x434(%rbp),%ecx
lea    0xb38(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1da8 <unifold_simple+0xc48>
jmp    1519 <unifold_simple+0x3b9>
mov    -0x444(%rbp),%eax
mov    %al,%cl
movslq -0x440(%rbp),%rax
mov    %cl,-0x420(%rbp,%rax,1)
mov    -0x440(%rbp),%eax
mov    %eax,-0x43c(%rbp)
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x3b,%eax
jne    1562 <unifold_simple+0x402>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    1567 <unifold_simple+0x407>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x483(%rbp)
je     15a2 <unifold_simple+0x442>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
sete   %al
mov    %al,-0x483(%rbp)
mov    -0x483(%rbp),%al
test   $0x1,%al
jne    15b5 <unifold_simple+0x455>
jmp    15c9 <unifold_simple+0x469>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    1567 <unifold_simple+0x407>
jmp    15ce <unifold_simple+0x46e>
jmp    15d3 <unifold_simple+0x473>
mov    -0x43c(%rbp),%eax
mov    %eax,-0x440(%rbp)
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x484(%rbp)
je     16ba <unifold_simple+0x55a>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x23,%ecx
mov    %al,-0x484(%rbp)
je     16ba <unifold_simple+0x55a>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x3b,%ecx
mov    %al,-0x484(%rbp)
je     16ba <unifold_simple+0x55a>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x484(%rbp)
je     16ba <unifold_simple+0x55a>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x484(%rbp)
je     16ba <unifold_simple+0x55a>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x484(%rbp)
je     16ba <unifold_simple+0x55a>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0xd,%eax
setne  %al
mov    %al,-0x484(%rbp)
mov    -0x484(%rbp),%al
test   $0x1,%al
jne    16cd <unifold_simple+0x56d>
jmp    16e6 <unifold_simple+0x586>
jmp    16d2 <unifold_simple+0x572>
mov    -0x440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x440(%rbp)
jmp    15df <unifold_simple+0x47f>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
mov    %eax,-0x444(%rbp)
movslq -0x440(%rbp),%rax
movb   $0x0,-0x420(%rbp,%rax,1)
movslq -0x43c(%rbp),%rax
cmpb   $0x0,-0x420(%rbp,%rax,1)
jne    1768 <unifold_simple+0x608>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
cltq
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x0,%eax
je     1768 <unifold_simple+0x608>
mov    0x289e(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x434(%rbp),%ecx
lea    0x909(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1da8 <unifold_simple+0xc48>
movslq -0x43c(%rbp),%rax
mov    -0x420(%rbp,%rax,1),%al
mov    %al,-0x449(%rbp)
movsbl -0x449(%rbp),%eax
cmp    $0x54,%eax
je     179c <unifold_simple+0x63c>
movsbl -0x449(%rbp),%eax
cmp    $0x46,%eax
jne    17a1 <unifold_simple+0x641>
jmp    11f9 <unifold_simple+0x99>
movsbl -0x449(%rbp),%eax
cmp    $0x53,%eax
je     17ee <unifold_simple+0x68e>
movsbl -0x449(%rbp),%eax
cmp    $0x43,%eax
je     17ee <unifold_simple+0x68e>
mov    0x2818(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x434(%rbp),%ecx
lea    0x89e(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1da8 <unifold_simple+0xc48>
movl   $0x0,-0x474(%rbp)
jmp    17fd <unifold_simple+0x69d>
mov    -0x444(%rbp),%eax
mov    %al,%cl
movslq -0x440(%rbp),%rax
mov    %cl,-0x420(%rbp,%rax,1)
mov    -0x440(%rbp),%eax
mov    %eax,-0x43c(%rbp)
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x3b,%eax
jne    1846 <unifold_simple+0x6e6>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    184b <unifold_simple+0x6eb>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x485(%rbp)
je     1886 <unifold_simple+0x726>
movslq -0x43c(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0x9,%eax
sete   %al
mov    %al,-0x485(%rbp)
mov    -0x485(%rbp),%al
test   $0x1,%al
jne    1899 <unifold_simple+0x739>
jmp    18ad <unifold_simple+0x74d>
mov    -0x43c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x43c(%rbp)
jmp    184b <unifold_simple+0x6eb>
jmp    18b2 <unifold_simple+0x752>
jmp    18b7 <unifold_simple+0x757>
mov    -0x43c(%rbp),%eax
mov    %eax,-0x440(%rbp)
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x486(%rbp)
je     199e <unifold_simple+0x83e>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x23,%ecx
mov    %al,-0x486(%rbp)
je     199e <unifold_simple+0x83e>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x3b,%ecx
mov    %al,-0x486(%rbp)
je     199e <unifold_simple+0x83e>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x486(%rbp)
je     199e <unifold_simple+0x83e>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x9,%ecx
mov    %al,-0x486(%rbp)
je     199e <unifold_simple+0x83e>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x486(%rbp)
je     199e <unifold_simple+0x83e>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
cmp    $0xd,%eax
setne  %al
mov    %al,-0x486(%rbp)
mov    -0x486(%rbp),%al
test   $0x1,%al
jne    19b1 <unifold_simple+0x851>
jmp    19ca <unifold_simple+0x86a>
jmp    19b6 <unifold_simple+0x856>
mov    -0x440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x440(%rbp)
jmp    18c3 <unifold_simple+0x763>
movslq -0x440(%rbp),%rax
movsbl -0x420(%rbp,%rax,1),%eax
ff
mov    %eax,-0x444(%rbp)
movslq -0x440(%rbp),%rax
movb   $0x0,-0x420(%rbp,%rax,1)
movslq -0x43c(%rbp),%rax
cmpb   $0x0,-0x420(%rbp,%rax,1)
jne    1a08 <unifold_simple+0x8a8>
jmp    1ac2 <unifold_simple+0x962>
lea    -0x420(%rbp),%rdi
movslq -0x43c(%rbp),%rax
add    %rax,%rdi
lea    -0x480(%rbp),%rsi
mov    $0x10,%edx
call   1070 <strtol@plt>
mov    %eax,%ecx
movslq -0x474(%rbp),%rax
mov    %ecx,-0x470(%rbp,%rax,4)
mov    -0x480(%rbp),%rax
lea    -0x420(%rbp),%rcx
movslq -0x440(%rbp),%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    1a7c <unifold_simple+0x91c>
mov    -0x480(%rbp),%rax
lea    -0x420(%rbp),%rcx
movslq -0x43c(%rbp),%rdx
add    %rdx,%rcx
cmp    %rcx,%rax
jne    1aa9 <unifold_simple+0x949>
mov    0x255d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x434(%rbp),%ecx
lea    0x5f7(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1da8 <unifold_simple+0xc48>
jmp    1aae <unifold_simple+0x94e>
mov    -0x474(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x474(%rbp)
jmp    17f8 <unifold_simple+0x698>
cmpl   $0x0,-0x474(%rbp)
je     1adc <unifold_simple+0x97c>
cmpl   $0x1,-0x474(%rbp)
jle    1b09 <unifold_simple+0x9a9>
mov    0x24fd(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x434(%rbp),%ecx
lea    0x5bd(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1da8 <unifold_simple+0xc48>
cmpl   $0x1,-0x474(%rbp)
jne    1c15 <unifold_simple+0xab5>
cmpl   $0x0,-0x424(%rbp)
jne    1b4c <unifold_simple+0x9ec>
mov    -0x448(%rbp),%eax
mov    %eax,-0x428(%rbp)
mov    %eax,-0x424(%rbp)
mov    -0x470(%rbp),%eax
mov    %eax,-0x430(%rbp)
mov    %eax,-0x42c(%rbp)
jmp    1c10 <unifold_simple+0xab0>
mov    -0x428(%rbp),%eax
add    $0x1,%eax
cmp    -0x448(%rbp),%eax
jne    1b93 <unifold_simple+0xa33>
mov    -0x430(%rbp),%eax
add    $0x1,%eax
cmp    -0x470(%rbp),%eax
jne    1b93 <unifold_simple+0xa33>
mov    -0x448(%rbp),%eax
mov    %eax,-0x428(%rbp)
mov    -0x470(%rbp),%eax
mov    %eax,-0x430(%rbp)
jmp    1c0b <unifold_simple+0xaab>
jmp    1b98 <unifold_simple+0xa38>
cmpl   $0x0,-0x438(%rbp)
je     1bb8 <unifold_simple+0xa58>
lea    0x525(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1bc2 <unifold_simple+0xa62>
movl   $0x1,-0x438(%rbp)
jmp    1bc7 <unifold_simple+0xa67>
mov    -0x424(%rbp),%esi
mov    -0x428(%rbp),%edx
mov    -0x42c(%rbp),%ecx
lea    0x4f4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x448(%rbp),%eax
mov    %eax,-0x428(%rbp)
mov    %eax,-0x424(%rbp)
mov    -0x470(%rbp),%eax
mov    %eax,-0x430(%rbp)
mov    %eax,-0x42c(%rbp)
jmp    1c10 <unifold_simple+0xab0>
jmp    1ce2 <unifold_simple+0xb82>
cmpl   $0x0,-0x424(%rbp)
je     1c80 <unifold_simple+0xb20>
jmp    1c27 <unifold_simple+0xac7>
cmpl   $0x0,-0x438(%rbp)
je     1c47 <unifold_simple+0xae7>
lea    0x496(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1c51 <unifold_simple+0xaf1>
movl   $0x1,-0x438(%rbp)
jmp    1c56 <unifold_simple+0xaf6>
mov    -0x424(%rbp),%esi
mov    -0x428(%rbp),%edx
mov    -0x42c(%rbp),%ecx
lea    0x465(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x424(%rbp)
jmp    1c85 <unifold_simple+0xb25>
cmpl   $0x0,-0x438(%rbp)
je     1ca5 <unifold_simple+0xb45>
lea    0x438(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1caf <unifold_simple+0xb4f>
movl   $0x1,-0x438(%rbp)
jmp    1cb4 <unifold_simple+0xb54>
mov    -0x448(%rbp),%esi
mov    -0x448(%rbp),%edx
mov    -0x470(%rbp),%ecx
mov    -0x46c(%rbp),%r8d
mov    -0x468(%rbp),%r9d
lea    0x419(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11f9 <unifold_simple+0x99>
cmpl   $0x0,-0x424(%rbp)
je     1d48 <unifold_simple+0xbe8>
jmp    1cf9 <unifold_simple+0xb99>
cmpl   $0x0,-0x438(%rbp)
je     1d19 <unifold_simple+0xbb9>
lea    0x3c4(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1d23 <unifold_simple+0xbc3>
movl   $0x1,-0x438(%rbp)
jmp    1d28 <unifold_simple+0xbc8>
mov    -0x424(%rbp),%esi
mov    -0x428(%rbp),%edx
mov    -0x42c(%rbp),%ecx
lea    0x393(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1d4d <unifold_simple+0xbed>
cmpl   $0x0,-0x438(%rbp)
je     1d6d <unifold_simple+0xc0d>
lea    0x370(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1d77 <unifold_simple+0xc17>
movl   $0x1,-0x438(%rbp)
jmp    1d7c <unifold_simple+0xc1c>
lea    0x393(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0x3a2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x490,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<unifold_simple>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x468,%rsp
mov    %rdi,%rbx
lea    0xe65(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1551 <unifold_simple+0x3d1>
mov    %rax,%r15
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xf2c(%rip),%rdi
call   1040 <puts@plt>
lea    0x60(%rsp),%rdi
mov    $0x400,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     15e7 <unifold_simple+0x467>
mov    %rbx,0x10(%rsp)
movabs $0x100000000,%r12
lea    0x60(%rsp),%r14
movabs $0x100000200,%rbp
movabs $0x800002401,%r13
movl   $0x0,0x4(%rsp)
movl   $0x0,0xc(%rsp)
xor    %ebx,%ebx
movl   $0x0,0x8(%rsp)
mov    %rax,0x20(%rsp)
mov    %r15,0x28(%rsp)
jmp    124f <unifold_simple+0xcf>
nopl   0x0(%rax,%rax,1)
bt     %rcx,%r13
jae    1290 <unifold_simple+0x110>
mov    %r14,%rdi
mov    $0x400,%esi
mov    %r15,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     159d <unifold_simple+0x41d>
xorps  %xmm0,%xmm0
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x50(%rsp)
add    $0x1,%ebx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movzbl 0x60(%rsp,%rax,1),%ecx
cmp    $0x23,%rcx
ja     1290 <unifold_simple+0x110>
bt     %rcx,%rbp
jae    1230 <unifold_simple+0xb0>
add    $0x1,%rax
jmp    1270 <unifold_simple+0xf0>
nopw   0x0(%rax,%rax,1)
mov    %ebx,(%rsp)
mov    %eax,%ebp
lea    (%rsp,%rbp,1),%r14
add    $0x60,%r14
jmp    12a4 <unifold_simple+0x124>
nop
add    $0x1,%rbp
movzbl 0x60(%rsp,%rbp,1),%ebx
cmp    $0x3b,%rbx
ja     12a0 <unifold_simple+0x120>
movabs $0x800000900002601,%rax
bt     %rbx,%rax
jae    12a0 <unifold_simple+0x120>
mov    %ebp,%eax
lea    (%rsp,%rax,1),%r13
add    $0x60,%r13
movb   $0x0,0x60(%rsp,%rax,1)
mov    %r14,%rdi
lea    0x38(%rsp),%rsi
mov    $0x10,%edx
call   1090 <strtol@plt>
mov    %rax,0x30(%rsp)
mov    0x38(%rsp),%rax
cmp    %r13,%rax
jne    161f <unifold_simple+0x49f>
cmp    %r14,%rax
je     161f <unifold_simple+0x49f>
mov    %bl,0x0(%r13)
xor    %eax,%eax
cmp    $0x3b,%bl
sete   %al
add    %ebp,%eax
movabs $0x800000900002601,%rsi
jmp    1324 <unifold_simple+0x1a4>
cs nopw 0x0(%rax,%rax,1)
add    $0x1,%rax
movzbl 0x60(%rsp,%rax,1),%ecx
cmp    $0x9,%cl
je     1320 <unifold_simple+0x1a0>
cmp    $0x20,%cl
je     1320 <unifold_simple+0x1a0>
mov    %eax,%ecx
mov    %rcx,%rbx
jmp    1344 <unifold_simple+0x1c4>
nopw   0x0(%rax,%rax,1)
add    $0x1,%rbx
movzbl 0x60(%rsp,%rbx,1),%r13d
cmp    $0x3b,%r13
ja     1340 <unifold_simple+0x1c0>
bt     %r13,%rsi
jae    1340 <unifold_simple+0x1c0>
mov    %ebx,%edx
movb   $0x0,0x60(%rsp,%rdx,1)
mov    0x60(%rsp,%rcx,1),%cl
cmp    $0x46,%cl
je     1449 <unifold_simple+0x2c9>
cmp    $0x54,%cl
je     1449 <unifold_simple+0x2c9>
test   %cl,%cl
je     1633 <unifold_simple+0x4b3>
and    $0xef,%cl
cmp    $0x43,%cl
jne    1649 <unifold_simple+0x4c9>
xor    %ebp,%ebp
nopl   0x0(%rax)
movslq %ebx,%rax
mov    %r13b,0x60(%rsp,%rax,1)
xor    %eax,%eax
cmp    $0x3b,%r13b
sete   %al
add    %rbx,%rax
mov    %rax,%rbx
shl    $0x20,%rbx
cltq
lea    (%rsp,%rax,1),%r14
add    $0x60,%r14
jmp    13c7 <unifold_simple+0x247>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r14
add    %r12,%rbx
movzbl (%r14),%eax
cmp    $0x9,%al
je     13c0 <unifold_simple+0x240>
cmp    $0x20,%al
je     13c0 <unifold_simple+0x240>
sar    $0x20,%rbx
jmp    13e4 <unifold_simple+0x264>
nopl   0x0(%rax)
add    $0x1,%rbx
movzbl 0x60(%rsp,%rbx,1),%r13d
cmp    $0x3b,%r13
ja     13e0 <unifold_simple+0x260>
bt     %r13,%rsi
jae    13e0 <unifold_simple+0x260>
movb   $0x0,0x60(%rsp,%rbx,1)
cmpb   $0x0,(%r14)
je     146f <unifold_simple+0x2ef>
lea    (%rsp,%rbx,1),%r15
add    $0x60,%r15
mov    %r14,%rdi
lea    0x38(%rsp),%rsi
mov    $0x10,%edx
call   1090 <strtol@plt>
mov    %eax,0x40(%rsp,%rbp,4)
mov    0x38(%rsp),%rax
cmp    %rax,%r15
jne    1575 <unifold_simple+0x3f5>
cmp    %rax,%r14
je     1575 <unifold_simple+0x3f5>
add    $0x1,%rbp
movabs $0x800000900002601,%rsi
jmp    1390 <unifold_simple+0x210>
mov    0x28(%rsp),%r15
mov    (%rsp),%ebx
lea    0x60(%rsp),%r14
movabs $0x100000200,%rbp
movabs $0x800002401,%r13
jmp    1236 <unifold_simple+0xb6>
cmp    $0x1,%ebp
mov    (%rsp),%ebx
jne    1655 <unifold_simple+0x4d5>
cmpl   $0x0,0x4(%rsp)
je     14e3 <unifold_simple+0x363>
mov    0x20(%rsp),%rax
add    $0x1,%eax
cmp    0x30(%rsp),%eax
mov    0x28(%rsp),%r15
lea    0x60(%rsp),%r14
movabs $0x100000200,%rbp
movabs $0x800002401,%r13
jne    14ce <unifold_simple+0x34e>
mov    0x1c(%rsp),%eax
add    $0x1,%eax
mov    %eax,0x1c(%rsp)
cmp    0x40(%rsp),%eax
jne    14ce <unifold_simple+0x34e>
mov    0x30(%rsp),%rax
mov    %rax,0x20(%rsp)
jmp    1236 <unifold_simple+0xb6>
cmpl   $0x0,0xc(%rsp)
je     150b <unifold_simple+0x38b>
lea    0xc35(%rip),%rdi
call   1040 <puts@plt>
jmp    1513 <unifold_simple+0x393>
mov    0x40(%rsp),%eax
mov    0x30(%rsp),%rdx
mov    %edx,%ecx
mov    %rcx,0x20(%rsp)
mov    %eax,0x8(%rsp)
mov    %eax,0x1c(%rsp)
mov    %edx,%eax
mov    %edx,0x4(%rsp)
mov    0x28(%rsp),%r15
jmp    1451 <unifold_simple+0x2d1>
movl   $0x1,0xc(%rsp)
mov    0x8(%rsp),%ecx
lea    0xb8e(%rip),%rdi
mov    0x4(%rsp),%esi
mov    0x20(%rsp),%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x40(%rsp),%eax
mov    0x30(%rsp),%rdx
mov    %edx,%ecx
mov    %rcx,0x20(%rsp)
mov    %eax,0x8(%rsp)
mov    %eax,0x1c(%rsp)
mov    %edx,%eax
mov    %edx,0x4(%rsp)
jmp    1236 <unifold_simple+0xb6>
mov    0x2a88(%rip),%rax
mov    (%rax),%edi
lea    0xaa1(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    160b <unifold_simple+0x48b>
lea    0xaec(%rip),%rsi
mov    0x10(%rsp),%rdx
mov    (%rsp),%ebx
mov    0x2a55(%rip),%rax
mov    (%rax),%edi
mov    %ebx,%ecx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%ebx
jmp    160b <unifold_simple+0x48b>
cmpl   $0x0,0x4(%rsp)
je     15d4 <unifold_simple+0x454>
cmpl   $0x0,0xc(%rsp)
je     15b7 <unifold_simple+0x437>
lea    0xb5f(%rip),%rdi
call   1040 <puts@plt>
lea    0xaee(%rip),%rdi
mov    0x4(%rsp),%esi
mov    0x20(%rsp),%rdx
mov    0x8(%rsp),%ecx
xor    %eax,%eax
call   1060 <printf@plt>
jmp    15db <unifold_simple+0x45b>
cmpl   $0x0,0xc(%rsp)
je     15e7 <unifold_simple+0x467>
lea    0xb2f(%rip),%rdi
call   1040 <puts@plt>
lea    0xade(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xb0f(%rip),%rdi
call   1040 <puts@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    %ebx,%eax
add    $0x468,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%rsp),%rdx
mov    (%rsp),%ebx
lea    0x9e6(%rip),%rsi
jmp    1584 <unifold_simple+0x404>
add    $0x1,%eax
cmpb   $0x0,0x60(%rsp,%rax,1)
je     1649 <unifold_simple+0x4c9>
lea    0x9f5(%rip),%rsi
jmp    157c <unifold_simple+0x3fc>
lea    0xa04(%rip),%rsi
jmp    157c <unifold_simple+0x3fc>
lea    0xa32(%rip),%rsi
mov    0x10(%rsp),%rdx
jmp    1584 <unifold_simple+0x404>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [18 x i8] c"couldn't open %s\0A\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [37 x i8] c"struct casefold tolower_table[] = {\0A\00"
@.str.4 = [37 x i8] c"%s %d: invalid input character code\0A\00"
@.str.5 = [27 x i8] c"%s %d: bad flag character\0A\00"
@.str.6 = [20 x i8] c"%s %d: unknown flag\00"
@.str.7 = [38 x i8] c"%s %d: invalid output character code\0A\00"
@.str.8 = [30 x i8] c"%s %d: invalid output string\0A\00"
@.str.9 = [3 x i8] c",\0A\00"
@.str.10 = [32 x i8] c"\09{ 0x%x, 0x%x, 0x%x, 0x0, 0x0 }\00"
@.str.11 = [34 x i8] c"\09{ 0x%x, 0x%x, 0x%x, 0x%x, 0x%x }\00"
@.str.12 = [29 x i8] c"\09{ 0x0, 0x0, 0x0, 0x0, 0x0 }\00"
@.str.13 = [5 x i8] c"\0A};\0A\00"
define i32 @unifold_simple(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [1024 x i8]
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8
%17 = alloca [8 x i32]
%18 = alloca i32
%19 = alloca i8*
store i8* %0, i8** %3
store i32 0, i32* %10
store i32 0, i32* %11
%20 = load i8*, i8** %3
%21 = call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %21, i32** %4
%22 = load i32*, i32** %4
%23 = icmp ne i32* %22, null
br i1 %23, label %28, label %24
24: ; preds = %1
%25 = load i32, i32* @stderr
%26 = load i8*, i8** %3
%27 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %26)
store i32 -1, i32* %2
br label %605
28: ; preds = %1
store i32 0, i32* %6
store i32 0, i32* %8
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.3, i64 0, i64 0))
br label %31
31: ; preds = %575, %328, %99, %28
%32 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%33 = load i32*, i32** %4
%34 = call i64 @fgets(i8* %32, i32 1024, i32* %33)
%35 = icmp ne i64 %34, 0
br i1 %35, label %36, label %576
36: ; preds = %31
%37 = load i32, i32* %10
%38 = add nsw i32 %37, 1
store i32 %38, i32* %10
store i32 0, i32* %18
br label %39
39: ; preds = %46, %36
%40 = load i32, i32* %18
%41 = icmp ne i32 %40, 8
br i1 %41, label %42, label %49
42: ; preds = %39
%43 = load i32, i32* %18
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 %44
store i32 0, i32* %45
br label %46
46: ; preds = %42
%47 = load i32, i32* %18
%48 = add nsw i32 %47, 1
store i32 %48, i32* %18
br label %39
49: ; preds = %39
br label %50
50: ; preds = %49
store i32 0, i32* %12
br label %51
51: ; preds = %68, %50
%52 = load i32, i32* %12
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %53
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 32
br i1 %57, label %65, label %58
58: ; preds = %51
%59 = load i32, i32* %12
%60 = sext i32 %59 to i64
%61 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %60
%62 = load i8, i8* %61
%63 = sext i8 %62 to i32
%64 = icmp eq i32 %63, 9
br label %65
65: ; preds = %58, %51
%66 = phi i1 [ true, %51 ], [ %64, %58 ]
br i1 %66, label %67, label %71
67: ; preds = %65
br label %68
68: ; preds = %67
%69 = load i32, i32* %12
%70 = add nsw i32 %69, 1
store i32 %70, i32* %12
br label %51
71: ; preds = %65
br label %72
72: ; preds = %71
%73 = load i32, i32* %12
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %74
%76 = load i8, i8* %75
%77 = sext i8 %76 to i32
%78 = icmp eq i32 %77, 13
br i1 %78, label %99, label %79
79: ; preds = %72
%80 = load i32, i32* %12
%81 = sext i32 %80 to i64
%82 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
%85 = icmp eq i32 %84, 10
br i1 %85, label %99, label %86
86: ; preds = %79
%87 = load i32, i32* %12
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %88
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp eq i32 %91, 35
br i1 %92, label %99, label %93
93: ; preds = %86
%94 = load i32, i32* %12
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %95
%97 = load i8, i8* %96
%98 = icmp ne i8 %97, 0
br i1 %98, label %100, label %99
99: ; preds = %93, %86, %79, %72
br label %31
100: ; preds = %93
br label %101
101: ; preds = %100
%102 = load i32, i32* %12
store i32 %102, i32* %13
br label %103
103: ; preds = %155, %101
%104 = load i32, i32* %13
%105 = sext i32 %104 to i64
%106 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %105
%107 = load i8, i8* %106
%108 = sext i8 %107 to i32
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %152
110: ; preds = %103
%111 = load i32, i32* %13
%112 = sext i32 %111 to i64
%113 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %112
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp ne i32 %115, 35
br i1 %116, label %117, label %152
117: ; preds = %110
%118 = load i32, i32* %13
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %119
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = icmp ne i32 %122, 59
br i1 %123, label %124, label %152
124: ; preds = %117
%125 = load i32, i32* %13
%126 = sext i32 %125 to i64
%127 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %126
%128 = load i8, i8* %127
%129 = sext i8 %128 to i32
%130 = icmp ne i32 %129, 32
br i1 %130, label %131, label %152
131: ; preds = %124
%132 = load i32, i32* %13
%133 = sext i32 %132 to i64
%134 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %133
%135 = load i8, i8* %134
%136 = sext i8 %135 to i32
%137 = icmp ne i32 %136, 9
br i1 %137, label %138, label %152
138: ; preds = %131
%139 = load i32, i32* %13
%140 = sext i32 %139 to i64
%141 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %140
%142 = load i8, i8* %141
%143 = sext i8 %142 to i32
%144 = icmp ne i32 %143, 10
br i1 %144, label %145, label %152
145: ; preds = %138
%146 = load i32, i32* %13
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %147
%149 = load i8, i8* %148
%150 = sext i8 %149 to i32
%151 = icmp ne i32 %150, 13
br label %152
152: ; preds = %145, %138, %131, %124, %117, %110, %103
%153 = phi i1 [ false, %138 ], [ false, %131 ], [ false, %124 ], [ false, %117 ], [ false, %110 ], [ false, %103 ], [ %151, %145 ]
br i1 %153, label %154, label %158
154: ; preds = %152
br label %155
155: ; preds = %154
%156 = load i32, i32* %13
%157 = add nsw i32 %156, 1
store i32 %157, i32* %13
br label %103
158: ; preds = %152
%159 = load i32, i32* %13
%160 = sext i32 %159 to i64
%161 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %160
%162 = load i8, i8* %161
%163 = sext i8 %162 to i32
store i32 %163, i32* %14
%164 = load i32, i32* %13
%165 = sext i32 %164 to i64
%166 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %165
store i8 0, i8* %166
br label %167
167: ; preds = %158
%168 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%169 = load i32, i32* %12
%170 = sext i32 %169 to i64
%171 = getelementptr inbounds i8, i8* %168, i64 %170
%172 = call i64 @strtol(i8* %171, i8** %19, i32 16)
%173 = trunc i64 %172 to i32
store i32 %173, i32* %15
%174 = load i8*, i8** %19
%175 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%176 = load i32, i32* %13
%177 = sext i32 %176 to i64
%178 = getelementptr inbounds i8, i8* %175, i64 %177
%179 = icmp ne i8* %174, %178
br i1 %179, label %187, label %180
180: ; preds = %167
%181 = load i8*, i8** %19
%182 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%183 = load i32, i32* %12
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8, i8* %182, i64 %184
%186 = icmp eq i8* %181, %185
br i1 %186, label %187, label %192
187: ; preds = %180, %167
%188 = load i32, i32* @stderr
%189 = load i8*, i8** %3
%190 = load i32, i32* %10
%191 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %188, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), i8* %189, i32 %190)
store i32 -1, i32* %2
br label %605
192: ; preds = %180
br label %193
193: ; preds = %192
%194 = load i32, i32* %14
%195 = trunc i32 %194 to i8
%196 = load i32, i32* %13
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %197
store i8 %195, i8* %198
%199 = load i32, i32* %13
store i32 %199, i32* %12
%200 = load i32, i32* %12
%201 = sext i32 %200 to i64
%202 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %201
%203 = load i8, i8* %202
%204 = sext i8 %203 to i32
%205 = icmp eq i32 %204, 59
br i1 %205, label %206, label %209
206: ; preds = %193
%207 = load i32, i32* %12
%208 = add nsw i32 %207, 1
store i32 %208, i32* %12
br label %209
209: ; preds = %206, %193
br label %210
210: ; preds = %226, %209
%211 = load i32, i32* %12
%212 = sext i32 %211 to i64
%213 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %212
%214 = load i8, i8* %213
%215 = sext i8 %214 to i32
%216 = icmp eq i32 %215, 32
br i1 %216, label %224, label %217
217: ; preds = %210
%218 = load i32, i32* %12
%219 = sext i32 %218 to i64
%220 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %219
%221 = load i8, i8* %220
%222 = sext i8 %221 to i32
%223 = icmp eq i32 %222, 9
br label %224
224: ; preds = %217, %210
%225 = phi i1 [ true, %210 ], [ %223, %217 ]
br i1 %225, label %226, label %229
226: ; preds = %224
%227 = load i32, i32* %12
%228 = add nsw i32 %227, 1
store i32 %228, i32* %12
br label %210
229: ; preds = %224
br label %230
230: ; preds = %229
br label %231
231: ; preds = %230
%232 = load i32, i32* %12
store i32 %232, i32* %13
br label %233
233: ; preds = %285, %231
%234 = load i32, i32* %13
%235 = sext i32 %234 to i64
%236 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %235
%237 = load i8, i8* %236
%238 = sext i8 %237 to i32
%239 = icmp ne i32 %238, 0
br i1 %239, label %240, label %282
240: ; preds = %233
%241 = load i32, i32* %13
%242 = sext i32 %241 to i64
%243 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %242
%244 = load i8, i8* %243
%245 = sext i8 %244 to i32
%246 = icmp ne i32 %245, 35
br i1 %246, label %247, label %282
247: ; preds = %240
%248 = load i32, i32* %13
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %249
%251 = load i8, i8* %250
%252 = sext i8 %251 to i32
%253 = icmp ne i32 %252, 59
br i1 %253, label %254, label %282
254: ; preds = %247
%255 = load i32, i32* %13
%256 = sext i32 %255 to i64
%257 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %256
%258 = load i8, i8* %257
%259 = sext i8 %258 to i32
%260 = icmp ne i32 %259, 32
br i1 %260, label %261, label %282
261: ; preds = %254
%262 = load i32, i32* %13
%263 = sext i32 %262 to i64
%264 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %263
%265 = load i8, i8* %264
%266 = sext i8 %265 to i32
%267 = icmp ne i32 %266, 9
br i1 %267, label %268, label %282
268: ; preds = %261
%269 = load i32, i32* %13
%270 = sext i32 %269 to i64
%271 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %270
%272 = load i8, i8* %271
%273 = sext i8 %272 to i32
%274 = icmp ne i32 %273, 10
br i1 %274, label %275, label %282
275: ; preds = %268
%276 = load i32, i32* %13
%277 = sext i32 %276 to i64
%278 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %277
%279 = load i8, i8* %278
%280 = sext i8 %279 to i32
%281 = icmp ne i32 %280, 13
br label %282
282: ; preds = %275, %268, %261, %254, %247, %240, %233
%283 = phi i1 [ false, %268 ], [ false, %261 ], [ false, %254 ], [ false, %247 ], [ false, %240 ], [ false, %233 ], [ %281, %275 ]
br i1 %283, label %284, label %288
284: ; preds = %282
br label %285
285: ; preds = %284
%286 = load i32, i32* %13
%287 = add nsw i32 %286, 1
store i32 %287, i32* %13
br label %233
288: ; preds = %282
%289 = load i32, i32* %13
%290 = sext i32 %289 to i64
%291 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %290
%292 = load i8, i8* %291
%293 = sext i8 %292 to i32
store i32 %293, i32* %14
%294 = load i32, i32* %13
%295 = sext i32 %294 to i64
%296 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %295
store i8 0, i8* %296
br label %297
297: ; preds = %288
%298 = load i32, i32* %12
%299 = sext i32 %298 to i64
%300 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %299
%301 = load i8, i8* %300
%302 = icmp ne i8 %301, 0
br i1 %302, label %316, label %303
303: ; preds = %297
%304 = load i32, i32* %12
%305 = add nsw i32 %304, 1
%306 = sext i32 %305 to i64
%307 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %306
%308 = load i8, i8* %307
%309 = sext i8 %308 to i32
%310 = icmp ne i32 %309, 0
br i1 %310, label %311, label %316
311: ; preds = %303
%312 = load i32, i32* @stderr
%313 = load i8*, i8** %3
%314 = load i32, i32* %10
%315 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %312, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i8* %313, i32 %314)
store i32 -1, i32* %2
br label %605
316: ; preds = %303, %297
%317 = load i32, i32* %12
%318 = sext i32 %317 to i64
%319 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %318
%320 = load i8, i8* %319
store i8 %320, i8* %16
%321 = load i8, i8* %16
%322 = sext i8 %321 to i32
%323 = icmp eq i32 %322, 84
br i1 %323, label %328, label %324
324: ; preds = %316
%325 = load i8, i8* %16
%326 = sext i8 %325 to i32
%327 = icmp eq i32 %326, 70
br i1 %327, label %328, label %329
328: ; preds = %324, %316
br label %31
329: ; preds = %324
%330 = load i8, i8* %16
%331 = sext i8 %330 to i32
%332 = icmp ne i32 %331, 83
br i1 %332, label %333, label %342
333: ; preds = %329
%334 = load i8, i8* %16
%335 = sext i8 %334 to i32
%336 = icmp ne i32 %335, 67
br i1 %336, label %337, label %342
337: ; preds = %333
%338 = load i32, i32* @stderr
%339 = load i8*, i8** %3
%340 = load i32, i32* %10
%341 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %338, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), i8* %339, i32 %340)
store i32 -1, i32* %2
br label %605
342: ; preds = %333, %329
store i32 0, i32* %18
br label %343
343: ; preds = %484, %342
br label %344
344: ; preds = %343
%345 = load i32, i32* %14
%346 = trunc i32 %345 to i8
%347 = load i32, i32* %13
%348 = sext i32 %347 to i64
%349 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %348
store i8 %346, i8* %349
%350 = load i32, i32* %13
store i32 %350, i32* %12
%351 = load i32, i32* %12
%352 = sext i32 %351 to i64
%353 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %352
%354 = load i8, i8* %353
%355 = sext i8 %354 to i32
%356 = icmp eq i32 %355, 59
br i1 %356, label %357, label %360
357: ; preds = %344
%358 = load i32, i32* %12
%359 = add nsw i32 %358, 1
store i32 %359, i32* %12
br label %360
360: ; preds = %357, %344
br label %361
361: ; preds = %377, %360
%362 = load i32, i32* %12
%363 = sext i32 %362 to i64
%364 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %363
%365 = load i8, i8* %364
%366 = sext i8 %365 to i32
%367 = icmp eq i32 %366, 32
br i1 %367, label %375, label %368
368: ; preds = %361
%369 = load i32, i32* %12
%370 = sext i32 %369 to i64
%371 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %370
%372 = load i8, i8* %371
%373 = sext i8 %372 to i32
%374 = icmp eq i32 %373, 9
br label %375
375: ; preds = %368, %361
%376 = phi i1 [ true, %361 ], [ %374, %368 ]
br i1 %376, label %377, label %380
377: ; preds = %375
%378 = load i32, i32* %12
%379 = add nsw i32 %378, 1
store i32 %379, i32* %12
br label %361
380: ; preds = %375
br label %381
381: ; preds = %380
br label %382
382: ; preds = %381
%383 = load i32, i32* %12
store i32 %383, i32* %13
br label %384
384: ; preds = %436, %382
%385 = load i32, i32* %13
%386 = sext i32 %385 to i64
%387 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %386
%388 = load i8, i8* %387
%389 = sext i8 %388 to i32
%390 = icmp ne i32 %389, 0
br i1 %390, label %391, label %433
391: ; preds = %384
%392 = load i32, i32* %13
%393 = sext i32 %392 to i64
%394 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %393
%395 = load i8, i8* %394
%396 = sext i8 %395 to i32
%397 = icmp ne i32 %396, 35
br i1 %397, label %398, label %433
398: ; preds = %391
%399 = load i32, i32* %13
%400 = sext i32 %399 to i64
%401 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %400
%402 = load i8, i8* %401
%403 = sext i8 %402 to i32
%404 = icmp ne i32 %403, 59
br i1 %404, label %405, label %433
405: ; preds = %398
%406 = load i32, i32* %13
%407 = sext i32 %406 to i64
%408 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %407
%409 = load i8, i8* %408
%410 = sext i8 %409 to i32
%411 = icmp ne i32 %410, 32
br i1 %411, label %412, label %433
412: ; preds = %405
%413 = load i32, i32* %13
%414 = sext i32 %413 to i64
%415 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %414
%416 = load i8, i8* %415
%417 = sext i8 %416 to i32
%418 = icmp ne i32 %417, 9
br i1 %418, label %419, label %433
419: ; preds = %412
%420 = load i32, i32* %13
%421 = sext i32 %420 to i64
%422 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %421
%423 = load i8, i8* %422
%424 = sext i8 %423 to i32
%425 = icmp ne i32 %424, 10
br i1 %425, label %426, label %433
426: ; preds = %419
%427 = load i32, i32* %13
%428 = sext i32 %427 to i64
%429 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %428
%430 = load i8, i8* %429
%431 = sext i8 %430 to i32
%432 = icmp ne i32 %431, 13
br label %433
433: ; preds = %426, %419, %412, %405, %398, %391, %384
%434 = phi i1 [ false, %419 ], [ false, %412 ], [ false, %405 ], [ false, %398 ], [ false, %391 ], [ false, %384 ], [ %432, %426 ]
br i1 %434, label %435, label %439
435: ; preds = %433
br label %436
436: ; preds = %435
%437 = load i32, i32* %13
%438 = add nsw i32 %437, 1
store i32 %438, i32* %13
br label %384
439: ; preds = %433
%440 = load i32, i32* %13
%441 = sext i32 %440 to i64
%442 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %441
%443 = load i8, i8* %442
%444 = sext i8 %443 to i32
store i32 %444, i32* %14
%445 = load i32, i32* %13
%446 = sext i32 %445 to i64
%447 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %446
store i8 0, i8* %447
br label %448
448: ; preds = %439
%449 = load i32, i32* %12
%450 = sext i32 %449 to i64
%451 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 %450
%452 = load i8, i8* %451
%453 = icmp ne i8 %452, 0
br i1 %453, label %455, label %454
454: ; preds = %448
br label %487
455: ; preds = %448
%456 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%457 = load i32, i32* %12
%458 = sext i32 %457 to i64
%459 = getelementptr inbounds i8, i8* %456, i64 %458
%460 = call i64 @strtol(i8* %459, i8** %19, i32 16)
%461 = trunc i64 %460 to i32
%462 = load i32, i32* %18
%463 = sext i32 %462 to i64
%464 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 %463
store i32 %461, i32* %464
%465 = load i8*, i8** %19
%466 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%467 = load i32, i32* %13
%468 = sext i32 %467 to i64
%469 = getelementptr inbounds i8, i8* %466, i64 %468
%470 = icmp ne i8* %465, %469
br i1 %470, label %478, label %471
471: ; preds = %455
%472 = load i8*, i8** %19
%473 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%474 = load i32, i32* %12
%475 = sext i32 %474 to i64
%476 = getelementptr inbounds i8, i8* %473, i64 %475
%477 = icmp eq i8* %472, %476
br i1 %477, label %478, label %483
478: ; preds = %471, %455
%479 = load i32, i32* @stderr
%480 = load i8*, i8** %3
%481 = load i32, i32* %10
%482 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %479, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), i8* %480, i32 %481)
store i32 -1, i32* %2
br label %605
483: ; preds = %471
br label %484
484: ; preds = %483
%485 = load i32, i32* %18
%486 = add nsw i32 %485, 1
store i32 %486, i32* %18
br label %343
487: ; preds = %454
%488 = load i32, i32* %18
%489 = icmp ne i32 %488, 0
br i1 %489, label %490, label %493
490: ; preds = %487
%491 = load i32, i32* %18
%492 = icmp sgt i32 %491, 1
br i1 %492, label %493, label %498
493: ; preds = %490, %487
%494 = load i32, i32* @stderr
%495 = load i8*, i8** %3
%496 = load i32, i32* %10
%497 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %494, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), i8* %495, i32 %496)
store i32 -1, i32* %2
br label %605
498: ; preds = %490
%499 = load i32, i32* %18
%500 = icmp eq i32 %499, 1
br i1 %500, label %501, label %541
501: ; preds = %498
%502 = load i32, i32* %6
%503 = icmp eq i32 %502, 0
br i1 %503, label %504, label %508
504: ; preds = %501
%505 = load i32, i32* %15
store i32 %505, i32* %7
store i32 %505, i32* %6
%506 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 0
%507 = load i32, i32* %506
store i32 %507, i32* %9
store i32 %507, i32* %8
br label %540
508: ; preds = %501
%509 = load i32, i32* %7
%510 = add i32 %509, 1
%511 = load i32, i32* %15
%512 = icmp eq i32 %510, %511
br i1 %512, label %513, label %523
513: ; preds = %508
%514 = load i32, i32* %9
%515 = add i32 %514, 1
%516 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 0
%517 = load i32, i32* %516
%518 = icmp eq i32 %515, %517
br i1 %518, label %519, label %523
519: ; preds = %513
%520 = load i32, i32* %15
store i32 %520, i32* %7
%521 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 0
%522 = load i32, i32* %521
store i32 %522, i32* %9
br label %539
523: ; preds = %513, %508
br label %524
524: ; preds = %523
%525 = load i32, i32* %11
%526 = icmp ne i32 %525, 0
br i1 %526, label %527, label %529
527: ; preds = %524
%528 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %530
529: ; preds = %524
store i32 1, i32* %11
br label %530
530: ; preds = %529, %527
br label %531
531: ; preds = %530
%532 = load i32, i32* %6
%533 = load i32, i32* %7
%534 = load i32, i32* %8
%535 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %532, i32 %533, i32 %534)
%536 = load i32, i32* %15
store i32 %536, i32* %7
store i32 %536, i32* %6
%537 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 0
%538 = load i32, i32* %537
store i32 %538, i32* %9
store i32 %538, i32* %8
br label %539
539: ; preds = %531, %519
br label %540
540: ; preds = %539, %504
br label %575
541: ; preds = %498
%542 = load i32, i32* %6
%543 = icmp ne i32 %542, 0
br i1 %543, label %544, label %557
544: ; preds = %541
br label %545
545: ; preds = %544
%546 = load i32, i32* %11
%547 = icmp ne i32 %546, 0
br i1 %547, label %548, label %550
548: ; preds = %545
%549 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %551
550: ; preds = %545
store i32 1, i32* %11
br label %551
551: ; preds = %550, %548
br label %552
552: ; preds = %551
%553 = load i32, i32* %6
%554 = load i32, i32* %7
%555 = load i32, i32* %8
%556 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %553, i32 %554, i32 %555)
store i32 0, i32* %6
br label %557
557: ; preds = %552, %541
br label %558
558: ; preds = %557
%559 = load i32, i32* %11
%560 = icmp ne i32 %559, 0
br i1 %560, label %561, label %563
561: ; preds = %558
%562 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %564
563: ; preds = %558
store i32 1, i32* %11
br label %564
564: ; preds = %563, %561
br label %565
565: ; preds = %564
%566 = load i32, i32* %15
%567 = load i32, i32* %15
%568 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 0
%569 = load i32, i32* %568
%570 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 1
%571 = load i32, i32* %570
%572 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 2
%573 = load i32, i32* %572
%574 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.11, i64 0, i64 0), i32 %566, i32 %567, i32 %569, i32 %571, i32 %573)
br label %575
575: ; preds = %565, %540
br label %31
576: ; preds = %31
%577 = load i32, i32* %6
%578 = icmp ne i32 %577, 0
br i1 %578, label %579, label %592
579: ; preds = %576
br label %580
580: ; preds = %579
%581 = load i32, i32* %11
%582 = icmp ne i32 %581, 0
br i1 %582, label %583, label %585
583: ; preds = %580
%584 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %586
585: ; preds = %580
store i32 1, i32* %11
br label %586
586: ; preds = %585, %583
br label %587
587: ; preds = %586
%588 = load i32, i32* %6
%589 = load i32, i32* %7
%590 = load i32, i32* %8
%591 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %588, i32 %589, i32 %590)
br label %592
592: ; preds = %587, %576
br label %593
593: ; preds = %592
%594 = load i32, i32* %11
%595 = icmp ne i32 %594, 0
br i1 %595, label %596, label %598
596: ; preds = %593
%597 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0))
br label %599
598: ; preds = %593
store i32 1, i32* %11
br label %599
599: ; preds = %598, %596
br label %600
600: ; preds = %599
%601 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
%602 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0))
%603 = load i32*, i32** %4
%604 = call i32 @fclose(i32* %603)
store i32 0, i32* %2
br label %605
605: ; preds = %600, %493, %478, %337, %311, %187, %24
%606 = load i32, i32* %2
ret i32 %606
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [18 x i8] c"couldn't open %s\0A\00"
@.str.4 = [37 x i8] c"%s %d: invalid input character code\0A\00"
@.str.5 = [27 x i8] c"%s %d: bad flag character\0A\00"
@.str.6 = [20 x i8] c"%s %d: unknown flag\00"
@.str.7 = [38 x i8] c"%s %d: invalid output character code\0A\00"
@.str.8 = [30 x i8] c"%s %d: invalid output string\0A\00"
@.str.10 = [32 x i8] c"\09{ 0x%x, 0x%x, 0x%x, 0x0, 0x0 }\00"
@.str.12 = [29 x i8] c"\09{ 0x0, 0x0, 0x0, 0x0, 0x0 }\00"
@str = [36 x i8] c"struct casefold tolower_table[] = {\00"
@str.14 = [4 x i8] c"\0A};\00"
@str.19 = [2 x i8] c",\00"
define i32 @unifold_simple(i8* %0) {
%2 = alloca [1024 x i8]
%3 = alloca [8 x i32]
%4 = bitcast [8 x i32]* %3 to i8*
%5 = alloca i8*
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%7 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %177
12: ; preds = %1
%13 = tail call i32 @putchar(i32 10)
%14 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%15 = call i64 @fgets(i8* %6, i32 1024, i32* %7)
%16 = icmp eq i64 %15, 0
br i1 %16, label %173, label %17
17: ; preds = %12
%18 = bitcast i8** %5 to i8*
%19 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 0
br label %20
20: ; preds = %17, %154
%21 = phi i32 [ 0, %17 ], [ %159, %154 ]
%22 = phi i32 [ 0, %17 ], [ %158, %154 ]
%23 = phi i32 [ 0, %17 ], [ %27, %154 ]
%24 = phi i32 [ undef, %17 ], [ %157, %154 ]
%25 = phi i32 [ 0, %17 ], [ %156, %154 ]
%26 = phi i32 [ undef, %17 ], [ %155, %154 ]
%27 = add nuw nsw i32 %23, 1
br label %28
28: ; preds = %20, %35
%29 = phi i64 [ 0, %20 ], [ %36, %35 ]
%30 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %29
%31 = load i8, i8* %30
switch i8 %31, label %32 [
i8 32, label %35
i8 9, label %35
i8 13, label %154
i8 10, label %154
i8 35, label %154
i8 0, label %154
]
32: ; preds = %28
%33 = and i64 %29, 4294967295
%34 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %33
br label %37
35: ; preds = %28, %28
%36 = add nuw i64 %29, 1
br label %28
37: ; preds = %32, %41
%38 = phi i64 [ %33, %32 ], [ %42, %41 ]
%39 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %38
%40 = load i8, i8* %39
switch i8 %40, label %41 [
i8 0, label %43
i8 35, label %43
i8 59, label %43
i8 32, label %43
i8 9, label %43
i8 10, label %43
i8 13, label %43
]
41: ; preds = %37
%42 = add nuw i64 %38, 1
br label %37
43: ; preds = %37, %37, %37, %37, %37, %37, %37
%44 = and i64 %38, 4294967295
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %44
store i8 0, i8* %45
%46 = call i64 @strtol(i8* %34, i8** %5, i32 16)
%47 = trunc i64 %46 to i32
%48 = load i8*, i8** %5
%49 = icmp ne i8* %48, %45
%50 = icmp eq i8* %48, %34
%51 = or i1 %49, %50
br i1 %51, label %150, label %52
52: ; preds = %43
store i8 %40, i8* %45
%53 = icmp eq i8 %40, 59
%54 = zext i1 %53 to i64
%55 = add i64 %38, %54
%56 = and i64 %55, 4294967295
br label %57
57: ; preds = %64, %52
%58 = phi i64 [ %65, %64 ], [ %56, %52 ]
%59 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %58
%60 = load i8, i8* %59
switch i8 %60, label %61 [
i8 32, label %64
i8 9, label %64
]
61: ; preds = %57
%62 = and i64 %58, 4294967295
%63 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %62
br label %66
64: ; preds = %57, %57
%65 = add nuw i64 %58, 1
br label %57
66: ; preds = %61, %70
%67 = phi i64 [ %62, %61 ], [ %71, %70 ]
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %67
%69 = load i8, i8* %68
switch i8 %69, label %70 [
i8 0, label %72
i8 35, label %72
i8 59, label %72
i8 32, label %72
i8 9, label %72
i8 10, label %72
i8 13, label %72
]
70: ; preds = %66
%71 = add nuw i64 %67, 1
br label %66
72: ; preds = %66, %66, %66, %66, %66, %66, %66
%73 = and i64 %67, 4294967295
%74 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %73
store i8 0, i8* %74
%75 = load i8, i8* %63
switch i8 %75, label %82 [
i8 0, label %76
i8 84, label %154
i8 70, label %154
]
76: ; preds = %72
%77 = add i64 %58, 1
%78 = and i64 %77, 4294967295
%79 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = icmp eq i8 %80, 0
br i1 %81, label %85, label %150
82: ; preds = %72
%83 = and i8 %75, -17
%84 = icmp eq i8 %83, 67
br i1 %84, label %86, label %85
85: ; preds = %82, %76
br label %150
86: ; preds = %82, %126
%87 = phi i64 [ %127, %126 ], [ 0, %82 ]
%88 = phi i64 [ %109, %126 ], [ %67, %82 ]
%89 = phi i8 [ %111, %126 ], [ %69, %82 ]
%90 = shl i64 %88, 32
%91 = ashr exact i64 %90, 32
%92 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %91
store i8 %89, i8* %92
%93 = icmp eq i8 %89, 59
%94 = zext i1 %93 to i64
%95 = add i64 %88, %94
%96 = shl i64 %95, 32
%97 = ashr exact i64 %96, 32
br label %98
98: ; preds = %106, %86
%99 = phi i64 [ %107, %106 ], [ %97, %86 ]
%100 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %99
%101 = load i8, i8* %100
switch i8 %101, label %102 [
i8 32, label %106
i8 9, label %106
]
102: ; preds = %98
%103 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %99
%104 = shl i64 %99, 32
%105 = ashr exact i64 %104, 32
br label %108
106: ; preds = %98, %98
%107 = add i64 %99, 1
br label %98
108: ; preds = %102, %112
%109 = phi i64 [ %105, %102 ], [ %113, %112 ]
%110 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %109
%111 = load i8, i8* %110
switch i8 %111, label %112 [
i8 0, label %114
i8 35, label %114
i8 59, label %114
i8 32, label %114
i8 9, label %114
i8 10, label %114
i8 13, label %114
]
112: ; preds = %108
%113 = add i64 %109, 1
br label %108
114: ; preds = %108, %108, %108, %108, %108, %108, %108
%115 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %109
store i8 0, i8* %115
%116 = load i8, i8* %103
%117 = icmp eq i8 %116, 0
br i1 %117, label %128, label %118
118: ; preds = %114
%119 = call i64 @strtol(i8* %103, i8** %5, i32 16)
%120 = trunc i64 %119 to i32
%121 = getelementptr inbounds [8 x i32], [8 x i32]* %3, i64 0, i64 %87
store i32 %120, i32* %121
%122 = load i8*, i8** %5
%123 = icmp ne i8* %122, %115
%124 = icmp eq i8* %122, %103
%125 = or i1 %123, %124
br i1 %125, label %150, label %126
126: ; preds = %118
%127 = add nuw i64 %87, 1
br label %86
128: ; preds = %114
%129 = trunc i64 %87 to i32
%130 = icmp eq i32 %129, 1
br i1 %130, label %131, label %150
131: ; preds = %128
%132 = icmp eq i32 %21, 0
br i1 %132, label %133, label %135
133: ; preds = %131
%134 = load i32, i32* %19
br label %154
135: ; preds = %131
%136 = add i32 %26, 1
%137 = icmp eq i32 %136, %47
br i1 %137, label %138, label %142
138: ; preds = %135
%139 = add i32 %24, 1
%140 = load i32, i32* %19
%141 = icmp eq i32 %139, %140
br i1 %141, label %154, label %142
142: ; preds = %135, %138
%143 = icmp eq i32 %22, 0
br i1 %143, label %146, label %144
144: ; preds = %142
%145 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.19, i64 0, i64 0))
br label %146
146: ; preds = %142, %144
%147 = phi i32 [ %22, %144 ], [ 1, %142 ]
%148 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %21, i32 %26, i32 %25)
%149 = load i32, i32* %19
br label %154
150: ; preds = %128, %43, %118, %76, %85
%151 = phi i8* [ getelementptr inbounds ([20 x i8], [20 x i8]* @.str.6, i64 0, i64 0), %85 ], [ getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), %76 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.7, i64 0, i64 0), %118 ], [ getelementptr inbounds ([30 x i8], [30 x i8]* @.str.8, i64 0, i64 0), %128 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.4, i64 0, i64 0), %43 ]
%152 = load i32, i32* @stderr
%153 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %152, i8* %151, i8* %0, i32 %27)
br label %177
154: ; preds = %28, %28, %28, %28, %72, %72, %146, %133, %138
%155 = phi i32 [ %47, %138 ], [ %47, %133 ], [ %47, %146 ], [ %26, %72 ], [ %26, %72 ], [ %26, %28 ], [ %26, %28 ], [ %26, %28 ], [ %26, %28 ]
%156 = phi i32 [ %25, %138 ], [ %134, %133 ], [ %149, %146 ], [ %25, %72 ], [ %25, %72 ], [ %25, %28 ], [ %25, %28 ], [ %25, %28 ], [ %25, %28 ]
%157 = phi i32 [ %139, %138 ], [ %134, %133 ], [ %149, %146 ], [ %24, %72 ], [ %24, %72 ], [ %24, %28 ], [ %24, %28 ], [ %24, %28 ], [ %24, %28 ]
%158 = phi i32 [ %22, %138 ], [ %22, %133 ], [ %147, %146 ], [ %22, %72 ], [ %22, %72 ], [ %22, %28 ], [ %22, %28 ], [ %22, %28 ], [ %22, %28 ]
%159 = phi i32 [ %21, %138 ], [ %47, %133 ], [ %47, %146 ], [ %21, %72 ], [ %21, %72 ], [ %21, %28 ], [ %21, %28 ], [ %21, %28 ], [ %21, %28 ]
%160 = call i64 @fgets(i8* %6, i32 1024, i32* %7)
%161 = icmp eq i64 %160, 0
br i1 %161, label %162, label %20
162: ; preds = %154
%163 = icmp eq i32 %159, 0
%164 = icmp eq i32 %158, 0
br i1 %163, label %170, label %165
165: ; preds = %162
br i1 %164, label %168, label %166
166: ; preds = %165
%167 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.19, i64 0, i64 0))
br label %168
168: ; preds = %166, %165
%169 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0), i32 %159, i32 %155, i32 %156)
br label %171
170: ; preds = %162
br i1 %164, label %173, label %171
171: ; preds = %168, %170
%172 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str.19, i64 0, i64 0))
br label %173
173: ; preds = %12, %170, %171
%174 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.12, i64 0, i64 0))
%175 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str.14, i64 0, i64 0))
%176 = call i32 @fclose(i32* %7)
br label %177
177: ; preds = %150, %173, %9
%178 = phi i32 [ 0, %173 ], [ -1, %9 ], [ -1, %150 ]
ret i32 %178
}