#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 scalar_t__ pid_t;

/* Variables and functions */
int IPC_CREAT;
int /*<<< orphan*/ SETVAL;
int S_IRUSR;
int S_IWUSR;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int ftok(char *, int /*<<< orphan*/);
int /*<<< orphan*/ myop(int, int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ semctl(int, int /*<<< orphan*/, int /*<<< orphan*/,
                          int /*<<< orphan*/);
int semget(int, int, int);
int /*<<< orphan*/ sleep(int);
int /*<<< orphan*/ waitpid(scalar_t__, int /*<<< orphan*/ *,
                           int /*<<< orphan*/);
int main() {
  int desk = ftok("jojo", 0);
  int semid_1 = semget(desk, 1, S_IRUSR | S_IWUSR | IPC_CREAT);
  semctl(semid_1, 0, SETVAL, 0);
  pid_t pid;
  pid = fork();
  if (pid == 0) {
    myop(semid_1, -1);
    sleep(1);
    printf(
        "░▄▀▌░░░▀▀░░▌▐░░░▀▀░░▌▒▀▒█▌\n░▌▒▀▄░░░░▄▀▒▒▀▄░░░▄▀▒▒▄▀▒▌\n░▀▄▐▒▀▀▀▀▒▒▒▒▒"
        "▒▀▀▀▒▒▒▒▒▒█\n░░░▀▌▒▄██▄▄▄▄████▄▒▒▒▒█▀\n░░░░▄██████████████▒▒▐▌\n░░░▀██"
        "█▀▀████▀█████▀▒▌\n░░░░░▌▒▒▒▄▒▒▒▄▒▒▒▒▒▒▐\n░░░░░▌▒▒▒▒▀▀▀▒▒▒▒▒▒▒▐/n");
    exit(0);
  } else {
    myop(semid_1, 1);
    printf("▄███████▀▀▀▀▀▀███████▄\n░▐████▀▒ЗАПУСКАЕМ▒▀██████▄\n░███▀▒▒▒▒▒ДЯДЮ▒"
           "▒▒▒▒▒▀█████\n░▐██▒▒▒▒▒▒БОГДАНА▒▒▒▒▒████▌\n░▐█▌▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒████"
           "▌\n░░█▒▄▀▀▀▀▀▄▒▒▄▀▀▀▀▀▄▒▐███▌\n░░░▐░░░▄▄░░▌▐░░░▄▄░░▌▐███▌\n░▄▀▌░░░▀"
           "▀░░▌▐░░░▀▀░░▌▒▀▒█▌\n");
  }
  waitpid(pid, NULL, 0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe5a(%rip),%rdi
xor    %esi,%esi
call   1090 <ftok@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e1e(%rip),%rax
mov    (%rax),%edx
mov    0x2e25(%rip),%rax
or     (%rax),%edx
mov    0x2e04(%rip),%rax
or     (%rax),%edx
mov    $0x1,%esi
call   1030 <semget@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
mov    0x2de3(%rip),%rax
mov    (%rax),%edx
xor    %ecx,%ecx
mov    %ecx,%esi
call   1070 <semctl@plt>
mov    $0x0,%al
call   10b0 <fork@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1230 <main+0xa0>
mov    -0xc(%rbp),%edi
mov    $0xffffffff,%esi
call   1050 <myop@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
lea    0xde1(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
mov    -0xc(%rbp),%edi
mov    $0x1,%esi
call   1050 <myop@plt>
lea    0xfff(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1060 <waitpid@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
lea    0xe56(%rip),%rdi
xor    %esi,%esi
call   10a0 <ftok@plt>
mov    0x2e20(%rip),%rcx
mov    0x2e29(%rip),%rdx
mov    (%rdx),%edx
or     (%rcx),%edx
mov    0x2e06(%rip),%rcx
or     (%rcx),%edx
mov    %eax,%edi
mov    $0x1,%esi
call   1030 <semget@plt>
mov    %eax,%ebp
mov    0x2de7(%rip),%rax
mov    (%rax),%edx
mov    %ebp,%edi
xor    %esi,%esi
xor    %ecx,%ecx
call   1080 <semctl@plt>
xor    %eax,%eax
call   10c0 <fork@plt>
test   %rax,%rax
je     122a <main+0x8a>
mov    %rax,%rbx
mov    %ebp,%edi
mov    $0x1,%esi
call   1060 <myop@plt>
lea    0x1033(%rip),%rdi
call   1040 <puts@plt>
mov    %rbx,%rdi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <waitpid@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    %ebp,%edi
mov    $0xffffffff,%esi
call   1060 <myop@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
lea    0xdbe(%rip),%rdi
call   1050 <printf@plt>
xor    %edi,%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"jojo\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@IPC_CREAT = global i32 0
@SETVAL = global i32 0
@.str.1 = [574 x i8] c"\E2\96\91\E2\96\84\E2\96\80\E2\96\8C\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\80\E2\96\92\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\8C\E2\96\92\E2\96\80\E2\96\84\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\80\E2\96\92\E2\96\92\E2\96\80\E2\96\84\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\80\E2\96\92\E2\96\92\E2\96\84\E2\96\80\E2\96\92\E2\96\8C\0A\E2\96\91\E2\96\80\E2\96\84\E2\96\90\E2\96\92\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\80\E2\96\80\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\8C\E2\96\92\E2\96\84\E2\96\88\E2\96\88\E2\96\84\E2\96\84\E2\96\84\E2\96\84\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\84\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\E2\96\80\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\92\E2\96\92\E2\96\90\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\92\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\92\E2\96\92\E2\96\84\E2\96\92\E2\96\92\E2\96\92\E2\96\84\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\90\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\80\E2\96\80\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\90/n\00"
@.str.2 = [604 x i8] c"\E2\96\84\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\84\0A\E2\96\91\E2\96\90\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\92\D0\97\D0\90\D0\9F\D0\A3\D0\A1\D0\9A\D0\90\D0\95\D0\9C\E2\96\92\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\84\0A\E2\96\91\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\D0\94\D0\AF\D0\94\D0\AE\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\0A\E2\96\91\E2\96\90\E2\96\88\E2\96\88\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\D0\91\D0\9E\D0\93\D0\94\D0\90\D0\9D\D0\90\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\90\E2\96\88\E2\96\8C\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\88\E2\96\92\E2\96\84\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\84\E2\96\92\E2\96\92\E2\96\84\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\84\E2\96\92\E2\96\90\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\84\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\84\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\84\E2\96\80\E2\96\8C\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\80\E2\96\92\E2\96\88\E2\96\8C\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @ftok(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
store i32 %5, i32* %2
%6 = load i32, i32* %2
%7 = load i32, i32* @S_IRUSR
%8 = load i32, i32* @S_IWUSR
%9 = or i32 %7, %8
%10 = load i32, i32* @IPC_CREAT
%11 = or i32 %9, %10
%12 = call i32 @semget(i32 %6, i32 1, i32 %11)
store i32 %12, i32* %3
%13 = load i32, i32* %3
%14 = load i32, i32* @SETVAL
%15 = call i32 @semctl(i32 %13, i32 0, i32 %14, i32 0)
%16 = call i64 (...) @fork()
store i64 %16, i64* %4
%17 = load i64, i64* %4
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %25
19: ; preds = %0
%20 = load i32, i32* %3
%21 = call i32 @myop(i32 %20, i32 -1)
%22 = call i32 @sleep(i32 1)
%23 = call i32 @printf(i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str.1, i64 0, i64 0))
%24 = call i32 @exit(i32 0)
unreachable
25: ; preds = %0
%26 = load i32, i32* %3
%27 = call i32 @myop(i32 %26, i32 1)
%28 = call i32 @printf(i8* getelementptr inbounds ([604 x i8], [604 x i8]* @.str.2, i64 0, i64 0))
br label %29
29: ; preds = %25
%30 = load i64, i64* %4
%31 = call i32 @waitpid(i64 %30, i32* null, i32 0)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"jojo\00"
@S_IRUSR = global i32 0
@S_IWUSR = global i32 0
@IPC_CREAT = global i32 0
@SETVAL = global i32 0
@.str.1 = [574 x i8] c"\E2\96\91\E2\96\84\E2\96\80\E2\96\8C\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\80\E2\96\92\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\8C\E2\96\92\E2\96\80\E2\96\84\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\80\E2\96\92\E2\96\92\E2\96\80\E2\96\84\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\80\E2\96\92\E2\96\92\E2\96\84\E2\96\80\E2\96\92\E2\96\8C\0A\E2\96\91\E2\96\80\E2\96\84\E2\96\90\E2\96\92\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\80\E2\96\80\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\8C\E2\96\92\E2\96\84\E2\96\88\E2\96\88\E2\96\84\E2\96\84\E2\96\84\E2\96\84\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\84\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\E2\96\80\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\92\E2\96\92\E2\96\90\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\92\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\92\E2\96\92\E2\96\84\E2\96\92\E2\96\92\E2\96\92\E2\96\84\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\90\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\80\E2\96\80\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\90/n\00"
@str = [603 x i8] c"\E2\96\84\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\84\0A\E2\96\91\E2\96\90\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\92\D0\97\D0\90\D0\9F\D0\A3\D0\A1\D0\9A\D0\90\D0\95\D0\9C\E2\96\92\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\84\0A\E2\96\91\E2\96\88\E2\96\88\E2\96\88\E2\96\80\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\D0\94\D0\AF\D0\94\D0\AE\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\80\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\88\0A\E2\96\91\E2\96\90\E2\96\88\E2\96\88\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\D0\91\D0\9E\D0\93\D0\94\D0\90\D0\9D\D0\90\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\90\E2\96\88\E2\96\8C\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\92\E2\96\88\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\88\E2\96\92\E2\96\84\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\84\E2\96\92\E2\96\92\E2\96\84\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\80\E2\96\84\E2\96\92\E2\96\90\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\91\E2\96\91\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\84\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\84\E2\96\84\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\88\E2\96\88\E2\96\88\E2\96\8C\0A\E2\96\91\E2\96\84\E2\96\80\E2\96\8C\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\90\E2\96\91\E2\96\91\E2\96\91\E2\96\80\E2\96\80\E2\96\91\E2\96\91\E2\96\8C\E2\96\92\E2\96\80\E2\96\92\E2\96\88\E2\96\8C\00"
define i32 @main() {
%1 = tail call i32 @ftok(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = load i32, i32* @S_IRUSR
%3 = load i32, i32* @S_IWUSR
%4 = or i32 %3, %2
%5 = load i32, i32* @IPC_CREAT
%6 = or i32 %4, %5
%7 = tail call i32 @semget(i32 %1, i32 1, i32 %6)
%8 = load i32, i32* @SETVAL
%9 = tail call i32 @semctl(i32 %7, i32 0, i32 %8, i32 0)
%10 = tail call i64 (...) @fork()
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %0
%13 = tail call i32 @myop(i32 %7, i32 -1)
%14 = tail call i32 @sleep(i32 1)
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([574 x i8], [574 x i8]* @.str.1, i64 0, i64 0))
%16 = tail call i32 @exit(i32 0)
unreachable
17: ; preds = %0
%18 = tail call i32 @myop(i32 %7, i32 1)
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([603 x i8], [603 x i8]* @str, i64 0, i64 0))
%20 = tail call i32 @waitpid(i64 %10, i32* null, i32 0)
ret i32 0
}