#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__ int32_t;

/* Variables and functions */
void *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ PROT_READ;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(scalar_t__ *);
size_t lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
scalar_t__ memalign(int, size_t const);
int /*<<< orphan*/ memcpy(scalar_t__ *, void *, size_t);
void *mmap(int /*<<< orphan*/ *, size_t, int /*<<< orphan*/, int /*<<< orphan*/,
           int, int /*<<< orphan*/);
int /*<<< orphan*/ munmap(void *, size_t);
int open(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, scalar_t__, scalar_t__, scalar_t__,
                          scalar_t__, scalar_t__, scalar_t__);
int /*<<< orphan*/ stderr;
void load_and_simulate(const char *bin_fname) {
  int fd = open(bin_fname, O_RDONLY);
  if (fd < 0) {
    fprintf(stderr, "Cannot open file %s\n", bin_fname);
    exit(-1);
  }
  size_t len = lseek(fd, 0, SEEK_END);
  void *data = mmap(NULL, len, PROT_READ, MAP_SHARED, fd, 0);
  if (data == MAP_FAILED) {
    fprintf(stderr, "Memory map failed\n");
    close(fd);
    exit(-1);
  }
  const size_t mem_size = ((size_t)512) * 1024 * 1024;
  const size_t load_pos = (size_t)0x0;
  const size_t start_pos = (size_t)0x0;
  int32_t *mem = (int32_t *)memalign(4096, mem_size);
  if (!mem) {
    fprintf(stderr, "Cannot allocate memory\n");
    munmap(data, len);
    close(fd);
    exit(-1);
  }
  memcpy(&mem[load_pos], data, len);
  munmap(data, len);
  close(fd);
  int32_t pc = (int32_t)start_pos;
  while (((pc) >= 0 && (pc) <= (mem_size - sizeof(int32_t) * 3))) {
    int32_t A = mem[pc];
    int32_t B = mem[pc + 1];
    int32_t C = mem[pc + 2];
    printf("%8x: %8x %8x %8x: A=%d B=%d\n", pc, A, B, C,
           ((A) >= 0 && (A) <= (mem_size - sizeof(int32_t))) ? mem[A] : 0,
           ((B) >= 0 && (B) <= (mem_size - sizeof(int32_t))) ? mem[B] : 0);
    if (A < 0 || B < 0) {
      pc = 0;
      continue;
    }
    mem[B] -= mem[A];
    if (mem[B] > 0) {
      pc += 3;
    } else {
      pc = C;
    }
  }
  free(mem);
}


x86 assembly (clang, -O0):
<load_and_simulate>:
push   %rbp
mov    %rsp,%rbp
sub    $0xb0,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e06(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jge    1203 <load_and_simulate+0x53>
mov    0x2ddb(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe0e(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
mov    -0xc(%rbp),%edi
mov    0x2dcb(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
mov    0x2dd3(%rip),%rax
mov    (%rax),%edx
mov    0x2dba(%rip),%rax
mov    (%rax),%ecx
mov    -0xc(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2d69(%rip),%rcx
cmp    (%rcx),%rax
jne    1281 <load_and_simulate+0xd1>
mov    0x2d61(%rip),%rax
mov    (%rax),%edi
lea    0xdad(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1070 <close@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
movq   $0x20000000,-0x28(%rbp)
20
movq   $0x0,-0x30(%rbp)
movq   $0x0,-0x38(%rbp)
mov    $0x1000,%edi
mov    $0x20000000,%esi
call   10a0 <memalign@plt>
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x40(%rbp)
jne    12ed <load_and_simulate+0x13d>
mov    0x2d02(%rip),%rax
mov    (%rax),%edi
lea    0xd61(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10b0 <munmap@plt>
mov    -0xc(%rbp),%edi
call   1070 <close@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
mov    -0x40(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1090 <memcpy@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10b0 <munmap@plt>
mov    -0xc(%rbp),%edi
call   1070 <close@plt>
movq   $0x0,-0x48(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x48(%rbp)
mov    %al,-0x61(%rbp)
jl     1339 <load_and_simulate+0x189>
cmpq   $0x1fffffe8,-0x48(%rbp)
1f
setbe  %al
mov    %al,-0x61(%rbp)
mov    -0x61(%rbp),%al
test   $0x1,%al
jne    1349 <load_and_simulate+0x199>
jmp    14ce <load_and_simulate+0x31e>
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x50(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    0x8(%rax,%rcx,8),%rax
mov    %rax,-0x58(%rbp)
mov    -0x40(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    0x10(%rax,%rcx,8),%rax
mov    %rax,-0x60(%rbp)
mov    -0x48(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x50(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x78(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,-0x70(%rbp)
cmpq   $0x0,-0x50(%rbp)
jl     13cf <load_and_simulate+0x21f>
cmpq   $0x1ffffff8,-0x50(%rbp)
1f
ja     13cf <load_and_simulate+0x21f>
mov    -0x40(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x90(%rbp)
jmp    13dd <load_and_simulate+0x22d>
xor    %eax,%eax
mov    %rax,-0x90(%rbp)
jmp    13dd <load_and_simulate+0x22d>
mov    -0x90(%rbp),%rax
mov    %rax,-0x98(%rbp)
cmpq   $0x0,-0x58(%rbp)
jl     141c <load_and_simulate+0x26c>
cmpq   $0x1ffffff8,-0x58(%rbp)
1f
ja     141c <load_and_simulate+0x26c>
mov    -0x40(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xa0(%rbp)
jmp    142a <load_and_simulate+0x27a>
xor    %eax,%eax
mov    %rax,-0xa0(%rbp)
jmp    142a <load_and_simulate+0x27a>
mov    -0x98(%rbp),%r9
mov    -0x70(%rbp),%r8
mov    -0x78(%rbp),%rcx
mov    -0x80(%rbp),%rdx
mov    -0x88(%rbp),%rsi
mov    -0xa0(%rbp),%rax
lea    0xbee(%rip),%rdi
mov    %rax,(%rsp)
call   1050 <printf@plt>
cmpq   $0x0,-0x50(%rbp)
jl     1471 <load_and_simulate+0x2c1>
cmpq   $0x0,-0x58(%rbp)
jge    147e <load_and_simulate+0x2ce>
movq   $0x0,-0x48(%rbp)
jmp    131b <load_and_simulate+0x16b>
mov    -0x40(%rbp),%rax
mov    -0x50(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    -0x40(%rbp),%rax
mov    -0x58(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
sub    %rsi,%rdx
mov    %rdx,(%rax,%rcx,8)
mov    -0x40(%rbp),%rax
mov    -0x58(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
jle    14c1 <load_and_simulate+0x311>
mov    -0x48(%rbp),%rax
add    $0x3,%rax
mov    %rax,-0x48(%rbp)
jmp    14c9 <load_and_simulate+0x319>
mov    -0x60(%rbp),%rax
mov    %rax,-0x48(%rbp)
jmp    131b <load_and_simulate+0x16b>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
add    $0xb0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_and_simulate>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2e0b(%rip),%rax
mov    (%rax),%esi
call   10c0 <open@plt>
test   %eax,%eax
js     132d <load_and_simulate+0x17d>
mov    %eax,%r14d
mov    0x2dfa(%rip),%rax
mov    (%rax),%edx
mov    %r14d,%edi
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %rax,%rbp
mov    0x2e04(%rip),%rax
mov    (%rax),%edx
mov    0x2deb(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    %rbp,%rsi
mov    %r14d,%r8d
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,%rbx
mov    0x2d9f(%rip),%rax
cmp    (%rax),%rbx
je     1351 <load_and_simulate+0x1a1>
mov    $0x20000000,%esi
mov    $0x1000,%edi
call   10a0 <memalign@plt>
test   %rax,%rax
je     136a <load_and_simulate+0x1ba>
mov    %rax,%r15
mov    %rax,%rdi
mov    %rbx,%rsi
mov    %rbp,%rdx
call   1090 <memcpy@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10b0 <munmap@plt>
mov    %r14d,%edi
call   1070 <close@plt>
xor    %ebp,%ebp
lea    0xdd9(%rip),%r14
jmp    1282 <load_and_simulate+0xd2>
nopl   0x0(%rax)
mov    %r13,%rax
mov    %rax,%rbp
cmp    $0x1fffffe9,%rax
jae    1317 <load_and_simulate+0x167>
mov    (%r15,%rbp,8),%r12
cmp    $0x1ffffff8,%r12
ja     12a0 <load_and_simulate+0xf0>
mov    (%r15,%r12,8),%r9
jmp    12a3 <load_and_simulate+0xf3>
cs nopw 0x0(%rax,%rax,1)
nop
xor    %r9d,%r9d
mov    0x8(%r15,%rbp,8),%rbx
cmp    $0x1ffffff8,%rbx
ja     12c0 <load_and_simulate+0x110>
mov    (%r15,%rbx,8),%rax
jmp    12c2 <load_and_simulate+0x112>
nopw   0x0(%rax,%rax,1)
xor    %eax,%eax
mov    0x10(%r15,%rbp,8),%r13
mov    %rax,(%rsp)
mov    %r14,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r13,%r8
call   1050 <printf@plt>
test   %r12,%r12
js     1310 <load_and_simulate+0x160>
mov    $0x0,%eax
test   %rbx,%rbx
js     1273 <load_and_simulate+0xc3>
mov    (%r15,%r12,8),%rax
sub    %rax,(%r15,%rbx,8)
jle    1270 <load_and_simulate+0xc0>
add    $0x3,%rbp
mov    %rbp,%r13
jmp    1270 <load_and_simulate+0xc0>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
jmp    1273 <load_and_simulate+0xc3>
mov    %r15,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    0x2c8c(%rip),%rax
mov    (%rax),%edi
lea    0xcc3(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>
mov    0x2c68(%rip),%rax
mov    (%rax),%edi
lea    0xcb4(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
jmp    138c <load_and_simulate+0x1dc>
mov    0x2c4f(%rip),%rax
mov    (%rax),%edi
lea    0xcae(%rip),%rsi
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10b0 <munmap@plt>
mov    %r14d,%edi
call   1070 <close@plt>
mov    $0xffffffff,%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"Cannot open file %s\0A\00"
@SEEK_END = global i32 0
@PROT_READ = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.1 = [19 x i8] c"Memory map failed\0A\00"
@.str.2 = [24 x i8] c"Cannot allocate memory\0A\00"
@.str.3 = [29 x i8] c"%8x: %8x %8x %8x: A=%d B=%d\0A\00"
define void @load_and_simulate(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
store i8* %0, i8** %2
%14 = load i8*, i8** %2
%15 = load i32, i32* @O_RDONLY
%16 = call i32 @open(i8* %14, i32 %15)
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = icmp slt i32 %17, 0
br i1 %18, label %19, label %24
19: ; preds = %1
%20 = load i32, i32* @stderr
%21 = load i8*, i8** %2
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = call i32 @exit(i32 -1)
unreachable
24: ; preds = %1
%25 = load i32, i32* %3
%26 = load i32, i32* @SEEK_END
%27 = call i64 @lseek(i32 %25, i32 0, i32 %26)
store i64 %27, i64* %4
%28 = load i64, i64* %4
%29 = load i32, i32* @PROT_READ
%30 = load i32, i32* @MAP_SHARED
%31 = load i32, i32* %3
%32 = call i8* @mmap(i32* null, i64 %28, i32 %29, i32 %30, i32 %31, i32 0)
store i8* %32, i8** %5
%33 = load i8*, i8** %5
%34 = load i8*, i8** @MAP_FAILED
%35 = icmp eq i8* %33, %34
br i1 %35, label %36, label %42
36: ; preds = %24
%37 = load i32, i32* @stderr
%38 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%39 = load i32, i32* %3
%40 = call i32 @close(i32 %39)
%41 = call i32 @exit(i32 -1)
unreachable
42: ; preds = %24
store i64 536870912, i64* %6
store i64 0, i64* %7
store i64 0, i64* %8
%43 = call i64 @memalign(i32 4096, i64 536870912)
%44 = inttoptr i64 %43 to i64*
store i64* %44, i64** %9
%45 = load i64*, i64** %9
%46 = icmp ne i64* %45, null
br i1 %46, label %56, label %47
47: ; preds = %42
%48 = load i32, i32* @stderr
%49 = call i32 (i32, i8*, ...) @fprintf(i32 %48, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%50 = load i8*, i8** %5
%51 = load i64, i64* %4
%52 = call i32 @munmap(i8* %50, i64 %51)
%53 = load i32, i32* %3
%54 = call i32 @close(i32 %53)
%55 = call i32 @exit(i32 -1)
unreachable
56: ; preds = %42
%57 = load i64*, i64** %9
%58 = getelementptr inbounds i64, i64* %57, i64 0
%59 = load i8*, i8** %5
%60 = load i64, i64* %4
%61 = call i32 @memcpy(i64* %58, i8* %59, i64 %60)
%62 = load i8*, i8** %5
%63 = load i64, i64* %4
%64 = call i32 @munmap(i8* %62, i64 %63)
%65 = load i32, i32* %3
%66 = call i32 @close(i32 %65)
store i64 0, i64* %10
br label %67
67: ; preds = %147, %126, %56
%68 = load i64, i64* %10
%69 = icmp sge i64 %68, 0
br i1 %69, label %70, label %73
70: ; preds = %67
%71 = load i64, i64* %10
%72 = icmp ule i64 %71, 536870888
br label %73
73: ; preds = %70, %67
%74 = phi i1 [ false, %67 ], [ %72, %70 ]
br i1 %74, label %75, label %148
75: ; preds = %73
%76 = load i64*, i64** %9
%77 = load i64, i64* %10
%78 = getelementptr inbounds i64, i64* %76, i64 %77
%79 = load i64, i64* %78
store i64 %79, i64* %11
%80 = load i64*, i64** %9
%81 = load i64, i64* %10
%82 = add nsw i64 %81, 1
%83 = getelementptr inbounds i64, i64* %80, i64 %82
%84 = load i64, i64* %83
store i64 %84, i64* %12
%85 = load i64*, i64** %9
%86 = load i64, i64* %10
%87 = add nsw i64 %86, 2
%88 = getelementptr inbounds i64, i64* %85, i64 %87
%89 = load i64, i64* %88
store i64 %89, i64* %13
%90 = load i64, i64* %10
%91 = load i64, i64* %11
%92 = load i64, i64* %12
%93 = load i64, i64* %13
%94 = load i64, i64* %11
%95 = icmp sge i64 %94, 0
br i1 %95, label %96, label %104
96: ; preds = %75
%97 = load i64, i64* %11
%98 = icmp ule i64 %97, 536870904
br i1 %98, label %99, label %104
99: ; preds = %96
%100 = load i64*, i64** %9
%101 = load i64, i64* %11
%102 = getelementptr inbounds i64, i64* %100, i64 %101
%103 = load i64, i64* %102
br label %105
104: ; preds = %96, %75
br label %105
105: ; preds = %104, %99
%106 = phi i64 [ %103, %99 ], [ 0, %104 ]
%107 = load i64, i64* %12
%108 = icmp sge i64 %107, 0
br i1 %108, label %109, label %117
109: ; preds = %105
%110 = load i64, i64* %12
%111 = icmp ule i64 %110, 536870904
br i1 %111, label %112, label %117
112: ; preds = %109
%113 = load i64*, i64** %9
%114 = load i64, i64* %12
%115 = getelementptr inbounds i64, i64* %113, i64 %114
%116 = load i64, i64* %115
br label %118
117: ; preds = %109, %105
br label %118
118: ; preds = %117, %112
%119 = phi i64 [ %116, %112 ], [ 0, %117 ]
%120 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i64 %90, i64 %91, i64 %92, i64 %93, i64 %106, i64 %119)
%121 = load i64, i64* %11
%122 = icmp slt i64 %121, 0
br i1 %122, label %126, label %123
123: ; preds = %118
%124 = load i64, i64* %12
%125 = icmp slt i64 %124, 0
br i1 %125, label %126, label %127
126: ; preds = %123, %118
store i64 0, i64* %10
br label %67
127: ; preds = %123
%128 = load i64*, i64** %9
%129 = load i64, i64* %11
%130 = getelementptr inbounds i64, i64* %128, i64 %129
%131 = load i64, i64* %130
%132 = load i64*, i64** %9
%133 = load i64, i64* %12
%134 = getelementptr inbounds i64, i64* %132, i64 %133
%135 = load i64, i64* %134
%136 = sub nsw i64 %135, %131
store i64 %136, i64* %134
%137 = load i64*, i64** %9
%138 = load i64, i64* %12
%139 = getelementptr inbounds i64, i64* %137, i64 %138
%140 = load i64, i64* %139
%141 = icmp sgt i64 %140, 0
br i1 %141, label %142, label %145
142: ; preds = %127
%143 = load i64, i64* %10
%144 = add nsw i64 %143, 3
store i64 %144, i64* %10
br label %147
145: ; preds = %127
%146 = load i64, i64* %13
store i64 %146, i64* %10
br label %147
147: ; preds = %145, %142
br label %67
148: ; preds = %73
%149 = load i64*, i64** %9
%150 = call i32 @free(i64* %149)
ret void
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
@stderr = global i32 0
@.str = [21 x i8] c"Cannot open file %s\0A\00"
@SEEK_END = global i32 0
@PROT_READ = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.1 = [19 x i8] c"Memory map failed\0A\00"
@.str.2 = [24 x i8] c"Cannot allocate memory\0A\00"
@.str.3 = [29 x i8] c"%8x: %8x %8x %8x: A=%d B=%d\0A\00"
define void @load_and_simulate(i8* %0) {
%2 = load i32, i32* @O_RDONLY
%3 = tail call i32 @open(i8* %0, i32 %2)
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %0)
%8 = tail call i32 @exit(i32 -1)
unreachable
9: ; preds = %1
%10 = load i32, i32* @SEEK_END
%11 = tail call i64 @lseek(i32 %3, i32 0, i32 %10)
%12 = load i32, i32* @PROT_READ
%13 = load i32, i32* @MAP_SHARED
%14 = tail call i8* @mmap(i32* null, i64 %11, i32 %12, i32 %13, i32 %3, i32 0)
%15 = load i8*, i8** @MAP_FAILED
%16 = icmp eq i8* %14, %15
br i1 %16, label %17, label %22
17: ; preds = %9
%18 = load i32, i32* @stderr
%19 = tail call i32 (i32, i8*, ...) @fprintf(i32 %18, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0))
%20 = tail call i32 @close(i32 %3)
%21 = tail call i32 @exit(i32 -1)
unreachable
22: ; preds = %9
%23 = tail call i64 @memalign(i32 4096, i64 536870912)
%24 = inttoptr i64 %23 to i64*
%25 = icmp eq i64 %23, 0
br i1 %25, label %26, label %32
26: ; preds = %22
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%29 = tail call i32 @munmap(i8* %14, i64 %11)
%30 = tail call i32 @close(i32 %3)
%31 = tail call i32 @exit(i32 -1)
unreachable
32: ; preds = %22
%33 = tail call i32 @memcpy(i64* %24, i8* %14, i64 %11)
%34 = tail call i32 @munmap(i8* %14, i64 %11)
%35 = tail call i32 @close(i32 %3)
br label %36
36: ; preds = %32, %71
%37 = phi i64 [ 0, %32 ], [ %72, %71 ]
%38 = getelementptr inbounds i64, i64* %24, i64 %37
%39 = load i64, i64* %38
%40 = add nuw nsw i64 %37, 1
%41 = getelementptr inbounds i64, i64* %24, i64 %40
%42 = load i64, i64* %41
%43 = add nuw nsw i64 %37, 2
%44 = getelementptr inbounds i64, i64* %24, i64 %43
%45 = load i64, i64* %44
%46 = icmp ult i64 %39, 536870905
br i1 %46, label %47, label %50
47: ; preds = %36
%48 = getelementptr inbounds i64, i64* %24, i64 %39
%49 = load i64, i64* %48
br label %50
50: ; preds = %36, %47
%51 = phi i64 [ %49, %47 ], [ 0, %36 ]
%52 = icmp ult i64 %42, 536870905
br i1 %52, label %53, label %56
53: ; preds = %50
%54 = getelementptr inbounds i64, i64* %24, i64 %42
%55 = load i64, i64* %54
br label %56
56: ; preds = %50, %53
%57 = phi i64 [ %55, %53 ], [ 0, %50 ]
%58 = tail call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i64 %37, i64 %39, i64 %42, i64 %45, i64 %51, i64 %57)
%59 = icmp slt i64 %39, 0
%60 = icmp slt i64 %42, 0
%61 = select i1 %59, i1 true, i1 %60
br i1 %61, label %71, label %62
62: ; preds = %56
%63 = getelementptr inbounds i64, i64* %24, i64 %39
%64 = load i64, i64* %63
%65 = getelementptr inbounds i64, i64* %24, i64 %42
%66 = load i64, i64* %65
%67 = sub nsw i64 %66, %64
store i64 %67, i64* %65
%68 = icmp sgt i64 %67, 0
%69 = add nuw nsw i64 %37, 3
%70 = select i1 %68, i64 %69, i64 %45
br label %71
71: ; preds = %56, %62
%72 = phi i64 [ %70, %62 ], [ 0, %56 ]
%73 = icmp ult i64 %72, 536870889
br i1 %73, label %36, label %74
74: ; preds = %71
%75 = tail call i32 @free(i64* %24)
ret void
}