#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*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int compressOrNot(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *, int, int,
                  int);
int /*<<< orphan*/ copydata(int /*<<< orphan*/ *, int, int /*<<< orphan*/ *,
                            int /*<<< orphan*/, int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
int getlong(int /*<<< orphan*/ *);
int getushort(int /*<<< orphan*/ *);
char *malloc(int);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/ *);
int /*<<< orphan*/ putlong(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ putshort(int /*<<< orphan*/ *, int);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
char *strrchr(char *, char);
void woff(char *filename, char *metafile, char *privfile, int major,
          int minor) {
  int flavour, num_tabs, test;
  char *start, *ext, *outname;
  int filelen, len;
  int i, j;
  FILE *sfnt, *woff, *meta, *priv;
  int compLen, uncompLen, newoffset;
  int tag, checksum, offset;
  int tab_start, here;
  sfnt = fopen(filename, "rb");
  if (sfnt == NULL) {
    fprintf(stderr, "Can't open %s\n", filename);
    return;
  }
  start = strrchr(filename, '/');
  if (start == NULL)
    start = filename;
  else
    ++start;
  ext = strrchr(start, '.');
  if (ext == NULL)
    ext = start + strlen(start);
  fseek(sfnt, 0, SEEK_END);
  filelen = ftell(sfnt);
  rewind(sfnt);
  flavour = getlong(sfnt);
  num_tabs = getushort(sfnt);
  for (i = 1, j = 0; 2 * i <= num_tabs; i <<= 1, ++j)
    ;
  test = getushort(sfnt);
  if (test != 16 * i) {
    fprintf(stderr, "%s has an invalid sfnt header (1) %d!=%d\n", filename,
            test, 16 * i);
    fclose(sfnt);
    return;
  }
  test = getushort(sfnt);
  if (test != j) {
    fprintf(stderr, "%s has an invalid sfnt header (2) %d!=%d\n", filename,
            test, j);
    fclose(sfnt);
    return;
  }
  test = getushort(sfnt);
  if (test != (num_tabs - i) * 16) {
    fprintf(stderr, "%s has an invalid sfnt header (3) %d!=%d\n", filename,
            test, (num_tabs - i) * 16);
    fclose(sfnt);
    return;
  }
  outname = malloc(strlen(start) + 20);
  strcpy(outname, start);
  strcpy(outname + (ext - start), ".woff");
  woff = fopen(outname, "wb");
  if (woff == NULL) {
    fprintf(stderr, "Failed to create output file: %s\n", outname);
    fclose(sfnt);
    free(outname);
    return;
  }
  putlong(woff, ((('w') << 24) | (('O') << 16) | (('F') << 8) | ('F')));
  putlong(woff, flavour);
  putlong(woff, 0);
  putshort(woff, num_tabs);
  putshort(woff, 0);
  putlong(woff, filelen);
  putshort(woff, major);
  putshort(woff, minor);
  putlong(woff, 0);
  putlong(woff, 0);
  putlong(woff, 0);
  putlong(woff, 0);
  putlong(woff, 0);
  tab_start = ftell(woff);
  for (i = 0; i < 5 * num_tabs; ++i)
    putlong(woff, 0);
  for (i = 0; i < num_tabs; ++i) {
    tag = getlong(sfnt);
    checksum = getlong(sfnt);
    offset = getlong(sfnt);
    uncompLen = getlong(sfnt);
    here = ftell(sfnt);
    newoffset = ftell(woff);
    compLen = compressOrNot(woff, newoffset, sfnt, offset, uncompLen, 0);
    if ((ftell(woff) & 3) != 0) {
      if (ftell(woff) & 1)
        putc('\0', woff);
      if (ftell(woff) & 2)
        putshort(woff, 0);
    }
    fseek(sfnt, here, SEEK_SET);
    fseek(woff, tab_start, SEEK_SET);
    putlong(woff, tag);
    putlong(woff, newoffset);
    putlong(woff, compLen);
    putlong(woff, uncompLen);
    putlong(woff, checksum);
    tab_start = ftell(woff);
    fseek(woff, 0, SEEK_END);
  }
  fclose(sfnt);
  meta = NULL;
  if (metafile != NULL) {
    meta = fopen(metafile, "w");
    if (meta == NULL)
      fprintf(stderr, "Failed to open meta data file: %s\n", metafile);
  }
  if (meta != NULL) {
    newoffset = ftell(woff);
    fseek(meta, 0, SEEK_END);
    uncompLen = ftell(meta);
    rewind(meta);
    compLen = compressOrNot(woff, newoffset, meta, 0, uncompLen, 1);
    if (privfile != NULL && (ftell(woff) & 3) != 0) {
      if (ftell(woff) & 1)
        putc('\0', woff);
      if (ftell(woff) & 2)
        putshort(woff, 0);
    }
    fseek(woff, 24, SEEK_SET);
    putlong(woff, newoffset);
    putlong(woff, compLen);
    putlong(woff, uncompLen);
    fseek(woff, 0, SEEK_END);
    fclose(meta);
  }
  priv = NULL;
  if (privfile != NULL) {
    priv = fopen(privfile, "w");
    if (priv == NULL)
      fprintf(stderr, "Failed to open private file: %s\n", privfile);
  }
  if (priv != NULL) {
    newoffset = ftell(woff);
    fseek(priv, 0, SEEK_END);
    uncompLen = ftell(priv);
    rewind(priv);
    copydata(woff, newoffset, priv, 0, uncompLen);
    fseek(woff, 36, SEEK_SET);
    putlong(woff, newoffset);
    putlong(woff, uncompLen);
    fseek(woff, 0, SEEK_END);
    fclose(priv);
  }
  len = ftell(woff);
  fseek(woff, 8, SEEK_SET);
  putlong(woff, len);
  fclose(woff);
}


x86 assembly (clang, -O0):
<woff>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xdb7(%rip),%rsi
call   1130 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jne    127d <woff+0x5d>
mov    0x2d74(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xd92(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1a0c <woff+0x7ec>
mov    -0x8(%rbp),%rdi
mov    $0x2f,%esi
call   1090 <strrchr@plt>
mov    %rax,-0x38(%rbp)
cmpq   $0x0,-0x38(%rbp)
jne    12a7 <woff+0x87>
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    12b3 <woff+0x93>
mov    -0x38(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x2e,%esi
call   1090 <strrchr@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12f7 <woff+0xd7>
mov    -0x38(%rbp),%rax
mov    %rax,-0xa0(%rbp)
mov    -0x38(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%ecx
mov    -0xa0(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x40(%rbp)
mov    -0x60(%rbp),%rdi
mov    0x2ce6(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    -0x60(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x60(%rbp),%rdi
call   1080 <rewind@plt>
mov    -0x60(%rbp),%rdi
call   1120 <getlong@plt>
mov    %eax,-0x24(%rbp)
mov    -0x60(%rbp),%rdi
call   1100 <getushort@plt>
mov    %eax,-0x28(%rbp)
movl   $0x1,-0x54(%rbp)
movl   $0x0,-0x58(%rbp)
mov    -0x54(%rbp),%eax
shl    $0x1,%eax
cmp    -0x28(%rbp),%eax
jg     1371 <woff+0x151>
jmp    135a <woff+0x13a>
mov    -0x54(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x54(%rbp)
mov    -0x58(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x58(%rbp)
jmp    1346 <woff+0x126>
mov    -0x60(%rbp),%rdi
call   1100 <getushort@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x54(%rbp),%ecx
shl    $0x4,%ecx
cmp    %ecx,%eax
je     13c2 <woff+0x1a2>
mov    0x2c43(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x54(%rbp),%r8d
shl    $0x4,%r8d
lea    0xc65(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
call   1060 <fclose@plt>
jmp    1a0c <woff+0x7ec>
mov    -0x60(%rbp),%rdi
call   1100 <getushort@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x58(%rbp),%eax
je     140a <woff+0x1ea>
mov    0x2bf7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x58(%rbp),%r8d
lea    0xc47(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
call   1060 <fclose@plt>
jmp    1a0c <woff+0x7ec>
mov    -0x60(%rbp),%rdi
call   1100 <getushort@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
mov    -0x28(%rbp),%ecx
sub    -0x54(%rbp),%ecx
shl    $0x4,%ecx
cmp    %ecx,%eax
je     1462 <woff+0x242>
mov    0x2ba7(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%r8d
sub    -0x54(%rbp),%r8d
shl    $0x4,%r8d
lea    0xc19(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
call   1060 <fclose@plt>
jmp    1a0c <woff+0x7ec>
mov    -0x38(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,%edi
add    $0x14,%edi
call   10e0 <malloc@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%rsi
call   1050 <strcpy@plt>
mov    -0x48(%rbp),%rdi
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
sub    %rcx,%rax
add    %rax,%rdi
lea    0xbf1(%rip),%rsi
call   1050 <strcpy@plt>
mov    -0x48(%rbp),%rdi
lea    0xbe7(%rip),%rsi
call   1130 <fopen@plt>
mov    %rax,-0x68(%rbp)
cmpq   $0x0,-0x68(%rbp)
jne    14f5 <woff+0x2d5>
mov    0x2b0e(%rip),%rax
mov    (%rax),%edi
mov    -0x48(%rbp),%rdx
lea    0xbc2(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
mov    -0x60(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x48(%rbp),%rdi
call   1030 <free@plt>
jmp    1a0c <woff+0x7ec>
mov    -0x68(%rbp),%rdi
mov    $0x774f4646,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x24(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x28(%rbp),%esi
call   1040 <putshort@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1040 <putshort@plt>
mov    -0x68(%rbp),%rdi
mov    -0x4c(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x1c(%rbp),%esi
call   1040 <putshort@plt>
mov    -0x68(%rbp),%rdi
mov    -0x20(%rbp),%esi
call   1040 <putshort@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x94(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
imul   $0x5,-0x28(%rbp),%ecx
cmp    %ecx,%eax
jge    15ca <woff+0x3aa>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    15a2 <woff+0x382>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x28(%rbp),%eax
jge    1757 <woff+0x537>
mov    -0x60(%rbp),%rdi
call   1120 <getlong@plt>
mov    %eax,-0x88(%rbp)
mov    -0x60(%rbp),%rdi
call   1120 <getlong@plt>
mov    %eax,-0x8c(%rbp)
mov    -0x60(%rbp),%rdi
call   1120 <getlong@plt>
mov    %eax,-0x90(%rbp)
mov    -0x60(%rbp),%rdi
call   1120 <getlong@plt>
mov    %eax,-0x80(%rbp)
mov    -0x60(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x98(%rbp)
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x84(%rbp)
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    -0x60(%rbp),%rdx
mov    -0x90(%rbp),%ecx
mov    -0x80(%rbp),%r8d
xor    %r9d,%r9d
call   1140 <compressOrNot@plt>
mov    %eax,-0x7c(%rbp)
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
and    $0x3,%eax
cmp    $0x0,%eax
je     16b1 <woff+0x491>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     168c <woff+0x46c>
mov    -0x68(%rbp),%rsi
xor    %edi,%edi
call   10a0 <putc@plt>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     16ac <woff+0x48c>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1040 <putshort@plt>
jmp    16b1 <woff+0x491>
mov    -0x60(%rbp),%rdi
mov    -0x98(%rbp),%esi
mov    0x290e(%rip),%rax
mov    (%rax),%edx
call   10f0 <fseek@plt>
mov    -0x68(%rbp),%rdi
mov    -0x94(%rbp),%esi
mov    0x28f6(%rip),%rax
mov    (%rax),%edx
call   10f0 <fseek@plt>
mov    -0x68(%rbp),%rdi
mov    -0x88(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x7c(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x80(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x8c(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x94(%rbp)
mov    -0x68(%rbp),%rdi
mov    0x28a8(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    15d1 <woff+0x3b1>
mov    -0x60(%rbp),%rdi
call   1060 <fclose@plt>
movq   $0x0,-0x70(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     17b2 <woff+0x592>
mov    -0x10(%rbp),%rdi
lea    0x93d(%rip),%rsi
call   1130 <fopen@plt>
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x70(%rbp)
jne    17ad <woff+0x58d>
mov    0x283f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0x917(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    17b2 <woff+0x592>
cmpq   $0x0,-0x70(%rbp)
je     18d7 <woff+0x6b7>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x84(%rbp)
mov    -0x70(%rbp),%rdi
mov    0x2811(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    -0x70(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x80(%rbp)
mov    -0x70(%rbp),%rdi
call   1080 <rewind@plt>
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    -0x70(%rbp),%rdx
mov    -0x80(%rbp),%r8d
xor    %ecx,%ecx
mov    $0x1,%r9d
call   1140 <compressOrNot@plt>
mov    %eax,-0x7c(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     187c <woff+0x65c>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
and    $0x3,%eax
cmp    $0x0,%eax
je     187c <woff+0x65c>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
and    $0x1,%eax
cmp    $0x0,%eax
je     1857 <woff+0x637>
mov    -0x68(%rbp),%rsi
xor    %edi,%edi
call   10a0 <putc@plt>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
and    $0x2,%eax
cmp    $0x0,%eax
je     1877 <woff+0x657>
mov    -0x68(%rbp),%rdi
xor    %esi,%esi
call   1040 <putshort@plt>
jmp    187c <woff+0x65c>
mov    -0x68(%rbp),%rdi
mov    0x2749(%rip),%rax
mov    (%rax),%edx
mov    $0x18,%esi
call   10f0 <fseek@plt>
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x7c(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x80(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    0x2723(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    -0x70(%rbp),%rdi
call   1060 <fclose@plt>
movq   $0x0,-0x78(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1929 <woff+0x709>
mov    -0x18(%rbp),%rdi
lea    0x7c6(%rip),%rsi
call   1130 <fopen@plt>
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x78(%rbp)
jne    1924 <woff+0x704>
mov    0x26c8(%rip),%rax
mov    (%rax),%edi
mov    -0x18(%rbp),%rdx
lea    0x7c3(%rip),%rsi
mov    $0x0,%al
call   10b0 <fprintf@plt>
jmp    1929 <woff+0x709>
cmpq   $0x0,-0x78(%rbp)
je     19d4 <woff+0x7b4>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x84(%rbp)
mov    -0x78(%rbp),%rdi
mov    0x269a(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    -0x78(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x80(%rbp)
mov    -0x78(%rbp),%rdi
call   1080 <rewind@plt>
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
mov    -0x78(%rbp),%rdx
mov    -0x80(%rbp),%r8d
xor    %ecx,%ecx
call   10d0 <copydata@plt>
mov    -0x68(%rbp),%rdi
mov    0x2640(%rip),%rax
mov    (%rax),%edx
mov    $0x24,%esi
call   10f0 <fseek@plt>
mov    -0x68(%rbp),%rdi
mov    -0x84(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    -0x80(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
mov    0x2626(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    -0x78(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x68(%rbp),%rdi
call   10c0 <ftell@plt>
mov    %eax,-0x50(%rbp)
mov    -0x68(%rbp),%rdi
mov    0x25e5(%rip),%rax
mov    (%rax),%edx
mov    $0x8,%esi
call   10f0 <fseek@plt>
mov    -0x68(%rbp),%rdi
mov    -0x50(%rbp),%esi
call   1110 <putlong@plt>
mov    -0x68(%rbp),%rdi
call   1060 <fclose@plt>
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<woff>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %r8d,%r14d
mov    %ecx,%r12d
mov    %rdx,%rbx
mov    %rsi,%rbp
mov    %rdi,%r15
lea    0xdbc(%rip),%rsi
call   1130 <fopen@plt>
test   %rax,%rax
je     16ab <woff+0x48b>
mov    %rax,%r13
mov    %r12d,0x8(%rsp)
mov    %r14d,0xc(%rsp)
mov    %rbp,0x20(%rsp)
mov    %rbx,0x18(%rsp)
mov    %r15,%rdi
mov    $0x2f,%esi
call   1090 <strrchr@plt>
lea    0x1(%rax),%rbp
test   %rax,%rax
cmove  %r15,%rbp
mov    %rbp,%rdi
mov    $0x2e,%esi
call   1090 <strrchr@plt>
test   %rax,%rax
jne    12a0 <woff+0x80>
mov    %rbp,%rdi
call   1070 <strlen@plt>
cltq
add    %rbp,%rax
mov    %rax,0x10(%rsp)
mov    0x2d3c(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    %r13,%rdi
call   10c0 <ftell@plt>
mov    %eax,0x4(%rsp)
mov    %r13,%rdi
call   1080 <rewind@plt>
mov    %r13,%rdi
call   1120 <getlong@plt>
mov    %eax,(%rsp)
mov    %r13,%rdi
call   1100 <getushort@plt>
mov    %eax,%ebx
mov    $0x1,%eax
mov    $0xffffffff,%r14d
nopl   0x0(%rax)
mov    %eax,%r12d
lea    (%r12,%r12,1),%eax
add    $0x1,%r14d
cmp    %ebx,%eax
jle    12f0 <woff+0xd0>
mov    %r13,%rdi
call   1100 <getushort@plt>
mov    %r12d,%r8d
shl    $0x4,%r8d
cmp    %r8d,%eax
jne    16d3 <woff+0x4b3>
mov    %r13,%rdi
call   1100 <getushort@plt>
cmp    %r14d,%eax
jne    16ea <woff+0x4ca>
mov    %r13,%rdi
call   1100 <getushort@plt>
mov    %ebx,%r8d
sub    %r12d,%r8d
shl    $0x4,%r8d
cmp    %r8d,%eax
jne    171f <woff+0x4ff>
mov    %rbp,%rdi
call   1070 <strlen@plt>
lea    0x14(%rax),%edi
call   10e0 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbp,%rsi
call   1050 <strcpy@plt>
mov    0x10(%rsp),%rdi
sub    %rbp,%rdi
add    %r14,%rdi
lea    0xd1d(%rip),%rsi
call   1050 <strcpy@plt>
lea    0xd17(%rip),%rsi
mov    %r14,%rdi
call   1130 <fopen@plt>
test   %rax,%rax
je     1731 <woff+0x511>
mov    %rax,%r15
mov    %rax,%rdi
mov    $0x774f4646,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    (%rsp),%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1040 <putshort@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <putshort@plt>
mov    %r15,%rdi
mov    0x4(%rsp),%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    0x8(%rsp),%esi
call   1040 <putshort@plt>
mov    %r15,%rdi
mov    0xc(%rsp),%esi
call   1040 <putshort@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   %ebx,%ebx
jle    1457 <woff+0x237>
mov    %eax,%r14d
lea    (%rbx,%rbx,4),%eax
cmp    $0x2,%eax
mov    $0x1,%ebp
cmovge %eax,%ebp
nopl   0x0(%rax)
mov    %r15,%rdi
xor    %esi,%esi
call   1110 <putlong@plt>
add    $0xffffffff,%ebp
jne    1440 <woff+0x220>
test   %ebx,%ebx
jg     1605 <woff+0x3e5>
mov    %r13,%rdi
call   1060 <fclose@plt>
mov    0x20(%rsp),%rbx
test   %rbx,%rbx
mov    0x18(%rsp),%rbp
je     1783 <woff+0x563>
lea    0xc42(%rip),%rsi
mov    %rbx,%rdi
call   1130 <fopen@plt>
test   %rax,%rax
je     1769 <woff+0x549>
mov    %rax,%r12
mov    %r15,%rdi
call   10c0 <ftell@plt>
mov    %eax,%r14d
mov    0x2b49(%rip),%rax
mov    (%rax),%edx
mov    %r12,%rdi
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    %r12,%rdi
call   10c0 <ftell@plt>
mov    %eax,%r13d
mov    %r12,%rdi
call   1080 <rewind@plt>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %r12,%rdx
xor    %ecx,%ecx
mov    %r13d,%r8d
mov    $0x1,%r9d
call   1140 <compressOrNot@plt>
mov    %eax,%ebx
test   %rbp,%rbp
je     1516 <woff+0x2f6>
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   $0x3,%al
je     1516 <woff+0x2f6>
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   $0x1,%al
je     1500 <woff+0x2e0>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <putc@plt>
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   $0x2,%al
je     1516 <woff+0x2f6>
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <putshort@plt>
mov    0x2ab3(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    $0x18,%esi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    %r13d,%esi
call   1110 <putlong@plt>
mov    0x2a95(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    %r12,%rdi
call   1060 <fclose@plt>
mov    0x18(%rsp),%rbp
jmp    1783 <woff+0x563>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x2a49(%rip),%rbp
mov    0x0(%rbp),%edx
mov    %r13,%rdi
mov    (%rsp),%esi
call   10f0 <fseek@plt>
mov    0x0(%rbp),%edx
mov    %r15,%rdi
mov    0x10(%rsp),%esi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    0x8(%rsp),%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    %r12d,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    0x4(%rsp),%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    0xc(%rsp),%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
call   10c0 <ftell@plt>
mov    %eax,%r14d
mov    0x29f8(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10f0 <fseek@plt>
add    $0xffffffff,%ebx
je     1457 <woff+0x237>
mov    %r14d,0x10(%rsp)
mov    %r13,%rdi
call   1120 <getlong@plt>
mov    %eax,0x8(%rsp)
mov    %r13,%rdi
call   1120 <getlong@plt>
mov    %eax,0xc(%rsp)
mov    %r13,%rdi
call   1120 <getlong@plt>
mov    %eax,%ebp
mov    %r13,%rdi
call   1120 <getlong@plt>
mov    %eax,%r14d
mov    %r13,%rdi
call   10c0 <ftell@plt>
mov    %eax,(%rsp)
mov    %r15,%rdi
call   10c0 <ftell@plt>
mov    %eax,%r12d
mov    %r15,%rdi
mov    %eax,%esi
mov    %r13,%rdx
mov    %ebp,%ecx
mov    %r14d,%r8d
xor    %r9d,%r9d
call   1140 <compressOrNot@plt>
mov    %eax,0x4(%rsp)
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   $0x3,%al
je     1580 <woff+0x360>
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   $0x1,%al
je     168c <woff+0x46c>
xor    %edi,%edi
mov    %r15,%rsi
call   10a0 <putc@plt>
mov    %r15,%rdi
call   10c0 <ftell@plt>
test   $0x2,%al
je     1580 <woff+0x360>
mov    %r15,%rdi
xor    %esi,%esi
call   1040 <putshort@plt>
jmp    1580 <woff+0x360>
mov    0x2926(%rip),%rax
mov    (%rax),%edi
lea    0x948(%rip),%rsi
mov    %r15,%rdx
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    10b0 <fprintf@plt>
mov    0x28fe(%rip),%rcx
mov    (%rcx),%edi
lea    0x92f(%rip),%rsi
mov    %r15,%rdx
mov    %eax,%ecx
jmp    1702 <woff+0x4e2>
mov    0x28e7(%rip),%rcx
mov    (%rcx),%edi
lea    0x942(%rip),%rsi
mov    %r15,%rdx
mov    %eax,%ecx
mov    %r14d,%r8d
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %r13,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1060 <fclose@plt>
mov    0x28b2(%rip),%rcx
mov    (%rcx),%edi
lea    0x937(%rip),%rsi
jmp    16e3 <woff+0x4c3>
mov    0x28a0(%rip),%rax
mov    (%rax),%edi
lea    0x958(%rip),%rsi
mov    %r14,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %r13,%rdi
call   1060 <fclose@plt>
mov    %r14,%rdi
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    0x2868(%rip),%rax
mov    (%rax),%edi
lea    0x944(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
test   %rbp,%rbp
je     1849 <woff+0x629>
lea    0x928(%rip),%rsi
mov    %rbp,%rdi
call   1130 <fopen@plt>
test   %rax,%rax
je     182f <woff+0x60f>
mov    %rax,%rbx
mov    %r15,%rdi
call   10c0 <ftell@plt>
mov    %eax,%r14d
mov    0x282f(%rip),%r12
mov    (%r12),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    %rbx,%rdi
call   10c0 <ftell@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1080 <rewind@plt>
mov    %r15,%rdi
mov    %r14d,%esi
mov    %rbx,%rdx
xor    %ecx,%ecx
mov    %ebp,%r8d
call   10d0 <copydata@plt>
mov    0x27dd(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    $0x24,%esi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    %r14d,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
mov    %ebp,%esi
call   1110 <putlong@plt>
mov    (%r12),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10f0 <fseek@plt>
mov    %rbx,%rdi
call   1060 <fclose@plt>
jmp    1849 <woff+0x629>
mov    0x27a2(%rip),%rax
mov    (%rax),%edi
lea    0x8a1(%rip),%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %r15,%rdi
call   10c0 <ftell@plt>
mov    %eax,%ebx
mov    0x2776(%rip),%rax
mov    (%rax),%edx
mov    %r15,%rdi
mov    $0x8,%esi
call   10f0 <fseek@plt>
mov    %r15,%rdi
mov    %ebx,%esi
call   1110 <putlong@plt>
mov    %r15,%rdi
jmp    170c <woff+0x4ec>

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

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@stderr = global i32 0
@.str.1 = [15 x i8] c"Can't open %s\0A\00"
@SEEK_END = global i32 0
@.str.2 = [42 x i8] c"%s has an invalid sfnt header (1) %d!=%d\0A\00"
@.str.3 = [42 x i8] c"%s has an invalid sfnt header (2) %d!=%d\0A\00"
@.str.4 = [42 x i8] c"%s has an invalid sfnt header (3) %d!=%d\0A\00"
@.str.5 = [6 x i8] c".woff\00"
@.str.6 = [3 x i8] c"wb\00"
@.str.7 = [34 x i8] c"Failed to create output file: %s\0A\00"
@SEEK_SET = global i32 0
@.str.8 = [2 x i8] c"w\00"
@.str.9 = [35 x i8] c"Failed to open meta data file: %s\0A\00"
@.str.10 = [33 x i8] c"Failed to open private file: %s\0A\00"
define void @woff(i8* %0, i8* %1, i8* %2, i32 %3, i32 %4) {
%6 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%7 = icmp eq i32* %6, null
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %212
11: ; preds = %5
%12 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%13 = icmp eq i8* %12, null
%14 = getelementptr inbounds i8, i8* %12, i64 1
%15 = select i1 %13, i8* %0, i8* %14
%16 = tail call i8* @strrchr(i8* dereferenceable(1) %15, i8 signext 46)
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %22
18: ; preds = %11
%19 = tail call i32 @strlen(i8* %15)
%20 = sext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %15, i64 %20
br label %22
22: ; preds = %18, %11
%23 = phi i8* [ %21, %18 ], [ %16, %11 ]
%24 = load i32, i32* @SEEK_END
%25 = tail call i32 @fseek(i32* %6, i32 0, i32 %24)
%26 = tail call i32 @ftell(i32* %6)
%27 = tail call i32 @rewind(i32* %6)
%28 = tail call i32 @getlong(i32* %6)
%29 = tail call i32 @getushort(i32* %6)
br label %30
30: ; preds = %30, %22
%31 = phi i32 [ 0, %22 ], [ %35, %30 ]
%32 = phi i32 [ 1, %22 ], [ %33, %30 ]
%33 = shl i32 %32, 1
%34 = icmp sgt i32 %33, %29
%35 = add nuw nsw i32 %31, 1
br i1 %34, label %36, label %30
36: ; preds = %30
%37 = tail call i32 @getushort(i32* %6)
%38 = shl nsw i32 %32, 4
%39 = icmp eq i32 %37, %38
br i1 %39, label %44, label %40
40: ; preds = %36
%41 = load i32, i32* @stderr
%42 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.2, i64 0, i64 0), i8* %0, i32 %37, i32 %38)
%43 = tail call i32 @fclose(i32* %6)
br label %212
44: ; preds = %36
%45 = tail call i32 @getushort(i32* %6)
%46 = icmp eq i32 %45, %31
br i1 %46, label %51, label %47
47: ; preds = %44
%48 = load i32, i32* @stderr
%49 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.3, i64 0, i64 0), i8* %0, i32 %45, i32 %31)
%50 = tail call i32 @fclose(i32* %6)
br label %212
51: ; preds = %44
%52 = tail call i32 @getushort(i32* %6)
%53 = sub nsw i32 %29, %32
%54 = shl nsw i32 %53, 4
%55 = icmp eq i32 %52, %54
br i1 %55, label %60, label %56
56: ; preds = %51
%57 = load i32, i32* @stderr
%58 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.4, i64 0, i64 0), i8* %0, i32 %52, i32 %54)
%59 = tail call i32 @fclose(i32* %6)
br label %212
60: ; preds = %51
%61 = tail call i32 @strlen(i8* %15)
%62 = add nsw i32 %61, 20
%63 = tail call i8* @malloc(i32 %62)
%64 = tail call i32 @strcpy(i8* %63, i8* %15)
%65 = ptrtoint i8* %23 to i64
%66 = ptrtoint i8* %15 to i64
%67 = sub i64 %65, %66
%68 = getelementptr inbounds i8, i8* %63, i64 %67
%69 = tail call i32 @strcpy(i8* %68, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%70 = tail call i32* @fopen(i8* %63, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0))
%71 = icmp eq i32* %70, null
br i1 %71, label %72, label %77
72: ; preds = %60
%73 = load i32, i32* @stderr
%74 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %73, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.7, i64 0, i64 0), i8* %63)
%75 = tail call i32 @fclose(i32* %6)
%76 = tail call i32 @free(i8* %63)
br label %212
77: ; preds = %60
%78 = tail call i32 @putlong(i32* %70, i32 2001684038)
%79 = tail call i32 @putlong(i32* %70, i32 %28)
%80 = tail call i32 @putlong(i32* %70, i32 0)
%81 = tail call i32 @putshort(i32* %70, i32 %29)
%82 = tail call i32 @putshort(i32* %70, i32 0)
%83 = tail call i32 @putlong(i32* %70, i32 %26)
%84 = tail call i32 @putshort(i32* %70, i32 %3)
%85 = tail call i32 @putshort(i32* %70, i32 %4)
%86 = tail call i32 @putlong(i32* %70, i32 0)
%87 = tail call i32 @putlong(i32* %70, i32 0)
%88 = tail call i32 @putlong(i32* %70, i32 0)
%89 = tail call i32 @putlong(i32* %70, i32 0)
%90 = tail call i32 @putlong(i32* %70, i32 0)
%91 = tail call i32 @ftell(i32* %70)
%92 = icmp sgt i32 %29, 0
br i1 %92, label %93, label %142
93: ; preds = %77
%94 = mul i32 %29, 5
%95 = call i32 @llvm.smax.i32(i32 %94, i32 1)
br label %97
96: ; preds = %97
br i1 %92, label %102, label %142
97: ; preds = %93, %97
%98 = phi i32 [ %100, %97 ], [ 0, %93 ]
%99 = tail call i32 @putlong(i32* %70, i32 0)
%100 = add nuw nsw i32 %98, 1
%101 = icmp eq i32 %100, %95
br i1 %101, label %96, label %97
102: ; preds = %96, %127
%103 = phi i32 [ %137, %127 ], [ %91, %96 ]
%104 = phi i32 [ %140, %127 ], [ 0, %96 ]
%105 = tail call i32 @getlong(i32* %6)
%106 = tail call i32 @getlong(i32* %6)
%107 = tail call i32 @getlong(i32* %6)
%108 = tail call i32 @getlong(i32* %6)
%109 = tail call i32 @ftell(i32* %6)
%110 = tail call i32 @ftell(i32* %70)
%111 = tail call i32 @compressOrNot(i32* %70, i32 %110, i32* %6, i32 %107, i32 %108, i32 0)
%112 = tail call i32 @ftell(i32* %70)
%113 = and i32 %112, 3
%114 = icmp eq i32 %113, 0
br i1 %114, label %127, label %115
115: ; preds = %102
%116 = tail call i32 @ftell(i32* %70)
%117 = and i32 %116, 1
%118 = icmp eq i32 %117, 0
br i1 %118, label %121, label %119
119: ; preds = %115
%120 = tail call i32 @putc(i8 signext 0, i32* %70)
br label %121
121: ; preds = %119, %115
%122 = tail call i32 @ftell(i32* %70)
%123 = and i32 %122, 2
%124 = icmp eq i32 %123, 0
br i1 %124, label %127, label %125
125: ; preds = %121
%126 = tail call i32 @putshort(i32* %70, i32 0)
br label %127
127: ; preds = %121, %125, %102
%128 = load i32, i32* @SEEK_SET
%129 = tail call i32 @fseek(i32* %6, i32 %109, i32 %128)
%130 = load i32, i32* @SEEK_SET
%131 = tail call i32 @fseek(i32* %70, i32 %103, i32 %130)
%132 = tail call i32 @putlong(i32* %70, i32 %105)
%133 = tail call i32 @putlong(i32* %70, i32 %110)
%134 = tail call i32 @putlong(i32* %70, i32 %111)
%135 = tail call i32 @putlong(i32* %70, i32 %108)
%136 = tail call i32 @putlong(i32* %70, i32 %106)
%137 = tail call i32 @ftell(i32* %70)
%138 = load i32, i32* @SEEK_END
%139 = tail call i32 @fseek(i32* %70, i32 0, i32 %138)
%140 = add nuw nsw i32 %104, 1
%141 = icmp eq i32 %140, %29
br i1 %141, label %142, label %102
142: ; preds = %127, %77, %96
%143 = tail call i32 @fclose(i32* %6)
%144 = icmp eq i8* %1, null
br i1 %144, label %184, label %145
145: ; preds = %142
%146 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%147 = icmp eq i32* %146, null
br i1 %147, label %148, label %151
148: ; preds = %145
%149 = load i32, i32* @stderr
%150 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %149, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.9, i64 0, i64 0), i8* %1)
br label %184
151: ; preds = %145
%152 = tail call i32 @ftell(i32* %70)
%153 = load i32, i32* @SEEK_END
%154 = tail call i32 @fseek(i32* %146, i32 0, i32 %153)
%155 = tail call i32 @ftell(i32* %146)
%156 = tail call i32 @rewind(i32* %146)
%157 = tail call i32 @compressOrNot(i32* %70, i32 %152, i32* %146, i32 0, i32 %155, i32 1)
%158 = icmp eq i8* %2, null
br i1 %158, label %175, label %159
159: ; preds = %151
%160 = tail call i32 @ftell(i32* %70)
%161 = and i32 %160, 3
%162 = icmp eq i32 %161, 0
br i1 %162, label %175, label %163
163: ; preds = %159
%164 = tail call i32 @ftell(i32* %70)
%165 = and i32 %164, 1
%166 = icmp eq i32 %165, 0
br i1 %166, label %169, label %167
167: ; preds = %163
%168 = tail call i32 @putc(i8 signext 0, i32* %70)
br label %169
169: ; preds = %167, %163
%170 = tail call i32 @ftell(i32* %70)
%171 = and i32 %170, 2
%172 = icmp eq i32 %171, 0
br i1 %172, label %175, label %173
173: ; preds = %169
%174 = tail call i32 @putshort(i32* %70, i32 0)
br label %175
175: ; preds = %169, %173, %159, %151
%176 = load i32, i32* @SEEK_SET
%177 = tail call i32 @fseek(i32* %70, i32 24, i32 %176)
%178 = tail call i32 @putlong(i32* %70, i32 %152)
%179 = tail call i32 @putlong(i32* %70, i32 %157)
%180 = tail call i32 @putlong(i32* %70, i32 %155)
%181 = load i32, i32* @SEEK_END
%182 = tail call i32 @fseek(i32* %70, i32 0, i32 %181)
%183 = tail call i32 @fclose(i32* %146)
br label %184
184: ; preds = %142, %148, %175
%185 = icmp eq i8* %2, null
br i1 %185, label %206, label %186
186: ; preds = %184
%187 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%188 = icmp eq i32* %187, null
br i1 %188, label %189, label %192
189: ; preds = %186
%190 = load i32, i32* @stderr
%191 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %190, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.10, i64 0, i64 0), i8* %2)
br label %206
192: ; preds = %186
%193 = tail call i32 @ftell(i32* %70)
%194 = load i32, i32* @SEEK_END
%195 = tail call i32 @fseek(i32* %187, i32 0, i32 %194)
%196 = tail call i32 @ftell(i32* %187)
%197 = tail call i32 @rewind(i32* %187)
%198 = tail call i32 @copydata(i32* %70, i32 %193, i32* %187, i32 0, i32 %196)
%199 = load i32, i32* @SEEK_SET
%200 = tail call i32 @fseek(i32* %70, i32 36, i32 %199)
%201 = tail call i32 @putlong(i32* %70, i32 %193)
%202 = tail call i32 @putlong(i32* %70, i32 %196)
%203 = load i32, i32* @SEEK_END
%204 = tail call i32 @fseek(i32* %70, i32 0, i32 %203)
%205 = tail call i32 @fclose(i32* %187)
br label %206
206: ; preds = %184, %189, %192
%207 = tail call i32 @ftell(i32* %70)
%208 = load i32, i32* @SEEK_SET
%209 = tail call i32 @fseek(i32* %70, i32 8, i32 %208)
%210 = tail call i32 @putlong(i32* %70, i32 %207)
%211 = tail call i32 @fclose(i32* %70)
br label %212
212: ; preds = %206, %72, %56, %47, %40, %8
ret void
}