#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*/ EXIT_FAILURE;
int O_EXCL;
int O_NONBLOCK;
int O_RDONLY;
int /*<<< orphan*/ close(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int open(char *, int);
int read(int, char *, int);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ strcmp(char *, char *);
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  char buffer[256 + 1];
  int ret;
  int arg;
  int f_mlog;
  int format_only = 0;
  int clear_only = 0;
  for (arg = 1; arg < argc; arg++) {
    if (!strcmp(argv[arg], "-f")) {
      format_only = 1;
      continue;
    }
    if (!strcmp(argv[arg], "-c")) {
      clear_only = 1;
      continue;
    }
    if (!strcmp(argv[arg], "-h")) {
      usage(argv[0]);
      exit(0);
    }
    fprintf(stderr, "Invalid argument \"%s\".\n", argv[arg]);
    usage(argv[0]);
    exit(EXIT_FAILURE);
  }
  if (!clear_only) {
    f_mlog = open("/proc/mlog_fmt", O_RDONLY);
    while (ret = read(f_mlog, buffer, 256)) {
      if (ret <= 0)
        break;
      buffer[ret] = 0;
      fprintf(stdout, "%s", buffer);
    }
    close(f_mlog);
  }
  if (format_only)
    return 0;
  f_mlog = open("/proc/mlog", O_RDONLY | O_NONBLOCK | O_EXCL);
  while (ret = read(f_mlog, buffer, 256)) {
    if (ret <= 0)
      break;
    if (!clear_only) {
      buffer[ret] = 0;
      fprintf(stdout, "%s", buffer);
    }
  }
  if (!clear_only)
    fprintf(stdout, "\n");
  close(f_mlog);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x130(%rbp)
movl   $0x0,-0x134(%rbp)
movl   $0x1,-0x128(%rbp)
mov    -0x128(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    12a7 <main+0x137>
mov    -0x10(%rbp),%rax
movslq -0x128(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe34(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    11e9 <main+0x79>
movl   $0x1,-0x130(%rbp)
jmp    1293 <main+0x123>
mov    -0x10(%rbp),%rax
movslq -0x128(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe04(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    121c <main+0xac>
movl   $0x1,-0x134(%rbp)
jmp    1293 <main+0x123>
mov    -0x10(%rbp),%rax
movslq -0x128(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdd4(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1253 <main+0xe3>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1070 <usage@plt>
xor    %edi,%edi
call   1090 <exit@plt>
mov    0x2d76(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x128(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd97(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1070 <usage@plt>
mov    0x2d34(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>
mov    -0x128(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x128(%rbp)
jmp    11a7 <main+0x37>
cmpl   $0x0,-0x134(%rbp)
jne    1344 <main+0x1d4>
mov    0x2d25(%rip),%rax
mov    (%rax),%esi
lea    0xd5d(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x12c(%rbp)
mov    -0x12c(%rbp),%edi
lea    -0x120(%rbp),%rsi
mov    $0x100,%edx
call   1040 <read@plt>
mov    %eax,-0x124(%rbp)
cmp    $0x0,%eax
je     1339 <main+0x1c9>
cmpl   $0x0,-0x124(%rbp)
jg     1307 <main+0x197>
jmp    1339 <main+0x1c9>
movslq -0x124(%rbp),%rax
movb   $0x0,-0x120(%rbp,%rax,1)
mov    0x2c9b(%rip),%rax
mov    (%rax),%edi
lea    -0x120(%rbp),%rdx
lea    0xd03(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    12cf <main+0x15f>
mov    -0x12c(%rbp),%edi
call   1030 <close@plt>
cmpl   $0x0,-0x130(%rbp)
je     135d <main+0x1ed>
movl   $0x0,-0x4(%rbp)
jmp    1437 <main+0x2c7>
mov    0x2c7c(%rip),%rax
mov    (%rax),%esi
mov    0x2c7b(%rip),%rax
or     (%rax),%esi
mov    0x2c52(%rip),%rax
or     (%rax),%esi
lea    0xcb4(%rip),%rdi
call   1080 <open@plt>
mov    %eax,-0x12c(%rbp)
mov    -0x12c(%rbp),%edi
lea    -0x120(%rbp),%rsi
mov    $0x100,%edx
call   1040 <read@plt>
mov    %eax,-0x124(%rbp)
cmp    $0x0,%eax
je     1401 <main+0x291>
cmpl   $0x0,-0x124(%rbp)
jg     13c2 <main+0x252>
jmp    1401 <main+0x291>
cmpl   $0x0,-0x134(%rbp)
jne    13fc <main+0x28c>
movslq -0x124(%rbp),%rax
movb   $0x0,-0x120(%rbp,%rax,1)
mov    0x2bd3(%rip),%rax
mov    (%rax),%edi
lea    -0x120(%rbp),%rdx
lea    0xc3b(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
jmp    138a <main+0x21a>
cmpl   $0x0,-0x134(%rbp)
jne    1425 <main+0x2b5>
mov    0x2ba3(%rip),%rax
mov    (%rax),%edi
lea    0xc01(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
mov    -0x12c(%rbp),%edi
call   1030 <close@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x118,%rsp
xor    %r13d,%r13d
cmp    $0x2,%edi
jl     1234 <main+0xc4>
mov    %rsi,%r12
mov    %edi,%ebp
xor    %r15d,%r15d
mov    $0x1,%r13d
lea    0xe5e(%rip),%r14
movl   $0x0,0xc(%rsp)
jmp    11c1 <main+0x51>
nopl   0x0(%rax)
movl   $0x1,0xc(%rsp)
add    $0x1,%r13
cmp    %r13,%rbp
je     1214 <main+0xa4>
mov    (%r12,%r13,8),%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
test   %eax,%eax
je     11b0 <main+0x40>
mov    %rbx,%rdi
lea    0xe25(%rip),%rsi
call   1050 <strcmp@plt>
mov    $0x1,%r15d
test   %eax,%eax
je     11b8 <main+0x48>
lea    0xe12(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
test   %eax,%eax
jne    1379 <main+0x209>
mov    (%r12),%rdi
call   1070 <usage@plt>
xor    %edi,%edi
call   1090 <exit@plt>
test   %r15d,%r15d
je     122f <main+0xbf>
xor    %r15d,%r15d
mov    0xc(%rsp),%r13d
test   %r13d,%r13d
jne    1365 <main+0x1f5>
jmp    12bd <main+0x14d>
mov    0xc(%rsp),%r13d
mov    0x2da5(%rip),%rax
mov    (%rax),%esi
lea    0xddd(%rip),%rdi
call   1080 <open@plt>
mov    %eax,%ebx
lea    0x10(%rsp),%rsi
mov    %eax,%edi
mov    $0x100,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    12aa <main+0x13a>
mov    0x2d51(%rip),%r15
lea    0xdc2(%rip),%r14
lea    0x10(%rsp),%rbp
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%eax
movb   $0x0,0x10(%rsp,%rax,1)
mov    (%r15),%edi
mov    %r14,%rsi
mov    %rbp,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebx,%edi
mov    %rbp,%rsi
mov    $0x100,%edx
call   1040 <read@plt>
test   %eax,%eax
jg     1280 <main+0x110>
mov    %ebx,%edi
call   1030 <close@plt>
mov    $0x1,%r15b
test   %r13d,%r13d
jne    1365 <main+0x1f5>
mov    0x2d1c(%rip),%rax
mov    0x2d1d(%rip),%rcx
mov    (%rcx),%esi
or     (%rax),%esi
mov    0x2cf2(%rip),%rax
or     (%rax),%esi
lea    0xd54(%rip),%rdi
call   1080 <open@plt>
mov    %eax,%ebp
lea    0x10(%rsp),%rsi
mov    %eax,%edi
mov    $0x100,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1342 <main+0x1d2>
mov    0x2cb6(%rip),%r12
lea    0xd27(%rip),%r14
lea    0x10(%rsp),%rbx
jmp    1323 <main+0x1b3>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    $0x100,%edx
call   1040 <read@plt>
test   %eax,%eax
jle    1342 <main+0x1d2>
test   %r15b,%r15b
je     1310 <main+0x1a0>
mov    %eax,%eax
movb   $0x0,0x10(%rsp,%rax,1)
mov    (%r12),%edi
mov    %r14,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    1310 <main+0x1a0>
test   %r15b,%r15b
je     135e <main+0x1ee>
mov    0x2c6a(%rip),%rax
mov    (%rax),%edi
lea    0xcc8(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    %ebp,%edi
call   1030 <close@plt>
xor    %eax,%eax
add    $0x118,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c50(%rip),%rax
mov    (%rax),%edi
lea    0xc80(%rip),%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    (%r12),%rdi
call   1070 <usage@plt>
mov    0x2c1d(%rip),%rax
mov    (%rax),%edi
call   1090 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-f\00"
@.str.1 = [3 x i8] c"-c\00"
@.str.2 = [3 x i8] c"-h\00"
@stderr = global i32 0
@.str.3 = [24 x i8] c"Invalid argument \22%s\22.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [15 x i8] c"/proc/mlog_fmt\00"
@O_RDONLY = global i32 0
@stdout = global i32 0
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [11 x i8] c"/proc/mlog\00"
@O_NONBLOCK = global i32 0
@O_EXCL = global i32 0
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [257 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %10
store i32 0, i32* %11
store i32 1, i32* %8
br label %12
12: ; preds = %62, %2
%13 = load i32, i32* %8
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %65
16: ; preds = %12
%17 = load i8**, i8*** %5
%18 = load i32, i32* %8
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = call i32 @strcmp(i8* %21, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%23 = icmp ne i32 %22, 0
br i1 %23, label %25, label %24
24: ; preds = %16
store i32 1, i32* %10
br label %62
25: ; preds = %16
%26 = load i8**, i8*** %5
%27 = load i32, i32* %8
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
br i1 %32, label %34, label %33
33: ; preds = %25
store i32 1, i32* %11
br label %62
34: ; preds = %25
%35 = load i8**, i8*** %5
%36 = load i32, i32* %8
%37 = sext i32 %36 to i64
%38 = getelementptr inbounds i8*, i8** %35, i64 %37
%39 = load i8*, i8** %38
%40 = call i32 @strcmp(i8* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%41 = icmp ne i32 %40, 0
br i1 %41, label %48, label %42
42: ; preds = %34
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 0
%45 = load i8*, i8** %44
%46 = call i32 @usage(i8* %45)
%47 = call i32 @exit(i32 0)
unreachable
48: ; preds = %34
%49 = load i32, i32* @stderr
%50 = load i8**, i8*** %5
%51 = load i32, i32* %8
%52 = sext i32 %51 to i64
%53 = getelementptr inbounds i8*, i8** %50, i64 %52
%54 = load i8*, i8** %53
%55 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %54)
%56 = load i8**, i8*** %5
%57 = getelementptr inbounds i8*, i8** %56, i64 0
%58 = load i8*, i8** %57
%59 = call i32 @usage(i8* %58)
%60 = load i32, i32* @EXIT_FAILURE
%61 = call i32 @exit(i32 %60)
unreachable
62: ; preds = %33, %24
%63 = load i32, i32* %8
%64 = add nsw i32 %63, 1
store i32 %64, i32* %8
br label %12
65: ; preds = %12
%66 = load i32, i32* %11
%67 = icmp ne i32 %66, 0
br i1 %67, label %90, label %68
68: ; preds = %65
%69 = load i32, i32* @O_RDONLY
%70 = call i32 @open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %69)
store i32 %70, i32* %9
br label %71
71: ; preds = %80, %68
%72 = load i32, i32* %9
%73 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%74 = call i32 @read(i32 %72, i8* %73, i32 256)
store i32 %74, i32* %7
%75 = icmp ne i32 %74, 0
br i1 %75, label %76, label %87
76: ; preds = %71
%77 = load i32, i32* %7
%78 = icmp sle i32 %77, 0
br i1 %78, label %79, label %80
79: ; preds = %76
br label %87
80: ; preds = %76
%81 = load i32, i32* %7
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 %82
store i8 0, i8* %83
%84 = load i32, i32* @stdout
%85 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%86 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %85)
br label %71
87: ; preds = %79, %71
%88 = load i32, i32* %9
%89 = call i32 @close(i32 %88)
br label %90
90: ; preds = %87, %65
%91 = load i32, i32* %10
%92 = icmp ne i32 %91, 0
br i1 %92, label %93, label %94
93: ; preds = %90
store i32 0, i32* %3
br label %130
94: ; preds = %90
%95 = load i32, i32* @O_RDONLY
%96 = load i32, i32* @O_NONBLOCK
%97 = or i32 %95, %96
%98 = load i32, i32* @O_EXCL
%99 = or i32 %97, %98
%100 = call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %99)
store i32 %100, i32* %9
br label %101
101: ; preds = %120, %94
%102 = load i32, i32* %9
%103 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%104 = call i32 @read(i32 %102, i8* %103, i32 256)
store i32 %104, i32* %7
%105 = icmp ne i32 %104, 0
br i1 %105, label %106, label %121
106: ; preds = %101
%107 = load i32, i32* %7
%108 = icmp sle i32 %107, 0
br i1 %108, label %109, label %110
109: ; preds = %106
br label %121
110: ; preds = %106
%111 = load i32, i32* %11
%112 = icmp ne i32 %111, 0
br i1 %112, label %120, label %113
113: ; preds = %110
%114 = load i32, i32* %7
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 %115
store i8 0, i8* %116
%117 = load i32, i32* @stdout
%118 = getelementptr inbounds [257 x i8], [257 x i8]* %6, i64 0, i64 0
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %117, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %118)
br label %120
120: ; preds = %113, %110
br label %101
121: ; preds = %109, %101
%122 = load i32, i32* %11
%123 = icmp ne i32 %122, 0
br i1 %123, label %127, label %124
124: ; preds = %121
%125 = load i32, i32* @stdout
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %125, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %127
127: ; preds = %124, %121
%128 = load i32, i32* %9
%129 = call i32 @close(i32 %128)
store i32 0, i32* %3
br label %130
130: ; preds = %127, %93
%131 = load i32, i32* %3
ret i32 %131
}

LLVM IR (-O2):
@.str = [3 x i8] c"-f\00"
@.str.1 = [3 x i8] c"-c\00"
@.str.2 = [3 x i8] c"-h\00"
@stderr = global i32 0
@.str.3 = [24 x i8] c"Invalid argument \22%s\22.\0A\00"
@EXIT_FAILURE = global i32 0
@.str.4 = [15 x i8] c"/proc/mlog_fmt\00"
@O_RDONLY = global i32 0
@stdout = global i32 0
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [11 x i8] c"/proc/mlog\00"
@O_NONBLOCK = global i32 0
@O_EXCL = global i32 0
@.str.7 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [257 x i8]
%4 = getelementptr inbounds [257 x i8], [257 x i8]* %3, i64 0, i64 0
%5 = icmp sgt i32 %0, 1
br i1 %5, label %6, label %40
6: ; preds = %2
%7 = zext i32 %0 to i64
br label %8
8: ; preds = %6, %33
%9 = phi i64 [ 1, %6 ], [ %36, %33 ]
%10 = phi i32 [ 0, %6 ], [ %35, %33 ]
%11 = phi i32 [ 0, %6 ], [ %34, %33 ]
%12 = getelementptr inbounds i8*, i8** %1, i64 %9
%13 = load i8*, i8** %12
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %33, label %16
16: ; preds = %8
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %33, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %13, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %22, label %26
22: ; preds = %19
%23 = load i8*, i8** %1
%24 = tail call i32 @usage(i8* %23)
%25 = tail call i32 @exit(i32 0)
unreachable
26: ; preds = %19
%27 = load i32, i32* @stderr
%28 = tail call i32 (i32, i8*, ...) @fprintf(i32 %27, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.3, i64 0, i64 0), i8* %13)
%29 = load i8*, i8** %1
%30 = tail call i32 @usage(i8* %29)
%31 = load i32, i32* @EXIT_FAILURE
%32 = tail call i32 @exit(i32 %31)
unreachable
33: ; preds = %16, %8
%34 = phi i32 [ 1, %8 ], [ %11, %16 ]
%35 = phi i32 [ %10, %8 ], [ 1, %16 ]
%36 = add nuw nsw i64 %9, 1
%37 = icmp eq i64 %36, %7
br i1 %37, label %38, label %8
38: ; preds = %33
%39 = icmp eq i32 %35, 0
br i1 %39, label %40, label %56
40: ; preds = %2, %38
%41 = phi i32 [ %34, %38 ], [ 0, %2 ]
%42 = load i32, i32* @O_RDONLY
%43 = tail call i32 @open(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.4, i64 0, i64 0), i32 %42)
%44 = call i32 @read(i32 %43, i8* %4, i32 256)
%45 = icmp slt i32 %44, 1
br i1 %45, label %54, label %46
46: ; preds = %40, %46
%47 = phi i32 [ %52, %46 ], [ %44, %40 ]
%48 = zext i32 %47 to i64
%49 = getelementptr inbounds [257 x i8], [257 x i8]* %3, i64 0, i64 %48
store i8 0, i8* %49
%50 = load i32, i32* @stdout
%51 = call i32 (i32, i8*, ...) @fprintf(i32 %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %4)
%52 = call i32 @read(i32 %43, i8* %4, i32 256)
%53 = icmp slt i32 %52, 1
br i1 %53, label %54, label %46
54: ; preds = %46, %40
%55 = call i32 @close(i32 %43)
br label %56
56: ; preds = %54, %38
%57 = phi i1 [ true, %54 ], [ false, %38 ]
%58 = phi i32 [ %41, %54 ], [ %34, %38 ]
%59 = icmp eq i32 %58, 0
br i1 %59, label %60, label %85
60: ; preds = %56
%61 = load i32, i32* @O_RDONLY
%62 = load i32, i32* @O_NONBLOCK
%63 = or i32 %62, %61
%64 = load i32, i32* @O_EXCL
%65 = or i32 %63, %64
%66 = call i32 @open(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i32 %65)
%67 = call i32 @read(i32 %66, i8* %4, i32 256)
%68 = icmp slt i32 %67, 1
br i1 %68, label %79, label %69
69: ; preds = %60, %76
%70 = phi i32 [ %77, %76 ], [ %67, %60 ]
br i1 %57, label %71, label %76
71: ; preds = %69
%72 = zext i32 %70 to i64
%73 = getelementptr inbounds [257 x i8], [257 x i8]* %3, i64 0, i64 %72
store i8 0, i8* %73
%74 = load i32, i32* @stdout
%75 = call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %4)
br label %76
76: ; preds = %71, %69
%77 = call i32 @read(i32 %66, i8* %4, i32 256)
%78 = icmp slt i32 %77, 1
br i1 %78, label %79, label %69
79: ; preds = %76, %60
br i1 %57, label %80, label %83
80: ; preds = %79
%81 = load i32, i32* @stdout
%82 = call i32 (i32, i8*, ...) @fprintf(i32 %81, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %83
83: ; preds = %80, %79
%84 = call i32 @close(i32 %66)
br label %85
85: ; preds = %56, %83
ret i32 0
}