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

/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
void *MAP_FAILED;
int /*<<< orphan*/ MAP_SHARED;
int /*<<< orphan*/ O_RDWR;
int PROT_READ;
int PROT_WRITE;
int /*<<< orphan*/ *SEM_FAILED;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *mmap(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/, int,
           int /*<<< orphan*/);
scalar_t__ munmap(void *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, ...);
int sem_close(int /*<<< orphan*/ *);
int /*<<< orphan*/ *sem_open(char *, int /*<<< orphan*/);
scalar_t__ sem_post(int /*<<< orphan*/ *);
scalar_t__ sem_wait(int /*<<< orphan*/ *);
int shm_open(char *, int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ usleep(int);
void receive_it(void) {
  int shm_fd, i;
  void *shm_area;
  sem_t *mysem;
  if ((shm_fd = shm_open("/my_shm", O_RDWR, 0)) == -1) {
    perror("shm_open");
    exit(errno);
  };
  shm_area = mmap(NULL, 8196, PROT_READ | PROT_WRITE, MAP_SHARED, shm_fd, 0);
  if (shm_area == MAP_FAILED) {
    perror("mmap");
    exit(errno);
  };
  printf("RCV: Memory attached at %lX\n", (unsigned long)shm_area);
  printf("Attaching to the semaphore\n");
  if ((mysem = sem_open("/my_sem", 0)) == SEM_FAILED) {
    perror("sem_open");
    exit(errno);
  };
  for (i = 0; i < 4; i++) {
    if (sem_wait(mysem)) {
      perror("sem_wait");
      exit(errno);
    };
    fprintf(stdout, "%s\n", (char *)shm_area);
    if (sem_post(mysem)) {
      perror("sem_post");
      exit(errno);
    };
    usleep(1000);
  }
  printf("RCV has successfully completed\n");
  if (munmap(shm_area, 8196)) {
    perror("munmap");
    exit(errno);
  };
  if ((sem_close(mysem)) == -1) {
    perror("sem_close");
    exit(errno);
  };
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<receive_it>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x2e09(%rip),%rax
mov    (%rax),%esi
lea    0xe28(%rip),%rdi
xor    %edx,%edx
call   10d0 <shm_open@plt>
mov    %eax,-0x4(%rbp)
cmp    $0xffffffff,%eax
jne    1205 <receive_it+0x45>
lea    0xe16(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2dc2(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    0x2dec(%rip),%rax
mov    (%rax),%edx
mov    0x2da3(%rip),%rax
or     (%rax),%edx
mov    0x2dca(%rip),%rax
mov    (%rax),%ecx
mov    -0x4(%rbp),%r8d
xor    %eax,%eax
mov    %eax,%edi
mov    $0x2004,%esi
xor    %r9d,%r9d
call   1040 <mmap@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x2d5c(%rip),%rcx
cmp    (%rcx),%rax
jne    1267 <receive_it+0xa7>
lea    0xdbd(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2d60(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x10(%rbp),%rsi
lea    0xda4(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdb3(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdc1(%rip),%rdi
xor    %esi,%esi
call   1070 <sem_open@plt>
mov    %rax,-0x18(%rbp)
mov    0x2d30(%rip),%rcx
cmp    (%rcx),%rax
jne    12c3 <receive_it+0x103>
lea    0xda7(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2d04(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
movl   $0x0,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
jge    135f <receive_it+0x19f>
mov    -0x18(%rbp),%rdi
call   1030 <sem_wait@plt>
cmp    $0x0,%rax
je     1301 <receive_it+0x141>
lea    0xd72(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2cc6(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    0x2ca8(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xd54(%rip),%rsi
call   1080 <fprintf@plt>
mov    -0x18(%rbp),%rdi
call   1060 <sem_post@plt>
cmp    $0x0,%rax
je     1347 <receive_it+0x187>
lea    0xd39(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c80(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    $0x3e8,%edi
call   10e0 <usleep@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12ca <receive_it+0x10a>
lea    0xd10(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x2004,%esi
call   1090 <munmap@plt>
cmp    $0x0,%rax
je     139f <receive_it+0x1df>
lea    0xd0a(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <sem_close@plt>
cmp    $0xffffffff,%eax
jne    13cb <receive_it+0x20b>
lea    0xce5(%rip),%rdi
call   10b0 <perror@plt>
mov    0x2bfc(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>
mov    0x2bd6(%rip),%rax
mov    (%rax),%edi
call   10c0 <exit@plt>

x86 assembly (clang, -O2):
<receive_it>:
push   %r15
push   %r14
push   %rbx
mov    0x2dfc(%rip),%rax
mov    (%rax),%esi
lea    0xe1b(%rip),%rdi
xor    %edx,%edx
call   10e0 <shm_open@plt>
cmp    $0xffffffff,%eax
jne    11fd <receive_it+0x2d>
lea    0xe10(%rip),%rdi
jmp    13c2 <receive_it+0x1f2>
mov    0x2df4(%rip),%rcx
mov    0x2dad(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2dd2(%rip),%rcx
mov    (%rcx),%ecx
xor    %edi,%edi
mov    $0x2004,%esi
mov    %eax,%r8d
xor    %r9d,%r9d
call   1050 <mmap@plt>
mov    %rax,%rbx
mov    0x2d6c(%rip),%rax
cmp    (%rax),%rbx
jne    1245 <receive_it+0x75>
lea    0xdd1(%rip),%rdi
jmp    13c2 <receive_it+0x1f2>
lea    0xdca(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe0e(%rip),%rdi
call   1040 <puts@plt>
lea    0xdca(%rip),%rdi
xor    %esi,%esi
call   1080 <sem_open@plt>
mov    %rax,%r14
mov    0x2d56(%rip),%rax
cmp    (%rax),%r14
jne    128b <receive_it+0xbb>
lea    0xdb5(%rip),%rdi
jmp    13c2 <receive_it+0x1f2>
mov    %r14,%rdi
call   1030 <sem_wait@plt>
test   %rax,%rax
jne    13b2 <receive_it+0x1e2>
mov    0x2d0d(%rip),%r15
mov    (%r15),%edi
lea    0xda0(%rip),%rsi
mov    %rbx,%rdx
call   1090 <fprintf@plt>
mov    %r14,%rdi
call   1070 <sem_post@plt>
test   %rax,%rax
jne    13bb <receive_it+0x1eb>
mov    $0x3e8,%edi
call   10f0 <usleep@plt>
mov    %r14,%rdi
call   1030 <sem_wait@plt>
test   %rax,%rax
jne    13b2 <receive_it+0x1e2>
mov    (%r15),%edi
lea    0xd62(%rip),%rsi
mov    %rbx,%rdx
call   1090 <fprintf@plt>
mov    %r14,%rdi
call   1070 <sem_post@plt>
test   %rax,%rax
jne    13bb <receive_it+0x1eb>
mov    $0x3e8,%edi
call   10f0 <usleep@plt>
mov    %r14,%rdi
call   1030 <sem_wait@plt>
test   %rax,%rax
jne    13b2 <receive_it+0x1e2>
mov    (%r15),%edi
lea    0xd24(%rip),%rsi
mov    %rbx,%rdx
call   1090 <fprintf@plt>
mov    %r14,%rdi
call   1070 <sem_post@plt>
test   %rax,%rax
jne    13bb <receive_it+0x1eb>
mov    $0x3e8,%edi
call   10f0 <usleep@plt>
mov    %r14,%rdi
call   1030 <sem_wait@plt>
test   %rax,%rax
jne    13b2 <receive_it+0x1e2>
mov    (%r15),%edi
lea    0xcee(%rip),%rsi
mov    %rbx,%rdx
call   1090 <fprintf@plt>
mov    %r14,%rdi
call   1070 <sem_post@plt>
test   %rax,%rax
jne    13bb <receive_it+0x1eb>
mov    $0x3e8,%edi
call   10f0 <usleep@plt>
lea    0xd01(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
mov    $0x2004,%esi
call   10a0 <munmap@plt>
test   %rax,%rax
jne    13d5 <receive_it+0x205>
mov    %r14,%rdi
call   10b0 <sem_close@plt>
cmp    $0xffffffff,%eax
jne    13de <receive_it+0x20e>
lea    0xcb1(%rip),%rdi
jmp    13c2 <receive_it+0x1f2>
lea    0xc8b(%rip),%rdi
jmp    13c2 <receive_it+0x1f2>
lea    0xc8f(%rip),%rdi
call   10c0 <perror@plt>
mov    0x2bf2(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>
lea    0xc7e(%rip),%rdi
jmp    13c2 <receive_it+0x1f2>
mov    0x2bc3(%rip),%rax
mov    (%rax),%edi
call   10d0 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"/my_shm\00"
@O_RDWR = global i32 0
@.str.1 = [9 x i8] c"shm_open\00"
@errno = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.2 = [5 x i8] c"mmap\00"
@.str.3 = [29 x i8] c"RCV: Memory attached at %lX\0A\00"
@.str.4 = [28 x i8] c"Attaching to the semaphore\0A\00"
@.str.5 = [8 x i8] c"/my_sem\00"
@SEM_FAILED = global i32* null
@.str.6 = [9 x i8] c"sem_open\00"
@.str.7 = [9 x i8] c"sem_wait\00"
@stdout = global i32 0
@.str.8 = [4 x i8] c"%s\0A\00"
@.str.9 = [9 x i8] c"sem_post\00"
@.str.10 = [32 x i8] c"RCV has successfully completed\0A\00"
@.str.11 = [7 x i8] c"munmap\00"
@.str.12 = [10 x i8] c"sem_close\00"
@EXIT_SUCCESS = global i32 0
define void @receive_it() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = load i32, i32* @O_RDWR
%6 = call i32 @shm_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %5, i32 0)
store i32 %6, i32* %1
%7 = icmp eq i32 %6, -1
br i1 %7, label %8, label %12
8: ; preds = %0
%9 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* @errno
%11 = call i32 @exit(i32 %10)
unreachable
12: ; preds = %0
%13 = load i32, i32* @PROT_READ
%14 = load i32, i32* @PROT_WRITE
%15 = or i32 %13, %14
%16 = load i32, i32* @MAP_SHARED
%17 = load i32, i32* %1
%18 = call i8* @mmap(i32* null, i32 8196, i32 %15, i32 %16, i32 %17, i32 0)
store i8* %18, i8** %3
%19 = load i8*, i8** %3
%20 = load i8*, i8** @MAP_FAILED
%21 = icmp eq i8* %19, %20
br i1 %21, label %22, label %26
22: ; preds = %12
%23 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%24 = load i32, i32* @errno
%25 = call i32 @exit(i32 %24)
unreachable
26: ; preds = %12
%27 = load i8*, i8** %3
%28 = ptrtoint i8* %27 to i64
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i64 %28)
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
%31 = call i32* @sem_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 0)
store i32* %31, i32** %4
%32 = load i32*, i32** @SEM_FAILED
%33 = icmp eq i32* %31, %32
br i1 %33, label %34, label %38
34: ; preds = %26
%35 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%36 = load i32, i32* @errno
%37 = call i32 @exit(i32 %36)
unreachable
38: ; preds = %26
store i32 0, i32* %2
br label %39
39: ; preds = %63, %38
%40 = load i32, i32* %2
%41 = icmp slt i32 %40, 4
br i1 %41, label %42, label %66
42: ; preds = %39
%43 = load i32*, i32** %4
%44 = call i64 @sem_wait(i32* %43)
%45 = icmp ne i64 %44, 0
br i1 %45, label %46, label %50
46: ; preds = %42
%47 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%48 = load i32, i32* @errno
%49 = call i32 @exit(i32 %48)
unreachable
50: ; preds = %42
%51 = load i32, i32* @stdout
%52 = load i8*, i8** %3
%53 = call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %52)
%54 = load i32*, i32** %4
%55 = call i64 @sem_post(i32* %54)
%56 = icmp ne i64 %55, 0
br i1 %56, label %57, label %61
57: ; preds = %50
%58 = call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%59 = load i32, i32* @errno
%60 = call i32 @exit(i32 %59)
unreachable
61: ; preds = %50
%62 = call i32 @usleep(i32 1000)
br label %63
63: ; preds = %61
%64 = load i32, i32* %2
%65 = add nsw i32 %64, 1
store i32 %65, i32* %2
br label %39
66: ; preds = %39
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.10, i64 0, i64 0))
%68 = load i8*, i8** %3
%69 = call i64 @munmap(i8* %68, i32 8196)
%70 = icmp ne i64 %69, 0
br i1 %70, label %71, label %75
71: ; preds = %66
%72 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%73 = load i32, i32* @errno
%74 = call i32 @exit(i32 %73)
unreachable
75: ; preds = %66
%76 = load i32*, i32** %4
%77 = call i32 @sem_close(i32* %76)
%78 = icmp eq i32 %77, -1
br i1 %78, label %79, label %83
79: ; preds = %75
%80 = call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%81 = load i32, i32* @errno
%82 = call i32 @exit(i32 %81)
unreachable
83: ; preds = %75
%84 = load i32, i32* @EXIT_SUCCESS
%85 = call i32 @exit(i32 %84)
unreachable
}

LLVM IR (-O2):
@.str = [8 x i8] c"/my_shm\00"
@O_RDWR = global i32 0
@.str.1 = [9 x i8] c"shm_open\00"
@errno = global i32 0
@PROT_READ = global i32 0
@PROT_WRITE = global i32 0
@MAP_SHARED = global i32 0
@MAP_FAILED = global i8* null
@.str.2 = [5 x i8] c"mmap\00"
@.str.3 = [29 x i8] c"RCV: Memory attached at %lX\0A\00"
@.str.5 = [8 x i8] c"/my_sem\00"
@SEM_FAILED = global i32* null
@.str.6 = [9 x i8] c"sem_open\00"
@.str.7 = [9 x i8] c"sem_wait\00"
@stdout = global i32 0
@.str.8 = [4 x i8] c"%s\0A\00"
@.str.9 = [9 x i8] c"sem_post\00"
@.str.11 = [7 x i8] c"munmap\00"
@.str.12 = [10 x i8] c"sem_close\00"
@EXIT_SUCCESS = global i32 0
@str = [27 x i8] c"Attaching to the semaphore\00"
@str.13 = [31 x i8] c"RCV has successfully completed\00"
define void @receive_it() {
%1 = load i32, i32* @O_RDWR
%2 = tail call i32 @shm_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1, i32 0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @errno
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
%9 = load i32, i32* @PROT_READ
%10 = load i32, i32* @PROT_WRITE
%11 = or i32 %10, %9
%12 = load i32, i32* @MAP_SHARED
%13 = tail call i8* @mmap(i32* null, i32 8196, i32 %11, i32 %12, i32 %2, i32 0)
%14 = load i8*, i8** @MAP_FAILED
%15 = icmp eq i8* %13, %14
br i1 %15, label %16, label %20
16: ; preds = %8
%17 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = load i32, i32* @errno
%19 = tail call i32 @exit(i32 %18)
unreachable
20: ; preds = %8
%21 = ptrtoint i8* %13 to i64
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i64 %21)
%23 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%24 = tail call i32* @sem_open(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i32 0)
%25 = load i32*, i32** @SEM_FAILED
%26 = icmp eq i32* %24, %25
br i1 %26, label %30, label %27
27: ; preds = %20
%28 = tail call i64 @sem_wait(i32* %24)
%29 = icmp eq i64 %28, 0
br i1 %29, label %38, label %34
30: ; preds = %20
%31 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%32 = load i32, i32* @errno
%33 = tail call i32 @exit(i32 %32)
unreachable
34: ; preds = %65, %56, %47, %27
%35 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.7, i64 0, i64 0))
%36 = load i32, i32* @errno
%37 = tail call i32 @exit(i32 %36)
unreachable
38: ; preds = %27
%39 = load i32, i32* @stdout
%40 = tail call i32 @fprintf(i32 %39, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%41 = tail call i64 @sem_post(i32* %24)
%42 = icmp eq i64 %41, 0
br i1 %42, label %47, label %43
43: ; preds = %69, %60, %51, %38
%44 = tail call i32 @perror(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
%45 = load i32, i32* @errno
%46 = tail call i32 @exit(i32 %45)
unreachable
47: ; preds = %38
%48 = tail call i32 @usleep(i32 1000)
%49 = tail call i64 @sem_wait(i32* %24)
%50 = icmp eq i64 %49, 0
br i1 %50, label %51, label %34
51: ; preds = %47
%52 = load i32, i32* @stdout
%53 = tail call i32 @fprintf(i32 %52, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%54 = tail call i64 @sem_post(i32* %24)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %43
56: ; preds = %51
%57 = tail call i32 @usleep(i32 1000)
%58 = tail call i64 @sem_wait(i32* %24)
%59 = icmp eq i64 %58, 0
br i1 %59, label %60, label %34
60: ; preds = %56
%61 = load i32, i32* @stdout
%62 = tail call i32 @fprintf(i32 %61, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%63 = tail call i64 @sem_post(i32* %24)
%64 = icmp eq i64 %63, 0
br i1 %64, label %65, label %43
65: ; preds = %60
%66 = tail call i32 @usleep(i32 1000)
%67 = tail call i64 @sem_wait(i32* %24)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %34
69: ; preds = %65
%70 = load i32, i32* @stdout
%71 = tail call i32 @fprintf(i32 %70, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.8, i64 0, i64 0), i8* %13)
%72 = tail call i64 @sem_post(i32* %24)
%73 = icmp eq i64 %72, 0
br i1 %73, label %74, label %43
74: ; preds = %69
%75 = tail call i32 @usleep(i32 1000)
%76 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @str.13, i64 0, i64 0))
%77 = tail call i64 @munmap(i8* %13, i32 8196)
%78 = icmp eq i64 %77, 0
br i1 %78, label %83, label %79
79: ; preds = %74
%80 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%81 = load i32, i32* @errno
%82 = tail call i32 @exit(i32 %81)
unreachable
83: ; preds = %74
%84 = tail call i32 @sem_close(i32* %24)
%85 = icmp eq i32 %84, -1
br i1 %85, label %86, label %90
86: ; preds = %83
%87 = tail call i32 @perror(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.12, i64 0, i64 0))
%88 = load i32, i32* @errno
%89 = tail call i32 @exit(i32 %88)
unreachable
90: ; preds = %83
%91 = load i32, i32* @EXIT_SUCCESS
%92 = tail call i32 @exit(i32 %91)
unreachable
}