#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*/ brief(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char *fgetl(int /*<<< orphan*/ *, int, int);
int /*<<< orphan*/ *fopen(char *, char *);
char *malloc(int);
int /*<<< orphan*/ printf(char *, ...);
int main(int argc, char **argv) {
  FILE *fichier1 = NULL;
  FILE *fichier2 = NULL;
  int i;
  int parametre;
  if (2 > argc) {
    printf("Nombre de parametres insuffisants\n");
    return 1;
  }
  for (i = 1; i < argc; i++) {
    if (argv[1][0] == 45) {
      parametre = argv[1][1];
    } else {
      parametre = 0;
    }
  }
  switch (parametre) {
  case 113:
    fichier1 = fopen(argv[2], "r+");
    if (fichier1 == NULL) {
      printf("Impossible d'ouvrir le fichier %s\n", argv[1]);
      return 1;
    }
    fichier2 = fopen(argv[3], "r+");
    if (fichier2 == NULL) {
      printf("Impossible d'ouvrir le fichier %s\n", argv[2]);
      return 1;
    }
    if (brief(fichier1, fichier2) == 0) {
      printf("Les fichiers %s et %s sont différents", argv[2], argv[3]);
    } else {
      printf("les fichiers sont egaux");
    }
    break;
  case 0:
    fichier1 = fopen(argv[1], "r+");
    if (fichier1 == NULL) {
      printf("Impossible d'ouvrir le fichier %s\n", argv[1]);
      return 1;
    }
    fichier2 = fopen(argv[2], "r+");
    if (fichier2 == NULL) {
      printf("Impossible d'ouvrir le fichier %s\n", argv[2]);
      return 1;
    }
    break;
  case 108:
    fichier1 = fopen(argv[2], "r+");
    if (fichier1 == NULL) {
      printf("Impossible d'ouvrir le fichier %s\n", argv[1]);
      return 1;
    }
    char *ligne = malloc(sizeof(char) * 1000);
    ligne = fgetl(fichier1, 2, 1000);
    printf("%s", ligne);
    break;
  }
  fclose(fichier1);
  fclose(fichier2);
  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)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
mov    $0x2,%eax
cmp    -0x8(%rbp),%eax
jle    11ae <main+0x4e>
lea    0xe65(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1432 <main+0x2d2>
movl   $0x1,-0x24(%rbp)
mov    -0x24(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1203 <main+0xa3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    11e9 <main+0x89>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
movsbl 0x1(%rax),%eax
mov    %eax,-0x28(%rbp)
jmp    11f0 <main+0x90>
movl   $0x0,-0x28(%rbp)
jmp    11f5 <main+0x95>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
jmp    11b5 <main+0x55>
mov    -0x28(%rbp),%eax
mov    %eax,-0x34(%rbp)
test   %eax,%eax
je     130e <main+0x1ae>
jmp    1216 <main+0xb6>
mov    -0x34(%rbp),%eax
sub    $0x6c,%eax
je     139d <main+0x23d>
jmp    1227 <main+0xc7>
mov    -0x34(%rbp),%eax
sub    $0x71,%eax
jne    1419 <main+0x2b9>
jmp    1238 <main+0xd8>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xddc(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    127d <main+0x11d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xdbc(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1432 <main+0x2d2>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xd97(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12c2 <main+0x162>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xd77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1432 <main+0x2d2>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1070 <brief@plt>
cmp    $0x0,%eax
jne    12fb <main+0x19b>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdx
lea    0xd5a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1309 <main+0x1a9>
lea    0xd6e(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1419 <main+0x2b9>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd06(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1353 <main+0x1f3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xce6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1432 <main+0x2d2>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xcc1(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1398 <main+0x238>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xca1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1432 <main+0x2d2>
jmp    1419 <main+0x2b9>
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xc77(%rip),%rsi
call   1080 <fopen@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    13e2 <main+0x282>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xc57(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1432 <main+0x2d2>
mov    $0x3e8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2,%esi
mov    $0x3e8,%edx
call   1060 <fgetl@plt>
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rsi
lea    0xc76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jge    117e <main+0x1e>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
jmp    12ff <main+0x19f>
mov    %rsi,%r12
mov    0x8(%rsi),%rax
mov    (%rax),%cl
lea    -0x1(%rdi),%edx
add    $0xfffffffe,%edi
mov    %edx,%ebx
and    $0x3,%ebx
cmp    $0x3,%edi
jae    1236 <main+0xd6>
test   %ebx,%ebx
jne    1229 <main+0xc9>
test   %esi,%esi
je     1256 <main+0xf6>
cmp    $0x6c,%esi
je     128a <main+0x12a>
cmp    $0x71,%esi
jne    12d2 <main+0x172>
mov    0x10(%r12),%rdi
lea    0xe37(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12cb <main+0x16b>
mov    %rax,%r14
mov    0x18(%r12),%rdi
lea    0xe1a(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12ec <main+0x18c>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rax,%rsi
call   1070 <brief@plt>
test   %eax,%eax
je     1310 <main+0x1b0>
lea    0xe3c(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12d8 <main+0x178>
nopl   (%rax)
add    $0xffffffff,%ebx
je     11a3 <main+0x43>
xor    %esi,%esi
cmp    $0x2d,%cl
jne    1220 <main+0xc0>
movsbl 0x1(%rax),%esi
jmp    1220 <main+0xc0>
and    $0xfffffffc,%edx
jmp    1249 <main+0xe9>
nopl   0x0(%rax,%rax,1)
add    $0xfffffffc,%edx
je     119b <main+0x3b>
xor    %esi,%esi
cmp    $0x2d,%cl
jne    1240 <main+0xe0>
movsbl 0x1(%rax),%esi
jmp    1240 <main+0xe0>
mov    0x8(%r12),%rdi
lea    0xd9e(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12cb <main+0x16b>
mov    %rax,%r14
mov    0x10(%r12),%rdi
lea    0xd85(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12ec <main+0x18c>
mov    %rax,%r15
jmp    12d8 <main+0x178>
mov    0x10(%r12),%rdi
lea    0xd6a(%rip),%rsi
call   1080 <fopen@plt>
test   %rax,%rax
je     12cb <main+0x16b>
mov    %rax,%r14
mov    %rax,%rdi
mov    $0x2,%esi
mov    $0x3e8,%edx
call   1060 <fgetl@plt>
lea    0xda9(%rip),%rdi
xor    %r15d,%r15d
mov    %rax,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12d8 <main+0x178>
mov    0x8(%r12),%rsi
jmp    12f1 <main+0x191>
xor    %r14d,%r14d
xor    %r15d,%r15d
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %r15,%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
jmp    1304 <main+0x1a4>
mov    0x10(%r12),%rsi
lea    0xd0b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret
mov    0x10(%r12),%rsi
mov    0x18(%r12),%rdx
lea    0xd05(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12d8 <main+0x178>

LLVM IR (-O0):
@.str = [35 x i8] c"Nombre de parametres insuffisants\0A\00"
@.str.1 = [3 x i8] c"r+\00"
@.str.2 = [35 x i8] c"Impossible d'ouvrir le fichier %s\0A\00"
@.str.3 = [39 x i8] c"Les fichiers %s et %s sont diff\C3\A9rents\00"
@.str.4 = [24 x i8] c"les fichiers sont egaux\00"
@.str.5 = [3 x i8] c"%s\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 i32
%9 = alloca i32
%10 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i32* null, i32** %7
%11 = load i32, i32* %4
%12 = icmp sgt i32 2, %11
br i1 %12, label %13, label %15
13: ; preds = %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %130
15: ; preds = %2
store i32 1, i32* %8
br label %16
16: ; preds = %37, %15
%17 = load i32, i32* %8
%18 = load i32, i32* %4
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %40
20: ; preds = %16
%21 = load i8**, i8*** %5
%22 = getelementptr inbounds i8*, i8** %21, i64 1
%23 = load i8*, i8** %22
%24 = getelementptr inbounds i8, i8* %23, i64 0
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 45
br i1 %27, label %28, label %35
28: ; preds = %20
%29 = load i8**, i8*** %5
%30 = getelementptr inbounds i8*, i8** %29, i64 1
%31 = load i8*, i8** %30
%32 = getelementptr inbounds i8, i8* %31, i64 1
%33 = load i8, i8* %32
%34 = sext i8 %33 to i32
store i32 %34, i32* %9
br label %36
35: ; preds = %20
store i32 0, i32* %9
br label %36
36: ; preds = %35, %28
br label %37
37: ; preds = %36
%38 = load i32, i32* %8
%39 = add nsw i32 %38, 1
store i32 %39, i32* %8
br label %16
40: ; preds = %16
%41 = load i32, i32* %9
switch i32 %41, label %125 [
i32 113, label %42
i32 0, label %82
i32 108, label %107
]
42: ; preds = %40
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 2
%45 = load i8*, i8** %44
%46 = call i32* @fopen(i8* %45, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %46, i32** %6
%47 = load i32*, i32** %6
%48 = icmp eq i32* %47, null
br i1 %48, label %49, label %54
49: ; preds = %42
%50 = load i8**, i8*** %5
%51 = getelementptr inbounds i8*, i8** %50, i64 1
%52 = load i8*, i8** %51
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %52)
store i32 1, i32* %3
br label %130
54: ; preds = %42
%55 = load i8**, i8*** %5
%56 = getelementptr inbounds i8*, i8** %55, i64 3
%57 = load i8*, i8** %56
%58 = call i32* @fopen(i8* %57, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %58, i32** %7
%59 = load i32*, i32** %7
%60 = icmp eq i32* %59, null
br i1 %60, label %61, label %66
61: ; preds = %54
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 2
%64 = load i8*, i8** %63
%65 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %64)
store i32 1, i32* %3
br label %130
66: ; preds = %54
%67 = load i32*, i32** %6
%68 = load i32*, i32** %7
%69 = call i32 @brief(i32* %67, i32* %68)
%70 = icmp eq i32 %69, 0
br i1 %70, label %71, label %79
71: ; preds = %66
%72 = load i8**, i8*** %5
%73 = getelementptr inbounds i8*, i8** %72, i64 2
%74 = load i8*, i8** %73
%75 = load i8**, i8*** %5
%76 = getelementptr inbounds i8*, i8** %75, i64 3
%77 = load i8*, i8** %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* %74, i8* %77)
br label %81
79: ; preds = %66
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %81
81: ; preds = %79, %71
br label %125
82: ; preds = %40
%83 = load i8**, i8*** %5
%84 = getelementptr inbounds i8*, i8** %83, i64 1
%85 = load i8*, i8** %84
%86 = call i32* @fopen(i8* %85, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %86, i32** %6
%87 = load i32*, i32** %6
%88 = icmp eq i32* %87, null
br i1 %88, label %89, label %94
89: ; preds = %82
%90 = load i8**, i8*** %5
%91 = getelementptr inbounds i8*, i8** %90, i64 1
%92 = load i8*, i8** %91
%93 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %92)
store i32 1, i32* %3
br label %130
94: ; preds = %82
%95 = load i8**, i8*** %5
%96 = getelementptr inbounds i8*, i8** %95, i64 2
%97 = load i8*, i8** %96
%98 = call i32* @fopen(i8* %97, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %98, i32** %7
%99 = load i32*, i32** %7
%100 = icmp eq i32* %99, null
br i1 %100, label %101, label %106
101: ; preds = %94
%102 = load i8**, i8*** %5
%103 = getelementptr inbounds i8*, i8** %102, i64 2
%104 = load i8*, i8** %103
%105 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %104)
store i32 1, i32* %3
br label %130
106: ; preds = %94
br label %125
107: ; preds = %40
%108 = load i8**, i8*** %5
%109 = getelementptr inbounds i8*, i8** %108, i64 2
%110 = load i8*, i8** %109
%111 = call i32* @fopen(i8* %110, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %111, i32** %6
%112 = load i32*, i32** %6
%113 = icmp eq i32* %112, null
br i1 %113, label %114, label %119
114: ; preds = %107
%115 = load i8**, i8*** %5
%116 = getelementptr inbounds i8*, i8** %115, i64 1
%117 = load i8*, i8** %116
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %117)
store i32 1, i32* %3
br label %130
119: ; preds = %107
%120 = call i8* @malloc(i32 1000)
store i8* %120, i8** %10
%121 = load i32*, i32** %6
%122 = call i8* @fgetl(i32* %121, i32 2, i32 1000)
store i8* %122, i8** %10
%123 = load i8*, i8** %10
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %123)
br label %125
125: ; preds = %40, %119, %106, %81
%126 = load i32*, i32** %6
%127 = call i32 @fclose(i32* %126)
%128 = load i32*, i32** %7
%129 = call i32 @fclose(i32* %128)
store i32 0, i32* %3
br label %130
130: ; preds = %125, %114, %101, %89, %61, %49, %13
%131 = load i32, i32* %3
ret i32 %131
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"r+\00"
@.str.2 = [35 x i8] c"Impossible d'ouvrir le fichier %s\0A\00"
@.str.3 = [39 x i8] c"Les fichiers %s et %s sont diff\C3\A9rents\00"
@.str.4 = [24 x i8] c"les fichiers sont egaux\00"
@.str.5 = [3 x i8] c"%s\00"
@str = [34 x i8] c"Nombre de parametres insuffisants\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %16, label %4
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 45
%9 = getelementptr inbounds i8, i8* %6, i64 1
%10 = add i32 %0, -1
%11 = add i32 %0, -2
%12 = and i32 %10, 3
%13 = icmp ult i32 %11, 3
br i1 %13, label %27, label %14
14: ; preds = %4
%15 = and i32 %10, -4
br label %18
16: ; preds = %2
%17 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @str, i64 0, i64 0))
br label %100
18: ; preds = %23, %14
%19 = phi i32 [ 0, %14 ], [ %25, %23 ]
br i1 %8, label %20, label %23
20: ; preds = %18
%21 = load i8, i8* %9
%22 = sext i8 %21 to i32
br label %23
23: ; preds = %20, %18
%24 = phi i32 [ %22, %20 ], [ 0, %18 ]
%25 = add i32 %19, 4
%26 = icmp eq i32 %25, %15
br i1 %26, label %27, label %18
27: ; preds = %23, %4
%28 = phi i32 [ undef, %4 ], [ %24, %23 ]
%29 = icmp eq i32 %12, 0
br i1 %29, label %39, label %30
30: ; preds = %27, %35
%31 = phi i32 [ %37, %35 ], [ 0, %27 ]
br i1 %8, label %32, label %35
32: ; preds = %30
%33 = load i8, i8* %9
%34 = sext i8 %33 to i32
br label %35
35: ; preds = %32, %30
%36 = phi i32 [ %34, %32 ], [ 0, %30 ]
%37 = add i32 %31, 1
%38 = icmp eq i32 %37, %12
br i1 %38, label %39, label %30
39: ; preds = %35, %27
%40 = phi i32 [ %28, %27 ], [ %36, %35 ]
switch i32 %40, label %95 [
i32 113, label %41
i32 0, label %67
i32 108, label %83
]
41: ; preds = %39
%42 = getelementptr inbounds i8*, i8** %1, i64 2
%43 = load i8*, i8** %42
%44 = tail call i32* @fopen(i8* %43, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%45 = icmp eq i32* %44, null
br i1 %45, label %46, label %50
46: ; preds = %41
%47 = getelementptr inbounds i8*, i8** %1, i64 1
%48 = load i8*, i8** %47
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %48)
br label %100
50: ; preds = %41
%51 = getelementptr inbounds i8*, i8** %1, i64 3
%52 = load i8*, i8** %51
%53 = tail call i32* @fopen(i8* %52, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%54 = icmp eq i32* %53, null
br i1 %54, label %55, label %58
55: ; preds = %50
%56 = load i8*, i8** %42
%57 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %56)
br label %100
58: ; preds = %50
%59 = tail call i32 @brief(i32* %44, i32* %53)
%60 = icmp eq i32 %59, 0
br i1 %60, label %61, label %65
61: ; preds = %58
%62 = load i8*, i8** %42
%63 = load i8*, i8** %51
%64 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.3, i64 0, i64 0), i8* %62, i8* %63)
br label %95
65: ; preds = %58
%66 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
br label %95
67: ; preds = %39
%68 = getelementptr inbounds i8*, i8** %1, i64 1
%69 = load i8*, i8** %68
%70 = tail call i32* @fopen(i8* %69, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%71 = icmp eq i32* %70, null
br i1 %71, label %72, label %75
72: ; preds = %67
%73 = load i8*, i8** %68
%74 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %73)
br label %100
75: ; preds = %67
%76 = getelementptr inbounds i8*, i8** %1, i64 2
%77 = load i8*, i8** %76
%78 = tail call i32* @fopen(i8* %77, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%79 = icmp eq i32* %78, null
br i1 %79, label %80, label %95
80: ; preds = %75
%81 = load i8*, i8** %76
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %81)
br label %100
83: ; preds = %39
%84 = getelementptr inbounds i8*, i8** %1, i64 2
%85 = load i8*, i8** %84
%86 = tail call i32* @fopen(i8* %85, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%87 = icmp eq i32* %86, null
br i1 %87, label %88, label %92
88: ; preds = %83
%89 = getelementptr inbounds i8*, i8** %1, i64 1
%90 = load i8*, i8** %89
%91 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str.2, i64 0, i64 0), i8* %90)
br label %100
92: ; preds = %83
%93 = tail call i8* @fgetl(i32* %86, i32 2, i32 1000)
%94 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %93)
br label %95
95: ; preds = %75, %61, %65, %39, %92
%96 = phi i32* [ null, %39 ], [ %86, %92 ], [ %70, %75 ], [ %44, %61 ], [ %44, %65 ]
%97 = phi i32* [ null, %39 ], [ null, %92 ], [ %78, %75 ], [ %53, %61 ], [ %53, %65 ]
%98 = tail call i32 @fclose(i32* %96)
%99 = tail call i32 @fclose(i32* %97)
br label %100
100: ; preds = %95, %88, %80, %72, %55, %46, %16
%101 = phi i32 [ 1, %16 ], [ 0, %95 ], [ 1, %88 ], [ 1, %72 ], [ 1, %80 ], [ 1, %46 ], [ 1, %55 ]
ret i32 %101
}