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

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
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__ **, int, int, int /*<<< orphan*/ *);
scalar_t__ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
scalar_t__ fsetpos(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int fwrite(size_t *, int, int, 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;
  uint8_t buf[4096];
  size_t elems;
  uint32_t magic = 0xfeed8112L;
  uint32_t reclength = 0;
  fpos_t reclengthpos;
  uint32_t loadaddress = 0;
  uint32_t checksum = 0;
  uint32_t compsize = 0;
  uint32_t zero = 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 (1 != fwrite(&magic, sizeof magic, 1, out))
    pexit("fwrite");
  if (fgetpos(out, &reclengthpos))
    pexit("fgetpos");
  if (1 != fwrite(&reclength, sizeof reclength, 1, out))
    pexit("fwrite");
  if (1 != fwrite(&loadaddress, sizeof loadaddress, 1, 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");
  }
  if (ferror(in))
    pexit("fread");
  fclose(in);
  reclength = compsize;
  if (fsetpos(out, &reclengthpos))
    pexit("fsetpos");
  if (1 != fwrite(&reclength, sizeof reclength, 1, out))
    pexit("fwrite");
  checksum += reclength;
  checksum += loadaddress;
  if (fseek(out, 4, 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 (1 != fwrite(&checksum, sizeof checksum, 1, out))
    pexit("fwrite");
  if (1 != fwrite(&zero, sizeof zero, 1, out))
    pexit("fwrite");
  if (1 != fwrite(&entry, sizeof entry, 1, out))
    pexit("fwrite");
  if (fclose(out))
    pexit("fclose");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x8090,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xfeed8112,%eax
mov    %rax,-0x8040(%rbp)
movq   $0x0,-0x8048(%rbp)
movq   $0x0,-0x8058(%rbp)
movq   $0x0,-0x8060(%rbp)
movq   $0x0,-0x8068(%rbp)
movq   $0x0,-0x8070(%rbp)
movq   $0x0,-0x8078(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     1228 <main+0x78>
mov    $0x0,%al
call   1080 <usage@plt>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10b0 <strtoul@plt>
mov    %rax,-0x8058(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %edx,%edx
mov    %edx,%esi
call   10b0 <strtoul@plt>
mov    %rax,-0x8078(%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    0xd85(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    129b <main+0xeb>
lea    0xd6d(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x20(%rbp),%rdi
lea    0xd63(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    12c6 <main+0x116>
lea    0xd42(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rcx
lea    -0x8040(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     12fb <main+0x14b>
lea    0xd17(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rdi
lea    -0x804c(%rbp),%rsi
call   1060 <fgetpos@plt>
cmp    $0x0,%rax
je     1321 <main+0x171>
lea    0xcf8(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rcx
lea    -0x8048(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     1356 <main+0x1a6>
lea    0xcbc(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rcx
lea    -0x8058(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     138b <main+0x1db>
lea    0xc87(%rip),%rdi
call   10d0 <pexit@plt>
jmp    1390 <main+0x1e0>
lea    -0x8030(%rbp),%rdi
mov    -0x28(%rbp),%rcx
mov    $0x8,%esi
mov    $0x8000,%edx
call   1040 <fread@plt>
mov    %rax,%rcx
mov    %rcx,-0x8038(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jae    1426 <main+0x276>
mov    -0x8038(%rbp),%rax
add    -0x8068(%rbp),%rax
mov    %rax,-0x8068(%rbp)
mov    -0x8038(%rbp),%rax
mov    %rax,-0x8088(%rbp)
lea    -0x8030(%rbp),%rdi
mov    -0x8038(%rbp),%rax
mov    %eax,%edx
mov    -0x30(%rbp),%rcx
mov    $0x8,%esi
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    -0x8088(%rbp),%rax
movslq %ecx,%rcx
cmp    %rcx,%rax
je     1421 <main+0x271>
lea    0xbf1(%rip),%rdi
call   10d0 <pexit@plt>
jmp    1390 <main+0x1e0>
mov    -0x28(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     1445 <main+0x295>
lea    0xbdc(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x8068(%rbp),%rax
mov    %rax,-0x8048(%rbp)
mov    -0x30(%rbp),%rdi
lea    -0x804c(%rbp),%rsi
call   10a0 <fsetpos@plt>
cmp    $0x0,%rax
je     1482 <main+0x2d2>
lea    0xba5(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rcx
lea    -0x8048(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     14b7 <main+0x307>
lea    0xb5b(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x8048(%rbp),%rax
add    -0x8060(%rbp),%rax
mov    %rax,-0x8060(%rbp)
mov    -0x8058(%rbp),%rax
add    -0x8060(%rbp),%rax
mov    %rax,-0x8060(%rbp)
mov    -0x30(%rbp),%rdi
mov    0x2afc(%rip),%rax
mov    (%rax),%edx
mov    $0x4,%esi
call   1070 <fseek@plt>
cmp    $0x0,%rax
je     150e <main+0x35e>
lea    0xb21(%rip),%rdi
call   10d0 <pexit@plt>
jmp    1513 <main+0x363>
lea    -0x8030(%rbp),%rdi
mov    -0x30(%rbp),%rcx
mov    $0x8,%esi
mov    $0x8000,%edx
call   1040 <fread@plt>
mov    %rax,%rcx
mov    %rcx,-0x8038(%rbp)
xor    %eax,%eax
cmp    %rcx,%rax
jae    159a <main+0x3ea>
movq   $0x0,-0x8080(%rbp)
mov    -0x8080(%rbp),%rax
cmp    -0x8038(%rbp),%rax
jae    1595 <main+0x3e5>
mov    -0x8080(%rbp),%rax
mov    -0x8030(%rbp,%rax,8),%rax
ff
add    -0x8060(%rbp),%rax
mov    %rax,-0x8060(%rbp)
mov    -0x8080(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8080(%rbp)
jmp    154d <main+0x39d>
jmp    1513 <main+0x363>
mov    -0x30(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     15b9 <main+0x409>
lea    0xa68(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rdi
mov    0x2a24(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1070 <fseek@plt>
cmp    $0x0,%rax
je     15e3 <main+0x433>
lea    0xa4c(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x8060(%rbp),%rax
xor    $0xffffffffffffffff,%rax
add    $0x1,%rax
mov    %rax,-0x8060(%rbp)
mov    -0x30(%rbp),%rcx
lea    -0x8060(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     162e <main+0x47e>
lea    0x9e4(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rcx
lea    -0x8070(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     1663 <main+0x4b3>
lea    0x9af(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rcx
lea    -0x8078(%rbp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
call   10c0 <fwrite@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
je     1698 <main+0x4e8>
lea    0x97a(%rip),%rdi
call   10d0 <pexit@plt>
mov    -0x30(%rbp),%rdi
call   1050 <fclose@plt>
cmp    $0x0,%rax
je     16b7 <main+0x507>
lea    0x97e(%rip),%rdi
call   10d0 <pexit@plt>
xor    %eax,%eax
add    $0x8090,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x8048,%rsp
mov    %rsi,%rbx
mov    $0xfeed8112,%eax
mov    %rax,0x38(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
movq   $0x0,0x30(%rsp)
cmp    $0x5,%edi
je     11f5 <main+0x45>
xor    %eax,%eax
call   1080 <usage@plt>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <strtoul@plt>
mov    %rax,0x20(%rsp)
mov    0x10(%rbx),%rdi
xor    %esi,%esi
xor    %edx,%edx
call   10b0 <strtoul@plt>
mov    %rax,0x28(%rsp)
mov    0x18(%rbx),%rdi
mov    0x20(%rbx),%rbx
lea    0xdd8(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r15
test   %rax,%rax
jne    1241 <main+0x91>
lea    0xdc7(%rip),%rdi
call   10d0 <pexit@plt>
lea    0xdc1(%rip),%rsi
mov    %rbx,%rdi
call   1090 <fopen@plt>
mov    %rax,%r14
test   %rax,%rax
jne    1264 <main+0xb4>
lea    0xda4(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x38(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     128c <main+0xdc>
lea    0xd86(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x1c(%rsp),%rsi
mov    %r14,%rdi
call   1060 <fgetpos@plt>
test   %rax,%rax
je     12aa <main+0xfa>
lea    0xd6f(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x8(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     12d2 <main+0x122>
lea    0xd40(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x20(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     12fa <main+0x14a>
lea    0xd18(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x40(%rsp),%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
test   %rax,%rax
je     1373 <main+0x1c3>
mov    %rax,%rbx
xor    %ebp,%ebp
lea    0x40(%rsp),%r12
lea    0xce6(%rip),%r13
jmp    1350 <main+0x1a0>
nopl   0x0(%rax)
add    %rbx,%rbp
mov    %r12,%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    %r15,%rcx
call   1040 <fread@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1375 <main+0x1c5>
mov    %r12,%rdi
mov    $0x8,%esi
mov    %ebx,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cltq
cmp    %rax,%rbx
je     1330 <main+0x180>
mov    %r13,%rdi
call   10d0 <pexit@plt>
jmp    1330 <main+0x180>
xor    %ebp,%ebp
mov    %r15,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
je     138e <main+0x1de>
lea    0xc93(%rip),%rdi
call   10d0 <pexit@plt>
mov    %r15,%rdi
call   1050 <fclose@plt>
mov    %rbp,0x8(%rsp)
lea    0x1c(%rsp),%rsi
mov    %r14,%rdi
call   10a0 <fsetpos@plt>
test   %rax,%rax
je     13b9 <main+0x209>
lea    0xc6e(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x8(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     13e1 <main+0x231>
lea    0xc31(%rip),%rdi
call   10d0 <pexit@plt>
mov    0x8(%rsp),%rbx
mov    %rbx,0x10(%rsp)
add    0x20(%rsp),%rbx
mov    0x2bf1(%rip),%r15
mov    (%r15),%edx
mov    %r14,%rdi
mov    $0x4,%esi
call   1070 <fseek@plt>
test   %rax,%rax
je     1418 <main+0x268>
lea    0xc17(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x40(%rsp),%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
test   %rax,%rax
je     1563 <main+0x3b3>
lea    0x50(%rsp),%r12
lea    0x40(%rsp),%r13
jmp    146e <main+0x2be>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r13,%rdi
mov    $0x8,%esi
mov    $0x8000,%edx
mov    %r14,%rcx
call   1040 <fread@plt>
test   %rax,%rax
je     1563 <main+0x3b3>
cmp    $0x4,%rax
jae    1480 <main+0x2d0>
xor    %ecx,%ecx
jmp    1550 <main+0x3a0>
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    14b0 <main+0x300>
pxor   %xmm1,%xmm1
xor    %esi,%esi
jmp    1506 <main+0x356>
xchg   %ax,%ax
and    $0xfffffffffffffffc,%rdi
pxor   %xmm1,%xmm1
xor    %esi,%esi
nopw   0x0(%rax,%rax,1)
paddq  0x40(%rsp,%rsi,8),%xmm0
paddq  0x50(%rsp,%rsi,8),%xmm1
paddq  0x60(%rsp,%rsi,8),%xmm0
paddq  0x70(%rsp,%rsi,8),%xmm1
paddq  0x80(%rsp,%rsi,8),%xmm0
paddq  0x90(%rsp,%rsi,8),%xmm1
paddq  0xa0(%rsp,%rsi,8),%xmm0
paddq  0xb0(%rsp,%rsi,8),%xmm1
add    $0x10,%rsi
add    $0xfffffffffffffffc,%rdi
jne    14c0 <main+0x310>
test   %rdx,%rdx
je     1534 <main+0x384>
lea    (%r12,%rsi,8),%rsi
shl    $0x5,%rdx
xor    %edi,%edi
cs nopw 0x0(%rax,%rax,1)
nop
paddq  -0x10(%rsi,%rdi,1),%xmm0
paddq  (%rsi,%rdi,1),%xmm1
add    $0x20,%rdi
cmp    %rdi,%rdx
jne    1520 <main+0x370>
paddq  %xmm1,%xmm0
pshufd $0xee,%xmm0,%xmm1
paddq  %xmm0,%xmm1
movq   %xmm1,%rbx
jmp    1559 <main+0x3a9>
nopl   0x0(%rax,%rax,1)
add    0x40(%rsp,%rcx,8),%rbx
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1550 <main+0x3a0>
jmp    1450 <main+0x2a0>
mov    %r14,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
je     157c <main+0x3cc>
lea    0xaa5(%rip),%rdi
call   10d0 <pexit@plt>
mov    (%r15),%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1070 <fseek@plt>
test   %rax,%rax
je     159a <main+0x3ea>
lea    0xa95(%rip),%rdi
call   10d0 <pexit@plt>
neg    %rbx
mov    %rbx,0x10(%rsp)
lea    0x10(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     15ca <main+0x41a>
lea    0xa48(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x30(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     15f2 <main+0x442>
lea    0xa20(%rip),%rdi
call   10d0 <pexit@plt>
lea    0x28(%rsp),%rdi
mov    $0x8,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   10c0 <fwrite@plt>
cmp    $0x1,%eax
je     161a <main+0x46a>
lea    0x9f8(%rip),%rdi
call   10d0 <pexit@plt>
mov    %r14,%rdi
call   1050 <fclose@plt>
test   %rax,%rax
je     1633 <main+0x483>
lea    0xa02(%rip),%rdi
call   10d0 <pexit@plt>
xor    %eax,%eax
add    $0x8048,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.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 = [7 x i8] c"fwrite\00"
@.str.4 = [8 x i8] c"fgetpos\00"
@.str.5 = [6 x i8] c"fread\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 [4096 x i64]
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i32
%15 = alloca i64
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i64
%20 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 4276977938, i64* %12
store i64 0, i64* %13
store i64 0, i64* %15
store i64 0, i64* %16
store i64 0, i64* %17
store i64 0, i64* %18
store i64 0, i64* %19
%21 = load i32, i32* %4
%22 = icmp ne i32 %21, 5
br i1 %22, label %23, label %25
23: ; preds = %2
%24 = call i32 (...) @usage()
br label %25
25: ; preds = %23, %2
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 1
%28 = load i8*, i8** %27
%29 = call i64 @strtoul(i8* %28, i32 0, i32 0)
store i64 %29, i64* %15
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 2
%32 = load i8*, i8** %31
%33 = call i64 @strtoul(i8* %32, i32 0, i32 0)
store i64 %33, i64* %19
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 3
%36 = load i8*, i8** %35
store i8* %36, i8** %6
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 4
%39 = load i8*, i8** %38
store i8* %39, i8** %7
%40 = load i8*, i8** %6
%41 = call i32* @fopen(i8* %40, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %41, i32** %8
%42 = load i32*, i32** %8
%43 = icmp ne i32* %42, null
br i1 %43, label %46, label %44
44: ; preds = %25
%45 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %46
46: ; preds = %44, %25
%47 = load i8*, i8** %7
%48 = call i32* @fopen(i8* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
store i32* %48, i32** %9
%49 = load i32*, i32** %9
%50 = icmp ne i32* %49, null
br i1 %50, label %53, label %51
51: ; preds = %46
%52 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %53
53: ; preds = %51, %46
%54 = load i32*, i32** %9
%55 = call i32 @fwrite(i64* %12, i32 8, i32 1, i32* %54)
%56 = icmp ne i32 1, %55
br i1 %56, label %57, label %59
57: ; preds = %53
%58 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %59
59: ; preds = %57, %53
%60 = load i32*, i32** %9
%61 = call i64 @fgetpos(i32* %60, i32* %14)
%62 = icmp ne i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %59
%64 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %65
65: ; preds = %63, %59
%66 = load i32*, i32** %9
%67 = call i32 @fwrite(i64* %13, i32 8, i32 1, i32* %66)
%68 = icmp ne i32 1, %67
br i1 %68, label %69, label %71
69: ; preds = %65
%70 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %71
71: ; preds = %69, %65
%72 = load i32*, i32** %9
%73 = call i32 @fwrite(i64* %15, i32 8, i32 1, i32* %72)
%74 = icmp ne i32 1, %73
br i1 %74, label %75, label %77
75: ; preds = %71
%76 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %77
77: ; preds = %75, %71
br label %78
78: ; preds = %97, %77
%79 = bitcast [4096 x i64]* %10 to i64**
%80 = load i32*, i32** %8
%81 = call i64 @fread(i64** %79, i32 8, i32 32768, i32* %80)
store i64 %81, i64* %11
%82 = icmp ult i64 0, %81
br i1 %82, label %83, label %98
83: ; preds = %78
%84 = load i64, i64* %11
%85 = load i64, i64* %17
%86 = add i64 %85, %84
store i64 %86, i64* %17
%87 = load i64, i64* %11
%88 = bitcast [4096 x i64]* %10 to i64*
%89 = load i64, i64* %11
%90 = trunc i64 %89 to i32
%91 = load i32*, i32** %9
%92 = call i32 @fwrite(i64* %88, i32 8, i32 %90, i32* %91)
%93 = sext i32 %92 to i64
%94 = icmp ne i64 %87, %93
br i1 %94, label %95, label %97
95: ; preds = %83
%96 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %97
97: ; preds = %95, %83
br label %78
98: ; preds = %78
%99 = load i32*, i32** %8
%100 = call i64 @ferror(i32* %99)
%101 = icmp ne i64 %100, 0
br i1 %101, label %102, label %104
102: ; preds = %98
%103 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %104
104: ; preds = %102, %98
%105 = load i32*, i32** %8
%106 = call i64 @fclose(i32* %105)
%107 = load i64, i64* %17
store i64 %107, i64* %13
%108 = load i32*, i32** %9
%109 = call i64 @fsetpos(i32* %108, i32* %14)
%110 = icmp ne i64 %109, 0
br i1 %110, label %111, label %113
111: ; preds = %104
%112 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %113
113: ; preds = %111, %104
%114 = load i32*, i32** %9
%115 = call i32 @fwrite(i64* %13, i32 8, i32 1, i32* %114)
%116 = icmp ne i32 1, %115
br i1 %116, label %117, label %119
117: ; preds = %113
%118 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %119
119: ; preds = %117, %113
%120 = load i64, i64* %13
%121 = load i64, i64* %16
%122 = add i64 %121, %120
store i64 %122, i64* %16
%123 = load i64, i64* %15
%124 = load i64, i64* %16
%125 = add i64 %124, %123
store i64 %125, i64* %16
%126 = load i32*, i32** %9
%127 = load i32, i32* @SEEK_CUR
%128 = call i64 @fseek(i32* %126, i32 4, i32 %127)
%129 = icmp ne i64 %128, 0
br i1 %129, label %130, label %132
130: ; preds = %119
%131 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %132
132: ; preds = %130, %119
br label %133
133: ; preds = %152, %132
%134 = bitcast [4096 x i64]* %10 to i64**
%135 = load i32*, i32** %9
%136 = call i64 @fread(i64** %134, i32 8, i32 32768, i32* %135)
store i64 %136, i64* %11
%137 = icmp ult i64 0, %136
br i1 %137, label %138, label %153
138: ; preds = %133
store i64 0, i64* %20
br label %139
139: ; preds = %149, %138
%140 = load i64, i64* %20
%141 = load i64, i64* %11
%142 = icmp ult i64 %140, %141
br i1 %142, label %143, label %152
143: ; preds = %139
%144 = load i64, i64* %20
%145 = getelementptr inbounds [4096 x i64], [4096 x i64]* %10, i64 0, i64 %144
%146 = load i64, i64* %145
%147 = load i64, i64* %16
%148 = add i64 %147, %146
store i64 %148, i64* %16
br label %149
149: ; preds = %143
%150 = load i64, i64* %20
%151 = add i64 %150, 1
store i64 %151, i64* %20
br label %139
152: ; preds = %139
br label %133
153: ; preds = %133
%154 = load i32*, i32** %9
%155 = call i64 @ferror(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 ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %159
159: ; preds = %157, %153
%160 = load i32*, i32** %9
%161 = load i32, i32* @SEEK_CUR
%162 = call i64 @fseek(i32* %160, i32 0, i32 %161)
%163 = icmp ne i64 %162, 0
br i1 %163, label %164, label %166
164: ; preds = %159
%165 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %166
166: ; preds = %164, %159
%167 = load i64, i64* %16
%168 = xor i64 %167, -1
%169 = add i64 %168, 1
store i64 %169, i64* %16
%170 = load i32*, i32** %9
%171 = call i32 @fwrite(i64* %16, i32 8, i32 1, i32* %170)
%172 = icmp ne i32 1, %171
br i1 %172, label %173, label %175
173: ; preds = %166
%174 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %175
175: ; preds = %173, %166
%176 = load i32*, i32** %9
%177 = call i32 @fwrite(i64* %18, i32 8, i32 1, i32* %176)
%178 = icmp ne i32 1, %177
br i1 %178, label %179, label %181
179: ; preds = %175
%180 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %181
181: ; preds = %179, %175
%182 = load i32*, i32** %9
%183 = call i32 @fwrite(i64* %19, i32 8, i32 1, i32* %182)
%184 = icmp ne i32 1, %183
br i1 %184, label %185, label %187
185: ; preds = %181
%186 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %187
187: ; preds = %185, %181
%188 = load i32*, i32** %9
%189 = call i64 @fclose(i32* %188)
%190 = icmp ne i64 %189, 0
br i1 %190, label %191, label %193
191: ; preds = %187
%192 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %193
193: ; preds = %191, %187
ret i32 0
}

LLVM IR (-O2):
@.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 = [7 x i8] c"fwrite\00"
@.str.4 = [8 x i8] c"fgetpos\00"
@.str.5 = [6 x i8] c"fread\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 [4096 x i64]
%4 = alloca i64
%5 = alloca i64
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = bitcast [4096 x i64]* %3 to i8*
%12 = bitcast i64* %4 to i8*
store i64 4276977938, i64* %4
%13 = bitcast i64* %5 to i8*
store i64 0, i64* %5
%14 = bitcast i32* %6 to i8*
%15 = bitcast i64* %7 to i8*
%16 = bitcast i64* %8 to i8*
store i64 0, i64* %8
%17 = bitcast i64* %9 to i8*
store i64 0, i64* %9
%18 = bitcast i64* %10 to i8*
%19 = icmp eq i32 %0, 5
br i1 %19, label %22, label %20
20: ; preds = %2
%21 = tail call i32 (...) @usage()
br label %22
22: ; preds = %20, %2
%23 = getelementptr inbounds i8*, i8** %1, i64 1
%24 = load i8*, i8** %23
%25 = tail call i64 @strtoul(i8* %24, i32 0, i32 0)
store i64 %25, i64* %7
%26 = getelementptr inbounds i8*, i8** %1, i64 2
%27 = load i8*, i8** %26
%28 = tail call i64 @strtoul(i8* %27, i32 0, i32 0)
store i64 %28, i64* %10
%29 = getelementptr inbounds i8*, i8** %1, i64 3
%30 = load i8*, i8** %29
%31 = getelementptr inbounds i8*, i8** %1, i64 4
%32 = load i8*, i8** %31
%33 = tail call i32* @fopen(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%34 = icmp eq i32* %33, null
br i1 %34, label %35, label %37
35: ; preds = %22
%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, %22
%38 = tail call i32* @fopen(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%39 = icmp eq i32* %38, null
br i1 %39, label %40, label %42
40: ; preds = %37
%41 = tail call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
br label %42
42: ; preds = %40, %37
%43 = call i32 @fwrite(i64* %4, i32 8, i32 1, i32* %38)
%44 = icmp eq i32 %43, 1
br i1 %44, label %47, label %45
45: ; preds = %42
%46 = tail call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %47
47: ; preds = %45, %42
%48 = call i64 @fgetpos(i32* %38, i32* %6)
%49 = icmp eq i64 %48, 0
br i1 %49, label %52, label %50
50: ; preds = %47
%51 = tail call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
br label %52
52: ; preds = %50, %47
%53 = call i32 @fwrite(i64* %5, i32 8, i32 1, i32* %38)
%54 = icmp eq i32 %53, 1
br i1 %54, label %57, label %55
55: ; preds = %52
%56 = tail call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %57
57: ; preds = %55, %52
%58 = call i32 @fwrite(i64* %7, i32 8, i32 1, i32* %38)
%59 = icmp eq i32 %58, 1
br i1 %59, label %62, label %60
60: ; preds = %57
%61 = tail call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %62
62: ; preds = %60, %57
%63 = bitcast [4096 x i64]* %3 to i64**
%64 = call i64 @fread(i64** %63, i32 8, i32 32768, i32* %33)
%65 = icmp eq i64 %64, 0
br i1 %65, label %81, label %66
66: ; preds = %62
%67 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 0
br label %68
68: ; preds = %66, %78
%69 = phi i64 [ %64, %66 ], [ %79, %78 ]
%70 = phi i64 [ 0, %66 ], [ %71, %78 ]
%71 = add i64 %69, %70
%72 = trunc i64 %69 to i32
%73 = call i32 @fwrite(i64* %67, i32 8, i32 %72, i32* %38)
%74 = sext i32 %73 to i64
%75 = icmp eq i64 %69, %74
br i1 %75, label %78, label %76
76: ; preds = %68
%77 = tail call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %78
78: ; preds = %76, %68
%79 = call i64 @fread(i64** %63, i32 8, i32 32768, i32* %33)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %68
81: ; preds = %78, %62
%82 = phi i64 [ 0, %62 ], [ %71, %78 ]
%83 = tail call i64 @ferror(i32* %33)
%84 = icmp eq i64 %83, 0
br i1 %84, label %87, label %85
85: ; preds = %81
%86 = tail call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %87
87: ; preds = %85, %81
%88 = tail call i64 @fclose(i32* %33)
store i64 %82, i64* %5
%89 = call i64 @fsetpos(i32* %38, i32* %6)
%90 = icmp eq i64 %89, 0
br i1 %90, label %93, label %91
91: ; preds = %87
%92 = call i32 @pexit(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
br label %93
93: ; preds = %91, %87
%94 = call i32 @fwrite(i64* %5, i32 8, i32 1, i32* %38)
%95 = icmp eq i32 %94, 1
br i1 %95, label %98, label %96
96: ; preds = %93
%97 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %98
98: ; preds = %96, %93
%99 = load i64, i64* %5
store i64 %99, i64* %8
%100 = load i64, i64* %7
%101 = add i64 %100, %99
%102 = load i32, i32* @SEEK_CUR
%103 = call i64 @fseek(i32* %38, i32 4, i32 %102)
%104 = icmp eq i64 %103, 0
br i1 %104, label %107, label %105
105: ; preds = %98
%106 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %107
107: ; preds = %105, %98
%108 = call i64 @fread(i64** %63, i32 8, i32 32768, i32* %38)
%109 = icmp eq i64 %108, 0
br i1 %109, label %211, label %114
110: ; preds = %203, %194
%111 = phi i64 [ %198, %194 ], [ %208, %203 ]
%112 = call i64 @fread(i64** %63, i32 8, i32 32768, i32* %38)
%113 = icmp eq i64 %112, 0
br i1 %113, label %211, label %114
114: ; preds = %107, %110
%115 = phi i64 [ %112, %110 ], [ %108, %107 ]
%116 = phi i64 [ %111, %110 ], [ %101, %107 ]
%117 = icmp ult i64 %115, 4
br i1 %117, label %200, label %118
118: ; preds = %114
%119 = and i64 %115, -4
%120 = insertelement <2 x i64> <i64 poison, i64 0>, i64 %116, i64 0
%121 = add i64 %119, -4
%122 = lshr exact i64 %121, 2
%123 = add nuw nsw i64 %122, 1
%124 = and i64 %123, 3
%125 = icmp ult i64 %121, 12
br i1 %125, label %171, label %126
126: ; preds = %118
%127 = and i64 %123, 9223372036854775804
br label %128
128: ; preds = %128, %126
%129 = phi i64 [ 0, %126 ], [ %168, %128 ]
%130 = phi <2 x i64> [ %120, %126 ], [ %166, %128 ]
%131 = phi <2 x i64> [ zeroinitializer, %126 ], [ %167, %128 ]
%132 = phi i64 [ 0, %126 ], [ %169, %128 ]
%133 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 %129
%134 = bitcast i64* %133 to <2 x i64>*
%135 = load <2 x i64>, <2 x i64>* %134
%136 = getelementptr inbounds i64, i64* %133, i64 2
%137 = bitcast i64* %136 to <2 x i64>*
%138 = load <2 x i64>, <2 x i64>* %137
%139 = add <2 x i64> %130, %135
%140 = add <2 x i64> %131, %138
%141 = or i64 %129, 4
%142 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 %141
%143 = bitcast i64* %142 to <2 x i64>*
%144 = load <2 x i64>, <2 x i64>* %143
%145 = getelementptr inbounds i64, i64* %142, i64 2
%146 = bitcast i64* %145 to <2 x i64>*
%147 = load <2 x i64>, <2 x i64>* %146
%148 = add <2 x i64> %139, %144
%149 = add <2 x i64> %140, %147
%150 = or i64 %129, 8
%151 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 %150
%152 = bitcast i64* %151 to <2 x i64>*
%153 = load <2 x i64>, <2 x i64>* %152
%154 = getelementptr inbounds i64, i64* %151, i64 2
%155 = bitcast i64* %154 to <2 x i64>*
%156 = load <2 x i64>, <2 x i64>* %155
%157 = add <2 x i64> %148, %153
%158 = add <2 x i64> %149, %156
%159 = or i64 %129, 12
%160 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 %159
%161 = bitcast i64* %160 to <2 x i64>*
%162 = load <2 x i64>, <2 x i64>* %161
%163 = getelementptr inbounds i64, i64* %160, i64 2
%164 = bitcast i64* %163 to <2 x i64>*
%165 = load <2 x i64>, <2 x i64>* %164
%166 = add <2 x i64> %157, %162
%167 = add <2 x i64> %158, %165
%168 = add nuw i64 %129, 16
%169 = add nuw i64 %132, 4
%170 = icmp eq i64 %169, %127
br i1 %170, label %171, label %128
171: ; preds = %128, %118
%172 = phi <2 x i64> [ undef, %118 ], [ %166, %128 ]
%173 = phi <2 x i64> [ undef, %118 ], [ %167, %128 ]
%174 = phi i64 [ 0, %118 ], [ %168, %128 ]
%175 = phi <2 x i64> [ %120, %118 ], [ %166, %128 ]
%176 = phi <2 x i64> [ zeroinitializer, %118 ], [ %167, %128 ]
%177 = icmp eq i64 %124, 0
br i1 %177, label %194, label %178
178: ; preds = %171, %178
%179 = phi i64 [ %191, %178 ], [ %174, %171 ]
%180 = phi <2 x i64> [ %189, %178 ], [ %175, %171 ]
%181 = phi <2 x i64> [ %190, %178 ], [ %176, %171 ]
%182 = phi i64 [ %192, %178 ], [ 0, %171 ]
%183 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 %179
%184 = bitcast i64* %183 to <2 x i64>*
%185 = load <2 x i64>, <2 x i64>* %184
%186 = getelementptr inbounds i64, i64* %183, i64 2
%187 = bitcast i64* %186 to <2 x i64>*
%188 = load <2 x i64>, <2 x i64>* %187
%189 = add <2 x i64> %180, %185
%190 = add <2 x i64> %181, %188
%191 = add nuw i64 %179, 4
%192 = add i64 %182, 1
%193 = icmp eq i64 %192, %124
br i1 %193, label %194, label %178
194: ; preds = %178, %171
%195 = phi <2 x i64> [ %172, %171 ], [ %189, %178 ]
%196 = phi <2 x i64> [ %173, %171 ], [ %190, %178 ]
%197 = add <2 x i64> %196, %195
%198 = call i64 @llvm.vector.reduce.add.v2i64(<2 x i64> %197)
%199 = icmp eq i64 %115, %119
br i1 %199, label %110, label %200
200: ; preds = %114, %194
%201 = phi i64 [ 0, %114 ], [ %119, %194 ]
%202 = phi i64 [ %116, %114 ], [ %198, %194 ]
br label %203
203: ; preds = %200, %203
%204 = phi i64 [ %209, %203 ], [ %201, %200 ]
%205 = phi i64 [ %208, %203 ], [ %202, %200 ]
%206 = getelementptr inbounds [4096 x i64], [4096 x i64]* %3, i64 0, i64 %204
%207 = load i64, i64* %206
%208 = add i64 %205, %207
%209 = add nuw i64 %204, 1
%210 = icmp eq i64 %209, %115
br i1 %210, label %110, label %203
211: ; preds = %110, %107
%212 = phi i64 [ %101, %107 ], [ %111, %110 ]
%213 = call i64 @ferror(i32* %38)
%214 = icmp eq i64 %213, 0
br i1 %214, label %217, label %215
215: ; preds = %211
%216 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
br label %217
217: ; preds = %215, %211
%218 = load i32, i32* @SEEK_CUR
%219 = call i64 @fseek(i32* %38, i32 0, i32 %218)
%220 = icmp eq i64 %219, 0
br i1 %220, label %223, label %221
221: ; preds = %217
%222 = call i32 @pexit(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %223
223: ; preds = %221, %217
%224 = sub i64 0, %212
store i64 %224, i64* %8
%225 = call i32 @fwrite(i64* %8, i32 8, i32 1, i32* %38)
%226 = icmp eq i32 %225, 1
br i1 %226, label %229, label %227
227: ; preds = %223
%228 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %229
229: ; preds = %227, %223
%230 = call i32 @fwrite(i64* %9, i32 8, i32 1, i32* %38)
%231 = icmp eq i32 %230, 1
br i1 %231, label %234, label %232
232: ; preds = %229
%233 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %234
234: ; preds = %232, %229
%235 = call i32 @fwrite(i64* %10, i32 8, i32 1, i32* %38)
%236 = icmp eq i32 %235, 1
br i1 %236, label %239, label %237
237: ; preds = %234
%238 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
br label %239
239: ; preds = %237, %234
%240 = call i64 @fclose(i32* %38)
%241 = icmp eq i64 %240, 0
br i1 %241, label %244, label %242
242: ; preds = %239
%243 = call i32 @pexit(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.8, i64 0, i64 0))
br label %244
244: ; preds = %242, %239
ret i32 0
}