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

/* Forward declarations */

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

/* Variables and functions */
int /*<<< orphan*/ MAP_PRIVATE;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ PROT_READ;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
size_t fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fwrite(char *, int, size_t, int /*<<< orphan*/ *);
unsigned int *mmap(int /*<<< orphan*/, size_t, int /*<<< orphan*/,
                   int /*<<< orphan*/, int, int /*<<< orphan*/);
int /*<<< orphan*/ munmap(unsigned int *, size_t);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
char *strerror(int /*<<< orphan*/);
int main(int argc, char **argv) {
  if (argc < 1 + 3) {
    fprintf(stderr, "Usage: %s table16g input output\n", argv[0]);
    return 1;
  }
  const char *table16g_fname = argv[1];
  int table16g_fd = open(table16g_fname, O_RDONLY);
  size_t table16g_size =
      (size_t)(256 * 256) * (size_t)(256 * 256) * sizeof(int);
  unsigned int *int_translate =
      mmap(0, table16g_size, PROT_READ, MAP_PRIVATE, table16g_fd, 0);
  if (!int_translate) {
    fprintf(stderr, "Can't mmap table16g\n");
    return 1;
  }
  const char *input_fname = argv[2];
  const char *output_fname = argv[3];
  FILE *input = fopen(input_fname, "rb");
  if (!input) {
    fprintf(stderr, "Can't open %s: %s\n", input_fname, strerror(errno));
    return 1;
  }
  FILE *output = fopen(output_fname, "wb");
  if (!output) {
    fprintf(stderr, "Can't open %s: %s\n", output_fname, strerror(errno));
    return 1;
  }
  char input_buffer[(1024 * 1024)];
  int *input_it;
  int *input_buffer_end = (int *)(input_buffer + (1024 * 1024));
  char output_buffer[(1024 * 1024)];
  int *output_it;
  size_t nread;
  while (nread = fread(input_buffer, 1, (1024 * 1024), input)) {
    for (input_it = (unsigned int *)input_buffer,
        output_it = (unsigned int *)output_buffer;
         input_it < input_buffer_end; input_it++, output_it++) {
      *output_it = int_translate[*input_it];
    }
    fwrite(output_buffer, 1, nread, output);
  }
  fclose(input);
  fclose(output);
  munmap(int_translate, table16g_size);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200090,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    11dd <main+0x4d>
mov    0x2e16(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe36(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2c6>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2dec(%rip),%rax
mov    (%rax),%esi
call   1080 <open@plt>
mov    %eax,-0x1c(%rbp)
movabs $0x400000000,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    0x2de1(%rip),%rax
mov    (%rax),%edx
mov    0x2da0(%rip),%rax
mov    (%rax),%ecx
mov    -0x1c(%rbp),%r8d
xor    %r9d,%r9d
mov    %r9d,%edi
call   1050 <mmap@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jne    1263 <main+0xd3>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
lea    0xdd1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2c6>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
lea    0xdb0(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x48(%rbp)
jne    12ec <main+0x15c>
mov    0x2d2f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20007c(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x200078(%rbp)
mov    0x2d0d(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x20007c(%rbp),%edi
mov    -0x200078(%rbp),%rdx
mov    %rax,%rcx
lea    0xd60(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2c6>
mov    -0x40(%rbp),%rdi
lea    0xd55(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    135d <main+0x1cd>
mov    0x2cbe(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20008c(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x200088(%rbp)
mov    0x2c9c(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
mov    -0x20008c(%rbp),%edi
mov    -0x200088(%rbp),%rdx
mov    %rax,%rcx
lea    0xcef(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1456 <main+0x2c6>
lea    -0x100050(%rbp),%rax
add    $0x100000,%rax
mov    %rax,-0x100060(%rbp)
lea    -0x100050(%rbp),%rdi
mov    -0x48(%rbp),%rcx
mov    $0x1,%esi
mov    $0x100000,%edx
call   1030 <fread@plt>
mov    %rax,-0x200070(%rbp)
cmp    $0x0,%rax
je     1430 <main+0x2a0>
lea    -0x100050(%rbp),%rax
mov    %rax,-0x100058(%rbp)
lea    -0x200060(%rbp),%rax
mov    %rax,-0x200068(%rbp)
mov    -0x100058(%rbp),%rax
cmp    -0x100060(%rbp),%rax
jae    140f <main+0x27f>
mov    -0x30(%rbp),%rax
mov    -0x100058(%rbp),%rcx
movslq (%rcx),%rcx
mov    (%rax,%rcx,4),%ecx
mov    -0x200068(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x100058(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x100058(%rbp)
mov    -0x200068(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x200068(%rbp)
jmp    13b8 <main+0x228>
lea    -0x200060(%rbp),%rdi
mov    -0x200070(%rbp),%rdx
mov    -0x50(%rbp),%rcx
mov    $0x1,%esi
call   10a0 <fwrite@plt>
jmp    1371 <main+0x1e1>
mov    -0x48(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x50(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1070 <munmap@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200090,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x200008,%rsp
mov    %rsi,%rbp
cmp    $0x3,%edi
jg     11c9 <main+0x39>
mov    0x2e20(%rip),%rax
mov    (%rax),%edi
mov    0x0(%rbp),%rdx
lea    0xe43(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1363 <main+0x1d3>
movabs $0x400000000,%rbx
mov    0x8(%rbp),%rdi
mov    0x2e02(%rip),%rax
mov    (%rax),%esi
call   1080 <open@plt>
mov    0x2e0c(%rip),%rcx
mov    (%rcx),%edx
mov    0x2dcb(%rip),%rcx
mov    (%rcx),%ecx
xor    %edi,%edi
mov    %rbx,%rsi
mov    %eax,%r8d
xor    %r9d,%r9d
call   1050 <mmap@plt>
test   %rax,%rax
je     12f8 <main+0x168>
mov    %rax,%rbx
mov    0x10(%rbp),%r12
mov    0x18(%rbp),%rbp
lea    0xe14(%rip),%rsi
mov    %r12,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     1311 <main+0x181>
mov    %rax,%r15
lea    0xe0f(%rip),%rsi
mov    %rbp,%rdi
call   1090 <fopen@plt>
test   %rax,%rax
je     1336 <main+0x1a6>
mov    %rax,%r12
mov    %rsp,%r13
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x100000,%edx
mov    %r15,%rcx
call   1030 <fread@plt>
test   %rax,%rax
je     12d2 <main+0x142>
lea    0x100000(%rsp),%r14
lea    0x100000(%rsp),%rbp
xchg   %ax,%ax
mov    %rbp,%rcx
mov    %r13,%rdx
cs nopw 0x0(%rax,%rax,1)
movslq (%rdx),%rsi
mov    (%rbx,%rsi,4),%esi
mov    %esi,(%rcx)
add    $0x4,%rdx
add    $0x4,%rcx
cmp    %r14,%rdx
jb     1290 <main+0x100>
mov    %rbp,%rdi
mov    $0x1,%esi
mov    %rax,%rdx
mov    %r12,%rcx
call   10a0 <fwrite@plt>
mov    %r13,%rdi
mov    $0x1,%esi
mov    $0x100000,%edx
mov    %r15,%rcx
call   1030 <fread@plt>
test   %rax,%rax
jne    1280 <main+0xf0>
mov    %r15,%rdi
call   1040 <fclose@plt>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
movabs $0x400000000,%rsi
call   1070 <munmap@plt>
xor    %eax,%eax
jmp    1368 <main+0x1d8>
mov    0x2cd1(%rip),%rax
mov    (%rax),%edi
lea    0xd19(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1363 <main+0x1d3>
mov    0x2cb8(%rip),%rax
mov    (%rax),%ebx
mov    0x2ca7(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xd0a(%rip),%rsi
mov    %ebx,%edi
mov    %r12,%rdx
jmp    1359 <main+0x1c9>
mov    0x2c93(%rip),%rax
mov    (%rax),%ebx
mov    0x2c82(%rip),%rax
mov    (%rax),%edi
call   10b0 <strerror@plt>
lea    0xce5(%rip),%rsi
mov    %ebx,%edi
mov    %rbp,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%eax
add    $0x200008,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"Usage: %s table16g input output\0A\00"
@O_RDONLY = global i32 0
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
@.str.1 = [21 x i8] c"Can't mmap table16g\0A\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [19 x i8] c"Can't open %s: %s\0A\00"
@errno = global i32 0
@.str.4 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i64
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32*
%13 = alloca i32*
%14 = alloca [1048576 x i8]
%15 = alloca i32*
%16 = alloca i32*
%17 = alloca [1048576 x i8]
%18 = alloca i32*
%19 = alloca i64
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%20 = load i32, i32* %4
%21 = icmp slt i32 %20, 4
br i1 %21, label %22, label %28
22: ; preds = %2
%23 = load i32, i32* @stderr
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 0
%26 = load i8*, i8** %25
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %26)
store i32 1, i32* %3
br label %117
28: ; preds = %2
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
store i8* %31, i8** %6
%32 = load i8*, i8** %6
%33 = load i32, i32* @O_RDONLY
%34 = call i32 @open(i8* %32, i32 %33)
store i32 %34, i32* %7
store i64 17179869184, i64* %8
%35 = load i64, i64* %8
%36 = load i32, i32* @PROT_READ
%37 = load i32, i32* @MAP_PRIVATE
%38 = load i32, i32* %7
%39 = call i32* @mmap(i32 0, i64 %35, i32 %36, i32 %37, i32 %38, i32 0)
store i32* %39, i32** %9
%40 = load i32*, i32** %9
%41 = icmp ne i32* %40, null
br i1 %41, label %45, label %42
42: ; preds = %28
%43 = load i32, i32* @stderr
%44 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* %3
br label %117
45: ; preds = %28
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 2
%48 = load i8*, i8** %47
store i8* %48, i8** %10
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 3
%51 = load i8*, i8** %50
store i8* %51, i8** %11
%52 = load i8*, i8** %10
%53 = call i32* @fopen(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
store i32* %53, i32** %12
%54 = load i32*, i32** %12
%55 = icmp ne i32* %54, null
br i1 %55, label %62, label %56
56: ; preds = %45
%57 = load i32, i32* @stderr
%58 = load i8*, i8** %10
%59 = load i32, i32* @errno
%60 = call i8* @strerror(i32 %59)
%61 = call i32 (i32, i8*, ...) @fprintf(i32 %57, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %58, i8* %60)
store i32 1, i32* %3
br label %117
62: ; preds = %45
%63 = load i8*, i8** %11
%64 = call i32* @fopen(i8* %63, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %64, i32** %13
%65 = load i32*, i32** %13
%66 = icmp ne i32* %65, null
br i1 %66, label %73, label %67
67: ; preds = %62
%68 = load i32, i32* @stderr
%69 = load i8*, i8** %11
%70 = load i32, i32* @errno
%71 = call i8* @strerror(i32 %70)
%72 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %69, i8* %71)
store i32 1, i32* %3
br label %117
73: ; preds = %62
%74 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %14, i64 0, i64 0
%75 = getelementptr inbounds i8, i8* %74, i64 1048576
%76 = bitcast i8* %75 to i32*
store i32* %76, i32** %16
br label %77
77: ; preds = %104, %73
%78 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %14, i64 0, i64 0
%79 = load i32*, i32** %12
%80 = call i64 @fread(i8* %78, i32 1, i32 1048576, i32* %79)
store i64 %80, i64* %19
%81 = icmp ne i64 %80, 0
br i1 %81, label %82, label %109
82: ; preds = %77
%83 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %14, i64 0, i64 0
%84 = bitcast i8* %83 to i32*
store i32* %84, i32** %15
%85 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %17, i64 0, i64 0
%86 = bitcast i8* %85 to i32*
store i32* %86, i32** %18
br label %87
87: ; preds = %99, %82
%88 = load i32*, i32** %15
%89 = load i32*, i32** %16
%90 = icmp ult i32* %88, %89
br i1 %90, label %91, label %104
91: ; preds = %87
%92 = load i32*, i32** %9
%93 = load i32*, i32** %15
%94 = load i32, i32* %93
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i32, i32* %92, i64 %95
%97 = load i32, i32* %96
%98 = load i32*, i32** %18
store i32 %97, i32* %98
br label %99
99: ; preds = %91
%100 = load i32*, i32** %15
%101 = getelementptr inbounds i32, i32* %100, i32 1
store i32* %101, i32** %15
%102 = load i32*, i32** %18
%103 = getelementptr inbounds i32, i32* %102, i32 1
store i32* %103, i32** %18
br label %87
104: ; preds = %87
%105 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %17, i64 0, i64 0
%106 = load i64, i64* %19
%107 = load i32*, i32** %13
%108 = call i32 @fwrite(i8* %105, i32 1, i64 %106, i32* %107)
br label %77
109: ; preds = %77
%110 = load i32*, i32** %12
%111 = call i32 @fclose(i32* %110)
%112 = load i32*, i32** %13
%113 = call i32 @fclose(i32* %112)
%114 = load i32*, i32** %9
%115 = load i64, i64* %8
%116 = call i32 @munmap(i32* %114, i64 %115)
store i32 0, i32* %3
br label %117
117: ; preds = %109, %67, %56, %42, %22
%118 = load i32, i32* %3
ret i32 %118
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"Usage: %s table16g input output\0A\00"
@O_RDONLY = global i32 0
@PROT_READ = global i32 0
@MAP_PRIVATE = global i32 0
@.str.1 = [21 x i8] c"Can't mmap table16g\0A\00"
@.str.2 = [3 x i8] c"rb\00"
@.str.3 = [19 x i8] c"Can't open %s: %s\0A\00"
@errno = global i32 0
@.str.4 = [3 x i8] c"wb\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1048576 x i8]
%4 = alloca [1048576 x i8]
%5 = icmp slt i32 %0, 4
br i1 %5, label %6, label %10
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 ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %72
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = load i32, i32* @O_RDONLY
%14 = tail call i32 @open(i8* %12, i32 %13)
%15 = load i32, i32* @PROT_READ
%16 = load i32, i32* @MAP_PRIVATE
%17 = tail call i32* @mmap(i32 0, i64 17179869184, i32 %15, i32 %16, i32 %14, i32 0)
%18 = icmp eq i32* %17, null
br i1 %18, label %19, label %22
19: ; preds = %10
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0))
br label %72
22: ; preds = %10
%23 = getelementptr inbounds i8*, i8** %1, i64 2
%24 = load i8*, i8** %23
%25 = getelementptr inbounds i8*, i8** %1, i64 3
%26 = load i8*, i8** %25
%27 = tail call i32* @fopen(i8* %24, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %34
29: ; preds = %22
%30 = load i32, i32* @stderr
%31 = load i32, i32* @errno
%32 = tail call i8* @strerror(i32 %31)
%33 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %24, i8* %32)
br label %72
34: ; preds = %22
%35 = tail call i32* @fopen(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = load i32, i32* @stderr
%39 = load i32, i32* @errno
%40 = tail call i8* @strerror(i32 %39)
%41 = tail call i32 (i32, i8*, ...) @fprintf(i32 %38, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8* %26, i8* %40)
br label %72
42: ; preds = %34
%43 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %3, i64 0, i64 0
%44 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %3, i64 0, i64 1048576
%45 = bitcast i8* %44 to i32*
%46 = getelementptr inbounds [1048576 x i8], [1048576 x i8]* %4, i64 0, i64 0
%47 = call i64 @fread(i8* %43, i32 1, i32 1048576, i32* %27)
%48 = icmp eq i64 %47, 0
br i1 %48, label %68, label %49
49: ; preds = %42
%50 = bitcast [1048576 x i8]* %3 to i32*
%51 = bitcast [1048576 x i8]* %4 to i32*
br label %52
52: ; preds = %49, %64
%53 = phi i64 [ %47, %49 ], [ %66, %64 ]
br label %54
54: ; preds = %52, %54
%55 = phi i32* [ %51, %52 ], [ %62, %54 ]
%56 = phi i32* [ %50, %52 ], [ %61, %54 ]
%57 = load i32, i32* %56
%58 = sext i32 %57 to i64
%59 = getelementptr inbounds i32, i32* %17, i64 %58
%60 = load i32, i32* %59
store i32 %60, i32* %55
%61 = getelementptr inbounds i32, i32* %56, i64 1
%62 = getelementptr inbounds i32, i32* %55, i64 1
%63 = icmp ult i32* %61, %45
br i1 %63, label %54, label %64
64: ; preds = %54
%65 = call i32 @fwrite(i8* %46, i32 1, i64 %53, i32* %35)
%66 = call i64 @fread(i8* %43, i32 1, i32 1048576, i32* %27)
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %52
68: ; preds = %64, %42
%69 = call i32 @fclose(i32* %27)
%70 = call i32 @fclose(i32* %35)
%71 = call i32 @munmap(i32* %17, i64 17179869184)
br label %72
72: ; preds = %19, %37, %68, %29, %6
%73 = phi i32 [ 1, %6 ], [ 1, %19 ], [ 1, %29 ], [ 0, %68 ], [ 1, %37 ]
ret i32 %73
}