#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 scalar_t__ uint8_t;
typedef scalar_t__ uint64_t;
typedef size_t uint32_t;
typedef int /*<<< orphan*/ fpos_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
size_t crc32(size_t, scalar_t__ const *, size_t);
scalar_t__ fclose(int /*<<< orphan*/ *);
scalar_t__ ferror(int /*<<< orphan*/ *);
scalar_t__ fgetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
size_t fread(scalar_t__ const **, int, int, int /*<<< orphan*/ *);
scalar_t__ fread_8(scalar_t__ *, int /*<<< orphan*/ *);
scalar_t__ fread_le32(size_t *, int /*<<< orphan*/ *);
scalar_t__ fread_le64(scalar_t__ *, int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ fsetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
size_t fwrite(scalar_t__ const **, int, size_t, int /*<<< orphan*/ *);
scalar_t__ fwrite_8(scalar_t__, int /*<<< orphan*/ *);
scalar_t__ fwrite_le32(size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ pexit(char *);
size_t strtoul(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  const char *infile, *outfile;
  FILE *in, *out;
  static const uint8_t buf[4096];
  size_t elems;
  uint8_t properties;
  uint32_t dictsize;
  uint64_t datasize;
  uint32_t magic = 0xfeed1281L;
  uint32_t reclength = 0;
  fpos_t reclengthpos;
  uint32_t loadaddress = 0;
  uint32_t type = 0x075a0201L;
  uint32_t checksum = 0;
  uint32_t compsize = 0;
  fpos_t compsizepos;
  uint32_t datasize32 = 0;
  uint32_t datacrc32 = crc32(0, 0, 0);
  uint32_t entry = 0;
  if (argc != 5)
    usage();
  loadaddress = strtoul(argv[1], 0, 0);
  entry = strtoul(argv[2], 0, 0);
  infile = argv[3];
  outfile = argv[4];
  in = fopen(infile, "rb");
  if (!in)
    pexit("fopen");
  out = fopen(outfile, "w+b");
  if (!out)
    pexit("fopen");
  if (fread_8(&properties, in))
    pexit("fread");
  if (fread_le32(&dictsize, in))
    pexit("fread");
  if (fread_le64(&datasize, in))
    pexit("fread");
  if (fwrite_le32(magic, out))
    pexit("fwrite");
  if (fgetpos(out, &reclengthpos))
    pexit("fgetpos");
  if (fwrite_le32(reclength, out))
    pexit("fwrite");
  if (fwrite_le32(loadaddress, out))
    pexit("fwrite");
  if (fwrite_le32(type, out))
    pexit("fwrite");
  if (fgetpos(out, &compsizepos))
    pexit("fgetpos");
  if (fwrite_le32(compsize, out))
    pexit("fwrite");
  datasize32 = (uint32_t)datasize;
  if (fwrite_le32(datasize32, out))
    pexit("fwrite");
  if (fwrite_le32(datacrc32, out))
    pexit("fwrite");
  if (fwrite_8(properties, out))
    pexit("fwrite");
  if (fwrite_le32(dictsize, out))
    pexit("fwrite");
  if (fwrite_le32(0, out))
    pexit("fwrite");
  while (0 < (elems = fread(&buf, sizeof buf[0], sizeof buf, in))) {
    compsize += elems;
    if (elems != fwrite(&buf, sizeof buf[0], elems, out))
      pexit("fwrite");
    datacrc32 = crc32(datacrc32, buf, elems);
  }
  if (ferror(in))
    pexit("fread");
  fclose(in);
  reclength = compsize + 24;
  if (fsetpos(out, &reclengthpos))
    pexit("fsetpos");
  if (fwrite_le32(reclength, out))
    pexit("fwrite");
  if (fsetpos(out, &compsizepos))
    pexit("fsetpos");
  if (fwrite_le32(compsize, out))
    pexit("fwrite");
  if (fwrite_le32(datasize32, out))
    pexit("fwrite");
  if (fwrite_le32(datacrc32, out))
    pexit("fwrite");
  checksum += reclength;
  checksum += loadaddress;
  do {
    checksum += (((type) >> 0) & 0x000000FF);
    checksum += (((type) >> 8) & 0x000000FF);
    checksum += (((type) >> 16) & 0x000000FF);
    checksum += (((type) >> 24) & 0x000000FF);
  } while (0);
  do {
    checksum += (((compsize) >> 0) & 0x000000FF);
    checksum += (((compsize) >> 8) & 0x000000FF);
    checksum += (((compsize) >> 16) & 0x000000FF);
    checksum += (((compsize) >> 24) & 0x000000FF);
  } while (0);
  do {
    checksum += (((datasize32) >> 0) & 0x000000FF);
    checksum += (((datasize32) >> 8) & 0x000000FF);
    checksum += (((datasize32) >> 16) & 0x000000FF);
    checksum += (((datasize32) >> 24) & 0x000000FF);
  } while (0);
  do {
    checksum += (((datacrc32) >> 0) & 0x000000FF);
    checksum += (((datacrc32) >> 8) & 0x000000FF);
    checksum += (((datacrc32) >> 16) & 0x000000FF);
    checksum += (((datacrc32) >> 24) & 0x000000FF);
  } while (0);
  if (fseek(out, 0, SEEK_CUR))
    pexit("fseek");
  while (0 < (elems = fread(&buf, sizeof buf[0], sizeof buf, out))) {
    size_t i;
    for (i = 0; i < elems; ++i)
      checksum += buf[i];
  }
  if (ferror(out))
    pexit("fread");
  if (fseek(out, 0, SEEK_CUR))
    pexit("fseek");
  checksum = ~checksum + 1;
  if (fwrite_le32(checksum, out))
    pexit("fwrite");
  if (fwrite_le32(0, out))
    pexit("fwrite");
  if (fwrite_le32(entry, out))
    pexit("fwrite");
  if (fclose(out))
    pexit("fclose");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xfeed1281,%eax
mov    %rax,-0x58(%rbp)
movq   $0x0,-0x60(%rbp)
movq   $0x0,-0x70(%rbp)
movq   $0x75a0201,-0x78(%rbp)
07
movq   $0x0,-0x80(%rbp)
movq   $0x0,-0x88(%rbp)
movq   $0x0,-0x98(%rbp)
xor    %eax,%eax
mov    %eax,%edx
mov    %rdx,%rdi
mov    %rdx,%rsi
call   1050 <crc32@plt>
mov    %rax,-0xa0(%rbp)
movq   $0x0,-0xa8(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     129a <main+0x8a>
mov    $0x0,%al
call   10c0 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1110 <strtoul@plt>
mov    %rax,-0x70(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   1110 <strtoul@plt>
mov    %rax,-0xa8(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
lea    0x8d16(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    130a <main+0xfa>
lea    0x8cfe(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x20(%rbp),%rdi
lea    0x8cf4(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1335 <main+0x125>
lea    0x8cd3(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x28(%rbp),%rsi
lea    -0x40(%rbp),%rdi
call   10e0 <fread_8@plt>
cmp    $0x0,%rax
je     1358 <main+0x148>
lea    0x8cba(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x28(%rbp),%rsi
lea    -0x48(%rbp),%rdi
call   1080 <fread_le32@plt>
cmp    $0x0,%rax
je     137b <main+0x16b>
lea    0x8c97(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x28(%rbp),%rsi
lea    -0x50(%rbp),%rdi
call   10a0 <fread_le64@plt>
cmp    $0x0,%rax
je     139e <main+0x18e>
lea    0x8c74(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x58(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     13c1 <main+0x1b1>
lea    0x8c57(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rdi
lea    -0x64(%rbp),%rsi
call   1090 <fgetpos@plt>
cmp    $0x0,%rax
je     13e4 <main+0x1d4>
lea    0x8c3b(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x60(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1407 <main+0x1f7>
lea    0x8c11(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x70(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     142a <main+0x21a>
lea    0x8bee(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x78(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     144d <main+0x23d>
lea    0x8bcb(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rdi
lea    -0x8c(%rbp),%rsi
call   1090 <fgetpos@plt>
cmp    $0x0,%rax
je     1473 <main+0x263>
lea    0x8bac(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x88(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1499 <main+0x289>
lea    0x8b7f(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x50(%rbp),%rax
mov    %rax,-0x98(%rbp)
mov    -0x98(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     14ca <main+0x2ba>
lea    0x8b4e(%rip),%rdi
call   1130 <pexit@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     14f0 <main+0x2e0>
lea    0x8b28(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x40(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   10d0 <fwrite_8@plt>
cmp    $0x0,%rax
je     1513 <main+0x303>
lea    0x8b05(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x48(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1536 <main+0x326>
lea    0x8ae2(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1559 <main+0x349>
lea    0x8abf(%rip),%rdi
call   1130 <pexit@plt>
jmp    155e <main+0x34e>
mov    -0x28(%rbp),%rcx
lea    0xa97(%rip),%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
call   1040 <fread@plt>
mov    %rax,%rcx
mov    %rcx,-0x38(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jae    1602 <main+0x3f2>
mov    -0x38(%rbp),%rax
add    -0x88(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xa4a(%rip),%rdi
mov    $0x8,%esi
call   1120 <fwrite@plt>
mov    %rax,%rcx
mov    -0xb8(%rbp),%rax
cmp    %rcx,%rax
je     15df <main+0x3cf>
lea    0x8a39(%rip),%rdi
call   1130 <pexit@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x38(%rbp),%rdx
lea    0xa0f(%rip),%rsi
call   1050 <crc32@plt>
mov    %rax,-0xa0(%rbp)
jmp    155e <main+0x34e>
mov    -0x28(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     1621 <main+0x411>
lea    0x89f1(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x28(%rbp),%rdi
call   1060 <fclose@plt>
mov    -0x88(%rbp),%rax
add    $0x18,%rax
mov    %rax,-0x60(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x64(%rbp),%rsi
call   1100 <fsetpos@plt>
cmp    $0x0,%rax
je     165c <main+0x44c>
lea    0x89cb(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x60(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     167f <main+0x46f>
lea    0x8999(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rdi
lea    -0x8c(%rbp),%rsi
call   1100 <fsetpos@plt>
cmp    $0x0,%rax
je     16a5 <main+0x495>
lea    0x8982(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x88(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     16cb <main+0x4bb>
lea    0x894d(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x98(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     16f1 <main+0x4e1>
lea    0x8927(%rip),%rdi
call   1130 <pexit@plt>
mov    -0xa0(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1717 <main+0x507>
lea    0x8901(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x60(%rbp),%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x70(%rbp),%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%rax
shr    $0x0,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x78(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
jmp    178c <main+0x57c>
mov    -0x88(%rbp),%rax
shr    $0x0,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x88(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x88(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x88(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
jmp    17f5 <main+0x5e5>
mov    -0x98(%rbp),%rax
shr    $0x0,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x98(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x98(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x98(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
jmp    185e <main+0x64e>
mov    -0xa0(%rbp),%rax
shr    $0x0,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0xa0(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0xa0(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0xa0(%rbp),%rax
shr    $0x18,%rax
and    $0xff,%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x30(%rbp),%rdi
mov    0xa71b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10b0 <fseek@plt>
cmp    $0x0,%rax
je     18ec <main+0x6dc>
lea    0x8743(%rip),%rdi
call   1130 <pexit@plt>
jmp    18f1 <main+0x6e1>
mov    -0x30(%rbp),%rcx
lea    0x704(%rip),%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
call   1040 <fread@plt>
mov    %rax,%rcx
mov    %rcx,-0x38(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jae    196f <main+0x75f>
movq   $0x0,-0xb0(%rbp)
mov    -0xb0(%rbp),%rax
cmp    -0x38(%rbp),%rax
jae    196a <main+0x75a>
mov    -0xb0(%rbp),%rcx
lea    0x6b9(%rip),%rax
mov    (%rax,%rcx,8),%rax
add    -0x80(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0xb0(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0xb0(%rbp)
jmp    1928 <main+0x718>
jmp    18f1 <main+0x6e1>
mov    -0x30(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     198e <main+0x77e>
lea    0x8684(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rdi
mov    0xa64f(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10b0 <fseek@plt>
cmp    $0x0,%rax
je     19b8 <main+0x7a8>
lea    0x8677(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x80(%rbp),%rax
xor    $0xffffffffffffffff,%rax
add    $0x1,%rax
mov    %rax,-0x80(%rbp)
mov    -0x80(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     19eb <main+0x7db>
lea    0x862d(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1a0e <main+0x7fe>
lea    0x860a(%rip),%rdi
call   1130 <pexit@plt>
mov    -0xa8(%rbp),%rdi
mov    -0x30(%rbp),%rsi
call   1070 <fwrite_le32@plt>
cmp    $0x0,%rax
je     1a34 <main+0x824>
lea    0x85e4(%rip),%rdi
call   1130 <pexit@plt>
mov    -0x30(%rbp),%rdi
call   1060 <fclose@plt>
cmp    $0x0,%rax
je     1a53 <main+0x843>
lea    0x85e2(%rip),%rdi
call   1130 <pexit@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%rbp
mov    %edi,%r14d
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1050 <crc32@plt>
mov    %rax,%r13
cmp    $0x5,%r14d
je     123f <main+0x2f>
xor    %eax,%eax
call   10c0 <usage@plt>
mov    0x8(%rbp),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1110 <strtoul@plt>
mov    %rax,%rbx
mov    0x10(%rbp),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1110 <strtoul@plt>
mov    %rax,0x28(%rsp)
mov    0x18(%rbp),%rdi
mov    0x20(%rbp),%rbp
lea    0x8d90(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
jne    128b <main+0x7b>
lea    0x8d7d(%rip),%rdi
call   1130 <pexit@plt>
lea    0x8d77(%rip),%rsi
mov    %rbp,%rdi
call   10f0 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
jne    12ae <main+0x9e>
lea    0x8d5a(%rip),%rdi
call   1130 <pexit@plt>
lea    0x40(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   10e0 <fread_8@plt>
test   %rax,%rax
je     12ce <main+0xbe>
lea    0x8d44(%rip),%rdi
call   1130 <pexit@plt>
lea    0x38(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   1080 <fread_le32@plt>
test   %rax,%rax
je     12ee <main+0xde>
lea    0x8d24(%rip),%rdi
call   1130 <pexit@plt>
lea    0x30(%rsp),%rdi
mov    0x8(%rsp),%rsi
call   10a0 <fread_le64@plt>
test   %rax,%rax
je     130e <main+0xfe>
lea    0x8d04(%rip),%rdi
call   1130 <pexit@plt>
mov    $0xfeed1281,%edi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     132c <main+0x11c>
lea    0x8cec(%rip),%rdi
call   1130 <pexit@plt>
lea    0x14(%rsp),%rsi
mov    %r15,%rdi
call   1090 <fgetpos@plt>
test   %rax,%rax
je     134a <main+0x13a>
lea    0x8cd5(%rip),%rdi
call   1130 <pexit@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1365 <main+0x155>
lea    0x8cb3(%rip),%rdi
call   1130 <pexit@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1381 <main+0x171>
lea    0x8c97(%rip),%rdi
call   1130 <pexit@plt>
mov    $0x75a0201,%edi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     139f <main+0x18f>
lea    0x8c79(%rip),%rdi
call   1130 <pexit@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1090 <fgetpos@plt>
test   %rax,%rax
je     13bd <main+0x1ad>
lea    0x8c62(%rip),%rdi
call   1130 <pexit@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     13d8 <main+0x1c8>
lea    0x8c40(%rip),%rdi
call   1130 <pexit@plt>
mov    0x30(%rsp),%rdi
mov    %rdi,0x18(%rsp)
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     13fb <main+0x1eb>
lea    0x8c1d(%rip),%rdi
call   1130 <pexit@plt>
mov    %r13,%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1417 <main+0x207>
lea    0x8c01(%rip),%rdi
call   1130 <pexit@plt>
mov    0x40(%rsp),%rdi
mov    %r15,%rsi
call   10d0 <fwrite_8@plt>
test   %rax,%rax
je     1435 <main+0x225>
lea    0x8be3(%rip),%rdi
call   1130 <pexit@plt>
mov    0x38(%rsp),%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1453 <main+0x243>
lea    0x8bc5(%rip),%rdi
call   1130 <pexit@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     146e <main+0x25e>
lea    0x8baa(%rip),%rdi
call   1130 <pexit@plt>
mov    %rbx,0x20(%rsp)
lea    0xb86(%rip),%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    0x8(%rsp),%rcx
call   1040 <fread@plt>
test   %rax,%rax
je     1505 <main+0x2f5>
mov    %rax,%r12
xor    %ebx,%ebx
lea    0xb61(%rip),%rbp
lea    0x8b6d(%rip),%r14
jmp    14e3 <main+0x2d3>
nopl   0x0(%rax,%rax,1)
add    %r12,%rbx
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1050 <crc32@plt>
mov    %rax,%r13
mov    %rbp,%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    0x8(%rsp),%rcx
call   1040 <fread@plt>
mov    %rax,%r12
test   %rax,%rax
je     1507 <main+0x2f7>
mov    %rbp,%rdi
mov    $0x8,%esi
mov    %r12,%rdx
mov    %r15,%rcx
call   1120 <fwrite@plt>
cmp    %rax,%r12
je     14b0 <main+0x2a0>
mov    %r14,%rdi
call   1130 <pexit@plt>
jmp    14b0 <main+0x2a0>
xor    %ebx,%ebx
mov    0x8(%rsp),%rdi
call   1030 <ferror@plt>
test   %rax,%rax
je     1522 <main+0x312>
lea    0x8af0(%rip),%rdi
call   1130 <pexit@plt>
mov    0x8(%rsp),%rdi
call   1060 <fclose@plt>
lea    0x18(%rbx),%rbp
lea    0x14(%rsp),%rsi
mov    %r15,%rdi
call   1100 <fsetpos@plt>
test   %rax,%rax
je     154e <main+0x33e>
lea    0x8ad9(%rip),%rdi
call   1130 <pexit@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     156a <main+0x35a>
lea    0x8aae(%rip),%rdi
call   1130 <pexit@plt>
lea    0x10(%rsp),%rsi
mov    %r15,%rdi
call   1100 <fsetpos@plt>
test   %rax,%rax
je     1588 <main+0x378>
lea    0x8a9f(%rip),%rdi
call   1130 <pexit@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     15a4 <main+0x394>
lea    0x8a74(%rip),%rdi
call   1130 <pexit@plt>
mov    0x18(%rsp),%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     15c2 <main+0x3b2>
lea    0x8a56(%rip),%rdi
call   1130 <pexit@plt>
mov    %rbp,0x8(%rsp)
mov    %r13,%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     15e3 <main+0x3d3>
lea    0x8a35(%rip),%rdi
call   1130 <pexit@plt>
movzbl %bl,%r8d
movzbl %bh,%eax
mov    %rax,%r14
mov    %ebx,%edx
shr    $0x10,%edx
movzbl %dl,%r9d
shr    $0x18,%ebx
mov    0x18(%rsp),%rdx
movzbl %dl,%r10d
movzbl %dh,%ebp
mov    %edx,%esi
shr    $0x10,%esi
movzbl %sil,%esi
shr    $0x18,%edx
mov    %r13,%rax
movzbl %al,%r11d
movzbl %ah,%edi
mov    %eax,%ecx
shr    $0x10,%ecx
movzbl %cl,%ecx
shr    $0x18,%eax
mov    %rax,%r12
mov    0x20(%rsp),%rax
add    %r10,%rax
add    %rbp,%rax
add    %rsi,%rax
add    %rdx,%rax
add    0x8(%rsp),%rax
add    %r8,%rax
add    %r14,%rax
add    %r9,%rax
add    %rbx,%rax
mov    %rax,%rbx
add    %r11,%rbx
add    %rdi,%rbx
add    %rcx,%rbx
mov    0xa98a(%rip),%rbp
mov    0x0(%rbp),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
test   %rax,%rax
je     167c <main+0x46c>
lea    0x89b3(%rip),%rdi
call   1130 <pexit@plt>
add    %r12,%rbx
add    $0x64,%rbx
lea    0x976(%rip),%r12
nopw   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
test   %rax,%rax
je     17b2 <main+0x5a2>
cmp    $0x4,%rax
jae    16c0 <main+0x4b0>
xor    %ecx,%ecx
jmp    178f <main+0x57f>
nopl   0x0(%rax,%rax,1)
mov    %rax,%rcx
and    $0xfffffffffffffffc,%rcx
movq   %rbx,%xmm0
lea    -0x4(%rcx),%rsi
mov    %rsi,%rdi
shr    $0x2,%rdi
add    $0x1,%rdi
mov    %edi,%edx
and    $0x3,%edx
cmp    $0xc,%rsi
jae    16f0 <main+0x4e0>
pxor   %xmm1,%xmm1
xor    %esi,%esi
jmp    1741 <main+0x531>
xchg   %ax,%ax
and    $0xfffffffffffffffc,%rdi
pxor   %xmm1,%xmm1
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
paddq  (%r12,%rsi,8),%xmm0
paddq  0x10(%r12,%rsi,8),%xmm1
paddq  0x20(%r12,%rsi,8),%xmm0
paddq  0x30(%r12,%rsi,8),%xmm1
paddq  0x40(%r12,%rsi,8),%xmm0
paddq  0x50(%r12,%rsi,8),%xmm1
paddq  0x60(%r12,%rsi,8),%xmm0
paddq  0x70(%r12,%rsi,8),%xmm1
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdi
jne    1700 <main+0x4f0>
test   %rdx,%rdx
je     1774 <main+0x564>
lea    (%r12,%rsi,8),%rsi
add    $0x10,%rsi
shl    $0x5,%rdx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
paddq  -0x10(%rsi,%rdi,1),%xmm0
paddq  (%rsi,%rdi,1),%xmm1
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1760 <main+0x550>
paddq  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddq  %xmm0,%xmm1
movq   %xmm1,%rbx
cmp    %rcx,%rax
je     1690 <main+0x480>
sub    %rcx,%rax
lea    (%r12,%rcx,8),%rcx
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
add    (%rcx,%rdx,8),%rbx
add    $0x1,%rdx
cmp    %rdx,%rax
jne    17a0 <main+0x590>
jmp    1690 <main+0x480>
mov    %r15,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
je     17cb <main+0x5bb>
lea    0x8847(%rip),%rdi
call   1130 <pexit@plt>
mov    0x0(%rbp),%edx
mov    %r15,%rdi
xor    %esi,%esi
call   10b0 <fseek@plt>
test   %rax,%rax
je     17e9 <main+0x5d9>
lea    0x8846(%rip),%rdi
call   1130 <pexit@plt>
neg    %rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1808 <main+0x5f8>
lea    0x8810(%rip),%rdi
call   1130 <pexit@plt>
xor    %edi,%edi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1823 <main+0x613>
lea    0x87f5(%rip),%rdi
call   1130 <pexit@plt>
mov    0x28(%rsp),%rdi
mov    %r15,%rsi
call   1070 <fwrite_le32@plt>
test   %rax,%rax
je     1841 <main+0x631>
lea    0x87d7(%rip),%rdi
call   1130 <pexit@plt>
mov    %r15,%rdi
call   1060 <fclose@plt>
test   %rax,%rax
je     185a <main+0x64a>
lea    0x87db(%rip),%rdi
call   1130 <pexit@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
@main.buf = internal constant [4096 x i64] zeroinitializer
@.str = [3 x i8] c"rb\00"
@.str.1 = [6 x i8] c"fopen\00"
@.str.2 = [4 x i8] c"w+b\00"
@.str.3 = [6 x i8] c"fread\00"
@.str.4 = [7 x i8] c"fwrite\00"
@.str.5 = [8 x i8] c"fgetpos\00"
@.str.6 = [8 x i8] c"fsetpos\00"
@SEEK_CUR = global i32 0
@.str.7 = [6 x i8] c"fseek\00"
@.str.8 = [7 x i8] c"fclose\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
%8 = bitcast i64* %3 to i8*
%9 = bitcast i64* %4 to i8*
%10 = bitcast i64* %5 to i8*
%11 = bitcast i32* %6 to i8*
%12 = bitcast i32* %7 to i8*
%13 = tail call i64 @crc32(i64 0, i64* null, i64 0)
%14 = icmp eq i32 %0, 5
br i1 %14, label %17, label %15
15: ; preds = %2
%16 = tail call i32 (...) @usage()
br label %17
17: ; preds = %15, %2
%18 = getelementptr inbounds i8*, i8** %1, i64 1
%19 = load i8*, i8** %18
%20 = tail call i64 @strtoul(i8* %19, i32 0, i32 0)
%21 = getelementptr inbounds i8*, i8** %1, i64 2
%22 = load i8*, i8** %21
%23 = tail call i64 @strtoul(i8* %22, i32 0, i32 0)
%24 = getelementptr inbounds i8*, i8** %1, i64 3
%25 = load i8*, i8** %24
%26 = getelementptr inbounds i8*, i8** %1, i64 4
%27 = load i8*, i8** %26
%28 = tail call i32* @fopen(i8* %25, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %32
30: ; preds = %17
%31 = tail call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %32
32: ; preds = %30, %17
%33 = tail call i32* @fopen(i8* %27, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %37
35: ; preds = %32
%36 = tail call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %37
37: ; preds = %35, %32
%38 = call i64 @fread_8(i64* %3, i32* %28)
%39 = icmp eq i64 %38, 0
br i1 %39, label %42, label %40
40: ; preds = %37
%41 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
%43 = call i64 @fread_le32(i64* %4, i32* %28)
%44 = icmp eq i64 %43, 0
br i1 %44, label %47, label %45
45: ; preds = %42
%46 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %47
47: ; preds = %45, %42
%48 = call i64 @fread_le64(i64* %5, i32* %28)
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %47
%51 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %52
52: ; preds = %50, %47
%53 = call i64 @fwrite_le32(i64 4276949633, i32* %33)
%54 = icmp eq i64 %53, 0
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %57
57: ; preds = %55, %52
%58 = call i64 @fgetpos(i32* %33, i32* %6)
%59 = icmp eq i64 %58, 0
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %62
62: ; preds = %60, %57
%63 = call i64 @fwrite_le32(i64 0, i32* %33)
%64 = icmp eq i64 %63, 0
br i1 %64, label %67, label %65
65: ; preds = %62
%66 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %67
67: ; preds = %65, %62
%68 = call i64 @fwrite_le32(i64 %20, i32* %33)
%69 = icmp eq i64 %68, 0
br i1 %69, label %72, label %70
70: ; preds = %67
%71 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %72
72: ; preds = %70, %67
%73 = call i64 @fwrite_le32(i64 123339265, i32* %33)
%74 = icmp eq i64 %73, 0
br i1 %74, label %77, label %75
75: ; preds = %72
%76 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %77
77: ; preds = %75, %72
%78 = call i64 @fgetpos(i32* %33, i32* %7)
%79 = icmp eq i64 %78, 0
br i1 %79, label %82, label %80
80: ; preds = %77
%81 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
br label %82
82: ; preds = %80, %77
%83 = call i64 @fwrite_le32(i64 0, i32* %33)
%84 = icmp eq i64 %83, 0
br i1 %84, label %87, label %85
85: ; preds = %82
%86 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %87
87: ; preds = %85, %82
%88 = load i64, i64* %5
%89 = call i64 @fwrite_le32(i64 %88, i32* %33)
%90 = icmp eq i64 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %87
%92 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %93
93: ; preds = %91, %87
%94 = call i64 @fwrite_le32(i64 %13, i32* %33)
%95 = icmp eq i64 %94, 0
br i1 %95, label %98, label %96
96: ; preds = %93
%97 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %98
98: ; preds = %96, %93
%99 = load i64, i64* %3
%100 = call i64 @fwrite_8(i64 %99, i32* %33)
%101 = icmp eq i64 %100, 0
br i1 %101, label %104, label %102
102: ; preds = %98
%103 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %104
104: ; preds = %102, %98
%105 = load i64, i64* %4
%106 = call i64 @fwrite_le32(i64 %105, i32* %33)
%107 = icmp eq i64 %106, 0
br i1 %107, label %110, label %108
108: ; preds = %104
%109 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %110
110: ; preds = %108, %104
%111 = call i64 @fwrite_le32(i64 0, i32* %33)
%112 = icmp eq i64 %111, 0
br i1 %112, label %115, label %113
113: ; preds = %110
%114 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %115
115: ; preds = %113, %110
%116 = call i64 @fread(i64** bitcast ([4096 x i64]* @main.buf to i64**), i32 8, i32 32768, i32* %28)
%117 = icmp eq i64 %116, 0
br i1 %117, label %131, label %118
118: ; preds = %115, %127
%119 = phi i64 [ %129, %127 ], [ %116, %115 ]
%120 = phi i64 [ %128, %127 ], [ %13, %115 ]
%121 = phi i64 [ %122, %127 ], [ 0, %115 ]
%122 = add i64 %119, %121
%123 = call i64 @fwrite(i64** bitcast ([4096 x i64]* @main.buf to i64**), i32 8, i64 %119, i32* %33)
%124 = icmp eq i64 %119, %123
br i1 %124, label %127, label %125
125: ; preds = %118
%126 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %127
127: ; preds = %125, %118
%128 = call i64 @crc32(i64 %120, i64* getelementptr inbounds ([4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 0), i64 %119)
%129 = call i64 @fread(i64** bitcast ([4096 x i64]* @main.buf to i64**), i32 8, i32 32768, i32* %28)
%130 = icmp eq i64 %129, 0
br i1 %130, label %131, label %118
131: ; preds = %127, %115
%132 = phi i64 [ 0, %115 ], [ %122, %127 ]
%133 = phi i64 [ %13, %115 ], [ %128, %127 ]
%134 = call i64 @ferror(i32* %28)
%135 = icmp eq i64 %134, 0
br i1 %135, label %138, label %136
136: ; preds = %131
%137 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %138
138: ; preds = %136, %131
%139 = call i64 @fclose(i32* %28)
%140 = add i64 %132, 24
%141 = call i64 @fsetpos(i32* %33, i32* %6)
%142 = icmp eq i64 %141, 0
br i1 %142, label %145, label %143
143: ; preds = %138
%144 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %145
145: ; preds = %143, %138
%146 = call i64 @fwrite_le32(i64 %140, i32* %33)
%147 = icmp eq i64 %146, 0
br i1 %147, label %150, label %148
148: ; preds = %145
%149 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %150
150: ; preds = %148, %145
%151 = call i64 @fsetpos(i32* %33, i32* %7)
%152 = icmp eq i64 %151, 0
br i1 %152, label %155, label %153
153: ; preds = %150
%154 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %155
155: ; preds = %153, %150
%156 = call i64 @fwrite_le32(i64 %132, i32* %33)
%157 = icmp eq i64 %156, 0
br i1 %157, label %160, label %158
158: ; preds = %155
%159 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %160
160: ; preds = %158, %155
%161 = call i64 @fwrite_le32(i64 %88, i32* %33)
%162 = icmp eq i64 %161, 0
br i1 %162, label %165, label %163
163: ; preds = %160
%164 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %165
165: ; preds = %163, %160
%166 = call i64 @fwrite_le32(i64 %133, i32* %33)
%167 = icmp eq i64 %166, 0
br i1 %167, label %170, label %168
168: ; preds = %165
%169 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %170
170: ; preds = %168, %165
%171 = and i64 %132, 255
%172 = lshr i64 %132, 8
%173 = and i64 %172, 255
%174 = lshr i64 %132, 16
%175 = and i64 %174, 255
%176 = lshr i64 %132, 24
%177 = and i64 %176, 255
%178 = and i64 %88, 255
%179 = lshr i64 %88, 8
%180 = and i64 %179, 255
%181 = lshr i64 %88, 16
%182 = and i64 %181, 255
%183 = lshr i64 %88, 24
%184 = and i64 %183, 255
%185 = and i64 %133, 255
%186 = lshr i64 %133, 8
%187 = and i64 %186, 255
%188 = lshr i64 %133, 16
%189 = and i64 %188, 255
%190 = lshr i64 %133, 24
%191 = and i64 %190, 255
%192 = add i64 %20, 100
%193 = add i64 %192, %178
%194 = add i64 %193, %180
%195 = add i64 %194, %182
%196 = add i64 %195, %184
%197 = add i64 %196, %140
%198 = add i64 %197, %171
%199 = add i64 %198, %173
%200 = add i64 %199, %175
%201 = add i64 %200, %177
%202 = add i64 %201, %185
%203 = add i64 %202, %187
%204 = add i64 %203, %189
%205 = add i64 %204, %191
%206 = load i32, i32* @SEEK_CUR
%207 = call i64 @fseek(i32* %33, i32 0, i32 %206)
%208 = icmp eq i64 %207, 0
br i1 %208, label %211, label %209
209: ; preds = %170
%210 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %211
211: ; preds = %209, %170
%212 = call i64 @fread(i64** bitcast ([4096 x i64]* @main.buf to i64**), i32 8, i32 32768, i32* %33)
%213 = icmp eq i64 %212, 0
br i1 %213, label %315, label %218
214: ; preds = %307, %298
%215 = phi i64 [ %302, %298 ], [ %312, %307 ]
%216 = call i64 @fread(i64** bitcast ([4096 x i64]* @main.buf to i64**), i32 8, i32 32768, i32* %33)
%217 = icmp eq i64 %216, 0
br i1 %217, label %315, label %218
218: ; preds = %211, %214
%219 = phi i64 [ %216, %214 ], [ %212, %211 ]
%220 = phi i64 [ %215, %214 ], [ %205, %211 ]
%221 = icmp ult i64 %219, 4
br i1 %221, label %304, label %222
222: ; preds = %218
%223 = and i64 %219, -4
%224 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %220, i64 0
%225 = add i64 %223, -4
%226 = lshr exact i64 %225, 2
%227 = add nuw nsw i64 %226, 1
%228 = and i64 %227, 3
%229 = icmp ult i64 %225, 12
br i1 %229, label %275, label %230
230: ; preds = %222
%231 = and i64 %227, 9223372036854775804
br label %232
232: ; preds = %232, %230
%233 = phi i64 [ 0, %230 ], [ %272, %232 ]
%234 = phi <2 x i64> [ %224, %230 ], [ %270, %232 ]
%235 = phi <2 x i64> [ zeroinitializer, %230 ], [ %271, %232 ]
%236 = phi i64 [ 0, %230 ], [ %273, %232 ]
%237 = getelementptr inbounds [4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 %233
%238 = bitcast i64* %237 to <2 x i64>*
%239 = load <2 x i64>, <2 x i64>* %238
%240 = getelementptr inbounds i64, i64* %237, i64 2
%241 = bitcast i64* %240 to <2 x i64>*
%242 = load <2 x i64>, <2 x i64>* %241
%243 = add <2 x i64> %239, %234
%244 = add <2 x i64> %242, %235
%245 = or i64 %233, 4
%246 = getelementptr inbounds [4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 %245
%247 = bitcast i64* %246 to <2 x i64>*
%248 = load <2 x i64>, <2 x i64>* %247
%249 = getelementptr inbounds i64, i64* %246, i64 2
%250 = bitcast i64* %249 to <2 x i64>*
%251 = load <2 x i64>, <2 x i64>* %250
%252 = add <2 x i64> %248, %243
%253 = add <2 x i64> %251, %244
%254 = or i64 %233, 8
%255 = getelementptr inbounds [4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 %254
%256 = bitcast i64* %255 to <2 x i64>*
%257 = load <2 x i64>, <2 x i64>* %256
%258 = getelementptr inbounds i64, i64* %255, i64 2
%259 = bitcast i64* %258 to <2 x i64>*
%260 = load <2 x i64>, <2 x i64>* %259
%261 = add <2 x i64> %257, %252
%262 = add <2 x i64> %260, %253
%263 = or i64 %233, 12
%264 = getelementptr inbounds [4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 %263
%265 = bitcast i64* %264 to <2 x i64>*
%266 = load <2 x i64>, <2 x i64>* %265
%267 = getelementptr inbounds i64, i64* %264, i64 2
%268 = bitcast i64* %267 to <2 x i64>*
%269 = load <2 x i64>, <2 x i64>* %268
%270 = add <2 x i64> %266, %261
%271 = add <2 x i64> %269, %262
%272 = add nuw i64 %233, 16
%273 = add nuw i64 %236, 4
%274 = icmp eq i64 %273, %231
br i1 %274, label %275, label %232
275: ; preds = %232, %222
%276 = phi <2 x i64> [ undef, %222 ], [ %270, %232 ]
%277 = phi <2 x i64> [ undef, %222 ], [ %271, %232 ]
%278 = phi i64 [ 0, %222 ], [ %272, %232 ]
%279 = phi <2 x i64> [ %224, %222 ], [ %270, %232 ]
%280 = phi <2 x i64> [ zeroinitializer, %222 ], [ %271, %232 ]
%281 = icmp eq i64 %228, 0
br i1 %281, label %298, label %282
282: ; preds = %275, %282
%283 = phi i64 [ %295, %282 ], [ %278, %275 ]
%284 = phi <2 x i64> [ %293, %282 ], [ %279, %275 ]
%285 = phi <2 x i64> [ %294, %282 ], [ %280, %275 ]
%286 = phi i64 [ %296, %282 ], [ 0, %275 ]
%287 = getelementptr inbounds [4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 %283
%288 = bitcast i64* %287 to <2 x i64>*
%289 = load <2 x i64>, <2 x i64>* %288
%290 = getelementptr inbounds i64, i64* %287, i64 2
%291 = bitcast i64* %290 to <2 x i64>*
%292 = load <2 x i64>, <2 x i64>* %291
%293 = add <2 x i64> %289, %284
%294 = add <2 x i64> %292, %285
%295 = add nuw i64 %283, 4
%296 = add i64 %286, 1
%297 = icmp eq i64 %296, %228
br i1 %297, label %298, label %282
298: ; preds = %282, %275
%299 = phi <2 x i64> [ %276, %275 ], [ %293, %282 ]
%300 = phi <2 x i64> [ %277, %275 ], [ %294, %282 ]
%301 = add <2 x i64> %300, %299
%302 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %301)
%303 = icmp eq i64 %219, %223
br i1 %303, label %214, label %304
304: ; preds = %218, %298
%305 = phi i64 [ 0, %218 ], [ %223, %298 ]
%306 = phi i64 [ %220, %218 ], [ %302, %298 ]
br label %307
307: ; preds = %304, %307
%308 = phi i64 [ %313, %307 ], [ %305, %304 ]
%309 = phi i64 [ %312, %307 ], [ %306, %304 ]
%310 = getelementptr inbounds [4096 x i64], [4096 x i64]* @main.buf, i64 0, i64 %308
%311 = load i64, i64* %310
%312 = add i64 %311, %309
%313 = add nuw i64 %308, 1
%314 = icmp eq i64 %313, %219
br i1 %314, label %214, label %307
315: ; preds = %214, %211
%316 = phi i64 [ %205, %211 ], [ %215, %214 ]
%317 = call i64 @ferror(i32* %33)
%318 = icmp eq i64 %317, 0
br i1 %318, label %321, label %319
319: ; preds = %315
%320 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %321
321: ; preds = %319, %315
%322 = load i32, i32* @SEEK_CUR
%323 = call i64 @fseek(i32* %33, i32 0, i32 %322)
%324 = icmp eq i64 %323, 0
br i1 %324, label %327, label %325
325: ; preds = %321
%326 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %327
327: ; preds = %325, %321
%328 = sub i64 0, %316
%329 = call i64 @fwrite_le32(i64 %328, i32* %33)
%330 = icmp eq i64 %329, 0
br i1 %330, label %333, label %331
331: ; preds = %327
%332 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %333
333: ; preds = %331, %327
%334 = call i64 @fwrite_le32(i64 0, i32* %33)
%335 = icmp eq i64 %334, 0
br i1 %335, label %338, label %336
336: ; preds = %333
%337 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %338
338: ; preds = %336, %333
%339 = call i64 @fwrite_le32(i64 %23, i32* %33)
%340 = icmp eq i64 %339, 0
br i1 %340, label %343, label %341
341: ; preds = %338
%342 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %343
343: ; preds = %341, %338
%344 = call i64 @fclose(i32* %33)
%345 = icmp eq i64 %344, 0
br i1 %345, label %348, label %346
346: ; preds = %343
%347 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %348
348: ; preds = %346, %343
ret i32 0
}