#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*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
scalar_t__ fclose(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ *stderr;
void output_casemapping(const char *filename, const char *mapname,
                        unsigned int (*map)(unsigned int),
                        const char *version) {
  FILE *stream;
  bool pages[0x1100];
  unsigned int max_nonempty_page;
  stream = fopen(filename, "w");
  if (stream == NULL) {
    fprintf(stderr, "cannot open '%s' for writing\n", filename);
    exit(1);
  }
  fprintf(stream, "/*\n");
  fprintf(stream, " * %s\n", filename);
  fprintf(stream, " *\n");
  fprintf(stream, " * Common Lisp %scase table.\n", mapname);
  fprintf(
      stream,
      " * Generated automatically by the gen-ctype utility for Unicode %s.\n",
      version);
  fprintf(stream, " */\n");
  fprintf(stream, "\n");
  {
    unsigned int p;
    for (p = 0; p < 0x1100; p++)
      pages[p] = false;
    max_nonempty_page = 0;
  }
  {
    unsigned int p, i1;
    for (p = 0; p < 0x1100; p++)
      for (i1 = 0; i1 < 0x100; i1++) {
        unsigned int ch = (p << 8) + i1;
        if (map(ch) != ch) {
          pages[p] = true;
          max_nonempty_page = p;
          break;
        }
      }
  }
  {
    unsigned int p, i1, i2;
    for (p = 0; p < 0x1100; p++)
      if (pages[p]) {
        fprintf(stream, "static const uint16 %s_case_table_page%02x[256] = {\n",
                mapname, p);
        for (i1 = 0; i1 < 32; i1++) {
          fprintf(stream, "  ");
          for (i2 = 0; i2 < 8; i2++) {
            unsigned int ch = 256 * p + 8 * i1 + i2;
            unsigned int ch2 = map(ch);
            int j = ch2 - ch;
            if (j > 0x7fff || j < -0x7fff) {
              fprintf(
                  stderr,
                  "%scase(0x%04x) differs from 0x%04x by more than 15 bits\n",
                  mapname, ch, ch);
              exit(1);
            }
            fprintf(stream, "0x%04x%s ", j & 0xffffU,
                    (8 * i1 + i2 < 255 ? "," : " "));
          }
          fprintf(stream, "/* 0x%02x-0x%02x */\n", 8 * i1, 8 * i1 + 7);
        }
        fprintf(stream, "};\n");
        fprintf(stream, "\n");
      }
  }
  {
    unsigned int p;
    fprintf(stream, "static const uint16 * const %s_case_table[%d] = {\n",
            mapname, max_nonempty_page + 1);
    for (p = 0; p <= max_nonempty_page; p++) {
      if ((p % 4) == 0)
        fprintf(stream, "  ");
      if (pages[p])
        fprintf(stream, "%s_case_table_page%02x", mapname, p);
      else
        fprintf(stream, "nop_page");
      fprintf(stream, "%s ", (p < max_nonempty_page ? "," : " "));
      if ((p % 4) == 3 || p == max_nonempty_page)
        fprintf(stream, "/* 0x%02x-0x%02x */\n", 4 * (p / 4), p);
    }
    fprintf(stream, "};\n");
    fprintf(stream, "\n");
  }
  if (ferror(stream) || fclose(stream)) {
    fprintf(stderr, "error writing to '%s'\n", filename);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<output_casemapping>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4460,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe8a(%rip),%rsi
call   1060 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    11b0 <output_casemapping+0x60>
mov    0x2e4f(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe63(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x28(%rbp),%rdi
lea    0xe65(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xe53(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xe48(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rdx
lea    0xe36(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe3e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xefe(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xf5d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4438(%rbp)
cmpl   $0x1100,-0x4438(%rbp)
jae    1279 <output_casemapping+0x129>
mov    -0x4438(%rbp),%eax
movl   $0x0,-0x4430(%rbp,%rax,4)
mov    -0x4438(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4438(%rbp)
jmp    1244 <output_casemapping+0xf4>
movl   $0x0,-0x4434(%rbp)
movl   $0x0,-0x443c(%rbp)
cmpl   $0x1100,-0x443c(%rbp)
jae    1338 <output_casemapping+0x1e8>
movl   $0x0,-0x4440(%rbp)
cmpl   $0x100,-0x4440(%rbp)
jae    131f <output_casemapping+0x1cf>
mov    -0x443c(%rbp),%eax
shl    $0x8,%eax
add    -0x4440(%rbp),%eax
mov    %eax,-0x4444(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x4444(%rbp),%edi
call   *%rax
cmp    -0x4444(%rbp),%eax
je     1306 <output_casemapping+0x1b6>
mov    -0x443c(%rbp),%eax
movl   $0x1,-0x4430(%rbp,%rax,4)
mov    -0x443c(%rbp),%eax
mov    %eax,-0x4434(%rbp)
jmp    131f <output_casemapping+0x1cf>
jmp    130b <output_casemapping+0x1bb>
mov    -0x4440(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4440(%rbp)
jmp    12a7 <output_casemapping+0x157>
jmp    1324 <output_casemapping+0x1d4>
mov    -0x443c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x443c(%rbp)
jmp    128d <output_casemapping+0x13d>
movl   $0x0,-0x4448(%rbp)
cmpl   $0x1100,-0x4448(%rbp)
jae    152a <output_casemapping+0x3da>
mov    -0x4448(%rbp),%eax
cmpl   $0x0,-0x4430(%rbp,%rax,4)
je     1511 <output_casemapping+0x3c1>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x4448(%rbp),%ecx
lea    0xd17(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x444c(%rbp)
cmpl   $0x20,-0x444c(%rbp)
jae    14ed <output_casemapping+0x39d>
mov    -0x28(%rbp),%rdi
lea    0xd23(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4450(%rbp)
cmpl   $0x8,-0x4450(%rbp)
jae    14b2 <output_casemapping+0x362>
mov    -0x4448(%rbp),%eax
shl    $0x8,%eax
mov    -0x444c(%rbp),%ecx
shl    $0x3,%ecx
add    %ecx,%eax
add    -0x4450(%rbp),%eax
mov    %eax,-0x4454(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x4454(%rbp),%edi
call   *%rax
mov    %eax,-0x4458(%rbp)
mov    -0x4458(%rbp),%eax
sub    -0x4454(%rbp),%eax
mov    %eax,-0x445c(%rbp)
cmpl   $0x7fff,-0x445c(%rbp)
jg     1426 <output_casemapping+0x2d6>
cmpl   $0xffff8001,-0x445c(%rbp)
80 ff ff
jge    1459 <output_casemapping+0x309>
mov    0x2bb3(%rip),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x4454(%rbp),%ecx
mov    -0x4454(%rbp),%r8d
lea    0xc82(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    -0x28(%rbp),%rdi
mov    -0x445c(%rbp),%edx
and    $0xffff,%edx
mov    -0x444c(%rbp),%esi
shl    $0x3,%esi
add    -0x4450(%rbp),%esi
lea    0xc49(%rip),%rcx
lea    0xc87(%rip),%rax
cmp    $0xff,%esi
cmovb  %rax,%rcx
lea    0xc6c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x4450(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4450(%rbp)
jmp    13b5 <output_casemapping+0x265>
mov    -0x28(%rbp),%rdi
mov    -0x444c(%rbp),%edx
shl    $0x3,%edx
mov    -0x444c(%rbp),%ecx
shl    $0x3,%ecx
add    $0x7,%ecx
lea    0xc3d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x444c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x444c(%rbp)
jmp    138c <output_casemapping+0x23c>
mov    -0x28(%rbp),%rdi
lea    0xc2c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xc86(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    1516 <output_casemapping+0x3c6>
mov    -0x4448(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4448(%rbp)
jmp    1342 <output_casemapping+0x1f2>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x4434(%rbp),%ecx
add    $0x1,%ecx
lea    0xbe6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x4460(%rbp)
mov    -0x4460(%rbp),%eax
cmp    -0x4434(%rbp),%eax
ja     1663 <output_casemapping+0x513>
mov    -0x4460(%rbp),%eax
and    $0x3,%eax
cmp    $0x0,%eax
jne    1589 <output_casemapping+0x439>
mov    -0x28(%rbp),%rdi
lea    0xb45(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x4460(%rbp),%eax
cmpl   $0x0,-0x4430(%rbp,%rax,4)
je     15be <output_casemapping+0x46e>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x4460(%rbp),%ecx
lea    0xba9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    15d0 <output_casemapping+0x480>
mov    -0x28(%rbp),%rdi
lea    0xba9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
mov    -0x4460(%rbp),%ecx
mov    -0x4434(%rbp),%esi
lea    0xae1(%rip),%rdx
lea    0xb1f(%rip),%rax
cmp    %esi,%ecx
cmovb  %rax,%rdx
lea    0xb0e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x4460(%rbp),%eax
and    $0x3,%eax
cmp    $0x3,%eax
je     1626 <output_casemapping+0x4d6>
mov    -0x4460(%rbp),%eax
cmp    -0x4434(%rbp),%eax
jne    164a <output_casemapping+0x4fa>
mov    -0x28(%rbp),%rdi
mov    -0x4460(%rbp),%edx
shr    $0x2,%edx
shl    $0x2,%edx
mov    -0x4460(%rbp),%ecx
lea    0xacc(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    164f <output_casemapping+0x4ff>
mov    -0x4460(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4460(%rbp)
jmp    1553 <output_casemapping+0x403>
mov    -0x28(%rbp),%rdi
lea    0xab6(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
lea    0xb10(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
jne    16ad <output_casemapping+0x55d>
mov    -0x28(%rbp),%rdi
call   1040 <fclose@plt>
cmp    $0x0,%rax
je     16d3 <output_casemapping+0x583>
mov    0x292c(%rip),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rdx
lea    0xab9(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
add    $0x4460,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<output_casemapping>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x4458,%rsp
mov    %rcx,%r14
mov    %rdx,0x30(%rsp)
mov    %rsi,%r12
mov    %rdi,%rbx
lea    0xe5a(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     1841 <output_casemapping+0x6c1>
mov    %rax,%rbp
lea    0xe62(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   10a0 <fwrite@plt>
lea    0xe4d(%rip),%rsi
xor    %r15d,%r15d
mov    %rbp,%rdi
mov    %rbx,0x38(%rsp)
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xe38(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
lea    0xe23(%rip),%rsi
mov    %rbp,%rdi
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xe2d(%rip),%rsi
mov    %rbp,%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xeeb(%rip),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
mov    %rbp,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbp,0x8(%rsp)
mov    %rbp,%rsi
call   1060 <fputc@plt>
lea    0x50(%rsp),%rdi
mov    $0x4400,%edx
xor    %esi,%esi
call   1050 <memset@plt>
xor    %r14d,%r14d
xor    %r13d,%r13d
jmp    12a0 <output_casemapping+0x120>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movl   $0x1,0x50(%rsp,%r14,4)
mov    %r14d,%r13d
add    $0x1,%r14
add    $0x100,%r15d
cmp    $0x1100,%r14
je     12cb <output_casemapping+0x14b>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    (%r15,%rbx,1),%ebp
mov    %ebp,%edi
call   *0x30(%rsp)
cmp    %eax,%ebp
jne    1280 <output_casemapping+0x100>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    12b0 <output_casemapping+0x130>
jmp    128c <output_casemapping+0x10c>
mov    %r13,0x28(%rsp)
mov    %r12,0x20(%rsp)
xor    %r12d,%r12d
xor    %eax,%eax
mov    %rax,0x18(%rsp)
xor    %ecx,%ecx
mov    0x8(%rsp),%r15
jmp    1317 <output_casemapping+0x197>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rcx
mov    0x18(%rsp),%rax
add    $0xffffff00,%eax
mov    %rax,0x18(%rsp)
add    $0x100,%r12d
cmp    $0x1100,%rcx
je     1624 <output_casemapping+0x4a4>
cmpl   $0x0,0x50(%rsp,%rcx,4)
je     12f0 <output_casemapping+0x170>
xor    %ebp,%ebp
mov    %r15,%rdi
lea    0xd68(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    %rcx,0x40(%rsp)
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x18(%rsp),%rax
add    $0xffffffff,%eax
mov    %rax,0x48(%rsp)
xor    %ebx,%ebx
mov    %r12,(%rsp)
xchg   %ax,%ax
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xd66(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    %rbp,0x10(%rsp)
lea    (%r12,%rbp,1),%r13d
mov    %r13d,%edi
mov    0x30(%rsp),%rbp
call   *%rbp
mov    0x48(%rsp),%r14
lea    (%r14,%rax,1),%ecx
add    %ebx,%ecx
add    $0xffff8001,%ecx
cmp    $0xffff0000,%ecx
jbe    17fc <output_casemapping+0x67c>
add    0x18(%rsp),%eax
add    %ebx,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    0x10(%rsp),%r15
cmp    $0xff,%r15d
lea    0xd10(%rip),%rcx
lea    0xd4e(%rip),%r13
cmovb  %r13,%rcx
mov    %rdi,%r13
lea    0xd36(%rip),%r12
mov    %r12,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rsp),%rax
lea    (%rax,%r15,1),%edi
add    $0x1,%edi
call   *%rbp
add    %r14d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff8000,%ecx
cmp    $0xffff0001,%ecx
jb     1796 <output_casemapping+0x616>
mov    %r13,%r15
mov    %r14,%r13
add    %ebx,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xcf9(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    0x10(%rsp),%r14
mov    (%rsp),%rax
lea    (%rax,%r14,1),%edi
add    $0x2,%edi
call   *%rbp
add    %r13d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff7fff,%ecx
cmp    $0xffff0001,%ecx
jb     17a9 <output_casemapping+0x629>
add    %ebx,%eax
add    $0xffffffff,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xcb3(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%edi
add    $0x3,%edi
call   *%rbp
add    %r13d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff7ffe,%ecx
cmp    $0xffff0001,%ecx
jb     17b7 <output_casemapping+0x637>
add    %ebx,%eax
add    $0xfffffffe,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xc72(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%edi
add    $0x4,%edi
call   *%rbp
add    %r13d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff7ffd,%ecx
cmp    $0xffff0001,%ecx
jb     17c5 <output_casemapping+0x645>
add    %ebx,%eax
add    $0xfffffffd,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xc31(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%edi
add    $0x5,%edi
call   *%rbp
add    %r13d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff7ffc,%ecx
cmp    $0xffff0001,%ecx
jb     17d3 <output_casemapping+0x653>
add    %ebx,%eax
add    $0xfffffffc,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xbf0(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%edi
add    $0x6,%edi
call   *%rbp
add    %r13d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff7ffb,%ecx
cmp    $0xffff0001,%ecx
jb     17e1 <output_casemapping+0x661>
add    %ebx,%eax
add    $0xfffffffb,%eax
movzwl %ax,%edx
mov    %r15,%rdi
mov    %r12,%rsi
lea    0xbaf(%rip),%rcx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r14,%rax
mov    %r13,%r14
mov    %r12,%r13
mov    (%rsp),%rcx
mov    %rcx,%r12
lea    (%rcx,%rax,1),%edi
add    $0x7,%edi
call   *%rbp
add    %r14d,%eax
lea    (%rbx,%rax,1),%ecx
add    $0xffff7ffa,%ecx
cmp    $0xffff0001,%ecx
jb     17ef <output_casemapping+0x66f>
mov    0x10(%rsp),%rbp
lea    0x7(%rbp),%r14d
add    %ebx,%eax
add    $0xfffffffa,%eax
movzwl %ax,%edx
cmp    $0xff,%r14d
lea    0xb14(%rip),%rcx
lea    0xb52(%rip),%rax
cmovb  %rax,%rcx
mov    %r15,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r15,%rdi
lea    0xb39(%rip),%rsi
mov    %ebp,%edx
mov    %r14d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0xfffffff8,%ebx
add    $0x8,%ebp
cmp    $0xffffff00,%ebx
jne    1350 <output_casemapping+0x1d0>
mov    $0x3,%esi
mov    $0x1,%edx
lea    0xb1f(%rip),%rdi
mov    %r15,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %r15,%rsi
call   1060 <fputc@plt>
mov    0x40(%rsp),%rcx
jmp    12f0 <output_casemapping+0x170>
mov    0x28(%rsp),%rax
lea    0x1(%rax),%ecx
lea    0xaf5(%rip),%rsi
mov    %r15,%rdi
mov    0x20(%rsp),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
lea    0xabd(%rip),%r13
xor    %r15d,%r15d
mov    0x28(%rsp),%r14
jmp    1689 <output_casemapping+0x509>
cs nopw 0x0(%rax,%rax,1)
mov    %r15d,%edx
and    $0xfffffffc,%edx
mov    0x8(%rsp),%rdi
lea    0xa9d(%rip),%rsi
mov    %r15d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%r15d
cmp    %r14d,%r15d
ja     1737 <output_casemapping+0x5b7>
mov    %r15d,%ebp
and    $0x3,%ebp
jne    16ac <output_casemapping+0x52c>
mov    $0x2,%esi
mov    $0x1,%edx
lea    0xa25(%rip),%rdi
mov    0x8(%rsp),%rcx
call   10a0 <fwrite@plt>
mov    %r15d,%eax
cmpl   $0x0,0x50(%rsp,%rax,4)
je     16e0 <output_casemapping+0x560>
mov    0x8(%rsp),%r12
mov    %r12,%rdi
lea    0xa96(%rip),%rsi
mov    %rbx,%rdx
mov    %r15d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
jmp    16fe <output_casemapping+0x57e>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x8,%esi
mov    $0x1,%edx
lea    0xa81(%rip),%rdi
mov    0x8(%rsp),%r12
mov    %r12,%rcx
call   10a0 <fwrite@plt>
cmp    %r14d,%r15d
lea    0x9c0(%rip),%rdx
lea    0x9fe(%rip),%rax
cmovb  %rax,%rdx
mov    %r12,%rdi
mov    %r13,%rsi
xor    %eax,%eax
call   1070 <fprintf@plt>
cmp    $0x3,%ebp
je     1660 <output_casemapping+0x4e0>
cmp    %r15d,%r14d
jne    167c <output_casemapping+0x4fc>
jmp    1660 <output_casemapping+0x4e0>
lea    0x9e6(%rip),%rdi
mov    $0x3,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%rbx
mov    %rbx,%rcx
call   10a0 <fwrite@plt>
mov    $0xa,%edi
mov    %rbx,%rsi
call   1060 <fputc@plt>
mov    %rbx,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
jne    1829 <output_casemapping+0x6a9>
mov    %rbx,%rdi
call   1040 <fclose@plt>
test   %rax,%rax
jne    1829 <output_casemapping+0x6a9>
add    $0x4458,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x10(%rsp),%rax
mov    (%rsp),%rcx
lea    (%rcx,%rax,1),%r13d
add    $0x1,%r13d
jmp    17fc <output_casemapping+0x67c>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%r13d
add    $0x2,%r13d
jmp    17fc <output_casemapping+0x67c>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%r13d
add    $0x3,%r13d
jmp    17fc <output_casemapping+0x67c>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%r13d
add    $0x4,%r13d
jmp    17fc <output_casemapping+0x67c>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%r13d
add    $0x5,%r13d
jmp    17fc <output_casemapping+0x67c>
mov    (%rsp),%rax
lea    (%rax,%r14,1),%r13d
add    $0x6,%r13d
jmp    17fc <output_casemapping+0x67c>
mov    0x10(%rsp),%rax
lea    (%r12,%rax,1),%r13d
add    $0x7,%r13d
mov    0x27dd(%rip),%rax
mov    (%rax),%rdi
lea    0x8bd(%rip),%rsi
mov    0x20(%rsp),%rdx
mov    %r13d,%ecx
mov    %r13d,%r8d
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    0x27b0(%rip),%rax
mov    (%rax),%rdi
lea    0x941(%rip),%rsi
mov    0x38(%rsp),%rdx
jmp    1855 <output_casemapping+0x6d5>
mov    0x2798(%rip),%rax
mov    (%rax),%rdi
lea    0x7b0(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    $0x1,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@stderr = global i32* null
@.str.1 = [30 x i8] c"cannot open '%s' for writing\0A\00"
@.str.2 = [4 x i8] c"/*\0A\00"
@.str.3 = [7 x i8] c" * %s\0A\00"
@.str.4 = [4 x i8] c" *\0A\00"
@.str.5 = [30 x i8] c" * Common Lisp %scase table.\0A\00"
@.str.6 = [69 x i8] c" * Generated automatically by the gen-ctype utility for Unicode %s.\0A\00"
@.str.7 = [5 x i8] c" */\0A\00"
@.str.8 = [2 x i8] c"\0A\00"
@.str.9 = [53 x i8] c"static const uint16 %s_case_table_page%02x[256] = {\0A\00"
@.str.10 = [3 x i8] c" \00"
@.str.11 = [57 x i8] c"%scase(0x%04x) differs from 0x%04x by more than 15 bits\0A\00"
@.str.12 = [10 x i8] c"0x%04x%s \00"
@.str.13 = [2 x i8] c",\00"
@.str.14 = [2 x i8] c" \00"
@.str.15 = [21 x i8] c"/* 0x%02x-0x%02x */\0A\00"
@.str.16 = [4 x i8] c"};\0A\00"
@.str.17 = [51 x i8] c"static const uint16 * const %s_case_table[%d] = {\0A\00"
@.str.18 = [23 x i8] c"%s_case_table_page%02x\00"
@.str.19 = [9 x i8] c"nop_page\00"
@.str.20 = [4 x i8] c"%s \00"
@.str.21 = [23 x i8] c"error writing to '%s'\0A\00"
define void @output_casemapping(i8* %0, i8* %1, i32 (i32)* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32 (i32)*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca [4352 x i32]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 (i32)* %2, i32 (i32)** %7
store i8* %3, i8** %8
%23 = load i8*, i8** %5
%24 = call i32* @fopen(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %24, i32** %9
%25 = load i32*, i32** %9
%26 = icmp eq i32* %25, null
br i1 %26, label %27, label %32
27: ; preds = %4
%28 = load i32*, i32** @stderr
%29 = load i8*, i8** %5
%30 = call i32 (i32*, i8*, ...) @fprintf(i32* %28, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %29)
%31 = call i32 @exit(i32 1)
unreachable
32: ; preds = %4
%33 = load i32*, i32** %9
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %33, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%35 = load i32*, i32** %9
%36 = load i8*, i8** %5
%37 = call i32 (i32*, i8*, ...) @fprintf(i32* %35, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %36)
%38 = load i32*, i32** %9
%39 = call i32 (i32*, i8*, ...) @fprintf(i32* %38, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%40 = load i32*, i32** %9
%41 = load i8*, i8** %6
%42 = call i32 (i32*, i8*, ...) @fprintf(i32* %40, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %41)
%43 = load i32*, i32** %9
%44 = load i8*, i8** %8
%45 = call i32 (i32*, i8*, ...) @fprintf(i32* %43, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i8* %44)
%46 = load i32*, i32** %9
%47 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%48 = load i32*, i32** %9
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %48, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %12
br label %50
50: ; preds = %57, %32
%51 = load i32, i32* %12
%52 = icmp ult i32 %51, 4352
br i1 %52, label %53, label %60
53: ; preds = %50
%54 = load i32, i32* %12
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds [4352 x i32], [4352 x i32]* %10, i64 0, i64 %55
store i32 0, i32* %56
br label %57
57: ; preds = %53
%58 = load i32, i32* %12
%59 = add i32 %58, 1
store i32 %59, i32* %12
br label %50
60: ; preds = %50
store i32 0, i32* %11
store i32 0, i32* %13
br label %61
61: ; preds = %88, %60
%62 = load i32, i32* %13
%63 = icmp ult i32 %62, 4352
br i1 %63, label %64, label %91
64: ; preds = %61
store i32 0, i32* %14
br label %65
65: ; preds = %84, %64
%66 = load i32, i32* %14
%67 = icmp ult i32 %66, 256
br i1 %67, label %68, label %87
68: ; preds = %65
%69 = load i32, i32* %13
%70 = shl i32 %69, 8
%71 = load i32, i32* %14
%72 = add i32 %70, %71
store i32 %72, i32* %15
%73 = load i32 (i32)*, i32 (i32)** %7
%74 = load i32, i32* %15
%75 = call i32 %73(i32 %74)
%76 = load i32, i32* %15
%77 = icmp ne i32 %75, %76
br i1 %77, label %78, label %83
78: ; preds = %68
%79 = load i32, i32* %13
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds [4352 x i32], [4352 x i32]* %10, i64 0, i64 %80
store i32 1, i32* %81
%82 = load i32, i32* %13
store i32 %82, i32* %11
br label %87
83: ; preds = %68
br label %84
84: ; preds = %83
%85 = load i32, i32* %14
%86 = add i32 %85, 1
store i32 %86, i32* %14
br label %65
87: ; preds = %78, %65
br label %88
88: ; preds = %87
%89 = load i32, i32* %13
%90 = add i32 %89, 1
store i32 %90, i32* %13
br label %61
91: ; preds = %61
store i32 0, i32* %16
br label %92
92: ; preds = %173, %91
%93 = load i32, i32* %16
%94 = icmp ult i32 %93, 4352
br i1 %94, label %95, label %176
95: ; preds = %92
%96 = load i32, i32* %16
%97 = zext i32 %96 to i64
%98 = getelementptr inbounds [4352 x i32], [4352 x i32]* %10, i64 0, i64 %97
%99 = load i32, i32* %98
%100 = icmp ne i32 %99, 0
br i1 %100, label %101, label %172
101: ; preds = %95
%102 = load i32*, i32** %9
%103 = load i8*, i8** %6
%104 = load i32, i32* %16
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %102, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0), i8* %103, i32 %104)
store i32 0, i32* %17
br label %106
106: ; preds = %164, %101
%107 = load i32, i32* %17
%108 = icmp ult i32 %107, 32
br i1 %108, label %109, label %167
109: ; preds = %106
%110 = load i32*, i32** %9
%111 = call i32 (i32*, i8*, ...) @fprintf(i32* %110, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
store i32 0, i32* %18
br label %112
112: ; preds = %153, %109
%113 = load i32, i32* %18
%114 = icmp ult i32 %113, 8
br i1 %114, label %115, label %156
115: ; preds = %112
%116 = load i32, i32* %16
%117 = mul i32 256, %116
%118 = load i32, i32* %17
%119 = mul i32 8, %118
%120 = add i32 %117, %119
%121 = load i32, i32* %18
%122 = add i32 %120, %121
store i32 %122, i32* %19
%123 = load i32 (i32)*, i32 (i32)** %7
%124 = load i32, i32* %19
%125 = call i32 %123(i32 %124)
store i32 %125, i32* %20
%126 = load i32, i32* %20
%127 = load i32, i32* %19
%128 = sub i32 %126, %127
store i32 %128, i32* %21
%129 = load i32, i32* %21
%130 = icmp sgt i32 %129, 32767
br i1 %130, label %134, label %131
131: ; preds = %115
%132 = load i32, i32* %21
%133 = icmp slt i32 %132, -32767
br i1 %133, label %134, label %141
134: ; preds = %131, %115
%135 = load i32*, i32** @stderr
%136 = load i8*, i8** %6
%137 = load i32, i32* %19
%138 = load i32, i32* %19
%139 = call i32 (i32*, i8*, ...) @fprintf(i32* %135, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0), i8* %136, i32 %137, i32 %138)
%140 = call i32 @exit(i32 1)
unreachable
141: ; preds = %131
%142 = load i32*, i32** %9
%143 = load i32, i32* %21
%144 = and i32 %143, 65535
%145 = load i32, i32* %17
%146 = mul i32 8, %145
%147 = load i32, i32* %18
%148 = add i32 %146, %147
%149 = icmp ult i32 %148, 255
%150 = zext i1 %149 to i64
%151 = select i1 %149, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0)
%152 = call i32 (i32*, i8*, ...) @fprintf(i32* %142, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %144, i8* %151)
br label %153
153: ; preds = %141
%154 = load i32, i32* %18
%155 = add i32 %154, 1
store i32 %155, i32* %18
br label %112
156: ; preds = %112
%157 = load i32*, i32** %9
%158 = load i32, i32* %17
%159 = mul i32 8, %158
%160 = load i32, i32* %17
%161 = mul i32 8, %160
%162 = add i32 %161, 7
%163 = call i32 (i32*, i8*, ...) @fprintf(i32* %157, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %159, i32 %162)
br label %164
164: ; preds = %156
%165 = load i32, i32* %17
%166 = add i32 %165, 1
store i32 %166, i32* %17
br label %106
167: ; preds = %106
%168 = load i32*, i32** %9
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%170 = load i32*, i32** %9
%171 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
br label %172
172: ; preds = %167, %95
br label %173
173: ; preds = %172
%174 = load i32, i32* %16
%175 = add i32 %174, 1
store i32 %175, i32* %16
br label %92
176: ; preds = %92
%177 = load i32*, i32** %9
%178 = load i8*, i8** %6
%179 = load i32, i32* %11
%180 = add i32 %179, 1
%181 = call i32 (i32*, i8*, ...) @fprintf(i32* %177, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0), i8* %178, i32 %180)
store i32 0, i32* %22
br label %182
182: ; preds = %230, %176
%183 = load i32, i32* %22
%184 = load i32, i32* %11
%185 = icmp ule i32 %183, %184
br i1 %185, label %186, label %233
186: ; preds = %182
%187 = load i32, i32* %22
%188 = urem i32 %187, 4
%189 = icmp eq i32 %188, 0
br i1 %189, label %190, label %193
190: ; preds = %186
%191 = load i32*, i32** %9
%192 = call i32 (i32*, i8*, ...) @fprintf(i32* %191, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0))
br label %193
193: ; preds = %190, %186
%194 = load i32, i32* %22
%195 = zext i32 %194 to i64
%196 = getelementptr inbounds [4352 x i32], [4352 x i32]* %10, i64 0, i64 %195
%197 = load i32, i32* %196
%198 = icmp ne i32 %197, 0
br i1 %198, label %199, label %204
199: ; preds = %193
%200 = load i32*, i32** %9
%201 = load i8*, i8** %6
%202 = load i32, i32* %22
%203 = call i32 (i32*, i8*, ...) @fprintf(i32* %200, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i8* %201, i32 %202)
br label %207
204: ; preds = %193
%205 = load i32*, i32** %9
%206 = call i32 (i32*, i8*, ...) @fprintf(i32* %205, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0))
br label %207
207: ; preds = %204, %199
%208 = load i32*, i32** %9
%209 = load i32, i32* %22
%210 = load i32, i32* %11
%211 = icmp ult i32 %209, %210
%212 = zext i1 %211 to i64
%213 = select i1 %211, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0)
%214 = call i32 (i32*, i8*, ...) @fprintf(i32* %208, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i8* %213)
%215 = load i32, i32* %22
%216 = urem i32 %215, 4
%217 = icmp eq i32 %216, 3
br i1 %217, label %222, label %218
218: ; preds = %207
%219 = load i32, i32* %22
%220 = load i32, i32* %11
%221 = icmp eq i32 %219, %220
br i1 %221, label %222, label %229
222: ; preds = %218, %207
%223 = load i32*, i32** %9
%224 = load i32, i32* %22
%225 = udiv i32 %224, 4
%226 = mul i32 4, %225
%227 = load i32, i32* %22
%228 = call i32 (i32*, i8*, ...) @fprintf(i32* %223, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %226, i32 %227)
br label %229
229: ; preds = %222, %218
br label %230
230: ; preds = %229
%231 = load i32, i32* %22
%232 = add i32 %231, 1
store i32 %232, i32* %22
br label %182
233: ; preds = %182
%234 = load i32*, i32** %9
%235 = call i32 (i32*, i8*, ...) @fprintf(i32* %234, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0))
%236 = load i32*, i32** %9
%237 = call i32 (i32*, i8*, ...) @fprintf(i32* %236, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%238 = load i32*, i32** %9
%239 = call i64 @ferror(i32* %238)
%240 = icmp ne i64 %239, 0
br i1 %240, label %245, label %241
241: ; preds = %233
%242 = load i32*, i32** %9
%243 = call i64 @fclose(i32* %242)
%244 = icmp ne i64 %243, 0
br i1 %244, label %245, label %250
245: ; preds = %241, %233
%246 = load i32*, i32** @stderr
%247 = load i8*, i8** %5
%248 = call i32 (i32*, i8*, ...) @fprintf(i32* %246, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8* %247)
%249 = call i32 @exit(i32 1)
unreachable
250: ; preds = %241
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@stderr = global i32* null
@.str.1 = [30 x i8] c"cannot open '%s' for writing\0A\00"
@.str.2 = [4 x i8] c"/*\0A\00"
@.str.3 = [7 x i8] c" * %s\0A\00"
@.str.4 = [4 x i8] c" *\0A\00"
@.str.5 = [30 x i8] c" * Common Lisp %scase table.\0A\00"
@.str.6 = [69 x i8] c" * Generated automatically by the gen-ctype utility for Unicode %s.\0A\00"
@.str.7 = [5 x i8] c" */\0A\00"
@.str.9 = [53 x i8] c"static const uint16 %s_case_table_page%02x[256] = {\0A\00"
@.str.10 = [3 x i8] c" \00"
@.str.11 = [57 x i8] c"%scase(0x%04x) differs from 0x%04x by more than 15 bits\0A\00"
@.str.12 = [10 x i8] c"0x%04x%s \00"
@.str.13 = [2 x i8] c",\00"
@.str.14 = [2 x i8] c" \00"
@.str.15 = [21 x i8] c"/* 0x%02x-0x%02x */\0A\00"
@.str.16 = [4 x i8] c"};\0A\00"
@.str.17 = [51 x i8] c"static const uint16 * const %s_case_table[%d] = {\0A\00"
@.str.18 = [23 x i8] c"%s_case_table_page%02x\00"
@.str.19 = [9 x i8] c"nop_page\00"
@.str.20 = [4 x i8] c"%s \00"
@.str.21 = [23 x i8] c"error writing to '%s'\0A\00"
define void @output_casemapping(i8* %0, i8* %1, i32 (i32)* nocapture %2, i8* %3) {
%5 = alloca [4352 x i32]
%6 = bitcast [4352 x i32]* %5 to i8*
%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 %13
9: ; preds = %4
%10 = load i32*, i32** @stderr
%11 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %10, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%12 = tail call i32 @exit(i32 1)
unreachable
13: ; preds = %4
%14 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i64 3, i64 1, i32* %7)
%15 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%16 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i64 3, i64 1, i32* %7)
%17 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %1)
%18 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.6, i64 0, i64 0), i8* %3)
%19 = tail call i64 @fwrite(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i64 4, i64 1, i32* %7)
%20 = tail call i32 @fputc(i32 10, i32* %7)
br label %21
21: ; preds = %13, %37
%22 = phi i64 [ 0, %13 ], [ %39, %37 ]
%23 = phi i32 [ 0, %13 ], [ %38, %37 ]
%24 = trunc i64 %22 to i32
%25 = shl i32 %24, 8
br label %29
26: ; preds = %29
%27 = add nuw nsw i32 %30, 1
%28 = icmp eq i32 %27, 256
br i1 %28, label %37, label %29
29: ; preds = %21, %26
%30 = phi i32 [ 0, %21 ], [ %27, %26 ]
%31 = add nuw nsw i32 %30, %25
%32 = tail call i32 %2(i32 %31)
%33 = icmp eq i32 %32, %31
br i1 %33, label %26, label %34
34: ; preds = %29
%35 = getelementptr inbounds [4352 x i32], [4352 x i32]* %5, i64 0, i64 %22
store i32 1, i32* %35
%36 = trunc i64 %22 to i32
br label %37
37: ; preds = %26, %34
%38 = phi i32 [ %36, %34 ], [ %23, %26 ]
%39 = add nuw nsw i64 %22, 1
%40 = icmp eq i64 %39, 4352
br i1 %40, label %41, label %21
41: ; preds = %37, %142
%42 = phi i64 [ %143, %142 ], [ 0, %37 ]
%43 = getelementptr inbounds [4352 x i32], [4352 x i32]* %5, i64 0, i64 %42
%44 = load i32, i32* %43
%45 = icmp eq i32 %44, 0
br i1 %45, label %142, label %46
46: ; preds = %41
%47 = trunc i64 %42 to i32
%48 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.9, i64 0, i64 0), i8* %1, i32 %47)
%49 = trunc i64 %42 to i32
%50 = shl i32 %49, 8
br label %51
51: ; preds = %46, %130
%52 = phi i32 [ 0, %46 ], [ %137, %130 ]
%53 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 2, i64 1, i32* %7)
%54 = shl i32 %52, 3
%55 = add nuw nsw i32 %54, %50
%56 = tail call i32 %2(i32 %55)
%57 = sub i32 %56, %55
%58 = add i32 %57, -32768
%59 = icmp ult i32 %58, -65535
br i1 %59, label %60, label %65
60: ; preds = %121, %112, %103, %94, %85, %76, %65, %51
%61 = phi i32 [ %55, %51 ], [ %71, %65 ], [ %80, %76 ], [ %89, %85 ], [ %98, %94 ], [ %107, %103 ], [ %116, %112 ], [ %125, %121 ]
%62 = load i32*, i32** @stderr
%63 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %62, i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.11, i64 0, i64 0), i8* %1, i32 %61, i32 %61)
%64 = tail call i32 @exit(i32 1)
unreachable
65: ; preds = %51
%66 = and i32 %57, 65535
%67 = icmp ult i32 %54, 255
%68 = select i1 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0)
%69 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %66, i8* %68)
%70 = or i32 %54, 1
%71 = add nuw nsw i32 %70, %50
%72 = tail call i32 %2(i32 %71)
%73 = sub i32 %72, %71
%74 = add i32 %73, -32768
%75 = icmp ult i32 %74, -65535
br i1 %75, label %60, label %76
76: ; preds = %65
%77 = and i32 %73, 65535
%78 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %77, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%79 = or i32 %54, 2
%80 = add nuw nsw i32 %79, %50
%81 = tail call i32 %2(i32 %80)
%82 = sub i32 %81, %80
%83 = add i32 %82, -32768
%84 = icmp ult i32 %83, -65535
br i1 %84, label %60, label %85
85: ; preds = %76
%86 = and i32 %82, 65535
%87 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%88 = or i32 %54, 3
%89 = add nuw nsw i32 %88, %50
%90 = tail call i32 %2(i32 %89)
%91 = sub i32 %90, %89
%92 = add i32 %91, -32768
%93 = icmp ult i32 %92, -65535
br i1 %93, label %60, label %94
94: ; preds = %85
%95 = and i32 %91, 65535
%96 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %95, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%97 = or i32 %54, 4
%98 = add nuw nsw i32 %97, %50
%99 = tail call i32 %2(i32 %98)
%100 = sub i32 %99, %98
%101 = add i32 %100, -32768
%102 = icmp ult i32 %101, -65535
br i1 %102, label %60, label %103
103: ; preds = %94
%104 = and i32 %100, 65535
%105 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %104, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%106 = or i32 %54, 5
%107 = add nuw nsw i32 %106, %50
%108 = tail call i32 %2(i32 %107)
%109 = sub i32 %108, %107
%110 = add i32 %109, -32768
%111 = icmp ult i32 %110, -65535
br i1 %111, label %60, label %112
112: ; preds = %103
%113 = and i32 %109, 65535
%114 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %113, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%115 = or i32 %54, 6
%116 = add nuw nsw i32 %115, %50
%117 = tail call i32 %2(i32 %116)
%118 = sub i32 %117, %116
%119 = add i32 %118, -32768
%120 = icmp ult i32 %119, -65535
br i1 %120, label %60, label %121
121: ; preds = %112
%122 = and i32 %118, 65535
%123 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %122, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0))
%124 = or i32 %54, 7
%125 = add nuw nsw i32 %124, %50
%126 = tail call i32 %2(i32 %125)
%127 = sub i32 %126, %125
%128 = add i32 %127, -32768
%129 = icmp ult i32 %128, -65535
br i1 %129, label %60, label %130
130: ; preds = %121
%131 = and i32 %127, 65535
%132 = icmp ult i32 %124, 255
%133 = select i1 %132, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0)
%134 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0), i32 %131, i8* %133)
%135 = or i32 %54, 7
%136 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %54, i32 %135)
%137 = add nuw nsw i32 %52, 1
%138 = icmp eq i32 %137, 32
br i1 %138, label %139, label %51
139: ; preds = %130
%140 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i64 3, i64 1, i32* %7)
%141 = tail call i32 @fputc(i32 10, i32* %7)
br label %142
142: ; preds = %41, %139
%143 = add nuw nsw i64 %42, 1
%144 = icmp eq i64 %143, 4352
br i1 %144, label %145, label %41
145: ; preds = %142
%146 = add i32 %38, 1
%147 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.17, i64 0, i64 0), i8* %1, i32 %146)
br label %148
148: ; preds = %145, %173
%149 = phi i32 [ 0, %145 ], [ %174, %173 ]
%150 = and i32 %149, 3
%151 = icmp eq i32 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %148
%153 = tail call i64 @fwrite(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i64 2, i64 1, i32* %7)
br label %154
154: ; preds = %152, %148
%155 = zext i32 %149 to i64
%156 = getelementptr inbounds [4352 x i32], [4352 x i32]* %5, i64 0, i64 %155
%157 = load i32, i32* %156
%158 = icmp eq i32 %157, 0
br i1 %158, label %161, label %159
159: ; preds = %154
%160 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.18, i64 0, i64 0), i8* %1, i32 %149)
br label %163
161: ; preds = %154
%162 = tail call i64 @fwrite(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.19, i64 0, i64 0), i64 8, i64 1, i32* %7)
br label %163
163: ; preds = %161, %159
%164 = icmp ult i32 %149, %38
%165 = select i1 %164, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.14, i64 0, i64 0)
%166 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.20, i64 0, i64 0), i8* %165)
%167 = icmp eq i32 %150, 3
%168 = icmp eq i32 %149, %38
%169 = select i1 %167, i1 true, i1 %168
br i1 %169, label %170, label %173
170: ; preds = %163
%171 = and i32 %149, -4
%172 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %7, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.15, i64 0, i64 0), i32 %171, i32 %149)
br label %173
173: ; preds = %163, %170
%174 = add i32 %149, 1
%175 = icmp ugt i32 %174, %38
br i1 %175, label %176, label %148
176: ; preds = %173
%177 = tail call i64 @fwrite(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.16, i64 0, i64 0), i64 3, i64 1, i32* %7)
%178 = tail call i32 @fputc(i32 10, i32* %7)
%179 = tail call i64 @ferror(i32* %7)
%180 = icmp eq i64 %179, 0
br i1 %180, label %181, label %184
181: ; preds = %176
%182 = tail call i64 @fclose(i32* %7)
%183 = icmp eq i64 %182, 0
br i1 %183, label %188, label %184
184: ; preds = %181, %176
%185 = load i32*, i32** @stderr
%186 = tail call i32 (i32*, i8*, ...) @fprintf(i32* %185, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.21, i64 0, i64 0), i8* %0)
%187 = tail call i32 @exit(i32 1)
unreachable
188: ; preds = %181
ret void
}