#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*/ O_RDWR;
int /*<<< orphan*/ close(int);
int errno;
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ help();
char *malloc(int);
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char, char);
int strlen(char *);
int write(int, char *, int);
int main(int argc, char *argv[]) {
  if (argc == 1) {
    int fd, ret;
    fd = open("/dev/tl-led", O_RDWR);
    if (fd < 0) {
      perror("Failed to open device");
      return errno;
    }
    ret = write(fd, "all", 3);
    if (ret < 0) {
      perror("Error writing to device");
      close(fd);
      return errno;
    }
    close(fd);
    return 0;
  }
  char *arg1 = malloc(strlen(argv[1]));
  if (arg1) {
    if (strlen(argv[1]) != 3) {
      help();
      free(arg1);
      return -1;
    } else {
      if (argv[1][1] == ':') {
        char lednr = argv[1][0];
        char state = argv[1][2];
        if ('0' > lednr || lednr > '2') {
          help();
          free(arg1);
          return -1;
        }
        if ('0' > state || state > '1') {
          help();
          free(arg1);
          return -1;
        }
        char msg[3];
        msg[0] = lednr;
        msg[1] = state;
        msg[2] = 0;
        printf("Now opening /dev/tl-led, sending STATE=%c to LED=%c ...\n",
               lednr, state);
        int fd, ret;
        fd = open("/dev/tl-led", O_RDWR);
        if (fd < 0) {
          perror("Failed to open device");
          free(arg1);
          return errno;
        }
        ret = write(fd, msg, strlen(msg));
        if (ret < 0) {
          perror("Error writing to device");
          free(arg1);
          close(fd);
          return errno;
        }
        close(fd);
        free(arg1);
      } else {
        help();
        free(arg1);
        return -1;
      }
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1249 <main+0xb9>
mov    0x2e31(%rip),%rax
mov    (%rax),%esi
lea    0xe40(%rip),%rdi
call   1090 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    11ef <main+0x5f>
lea    0xe33(%rip),%rdi
call   10a0 <perror@plt>
mov    0x2df3(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x14(%rbp),%edi
lea    0xe29(%rip),%rsi
mov    $0x3,%edx
call   1040 <write@plt>
mov    %eax,-0x18(%rbp)
cmpl   $0x0,-0x18(%rbp)
jge    1235 <main+0xa5>
lea    0xe0f(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
mov    0x2dad(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x14(%rbp),%edi
call   1070 <close@plt>
movl   $0x0,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1080 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     144c <main+0x2bc>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <strlen@plt>
cmp    $0x3,%eax
je     129e <main+0x10e>
mov    $0x0,%al
call   10b0 <help@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
cmp    $0x3a,%eax
jne    1426 <main+0x296>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    0x2(%rax),%al
mov    %al,-0x22(%rbp)
movsbl -0x21(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     12ec <main+0x15c>
movsbl -0x21(%rbp),%eax
cmp    $0x32,%eax
jle    1308 <main+0x178>
mov    $0x0,%al
call   10b0 <help@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1453 <main+0x2c3>
movsbl -0x22(%rbp),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1326 <main+0x196>
movsbl -0x22(%rbp),%eax
cmp    $0x31,%eax
jle    1342 <main+0x1b2>
mov    $0x0,%al
call   10b0 <help@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x21(%rbp),%al
mov    %al,-0x25(%rbp)
mov    -0x22(%rbp),%al
mov    %al,-0x24(%rbp)
movb   $0x0,-0x23(%rbp)
mov    -0x21(%rbp),%al
lea    0xce2(%rip),%rdi
movsbl %al,%esi
movsbl -0x22(%rbp),%edx
call   1060 <printf@plt>
mov    0x2c79(%rip),%rax
mov    (%rax),%esi
lea    0xc88(%rip),%rdi
call   1090 <open@plt>
mov    %eax,-0x2c(%rbp)
cmpl   $0x0,-0x2c(%rbp)
jge    13b0 <main+0x220>
lea    0xc7b(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    0x2c32(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x2c(%rbp),%eax
mov    %eax,-0x3c(%rbp)
lea    -0x25(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x25(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x3c(%rbp),%edi
mov    -0x38(%rbp),%rsi
mov    %eax,%edx
call   1040 <write@plt>
mov    %eax,-0x30(%rbp)
cmpl   $0x0,-0x30(%rbp)
jge    1410 <main+0x280>
lea    0xc3d(%rip),%rdi
call   10a0 <perror@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x2c(%rbp),%edi
call   1070 <close@plt>
mov    0x2bd2(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1453 <main+0x2c3>
mov    -0x2c(%rbp),%edi
call   1070 <close@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
jmp    1442 <main+0x2b2>
mov    $0x0,%al
call   10b0 <help@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1453 <main+0x2c3>
jmp    1447 <main+0x2b7>
jmp    144c <main+0x2bc>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
cmp    $0x1,%edi
jne    11e1 <main+0x51>
mov    0x2e45(%rip),%rax
mov    (%rax),%esi
lea    0xe54(%rip),%rdi
call   1090 <open@plt>
test   %eax,%eax
js     124c <main+0xbc>
mov    %eax,%ebx
lea    0xe60(%rip),%rsi
mov    %eax,%edi
mov    $0x3,%edx
call   1040 <write@plt>
test   %eax,%eax
js     125a <main+0xca>
mov    %ebx,%edi
call   1070 <close@plt>
xor    %ebp,%ebp
jmp    123f <main+0xaf>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1050 <strlen@plt>
mov    %eax,%edi
call   1080 <malloc@plt>
xor    %ebp,%ebp
test   %rax,%rax
je     123f <main+0xaf>
mov    %rax,%r15
mov    0x8(%rbx),%rdi
call   1050 <strlen@plt>
cmp    $0x3,%eax
jne    122b <main+0x9b>
mov    0x8(%rbx),%rcx
cmpb   $0x3a,0x1(%rcx)
jne    122b <main+0x9b>
mov    (%rcx),%al
lea    -0x33(%rax),%edx
cmp    $0xfc,%dl
jbe    122b <main+0x9b>
mov    0x2(%rcx),%cl
lea    -0x32(%rcx),%edx
cmp    $0xfd,%dl
ja     1278 <main+0xe8>
xor    %eax,%eax
call   10b0 <help@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    $0xffffffff,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xdb9(%rip),%rdi
call   10a0 <perror@plt>
jmp    126d <main+0xdd>
lea    0xdc5(%rip),%rdi
call   10a0 <perror@plt>
mov    %ebx,%edi
call   1070 <close@plt>
mov    0x2d64(%rip),%rax
mov    (%rax),%ebp
jmp    123f <main+0xaf>
mov    %al,0x5(%rsp)
mov    %cl,0x6(%rsp)
movb   $0x0,0x7(%rsp)
movsbl %al,%esi
movsbl %cl,%edx
lea    0xdac(%rip),%rdi
call   1060 <printf@plt>
mov    0x2d4a(%rip),%rax
mov    (%rax),%esi
lea    0xd59(%rip),%rdi
call   1090 <open@plt>
test   %eax,%eax
js     12e6 <main+0x156>
mov    %eax,%r14d
lea    0x5(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %r14d,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1040 <write@plt>
test   %eax,%eax
js     12ff <main+0x16f>
mov    %r14d,%edi
call   1070 <close@plt>
mov    %r15,%rdi
call   1030 <free@plt>
jmp    123f <main+0xaf>
lea    0xd1f(%rip),%rdi
call   10a0 <perror@plt>
mov    %r15,%rdi
call   1030 <free@plt>
jmp    126d <main+0xdd>
lea    0xd20(%rip),%rdi
call   10a0 <perror@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    %r14d,%edi
jmp    1268 <main+0xd8>

LLVM IR (-O0):
@.str = [12 x i8] c"/dev/tl-led\00"
@O_RDWR = global i32 0
@.str.1 = [22 x i8] c"Failed to open device\00"
@errno = global i32 0
@.str.2 = [4 x i8] c"all\00"
@.str.3 = [24 x i8] c"Error writing to device\00"
@.str.4 = [57 x i8] c"Now opening /dev/tl-led, sending STATE=%c to LED=%c ...\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8
%10 = alloca i8
%11 = alloca [3 x i8]
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = icmp eq i32 %14, 1
br i1 %15, label %16, label %37
16: ; preds = %2
%17 = load i32, i32* @O_RDWR
%18 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %17)
store i32 %18, i32* %6
%19 = load i32, i32* %6
%20 = icmp slt i32 %19, 0
br i1 %20, label %21, label %24
21: ; preds = %16
%22 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%23 = load i32, i32* @errno
store i32 %23, i32* %3
br label %142
24: ; preds = %16
%25 = load i32, i32* %6
%26 = call i32 @write(i32 %25, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
store i32 %26, i32* %7
%27 = load i32, i32* %7
%28 = icmp slt i32 %27, 0
br i1 %28, label %29, label %34
29: ; preds = %24
%30 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%31 = load i32, i32* %6
%32 = call i32 @close(i32 %31)
%33 = load i32, i32* @errno
store i32 %33, i32* %3
br label %142
34: ; preds = %24
%35 = load i32, i32* %6
%36 = call i32 @close(i32 %35)
store i32 0, i32* %3
br label %142
37: ; preds = %2
%38 = load i8**, i8*** %5
%39 = getelementptr inbounds i8*, i8** %38, i64 1
%40 = load i8*, i8** %39
%41 = call i32 @strlen(i8* %40)
%42 = call i8* @malloc(i32 %41)
store i8* %42, i8** %8
%43 = load i8*, i8** %8
%44 = icmp ne i8* %43, null
br i1 %44, label %45, label %141
45: ; preds = %37
%46 = load i8**, i8*** %5
%47 = getelementptr inbounds i8*, i8** %46, i64 1
%48 = load i8*, i8** %47
%49 = call i32 @strlen(i8* %48)
%50 = icmp ne i32 %49, 3
br i1 %50, label %51, label %55
51: ; preds = %45
%52 = call i32 (...) @help()
%53 = load i8*, i8** %8
%54 = call i32 @free(i8* %53)
store i32 -1, i32* %3
br label %142
55: ; preds = %45
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 1
%58 = load i8*, i8** %57
%59 = getelementptr inbounds i8, i8* %58, i64 1
%60 = load i8, i8* %59
%61 = sext i8 %60 to i32
%62 = icmp eq i32 %61, 58
br i1 %62, label %63, label %135
63: ; preds = %55
%64 = load i8**, i8*** %5
%65 = getelementptr inbounds i8*, i8** %64, i64 1
%66 = load i8*, i8** %65
%67 = getelementptr inbounds i8, i8* %66, i64 0
%68 = load i8, i8* %67
store i8 %68, i8* %9
%69 = load i8**, i8*** %5
%70 = getelementptr inbounds i8*, i8** %69, i64 1
%71 = load i8*, i8** %70
%72 = getelementptr inbounds i8, i8* %71, i64 2
%73 = load i8, i8* %72
store i8 %73, i8* %10
%74 = load i8, i8* %9
%75 = sext i8 %74 to i32
%76 = icmp sgt i32 48, %75
br i1 %76, label %81, label %77
77: ; preds = %63
%78 = load i8, i8* %9
%79 = sext i8 %78 to i32
%80 = icmp sgt i32 %79, 50
br i1 %80, label %81, label %85
81: ; preds = %77, %63
%82 = call i32 (...) @help()
%83 = load i8*, i8** %8
%84 = call i32 @free(i8* %83)
store i32 -1, i32* %3
br label %142
85: ; preds = %77
%86 = load i8, i8* %10
%87 = sext i8 %86 to i32
%88 = icmp sgt i32 48, %87
br i1 %88, label %93, label %89
89: ; preds = %85
%90 = load i8, i8* %10
%91 = sext i8 %90 to i32
%92 = icmp sgt i32 %91, 49
br i1 %92, label %93, label %97
93: ; preds = %89, %85
%94 = call i32 (...) @help()
%95 = load i8*, i8** %8
%96 = call i32 @free(i8* %95)
store i32 -1, i32* %3
br label %142
97: ; preds = %89
%98 = load i8, i8* %9
%99 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
store i8 %98, i8* %99
%100 = load i8, i8* %10
%101 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 1
store i8 %100, i8* %101
%102 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 2
store i8 0, i8* %102
%103 = load i8, i8* %9
%104 = load i8, i8* %10
%105 = call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i8 signext %103, i8 signext %104)
%106 = load i32, i32* @O_RDWR
%107 = call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %106)
store i32 %107, i32* %12
%108 = load i32, i32* %12
%109 = icmp slt i32 %108, 0
br i1 %109, label %110, label %115
110: ; preds = %97
%111 = call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%112 = load i8*, i8** %8
%113 = call i32 @free(i8* %112)
%114 = load i32, i32* @errno
store i32 %114, i32* %3
br label %142
115: ; preds = %97
%116 = load i32, i32* %12
%117 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%118 = getelementptr inbounds [3 x i8], [3 x i8]* %11, i64 0, i64 0
%119 = call i32 @strlen(i8* %118)
%120 = call i32 @write(i32 %116, i8* %117, i32 %119)
store i32 %120, i32* %13
%121 = load i32, i32* %13
%122 = icmp slt i32 %121, 0
br i1 %122, label %123, label %130
123: ; preds = %115
%124 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%125 = load i8*, i8** %8
%126 = call i32 @free(i8* %125)
%127 = load i32, i32* %12
%128 = call i32 @close(i32 %127)
%129 = load i32, i32* @errno
store i32 %129, i32* %3
br label %142
130: ; preds = %115
%131 = load i32, i32* %12
%132 = call i32 @close(i32 %131)
%133 = load i8*, i8** %8
%134 = call i32 @free(i8* %133)
br label %139
135: ; preds = %55
%136 = call i32 (...) @help()
%137 = load i8*, i8** %8
%138 = call i32 @free(i8* %137)
store i32 -1, i32* %3
br label %142
139: ; preds = %130
br label %140
140: ; preds = %139
br label %141
141: ; preds = %140, %37
store i32 0, i32* %3
br label %142
142: ; preds = %141, %135, %123, %110, %93, %81, %51, %34, %29, %21
%143 = load i32, i32* %3
ret i32 %143
}

LLVM IR (-O2):
@.str = [12 x i8] c"/dev/tl-led\00"
@O_RDWR = global i32 0
@.str.1 = [22 x i8] c"Failed to open device\00"
@errno = global i32 0
@.str.2 = [4 x i8] c"all\00"
@.str.3 = [24 x i8] c"Error writing to device\00"
@.str.4 = [57 x i8] c"Now opening /dev/tl-led, sending STATE=%c to LED=%c ...\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [3 x i8]
%4 = icmp eq i32 %0, 1
br i1 %4, label %5, label %21
5: ; preds = %2
%6 = load i32, i32* @O_RDWR
%7 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = icmp slt i32 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %5
%10 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%11 = load i32, i32* @errno
br label %81
12: ; preds = %5
%13 = tail call i32 @write(i32 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 3)
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %12
%16 = tail call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%17 = tail call i32 @close(i32 %7)
%18 = load i32, i32* @errno
br label %81
19: ; preds = %12
%20 = tail call i32 @close(i32 %7)
br label %81
21: ; preds = %2
%22 = getelementptr inbounds i8*, i8** %1, i64 1
%23 = load i8*, i8** %22
%24 = tail call i32 @strlen(i8* %23)
%25 = tail call i8* @malloc(i32 %24)
%26 = icmp eq i8* %25, null
br i1 %26, label %81, label %27
27: ; preds = %21
%28 = load i8*, i8** %22
%29 = tail call i32 @strlen(i8* %28)
%30 = icmp eq i32 %29, 3
br i1 %30, label %34, label %31
31: ; preds = %27
%32 = tail call i32 (...) @help()
%33 = tail call i32 @free(i8* %25)
br label %81
34: ; preds = %27
%35 = load i8*, i8** %22
%36 = getelementptr inbounds i8, i8* %35, i64 1
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 58
br i1 %38, label %39, label %78
39: ; preds = %34
%40 = load i8, i8* %35
%41 = getelementptr inbounds i8, i8* %35, i64 2
%42 = load i8, i8* %41
%43 = add i8 %40, -51
%44 = icmp ult i8 %43, -3
br i1 %44, label %45, label %48
45: ; preds = %39
%46 = tail call i32 (...) @help()
%47 = tail call i32 @free(i8* %25)
br label %81
48: ; preds = %39
%49 = add i8 %42, -50
%50 = icmp ult i8 %49, -2
br i1 %50, label %51, label %54
51: ; preds = %48
%52 = tail call i32 (...) @help()
%53 = tail call i32 @free(i8* %25)
br label %81
54: ; preds = %48
%55 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 0
store i8 %40, i8* %55
%56 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 1
store i8 %42, i8* %56
%57 = getelementptr inbounds [3 x i8], [3 x i8]* %3, i64 0, i64 2
store i8 0, i8* %57
%58 = tail call i32 @printf(i8* getelementptr inbounds ([57 x i8], [57 x i8]* @.str.4, i64 0, i64 0), i8 signext %40, i8 signext %42)
%59 = load i32, i32* @O_RDWR
%60 = tail call i32 @open(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %59)
%61 = icmp slt i32 %60, 0
br i1 %61, label %62, label %65
62: ; preds = %54
%63 = tail call i32 @perror(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%64 = tail call i32 @free(i8* %25)
br label %73
65: ; preds = %54
%66 = call i32 @strlen(i8* %55)
%67 = call i32 @write(i32 %60, i8* %55, i32 %66)
%68 = icmp slt i32 %67, 0
br i1 %68, label %69, label %75
69: ; preds = %65
%70 = call i32 @perror(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0))
%71 = call i32 @free(i8* %25)
%72 = call i32 @close(i32 %60)
br label %73
73: ; preds = %62, %69
%74 = load i32, i32* @errno
br label %81
75: ; preds = %65
%76 = call i32 @close(i32 %60)
%77 = call i32 @free(i8* %25)
br label %81
78: ; preds = %34
%79 = tail call i32 (...) @help()
%80 = tail call i32 @free(i8* %25)
br label %81
81: ; preds = %51, %45, %21, %75, %73, %31, %78, %9, %15, %19
%82 = phi i32 [ %11, %9 ], [ %18, %15 ], [ 0, %19 ], [ -1, %31 ], [ -1, %78 ], [ %74, %73 ], [ 0, %75 ], [ 0, %21 ], [ -1, %45 ], [ -1, %51 ]
ret i32 %82
}