#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, "unsigned long orion_%s_start[] = {\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");
      }
      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, ",");
      }
    }
    pos += len;
  }
  fprintf(stdout, "0 };\n");
  fprintf(stdout, "unsigned long orion_%s_size = 0x%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    0xe65(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2e08(%rip),%rax
mov    (%rax),%edi
lea    0xe70(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2df1(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
lea    0xe73(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe56(%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    1387 <main+0x237>
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    1379 <main+0x229>
cmpl   $0x0,-0x18(%rbp)
jne    12ac <main+0x15c>
mov    0x2d3c(%rip),%rax
mov    (%rax),%edi
lea    0xdfb(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d25(%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    0xdc5(%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    134f <main+0x1ff>
movl   $0x0,-0x18(%rbp)
mov    0x2cb5(%rip),%rax
mov    (%rax),%edi
mov    -0x1c(%rbp),%edx
add    -0x14(%rbp),%edx
sub    $0xc,%edx
lea    0xd80(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c95(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
jmp    1366 <main+0x216>
mov    0x2c82(%rip),%rax
mov    (%rax),%edi
lea    0xd62(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
jmp    136b <main+0x21b>
mov    -0x14(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x14(%rbp)
jmp    127f <main+0x12f>
mov    -0x20(%rbp),%eax
add    -0x1c(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    123b <main+0xeb>
mov    0x2c4a(%rip),%rax
mov    (%rax),%edi
lea    0xd2c(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c33(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
mov    -0x1c(%rbp),%ecx
lea    0xd10(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c11(%rip),%rax
mov    (%rax),%edi
call   1060 <fflush@plt>
mov    0x2c03(%rip),%rax
mov    (%rax),%edi
call   1030 <fclose@plt>
mov    0x2bfd(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xcff(%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    $0x2028,%rsp
mov    %rsi,%rbx
cmp    $0x2,%edi
jne    1305 <main+0x1b5>
mov    0x2e64(%rip),%r13
mov    0x0(%r13),%edi
lea    0xea4(%rip),%rsi
xor    %r15d,%r15d
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xe93(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xea3(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xf05(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
lea    0xeb0(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    %rbx,0x8(%rsp)
mov    0x8(%rbx),%rdx
lea    0xe97(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
lea    0x20(%rsp),%rsi
xor    %edi,%edi
mov    $0x2000,%edx
call   1040 <read@plt>
mov    $0x0,%ebp
test   %eax,%eax
jle    1329 <main+0x1d9>
mov    %eax,%ebx
lea    0xe8f(%rip),%r14
xor    %ebp,%ebp
xor    %r15d,%r15d
jmp    1243 <main+0xf3>
nopw   0x0(%rax,%rax,1)
mov    0x10(%rsp),%r15
add    %ebx,%r15d
xor    %edi,%edi
lea    0x20(%rsp),%rsi
mov    $0x2000,%edx
call   1040 <read@plt>
mov    %eax,%ebx
test   %eax,%eax
jle    1329 <main+0x1d9>
add    $0x3,%ebx
and    $0xfffffffc,%ebx
mov    %r15,0x10(%rsp)
je     1220 <main+0xd0>
lea    -0xc(%r15),%eax
mov    %rax,0x18(%rsp)
xor    %r12d,%r12d
xor    %r15d,%r15d
jmp    12c4 <main+0x174>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    0x0(%r13),%edi
movzbl 0x20(%rsp,%r12,1),%edx
movzbl 0x21(%rsp,%r12,1),%ecx
movzbl 0x22(%rsp,%r12,1),%r8d
movzbl 0x23(%rsp,%r12,1),%r9d
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
xor    0x20(%rsp,%r12,1),%ebp
add    $0x1,%r15d
mov    0x0(%r13),%edi
cmp    $0x4,%r15d
je     12e0 <main+0x190>
lea    0xe11(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
add    $0x4,%r12
cmp    %ebx,%r12d
jge    1220 <main+0xd0>
test   %r15d,%r15d
jne    1270 <main+0x120>
mov    0x0(%r13),%edi
lea    0xdcc(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
jmp    1270 <main+0x120>
nopl   (%rax)
mov    0x18(%rsp),%rax
lea    (%rax,%r12,1),%edx
xor    %r15d,%r15d
lea    0xdc2(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
call   1060 <fflush@plt>
jmp    12b7 <main+0x167>
mov    0x2cd4(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%rdx
lea    0xce8(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    $0x1,%edi
call   1070 <exit@plt>
mov    0x0(%r13),%edi
lea    0xd8f(%rip),%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    0x0(%r13),%edi
mov    0x8(%rsp),%rax
mov    0x8(%rax),%rdx
lea    0xd7a(%rip),%rsi
mov    %r15d,%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    0x2c6e(%rip),%rax
mov    (%rax),%edi
lea    0xd73(%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 = [4 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 = [4 x i8] c"*/\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [36 x i8] c"unsigned long orion_%s_start[] = {\0A\00"
@.str.7 = [2 x i8] c"\09\00"
@.str.8 = [19 x i8] c"0x%02X%02X%02X%02X\00"
@.str.9 = [12 x i8] c", /* %x */\0A\00"
@.str.10 = [2 x i8] c",\00"
@.str.11 = [6 x i8] c"0 };\0A\00"
@.str.12 = [37 x i8] c"unsigned long orion_%s_size = 0x%x;\0A\00"
@.str.13 = [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 ([4 x i8], [4 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 ([4 x i8], [4 x i8]* @.str.4, 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.5, i64 0, i64 0))
%34 = load i32, i32* @stdout
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 1
%37 = load i8*, i8** %36
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %34, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %37)
store i32 0, i32* %8
store i32 0, i32* %10
br label %39
39: ; preds = %105, %23
%40 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 0
%41 = call i32 @read(i32 0, i8* %40, i32 8192)
store i32 %41, i32* %9
%42 = icmp sgt i32 %41, 0
br i1 %42, label %43, label %109
43: ; preds = %39
store i32 0, i32* %7
%44 = getelementptr inbounds [8192 x i8], [8192 x i8]* %13, i64 0, i64 0
store i8* %44, i8** %12
%45 = load i32, i32* %9
%46 = add nsw i32 %45, 3
%47 = and i32 %46, -4
store i32 %47, i32* %9
store i32 0, i32* %6
br label %48
48: ; preds = %102, %43
%49 = load i32, i32* %6
%50 = load i32, i32* %9
%51 = icmp slt i32 %49, %50
br i1 %51, label %52, label %105
52: ; preds = %48
%53 = load i32, i32* %7
%54 = icmp eq i32 %53, 0
br i1 %54, label %55, label %58
55: ; preds = %52
%56 = load i32, i32* @stdout
%57 = call i32 (i32, i8*, ...) @fprintf(i32 %56, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %58
58: ; preds = %55, %52
%59 = load i32, i32* @stdout
%60 = load i8*, i8** %12
%61 = getelementptr inbounds i8, i8* %60, i64 0
%62 = load i8, i8* %61
%63 = zext i8 %62 to i32
%64 = load i8*, i8** %12
%65 = getelementptr inbounds i8, i8* %64, i64 1
%66 = load i8, i8* %65
%67 = zext i8 %66 to i32
%68 = load i8*, i8** %12
%69 = getelementptr inbounds i8, i8* %68, i64 2
%70 = load i8, i8* %69
%71 = zext i8 %70 to i32
%72 = load i8*, i8** %12
%73 = getelementptr inbounds i8, i8* %72, i64 3
%74 = load i8, i8* %73
%75 = zext i8 %74 to i32
%76 = call i32 (i32, i8*, ...) @fprintf(i32 %59, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i32 %63, i32 %67, i32 %71, i32 %75)
%77 = load i8*, i8** %12
%78 = bitcast i8* %77 to i64*
%79 = load i64, i64* %78
%80 = trunc i64 %79 to i32
store i32 %80, i32* %11
%81 = load i32, i32* %11
%82 = load i32, i32* %10
%83 = xor i32 %82, %81
store i32 %83, i32* %10
%84 = load i8*, i8** %12
%85 = getelementptr inbounds i8, i8* %84, i64 4
store i8* %85, i8** %12
%86 = load i32, i32* %7
%87 = add nsw i32 %86, 1
store i32 %87, i32* %7
%88 = icmp eq i32 %87, 4
br i1 %88, label %89, label %98
89: ; preds = %58
store i32 0, i32* %7
%90 = load i32, i32* @stdout
%91 = load i32, i32* %8
%92 = load i32, i32* %6
%93 = add nsw i32 %91, %92
%94 = sub nsw i32 %93, 12
%95 = call i32 (i32, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %94)
%96 = load i32, i32* @stdout
%97 = call i32 @fflush(i32 %96)
br label %101
98: ; preds = %58
%99 = load i32, i32* @stdout
%100 = call i32 (i32, i8*, ...) @fprintf(i32 %99, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %101
101: ; preds = %98, %89
br label %102
102: ; preds = %101
%103 = load i32, i32* %6
%104 = add nsw i32 %103, 4
store i32 %104, i32* %6
br label %48
105: ; preds = %48
%106 = load i32, i32* %9
%107 = load i32, i32* %8
%108 = add nsw i32 %107, %106
store i32 %108, i32* %8
br label %39
109: ; preds = %39
%110 = load i32, i32* @stdout
%111 = call i32 (i32, i8*, ...) @fprintf(i32 %110, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%112 = load i32, i32* @stdout
%113 = load i8**, i8*** %5
%114 = getelementptr inbounds i8*, i8** %113, i64 1
%115 = load i8*, i8** %114
%116 = load i32, i32* %8
%117 = call i32 (i32, i8*, ...) @fprintf(i32 %112, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), i8* %115, i32 %116)
%118 = load i32, i32* @stdout
%119 = call i32 @fflush(i32 %118)
%120 = load i32, i32* @stdout
%121 = call i32 @fclose(i32 %120)
%122 = load i32, i32* @stderr
%123 = load i32, i32* %10
%124 = call i32 (i32, i8*, ...) @fprintf(i32 %122, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 %123)
%125 = 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 = [4 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 = [4 x i8] c"*/\0A\00"
@.str.5 = [2 x i8] c"\0A\00"
@.str.6 = [36 x i8] c"unsigned long orion_%s_start[] = {\0A\00"
@.str.7 = [2 x i8] c"\09\00"
@.str.8 = [19 x i8] c"0x%02X%02X%02X%02X\00"
@.str.9 = [12 x i8] c", /* %x */\0A\00"
@.str.10 = [2 x i8] c",\00"
@.str.11 = [6 x i8] c"0 };\0A\00"
@.str.12 = [37 x i8] c"unsigned long orion_%s_size = 0x%x;\0A\00"
@.str.13 = [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 ([4 x i8], [4 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 ([4 x i8], [4 x i8]* @.str.4, 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.5, i64 0, i64 0))
%22 = load i32, i32* @stdout
%23 = getelementptr inbounds i8*, i8** %1, i64 1
%24 = load i8*, i8** %23
%25 = tail call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0), i8* %24)
%26 = call i32 @read(i32 0, i8* %4, i32 8192)
%27 = icmp sgt i32 %26, 0
br i1 %27, label %28, label %84
28: ; preds = %11, %79
%29 = phi i32 [ %82, %79 ], [ %26, %11 ]
%30 = phi i32 [ %80, %79 ], [ 0, %11 ]
%31 = phi i32 [ %81, %79 ], [ 0, %11 ]
%32 = add nuw nsw i32 %29, 3
%33 = and i32 %32, -4
%34 = icmp eq i32 %33, 0
br i1 %34, label %79, label %35
35: ; preds = %28
%36 = add i32 %31, -12
br label %37
37: ; preds = %35, %75
%38 = phi i8* [ %4, %35 ], [ %64, %75 ]
%39 = phi i32 [ 0, %35 ], [ %77, %75 ]
%40 = phi i32 [ %30, %35 ], [ %63, %75 ]
%41 = phi i32 [ 0, %35 ], [ %76, %75 ]
%42 = icmp eq i32 %41, 0
br i1 %42, label %43, label %46
43: ; preds = %37
%44 = load i32, i32* @stdout
%45 = tail call i32 (i32, i8*, ...) @fprintf(i32 %44, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %46
46: ; preds = %43, %37
%47 = load i32, i32* @stdout
%48 = load i8, i8* %38
%49 = zext i8 %48 to i32
%50 = getelementptr inbounds i8, i8* %38, i64 1
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = getelementptr inbounds i8, i8* %38, i64 2
%54 = load i8, i8* %53
%55 = zext i8 %54 to i32
%56 = getelementptr inbounds i8, i8* %38, i64 3
%57 = load i8, i8* %56
%58 = zext i8 %57 to i32
%59 = tail call i32 (i32, i8*, ...) @fprintf(i32 %47, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.8, i64 0, i64 0), i32 %49, i32 %52, i32 %55, i32 %58)
%60 = bitcast i8* %38 to i64*
%61 = load i64, i64* %60
%62 = trunc i64 %61 to i32
%63 = xor i32 %40, %62
%64 = getelementptr inbounds i8, i8* %38, i64 4
%65 = add nsw i32 %41, 1
%66 = icmp eq i32 %65, 4
%67 = load i32, i32* @stdout
br i1 %66, label %68, label %73
68: ; preds = %46
%69 = add i32 %36, %39
%70 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.9, i64 0, i64 0), i32 %69)
%71 = load i32, i32* @stdout
%72 = tail call i32 @fflush(i32 %71)
br label %75
73: ; preds = %46
%74 = tail call i32 (i32, i8*, ...) @fprintf(i32 %67, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %75
75: ; preds = %68, %73
%76 = phi i32 [ 0, %68 ], [ %65, %73 ]
%77 = add nuw nsw i32 %39, 4
%78 = icmp slt i32 %77, %33
br i1 %78, label %37, label %79
79: ; preds = %75, %28
%80 = phi i32 [ %30, %28 ], [ %63, %75 ]
%81 = add nsw i32 %33, %31
%82 = call i32 @read(i32 0, i8* %4, i32 8192)
%83 = icmp sgt i32 %82, 0
br i1 %83, label %28, label %84
84: ; preds = %79, %11
%85 = phi i32 [ 0, %11 ], [ %81, %79 ]
%86 = phi i32 [ 0, %11 ], [ %80, %79 ]
%87 = load i32, i32* @stdout
%88 = tail call i32 (i32, i8*, ...) @fprintf(i32 %87, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.11, i64 0, i64 0))
%89 = load i32, i32* @stdout
%90 = load i8*, i8** %23
%91 = tail call i32 (i32, i8*, ...) @fprintf(i32 %89, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.12, i64 0, i64 0), i8* %90, i32 %85)
%92 = load i32, i32* @stdout
%93 = tail call i32 @fflush(i32 %92)
%94 = load i32, i32* @stdout
%95 = tail call i32 @fclose(i32 %94)
%96 = load i32, i32* @stderr
%97 = tail call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.13, i64 0, i64 0), i32 %86)
%98 = tail call i32 @exit(i32 0)
unreachable
}