#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 */
struct piecbajtow {
  int dummy;
};
typedef int /*<<< orphan*/ piecbajtow;
typedef int /*<<< orphan*/ pid_t;

/* Variables and functions */
int /*<<< orphan*/ FBB1(struct piecbajtow *);
int /*<<< orphan*/ FBB2(struct piecbajtow *, int);
int IPC_CREAT;
int /*<<< orphan*/ _exit(int);
int dziala(int /*<<< orphan*/);
int /*<<< orphan*/ fork();
int /*<<< orphan*/ getppid();
struct piecbajtow *malloc(int);
int /*<<< orphan*/ printf(char *);
scalar_t__ rand();
scalar_t__ shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int shmget(int, int, int);
int /*<<< orphan*/ showFBB(struct piecbajtow *);
scalar_t__ sprawdz(struct piecbajtow *);
int /*<<< orphan*/ srand(unsigned int);
scalar_t__ time(int /*<<< orphan*/ *);
int /*<<< orphan*/ wait(int /*<<< orphan*/ *);
int main() {
  srand((unsigned int)time(NULL));
  pid_t pid = fork();
  if (!pid) {
    pid_t ppid = getppid();
    int id1 = shmget(727272, 16, IPC_CREAT | 0644),
        id2 = shmget(727271, sizeof(bool), IPC_CREAT | 0644);
    if (id1 == -1 || id2 == -1) {
      printf("Blad\n\n");
      _exit(1);
    }
    int *buf1 = (int *)shmat(id1, NULL, 0);
    bool *buf2 = (bool *)shmat(id2, NULL, 0);
    buf2[0] = 1;
    if (buf1 == NULL || buf2 == NULL) {
      printf("Blad\n\n");
      _exit(1);
    }
    for (int i = 0; buf2[0] && dziala(ppid) == 1; i++) {
      buf1[i % 16] = (char)rand() % 256;
    }
    _exit(0);
  }
  int id3 = shmget(727272, 16, IPC_CREAT | 0644),
      id4 = shmget(727271, sizeof(bool), IPC_CREAT | 0644);
  if (id3 == -1 || id4 == -1)
    printf("Blad\n\n");
  int *buf3 = (int *)shmat(id3, NULL, 0);
  bool *buf4 = (bool *)shmat(id4, NULL, 0);
  if (buf3 == NULL || buf4 == NULL)
    printf("Blad\n\n");
  buf4[0] = 1;
  struct piecbajtow *piecbajtow = malloc(sizeof(piecbajtow));
  FBB1(piecbajtow);
  for (int i = 0; true; i++) {
    FBB2(piecbajtow, buf3[i % 16]);
    if (sprawdz(piecbajtow)) {
      showFBB(piecbajtow);
      printf("Znalezione\n");
      buf4[0] = 0;
      break;
    }
  }
  wait(NULL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
mov    $0x0,%al
call   1110 <fork@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1389 <main+0x189>
mov    $0x0,%al
call   10f0 <getppid@plt>
mov    %eax,-0xc(%rbp)
mov    0x2d9c(%rip),%rax
mov    (%rax),%edx
or     $0x1a4,%edx
mov    $0xb18e8,%edi
mov    $0x10,%esi
call   10e0 <shmget@plt>
mov    %eax,-0x10(%rbp)
mov    0x2d7b(%rip),%rax
mov    (%rax),%edx
or     $0x1a4,%edx
mov    $0xb18e7,%edi
mov    $0x4,%esi
call   10e0 <shmget@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
je     1293 <main+0x93>
cmpl   $0xffffffff,-0x14(%rbp)
jne    12a9 <main+0xa9>
lea    0xd66(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>
mov    -0x10(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,-0x20(%rbp)
mov    -0x14(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x1,(%rax)
cmpq   $0x0,-0x20(%rbp)
je     12ed <main+0xed>
cmpq   $0x0,-0x28(%rbp)
jne    1303 <main+0x103>
lea    0xd0c(%rip),%rdi
call   1060 <printf@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>
movl   $0x0,-0x2c(%rbp)
mov    -0x28(%rbp),%rcx
xor    %eax,%eax
cmpl   $0x0,(%rcx)
mov    %al,-0x55(%rbp)
je     132d <main+0x12d>
mov    -0xc(%rbp),%edi
call   10c0 <dziala@plt>
cmp    $0x1,%eax
sete   %al
mov    %al,-0x55(%rbp)
mov    -0x55(%rbp),%al
test   $0x1,%al
jne    133d <main+0x13d>
jmp    1382 <main+0x182>
mov    $0x0,%al
call   1120 <rand@plt>
movsbl %al,%eax
mov    $0x100,%ecx
cltd
idiv   %ecx
mov    %edx,-0x5c(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x2c(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    -0x68(%rbp),%rax
mov    %edx,%ecx
mov    -0x5c(%rbp),%edx
movslq %ecx,%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    130a <main+0x10a>
xor    %edi,%edi
call   1030 <_exit@plt>
mov    0x2c50(%rip),%rax
mov    (%rax),%edx
or     $0x1a4,%edx
mov    $0xb18e8,%edi
mov    $0x10,%esi
call   10e0 <shmget@plt>
mov    %eax,-0x30(%rbp)
mov    0x2c2f(%rip),%rax
mov    (%rax),%edx
or     $0x1a4,%edx
mov    $0xb18e7,%edi
mov    $0x4,%esi
call   10e0 <shmget@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0xffffffff,-0x30(%rbp)
je     13df <main+0x1df>
cmpl   $0xffffffff,-0x34(%rbp)
jne    13eb <main+0x1eb>
lea    0xc1a(%rip),%rdi
call   1060 <printf@plt>
mov    -0x30(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,-0x40(%rbp)
mov    -0x34(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x40(%rbp)
je     1425 <main+0x225>
cmpq   $0x0,-0x48(%rbp)
jne    1431 <main+0x231>
lea    0xbd4(%rip),%rdi
call   1060 <printf@plt>
mov    -0x48(%rbp),%rax
movl   $0x1,(%rax)
mov    $0x8,%edi
call   1090 <malloc@plt>
mov    %rax,-0x50(%rbp)
mov    -0x50(%rbp),%rdi
call   1040 <FBB1@plt>
movl   $0x0,-0x54(%rbp)
mov    $0x1,%al
test   $0x1,%al
jne    1468 <main+0x268>
jmp    14d8 <main+0x2d8>
mov    -0x50(%rbp),%rdi
mov    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x54(%rbp),%eax
mov    $0x10,%ecx
cltd
idiv   %ecx
mov    -0x70(%rbp),%rax
movslq %edx,%rcx
mov    (%rax,%rcx,4),%esi
call   10a0 <FBB2@plt>
mov    -0x50(%rbp),%rdi
call   10b0 <sprawdz@plt>
cmp    $0x0,%rax
je     14c5 <main+0x2c5>
mov    -0x50(%rbp),%rdi
call   1050 <showFBB@plt>
lea    0xb56(%rip),%rdi
call   1060 <printf@plt>
mov    -0x48(%rbp),%rax
movl   $0x0,(%rax)
jmp    14d8 <main+0x2d8>
jmp    14ca <main+0x2ca>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    1459 <main+0x259>
xor    %eax,%eax
mov    %eax,%edi
call   1100 <wait@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
xor    %edi,%edi
call   1080 <time@plt>
mov    %eax,%edi
call   1070 <srand@plt>
xor    %eax,%eax
call   1110 <fork@plt>
test   %eax,%eax
je     1320 <main+0x120>
mov    0x2db5(%rip),%r14
mov    $0x1a4,%ebp
mov    (%r14),%edx
or     %ebp,%edx
mov    $0xb18e8,%edi
mov    $0x10,%esi
call   10e0 <shmget@plt>
mov    %eax,%ebx
or     (%r14),%ebp
mov    $0xb18e7,%edi
mov    $0x4,%esi
mov    %ebp,%edx
call   10e0 <shmget@plt>
mov    %eax,%ebp
cmp    $0xffffffff,%ebx
je     1266 <main+0x66>
cmp    $0xffffffff,%ebp
jne    1272 <main+0x72>
lea    0xd9e(%rip),%rdi
call   1050 <puts@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,%r15
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,%r14
test   %r15,%r15
je     1298 <main+0x98>
test   %r14,%r14
jne    12a4 <main+0xa4>
lea    0xd6c(%rip),%rdi
call   1050 <puts@plt>
movl   $0x1,(%r14)
mov    $0x8,%edi
call   1090 <malloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1040 <FBB1@plt>
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebx,%eax
and    $0xf,%eax
mov    (%r15,%rax,4),%esi
mov    %rbp,%rdi
call   10a0 <FBB2@plt>
mov    %rbp,%rdi
call   10b0 <sprawdz@plt>
add    $0x1,%ebx
test   %rax,%rax
je     12d0 <main+0xd0>
mov    %rbp,%rdi
call   1060 <showFBB@plt>
lea    0xd00(%rip),%rdi
call   1050 <puts@plt>
movl   $0x0,(%r14)
xor    %edi,%edi
call   1100 <wait@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %eax,%eax
call   10f0 <getppid@plt>
mov    %eax,%r14d
mov    0x2caf(%rip),%r15
mov    $0x1a4,%ebp
mov    (%r15),%edx
or     %ebp,%edx
mov    $0xb18e8,%edi
mov    $0x10,%esi
call   10e0 <shmget@plt>
mov    %eax,%ebx
or     (%r15),%ebp
mov    $0xb18e7,%edi
mov    $0x4,%esi
mov    %ebp,%edx
call   10e0 <shmget@plt>
cmp    $0xffffffff,%ebx
je     1390 <main+0x190>
mov    %eax,%ebp
cmp    $0xffffffff,%eax
je     1390 <main+0x190>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
mov    %rax,%r15
mov    %ebp,%edi
xor    %esi,%esi
xor    %edx,%edx
call   10d0 <shmat@plt>
movl   $0x1,(%rax)
test   %r15,%r15
jne    13a6 <main+0x1a6>
lea    0xc74(%rip),%rdi
call   1050 <puts@plt>
mov    $0x1,%edi
call   1030 <_exit@plt>
mov    %rax,%rbp
xor    %ebx,%ebx
mov    %r14d,%edi
call   10c0 <dziala@plt>
cmp    $0x1,%eax
jne    13d4 <main+0x1d4>
xor    %eax,%eax
call   1120 <rand@plt>
movsbl %al,%eax
mov    %ebx,%ecx
and    $0xf,%ecx
mov    %eax,(%r15,%rcx,4)
add    $0x1,%ebx
cmpl   $0x0,0x0(%rbp)
jne    13ab <main+0x1ab>
xor    %edi,%edi
call   1030 <_exit@plt>

LLVM IR (-O0):
%struct.piecbajtow = type { i32 }
@IPC_CREAT = global i32 0
@.str = [7 x i8] c"Blad\0A\0A\00"
@.str.1 = [12 x i8] c"Znalezione\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca %struct.piecbajtow*
%14 = alloca i32
store i32 0, i32* %1
%15 = call i64 @time(i32* null)
%16 = trunc i64 %15 to i32
%17 = call i32 @srand(i32 %16)
%18 = call i32 (...) @fork()
store i32 %18, i32* %2
%19 = load i32, i32* %2
%20 = icmp ne i32 %19, 0
br i1 %20, label %81, label %21
21: ; preds = %0
%22 = call i32 (...) @getppid()
store i32 %22, i32* %3
%23 = load i32, i32* @IPC_CREAT
%24 = or i32 %23, 420
%25 = call i32 @shmget(i32 727272, i32 16, i32 %24)
store i32 %25, i32* %4
%26 = load i32, i32* @IPC_CREAT
%27 = or i32 %26, 420
%28 = call i32 @shmget(i32 727271, i32 4, i32 %27)
store i32 %28, i32* %5
%29 = load i32, i32* %4
%30 = icmp eq i32 %29, -1
br i1 %30, label %34, label %31
31: ; preds = %21
%32 = load i32, i32* %5
%33 = icmp eq i32 %32, -1
br i1 %33, label %34, label %37
34: ; preds = %31, %21
%35 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%36 = call i32 @_exit(i32 1)
unreachable
37: ; preds = %31
%38 = load i32, i32* %4
%39 = call i64 @shmat(i32 %38, i32* null, i32 0)
%40 = inttoptr i64 %39 to i32*
store i32* %40, i32** %6
%41 = load i32, i32* %5
%42 = call i64 @shmat(i32 %41, i32* null, i32 0)
%43 = inttoptr i64 %42 to i32*
store i32* %43, i32** %7
%44 = load i32*, i32** %7
%45 = getelementptr inbounds i32, i32* %44, i64 0
store i32 1, i32* %45
%46 = load i32*, i32** %6
%47 = icmp eq i32* %46, null
br i1 %47, label %51, label %48
48: ; preds = %37
%49 = load i32*, i32** %7
%50 = icmp eq i32* %49, null
br i1 %50, label %51, label %54
51: ; preds = %48, %37
%52 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%53 = call i32 @_exit(i32 1)
unreachable
54: ; preds = %48
store i32 0, i32* %8
br label %55
55: ; preds = %76, %54
%56 = load i32*, i32** %7
%57 = getelementptr inbounds i32, i32* %56, i64 0
%58 = load i32, i32* %57
%59 = icmp ne i32 %58, 0
br i1 %59, label %60, label %64
60: ; preds = %55
%61 = load i32, i32* %3
%62 = call i32 @dziala(i32 %61)
%63 = icmp eq i32 %62, 1
br label %64
64: ; preds = %60, %55
%65 = phi i1 [ false, %55 ], [ %63, %60 ]
br i1 %65, label %66, label %79
66: ; preds = %64
%67 = call i64 (...) @rand()
%68 = trunc i64 %67 to i8
%69 = sext i8 %68 to i32
%70 = srem i32 %69, 256
%71 = load i32*, i32** %6
%72 = load i32, i32* %8
%73 = srem i32 %72, 16
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %71, i64 %74
store i32 %70, i32* %75
br label %76
76: ; preds = %66
%77 = load i32, i32* %8
%78 = add nsw i32 %77, 1
store i32 %78, i32* %8
br label %55
79: ; preds = %64
%80 = call i32 @_exit(i32 0)
unreachable
81: ; preds = %0
%82 = load i32, i32* @IPC_CREAT
%83 = or i32 %82, 420
%84 = call i32 @shmget(i32 727272, i32 16, i32 %83)
store i32 %84, i32* %9
%85 = load i32, i32* @IPC_CREAT
%86 = or i32 %85, 420
%87 = call i32 @shmget(i32 727271, i32 4, i32 %86)
store i32 %87, i32* %10
%88 = load i32, i32* %9
%89 = icmp eq i32 %88, -1
br i1 %89, label %93, label %90
90: ; preds = %81
%91 = load i32, i32* %10
%92 = icmp eq i32 %91, -1
br i1 %92, label %93, label %95
93: ; preds = %90, %81
%94 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %95
95: ; preds = %93, %90
%96 = load i32, i32* %9
%97 = call i64 @shmat(i32 %96, i32* null, i32 0)
%98 = inttoptr i64 %97 to i32*
store i32* %98, i32** %11
%99 = load i32, i32* %10
%100 = call i64 @shmat(i32 %99, i32* null, i32 0)
%101 = inttoptr i64 %100 to i32*
store i32* %101, i32** %12
%102 = load i32*, i32** %11
%103 = icmp eq i32* %102, null
br i1 %103, label %107, label %104
104: ; preds = %95
%105 = load i32*, i32** %12
%106 = icmp eq i32* %105, null
br i1 %106, label %107, label %109
107: ; preds = %104, %95
%108 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %109
109: ; preds = %107, %104
%110 = load i32*, i32** %12
%111 = getelementptr inbounds i32, i32* %110, i64 0
store i32 1, i32* %111
%112 = call %struct.piecbajtow* @malloc(i32 8)
store %struct.piecbajtow* %112, %struct.piecbajtow** %13
%113 = load %struct.piecbajtow*, %struct.piecbajtow** %13
%114 = call i32 @FBB1(%struct.piecbajtow* %113)
store i32 0, i32* %14
br label %115
115: ; preds = %135, %109
br i1 true, label %116, label %138
116: ; preds = %115
%117 = load %struct.piecbajtow*, %struct.piecbajtow** %13
%118 = load i32*, i32** %11
%119 = load i32, i32* %14
%120 = srem i32 %119, 16
%121 = sext i32 %120 to i64
%122 = getelementptr inbounds i32, i32* %118, i64 %121
%123 = load i32, i32* %122
%124 = call i32 @FBB2(%struct.piecbajtow* %117, i32 %123)
%125 = load %struct.piecbajtow*, %struct.piecbajtow** %13
%126 = call i64 @sprawdz(%struct.piecbajtow* %125)
%127 = icmp ne i64 %126, 0
br i1 %127, label %128, label %134
128: ; preds = %116
%129 = load %struct.piecbajtow*, %struct.piecbajtow** %13
%130 = call i32 @showFBB(%struct.piecbajtow* %129)
%131 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%132 = load i32*, i32** %12
%133 = getelementptr inbounds i32, i32* %132, i64 0
store i32 0, i32* %133
br label %138
134: ; preds = %116
br label %135
135: ; preds = %134
%136 = load i32, i32* %14
%137 = add nsw i32 %136, 1
store i32 %137, i32* %14
br label %115
138: ; preds = %128, %115
%139 = call i32 @wait(i32* null)
ret i32 0
}

LLVM IR (-O2):
%struct.piecbajtow = type { i32 }
@IPC_CREAT = global i32 0
@str.3 = [11 x i8] c"Znalezione\00"
@str.5 = [6 x i8] c"Blad\0A\00"
define i32 @main() {
%1 = tail call i64 @time(i32* null)
%2 = trunc i64 %1 to i32
%3 = tail call i32 @srand(i32 %2)
%4 = tail call i32 (...) @fork()
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %46
6: ; preds = %0
%7 = tail call i32 (...) @getppid()
%8 = load i32, i32* @IPC_CREAT
%9 = or i32 %8, 420
%10 = tail call i32 @shmget(i32 727272, i32 16, i32 %9)
%11 = load i32, i32* @IPC_CREAT
%12 = or i32 %11, 420
%13 = tail call i32 @shmget(i32 727271, i32 4, i32 %12)
%14 = icmp eq i32 %10, -1
%15 = icmp eq i32 %13, -1
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %17, label %20
17: ; preds = %6
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
%19 = tail call i32 @_exit(i32 1)
unreachable
20: ; preds = %6
%21 = tail call i64 @shmat(i32 %10, i32* null, i32 0)
%22 = inttoptr i64 %21 to i32*
%23 = tail call i64 @shmat(i32 %13, i32* null, i32 0)
%24 = inttoptr i64 %23 to i32*
store i32 1, i32* %24
%25 = icmp eq i64 %21, 0
br i1 %25, label %26, label %29
26: ; preds = %20
%27 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
%28 = tail call i32 @_exit(i32 1)
unreachable
29: ; preds = %20, %35
%30 = phi i32 [ %43, %35 ], [ 0, %20 ]
%31 = tail call i32 @dziala(i32 %7)
%32 = icmp eq i32 %31, 1
br i1 %32, label %35, label %33
33: ; preds = %35, %29
%34 = tail call i32 @_exit(i32 0)
unreachable
35: ; preds = %29
%36 = tail call i64 (...) @rand()
%37 = trunc i64 %36 to i32
%38 = shl i32 %37, 24
%39 = ashr exact i32 %38, 24
%40 = and i32 %30, 15
%41 = zext i32 %40 to i64
%42 = getelementptr inbounds i32, i32* %22, i64 %41
store i32 %39, i32* %42
%43 = add nuw nsw i32 %30, 1
%44 = load i32, i32* %24
%45 = icmp eq i32 %44, 0
br i1 %45, label %33, label %29
46: ; preds = %0
%47 = load i32, i32* @IPC_CREAT
%48 = or i32 %47, 420
%49 = tail call i32 @shmget(i32 727272, i32 16, i32 %48)
%50 = load i32, i32* @IPC_CREAT
%51 = or i32 %50, 420
%52 = tail call i32 @shmget(i32 727271, i32 4, i32 %51)
%53 = icmp eq i32 %49, -1
%54 = icmp eq i32 %52, -1
%55 = select i1 %53, i1 true, i1 %54
br i1 %55, label %56, label %58
56: ; preds = %46
%57 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
br label %58
58: ; preds = %46, %56
%59 = tail call i64 @shmat(i32 %49, i32* null, i32 0)
%60 = inttoptr i64 %59 to i32*
%61 = tail call i64 @shmat(i32 %52, i32* null, i32 0)
%62 = inttoptr i64 %61 to i32*
%63 = icmp eq i64 %59, 0
%64 = icmp eq i64 %61, 0
%65 = select i1 %63, i1 true, i1 %64
br i1 %65, label %66, label %68
66: ; preds = %58
%67 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str.5, i64 0, i64 0))
br label %68
68: ; preds = %58, %66
store i32 1, i32* %62
%69 = tail call %struct.piecbajtow* @malloc(i32 8)
%70 = tail call i32 @FBB1(%struct.piecbajtow* %69)
br label %71
71: ; preds = %71, %68
%72 = phi i32 [ 0, %68 ], [ %80, %71 ]
%73 = and i32 %72, 15
%74 = zext i32 %73 to i64
%75 = getelementptr inbounds i32, i32* %60, i64 %74
%76 = load i32, i32* %75
%77 = tail call i32 @FBB2(%struct.piecbajtow* %69, i32 %76)
%78 = tail call i64 @sprawdz(%struct.piecbajtow* %69)
%79 = icmp eq i64 %78, 0
%80 = add nuw nsw i32 %72, 1
br i1 %79, label %71, label %81
81: ; preds = %71
%82 = tail call i32 @showFBB(%struct.piecbajtow* %69)
%83 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str.3, i64 0, i64 0))
store i32 0, i32* %62
%84 = tail call i32 @wait(i32* null)
ret i32 0
}