#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int read(int /*<<< orphan*/, unsigned char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  int i, cnt, pos, len;
  unsigned int cksum, val;
  unsigned char *lp;
  unsigned char buf[8192];
  if (argc != 2) {
    fprintf(stderr, "usage: %s name <in-file >out-file\n", argv[0]);
    exit(1);
  }
  fprintf(stdout, "#\n");
  fprintf(stdout, "# Miscellaneous data structures:\n");
  fprintf(stdout, "# WARNING - this file is automatically generated!\n");
  fprintf(stdout, "#\n");
  fprintf(stdout, "\n");
  fprintf(stdout, "\t.data\n");
  fprintf(stdout, "\t.globl %s_data\n", argv[1]);
  fprintf(stdout, "%s_data:\n", argv[1]);
  pos = 0;
  cksum = 0;
  while ((len = read(0, buf, sizeof(buf))) > 0) {
    cnt = 0;
    lp = (unsigned char *)buf;
    len = (len + 3) & ~3;
    for (i = 0; i < len; i += 4) {
      if (cnt == 0) {
        fprintf(stdout, "\t.long\t");
      }
      fprintf(stdout, "0x%02X%02X%02X%02X", lp[0], lp[1], lp[2], lp[3]);
      val = *(unsigned long *)lp;
      cksum ^= val;
      lp += 4;
      if (++cnt == 4) {
        cnt = 0;
        fprintf(stdout, " # %x \n", pos + i - 12);
        fflush(stdout);
      } else {
        fprintf(stdout, ",");
      }
    }
    if (cnt) {
      fprintf(stdout, "0\n");
    }
    pos += len;
  }
  fprintf(stdout, "\t.globl %s_len\n", argv[1]);
  fprintf(stdout, "%s_len:\t.long\t0x%x\n", argv[1], pos);
  fflush(stdout);
  fclose(stdout);
  fprintf(stderr, "cksum = %x\n", cksum);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2030,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     119b <main+0x4b>
mov    0x2e66(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe76(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x2e36(%rip),%rax
mov    (%rax),%edi
lea    0xe78(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e1f(%rip),%rax
mov    (%rax),%edi
lea    0xe64(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xe6f(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xe33(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
lea    0xe5d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dac(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe46(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d8d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe38(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x2030(%rbp),%rsi
xor    %edi,%edi
mov    $0x2000,%edx
call   1040 <read@plt>
mov    %eax,-0x20(%rbp)
cmp    $0x0,%eax
jle    13de <main+0x28e>
movl   $0x0,-0x18(%rbp)
lea    -0x2030(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%eax
add    $0x3,%eax
and    $0xfffffffc,%eax
mov    %eax,-0x20(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x20(%rbp),%eax
jge    13af <main+0x25f>
cmpl   $0x0,-0x18(%rbp)
jne    12e2 <main+0x192>
mov    0x2d06(%rip),%rax
mov    (%rax),%edi
lea    0xdc3(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2cef(%rip),%rax
mov    (%rax),%edi
mov    -0x30(%rbp),%rax
movzbl (%rax),%edx
mov    -0x30(%rbp),%rax
movzbl 0x1(%rax),%ecx
mov    -0x30(%rbp),%rax
movzbl 0x2(%rax),%r8d
mov    -0x30(%rbp),%rax
movzbl 0x3(%rax),%r9d
lea    0xd93(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%rax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
xor    -0x24(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x30(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
cmp    $0x4,%eax
jne    1385 <main+0x235>
movl   $0x0,-0x18(%rbp)
mov    0x2c7f(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
add    -0x14(%rbp),%edx
sub    $0xc,%edx
lea    0xd4e(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c5f(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    139c <main+0x24c>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
lea    0xd2c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    13a1 <main+0x251>
mov    -0x14(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x14(%rbp)
jmp    12b5 <main+0x165>
cmpl   $0x0,-0x18(%rbp)
je     13d0 <main+0x280>
mov    0x2c18(%rip),%rax
mov    (%rax),%edi
lea    0xcfa(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    1271 <main+0x121>
mov    0x2bf3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xcd0(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2bd4(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xcbe(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2bb2(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    0x2ba4(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2b9e(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xc9c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2018,%rsp
mov    %rsi,%rbp
cmp    $0x2,%edi
jne    1330 <main+0x1e0>
mov    0x2e64(%rip),%r13
mov    0x0(%r13),%edi
lea    0xea4(%rip),%rbx
xor    %r14d,%r14d
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xe8f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xe9f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xef6(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xea0(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rbp),%rdx
lea    0xe92(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    %rbp,0x8(%rsp)
mov    0x8(%rbp),%rdx
lea    0xe88(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0x10(%rsp),%rsi
xor    %edi,%edi
mov    $0x2000,%edx
call   1040 <read@plt>
mov    $0x0,%ebp
test   %eax,%eax
jle    1355 <main+0x205>
mov    %eax,%ebx
xor    %ebp,%ebp
xor    %r14d,%r14d
jmp    1262 <main+0x112>
nopw   0x0(%rax,%rax,1)
mov    (%rsp),%r14
add    %ebx,%r14d
xor    %edi,%edi
lea    0x10(%rsp),%rsi
mov    $0x2000,%edx
call   1040 <read@plt>
mov    %eax,%ebx
test   %eax,%eax
jle    1355 <main+0x205>
add    $0x3,%ebx
and    $0xfffffffc,%ebx
je     1244 <main+0xf4>
mov    %r14,(%rsp)
lea    -0xc(%r14),%r15d
xor    %r12d,%r12d
xor    %r14d,%r14d
jmp    12d4 <main+0x184>
nopw   0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
movzbl 0x10(%rsp,%r12,1),%edx
movzbl 0x11(%rsp,%r12,1),%ecx
movzbl 0x12(%rsp,%r12,1),%r8d
movzbl 0x13(%rsp,%r12,1),%r9d
lea    0xe03(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    0x10(%rsp,%r12,1),%ebp
add    $0x1,%r14d
mov    0x0(%r13),%edi
cmp    $0x4,%r14d
je     12f0 <main+0x1a0>
lea    0xdfd(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x4,%r12
cmp    %ebx,%r12d
jge    1310 <main+0x1c0>
test   %r14d,%r14d
jne    1280 <main+0x130>
mov    0x0(%r13),%edi
lea    0xdba(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1280 <main+0x130>
nopl   (%rax)
lea    (%r15,%r12,1),%edx
xor    %r14d,%r14d
lea    0xdbb(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
call   1060 <fflush@plt>
jmp    12cb <main+0x17b>
test   %r14d,%r14d
je     1240 <main+0xf0>
mov    0x0(%r13),%edi
lea    0xd9f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1240 <main+0xf0>
mov    0x2ca9(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
lea    0xcbc(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rbx
mov    0x8(%rbx),%rdx
lea    0xd5d(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rbx),%rdx
lea    0xd57(%rip),%rsi
mov    %r14d,%ecx
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
call   1060 <fflush@plt>
mov    0x0(%r13),%edi
call   1030 <fclose@plt>
mov    0x2c3e(%rip),%rax
mov    (%rax),%edi
lea    0xd3f(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"usage: %s name <in-file >out-file\0A\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"#\0A\00"
@.str.2 = [34 x i8] c"# Miscellaneous data structures:\0A\00"
@.str.3 = [51 x i8] c"# WARNING - this file is automatically generated!\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [8 x i8] c"\09.data\0A\00"
@.str.6 = [17 x i8] c"\09.globl %s_data\0A\00"
@.str.7 = [10 x i8] c"%s_data:\0A\00"
@.str.8 = [8 x i8] c"\09.long\09\00"
@.str.9 = [19 x i8] c"0x%02X%02X%02X%02X\00"
@.str.10 = [8 x i8] c" # %x \0A\00"
@.str.11 = [2 x i8] c",\00"
@.str.12 = [3 x i8] c"0\0A\00"
@.str.13 = [16 x i8] c"\09.globl %s_len\0A\00"
@.str.14 = [20 x i8] c"%s_len:\09.long\090x%x\0A\00"
@.str.15 = [12 x i8] c"cksum = %x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca [8192 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %23
16: ; preds = %2
%17 = load i32, i32* @stderr
%18 = load i8**, i8*** %5
%19 = getelementptr inbounds i8*, i8** %18, i64 0
%20 = load i8*, i8** %19
%21 = call i32 (i32, i8*, ...) @fprintf(i32 %17, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %20)
%22 = call i32 @exit(i32 1)
unreachable
23: ; preds = %2
%24 = load i32, i32* @stdout
%25 = call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%26 = load i32, i32* @stdout
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%28 = load i32, i32* @stdout
%29 = call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%30 = load i32, i32* @stdout
%31 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%32 = load i32, i32* @stdout
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%34 = load i32, i32* @stdout
%35 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%36 = load i32, i32* @stdout
%37 = load i8**, i8*** %5
%38 = getelementptr inbounds i8*, i8** %37, i64 1
%39 = load i8*, i8** %38
%40 = call i32 (i32, i8*, ...) @fprintf(i32 %36, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* %39)
%41 = load i32, i32* @stdout
%42 = load i8**, i8*** %5
%43 = getelementptr inbounds i8*, i8** %42, i64 1
%44 = load i8*, i8** %43
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %41, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %44)
store i32 0, i32* %8
store i32 0, i32* %10
br label %46
46: ; preds = %118, %23
%47 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 0
%48 = call i32 @read(i32 0, i8* %47, i32 8192)
store i32 %48, i32* %9
%49 = icmp sgt i32 %48, 0
br i1 %49, label %50, label %122
50: ; preds = %46
store i32 0, i32* %7
%51 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 0
store i8* %51, i8** %12
%52 = load i32, i32* %9
%53 = add nsw i32 %52, 3
%54 = and i32 %53, -4
store i32 %54, i32* %9
store i32 0, i32* %6
br label %55
55: ; preds = %109, %50
%56 = load i32, i32* %6
%57 = load i32, i32* %9
%58 = icmp slt i32 %56, %57
br i1 %58, label %59, label %112
59: ; preds = %55
%60 = load i32, i32* %7
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %59
%63 = load i32, i32* @stdout
%64 = call i32 (i32, i8*, ...) @fprintf(i32 %63, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %65
65: ; preds = %62, %59
%66 = load i32, i32* @stdout
%67 = load i8*, i8** %12
%68 = getelementptr inbounds i8, i8* %67, i64 0
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = load i8*, i8** %12
%72 = getelementptr inbounds i8, i8* %71, i64 1
%73 = load i8, i8* %72
%74 = zext i8 %73 to i32
%75 = load i8*, i8** %12
%76 = getelementptr inbounds i8, i8* %75, i64 2
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = load i8*, i8** %12
%80 = getelementptr inbounds i8, i8* %79, i64 3
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %70, i32 %74, i32 %78, i32 %82)
%84 = load i8*, i8** %12
%85 = bitcast i8* %84 to i64*
%86 = load i64, i64* %85
%87 = trunc i64 %86 to i32
store i32 %87, i32* %11
%88 = load i32, i32* %11
%89 = load i32, i32* %10
%90 = xor i32 %89, %88
store i32 %90, i32* %10
%91 = load i8*, i8** %12
%92 = getelementptr inbounds i8, i8* %91, i64 4
store i8* %92, i8** %12
%93 = load i32, i32* %7
%94 = add nsw i32 %93, 1
store i32 %94, i32* %7
%95 = icmp eq i32 %94, 4
br i1 %95, label %96, label %105
96: ; preds = %65
store i32 0, i32* %7
%97 = load i32, i32* @stdout
%98 = load i32, i32* %8
%99 = load i32, i32* %6
%100 = add nsw i32 %98, %99
%101 = sub nsw i32 %100, 12
%102 = call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %101)
%103 = load i32, i32* @stdout
%104 = call i32 @fflush(i32 %103)
br label %108
105: ; preds = %65
%106 = load i32, i32* @stdout
%107 = call i32 (i32, i8*, ...) @fprintf(i32 %106, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %108
108: ; preds = %105, %96
br label %109
109: ; preds = %108
%110 = load i32, i32* %6
%111 = add nsw i32 %110, 4
store i32 %111, i32* %6
br label %55
112: ; preds = %55
%113 = load i32, i32* %7
%114 = icmp ne i32 %113, 0
br i1 %114, label %115, label %118
115: ; preds = %112
%116 = load i32, i32* @stdout
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %116, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
br label %118
118: ; preds = %115, %112
%119 = load i32, i32* %9
%120 = load i32, i32* %8
%121 = add nsw i32 %120, %119
store i32 %121, i32* %8
br label %46
122: ; preds = %46
%123 = load i32, i32* @stdout
%124 = load i8**, i8*** %5
%125 = getelementptr inbounds i8*, i8** %124, i64 1
%126 = load i8*, i8** %125
%127 = call i32 (i32, i8*, ...) @fprintf(i32 %123, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* %126)
%128 = load i32, i32* @stdout
%129 = load i8**, i8*** %5
%130 = getelementptr inbounds i8*, i8** %129, i64 1
%131 = load i8*, i8** %130
%132 = load i32, i32* %8
%133 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i8* %131, i32 %132)
%134 = load i32, i32* @stdout
%135 = call i32 @fflush(i32 %134)
%136 = load i32, i32* @stdout
%137 = call i32 @fclose(i32 %136)
%138 = load i32, i32* @stderr
%139 = load i32, i32* %10
%140 = call i32 (i32, i8*, ...) @fprintf(i32 %138, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %139)
%141 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"usage: %s name <in-file >out-file\0A\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"#\0A\00"
@.str.2 = [34 x i8] c"# Miscellaneous data structures:\0A\00"
@.str.3 = [51 x i8] c"# WARNING - this file is automatically generated!\0A\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [8 x i8] c"\09.data\0A\00"
@.str.6 = [17 x i8] c"\09.globl %s_data\0A\00"
@.str.7 = [10 x i8] c"%s_data:\0A\00"
@.str.8 = [8 x i8] c"\09.long\09\00"
@.str.9 = [19 x i8] c"0x%02X%02X%02X%02X\00"
@.str.10 = [8 x i8] c" # %x \0A\00"
@.str.11 = [2 x i8] c",\00"
@.str.12 = [3 x i8] c"0\0A\00"
@.str.13 = [16 x i8] c"\09.globl %s_len\0A\00"
@.str.14 = [20 x i8] c"%s_len:\09.long\090x%x\0A\00"
@.str.15 = [12 x i8] c"cksum = %x\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [8192 x i8]
%4 = getelementptr inbounds [8192 x i8], [8192 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32 %0, 2
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = load i8*, i8** %1
%9 = tail call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i8* %8)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i32, i32* @stdout
%13 = tail call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32, i32* @stdout
%15 = tail call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0))
%16 = load i32, i32* @stdout
%17 = tail call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str.3, i64 0, i64 0))
%18 = load i32, i32* @stdout
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%20 = load i32, i32* @stdout
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%22 = load i32, i32* @stdout
%23 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%24 = load i32, i32* @stdout
%25 = getelementptr inbounds i8*, i8** %1, i64 1
%26 = load i8*, i8** %25
%27 = tail call i32 (i32, i8*, ...) @fprintf(i32 %24, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0), i8* %26)
%28 = load i32, i32* @stdout
%29 = load i8*, i8** %25
%30 = tail call i32 (i32, i8*, ...) @fprintf(i32 %28, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.7, i64 0, i64 0), i8* %29)
%31 = call i32 @read(i32 0, i8* %4, i32 8192)
%32 = icmp sgt i32 %31, 0
br i1 %32, label %33, label %94
33: ; preds = %11, %89
%34 = phi i32 [ %92, %89 ], [ %31, %11 ]
%35 = phi i32 [ %90, %89 ], [ 0, %11 ]
%36 = phi i32 [ %91, %89 ], [ 0, %11 ]
%37 = add nuw nsw i32 %34, 3
%38 = and i32 %37, -4
%39 = icmp eq i32 %38, 0
br i1 %39, label %89, label %40
40: ; preds = %33
%41 = add i32 %36, -12
br label %42
42: ; preds = %40, %80
%43 = phi i8* [ %4, %40 ], [ %69, %80 ]
%44 = phi i32 [ 0, %40 ], [ %82, %80 ]
%45 = phi i32 [ %35, %40 ], [ %68, %80 ]
%46 = phi i32 [ 0, %40 ], [ %81, %80 ]
%47 = icmp eq i32 %46, 0
br i1 %47, label %48, label %51
48: ; preds = %42
%49 = load i32, i32* @stdout
%50 = tail call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %51
51: ; preds = %48, %42
%52 = load i32, i32* @stdout
%53 = load i8, i8* %43
%54 = zext i8 %53 to i32
%55 = getelementptr inbounds i8, i8* %43, i64 1
%56 = load i8, i8* %55
%57 = zext i8 %56 to i32
%58 = getelementptr inbounds i8, i8* %43, i64 2
%59 = load i8, i8* %58
%60 = zext i8 %59 to i32
%61 = getelementptr inbounds i8, i8* %43, i64 3
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = tail call i32 (i32, i8*, ...) @fprintf(i32 %52, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.9, i64 0, i64 0), i32 %54, i32 %57, i32 %60, i32 %63)
%65 = bitcast i8* %43 to i64*
%66 = load i64, i64* %65
%67 = trunc i64 %66 to i32
%68 = xor i32 %45, %67
%69 = getelementptr inbounds i8, i8* %43, i64 4
%70 = add nsw i32 %46, 1
%71 = icmp eq i32 %70, 4
%72 = load i32, i32* @stdout
br i1 %71, label %73, label %78
73: ; preds = %51
%74 = add i32 %41, %44
%75 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i32 %74)
%76 = load i32, i32* @stdout
%77 = tail call i32 @fflush(i32 %76)
br label %80
78: ; preds = %51
%79 = tail call i32 (i32, i8*, ...) @fprintf(i32 %72, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
br label %80
80: ; preds = %73, %78
%81 = phi i32 [ 0, %73 ], [ %70, %78 ]
%82 = add nuw nsw i32 %44, 4
%83 = icmp slt i32 %82, %38
br i1 %83, label %42, label %84
84: ; preds = %80
%85 = icmp eq i32 %81, 0
br i1 %85, label %89, label %86
86: ; preds = %84
%87 = load i32, i32* @stdout
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
br label %89
89: ; preds = %33, %86, %84
%90 = phi i32 [ %68, %86 ], [ %68, %84 ], [ %35, %33 ]
%91 = add nsw i32 %38, %36
%92 = call i32 @read(i32 0, i8* %4, i32 8192)
%93 = icmp sgt i32 %92, 0
br i1 %93, label %33, label %94
94: ; preds = %89, %11
%95 = phi i32 [ 0, %11 ], [ %91, %89 ]
%96 = phi i32 [ 0, %11 ], [ %90, %89 ]
%97 = load i32, i32* @stdout
%98 = load i8*, i8** %25
%99 = tail call i32 (i32, i8*, ...) @fprintf(i32 %97, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.13, i64 0, i64 0), i8* %98)
%100 = load i32, i32* @stdout
%101 = load i8*, i8** %25
%102 = tail call i32 (i32, i8*, ...) @fprintf(i32 %100, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.14, i64 0, i64 0), i8* %101, i32 %95)
%103 = load i32, i32* @stdout
%104 = tail call i32 @fflush(i32 %103)
%105 = load i32, i32* @stdout
%106 = tail call i32 @fclose(i32 %105)
%107 = load i32, i32* @stderr
%108 = tail call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.15, i64 0, i64 0), i32 %96)
%109 = tail call i32 @exit(i32 0)
unreachable
}