#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*/ fclose(int /*<<< orphan*/ *);
scalar_t__ file_openfile(char *, int /*<<< orphan*/, int /*<<< orphan*/ **);
int fread(unsigned char *, int, int, int /*<<< orphan*/ *);
scalar_t__ memcmp(unsigned char *, char *, int);
int /*<<< orphan*/ strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int strlen(char *);
int file_is_compressed(char *filename) {
  FILE *diskfile;
  unsigned char buffer[2];
  char tmpfilename[1025];
  if (file_openfile(filename, 0, &diskfile)) {
    if (strlen(filename) > 1025 - 5)
      return (0);
    strcpy(tmpfilename, filename);
    strcat(filename, ".gz");
    if (file_openfile(filename, 0, &diskfile)) {
      strcpy(filename, tmpfilename);
      strcat(filename, ".Z");
      if (file_openfile(filename, 0, &diskfile)) {
        strcpy(filename, tmpfilename);
        strcat(filename, ".z");
        if (file_openfile(filename, 0, &diskfile)) {
          strcpy(filename, tmpfilename);
          strcat(filename, ".zip");
          if (file_openfile(filename, 0, &diskfile)) {
            strcpy(filename, tmpfilename);
            strcat(filename, "-z");
            if (file_openfile(filename, 0, &diskfile)) {
              strcpy(filename, tmpfilename);
              strcat(filename, "-gz");
              if (file_openfile(filename, 0, &diskfile)) {
                strcpy(filename, tmpfilename);
                return (0);
              }
            }
          }
        }
      }
    }
  }
  if (fread(buffer, 1, 2, diskfile) != 2) {
    fclose(diskfile);
    return (0);
  }
  fclose(diskfile);
  if ((memcmp(buffer, "\037\213", 2) == 0) ||
      (memcmp(buffer, "\120\113", 2) == 0) ||
      (memcmp(buffer, "\037\036", 2) == 0) ||
      (memcmp(buffer, "\037\235", 2) == 0) ||
      (memcmp(buffer, "\037\240", 2) == 0)) {
    return (1);
  } else {
    return (0);
  }
}


x86 assembly (clang, -O0):
<file_is_compressed>:
push   %rbp
mov    %rsp,%rbp
sub    $0x420,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     1348 <file_is_compressed+0x1d8>
mov    -0x10(%rbp),%rdi
call   1060 <strlen@plt>
cmp    $0x3fc,%eax
jle    11b8 <file_is_compressed+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1434 <file_is_compressed+0x2c4>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     1343 <file_is_compressed+0x1d3>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xdf8(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     133e <file_is_compressed+0x1ce>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xdc2(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     1339 <file_is_compressed+0x1c9>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xd8c(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     1334 <file_is_compressed+0x1c4>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xd58(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     132f <file_is_compressed+0x1bf>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rdi
lea    0xd22(%rip),%rsi
call   1090 <strcat@plt>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
lea    -0x18(%rbp),%rdx
call   1080 <file_openfile@plt>
cmp    $0x0,%rax
je     132a <file_is_compressed+0x1ba>
mov    -0x10(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   1030 <strcpy@plt>
movl   $0x0,-0x4(%rbp)
jmp    1434 <file_is_compressed+0x2c4>
jmp    132f <file_is_compressed+0x1bf>
jmp    1334 <file_is_compressed+0x1c4>
jmp    1339 <file_is_compressed+0x1c9>
jmp    133e <file_is_compressed+0x1ce>
jmp    1343 <file_is_compressed+0x1d3>
jmp    1348 <file_is_compressed+0x1d8>
lea    -0x1a(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1040 <fread@plt>
cmp    $0x2,%eax
je     137d <file_is_compressed+0x20d>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
movl   $0x0,-0x4(%rbp)
jmp    1434 <file_is_compressed+0x2c4>
mov    -0x18(%rbp),%rdi
call   1050 <fclose@plt>
lea    -0x1a(%rbp),%rdi
lea    0xc85(%rip),%rsi
mov    $0x2,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     1421 <file_is_compressed+0x2b1>
lea    -0x1a(%rbp),%rdi
lea    0xc69(%rip),%rsi
mov    $0x2,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     1421 <file_is_compressed+0x2b1>
lea    -0x1a(%rbp),%rdi
lea    0xc4d(%rip),%rsi
mov    $0x2,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     1421 <file_is_compressed+0x2b1>
lea    -0x1a(%rbp),%rdi
lea    0xc31(%rip),%rsi
mov    $0x2,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
je     1421 <file_is_compressed+0x2b1>
lea    -0x1a(%rbp),%rdi
lea    0xc15(%rip),%rsi
mov    $0x2,%edx
call   1070 <memcmp@plt>
cmp    $0x0,%rax
jne    142d <file_is_compressed+0x2bd>
movl   $0x1,-0x4(%rbp)
jmp    1434 <file_is_compressed+0x2c4>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x420,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_is_compressed>:
push   %rbp
push   %rbx
sub    $0x418,%rsp
mov    %rdi,%rbx
xor    %ebp,%ebp
lea    0x8(%rsp),%rdx
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
mov    %rbx,%rdi
call   1060 <strlen@plt>
cmp    $0x3fc,%eax
jg     13ab <file_is_compressed+0x23b>
lea    0x10(%rsp),%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
lea    0xe46(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xe16(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xde5(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xdb4(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xd89(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
lea    0xd5c(%rip),%rsi
mov    %rbx,%rdi
call   1090 <strcat@plt>
lea    0x8(%rsp),%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1080 <file_openfile@plt>
test   %rax,%rax
je     12e6 <file_is_compressed+0x176>
lea    0x10(%rsp),%rsi
mov    %rbx,%rdi
call   1030 <strcpy@plt>
xor    %ebp,%ebp
jmp    13ab <file_is_compressed+0x23b>
mov    0x8(%rsp),%rcx
lea    0x6(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1040 <fread@plt>
mov    %eax,%ebx
mov    0x8(%rsp),%rdi
call   1050 <fclose@plt>
cmp    $0x2,%ebx
jne    13ab <file_is_compressed+0x23b>
lea    0xcfb(%rip),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1070 <memcmp@plt>
test   %rax,%rax
je     13a6 <file_is_compressed+0x236>
lea    0xce3(%rip),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1070 <memcmp@plt>
test   %rax,%rax
je     13a6 <file_is_compressed+0x236>
lea    0xccb(%rip),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1070 <memcmp@plt>
test   %rax,%rax
je     13a6 <file_is_compressed+0x236>
lea    0xcb3(%rip),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1070 <memcmp@plt>
mov    $0x1,%ebp
test   %rax,%rax
je     13ab <file_is_compressed+0x23b>
lea    0xc96(%rip),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1070 <memcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
sete   %bpl
jmp    13ab <file_is_compressed+0x23b>
mov    $0x1,%ebp
mov    %ebp,%eax
add    $0x418,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c".gz\00"
@.str.1 = [3 x i8] c".Z\00"
@.str.2 = [3 x i8] c".z\00"
@.str.3 = [5 x i8] c".zip\00"
@.str.4 = [3 x i8] c"-z\00"
@.str.5 = [4 x i8] c"-gz\00"
@.str.6 = [3 x i8] c"\1F\8B\00"
@.str.7 = [3 x i8] c"PK\00"
@.str.8 = [3 x i8] c"\1F\1E\00"
@.str.9 = [3 x i8] c"\1F\9D\00"
@.str.10 = [3 x i8] c"\1F\A0\00"
define i32 @file_is_compressed(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca [2 x i8]
%6 = alloca [1025 x i8]
store i8* %0, i8** %3
%7 = load i8*, i8** %3
%8 = call i64 @file_openfile(i8* %7, i32 0, i32** %4)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %79
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = call i32 @strlen(i8* %11)
%13 = icmp sgt i32 %12, 1020
br i1 %13, label %14, label %15
14: ; preds = %10
store i32 0, i32* %2
br label %111
15: ; preds = %10
%16 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%17 = load i8*, i8** %3
%18 = call i32 @strcpy(i8* %16, i8* %17)
%19 = load i8*, i8** %3
%20 = call i32 @strcat(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%21 = load i8*, i8** %3
%22 = call i64 @file_openfile(i8* %21, i32 0, i32** %4)
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %78
24: ; preds = %15
%25 = load i8*, i8** %3
%26 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%27 = call i32 @strcpy(i8* %25, i8* %26)
%28 = load i8*, i8** %3
%29 = call i32 @strcat(i8* %28, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%30 = load i8*, i8** %3
%31 = call i64 @file_openfile(i8* %30, i32 0, i32** %4)
%32 = icmp ne i64 %31, 0
br i1 %32, label %33, label %77
33: ; preds = %24
%34 = load i8*, i8** %3
%35 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%36 = call i32 @strcpy(i8* %34, i8* %35)
%37 = load i8*, i8** %3
%38 = call i32 @strcat(i8* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%39 = load i8*, i8** %3
%40 = call i64 @file_openfile(i8* %39, i32 0, i32** %4)
%41 = icmp ne i64 %40, 0
br i1 %41, label %42, label %76
42: ; preds = %33
%43 = load i8*, i8** %3
%44 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%45 = call i32 @strcpy(i8* %43, i8* %44)
%46 = load i8*, i8** %3
%47 = call i32 @strcat(i8* %46, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%48 = load i8*, i8** %3
%49 = call i64 @file_openfile(i8* %48, i32 0, i32** %4)
%50 = icmp ne i64 %49, 0
br i1 %50, label %51, label %75
51: ; preds = %42
%52 = load i8*, i8** %3
%53 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%54 = call i32 @strcpy(i8* %52, i8* %53)
%55 = load i8*, i8** %3
%56 = call i32 @strcat(i8* %55, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%57 = load i8*, i8** %3
%58 = call i64 @file_openfile(i8* %57, i32 0, i32** %4)
%59 = icmp ne i64 %58, 0
br i1 %59, label %60, label %74
60: ; preds = %51
%61 = load i8*, i8** %3
%62 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%63 = call i32 @strcpy(i8* %61, i8* %62)
%64 = load i8*, i8** %3
%65 = call i32 @strcat(i8* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%66 = load i8*, i8** %3
%67 = call i64 @file_openfile(i8* %66, i32 0, i32** %4)
%68 = icmp ne i64 %67, 0
br i1 %68, label %69, label %73
69: ; preds = %60
%70 = load i8*, i8** %3
%71 = getelementptr inbounds [1025 x i8], [1025 x i8]* %6, i64 0, i64 0
%72 = call i32 @strcpy(i8* %70, i8* %71)
store i32 0, i32* %2
br label %111
73: ; preds = %60
br label %74
74: ; preds = %73, %51
br label %75
75: ; preds = %74, %42
br label %76
76: ; preds = %75, %33
br label %77
77: ; preds = %76, %24
br label %78
78: ; preds = %77, %15
br label %79
79: ; preds = %78, %1
%80 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%81 = load i32*, i32** %4
%82 = call i32 @fread(i8* %80, i32 1, i32 2, i32* %81)
%83 = icmp ne i32 %82, 2
br i1 %83, label %84, label %87
84: ; preds = %79
%85 = load i32*, i32** %4
%86 = call i32 @fclose(i32* %85)
store i32 0, i32* %2
br label %111
87: ; preds = %79
%88 = load i32*, i32** %4
%89 = call i32 @fclose(i32* %88)
%90 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%91 = call i64 @memcmp(i8* %90, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 2)
%92 = icmp eq i64 %91, 0
br i1 %92, label %109, label %93
93: ; preds = %87
%94 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%95 = call i64 @memcmp(i8* %94, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 2)
%96 = icmp eq i64 %95, 0
br i1 %96, label %109, label %97
97: ; preds = %93
%98 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%99 = call i64 @memcmp(i8* %98, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%100 = icmp eq i64 %99, 0
br i1 %100, label %109, label %101
101: ; preds = %97
%102 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%103 = call i64 @memcmp(i8* %102, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 2)
%104 = icmp eq i64 %103, 0
br i1 %104, label %109, label %105
105: ; preds = %101
%106 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%107 = call i64 @memcmp(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %110
109: ; preds = %105, %101, %97, %93, %87
store i32 1, i32* %2
br label %111
110: ; preds = %105
store i32 0, i32* %2
br label %111
111: ; preds = %110, %109, %84, %69, %14
%112 = load i32, i32* %2
ret i32 %112
}

LLVM IR (-O2):
@.str = [4 x i8] c".gz\00"
@.str.1 = [3 x i8] c".Z\00"
@.str.2 = [3 x i8] c".z\00"
@.str.3 = [5 x i8] c".zip\00"
@.str.4 = [3 x i8] c"-z\00"
@.str.5 = [4 x i8] c"-gz\00"
@.str.6 = [3 x i8] c"\1F\8B\00"
@.str.7 = [3 x i8] c"PK\00"
@.str.8 = [3 x i8] c"\1F\1E\00"
@.str.9 = [3 x i8] c"\1F\9D\00"
@.str.10 = [3 x i8] c"\1F\A0\00"
define i32 @file_is_compressed(i8* %0) {
%2 = alloca i32*
%3 = alloca [2 x i8]
%4 = alloca [1025 x i8]
%5 = bitcast i32** %2 to i8*
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [1025 x i8], [1025 x i8]* %4, i64 0, i64 0
%8 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%9 = icmp eq i64 %8, 0
br i1 %9, label %45, label %10
10: ; preds = %1
%11 = call i32 @strlen(i8* %0)
%12 = icmp sgt i32 %11, 1020
br i1 %12, label %67, label %13
13: ; preds = %10
%14 = call i32 @strcpy(i8* %7, i8* %0)
%15 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%16 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%17 = icmp eq i64 %16, 0
br i1 %17, label %45, label %18
18: ; preds = %13
%19 = call i32 @strcpy(i8* %0, i8* %7)
%20 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%21 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%22 = icmp eq i64 %21, 0
br i1 %22, label %45, label %23
23: ; preds = %18
%24 = call i32 @strcpy(i8* %0, i8* %7)
%25 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%26 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%27 = icmp eq i64 %26, 0
br i1 %27, label %45, label %28
28: ; preds = %23
%29 = call i32 @strcpy(i8* %0, i8* %7)
%30 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%31 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%32 = icmp eq i64 %31, 0
br i1 %32, label %45, label %33
33: ; preds = %28
%34 = call i32 @strcpy(i8* %0, i8* %7)
%35 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%36 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%37 = icmp eq i64 %36, 0
br i1 %37, label %45, label %38
38: ; preds = %33
%39 = call i32 @strcpy(i8* %0, i8* %7)
%40 = call i32 @strcat(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%41 = call i64 @file_openfile(i8* %0, i32 0, i32** %2)
%42 = icmp eq i64 %41, 0
br i1 %42, label %45, label %43
43: ; preds = %38
%44 = call i32 @strcpy(i8* %0, i8* %7)
br label %67
45: ; preds = %13, %23, %33, %38, %28, %18, %1
%46 = load i32*, i32** %2
%47 = call i32 @fread(i8* %6, i32 1, i32 2, i32* %46)
%48 = icmp eq i32 %47, 2
%49 = load i32*, i32** %2
%50 = call i32 @fclose(i32* %49)
br i1 %48, label %51, label %67
51: ; preds = %45
%52 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i32 2)
%53 = icmp eq i64 %52, 0
br i1 %53, label %67, label %54
54: ; preds = %51
%55 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.7, i64 0, i64 0), i32 2)
%56 = icmp eq i64 %55, 0
br i1 %56, label %67, label %57
57: ; preds = %54
%58 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i32 2)
%59 = icmp eq i64 %58, 0
br i1 %59, label %67, label %60
60: ; preds = %57
%61 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.9, i64 0, i64 0), i32 2)
%62 = icmp eq i64 %61, 0
br i1 %62, label %67, label %63
63: ; preds = %60
%64 = call i64 @memcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.10, i64 0, i64 0), i32 2)
%65 = icmp eq i64 %64, 0
%66 = zext i1 %65 to i32
br label %67
67: ; preds = %45, %63, %51, %54, %57, %60, %10, %43
%68 = phi i32 [ 0, %43 ], [ 0, %10 ], [ 1, %60 ], [ 1, %57 ], [ 1, %54 ], [ 1, %51 ], [ %66, %63 ], [ 0, %45 ]
ret i32 %68
}