#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 */
char *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int O_CREAT;
int O_RDWR;
int O_TRUNC;
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ abort();
int close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ *fopen(char *, char *);
int fread(char *, int, int, int /*<<< orphan*/ *);
scalar_t__ mmap(int /*<<< orphan*/, int, int, int /*<<< orphan*/, int,
                int /*<<< orphan*/);
scalar_t__ munmap(char *, int);
int open(char *, int, int);
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ stdout;
scalar_t__ strncmp(char *, char *, int);
int write(int, char *, int);
int main() {
  int fd;
  char *x;
  FILE *fp;
  char buf[40];
  fd = open("my.file", O_CREAT | O_TRUNC | O_RDWR, 0644);
  {
    if (!(fd != -1)) {
      printf("Failed "
             "fd != -1"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             18);
      fflush(stdout);
      abort();
    }
  };
  {
    if (!(write(fd, "abcdefgh", 8) == 8)) {
      printf("Failed "
             "write (fd, \"abcdefgh\", 8) == 8"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             20);
      fflush(stdout);
      abort();
    }
  };
  x = (char *)mmap(0, 20, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
  {
    if (!(x != MAP_FAILED)) {
      printf("Failed "
             "x != MAP_FAILED"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             24);
      fflush(stdout);
      abort();
    }
  };
  x[3] = 'j';
  {
    if (!(munmap(x, 20) == 0)) {
      printf("Failed "
             "munmap (x, 20) == 0"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             28);
      fflush(stdout);
      abort();
    }
  };
  {
    if (!(close(fd) != -1)) {
      printf("Failed "
             "close(fd) != -1"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             30);
      fflush(stdout);
      abort();
    }
  };
  fp = fopen("my.file", "r");
  {
    if (!(fp != NULL)) {
      printf("Failed "
             "fp != NULL"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             34);
      fflush(stdout);
      abort();
    }
  };
  {
    if (!(fread(buf, 1, 20, fp) == 8)) {
      printf("Failed "
             "fread(buf, 1, 20, fp) == 8"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             36);
      fflush(stdout);
      abort();
    }
  };
  {
    if (!(strncmp(buf, "abcjefgh", 8) == 0)) {
      printf("Failed "
             "strncmp (buf, \"abcjefgh\", 8) == 0"
             " in <%s> at line %d\n",
             "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
             "2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/"
             "aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/"
             "newlib.elix/tmmap.c",
             38);
      fflush(stdout);
      abort();
    }
  };
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e22(%rip),%rax
mov    (%rax),%esi
mov    0x2e11(%rip),%rax
or     (%rax),%esi
mov    0x2de0(%rip),%rax
or     (%rax),%esi
lea    0xe0f(%rip),%rdi
mov    $0x1a4,%edx
call   10c0 <open@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0xffffffff,-0x8(%rbp)
jne    1235 <main+0x75>
lea    0xdf9(%rip),%rdi
lea    0xe16(%rip),%rsi
mov    $0x12,%edx
call   1080 <printf@plt>
mov    0x2d89(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%edi
lea    0xebd(%rip),%rsi
mov    $0x8,%edx
call   1060 <write@plt>
cmp    $0x8,%eax
je     127f <main+0xbf>
lea    0xeac(%rip),%rdi
lea    0xdcc(%rip),%rsi
mov    $0x14,%edx
call   1080 <printf@plt>
mov    0x2d3f(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    0x2d62(%rip),%rax
mov    (%rax),%edx
mov    0x2d29(%rip),%rax
or     (%rax),%edx
mov    0x2d40(%rip),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%r8d
xor    %r9d,%r9d
mov    $0x14,%esi
mov    %r9d,%edi
call   1070 <mmap@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2ceb(%rip),%rcx
cmp    (%rcx),%rax
jne    12f3 <main+0x133>
lea    0xe72(%rip),%rdi
lea    0xd58(%rip),%rsi
mov    $0x18,%edx
call   1080 <printf@plt>
mov    0x2ccb(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
movb   $0x6a,0x3(%rax)
mov    -0x10(%rbp),%rdi
mov    $0x14,%esi
call   10b0 <munmap@plt>
cmp    $0x0,%rax
je     1340 <main+0x180>
lea    0xe50(%rip),%rdi
lea    0xd0b(%rip),%rsi
mov    $0x1c,%edx
call   1080 <printf@plt>
mov    0x2c7e(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x8(%rbp),%edi
call   1090 <close@plt>
cmp    $0xffffffff,%eax
jne    137e <main+0x1be>
lea    0xe41(%rip),%rdi
lea    0xccd(%rip),%rsi
mov    $0x1e,%edx
call   1080 <printf@plt>
mov    0x2c40(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
lea    0xc7b(%rip),%rdi
lea    0xe38(%rip),%rsi
call   10d0 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    13cd <main+0x20d>
lea    0xe1f(%rip),%rdi
lea    0xc7e(%rip),%rsi
mov    $0x22,%edx
call   1080 <printf@plt>
mov    0x2bf1(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
lea    -0x40(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x14,%edx
call   1050 <fread@plt>
cmp    $0x8,%eax
je     141a <main+0x25a>
lea    0xdf8(%rip),%rdi
lea    0xc31(%rip),%rsi
mov    $0x24,%edx
call   1080 <printf@plt>
mov    0x2ba4(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
lea    -0x40(%rbp),%rdi
lea    0xdfd(%rip),%rsi
mov    $0x8,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1466 <main+0x2a6>
lea    0xdeb(%rip),%rdi
lea    0xbe5(%rip),%rsi
mov    $0x26,%edx
call   1080 <printf@plt>
mov    0x2b58(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %edi,%edi
call   10e0 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    0x2e2c(%rip),%rax
mov    0x2e1d(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2dea(%rip),%rax
or     (%rax),%esi
lea    0xe19(%rip),%rdi
mov    $0x1a4,%edx
call   10c0 <open@plt>
cmp    $0xffffffff,%eax
jne    120b <main+0x4b>
lea    0xe0b(%rip),%rdi
lea    0xe28(%rip),%rsi
mov    $0x12,%edx
jmp    1286 <main+0xc6>
mov    %eax,%ebx
lea    0xee8(%rip),%rsi
mov    %eax,%edi
mov    $0x8,%edx
call   1060 <write@plt>
cmp    $0x8,%eax
jne    1273 <main+0xb3>
mov    0x2dbc(%rip),%rax
mov    0x2d85(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2d9a(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    $0x14,%esi
mov    %ebx,%r8d
xor    %r9d,%r9d
call   1070 <mmap@plt>
mov    0x2d4f(%rip),%rcx
cmp    %rax,(%rcx)
jne    12a0 <main+0xe0>
lea    0xeda(%rip),%rdi
lea    0xdc0(%rip),%rsi
mov    $0x18,%edx
jmp    1286 <main+0xc6>
lea    0xe8b(%rip),%rdi
lea    0xdab(%rip),%rsi
mov    $0x14,%edx
call   1080 <printf@plt>
mov    0x2d1e(%rip),%rax
mov    (%rax),%edi
call   10a0 <fflush@plt>
xor    %eax,%eax
call   1030 <abort@plt>
movb   $0x6a,0x3(%rax)
mov    %rax,%rdi
mov    $0x14,%esi
call   10b0 <munmap@plt>
test   %rax,%rax
jne    12d7 <main+0x117>
mov    %ebx,%edi
call   1090 <close@plt>
cmp    $0xffffffff,%eax
jne    12ec <main+0x12c>
lea    0xed0(%rip),%rdi
lea    0xd5c(%rip),%rsi
mov    $0x1e,%edx
jmp    1286 <main+0xc6>
lea    0xe8c(%rip),%rdi
lea    0xd47(%rip),%rsi
mov    $0x1c,%edx
jmp    1286 <main+0xc6>
lea    0xd0d(%rip),%rdi
lea    0xeca(%rip),%rsi
call   10d0 <fopen@plt>
test   %rax,%rax
jne    131c <main+0x15c>
lea    0xebb(%rip),%rdi
lea    0xd1a(%rip),%rsi
mov    $0x22,%edx
jmp    1286 <main+0xc6>
mov    %rsp,%rdi
mov    $0x1,%esi
mov    $0x14,%edx
mov    %rax,%rcx
call   1050 <fread@plt>
cmp    $0x8,%eax
jne    1356 <main+0x196>
lea    0xee5(%rip),%rsi
mov    %rsp,%rdi
mov    $0x8,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
jne    136e <main+0x1ae>
xor    %edi,%edi
call   10e0 <exit@plt>
lea    0xe8f(%rip),%rdi
lea    0xcc8(%rip),%rsi
mov    $0x24,%edx
jmp    1286 <main+0xc6>
lea    0xeb6(%rip),%rdi
lea    0xcb0(%rip),%rsi
mov    $0x26,%edx
jmp    1286 <main+0xc6>

LLVM IR (-O0):
@.str = [8 x i8] c"my.file\00"
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@O_RDWR = global i32 0
@.str.1 = [36 x i8] c"Failed fd != -1 in <%s> at line %d\0A\00"
@.str.2 = [208 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/newlib.elix/tmmap.c\00"
@stdout = global i32 0
@.str.3 = [9 x i8] c"abcdefgh\00"
@.str.4 = [58 x i8] c"Failed write (fd, \22abcdefgh\22, 8) == 8 in <%s> at line %d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.5 = [43 x i8] c"Failed x != MAP_FAILED in <%s> at line %d\0A\00"
@.str.6 = [47 x i8] c"Failed munmap (x, 20) == 0 in <%s> at line %d\0A\00"
@.str.7 = [43 x i8] c"Failed close(fd) != -1 in <%s> at line %d\0A\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [38 x i8] c"Failed fp != NULL in <%s> at line %d\0A\00"
@.str.10 = [54 x i8] c"Failed fread(buf, 1, 20, fp) == 8 in <%s> at line %d\0A\00"
@.str.11 = [9 x i8] c"abcjefgh\00"
@.str.12 = [61 x i8] c"Failed strncmp (buf, \22abcjefgh\22, 8) == 0 in <%s> at line %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [40 x i8]
store i32 0, i32* %1
%6 = load i32, i32* @O_CREAT
%7 = load i32, i32* @O_TRUNC
%8 = or i32 %6, %7
%9 = load i32, i32* @O_RDWR
%10 = or i32 %8, %9
%11 = call i32 @open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %10, i32 420)
store i32 %11, i32* %2
%12 = load i32, i32* %2
%13 = icmp ne i32 %12, -1
br i1 %13, label %19, label %14
14: ; preds = %0
%15 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 18)
%16 = load i32, i32* @stdout
%17 = call i32 @fflush(i32 %16)
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %0
%20 = load i32, i32* %2
%21 = call i32 @write(i32 %20, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 8)
%22 = icmp eq i32 %21, 8
br i1 %22, label %28, label %23
23: ; preds = %19
%24 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 20)
%25 = load i32, i32* @stdout
%26 = call i32 @fflush(i32 %25)
%27 = call i32 (...) @abort()
unreachable
28: ; preds = %19
%29 = load i32, i32* @PROT_READ
%30 = load i32, i32* @PROT_WRITE
%31 = or i32 %29, %30
%32 = load i32, i32* @MAP_SHARED
%33 = load i32, i32* %2
%34 = call i64 @mmap(i32 0, i32 20, i32 %31, i32 %32, i32 %33, i32 0)
%35 = inttoptr i64 %34 to i8*
store i8* %35, i8** %3
%36 = load i8*, i8** %3
%37 = load i8*, i8** @MAP_FAILED
%38 = icmp ne i8* %36, %37
br i1 %38, label %44, label %39
39: ; preds = %28
%40 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 24)
%41 = load i32, i32* @stdout
%42 = call i32 @fflush(i32 %41)
%43 = call i32 (...) @abort()
unreachable
44: ; preds = %28
%45 = load i8*, i8** %3
%46 = getelementptr inbounds i8, i8* %45, i64 3
store i8 106, i8* %46
%47 = load i8*, i8** %3
%48 = call i64 @munmap(i8* %47, i32 20)
%49 = icmp eq i64 %48, 0
br i1 %49, label %55, label %50
50: ; preds = %44
%51 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 28)
%52 = load i32, i32* @stdout
%53 = call i32 @fflush(i32 %52)
%54 = call i32 (...) @abort()
unreachable
55: ; preds = %44
%56 = load i32, i32* %2
%57 = call i32 @close(i32 %56)
%58 = icmp ne i32 %57, -1
br i1 %58, label %64, label %59
59: ; preds = %55
%60 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 30)
%61 = load i32, i32* @stdout
%62 = call i32 @fflush(i32 %61)
%63 = call i32 (...) @abort()
unreachable
64: ; preds = %55
%65 = call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
store i32* %65, i32** %4
%66 = load i32*, i32** %4
%67 = icmp ne i32* %66, null
br i1 %67, label %73, label %68
68: ; preds = %64
%69 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 34)
%70 = load i32, i32* @stdout
%71 = call i32 @fflush(i32 %70)
%72 = call i32 (...) @abort()
unreachable
73: ; preds = %64
%74 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%75 = load i32*, i32** %4
%76 = call i32 @fread(i8* %74, i32 1, i32 20, i32* %75)
%77 = icmp eq i32 %76, 8
br i1 %77, label %83, label %78
78: ; preds = %73
%79 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 36)
%80 = load i32, i32* @stdout
%81 = call i32 @fflush(i32 %80)
%82 = call i32 (...) @abort()
unreachable
83: ; preds = %73
%84 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%85 = call i64 @strncmp(i8* %84, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 8)
%86 = icmp eq i64 %85, 0
br i1 %86, label %92, label %87
87: ; preds = %83
%88 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 38)
%89 = load i32, i32* @stdout
%90 = call i32 @fflush(i32 %89)
%91 = call i32 (...) @abort()
unreachable
92: ; preds = %83
%93 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"my.file\00"
@O_CREAT = global i32 0
@O_TRUNC = global i32 0
@O_RDWR = global i32 0
@.str.1 = [36 x i8] c"Failed fd != -1 in <%s> at line %d\0A\00"
@.str.2 = [208 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/32bitmicro/newlib-nano-1.0/refs/heads/aap-master/3rd_party/newlib-2.5.0.20170818/newlib/testsuite/newlib.elix/tmmap.c\00"
@stdout = global i32 0
@.str.3 = [9 x i8] c"abcdefgh\00"
@.str.4 = [58 x i8] c"Failed write (fd, \22abcdefgh\22, 8) == 8 in <%s> at line %d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.5 = [43 x i8] c"Failed x != MAP_FAILED in <%s> at line %d\0A\00"
@.str.6 = [47 x i8] c"Failed munmap (x, 20) == 0 in <%s> at line %d\0A\00"
@.str.7 = [43 x i8] c"Failed close(fd) != -1 in <%s> at line %d\0A\00"
@.str.8 = [2 x i8] c"r\00"
@.str.9 = [38 x i8] c"Failed fp != NULL in <%s> at line %d\0A\00"
@.str.10 = [54 x i8] c"Failed fread(buf, 1, 20, fp) == 8 in <%s> at line %d\0A\00"
@.str.11 = [9 x i8] c"abcjefgh\00"
@.str.12 = [61 x i8] c"Failed strncmp (buf, \22abcjefgh\22, 8) == 0 in <%s> at line %d\0A\00"
define i32 @main() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @O_CREAT
%4 = load i32, i32* @O_TRUNC
%5 = or i32 %4, %3
%6 = load i32, i32* @O_RDWR
%7 = or i32 %5, %6
%8 = tail call i32 @open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %7, i32 420)
%9 = icmp eq i32 %8, -1
br i1 %9, label %10, label %15
10: ; preds = %0
%11 = tail call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 18)
%12 = load i32, i32* @stdout
%13 = tail call i32 @fflush(i32 %12)
%14 = tail call i32 (...) @abort()
unreachable
15: ; preds = %0
%16 = tail call i32 @write(i32 %8, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i32 8)
%17 = icmp eq i32 %16, 8
br i1 %17, label %23, label %18
18: ; preds = %15
%19 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 20)
%20 = load i32, i32* @stdout
%21 = tail call i32 @fflush(i32 %20)
%22 = tail call i32 (...) @abort()
unreachable
23: ; preds = %15
%24 = load i32, i32* @PROT_READ
%25 = load i32, i32* @PROT_WRITE
%26 = or i32 %25, %24
%27 = load i32, i32* @MAP_SHARED
%28 = tail call i64 @mmap(i32 0, i32 20, i32 %26, i32 %27, i32 %8, i32 0)
%29 = inttoptr i64 %28 to i8*
%30 = load i8*, i8** @MAP_FAILED
%31 = icmp eq i8* %30, %29
br i1 %31, label %32, label %37
32: ; preds = %23
%33 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 24)
%34 = load i32, i32* @stdout
%35 = tail call i32 @fflush(i32 %34)
%36 = tail call i32 (...) @abort()
unreachable
37: ; preds = %23
%38 = getelementptr inbounds i8, i8* %29, i64 3
store i8 106, i8* %38
%39 = tail call i64 @munmap(i8* %29, i32 20)
%40 = icmp eq i64 %39, 0
br i1 %40, label %46, label %41
41: ; preds = %37
%42 = tail call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 28)
%43 = load i32, i32* @stdout
%44 = tail call i32 @fflush(i32 %43)
%45 = tail call i32 (...) @abort()
unreachable
46: ; preds = %37
%47 = tail call i32 @close(i32 %8)
%48 = icmp eq i32 %47, -1
br i1 %48, label %49, label %54
49: ; preds = %46
%50 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 30)
%51 = load i32, i32* @stdout
%52 = tail call i32 @fflush(i32 %51)
%53 = tail call i32 (...) @abort()
unreachable
54: ; preds = %46
%55 = tail call i32* @fopen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
%56 = icmp eq i32* %55, null
br i1 %56, label %57, label %62
57: ; preds = %54
%58 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 34)
%59 = load i32, i32* @stdout
%60 = tail call i32 @fflush(i32 %59)
%61 = tail call i32 (...) @abort()
unreachable
62: ; preds = %54
%63 = call i32 @fread(i8* %2, i32 1, i32 20, i32* %55)
%64 = icmp eq i32 %63, 8
br i1 %64, label %70, label %65
65: ; preds = %62
%66 = tail call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 36)
%67 = load i32, i32* @stdout
%68 = tail call i32 @fflush(i32 %67)
%69 = tail call i32 (...) @abort()
unreachable
70: ; preds = %62
%71 = call i64 @strncmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.11, i64 0, i64 0), i32 8)
%72 = icmp eq i64 %71, 0
br i1 %72, label %78, label %73
73: ; preds = %70
%74 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([208 x i8], [208 x i8]* @.str.2, i64 0, i64 0), i32 38)
%75 = load i32, i32* @stdout
%76 = call i32 @fflush(i32 %75)
%77 = call i32 (...) @abort()
unreachable
78: ; preds = %70
%79 = call i32 @exit(i32 0)
unreachable
}