#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 flock {
  int l_start;
  int l_len;
  int /*<<< orphan*/ l_type;
  int /*<<< orphan*/ l_whence;
};

/* Variables and functions */
scalar_t__ EDEADLK;
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ F_SETLKW;
int /*<<< orphan*/ F_UNLCK;
int /*<<< orphan*/ F_WRLCK;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ alarm(int);
int /*<<< orphan*/ err(int, char *);
scalar_t__ errno;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int fcntl(int, int /*<<< orphan*/, struct flock *);
int fork();
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ safe_waitpid(int);
int /*<<< orphan*/ sleep(int);
int test5(int fd, int argc, const char **argv) {
  int pid;
  struct flock fl;
  int res;
  fl.l_start = 0;
  fl.l_len = 1;
  fl.l_type = F_WRLCK;
  fl.l_whence = SEEK_SET;
  if (fcntl(fd, F_SETLK, &fl) < 0)
    err(1, "F_SETLK 1 (parent)");
  pid = fork();
  if (pid < 0)
    err(1, "fork");
  if (pid == 0) {
    fl.l_start = 1;
    if (fcntl(fd, F_SETLK, &fl) < 0)
      err(1, "F_SETLK (child)");
    fl.l_start = 0;
    if (fcntl(fd, F_SETLKW, &fl) < 0)
      err(1, "F_SETLKW (child)");
    exit(0);
  }
  sleep(1);
  alarm(1);
  printf("5 - F_SETLKW simple deadlock: ");
  fl.l_start = 1;
  res = fcntl(fd, F_SETLKW, &fl);
  kill(pid, SIGTERM);
  safe_waitpid(pid);
  do {
    if (res == 0) {
      printf("FAIL (%s)\n", "res == 0");
      return -1;
    }
  } while (0);
  do {
    if (errno != EDEADLK) {
      printf("FAIL (%s)\n", "errno != EDEADLK");
      return -1;
    }
  } while (0);
  fl.l_start = 0;
  fl.l_len = 0;
  fl.l_type = F_UNLCK;
  if (fcntl(fd, F_SETLK, &fl) < 0)
    err(1, "F_UNLCK");
  alarm(0);
  do {
    printf("SUCCEED\n");
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<test5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x1,-0x2c(%rbp)
mov    0x2df1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    0x2ded(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2e06(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <fcntl@plt>
cmp    $0x0,%eax
jge    11f7 <test5+0x67>
mov    $0x1,%edi
lea    0xe0e(%rip),%rsi
call   1080 <err@plt>
mov    $0x0,%al
call   10b0 <fork@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
jge    121c <test5+0x8c>
mov    $0x1,%edi
lea    0xdfc(%rip),%rsi
call   1080 <err@plt>
cmpl   $0x0,-0x1c(%rbp)
jne    1299 <test5+0x109>
movl   $0x1,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2da1(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <fcntl@plt>
cmp    $0x0,%eax
jge    125c <test5+0xcc>
mov    $0x1,%edi
lea    0xdc1(%rip),%rsi
call   1080 <err@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2d73(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <fcntl@plt>
cmp    $0x0,%eax
jge    1292 <test5+0x102>
mov    $0x1,%edi
lea    0xd9b(%rip),%rsi
call   1080 <err@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    $0x1,%edi
call   10a0 <sleep@plt>
mov    $0x1,%edi
call   1060 <alarm@plt>
lea    0xd85(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x1,-0x30(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2d14(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <fcntl@plt>
mov    %eax,-0x34(%rbp)
mov    -0x1c(%rbp),%edi
mov    0x2d04(%rip),%rax
mov    (%rax),%esi
call   1070 <kill@plt>
mov    -0x1c(%rbp),%edi
call   1030 <safe_waitpid@plt>
cmpl   $0x0,-0x34(%rbp)
jne    131e <test5+0x18e>
lea    0xd54(%rip),%rdi
lea    0xd58(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13cd <test5+0x23d>
jmp    1323 <test5+0x193>
jmp    1328 <test5+0x198>
mov    0x2c89(%rip),%rax
mov    (%rax),%rax
mov    0x2c8f(%rip),%rcx
cmp    (%rcx),%rax
je     1363 <test5+0x1d3>
lea    0xd0f(%rip),%rdi
lea    0xd1c(%rip),%rsi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    13cd <test5+0x23d>
jmp    1368 <test5+0x1d8>
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    0x2c53(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2c4c(%rip),%rax
mov    (%rax),%esi
lea    -0x30(%rbp),%rdx
call   1040 <fcntl@plt>
cmp    $0x0,%eax
jge    13b1 <test5+0x221>
mov    $0x1,%edi
lea    0xcd1(%rip),%rsi
call   1080 <err@plt>
xor    %edi,%edi
call   1060 <alarm@plt>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test5>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %edi,%r14d
movabs $0x100000000,%rax
mov    %rax,0x8(%rsp)
mov    0x2de5(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    0x2de0(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x14(%rsp)
mov    0x2dfb(%rip),%r15
mov    (%r15),%esi
lea    0x8(%rsp),%rdx
call   1050 <fcntl@plt>
test   %eax,%eax
jns    11ff <test5+0x5f>
lea    0xe0b(%rip),%rsi
mov    $0x1,%edi
call   1090 <err@plt>
xor    %eax,%eax
call   10c0 <fork@plt>
mov    %eax,%ebp
test   %eax,%eax
js     1275 <test5+0xd5>
jne    1286 <test5+0xe6>
movl   $0x1,0x8(%rsp)
mov    (%r15),%esi
lea    0x8(%rsp),%rdx
mov    %r14d,%edi
call   1050 <fcntl@plt>
test   %eax,%eax
jns    123b <test5+0x9b>
lea    0xde7(%rip),%rsi
mov    $0x1,%edi
call   1090 <err@plt>
movl   $0x0,0x8(%rsp)
mov    0x2d96(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %r14d,%edi
call   1050 <fcntl@plt>
test   %eax,%eax
jns    126e <test5+0xce>
lea    0xdc4(%rip),%rsi
mov    $0x1,%edi
call   1090 <err@plt>
xor    %edi,%edi
call   10a0 <exit@plt>
lea    0xd97(%rip),%rsi
mov    $0x1,%edi
call   1090 <err@plt>
mov    $0x1,%edi
call   10b0 <sleep@plt>
mov    $0x1,%edi
call   1070 <alarm@plt>
lea    0xd98(%rip),%rdi
xor    %eax,%eax
call   1060 <printf@plt>
movl   $0x1,0x8(%rsp)
mov    0x2d29(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %r14d,%edi
call   1050 <fcntl@plt>
mov    %eax,%ebx
mov    0x2d19(%rip),%rax
mov    (%rax),%esi
mov    %ebp,%edi
call   1080 <kill@plt>
mov    %ebp,%edi
call   1040 <safe_waitpid@plt>
test   %ebx,%ebx
je     134b <test5+0x1ab>
mov    0x2cce(%rip),%rax
mov    (%rax),%rax
mov    0x2cd4(%rip),%rcx
cmp    (%rcx),%rax
jne    135b <test5+0x1bb>
movq   $0x0,0x8(%rsp)
mov    0x2cc7(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x10(%rsp)
mov    (%r15),%esi
lea    0x8(%rsp),%rdx
mov    %r14d,%edi
call   1050 <fcntl@plt>
test   %eax,%eax
jns    1334 <test5+0x194>
lea    0xd53(%rip),%rsi
mov    $0x1,%edi
call   1090 <err@plt>
xor    %ebx,%ebx
xor    %edi,%edi
call   1070 <alarm@plt>
lea    0xd41(%rip),%rdi
call   1030 <puts@plt>
jmp    1375 <test5+0x1d5>
lea    0xd06(%rip),%rdi
lea    0xd0a(%rip),%rsi
jmp    1369 <test5+0x1c9>
lea    0xcf6(%rip),%rdi
lea    0xd03(%rip),%rsi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.flock = type { i32, i32, i32, i32 }
@F_WRLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
@.str = [19 x i8] c"F_SETLK 1 (parent)\00"
@.str.1 = [5 x i8] c"fork\00"
@.str.2 = [16 x i8] c"F_SETLK (child)\00"
@F_SETLKW = global i32 0
@.str.3 = [17 x i8] c"F_SETLKW (child)\00"
@.str.4 = [31 x i8] c"5 - F_SETLKW simple deadlock: \00"
@SIGTERM = global i32 0
@.str.5 = [11 x i8] c"FAIL (%s)\0A\00"
@.str.6 = [9 x i8] c"res == 0\00"
@errno = global i64 0
@EDEADLK = global i64 0
@.str.7 = [17 x i8] c"errno != EDEADLK\00"
@F_UNLCK = global i32 0
@.str.8 = [8 x i8] c"F_UNLCK\00"
@.str.9 = [9 x i8] c"SUCCEED\0A\00"
define i32 @test5(i32 %0, i32 %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i32
%9 = alloca %struct.flock
%10 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8** %2, i8*** %7
%11 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 0
store i32 0, i32* %11
%12 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 1
store i32 1, i32* %12
%13 = load i32, i32* @F_WRLCK
%14 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 2
store i32 %13, i32* %14
%15 = load i32, i32* @SEEK_SET
%16 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 3
store i32 %15, i32* %16
%17 = load i32, i32* %5
%18 = load i32, i32* @F_SETLK
%19 = call i32 @fcntl(i32 %17, i32 %18, %struct.flock* %9)
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %3
%22 = call i32 @err(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %21, %3
%24 = call i32 (...) @fork()
store i32 %24, i32* %8
%25 = load i32, i32* %8
%26 = icmp slt i32 %25, 0
br i1 %26, label %27, label %29
27: ; preds = %23
%28 = call i32 @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %29
29: ; preds = %27, %23
%30 = load i32, i32* %8
%31 = icmp eq i32 %30, 0
br i1 %31, label %32, label %50
32: ; preds = %29
%33 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 0
store i32 1, i32* %33
%34 = load i32, i32* %5
%35 = load i32, i32* @F_SETLK
%36 = call i32 @fcntl(i32 %34, i32 %35, %struct.flock* %9)
%37 = icmp slt i32 %36, 0
br i1 %37, label %38, label %40
38: ; preds = %32
%39 = call i32 @err(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %40
40: ; preds = %38, %32
%41 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 0
store i32 0, i32* %41
%42 = load i32, i32* %5
%43 = load i32, i32* @F_SETLKW
%44 = call i32 @fcntl(i32 %42, i32 %43, %struct.flock* %9)
%45 = icmp slt i32 %44, 0
br i1 %45, label %46, label %48
46: ; preds = %40
%47 = call i32 @err(i32 1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %48
48: ; preds = %46, %40
%49 = call i32 @exit(i32 0)
unreachable
50: ; preds = %29
%51 = call i32 @sleep(i32 1)
%52 = call i32 @alarm(i32 1)
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
%54 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 0
store i32 1, i32* %54
%55 = load i32, i32* %5
%56 = load i32, i32* @F_SETLKW
%57 = call i32 @fcntl(i32 %55, i32 %56, %struct.flock* %9)
store i32 %57, i32* %10
%58 = load i32, i32* %8
%59 = load i32, i32* @SIGTERM
%60 = call i32 @kill(i32 %58, i32 %59)
%61 = load i32, i32* %8
%62 = call i32 @safe_waitpid(i32 %61)
br label %63
63: ; preds = %50
%64 = load i32, i32* %10
%65 = icmp eq i32 %64, 0
br i1 %65, label %66, label %68
66: ; preds = %63
%67 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
store i32 -1, i32* %4
br label %92
68: ; preds = %63
br label %69
69: ; preds = %68
br label %70
70: ; preds = %69
%71 = load i64, i64* @errno
%72 = load i64, i64* @EDEADLK
%73 = icmp ne i64 %71, %72
br i1 %73, label %74, label %76
74: ; preds = %70
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
store i32 -1, i32* %4
br label %92
76: ; preds = %70
br label %77
77: ; preds = %76
%78 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 0
store i32 0, i32* %78
%79 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 1
store i32 0, i32* %79
%80 = load i32, i32* @F_UNLCK
%81 = getelementptr inbounds %struct.flock, %struct.flock* %9, i32 0, i32 2
store i32 %80, i32* %81
%82 = load i32, i32* %5
%83 = load i32, i32* @F_SETLK
%84 = call i32 @fcntl(i32 %82, i32 %83, %struct.flock* %9)
%85 = icmp slt i32 %84, 0
br i1 %85, label %86, label %88
86: ; preds = %77
%87 = call i32 @err(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %88
88: ; preds = %86, %77
%89 = call i32 @alarm(i32 0)
br label %90
90: ; preds = %88
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0))
store i32 0, i32* %4
br label %92
92: ; preds = %66, %74, %90
%93 = load i32, i32* %4
ret i32 %93
}

LLVM IR (-O2):
%struct.flock = type { i32, i32, i32, i32 }
@F_WRLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
@.str = [19 x i8] c"F_SETLK 1 (parent)\00"
@.str.1 = [5 x i8] c"fork\00"
@.str.2 = [16 x i8] c"F_SETLK (child)\00"
@F_SETLKW = global i32 0
@.str.3 = [17 x i8] c"F_SETLKW (child)\00"
@.str.4 = [31 x i8] c"5 - F_SETLKW simple deadlock: \00"
@SIGTERM = global i32 0
@.str.5 = [11 x i8] c"FAIL (%s)\0A\00"
@.str.6 = [9 x i8] c"res == 0\00"
@errno = global i64 0
@EDEADLK = global i64 0
@.str.7 = [17 x i8] c"errno != EDEADLK\00"
@F_UNLCK = global i32 0
@.str.8 = [8 x i8] c"F_UNLCK\00"
@str = [8 x i8] c"SUCCEED\00"
define i32 @test5(i32 %0, i32 %1, i8** nocapture readnone %2) {
%4 = alloca %struct.flock
%5 = bitcast %struct.flock* %4 to i8*
%6 = getelementptr inbounds %struct.flock, %struct.flock* %4, i64 0, i32 0
store i32 0, i32* %6
%7 = getelementptr inbounds %struct.flock, %struct.flock* %4, i64 0, i32 1
store i32 1, i32* %7
%8 = load i32, i32* @F_WRLCK
%9 = getelementptr inbounds %struct.flock, %struct.flock* %4, i64 0, i32 2
store i32 %8, i32* %9
%10 = load i32, i32* @SEEK_SET
%11 = getelementptr inbounds %struct.flock, %struct.flock* %4, i64 0, i32 3
store i32 %10, i32* %11
%12 = load i32, i32* @F_SETLK
%13 = call i32 @fcntl(i32 %0, i32 %12, %struct.flock* %4)
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %17
15: ; preds = %3
%16 = call i32 @err(i32 1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %15, %3
%18 = call i32 (...) @fork()
%19 = icmp slt i32 %18, 0
br i1 %19, label %20, label %22
20: ; preds = %17
%21 = call i32 @err(i32 1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %38
22: ; preds = %17
%23 = icmp eq i32 %18, 0
br i1 %23, label %24, label %38
24: ; preds = %22
store i32 1, i32* %6
%25 = load i32, i32* @F_SETLK
%26 = call i32 @fcntl(i32 %0, i32 %25, %struct.flock* %4)
%27 = icmp slt i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @err(i32 1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0))
br label %30
30: ; preds = %28, %24
store i32 0, i32* %6
%31 = load i32, i32* @F_SETLKW
%32 = call i32 @fcntl(i32 %0, i32 %31, %struct.flock* %4)
%33 = icmp slt i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 @err(i32 1, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %30
%37 = call i32 @exit(i32 0)
unreachable
38: ; preds = %20, %22
%39 = call i32 @sleep(i32 1)
%40 = call i32 @alarm(i32 1)
%41 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0))
store i32 1, i32* %6
%42 = load i32, i32* @F_SETLKW
%43 = call i32 @fcntl(i32 %0, i32 %42, %struct.flock* %4)
%44 = load i32, i32* @SIGTERM
%45 = call i32 @kill(i32 %18, i32 %44)
%46 = call i32 @safe_waitpid(i32 %18)
%47 = icmp eq i32 %43, 0
br i1 %47, label %48, label %50
48: ; preds = %38
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %66
50: ; preds = %38
%51 = load i64, i64* @errno
%52 = load i64, i64* @EDEADLK
%53 = icmp eq i64 %51, %52
br i1 %53, label %56, label %54
54: ; preds = %50
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.7, i64 0, i64 0))
br label %66
56: ; preds = %50
store i32 0, i32* %6
store i32 0, i32* %7
%57 = load i32, i32* @F_UNLCK
store i32 %57, i32* %9
%58 = load i32, i32* @F_SETLK
%59 = call i32 @fcntl(i32 %0, i32 %58, %struct.flock* %4)
%60 = icmp slt i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %56
%62 = call i32 @err(i32 1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
br label %63
63: ; preds = %61, %56
%64 = call i32 @alarm(i32 0)
%65 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
br label %66
66: ; preds = %63, %54, %48
%67 = phi i32 [ -1, %48 ], [ -1, %54 ], [ 0, %63 ]
ret i32 %67
}