#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_len;
  scalar_t__ l_start;
  int /*<<< orphan*/ l_whence;
  int /*<<< orphan*/ l_type;
};

/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ F_LOCK;
int /*<<< orphan*/ F_RDLCK;
int /*<<< orphan*/ F_SETLK;
int /*<<< orphan*/ LOCK_EX;
int /*<<< orphan*/ O_RDWR;
int /*<<< orphan*/ SEEK_SET;
int /*<<< orphan*/ close(int);
int fcntl(int, int /*<<< orphan*/, struct flock *);
int flock(int, int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int lockf(int, int /*<<< orphan*/, int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ t1_usage();
int t1(int argc, char *argv[]) {
  int fd;
  int mount_with_flock = 0;
  int error = 0;
  int rc = 0;
  if (argc != 5) {
    t1_usage();
    return EXIT_FAILURE;
  }
  if (!strncmp(argv[2], "on", 3)) {
    mount_with_flock = 1;
  } else if (!strncmp(argv[2], "off", 4)) {
    mount_with_flock = 0;
  } else {
    t1_usage();
    return EXIT_FAILURE;
  }
  if ((fd = open(argv[4], O_RDWR)) < 0) {
    fprintf(stderr, "Couldn't open file: %s\n", argv[3]);
    return EXIT_FAILURE;
  }
  if (!strncmp(argv[3], "-c", 3)) {
    struct flock fl;
    fl.l_type = F_RDLCK;
    fl.l_whence = SEEK_SET;
    fl.l_start = 0;
    fl.l_len = 1;
    error = fcntl(fd, F_SETLK, &fl);
  } else if (!strncmp(argv[3], "-l", 3)) {
    error = lockf(fd, F_LOCK, 1);
  } else if (!strncmp(argv[3], "-f", 3)) {
    error = flock(fd, LOCK_EX);
  } else {
    t1_usage();
    rc = EXIT_FAILURE;
    goto out;
  }
  if (mount_with_flock)
    rc = ((error == 0) ? EXIT_SUCCESS : EXIT_FAILURE);
  else
    rc = ((error == 0) ? EXIT_FAILURE : EXIT_SUCCESS);
out:
  if (fd >= 0)
    close(fd);
  return rc;
}


x86 assembly (clang, -O0):
<t1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     11c6 <t1+0x46>
mov    $0x0,%al
call   1030 <t1_usage@plt>
mov    0x2df4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1418 <t1+0x298>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe2b(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    11f4 <t1+0x74>
movl   $0x1,-0x18(%rbp)
jmp    123f <t1+0xbf>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe00(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1222 <t1+0xa2>
movl   $0x0,-0x18(%rbp)
jmp    123a <t1+0xba>
mov    $0x0,%al
call   1030 <t1_usage@plt>
mov    0x2d80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1418 <t1+0x298>
jmp    123f <t1+0xbf>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
mov    0x2d9a(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jge    128f <t1+0x10f>
mov    0x2d58(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
lea    0xd8e(%rip),%rsi
call   1080 <fprintf@plt>
mov    0x2d2b(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1418 <t1+0x298>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd81(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    12f5 <t1+0x175>
mov    0x2ce0(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    0x2cf4(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2cee(%rip),%rax
mov    (%rax),%esi
lea    -0x38(%rbp),%rdx
call   1050 <fcntl@plt>
mov    %eax,-0x1c(%rbp)
jmp    1392 <t1+0x212>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd1e(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1335 <t1+0x1b5>
mov    -0x14(%rbp),%edi
mov    0x2cb7(%rip),%rax
mov    (%rax),%esi
mov    $0x1,%edx
call   1060 <lockf@plt>
mov    %eax,-0x1c(%rbp)
jmp    138d <t1+0x20d>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xce1(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1370 <t1+0x1f0>
mov    -0x14(%rbp),%edi
mov    0x2c7f(%rip),%rax
mov    (%rax),%esi
call   10a0 <flock@plt>
mov    %eax,-0x1c(%rbp)
jmp    1388 <t1+0x208>
mov    $0x0,%al
call   1030 <t1_usage@plt>
mov    0x2c32(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x20(%rbp)
jmp    1400 <t1+0x280>
jmp    138d <t1+0x20d>
jmp    1392 <t1+0x212>
cmpl   $0x0,-0x18(%rbp)
je     13ce <t1+0x24e>
cmpl   $0x0,-0x1c(%rbp)
jne    13b7 <t1+0x237>
mov    0x2bfb(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
jmp    13c3 <t1+0x243>
mov    0x2bf2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    13fb <t1+0x27b>
cmpl   $0x0,-0x1c(%rbp)
jne    13e9 <t1+0x269>
mov    0x2bd1(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
jmp    13f5 <t1+0x275>
mov    0x2bb8(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x40(%rbp)
mov    -0x40(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    1400 <t1+0x280>
cmpl   $0x0,-0x14(%rbp)
jl     1412 <t1+0x292>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
mov    -0x20(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t1>:
push   %rbp
push   %r14
push   %rbx
sub    $0x20,%rsp
cmp    $0x5,%edi
jne    11c4 <t1+0x44>
mov    %rsi,%rbx
mov    0x10(%rsi),%rdi
lea    0xe65(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
mov    %eax,%ebp
test   %eax,%eax
je     11df <t1+0x5f>
mov    0x10(%rbx),%rdi
lea    0xe4d(%rip),%rsi
mov    $0x4,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     11df <t1+0x5f>
xor    %eax,%eax
call   1030 <t1_usage@plt>
mov    0x2dde(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    0x20(%rbx),%rdi
mov    0x2dfe(%rip),%rax
mov    (%rax),%esi
call   1090 <open@plt>
test   %eax,%eax
js     1254 <t1+0xd4>
mov    %eax,%r14d
mov    0x18(%rbx),%rdi
lea    0xe1c(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     1272 <t1+0xf2>
mov    0x18(%rbx),%rdi
lea    0xe06(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     12c4 <t1+0x144>
mov    0x18(%rbx),%rdi
lea    0xdec(%rip),%rsi
mov    $0x3,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
je     12f8 <t1+0x178>
xor    %eax,%eax
call   1030 <t1_usage@plt>
jmp    12bb <t1+0x13b>
mov    0x2d65(%rip),%rax
mov    (%rax),%edi
mov    0x18(%rbx),%rdx
lea    0xd9f(%rip),%rsi
call   1080 <fprintf@plt>
jmp    11cb <t1+0x4b>
mov    0x2d1f(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x1c(%rsp)
mov    0x2d32(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x18(%rsp)
movq   $0x0,0x10(%rsp)
movl   $0x1,0x8(%rsp)
mov    0x2d2c(%rip),%rax
mov    (%rax),%esi
lea    0x8(%rsp),%rdx
mov    %r14d,%edi
call   1050 <fcntl@plt>
test   %ebp,%ebp
je     12de <t1+0x15e>
test   %eax,%eax
jne    12e2 <t1+0x162>
mov    0x2cee(%rip),%rax
jmp    12e9 <t1+0x169>
mov    0x2d0d(%rip),%rax
mov    (%rax),%esi
mov    %r14d,%edi
mov    $0x1,%edx
call   1060 <lockf@plt>
test   %ebp,%ebp
jne    12b7 <t1+0x137>
test   %eax,%eax
jne    12bb <t1+0x13b>
mov    0x2cbf(%rip),%rax
mov    (%rax),%ebx
mov    %r14d,%edi
call   1070 <close@plt>
jmp    11d4 <t1+0x54>
mov    0x2ce1(%rip),%rax
mov    (%rax),%esi
mov    %r14d,%edi
call   10a0 <flock@plt>
test   %ebp,%ebp
jne    12b7 <t1+0x137>
jmp    12de <t1+0x15e>

LLVM IR (-O0):
%struct.flock = type { i32, i64, i32, i32 }
@EXIT_FAILURE = global i32 0
@.str = [3 x i8] c"on\00"
@.str.1 = [4 x i8] c"off\00"
@O_RDWR = global i32 0
@stderr = global i32 0
@.str.2 = [24 x i8] c"Couldn't open file: %s\0A\00"
@.str.3 = [3 x i8] c"-c\00"
@F_RDLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
@.str.4 = [3 x i8] c"-l\00"
@F_LOCK = global i32 0
@.str.5 = [3 x i8] c"-f\00"
@LOCK_EX = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @t1(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.flock
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
%11 = load i32, i32* %4
%12 = icmp ne i32 %11, 5
br i1 %12, label %13, label %16
13: ; preds = %2
%14 = call i32 (...) @t1_usage()
%15 = load i32, i32* @EXIT_FAILURE
store i32 %15, i32* %3
br label %119
16: ; preds = %2
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32 @strncmp(i8* %19, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
%21 = icmp ne i32 %20, 0
br i1 %21, label %23, label %22
22: ; preds = %16
store i32 1, i32* %7
br label %34
23: ; preds = %16
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 2
%26 = load i8*, i8** %25
%27 = call i32 @strncmp(i8* %26, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%28 = icmp ne i32 %27, 0
br i1 %28, label %30, label %29
29: ; preds = %23
store i32 0, i32* %7
br label %33
30: ; preds = %23
%31 = call i32 (...) @t1_usage()
%32 = load i32, i32* @EXIT_FAILURE
store i32 %32, i32* %3
br label %119
33: ; preds = %29
br label %34
34: ; preds = %33, %22
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 4
%37 = load i8*, i8** %36
%38 = load i32, i32* @O_RDWR
%39 = call i32 @open(i8* %37, i32 %38)
store i32 %39, i32* %6
%40 = icmp slt i32 %39, 0
br i1 %40, label %41, label %48
41: ; preds = %34
%42 = load i32, i32* @stderr
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 3
%45 = load i8*, i8** %44
%46 = call i32 @fprintf(i32 %42, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %45)
%47 = load i32, i32* @EXIT_FAILURE
store i32 %47, i32* %3
br label %119
48: ; preds = %34
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 3
%51 = load i8*, i8** %50
%52 = call i32 @strncmp(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 3)
%53 = icmp ne i32 %52, 0
br i1 %53, label %64, label %54
54: ; preds = %48
%55 = load i32, i32* @F_RDLCK
%56 = getelementptr inbounds %struct.flock, %struct.flock* %10, i32 0, i32 3
store i32 %55, i32* %56
%57 = load i32, i32* @SEEK_SET
%58 = getelementptr inbounds %struct.flock, %struct.flock* %10, i32 0, i32 2
store i32 %57, i32* %58
%59 = getelementptr inbounds %struct.flock, %struct.flock* %10, i32 0, i32 1
store i64 0, i64* %59
%60 = getelementptr inbounds %struct.flock, %struct.flock* %10, i32 0, i32 0
store i32 1, i32* %60
%61 = load i32, i32* %6
%62 = load i32, i32* @F_SETLK
%63 = call i32 @fcntl(i32 %61, i32 %62, %struct.flock* %10)
store i32 %63, i32* %8
br label %89
64: ; preds = %48
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 3
%67 = load i8*, i8** %66
%68 = call i32 @strncmp(i8* %67, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 3)
%69 = icmp ne i32 %68, 0
br i1 %69, label %74, label %70
70: ; preds = %64
%71 = load i32, i32* %6
%72 = load i32, i32* @F_LOCK
%73 = call i32 @lockf(i32 %71, i32 %72, i32 1)
store i32 %73, i32* %8
br label %88
74: ; preds = %64
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds i8*, i8** %75, i64 3
%77 = load i8*, i8** %76
%78 = call i32 @strncmp(i8* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 3)
%79 = icmp ne i32 %78, 0
br i1 %79, label %84, label %80
80: ; preds = %74
%81 = load i32, i32* %6
%82 = load i32, i32* @LOCK_EX
%83 = call i32 @flock(i32 %81, i32 %82)
store i32 %83, i32* %8
br label %87
84: ; preds = %74
%85 = call i32 (...) @t1_usage()
%86 = load i32, i32* @EXIT_FAILURE
store i32 %86, i32* %9
br label %111
87: ; preds = %80
br label %88
88: ; preds = %87, %70
br label %89
89: ; preds = %88, %54
%90 = load i32, i32* %7
%91 = icmp ne i32 %90, 0
br i1 %91, label %92, label %101
92: ; preds = %89
%93 = load i32, i32* %8
%94 = icmp eq i32 %93, 0
br i1 %94, label %95, label %97
95: ; preds = %92
%96 = load i32, i32* @EXIT_SUCCESS
br label %99
97: ; preds = %92
%98 = load i32, i32* @EXIT_FAILURE
br label %99
99: ; preds = %97, %95
%100 = phi i32 [ %96, %95 ], [ %98, %97 ]
store i32 %100, i32* %9
br label %110
101: ; preds = %89
%102 = load i32, i32* %8
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %106
104: ; preds = %101
%105 = load i32, i32* @EXIT_FAILURE
br label %108
106: ; preds = %101
%107 = load i32, i32* @EXIT_SUCCESS
br label %108
108: ; preds = %106, %104
%109 = phi i32 [ %105, %104 ], [ %107, %106 ]
store i32 %109, i32* %9
br label %110
110: ; preds = %108, %99
br label %111
111: ; preds = %110, %84
%112 = load i32, i32* %6
%113 = icmp sge i32 %112, 0
br i1 %113, label %114, label %117
114: ; preds = %111
%115 = load i32, i32* %6
%116 = call i32 @close(i32 %115)
br label %117
117: ; preds = %114, %111
%118 = load i32, i32* %9
store i32 %118, i32* %3
br label %119
119: ; preds = %117, %41, %30, %13
%120 = load i32, i32* %3
ret i32 %120
}

LLVM IR (-O2):
%struct.flock = type { i32, i64, i32, i32 }
@EXIT_FAILURE = global i32 0
@.str = [3 x i8] c"on\00"
@.str.1 = [4 x i8] c"off\00"
@O_RDWR = global i32 0
@stderr = global i32 0
@.str.2 = [24 x i8] c"Couldn't open file: %s\0A\00"
@.str.3 = [3 x i8] c"-c\00"
@F_RDLCK = global i32 0
@SEEK_SET = global i32 0
@F_SETLK = global i32 0
@.str.4 = [3 x i8] c"-l\00"
@F_LOCK = global i32 0
@.str.5 = [3 x i8] c"-f\00"
@LOCK_EX = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @t1(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.flock
%4 = icmp eq i32 %0, 5
br i1 %4, label %8, label %5
5: ; preds = %2
%6 = tail call i32 (...) @t1_usage()
%7 = load i32, i32* @EXIT_FAILURE
br label %78
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @strncmp(i8* %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 3)
%12 = icmp eq i32 %11, 0
br i1 %12, label %20, label %13
13: ; preds = %8
%14 = load i8*, i8** %9
%15 = tail call i32 @strncmp(i8* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 4)
%16 = icmp eq i32 %15, 0
br i1 %16, label %20, label %17
17: ; preds = %13
%18 = tail call i32 (...) @t1_usage()
%19 = load i32, i32* @EXIT_FAILURE
br label %78
20: ; preds = %13, %8
%21 = getelementptr inbounds i8*, i8** %1, i64 4
%22 = load i8*, i8** %21
%23 = load i32, i32* @O_RDWR
%24 = tail call i32 @open(i8* %22, i32 %23)
%25 = icmp slt i32 %24, 0
br i1 %25, label %26, label %32
26: ; preds = %20
%27 = load i32, i32* @stderr
%28 = getelementptr inbounds i8*, i8** %1, i64 3
%29 = load i8*, i8** %28
%30 = tail call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i8* %29)
%31 = load i32, i32* @EXIT_FAILURE
br label %78
32: ; preds = %20
%33 = getelementptr inbounds i8*, i8** %1, i64 3
%34 = load i8*, i8** %33
%35 = tail call i32 @strncmp(i8* %34, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32 3)
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %47
37: ; preds = %32
%38 = bitcast %struct.flock* %3 to i8*
%39 = load i32, i32* @F_RDLCK
%40 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 3
store i32 %39, i32* %40
%41 = load i32, i32* @SEEK_SET
%42 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 2
store i32 %41, i32* %42
%43 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 1
store i64 0, i64* %43
%44 = getelementptr inbounds %struct.flock, %struct.flock* %3, i64 0, i32 0
store i32 1, i32* %44
%45 = load i32, i32* @F_SETLK
%46 = call i32 @fcntl(i32 %24, i32 %45, %struct.flock* %3)
br label %64
47: ; preds = %32
%48 = load i8*, i8** %33
%49 = tail call i32 @strncmp(i8* %48, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0), i32 3)
%50 = icmp eq i32 %49, 0
br i1 %50, label %51, label %54
51: ; preds = %47
%52 = load i32, i32* @F_LOCK
%53 = tail call i32 @lockf(i32 %24, i32 %52, i32 1)
br label %64
54: ; preds = %47
%55 = load i8*, i8** %33
%56 = tail call i32 @strncmp(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i32 3)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %61
58: ; preds = %54
%59 = load i32, i32* @LOCK_EX
%60 = tail call i32 @flock(i32 %24, i32 %59)
br label %64
61: ; preds = %54
%62 = tail call i32 (...) @t1_usage()
%63 = load i32, i32* @EXIT_FAILURE
br label %75
64: ; preds = %51, %58, %37
%65 = phi i32 [ %60, %58 ], [ %53, %51 ], [ %46, %37 ]
%66 = icmp eq i32 %65, 0
br i1 %12, label %67, label %71
67: ; preds = %64
%68 = load i32, i32* @EXIT_SUCCESS
%69 = load i32, i32* @EXIT_FAILURE
%70 = select i1 %66, i32 %68, i32 %69
br label %75
71: ; preds = %64
%72 = load i32, i32* @EXIT_FAILURE
%73 = load i32, i32* @EXIT_SUCCESS
%74 = select i1 %66, i32 %72, i32 %73
br label %75
75: ; preds = %61, %71, %67
%76 = phi i32 [ %63, %61 ], [ %70, %67 ], [ %74, %71 ]
%77 = call i32 @close(i32 %24)
br label %78
78: ; preds = %75, %26, %17, %5
%79 = phi i32 [ %7, %5 ], [ %19, %17 ], [ %31, %26 ], [ %76, %75 ]
ret i32 %79
}