#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 */
int /*<<< orphan*/ printf(char *, ...);
int semCreate(int, int);
int semDelete(int);
int semGet(int, int);
int semGetValue(int, int /*<<< orphan*/);
int semIncrement(int, int /*<<< orphan*/, int);
int semSetValue(int, int /*<<< orphan*/, int);
int semWait(int, int /*<<< orphan*/);
int semWait_timeout(int, int /*<<< orphan*/, int);
int main() {
  int ret, semid;
  printf("Creating %d semaphores with key %d\n", 10, 1);
  semid = semCreate(1, 10);
  printf("Got semid: %d\n", semid);
  printf("Getting %d semaphores with key %d\n", 10, 1);
  semid = semGet(1, 10);
  printf("Got semid: %d\n", semid);
  printf("Setting semaphore %d to %d\n", 0, 5);
  ret = semSetValue(semid, 0, 5);
  printf("returned: %d\n", ret);
  printf("Getting semaphore: %d\n", 0);
  ret = semGetValue(semid, 0);
  printf("returned: %d\n", ret);
  printf("Signaling semaphore %d with increment value of 2\n", 0);
  ret = semIncrement(semid, 0, 2);
  printf("returned: %d\n", ret);
  printf("Getting semaphore: %d\n", 0);
  ret = semGetValue(semid, 0);
  printf("returned: %d\n", ret);
  printf("Waiting on semaphore: %d\n", 0);
  ret = semWait(semid, 0);
  printf("returned: %d\n", ret);
  printf("Getting semaphore: %d\n", 0);
  ret = semGetValue(semid, 0);
  printf("returned: %d\n", ret);
  printf("Setting semaphore %d to %d\n", 0, 0);
  ret = semSetValue(semid, 0, 0);
  printf("returned: %d\n", ret);
  printf("Getting semaphore: %d\n", 0);
  ret = semGetValue(semid, 0);
  printf("returned: %d\n", ret);
  printf("Waiting on with timeout on locked semaphore: %d\n", 0);
  ret = semWait_timeout(semid, 0, 100000);
  printf("returned: %d (-1 means the semaphore timed out)\n", ret);
  printf("Deleting semaphores... \n");
  ret = semDelete(semid);
  printf("returned: %d\n", ret);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xe5a(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   10a0 <semCreate@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe51(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe52(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
mov    $0x0,%al
call   1050 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   10b0 <semGet@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xe16(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe3a(%rip),%rdi
xor    %esi,%esi
mov    $0x5,%edx
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x5,%edx
call   1060 <semSetValue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xe2c(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe2c(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1080 <semGetValue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdfe(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xe15(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x2,%edx
call   1090 <semIncrement@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xdcb(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xdcb(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1080 <semGetValue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd9d(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xde6(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1040 <semWait@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd6f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd6f(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1080 <semGetValue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd41(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd17(%rip),%rdi
xor    %edx,%edx
mov    %edx,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1060 <semSetValue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd0f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd0f(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
call   1080 <semGetValue@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xce1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd44(%rip),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
xor    %esi,%esi
mov    $0x186a0,%edx
call   1070 <semWait_timeout@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd50(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
lea    0xd73(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0xc(%rbp),%edi
call   1030 <semDelete@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xc84(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
lea    0xe51(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   10b0 <semCreate@plt>
lea    0xe4e(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe4a(%rip),%rdi
mov    $0xa,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x1,%edi
mov    $0xa,%esi
call   10c0 <semGet@plt>
mov    %eax,%ebx
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe38(%rip),%r15
mov    %r15,%rdi
xor    %esi,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x5,%edx
call   1070 <semSetValue@plt>
lea    0xe2e(%rip),%r14
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe29(%rip),%r12
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1090 <semGetValue@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xe18(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x2,%edx
call   10a0 <semIncrement@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1090 <semGetValue@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdff(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <semWait@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1090 <semGetValue@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r15,%rdi
xor    %esi,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1070 <semSetValue@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r12,%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1090 <semGetValue@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xd8d(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %ebx,%edi
xor    %esi,%esi
mov    $0x186a0,%edx
call   1080 <semWait_timeout@plt>
lea    0xda0(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
lea    0xdc1(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
call   1040 <semDelete@plt>
mov    %r14,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1060 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Creating %d semaphores with key %d\0A\00"
@.str.1 = [15 x i8] c"Got semid: %d\0A\00"
@.str.2 = [35 x i8] c"Getting %d semaphores with key %d\0A\00"
@.str.3 = [28 x i8] c"Setting semaphore %d to %d\0A\00"
@.str.4 = [14 x i8] c"returned: %d\0A\00"
@.str.5 = [23 x i8] c"Getting semaphore: %d\0A\00"
@.str.6 = [50 x i8] c"Signaling semaphore %d with increment value of 2\0A\00"
@.str.7 = [26 x i8] c"Waiting on semaphore: %d\0A\00"
@.str.8 = [49 x i8] c"Waiting on with timeout on locked semaphore: %d\0A\00"
@.str.9 = [49 x i8] c"returned: %d (-1 means the semaphore timed out)\0A\00"
@.str.10 = [25 x i8] c"Deleting semaphores... \0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 10, i32 1)
%5 = call i32 @semCreate(i32 1, i32 10)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %6)
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 1)
%9 = call i32 @semGet(i32 1, i32 10)
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %10)
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 5)
%13 = load i32, i32* %3
%14 = call i32 @semSetValue(i32 %13, i32 0, i32 5)
store i32 %14, i32* %2
%15 = load i32, i32* %2
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%18 = load i32, i32* %3
%19 = call i32 @semGetValue(i32 %18, i32 0)
store i32 %19, i32* %2
%20 = load i32, i32* %2
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %20)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0), i32 0)
%23 = load i32, i32* %3
%24 = call i32 @semIncrement(i32 %23, i32 0, i32 2)
store i32 %24, i32* %2
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %25)
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%28 = load i32, i32* %3
%29 = call i32 @semGetValue(i32 %28, i32 0)
store i32 %29, i32* %2
%30 = load i32, i32* %2
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %30)
%32 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 0)
%33 = load i32, i32* %3
%34 = call i32 @semWait(i32 %33, i32 0)
store i32 %34, i32* %2
%35 = load i32, i32* %2
%36 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %35)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%38 = load i32, i32* %3
%39 = call i32 @semGetValue(i32 %38, i32 0)
store i32 %39, i32* %2
%40 = load i32, i32* %2
%41 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %40)
%42 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 0)
%43 = load i32, i32* %3
%44 = call i32 @semSetValue(i32 %43, i32 0, i32 0)
store i32 %44, i32* %2
%45 = load i32, i32* %2
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %45)
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%48 = load i32, i32* %3
%49 = call i32 @semGetValue(i32 %48, i32 0)
store i32 %49, i32* %2
%50 = load i32, i32* %2
%51 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %50)
%52 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0), i32 0)
%53 = load i32, i32* %3
%54 = call i32 @semWait_timeout(i32 %53, i32 0, i32 100000)
store i32 %54, i32* %2
%55 = load i32, i32* %2
%56 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i32 %55)
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.10, i64 0, i64 0))
%58 = load i32, i32* %3
%59 = call i32 @semDelete(i32 %58)
store i32 %59, i32* %2
%60 = load i32, i32* %2
%61 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %60)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Creating %d semaphores with key %d\0A\00"
@.str.1 = [15 x i8] c"Got semid: %d\0A\00"
@.str.2 = [35 x i8] c"Getting %d semaphores with key %d\0A\00"
@.str.3 = [28 x i8] c"Setting semaphore %d to %d\0A\00"
@.str.4 = [14 x i8] c"returned: %d\0A\00"
@.str.5 = [23 x i8] c"Getting semaphore: %d\0A\00"
@.str.6 = [50 x i8] c"Signaling semaphore %d with increment value of 2\0A\00"
@.str.7 = [26 x i8] c"Waiting on semaphore: %d\0A\00"
@.str.8 = [49 x i8] c"Waiting on with timeout on locked semaphore: %d\0A\00"
@.str.9 = [49 x i8] c"returned: %d (-1 means the semaphore timed out)\0A\00"
@str = [24 x i8] c"Deleting semaphores... \00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i32 10, i32 1)
%2 = tail call i32 @semCreate(i32 1, i32 10)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %2)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i32 10, i32 1)
%5 = tail call i32 @semGet(i32 1, i32 10)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %5)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 5)
%8 = tail call i32 @semSetValue(i32 %5, i32 0, i32 5)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %8)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%11 = tail call i32 @semGetValue(i32 %5, i32 0)
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %11)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([50 x i8], [50 x i8]* @.str.6, i64 0, i64 0), i32 0)
%14 = tail call i32 @semIncrement(i32 %5, i32 0, i32 2)
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %14)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%17 = tail call i32 @semGetValue(i32 %5, i32 0)
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %17)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.7, i64 0, i64 0), i32 0)
%20 = tail call i32 @semWait(i32 %5, i32 0)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %20)
%22 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%23 = tail call i32 @semGetValue(i32 %5, i32 0)
%24 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %23)
%25 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.3, i64 0, i64 0), i32 0, i32 0)
%26 = tail call i32 @semSetValue(i32 %5, i32 0, i32 0)
%27 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %26)
%28 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.5, i64 0, i64 0), i32 0)
%29 = tail call i32 @semGetValue(i32 %5, i32 0)
%30 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %29)
%31 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.8, i64 0, i64 0), i32 0)
%32 = tail call i32 @semWait_timeout(i32 %5, i32 0, i32 100000)
%33 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i32 %32)
%34 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%35 = tail call i32 @semDelete(i32 %5)
%36 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i32 %35)
ret i32 0
}