#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 */

/* Variables and functions */
char *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int /*<<< orphan*/ MS_SYNC;
int /*<<< orphan*/ O_RDWR;
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ SEEK_END;
int errno;
int /*<<< orphan*/ exit(int);
size_t lseek(int, int /*<<< orphan*/, int /*<<< orphan*/);
char *mmap(int /*<<< orphan*/ *, size_t, int, int /*<<< orphan*/, int,
           int /*<<< orphan*/);
int msync(struct record *, size_t, int /*<<< orphan*/);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char *argv[]) {
  int fdReadWrite;
  size_t n;
  char *records;
  struct record {
    int id;
    char name[80];
  };
  struct record *toModify;
  if ((fdReadWrite = open("datafile", O_RDWR)) == -1) {
    printf("open error with errno = %d\n", errno);
    perror("datafile");
    exit(1);
  }
  if ((n = lseek(fdReadWrite, 0, SEEK_END)) == -1) {
    printf("lseek error with errno = %d\n", errno);
    perror("datafile");
    exit(1);
  }
  if ((records = mmap(NULL, n, PROT_READ | PROT_WRITE, MAP_SHARED, fdReadWrite,
                      0)) == MAP_FAILED) {
    printf("mmap error with errno = %d\n", errno);
    perror("datafile");
    exit(1);
  }
  toModify = (struct record *)records;
  printf("Records before modification:\n");
  printf("Record #0: %d, %s\n", toModify[0].id, toModify[0].name);
  printf("Record #1: %d, %s\n", toModify[1].id, toModify[1].name);
  printf("Record #2: %d, %s\n", toModify[2].id, toModify[2].name);
  toModify[1].id = 0;
  printf("Records after modification:\n");
  printf("Record #0: %d, %s\n", toModify[0].id, toModify[0].name);
  printf("Record #1: %d, %s\n", toModify[1].id, toModify[1].name);
  printf("Record #2: %d, %s\n", toModify[2].id, toModify[2].name);
  if (msync(toModify, n, MS_SYNC) == -1) {
    printf("msync error with errno = %d\n", errno);
    perror("datafile");
    exit(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e4b(%rip),%rax
mov    (%rax),%esi
lea    0xe6a(%rip),%rdi
call   1070 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
jne    11d4 <main+0x64>
mov    0x2e12(%rip),%rax
mov    (%rax),%esi
lea    0xe52(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe3b(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x14(%rbp),%edi
mov    0x2df2(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1060 <lseek@plt>
mov    %rax,-0x20(%rbp)
cmp    $0xffffffffffffffff,%rax
jne    1222 <main+0xb2>
mov    0x2dc4(%rip),%rax
mov    (%rax),%esi
lea    0xe20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xded(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x20(%rbp),%rsi
mov    0x2dcb(%rip),%rax
mov    (%rax),%edx
mov    0x2d7a(%rip),%rax
or     (%rax),%edx
mov    0x2da9(%rip),%rax
mov    (%rax),%ecx
mov    -0x14(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,-0x28(%rbp)
mov    0x2d4c(%rip),%rcx
cmp    (%rcx),%rax
jne    1292 <main+0x122>
mov    0x2d54(%rip),%rax
mov    (%rax),%esi
lea    0xdcd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd7d(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
mov    -0x28(%rbp),%rax
mov    %rax,-0x30(%rbp)
lea    0xdbd(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%esi
mov    -0x30(%rbp),%rdx
add    $0x4,%rdx
lea    0xdbf(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    0x54(%rax),%esi
mov    -0x30(%rbp),%rdx
add    $0x54,%rdx
add    $0x4,%rdx
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    0xa8(%rax),%esi
mov    -0x30(%rbp),%rdx
add    $0xa8,%rdx
add    $0x4,%rdx
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
movl   $0x0,0x54(%rax)
lea    0xd97(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    (%rax),%esi
mov    -0x30(%rbp),%rdx
add    $0x4,%rdx
lea    0xd42(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    0x54(%rax),%esi
mov    -0x30(%rbp),%rdx
add    $0x54,%rdx
add    $0x4,%rdx
lea    0xd34(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rax
mov    0xa8(%rax),%esi
mov    -0x30(%rbp),%rdx
add    $0xa8,%rdx
add    $0x4,%rdx
lea    0xd20(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x30(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    0x2c20(%rip),%rax
mov    (%rax),%edx
call   1030 <msync@plt>
cmp    $0xffffffff,%eax
jne    13d5 <main+0x265>
mov    0x2c11(%rip),%rax
mov    (%rax),%esi
lea    0xd1a(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xc3a(%rip),%rdi
call   1080 <perror@plt>
mov    $0x1,%edi
call   1090 <exit@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e46(%rip),%rax
mov    (%rax),%esi
lea    0xe65(%rip),%rdi
call   1080 <open@plt>
cmp    $0xffffffff,%eax
je     12de <main+0x15e>
mov    %eax,%ebx
mov    0x2e1e(%rip),%rax
mov    (%rax),%edx
mov    %ebx,%edi
xor    %esi,%esi
call   1070 <lseek@plt>
cmp    $0xffffffffffffffff,%rax
je     12f0 <main+0x170>
mov    %rax,%r14
mov    0x2e27(%rip),%rax
mov    0x2dd8(%rip),%rcx
mov    (%rcx),%edx
or     (%rax),%edx
mov    0x2e05(%rip),%rax
mov    (%rax),%ecx
xor    %edi,%edi
mov    %r14,%rsi
mov    %ebx,%r8d
xor    %r9d,%r9d
call   1050 <mmap@plt>
mov    %rax,%rbx
mov    0x2da9(%rip),%rax
cmp    (%rax),%rbx
je     1302 <main+0x182>
lea    0xea5(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0x4(%rbx),%r15
lea    0xe3d(%rip),%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x54(%rbx),%esi
lea    0x58(%rbx),%r13
lea    0xe38(%rip),%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xa8(%rbx),%esi
mov    %rbx,%rbp
add    $0xac,%rbp
lea    0xe2a(%rip),%r12
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x0,0x54(%rbx)
lea    0xe5c(%rip),%rdi
call   1030 <puts@plt>
mov    (%rbx),%esi
lea    0xddb(%rip),%rdi
mov    %r15,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x54(%rbx),%esi
lea    0xdda(%rip),%rdi
mov    %r13,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0xa8(%rbx),%esi
mov    %r12,%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <printf@plt>
mov    0x2cfd(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <msync@plt>
cmp    $0xffffffff,%eax
je     1314 <main+0x194>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2cdb(%rip),%rax
mov    (%rax),%esi
lea    0xd1b(%rip),%rdi
jmp    1324 <main+0x1a4>
mov    0x2cc9(%rip),%rax
mov    (%rax),%esi
lea    0xd25(%rip),%rdi
jmp    1324 <main+0x1a4>
mov    0x2cb7(%rip),%rax
mov    (%rax),%esi
lea    0xd30(%rip),%rdi
jmp    1324 <main+0x1a4>
mov    0x2ca5(%rip),%rax
mov    (%rax),%esi
lea    0xd73(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xcce(%rip),%rdi
call   1090 <perror@plt>
mov    $0x1,%edi
call   10a0 <exit@plt>

LLVM IR (-O0):
%struct.record = type { i32, [80 x i8] }
%struct.record.0 = type opaque
@.str = [9 x i8] c"datafile\00"
@O_RDWR = global i32 0
@.str.1 = [28 x i8] c"open error with errno = %d\0A\00"
@errno = global i32 0
@SEEK_END = global i32 0
@.str.2 = [29 x i8] c"lseek error with errno = %d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.3 = [28 x i8] c"mmap error with errno = %d\0A\00"
@.str.4 = [30 x i8] c"Records before modification:\0A\00"
@.str.5 = [19 x i8] c"Record: %d, %s\0A\00"
@.str.6 = [19 x i8] c"Record: %d, %s\0A\00"
@.str.7 = [19 x i8] c"Record: %d, %s\0A\00"
@.str.8 = [29 x i8] c"Records after modification:\0A\00"
@MS_SYNC = global i32 0
@.str.9 = [29 x i8] c"msync error with errno = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i64
%8 = alloca i8*
%9 = alloca %struct.record*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* @O_RDWR
%11 = call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %10)
store i32 %11, i32* %6
%12 = icmp eq i32 %11, -1
br i1 %12, label %13, label %18
13: ; preds = %2
%14 = load i32, i32* @errno
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %14)
%16 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %2
%19 = load i32, i32* %6
%20 = load i32, i32* @SEEK_END
%21 = call i64 @lseek(i32 %19, i32 0, i32 %20)
store i64 %21, i64* %7
%22 = icmp eq i64 %21, -1
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load i32, i32* @errno
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %24)
%26 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%27 = call i32 @exit(i32 1)
unreachable
28: ; preds = %18
%29 = load i64, i64* %7
%30 = load i32, i32* @PROT_READ
%31 = load i32, i32* @PROT_WRITE
%32 = or i32 %30, %31
%33 = load i32, i32* @MAP_SHARED
%34 = load i32, i32* %6
%35 = call i8* @mmap(i32* null, i64 %29, i32 %32, i32 %33, i32 %34, i32 0)
store i8* %35, i8** %8
%36 = load i8*, i8** @MAP_FAILED
%37 = icmp eq i8* %35, %36
br i1 %37, label %38, label %43
38: ; preds = %28
%39 = load i32, i32* @errno
%40 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %39)
%41 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%42 = call i32 @exit(i32 1)
unreachable
43: ; preds = %28
%44 = load i8*, i8** %8
%45 = bitcast i8* %44 to %struct.record*
store %struct.record* %45, %struct.record** %9
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.4, i64 0, i64 0))
%47 = load %struct.record*, %struct.record** %9
%48 = getelementptr inbounds %struct.record, %struct.record* %47, i64 0
%49 = getelementptr inbounds %struct.record, %struct.record* %48, i32 0, i32 0
%50 = load i32, i32* %49
%51 = load %struct.record*, %struct.record** %9
%52 = getelementptr inbounds %struct.record, %struct.record* %51, i64 0
%53 = getelementptr inbounds %struct.record, %struct.record* %52, i32 0, i32 1
%54 = getelementptr inbounds [80 x i8], [80 x i8]* %53, i64 0, i64 0
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %50, i8* %54)
%56 = load %struct.record*, %struct.record** %9
%57 = getelementptr inbounds %struct.record, %struct.record* %56, i64 1
%58 = getelementptr inbounds %struct.record, %struct.record* %57, i32 0, i32 0
%59 = load i32, i32* %58
%60 = load %struct.record*, %struct.record** %9
%61 = getelementptr inbounds %struct.record, %struct.record* %60, i64 1
%62 = getelementptr inbounds %struct.record, %struct.record* %61, i32 0, i32 1
%63 = getelementptr inbounds [80 x i8], [80 x i8]* %62, i64 0, i64 0
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %59, i8* %63)
%65 = load %struct.record*, %struct.record** %9
%66 = getelementptr inbounds %struct.record, %struct.record* %65, i64 2
%67 = getelementptr inbounds %struct.record, %struct.record* %66, i32 0, i32 0
%68 = load i32, i32* %67
%69 = load %struct.record*, %struct.record** %9
%70 = getelementptr inbounds %struct.record, %struct.record* %69, i64 2
%71 = getelementptr inbounds %struct.record, %struct.record* %70, i32 0, i32 1
%72 = getelementptr inbounds [80 x i8], [80 x i8]* %71, i64 0, i64 0
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %68, i8* %72)
%74 = load %struct.record*, %struct.record** %9
%75 = getelementptr inbounds %struct.record, %struct.record* %74, i64 1
%76 = getelementptr inbounds %struct.record, %struct.record* %75, i32 0, i32 0
store i32 0, i32* %76
%77 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0))
%78 = load %struct.record*, %struct.record** %9
%79 = getelementptr inbounds %struct.record, %struct.record* %78, i64 0
%80 = getelementptr inbounds %struct.record, %struct.record* %79, i32 0, i32 0
%81 = load i32, i32* %80
%82 = load %struct.record*, %struct.record** %9
%83 = getelementptr inbounds %struct.record, %struct.record* %82, i64 0
%84 = getelementptr inbounds %struct.record, %struct.record* %83, i32 0, i32 1
%85 = getelementptr inbounds [80 x i8], [80 x i8]* %84, i64 0, i64 0
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %81, i8* %85)
%87 = load %struct.record*, %struct.record** %9
%88 = getelementptr inbounds %struct.record, %struct.record* %87, i64 1
%89 = getelementptr inbounds %struct.record, %struct.record* %88, i32 0, i32 0
%90 = load i32, i32* %89
%91 = load %struct.record*, %struct.record** %9
%92 = getelementptr inbounds %struct.record, %struct.record* %91, i64 1
%93 = getelementptr inbounds %struct.record, %struct.record* %92, i32 0, i32 1
%94 = getelementptr inbounds [80 x i8], [80 x i8]* %93, i64 0, i64 0
%95 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %90, i8* %94)
%96 = load %struct.record*, %struct.record** %9
%97 = getelementptr inbounds %struct.record, %struct.record* %96, i64 2
%98 = getelementptr inbounds %struct.record, %struct.record* %97, i32 0, i32 0
%99 = load i32, i32* %98
%100 = load %struct.record*, %struct.record** %9
%101 = getelementptr inbounds %struct.record, %struct.record* %100, i64 2
%102 = getelementptr inbounds %struct.record, %struct.record* %101, i32 0, i32 1
%103 = getelementptr inbounds [80 x i8], [80 x i8]* %102, i64 0, i64 0
%104 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %99, i8* %103)
%105 = load %struct.record*, %struct.record** %9
%106 = bitcast %struct.record* %105 to %struct.record.0*
%107 = load i64, i64* %7
%108 = load i32, i32* @MS_SYNC
%109 = call i32 @msync(%struct.record.0* %106, i64 %107, i32 %108)
%110 = icmp eq i32 %109, -1
br i1 %110, label %111, label %116
111: ; preds = %43
%112 = load i32, i32* @errno
%113 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %112)
%114 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%115 = call i32 @exit(i32 1)
unreachable
116: ; preds = %43
ret i32 0
}

LLVM IR (-O2):
%struct.record.0 = type opaque
@.str = [9 x i8] c"datafile\00"
@O_RDWR = global i32 0
@.str.1 = [28 x i8] c"open error with errno = %d\0A\00"
@errno = global i32 0
@SEEK_END = global i32 0
@.str.2 = [29 x i8] c"lseek error with errno = %d\0A\00"
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.3 = [28 x i8] c"mmap error with errno = %d\0A\00"
@.str.5 = [19 x i8] c"Record: %d, %s\0A\00"
@.str.6 = [19 x i8] c"Record: %d, %s\0A\00"
@.str.7 = [19 x i8] c"Record: %d, %s\0A\00"
@MS_SYNC = global i32 0
@.str.9 = [29 x i8] c"msync error with errno = %d\0A\00"
@str = [29 x i8] c"Records before modification:\00"
@str.10 = [28 x i8] c"Records after modification:\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @O_RDWR
%4 = tail call i32 @open(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %11
6: ; preds = %2
%7 = load i32, i32* @errno
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0), i32 %7)
%9 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %2
%12 = load i32, i32* @SEEK_END
%13 = tail call i64 @lseek(i32 %4, i32 0, i32 %12)
%14 = icmp eq i64 %13, -1
br i1 %14, label %15, label %20
15: ; preds = %11
%16 = load i32, i32* @errno
%17 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.2, i64 0, i64 0), i32 %16)
%18 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%19 = tail call i32 @exit(i32 1)
unreachable
20: ; preds = %11
%21 = load i32, i32* @PROT_READ
%22 = load i32, i32* @PROT_WRITE
%23 = or i32 %22, %21
%24 = load i32, i32* @MAP_SHARED
%25 = tail call i8* @mmap(i32* null, i64 %13, i32 %23, i32 %24, i32 %4, i32 0)
%26 = load i8*, i8** @MAP_FAILED
%27 = icmp eq i8* %25, %26
br i1 %27, label %28, label %33
28: ; preds = %20
%29 = load i32, i32* @errno
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%32 = tail call i32 @exit(i32 1)
unreachable
33: ; preds = %20
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @str, i64 0, i64 0))
%35 = bitcast i8* %25 to i32*
%36 = load i32, i32* %35
%37 = getelementptr inbounds i8, i8* %25, i64 4
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %36, i8* %37)
%39 = getelementptr inbounds i8, i8* %25, i64 84
%40 = bitcast i8* %39 to i32*
%41 = load i32, i32* %40
%42 = getelementptr inbounds i8, i8* %25, i64 88
%43 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %41, i8* %42)
%44 = getelementptr inbounds i8, i8* %25, i64 168
%45 = bitcast i8* %44 to i32*
%46 = load i32, i32* %45
%47 = getelementptr inbounds i8, i8* %25, i64 172
%48 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %46, i8* %47)
store i32 0, i32* %40
%49 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str.10, i64 0, i64 0))
%50 = load i32, i32* %35
%51 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.5, i64 0, i64 0), i32 %50, i8* %37)
%52 = load i32, i32* %40
%53 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32 %52, i8* %42)
%54 = load i32, i32* %45
%55 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.7, i64 0, i64 0), i32 %54, i8* %47)
%56 = bitcast i8* %25 to %struct.record.0*
%57 = load i32, i32* @MS_SYNC
%58 = tail call i32 @msync(%struct.record.0* %56, i64 %13, i32 %57)
%59 = icmp eq i32 %58, -1
br i1 %59, label %60, label %65
60: ; preds = %33
%61 = load i32, i32* @errno
%62 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.9, i64 0, i64 0), i32 %61)
%63 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%64 = tail call i32 @exit(i32 1)
unreachable
65: ; preds = %33
ret i32 0
}