#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*/ off_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ MAP_SHARED;
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ SEEK_END;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int ftell(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(void *, char *, int);
void *mmap(int /*<<< orphan*/, int, int, int /*<<< orphan*/, int, unsigned int);
int /*<<< orphan*/ munmap(void *, int);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ set_stack_pc(int, unsigned long, unsigned long);
int load_m4_fw(int fd, char *filepath, unsigned int loadaddr) {
  int n;
  int size;
  FILE *fdf;
  off_t target;
  char *filebuffer;
  void *map_base, *virt_addr;
  unsigned long stack, pc;
  fdf = fopen(filepath, "rb");
  fseek(fdf, 0, SEEK_END);
  size = ftell(fdf);
  fseek(fdf, 0, SEEK_SET);
  if (size > 512 * 1024) {
    printf("%s - File size too big, can't load: %d > %d \n", "UDOONeo", size,
           512 * 1024);
    return -2;
  }
  filebuffer = (char *)malloc(size + 1);
  if (size != fread(filebuffer, sizeof(char), size, fdf)) {
    free(filebuffer);
    return -2;
  }
  fclose(fdf);
  stack = (filebuffer[0] | (filebuffer[1] << 8) | (filebuffer[2] << 16) |
           (filebuffer[3] << 24));
  pc = (filebuffer[4] | (filebuffer[5] << 8) | (filebuffer[6] << 16) |
        (filebuffer[7] << 24));
  if (loadaddr == 0x0) {
    loadaddr = pc & 0xFFFF0000;
  }
  printf("%s - FILENAME = %s; loadaddr = 0x%08x\n", "UDOONeo", filepath,
         loadaddr);
  map_base = mmap(0, 512 * 1024, PROT_READ | PROT_WRITE, MAP_SHARED, fd,
                  loadaddr & ~(512 * 1024 - 1));
  printf("%s - start - end (0x%08x - 0x%08x)\n", "UDOONeo",
         loadaddr & ~(512 * 1024 - 1),
         (loadaddr & ~(512 * 1024 - 1)) + 512 * 1024);
  virt_addr = (unsigned char *)map_base + (loadaddr & (512 * 1024 - 1));
  memcpy(virt_addr, filebuffer, size);
  munmap(map_base, 512 * 1024);
  set_stack_pc(fd, stack, pc);
  free(filebuffer);
  return size;
}


x86 assembly (clang, -O0):
<load_m4_fw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe23(%rip),%rsi
call   10e0 <fopen@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2de7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    -0x28(%rbp),%rdi
call   1090 <ftell@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x28(%rbp),%rdi
mov    0x2db7(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   10c0 <fseek@plt>
cmpl   $0x80000,-0x1c(%rbp)
jle    1250 <load_m4_fw+0x90>
mov    -0x1c(%rbp),%edx
lea    0xdd2(%rip),%rdi
lea    0xdf9(%rip),%rsi
mov    $0x80000,%ecx
mov    $0x0,%al
call   1070 <printf@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    13ff <load_m4_fw+0x23f>
mov    -0x1c(%rbp),%edi
add    $0x1,%edi
call   10b0 <malloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x1c(%rbp),%edx
mov    -0x28(%rbp),%rcx
mov    $0x1,%esi
call   1040 <fread@plt>
mov    %eax,%ecx
mov    -0x5c(%rbp),%eax
cmp    %ecx,%eax
je     129c <load_m4_fw+0xdc>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
movl   $0xfffffffe,-0x4(%rbp)
jmp    13ff <load_m4_fw+0x23f>
mov    -0x28(%rbp),%rdi
call   1050 <fclose@plt>
mov    -0x38(%rbp),%rax
movsbl (%rax),%eax
mov    -0x38(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x38(%rbp),%rcx
movsbl 0x2(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x38(%rbp),%rcx
movsbl 0x3(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
cltq
mov    %rax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
movsbl 0x4(%rax),%eax
mov    -0x38(%rbp),%rcx
movsbl 0x5(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x38(%rbp),%rcx
movsbl 0x6(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x38(%rbp),%rcx
movsbl 0x7(%rcx),%ecx
shl    $0x18,%ecx
or     %ecx,%eax
cltq
mov    %rax,-0x58(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1329 <load_m4_fw+0x169>
movabs $0xffff0000,%rax
and    -0x58(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
lea    0xd02(%rip),%rdi
lea    0xcf3(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    0x2cac(%rip),%rax
mov    (%rax),%edx
mov    0x2c6b(%rip),%rax
or     (%rax),%edx
mov    0x2c8a(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%r8d
mov    -0x14(%rbp),%r9d
and    $0xfff80000,%r9d
xor    %edi,%edi
mov    $0x80000,%esi
call   1060 <mmap@plt>
mov    %rax,-0x40(%rbp)
mov    -0x14(%rbp),%edx
and    $0xfff80000,%edx
mov    -0x14(%rbp),%ecx
and    $0xfff80000,%ecx
add    $0x80000,%ecx
lea    0xcc2(%rip),%rdi
lea    0xc8c(%rip),%rsi
mov    $0x0,%al
call   1070 <printf@plt>
mov    -0x40(%rbp),%rax
mov    -0x14(%rbp),%ecx
and    $0x7ffff,%ecx
mov    %ecx,%ecx
add    %rcx,%rax
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rdi
mov    -0x38(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   10a0 <memcpy@plt>
mov    -0x40(%rbp),%rdi
mov    $0x80000,%esi
call   10d0 <munmap@plt>
mov    -0x8(%rbp),%edi
mov    -0x50(%rbp),%rsi
mov    -0x58(%rbp),%rdx
call   1080 <set_stack_pc@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_m4_fw>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %edx,%r12d
mov    %rsi,%r15
mov    %edi,%r13d
lea    0xe22(%rip),%rsi
mov    %r15,%rdi
call   10e0 <fopen@plt>
mov    %rax,%rbp
mov    0x2de8(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   10c0 <fseek@plt>
mov    %rbp,%rdi
call   1090 <ftell@plt>
mov    %eax,%ebx
mov    0x2dbb(%rip),%rax
mov    (%rax),%edx
mov    %rbp,%rdi
xor    %esi,%esi
call   10c0 <fseek@plt>
cmp    $0x80001,%ebx
jl     1242 <load_m4_fw+0x82>
lea    0xddb(%rip),%rdi
lea    0xe02(%rip),%rsi
mov    %ebx,%edx
mov    $0x80000,%ecx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    1393 <load_m4_fw+0x1d3>
lea    0x1(%rbx),%edi
call   10b0 <malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    $0x1,%esi
mov    %ebx,%edx
mov    %rbp,%rcx
call   1040 <fread@plt>
cmp    %eax,%ebx
jne    138b <load_m4_fw+0x1cb>
mov    %rbp,%rdi
call   1050 <fclose@plt>
movsbl (%r14),%eax
movsbl 0x1(%r14),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movsbl 0x2(%r14),%eax
shl    $0x10,%eax
movzbl 0x3(%r14),%edx
shl    $0x18,%edx
or     %eax,%edx
or     %ecx,%edx
movslq %edx,%rax
mov    %rax,0x10(%rsp)
movsbl 0x4(%r14),%eax
movsbl 0x5(%r14),%ecx
shl    $0x8,%ecx
or     %eax,%ecx
movsbl 0x6(%r14),%eax
shl    $0x10,%eax
movzbl 0x7(%r14),%edx
shl    $0x18,%edx
or     %eax,%edx
or     %ecx,%edx
movslq %edx,%rax
mov    %rax,0x8(%rsp)
mov    %r12d,%ecx
mov    %r13d,%r12d
mov    %eax,%r13d
and    $0xffff0000,%r13d
test   %ecx,%ecx
cmovne %ecx,%r13d
lea    0xd58(%rip),%rdi
lea    0xd49(%rip),%rsi
mov    %r15,%rdx
mov    %r13d,%ecx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x2cfc(%rip),%rax
mov    0x2cbd(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2cda(%rip),%rax
mov    (%rax),%ecx
mov    %r13d,%ebp
and    $0xfff80000,%ebp
xor    %edi,%edi
mov    $0x80000,%esi
mov    %r12d,%r8d
mov    %ebp,%r9d
call   1060 <mmap@plt>
mov    %rax,%r15
lea    0x80000(%rbp),%ecx
lea    0xd25(%rip),%rdi
lea    0xcef(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1070 <printf@plt>
and    $0x7ffff,%r13d
add    %r15,%r13
mov    %r13,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   10a0 <memcpy@plt>
mov    %r15,%rdi
mov    $0x80000,%esi
call   10d0 <munmap@plt>
mov    %r12d,%edi
mov    0x10(%rsp),%rsi
mov    0x8(%rsp),%rdx
call   1080 <set_stack_pc@plt>
mov    %r14,%rdi
call   1030 <free@plt>
jmp    1398 <load_m4_fw+0x1d8>
mov    %r14,%rdi
call   1030 <free@plt>
mov    $0xfffffffe,%ebx
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.1 = [46 x i8] c"%s - File size too big, can't load: %d > %d \0A\00"
@.str.2 = [8 x i8] c"UDOONeo\00"
@.str.3 = [39 x i8] c"%s - FILENAME = %s; loadaddr = 0x%08x\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.4 = [36 x i8] c"%s - start - end (0x%08x - 0x%08x)\0A\00"
define i32 @load_m4_fw(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32*
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i64
%16 = alloca i64
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%17 = load i8*, i8** %6
%18 = call i32* @fopen(i8* %17, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %18, i32** %10
%19 = load i32*, i32** %10
%20 = load i32, i32* @SEEK_END
%21 = call i32 @fseek(i32* %19, i32 0, i32 %20)
%22 = load i32*, i32** %10
%23 = call i32 @ftell(i32* %22)
store i32 %23, i32* %9
%24 = load i32*, i32** %10
%25 = load i32, i32* @SEEK_SET
%26 = call i32 @fseek(i32* %24, i32 0, i32 %25)
%27 = load i32, i32* %9
%28 = icmp sgt i32 %27, 524288
br i1 %28, label %29, label %32
29: ; preds = %3
%30 = load i32, i32* %9
%31 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %30, i32 524288)
store i32 -2, i32* %4
br label %137
32: ; preds = %3
%33 = load i32, i32* %9
%34 = add nsw i32 %33, 1
%35 = call i64 @malloc(i32 %34)
%36 = inttoptr i64 %35 to i8*
store i8* %36, i8** %12
%37 = load i32, i32* %9
%38 = load i8*, i8** %12
%39 = load i32, i32* %9
%40 = load i32*, i32** %10
%41 = call i32 @fread(i8* %38, i32 1, i32 %39, i32* %40)
%42 = icmp ne i32 %37, %41
br i1 %42, label %43, label %46
43: ; preds = %32
%44 = load i8*, i8** %12
%45 = call i32 @free(i8* %44)
store i32 -2, i32* %4
br label %137
46: ; preds = %32
%47 = load i32*, i32** %10
%48 = call i32 @fclose(i32* %47)
%49 = load i8*, i8** %12
%50 = getelementptr inbounds i8, i8* %49, i64 0
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = load i8*, i8** %12
%54 = getelementptr inbounds i8, i8* %53, i64 1
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = shl i32 %56, 8
%58 = or i32 %52, %57
%59 = load i8*, i8** %12
%60 = getelementptr inbounds i8, i8* %59, i64 2
%61 = load i8, i8* %60
%62 = sext i8 %61 to i32
%63 = shl i32 %62, 16
%64 = or i32 %58, %63
%65 = load i8*, i8** %12
%66 = getelementptr inbounds i8, i8* %65, i64 3
%67 = load i8, i8* %66
%68 = sext i8 %67 to i32
%69 = shl i32 %68, 24
%70 = or i32 %64, %69
%71 = sext i32 %70 to i64
store i64 %71, i64* %15
%72 = load i8*, i8** %12
%73 = getelementptr inbounds i8, i8* %72, i64 4
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = load i8*, i8** %12
%77 = getelementptr inbounds i8, i8* %76, i64 5
%78 = load i8, i8* %77
%79 = sext i8 %78 to i32
%80 = shl i32 %79, 8
%81 = or i32 %75, %80
%82 = load i8*, i8** %12
%83 = getelementptr inbounds i8, i8* %82, i64 6
%84 = load i8, i8* %83
%85 = sext i8 %84 to i32
%86 = shl i32 %85, 16
%87 = or i32 %81, %86
%88 = load i8*, i8** %12
%89 = getelementptr inbounds i8, i8* %88, i64 7
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = shl i32 %91, 24
%93 = or i32 %87, %92
%94 = sext i32 %93 to i64
store i64 %94, i64* %16
%95 = load i32, i32* %7
%96 = icmp eq i32 %95, 0
br i1 %96, label %97, label %101
97: ; preds = %46
%98 = load i64, i64* %16
%99 = and i64 %98, 4294901760
%100 = trunc i64 %99 to i32
store i32 %100, i32* %7
br label %101
101: ; preds = %97, %46
%102 = load i8*, i8** %6
%103 = load i32, i32* %7
%104 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %102, i32 %103)
%105 = load i32, i32* @PROT_READ
%106 = load i32, i32* @PROT_WRITE
%107 = or i32 %105, %106
%108 = load i32, i32* @MAP_SHARED
%109 = load i32, i32* %5
%110 = load i32, i32* %7
%111 = and i32 %110, -524288
%112 = call i8* @mmap(i32 0, i32 524288, i32 %107, i32 %108, i32 %109, i32 %111)
store i8* %112, i8** %13
%113 = load i32, i32* %7
%114 = and i32 %113, -524288
%115 = load i32, i32* %7
%116 = and i32 %115, -524288
%117 = add i32 %116, 524288
%118 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %114, i32 %117)
%119 = load i8*, i8** %13
%120 = load i32, i32* %7
%121 = and i32 %120, 524287
%122 = zext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %119, i64 %122
store i8* %123, i8** %14
%124 = load i8*, i8** %14
%125 = load i8*, i8** %12
%126 = load i32, i32* %9
%127 = call i32 @memcpy(i8* %124, i8* %125, i32 %126)
%128 = load i8*, i8** %13
%129 = call i32 @munmap(i8* %128, i32 524288)
%130 = load i32, i32* %5
%131 = load i64, i64* %15
%132 = load i64, i64* %16
%133 = call i32 @set_stack_pc(i32 %130, i64 %131, i64 %132)
%134 = load i8*, i8** %12
%135 = call i32 @free(i8* %134)
%136 = load i32, i32* %9
store i32 %136, i32* %4
br label %137
137: ; preds = %101, %43, %29
%138 = load i32, i32* %4
ret i32 %138
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
@SEEK_END = global i32 0
@SEEK_SET = global i32 0
@.str.1 = [46 x i8] c"%s - File size too big, can't load: %d > %d \0A\00"
@.str.2 = [8 x i8] c"UDOONeo\00"
@.str.3 = [39 x i8] c"%s - FILENAME = %s; loadaddr = 0x%08x\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@.str.4 = [36 x i8] c"%s - start - end (0x%08x - 0x%08x)\0A\00"
define i32 @load_m4_fw(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32* @fopen(i8* %1, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @SEEK_END
%6 = tail call i32 @fseek(i32* %4, i32 0, i32 %5)
%7 = tail call i32 @ftell(i32* %4)
%8 = load i32, i32* @SEEK_SET
%9 = tail call i32 @fseek(i32* %4, i32 0, i32 %8)
%10 = icmp sgt i32 %7, 524288
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 524288)
br label %79
13: ; preds = %3
%14 = add nsw i32 %7, 1
%15 = tail call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
%17 = tail call i32 @fread(i8* %16, i32 1, i32 %7, i32* %4)
%18 = icmp eq i32 %7, %17
br i1 %18, label %21, label %19
19: ; preds = %13
%20 = tail call i32 @free(i8* %16)
br label %79
21: ; preds = %13
%22 = tail call i32 @fclose(i32* %4)
%23 = load i8, i8* %16
%24 = sext i8 %23 to i32
%25 = getelementptr inbounds i8, i8* %16, i64 1
%26 = load i8, i8* %25
%27 = sext i8 %26 to i32
%28 = shl nsw i32 %27, 8
%29 = or i32 %28, %24
%30 = getelementptr inbounds i8, i8* %16, i64 2
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = shl nsw i32 %32, 16
%34 = or i32 %29, %33
%35 = getelementptr inbounds i8, i8* %16, i64 3
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = shl nuw i32 %37, 24
%39 = or i32 %34, %38
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds i8, i8* %16, i64 4
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = getelementptr inbounds i8, i8* %16, i64 5
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = shl nsw i32 %46, 8
%48 = or i32 %47, %43
%49 = getelementptr inbounds i8, i8* %16, i64 6
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = shl nsw i32 %51, 16
%53 = or i32 %48, %52
%54 = getelementptr inbounds i8, i8* %16, i64 7
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = shl nuw i32 %56, 24
%58 = or i32 %53, %57
%59 = sext i32 %58 to i64
%60 = icmp eq i32 %2, 0
%61 = and i32 %58, -65536
%62 = select i1 %60, i32 %61, i32 %2
%63 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* %1, i32 %62)
%64 = load i32, i32* @PROT_READ
%65 = load i32, i32* @PROT_WRITE
%66 = or i32 %65, %64
%67 = load i32, i32* @MAP_SHARED
%68 = and i32 %62, -524288
%69 = tail call i8* @mmap(i32 0, i32 524288, i32 %66, i32 %67, i32 %0, i32 %68)
%70 = add i32 %68, 524288
%71 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i32 %68, i32 %70)
%72 = and i32 %62, 524287
%73 = zext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %69, i64 %73
%75 = tail call i32 @memcpy(i8* %74, i8* %16, i32 %7)
%76 = tail call i32 @munmap(i8* %69, i32 524288)
%77 = tail call i32 @set_stack_pc(i32 %0, i64 %40, i64 %59)
%78 = tail call i32 @free(i8* %16)
br label %79
79: ; preds = %21, %19, %11
%80 = phi i32 [ -2, %11 ], [ -2, %19 ], [ %7, %21 ]
ret i32 %80
}