#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 unsigned long off_t;

/* Variables and functions */
int /*<<< orphan*/ MAP_SHARED;
int O_RDWR;
int O_SYNC;
int PROT_READ;
int PROT_WRITE;
void *mmap(int /*<<< orphan*/, unsigned long, int, int /*<<< orphan*/, int,
           unsigned long);
int /*<<< orphan*/ munmap(void *, unsigned long);
int open(char *, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  off_t mfpTarget = 0xC0000000;
  void *mfp_map_base, *mfp_virt_base;
  int fd, func;
  unsigned long *ptr;
  int i;
  if (argc < 1) {
    printf("Usage: %s set/chk\n", argv[0]);
    return 0;
  }
  if (!strcmp(argv[1], "set"))
    func = 0;
  else
    func = 1;
  fd = open("/dev/mem", O_RDWR | O_SYNC);
  if (!fd) {
    printf("/dev/mem open failed.\n");
    return 0;
  }
  mfp_map_base = mmap(0, 67108864UL, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
                      mfpTarget & ~(67108864UL - 1));
  if (mfp_map_base == (void *)-1) {
    printf("mmap fail\n");
    return 0;
  }
  printf("Memory mapped at address %p.\n", mfp_map_base);
  mfp_virt_base = mfp_map_base + (mfpTarget & (67108864UL - 1));
  printf("Init, virtual base at %p (phys=0x%X)\n", mfp_virt_base, mfpTarget);
  ptr = mfp_virt_base;
  if (func == 0)
    for (i = 0; i < 0x01000000; i++)
      *ptr++ = i;
  else {
    for (i = 0; i < 0x01000000; i++)
      if (*ptr++ != i) {
        printf("check failed at %08x\n", i * 4);
        return -1;
      }
    printf("mem check OK\n");
    return 0;
  }
  munmap(mfp_map_base, 67108864UL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xc0000000,%eax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    119a <main+0x4a>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe79(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    138f <main+0x23f>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe6a(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11c3 <main+0x73>
movl   $0x0,-0x30(%rbp)
jmp    11ca <main+0x7a>
movl   $0x1,-0x30(%rbp)
mov    0x2e07(%rip),%rax
mov    (%rax),%esi
mov    0x2df6(%rip),%rax
or     (%rax),%esi
lea    0xe34(%rip),%rdi
call   1070 <open@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jne    120f <main+0xbf>
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    138f <main+0x23f>
mov    0x2de2(%rip),%rax
mov    (%rax),%edx
mov    0x2da1(%rip),%rax
or     (%rax),%edx
mov    0x2dc0(%rip),%rax
mov    (%rax),%ecx
mov    -0x2c(%rbp),%r8d
mov    -0x18(%rbp),%r9
and    $0xfffffffffc000000,%r9
xor    %edi,%edi
mov    $0x4000000,%esi
call   1030 <mmap@plt>
mov    %rax,-0x20(%rbp)
mov    $0xffffffffffffffff,%rax
cmp    %rax,-0x20(%rbp)
jne    1274 <main+0x124>
lea    0xdd6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    138f <main+0x23f>
mov    -0x20(%rbp),%rsi
lea    0xdc3(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
and    $0x3ffffff,%rcx
add    %rcx,%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    0xdb5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x38(%rbp)
cmpl   $0x0,-0x30(%rbp)
jne    1301 <main+0x1b1>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x1000000,-0x3c(%rbp)
jge    12fc <main+0x1ac>
movslq -0x3c(%rbp),%rcx
mov    -0x38(%rbp),%rax
mov    %rax,%rdx
add    $0x8,%rdx
mov    %rdx,-0x38(%rbp)
mov    %rcx,(%rax)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    12cb <main+0x17b>
jmp    1381 <main+0x231>
movl   $0x0,-0x3c(%rbp)
cmpl   $0x1000000,-0x3c(%rbp)
jge    1367 <main+0x217>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x8,%rcx
mov    %rcx,-0x38(%rbp)
mov    (%rax),%rax
movslq -0x3c(%rbp),%rcx
cmp    %rcx,%rax
je     1354 <main+0x204>
mov    -0x3c(%rbp),%esi
shl    $0x2,%esi
lea    0xd45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    138f <main+0x23f>
jmp    1359 <main+0x209>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1308 <main+0x1b8>
lea    0xd2e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    138f <main+0x23f>
mov    -0x20(%rbp),%rdi
mov    $0x4000000,%esi
call   1060 <munmap@plt>
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    126c <main+0x10c>
mov    0x8(%rsi),%rdi
lea    0xf2c(%rip),%rsi
call   1060 <strcmp@plt>
mov    %eax,%r14d
mov    0x2e52(%rip),%rax
mov    0x2e43(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
lea    0xf0f(%rip),%rdi
call   1080 <open@plt>
test   %eax,%eax
je     1284 <main+0x124>
mov    0x2e4c(%rip),%rcx
mov    0x2e0d(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2e2a(%rip),%rcx
mov    (%rcx),%ecx
xor    %ebp,%ebp
mov    $0x4000000,%esi
mov    $0xc0000000,%r9d
xor    %edi,%edi
mov    %eax,%r8d
call   1040 <mmap@plt>
cmp    $0xffffffffffffffff,%rax
je     1297 <main+0x137>
mov    %rax,%rbx
lea    0xec5(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xed2(%rip),%rdi
mov    $0xc0000000,%edx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r14d,%r14d
je     12a8 <main+0x148>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
cmp    (%rbx,%rax,8),%rax
jne    138b <main+0x22b>
lea    0x1(%rax),%rsi
cmp    0x8(%rbx,%rax,8),%rsi
jne    138e <main+0x22e>
lea    0x2(%rax),%rsi
cmp    0x10(%rbx,%rax,8),%rsi
jne    138e <main+0x22e>
lea    0x3(%rax),%rsi
cmp    0x18(%rbx,%rax,8),%rsi
jne    138e <main+0x22e>
add    $0x4,%rax
cmp    $0x1000000,%rax
jne    1220 <main+0xc0>
lea    0xeb6(%rip),%rdi
jmp    128b <main+0x12b>
mov    (%rsi),%rsi
lea    0xe1a(%rip),%rdi
xor    %ebp,%ebp
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13a4 <main+0x244>
lea    0xe7f(%rip),%rdi
call   1030 <puts@plt>
xor    %ebp,%ebp
jmp    13a4 <main+0x244>
lea    0xe8f(%rip),%rdi
call   1030 <puts@plt>
jmp    13a4 <main+0x244>
movdqa 0xd50(%rip),%xmm0
mov    $0xe,%eax
movdqa 0xd52(%rip),%xmm8
movdqa 0xd59(%rip),%xmm9
movdqa 0xd60(%rip),%xmm10
movdqa 0xd68(%rip),%xmm4
movdqa 0xd70(%rip),%xmm5
movdqa 0xd78(%rip),%xmm6
movdqa 0xd80(%rip),%xmm7
movdqa 0xd88(%rip),%xmm1
nopl   0x0(%rax,%rax,1)
movdqa %xmm0,%xmm2
paddq  %xmm8,%xmm2
movdqu %xmm0,-0x70(%rbx,%rax,8)
movdqu %xmm2,-0x60(%rbx,%rax,8)
movdqa %xmm0,%xmm2
paddq  %xmm9,%xmm2
movdqa %xmm0,%xmm3
paddq  %xmm10,%xmm3
movdqu %xmm2,-0x50(%rbx,%rax,8)
movdqu %xmm3,-0x40(%rbx,%rax,8)
movdqa %xmm0,%xmm2
paddq  %xmm4,%xmm2
movdqa %xmm0,%xmm3
paddq  %xmm5,%xmm3
movdqu %xmm2,-0x30(%rbx,%rax,8)
movdqu %xmm3,-0x20(%rbx,%rax,8)
movdqa %xmm0,%xmm2
paddq  %xmm6,%xmm2
movdqa %xmm0,%xmm3
paddq  %xmm7,%xmm3
movdqu %xmm2,-0x10(%rbx,%rax,8)
movdqu %xmm3,(%rbx,%rax,8)
paddq  %xmm1,%xmm0
add    $0x10,%rax
cmp    $0x100000e,%rax
jne    1300 <main+0x1a0>
mov    $0x4000000,%esi
mov    %rbx,%rdi
call   1070 <munmap@plt>
xor    %ebp,%ebp
jmp    13a4 <main+0x244>
mov    %rax,%rsi
shl    $0x2,%esi
lea    0xd5c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Usage: %s set/chk\0A\00"
@.str.1 = [4 x i8] c"set\00"
@.str.2 = [9 x i8] c"/dev/mem\00"
@O_RDWR = global i32 0
@O_SYNC = global i32 0
@.str.3 = [23 x i8] c"/dev/mem open failed.\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.4 = [11 x i8] c"mmap fail\0A\00"
@.str.5 = [30 x i8] c"Memory mapped at address %p.\0A\00"
@.str.6 = [38 x i8] c"Init, virtual base at %p (phys=0x%X)\0A\00"
@.str.7 = [22 x i8] c"check failed at %08x\0A\00"
@.str.8 = [14 x i8] c"mem check OK\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i64*
%12 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i64 3221225472, i64* %6
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 1
br i1 %14, label %15, label %20
15: ; preds = %2
%16 = load i8**, i8*** %5
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %18)
store i32 0, i32* %3
br label %101
20: ; preds = %2
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = call i32 @strcmp(i8* %23, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%25 = icmp ne i32 %24, 0
br i1 %25, label %27, label %26
26: ; preds = %20
store i32 0, i32* %10
br label %28
27: ; preds = %20
store i32 1, i32* %10
br label %28
28: ; preds = %27, %26
%29 = load i32, i32* @O_RDWR
%30 = load i32, i32* @O_SYNC
%31 = or i32 %29, %30
%32 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %31)
store i32 %32, i32* %9
%33 = load i32, i32* %9
%34 = icmp ne i32 %33, 0
br i1 %34, label %37, label %35
35: ; preds = %28
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %3
br label %101
37: ; preds = %28
%38 = load i32, i32* @PROT_READ
%39 = load i32, i32* @PROT_WRITE
%40 = or i32 %38, %39
%41 = load i32, i32* @MAP_SHARED
%42 = load i32, i32* %9
%43 = load i64, i64* %6
%44 = and i64 %43, -67108864
%45 = call i8* @mmap(i32 0, i64 67108864, i32 %40, i32 %41, i32 %42, i64 %44)
store i8* %45, i8** %7
%46 = load i8*, i8** %7
%47 = icmp eq i8* %46, inttoptr (i64 -1 to i8*)
br i1 %47, label %48, label %50
48: ; preds = %37
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0))
store i32 0, i32* %3
br label %101
50: ; preds = %37
%51 = load i8*, i8** %7
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %51)
%53 = load i8*, i8** %7
%54 = load i64, i64* %6
%55 = and i64 %54, 67108863
%56 = getelementptr i8, i8* %53, i64 %55
store i8* %56, i8** %8
%57 = load i8*, i8** %8
%58 = load i64, i64* %6
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %57, i64 %58)
%60 = load i8*, i8** %8
%61 = bitcast i8* %60 to i64*
store i64* %61, i64** %11
%62 = load i32, i32* %10
%63 = icmp eq i32 %62, 0
br i1 %63, label %64, label %77
64: ; preds = %50
store i32 0, i32* %12
br label %65
65: ; preds = %73, %64
%66 = load i32, i32* %12
%67 = icmp slt i32 %66, 16777216
br i1 %67, label %68, label %76
68: ; preds = %65
%69 = load i32, i32* %12
%70 = sext i32 %69 to i64
%71 = load i64*, i64** %11
%72 = getelementptr inbounds i64, i64* %71, i32 1
store i64* %72, i64** %11
store i64 %70, i64* %71
br label %73
73: ; preds = %68
%74 = load i32, i32* %12
%75 = add nsw i32 %74, 1
store i32 %75, i32* %12
br label %65
76: ; preds = %65
br label %98
77: ; preds = %50
store i32 0, i32* %12
br label %78
78: ; preds = %93, %77
%79 = load i32, i32* %12
%80 = icmp slt i32 %79, 16777216
br i1 %80, label %81, label %96
81: ; preds = %78
%82 = load i64*, i64** %11
%83 = getelementptr inbounds i64, i64* %82, i32 1
store i64* %83, i64** %11
%84 = load i64, i64* %82
%85 = load i32, i32* %12
%86 = sext i32 %85 to i64
%87 = icmp ne i64 %84, %86
br i1 %87, label %88, label %92
88: ; preds = %81
%89 = load i32, i32* %12
%90 = mul nsw i32 %89, 4
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %90)
store i32 -1, i32* %3
br label %101
92: ; preds = %81
br label %93
93: ; preds = %92
%94 = load i32, i32* %12
%95 = add nsw i32 %94, 1
store i32 %95, i32* %12
br label %78
96: ; preds = %78
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0))
store i32 0, i32* %3
br label %101
98: ; preds = %76
%99 = load i8*, i8** %7
%100 = call i32 @munmap(i8* %99, i64 67108864)
br label %101
101: ; preds = %98, %96, %88, %48, %35, %15
%102 = load i32, i32* %3
ret i32 %102
}

LLVM IR (-O2):
@.str = [19 x i8] c"Usage: %s set/chk\0A\00"
@.str.1 = [4 x i8] c"set\00"
@.str.2 = [9 x i8] c"/dev/mem\00"
@O_RDWR = global i32 0
@O_SYNC = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.5 = [30 x i8] c"Memory mapped at address %p.\0A\00"
@.str.6 = [38 x i8] c"Init, virtual base at %p (phys=0x%X)\0A\00"
@.str.7 = [22 x i8] c"check failed at %08x\0A\00"
@str = [22 x i8] c"/dev/mem open failed.\00"
@str.9 = [13 x i8] c"mem check OK\00"
@str.10 = [10 x i8] c"mmap fail\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 1
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5)
br label %97
7: ; preds = %2
%8 = getelementptr inbounds i8*, i8** %1, i64 1
%9 = load i8*, i8** %8
%10 = tail call i32 @strcmp(i8* dereferenceable(1) %9, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i32 %10, 0
%12 = load i32, i32* @O_RDWR
%13 = load i32, i32* @O_SYNC
%14 = or i32 %13, %12
%15 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 %14)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %7
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %97
19: ; preds = %7
%20 = load i32, i32* @PROT_READ
%21 = load i32, i32* @PROT_WRITE
%22 = or i32 %21, %20
%23 = load i32, i32* @MAP_SHARED
%24 = tail call i8* @mmap(i32 0, i64 67108864, i32 %22, i32 %23, i32 %15, i64 3221225472)
%25 = icmp eq i8* %24, inttoptr (i64 -1 to i8*)
br i1 %25, label %26, label %28
26: ; preds = %19
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str.10, i64 0, i64 0))
br label %97
28: ; preds = %19
%29 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str.5, i64 0, i64 0), i8* %24)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.6, i64 0, i64 0), i8* %24, i64 3221225472)
%31 = bitcast i8* %24 to i64*
br i1 %11, label %32, label %64
32: ; preds = %28, %32
%33 = phi i64 [ %61, %32 ], [ 0, %28 ]
%34 = phi <2 x i64> [ %62, %32 ], [ <i64 0, i64 1>, %28 ]
%35 = add <2 x i64> %34, <i64 2, i64 2>
%36 = getelementptr i64, i64* %31, i64 %33
%37 = bitcast i64* %36 to <2 x i64>*
store <2 x i64> %34, <2 x i64>* %37
%38 = getelementptr i64, i64* %36, i64 2
%39 = bitcast i64* %38 to <2 x i64>*
store <2 x i64> %35, <2 x i64>* %39
%40 = or i64 %33, 4
%41 = add <2 x i64> %34, <i64 4, i64 4>
%42 = add <2 x i64> %34, <i64 6, i64 6>
%43 = getelementptr i64, i64* %31, i64 %40
%44 = bitcast i64* %43 to <2 x i64>*
store <2 x i64> %41, <2 x i64>* %44
%45 = getelementptr i64, i64* %43, i64 2
%46 = bitcast i64* %45 to <2 x i64>*
store <2 x i64> %42, <2 x i64>* %46
%47 = or i64 %33, 8
%48 = add <2 x i64> %34, <i64 8, i64 8>
%49 = add <2 x i64> %34, <i64 10, i64 10>
%50 = getelementptr i64, i64* %31, i64 %47
%51 = bitcast i64* %50 to <2 x i64>*
store <2 x i64> %48, <2 x i64>* %51
%52 = getelementptr i64, i64* %50, i64 2
%53 = bitcast i64* %52 to <2 x i64>*
store <2 x i64> %49, <2 x i64>* %53
%54 = or i64 %33, 12
%55 = add <2 x i64> %34, <i64 12, i64 12>
%56 = add <2 x i64> %34, <i64 14, i64 14>
%57 = getelementptr i64, i64* %31, i64 %54
%58 = bitcast i64* %57 to <2 x i64>*
store <2 x i64> %55, <2 x i64>* %58
%59 = getelementptr i64, i64* %57, i64 2
%60 = bitcast i64* %59 to <2 x i64>*
store <2 x i64> %56, <2 x i64>* %60
%61 = add nuw nsw i64 %33, 16
%62 = add <2 x i64> %34, <i64 16, i64 16>
%63 = icmp eq i64 %61, 16777216
br i1 %63, label %95, label %32
64: ; preds = %28, %89
%65 = phi i64 [ %91, %89 ], [ 0, %28 ]
%66 = phi i64* [ %90, %89 ], [ %31, %28 ]
%67 = load i64, i64* %66
%68 = icmp eq i64 %67, %65
br i1 %68, label %74, label %69
69: ; preds = %84, %79, %74, %64
%70 = phi i64 [ %65, %64 ], [ %76, %74 ], [ %81, %79 ], [ %86, %84 ]
%71 = trunc i64 %70 to i32
%72 = shl nuw nsw i32 %71, 2
%73 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.7, i64 0, i64 0), i32 %72)
br label %97
74: ; preds = %64
%75 = getelementptr inbounds i64, i64* %66, i64 1
%76 = or i64 %65, 1
%77 = load i64, i64* %75
%78 = icmp eq i64 %77, %76
br i1 %78, label %79, label %69
79: ; preds = %74
%80 = getelementptr inbounds i64, i64* %66, i64 2
%81 = or i64 %65, 2
%82 = load i64, i64* %80
%83 = icmp eq i64 %82, %81
br i1 %83, label %84, label %69
84: ; preds = %79
%85 = getelementptr inbounds i64, i64* %66, i64 3
%86 = or i64 %65, 3
%87 = load i64, i64* %85
%88 = icmp eq i64 %87, %86
br i1 %88, label %89, label %69
89: ; preds = %84
%90 = getelementptr inbounds i64, i64* %66, i64 4
%91 = add nuw nsw i64 %65, 4
%92 = icmp eq i64 %91, 16777216
br i1 %92, label %93, label %64
93: ; preds = %89
%94 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.9, i64 0, i64 0))
br label %97
95: ; preds = %32
%96 = tail call i32 @munmap(i8* %24, i64 67108864)
br label %97
97: ; preds = %95, %93, %69, %26, %17, %4
%98 = phi i32 [ 0, %4 ], [ 0, %26 ], [ 0, %95 ], [ -1, %69 ], [ 0, %93 ], [ 0, %17 ]
ret i32 %98
}