#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
scalar_t__ bzipped_filename_p(char const *);
scalar_t__ compressed_filename_p(char const *);
int dup(int);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ *fdopen(int, char const *);
int /*<<< orphan*/ *fopen(char const *, char const *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ gzipped_filename_p(char const *);
scalar_t__ sevenzipped_filename_p(char const *);
int /*<<< orphan*/ stderr;
scalar_t__ stdio_filename_p(char const *);
scalar_t__ xz_filename_p(char const *);
FILE *zopen(const char *name, const char *mode) {
  char command[1024 + 100];
  if (stdio_filename_p(name)) {
    if (*mode == 'r') {
      static int stdin_used = 0;
      static int stdin_warning = 0;
      int fd;
      if (stdin_used) {
        if (!stdin_warning) {
          fprintf(stderr, "warning: '-' used multiple times for input\n");
          stdin_warning = 1;
        }
      } else {
        stdin_used = 1;
      }
      fd = dup(0);
      return fd < 0 ? NULL : fdopen(fd, mode);
    } else if (*mode == 'w' || *mode == 'a') {
      static int stdout_used = 0;
      static int stdout_warning = 0;
      int fd;
      if (stdout_used) {
        if (!stdout_warning) {
          fprintf(stderr, "warning: '-' used multiple times for output\n");
          stdout_warning = 1;
        }
      } else {
        stdout_used = 1;
      }
      fd = dup(1);
      return fd < 0 ? NULL : fdopen(fd, mode);
    } else {
      return NULL;
    }
  } else {
    char *compress_cmd = NULL;
    char *uncompress_cmd = NULL;
    int zip_to_stdout = 1;
    if (compressed_filename_p(name)) {
      compress_cmd = "exec compress -c";
      uncompress_cmd = "exec uncompress -c";
    } else if (gzipped_filename_p(name)) {
      compress_cmd = "exec gzip -c";
      uncompress_cmd = "exec gzip -dcf";
    } else if (bzipped_filename_p(name)) {
      compress_cmd = "exec bzip2";
      uncompress_cmd = "exec bzip2 -dcf";
    } else if (sevenzipped_filename_p(name)) {
      compress_cmd = "exec 7z a -si";
      uncompress_cmd = "exec 7z e -so";
      zip_to_stdout = 0;
    } else if (xz_filename_p(name)) {
      compress_cmd = "exec xz";
      uncompress_cmd = "exec xz -dcf";
    }
    if (compress_cmd != NULL) {
      fprintf(stderr, "Sorry, compressed I/O not available on this machine\n");
      errno = EINVAL;
      return NULL;
    } else {
      return fopen(name, mode);
    }
  }
}


x86 assembly (clang, -O0):
<zopen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x4b0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1070 <stdio_filename_p@plt>
cmp    $0x0,%rax
je     1332 <zopen+0x192>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x72,%eax
jne    126c <zopen+0xcc>
cmpl   $0x0,0x2e97(%rip)
je     1214 <zopen+0x74>
cmpl   $0x0,0x2e8e(%rip)
jne    120f <zopen+0x6f>
mov    0x2de9(%rip),%rax
mov    (%rax),%edi
lea    0xe00(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,0x2e69(%rip)
jmp    121e <zopen+0x7e>
movl   $0x1,0x2e56(%rip)
xor    %edi,%edi
call   1040 <dup@plt>
mov    %eax,-0x484(%rbp)
cmpl   $0x0,-0x484(%rbp)
jge    1246 <zopen+0xa6>
xor    %eax,%eax
mov    %rax,-0x4a8(%rbp)
jmp    125c <zopen+0xbc>
mov    -0x484(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1090 <fdopen@plt>
mov    %rax,-0x4a8(%rbp)
mov    -0x4a8(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14c2 <zopen+0x322>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x77,%eax
je     128c <zopen+0xec>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jne    1325 <zopen+0x185>
cmpl   $0x0,0x2ded(%rip)
je     12ca <zopen+0x12a>
cmpl   $0x0,0x2de4(%rip)
jne    12c5 <zopen+0x125>
mov    0x2d33(%rip),%rax
mov    (%rax),%edi
lea    0xd76(%rip),%rsi
call   1050 <fprintf@plt>
movl   $0x1,0x2dbf(%rip)
jmp    12d4 <zopen+0x134>
movl   $0x1,0x2dac(%rip)
mov    $0x1,%edi
call   1040 <dup@plt>
mov    %eax,-0x488(%rbp)
cmpl   $0x0,-0x488(%rbp)
jge    12ff <zopen+0x15f>
xor    %eax,%eax
mov    %rax,-0x4b0(%rbp)
jmp    1315 <zopen+0x175>
mov    -0x488(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1090 <fdopen@plt>
mov    %rax,-0x4b0(%rbp)
mov    -0x4b0(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    14c2 <zopen+0x322>
movq   $0x0,-0x8(%rbp)
jmp    14c2 <zopen+0x322>
movq   $0x0,-0x490(%rbp)
movq   $0x0,-0x498(%rbp)
movl   $0x1,-0x49c(%rbp)
mov    -0x10(%rbp),%rdi
call   10c0 <compressed_filename_p@plt>
cmp    $0x0,%rax
je     1386 <zopen+0x1e6>
lea    0xced(%rip),%rax
mov    %rax,-0x490(%rbp)
lea    0xcf0(%rip),%rax
mov    %rax,-0x498(%rbp)
jmp    146f <zopen+0x2cf>
mov    -0x10(%rbp),%rdi
call   1030 <gzipped_filename_p@plt>
cmp    $0x0,%rax
je     13ba <zopen+0x21a>
lea    0xcdd(%rip),%rax
mov    %rax,-0x490(%rbp)
lea    0xcdc(%rip),%rax
mov    %rax,-0x498(%rbp)
jmp    146a <zopen+0x2ca>
mov    -0x10(%rbp),%rdi
call   10a0 <bzipped_filename_p@plt>
cmp    $0x0,%rax
je     13ee <zopen+0x24e>
lea    0xcc5(%rip),%rax
mov    %rax,-0x490(%rbp)
lea    0xcc2(%rip),%rax
mov    %rax,-0x498(%rbp)
jmp    1465 <zopen+0x2c5>
mov    -0x10(%rbp),%rdi
call   1080 <sevenzipped_filename_p@plt>
cmp    $0x0,%rax
je     142c <zopen+0x28c>
lea    0xcac(%rip),%rax
mov    %rax,-0x490(%rbp)
lea    0xcac(%rip),%rax
mov    %rax,-0x498(%rbp)
movl   $0x0,-0x49c(%rbp)
jmp    1460 <zopen+0x2c0>
mov    -0x10(%rbp),%rdi
call   1060 <xz_filename_p@plt>
cmp    $0x0,%rax
je     145b <zopen+0x2bb>
lea    0xc8a(%rip),%rax
mov    %rax,-0x490(%rbp)
lea    0xc84(%rip),%rax
mov    %rax,-0x498(%rbp)
jmp    1460 <zopen+0x2c0>
jmp    1465 <zopen+0x2c5>
jmp    146a <zopen+0x2ca>
jmp    146f <zopen+0x2cf>
cmpq   $0x0,-0x490(%rbp)
je     14b1 <zopen+0x311>
mov    0x2b5c(%rip),%rax
mov    (%rax),%edi
lea    0xc58(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2b37(%rip),%rax
mov    (%rax),%ecx
mov    0x2b36(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
jmp    14c2 <zopen+0x322>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   10b0 <fopen@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x4b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zopen>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1070 <stdio_filename_p@plt>
test   %rax,%rax
je     120a <zopen+0x6a>
mov    (%r14),%al
cmp    $0x61,%al
je     1278 <zopen+0xd8>
cmp    $0x77,%al
je     1278 <zopen+0xd8>
cmp    $0x72,%al
jne    12df <zopen+0x13f>
cmpb   $0x1,0x2e9e(%rip)
jne    12b9 <zopen+0x119>
cmpb   $0x0,0x2e95(%rip)
jne    12c3 <zopen+0x123>
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
lea    0xe07(%rip),%rsi
call   1050 <fprintf@plt>
lea    0x2e73(%rip),%rax
jmp    12c0 <zopen+0x120>
mov    %rbx,%rdi
call   10c0 <compressed_filename_p@plt>
test   %rax,%rax
jne    124f <zopen+0xaf>
mov    %rbx,%rdi
call   1030 <gzipped_filename_p@plt>
test   %rax,%rax
jne    124f <zopen+0xaf>
mov    %rbx,%rdi
call   10a0 <bzipped_filename_p@plt>
test   %rax,%rax
jne    124f <zopen+0xaf>
mov    %rbx,%rdi
call   1080 <sevenzipped_filename_p@plt>
test   %rax,%rax
jne    124f <zopen+0xaf>
mov    %rbx,%rdi
call   1060 <xz_filename_p@plt>
test   %rax,%rax
je     12e9 <zopen+0x149>
mov    0x2d8a(%rip),%rax
mov    (%rax),%edi
lea    0xdfa(%rip),%rsi
call   1050 <fprintf@plt>
mov    0x2d65(%rip),%rax
mov    (%rax),%eax
mov    0x2d64(%rip),%rcx
mov    %eax,(%rcx)
jmp    12df <zopen+0x13f>
cmpb   $0x1,0x2e01(%rip)
jne    12a8 <zopen+0x108>
cmpb   $0x0,0x2dfc(%rip)
jne    12b2 <zopen+0x112>
mov    0x2d4f(%rip),%rax
mov    (%rax),%edi
lea    0xd92(%rip),%rsi
call   1050 <fprintf@plt>
lea    0x2dde(%rip),%rax
jmp    12af <zopen+0x10f>
lea    0x2dd1(%rip),%rax
movb   $0x1,(%rax)
mov    $0x1,%edi
jmp    12c5 <zopen+0x125>
lea    0x2db4(%rip),%rax
movb   $0x1,(%rax)
xor    %edi,%edi
call   1040 <dup@plt>
test   %eax,%eax
js     12df <zopen+0x13f>
mov    %eax,%edi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1090 <fdopen@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    10b0 <fopen@plt>

LLVM IR (-O0):
@zopen.stdin_used = internal global i32 0
@zopen.stdin_warning = internal global i32 0
@stderr = global i32 0
@.str = [44 x i8] c"warning: '-' used multiple times for input\0A\00"
@zopen.stdout_used = internal global i32 0
@zopen.stdout_warning = internal global i32 0
@.str.1 = [45 x i8] c"warning: '-' used multiple times for output\0A\00"
@.str.2 = [17 x i8] c"exec compress -c\00"
@.str.3 = [19 x i8] c"exec uncompress -c\00"
@.str.4 = [13 x i8] c"exec gzip -c\00"
@.str.5 = [15 x i8] c"exec gzip -dcf\00"
@.str.6 = [11 x i8] c"exec bzip2\00"
@.str.7 = [16 x i8] c"exec bzip2 -dcf\00"
@.str.8 = [14 x i8] c"exec 7z a -si\00"
@.str.9 = [14 x i8] c"exec 7z e -so\00"
@.str.10 = [8 x i8] c"exec xz\00"
@.str.11 = [13 x i8] c"exec xz -dcf\00"
@.str.12 = [53 x i8] c"Sorry, compressed I/O not available on this machine\0A\00"
@EINVAL = global i32 0
@errno = global i32 0
define i32* @zopen(i8* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [1124 x i8]
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%12 = load i8*, i8** %4
%13 = call i64 @stdio_filename_p(i8* %12)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %75
15: ; preds = %2
%16 = load i8*, i8** %5
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 114
br i1 %19, label %20, label %42
20: ; preds = %15
%21 = load i32, i32* @zopen.stdin_used
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %30
23: ; preds = %20
%24 = load i32, i32* @zopen.stdin_warning
%25 = icmp ne i32 %24, 0
br i1 %25, label %29, label %26
26: ; preds = %23
%27 = load i32, i32* @stderr
%28 = call i32 @fprintf(i32 %27, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* @zopen.stdin_warning
br label %29
29: ; preds = %26, %23
br label %31
30: ; preds = %20
store i32 1, i32* @zopen.stdin_used
br label %31
31: ; preds = %30, %29
%32 = call i32 @dup(i32 0)
store i32 %32, i32* %7
%33 = load i32, i32* %7
%34 = icmp slt i32 %33, 0
br i1 %34, label %35, label %36
35: ; preds = %31
br label %40
36: ; preds = %31
%37 = load i32, i32* %7
%38 = load i8*, i8** %5
%39 = call i32* @fdopen(i32 %37, i8* %38)
br label %40
40: ; preds = %36, %35
%41 = phi i32* [ null, %35 ], [ %39, %36 ]
store i32* %41, i32** %3
br label %115
42: ; preds = %15
%43 = load i8*, i8** %5
%44 = load i8, i8* %43
%45 = sext i8 %44 to i32
%46 = icmp eq i32 %45, 119
br i1 %46, label %52, label %47
47: ; preds = %42
%48 = load i8*, i8** %5
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 97
br i1 %51, label %52, label %74
52: ; preds = %47, %42
%53 = load i32, i32* @zopen.stdout_used
%54 = icmp ne i32 %53, 0
br i1 %54, label %55, label %62
55: ; preds = %52
%56 = load i32, i32* @zopen.stdout_warning
%57 = icmp ne i32 %56, 0
br i1 %57, label %61, label %58
58: ; preds = %55
%59 = load i32, i32* @stderr
%60 = call i32 @fprintf(i32 %59, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
store i32 1, i32* @zopen.stdout_warning
br label %61
61: ; preds = %58, %55
br label %63
62: ; preds = %52
store i32 1, i32* @zopen.stdout_used
br label %63
63: ; preds = %62, %61
%64 = call i32 @dup(i32 1)
store i32 %64, i32* %8
%65 = load i32, i32* %8
%66 = icmp slt i32 %65, 0
br i1 %66, label %67, label %68
67: ; preds = %63
br label %72
68: ; preds = %63
%69 = load i32, i32* %8
%70 = load i8*, i8** %5
%71 = call i32* @fdopen(i32 %69, i8* %70)
br label %72
72: ; preds = %68, %67
%73 = phi i32* [ null, %67 ], [ %71, %68 ]
store i32* %73, i32** %3
br label %115
74: ; preds = %47
store i32* null, i32** %3
br label %115
75: ; preds = %2
store i8* null, i8** %9
store i8* null, i8** %10
store i32 1, i32* %11
%76 = load i8*, i8** %4
%77 = call i64 @compressed_filename_p(i8* %76)
%78 = icmp ne i64 %77, 0
br i1 %78, label %79, label %80
79: ; preds = %75
store i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.3, i64 0, i64 0), i8** %10
br label %104
80: ; preds = %75
%81 = load i8*, i8** %4
%82 = call i64 @gzipped_filename_p(i8* %81)
%83 = icmp ne i64 %82, 0
br i1 %83, label %84, label %85
84: ; preds = %80
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.4, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8** %10
br label %103
85: ; preds = %80
%86 = load i8*, i8** %4
%87 = call i64 @bzipped_filename_p(i8* %86)
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %85
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.6, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.7, i64 0, i64 0), i8** %10
br label %102
90: ; preds = %85
%91 = load i8*, i8** %4
%92 = call i64 @sevenzipped_filename_p(i8* %91)
%93 = icmp ne i64 %92, 0
br i1 %93, label %94, label %95
94: ; preds = %90
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), i8** %10
store i32 0, i32* %11
br label %101
95: ; preds = %90
%96 = load i8*, i8** %4
%97 = call i64 @xz_filename_p(i8* %96)
%98 = icmp ne i64 %97, 0
br i1 %98, label %99, label %100
99: ; preds = %95
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0), i8** %9
store i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.11, i64 0, i64 0), i8** %10
br label %100
100: ; preds = %99, %95
br label %101
101: ; preds = %100, %94
br label %102
102: ; preds = %101, %89
br label %103
103: ; preds = %102, %84
br label %104
104: ; preds = %103, %79
%105 = load i8*, i8** %9
%106 = icmp ne i8* %105, null
br i1 %106, label %107, label %111
107: ; preds = %104
%108 = load i32, i32* @stderr
%109 = call i32 @fprintf(i32 %108, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.12, i64 0, i64 0))
%110 = load i32, i32* @EINVAL
store i32 %110, i32* @errno
store i32* null, i32** %3
br label %115
111: ; preds = %104
%112 = load i8*, i8** %4
%113 = load i8*, i8** %5
%114 = call i32* @fopen(i8* %112, i8* %113)
store i32* %114, i32** %3
br label %115
115: ; preds = %111, %107, %74, %72, %40
%116 = load i32*, i32** %3
ret i32* %116
}

LLVM IR (-O2):
@zopen.stdin_used = internal unnamed_addr global i1 false
@zopen.stdin_warning = internal unnamed_addr global i1 false
@stderr = global i32 0
@.str = [44 x i8] c"warning: '-' used multiple times for input\0A\00"
@zopen.stdout_used = internal unnamed_addr global i1 false
@zopen.stdout_warning = internal unnamed_addr global i1 false
@.str.1 = [45 x i8] c"warning: '-' used multiple times for output\0A\00"
@.str.12 = [53 x i8] c"Sorry, compressed I/O not available on this machine\0A\00"
@EINVAL = global i32 0
@errno = global i32 0
define noalias i32* @zopen(i8* %0, i8* nocapture %1) {
%3 = tail call i64 @stdio_filename_p(i8* %0)
%4 = icmp eq i64 %3, 0
br i1 %4, label %35, label %5
5: ; preds = %2
%6 = load i8, i8* %1
switch i8 %6, label %56 [
i8 114, label %7
i8 119, label %21
i8 97, label %21
]
7: ; preds = %5
%8 = load i1, i1* @zopen.stdin_used
br i1 %8, label %9, label %14
9: ; preds = %7
%10 = load i1, i1* @zopen.stdin_warning
br i1 %10, label %16, label %11
11: ; preds = %9
%12 = load i32, i32* @stderr
%13 = tail call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
br label %14
14: ; preds = %7, %11
%15 = phi i1* [ @zopen.stdin_warning, %11 ], [ @zopen.stdin_used, %7 ]
store i1 true, i1* %15
br label %16
16: ; preds = %14, %9
%17 = tail call i32 @dup(i32 0)
%18 = icmp slt i32 %17, 0
br i1 %18, label %56, label %19
19: ; preds = %16
%20 = tail call i32* @fdopen(i32 %17, i8* %1)
br label %56
21: ; preds = %5, %5
%22 = load i1, i1* @zopen.stdout_used
br i1 %22, label %23, label %28
23: ; preds = %21
%24 = load i1, i1* @zopen.stdout_warning
br i1 %24, label %30, label %25
25: ; preds = %23
%26 = load i32, i32* @stderr
%27 = tail call i32 @fprintf(i32 %26, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str.1, i64 0, i64 0))
br label %28
28: ; preds = %21, %25
%29 = phi i1* [ @zopen.stdout_warning, %25 ], [ @zopen.stdout_used, %21 ]
store i1 true, i1* %29
br label %30
30: ; preds = %28, %23
%31 = tail call i32 @dup(i32 1)
%32 = icmp slt i32 %31, 0
br i1 %32, label %56, label %33
33: ; preds = %30
%34 = tail call i32* @fdopen(i32 %31, i8* %1)
br label %56
35: ; preds = %2
%36 = tail call i64 @compressed_filename_p(i8* %0)
%37 = icmp eq i64 %36, 0
br i1 %37, label %38, label %50
38: ; preds = %35
%39 = tail call i64 @gzipped_filename_p(i8* %0)
%40 = icmp eq i64 %39, 0
br i1 %40, label %41, label %50
41: ; preds = %38
%42 = tail call i64 @bzipped_filename_p(i8* %0)
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %50
44: ; preds = %41
%45 = tail call i64 @sevenzipped_filename_p(i8* %0)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %50
47: ; preds = %44
%48 = tail call i64 @xz_filename_p(i8* %0)
%49 = icmp eq i64 %48, 0
br i1 %49, label %54, label %50
50: ; preds = %44, %41, %38, %35, %47
%51 = load i32, i32* @stderr
%52 = tail call i32 @fprintf(i32 %51, i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.12, i64 0, i64 0))
%53 = load i32, i32* @EINVAL
store i32 %53, i32* @errno
br label %56
54: ; preds = %47
%55 = tail call i32* @fopen(i8* %0, i8* %1)
br label %56
56: ; preds = %50, %54, %5, %33, %30, %19, %16
%57 = phi i32* [ %20, %19 ], [ null, %16 ], [ %34, %33 ], [ null, %30 ], [ null, %5 ], [ null, %50 ], [ %55, %54 ]
ret i32* %57
}