#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__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ getStringUntil(char *, char *, char);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ rename(char *, char *);
int /*<<< orphan*/ splitHeaderJustSize(char *, int *, int *);
scalar_t__ strcmp(char *, char *);
int supprDescriptor(char *id, char *baseType) {
  char buffer[100];
  char curentID[100];
  FILE *bufferFile;
  FILE *base;
  int i = 0;
  int nbColumns;
  int nbLines;
  if (strcmp(baseType, "sound") == 0) {
    base = fopen("Bases/base_descripteur_audio.base", "r");
    bufferFile = fopen("Bases/base_descripteur_audio.base.tmp", "w");
  } else if (strcmp(baseType, "text") == 0) {
    base = fopen("Bases/base_descripteur_text.base", "r");
    bufferFile = fopen("Bases/base_descripteur_text.base.tmp", "w");
  } else if (strcmp(baseType, "image") == 0) {
    base = fopen("Bases/base_descripteur_image.base", "r");
    bufferFile = fopen("Bases/base_descripteur_image.base.tmp", "w");
  }
  if (bufferFile == NULL || base == NULL) {
    return (-1);
  }
  while (fgets(buffer, 100, base)) {
    if (buffer[0] != 'I') {
      fputs(buffer, bufferFile);
      memset(buffer, 0, 100);
      continue;
    }
    getStringUntil(buffer, curentID, '\t');
    if (strcmp(curentID, id) != 0) {
      fputs(buffer, bufferFile);
    } else {
      splitHeaderJustSize(buffer, &nbColumns, &nbLines);
      for (i = 0; i < nbLines; i++) {
        fgets(buffer, 100, base);
      }
    }
    memset(buffer, 0, 100);
  }
  fclose(bufferFile);
  fclose(base);
  if (strcmp(baseType, "sound") == 0) {
    rename("Bases/base_descripteur_audio.base.tmp",
           "Bases/base_descripteur_audio.base");
  } else if (strcmp(baseType, "text") == 0) {
    rename("Bases/base_descripteur_text.base.tmp",
           "Bases/base_descripteur_text.base");
  } else if (strcmp(baseType, "image") == 0) {
    rename("Bases/base_descripteur_image.base.tmp",
           "Bases/base_descripteur_image.base");
  }
  return (0);
}


x86 assembly (clang, -O0):
<supprDescriptor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x104(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe48(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1200 <supprDescriptor+0x70>
lea    0xe38(%rip),%rdi
lea    0xe53(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x100(%rbp)
lea    0xe42(%rip),%rdi
lea    0xe61(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xf8(%rbp)
jmp    12ab <supprDescriptor+0x11b>
mov    -0x18(%rbp),%rdi
lea    0xe47(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    1253 <supprDescriptor+0xc3>
lea    0xe36(%rip),%rdi
lea    0xe00(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x100(%rbp)
lea    0xe3d(%rip),%rdi
lea    0xe0e(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xf8(%rbp)
jmp    12a6 <supprDescriptor+0x116>
mov    -0x18(%rbp),%rdi
lea    0xe3f(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    12a1 <supprDescriptor+0x111>
lea    0xe2f(%rip),%rdi
lea    0xdad(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x100(%rbp)
lea    0xe37(%rip),%rdi
lea    0xdbb(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0xf8(%rbp)
jmp    12a6 <supprDescriptor+0x116>
jmp    12ab <supprDescriptor+0x11b>
cmpq   $0x0,-0xf8(%rbp)
je     12c7 <supprDescriptor+0x137>
cmpq   $0x0,-0x100(%rbp)
jne    12d3 <supprDescriptor+0x143>
movl   $0xffffffff,-0x4(%rbp)
jmp    149d <supprDescriptor+0x30d>
jmp    12d8 <supprDescriptor+0x148>
lea    -0x80(%rbp),%rdi
mov    -0x100(%rbp),%rdx
mov    $0x64,%esi
call   1070 <fgets@plt>
cmp    $0x0,%rax
je     13e3 <supprDescriptor+0x253>
movsbl -0x80(%rbp),%eax
cmp    $0x49,%eax
je     1329 <supprDescriptor+0x199>
lea    -0x80(%rbp),%rdi
mov    -0xf8(%rbp),%rsi
call   1050 <fputs@plt>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1060 <memset@plt>
jmp    12d8 <supprDescriptor+0x148>
lea    -0x80(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
mov    $0x9,%edx
call   1090 <getStringUntil@plt>
lea    -0xf0(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     136d <supprDescriptor+0x1dd>
lea    -0x80(%rbp),%rdi
mov    -0xf8(%rbp),%rsi
call   1050 <fputs@plt>
jmp    13ce <supprDescriptor+0x23e>
lea    -0x80(%rbp),%rdi
lea    -0x108(%rbp),%rsi
lea    -0x10c(%rbp),%rdx
call   1030 <splitHeaderJustSize@plt>
movl   $0x0,-0x104(%rbp)
mov    -0x104(%rbp),%eax
cmp    -0x10c(%rbp),%eax
jge    13c9 <supprDescriptor+0x239>
lea    -0x80(%rbp),%rdi
mov    -0x100(%rbp),%rdx
mov    $0x64,%esi
call   1070 <fgets@plt>
mov    -0x104(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x104(%rbp)
jmp    138e <supprDescriptor+0x1fe>
jmp    13ce <supprDescriptor+0x23e>
lea    -0x80(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1060 <memset@plt>
jmp    12d8 <supprDescriptor+0x148>
mov    -0xf8(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x100(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x18(%rbp),%rdi
lea    0xbfa(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    142d <supprDescriptor+0x29d>
lea    0xc0e(%rip),%rdi
lea    0xbe3(%rip),%rsi
call   10b0 <rename@plt>
jmp    1496 <supprDescriptor+0x306>
mov    -0x18(%rbp),%rdi
lea    0xc1a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    145f <supprDescriptor+0x2cf>
lea    0xc2a(%rip),%rdi
lea    0xc02(%rip),%rsi
call   10b0 <rename@plt>
jmp    1491 <supprDescriptor+0x301>
mov    -0x18(%rbp),%rdi
lea    0xc33(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    148c <supprDescriptor+0x2fc>
lea    0xc45(%rip),%rdi
lea    0xc1c(%rip),%rsi
call   10b0 <rename@plt>
jmp    1491 <supprDescriptor+0x301>
jmp    1496 <supprDescriptor+0x306>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<supprDescriptor>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xf8,%rsp
mov    %rsi,%r14
mov    %rdi,%r15
lea    0xe52(%rip),%rsi
mov    %r14,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11fc <supprDescriptor+0x6c>
lea    0xe90(%rip),%rsi
mov    %r14,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     120c <supprDescriptor+0x7c>
lea    0xec7(%rip),%rsi
mov    %r14,%rdi
call   1080 <strcmp@plt>
mov    $0xffffffff,%ebp
test   %rax,%rax
jne    13bd <supprDescriptor+0x22d>
lea    0xed2(%rip),%rbp
lea    0xea9(%rip),%rdi
jmp    121a <supprDescriptor+0x8a>
lea    0xe27(%rip),%rbp
lea    0xdfc(%rip),%rdi
jmp    121a <supprDescriptor+0x8a>
lea    0xe65(%rip),%rbp
lea    0xe3d(%rip),%rdi
lea    0xe07(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,%rbx
lea    0xe20(%rip),%rsi
mov    %rbp,%rdi
call   10a0 <fopen@plt>
mov    $0xffffffff,%ebp
test   %rax,%rax
je     13bd <supprDescriptor+0x22d>
test   %rbx,%rbx
je     13bd <supprDescriptor+0x22d>
mov    %rax,%r12
mov    %r14,0x10(%rsp)
lea    0x20(%rsp),%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1330 <supprDescriptor+0x1a0>
lea    0x20(%rsp),%r13
lea    0x90(%rsp),%rbp
jmp    12bf <supprDescriptor+0x12f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r13,%rdi
mov    %r12,%rsi
call   1050 <fputs@plt>
mov    %r13,%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1060 <memset@plt>
mov    %r13,%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1330 <supprDescriptor+0x1a0>
cmpb   $0x49,0x20(%rsp)
jne    1290 <supprDescriptor+0x100>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    $0x9,%edx
call   1090 <getStringUntil@plt>
mov    %rbp,%rdi
mov    %r15,%rsi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    1290 <supprDescriptor+0x100>
mov    %r13,%rdi
lea    0x1c(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <splitHeaderJustSize@plt>
cmpl   $0x0,0xc(%rsp)
jle    129b <supprDescriptor+0x10b>
xor    %r14d,%r14d
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r13,%rdi
mov    $0x64,%esi
mov    %rbx,%rdx
call   1070 <fgets@plt>
add    $0x1,%r14d
cmp    0xc(%rsp),%r14d
jl     1310 <supprDescriptor+0x180>
jmp    129b <supprDescriptor+0x10b>
mov    %r12,%rdi
call   1040 <fclose@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
lea    0xcb9(%rip),%rsi
mov    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1398 <supprDescriptor+0x208>
lea    0xcf2(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     13a8 <supprDescriptor+0x218>
lea    0xd29(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
xor    %ebp,%ebp
test   %rax,%rax
jne    13bd <supprDescriptor+0x22d>
lea    0xd3b(%rip),%rdi
lea    0xd12(%rip),%rsi
call   10b0 <rename@plt>
jmp    13bd <supprDescriptor+0x22d>
lea    0xc8b(%rip),%rdi
lea    0xc60(%rip),%rsi
jmp    13b6 <supprDescriptor+0x226>
lea    0xcc9(%rip),%rdi
lea    0xca1(%rip),%rsi
call   10b0 <rename@plt>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"sound\00"
@.str.1 = [34 x i8] c"Bases/base_descripteur_audio.base\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [38 x i8] c"Bases/base_descripteur_audio.base.tmp\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [5 x i8] c"text\00"
@.str.6 = [33 x i8] c"Bases/base_descripteur_text.base\00"
@.str.7 = [37 x i8] c"Bases/base_descripteur_text.base.tmp\00"
@.str.8 = [6 x i8] c"image\00"
@.str.9 = [34 x i8] c"Bases/base_descripteur_image.base\00"
@.str.10 = [38 x i8] c"Bases/base_descripteur_image.base.tmp\00"
define i32 @supprDescriptor(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca [100 x i8]
%7 = alloca [100 x i8]
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 0, i32* %10
%13 = load i8*, i8** %5
%14 = call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = call i32* @fopen(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %17, i32** %9
%18 = call i32* @fopen(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %18, i32** %8
br label %35
19: ; preds = %2
%20 = load i8*, i8** %5
%21 = call i64 @strcmp(i8* %20, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %26
23: ; preds = %19
%24 = call i32* @fopen(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %24, i32** %9
%25 = call i32* @fopen(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %25, i32** %8
br label %34
26: ; preds = %19
%27 = load i8*, i8** %5
%28 = call i64 @strcmp(i8* %27, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %33
30: ; preds = %26
%31 = call i32* @fopen(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %31, i32** %9
%32 = call i32* @fopen(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
store i32* %32, i32** %8
br label %33
33: ; preds = %30, %26
br label %34
34: ; preds = %33, %23
br label %35
35: ; preds = %34, %16
%36 = load i32*, i32** %8
%37 = icmp eq i32* %36, null
br i1 %37, label %41, label %38
38: ; preds = %35
%39 = load i32*, i32** %9
%40 = icmp eq i32* %39, null
br i1 %40, label %41, label %42
41: ; preds = %38, %35
store i32 -1, i32* %3
br label %114
42: ; preds = %38
br label %43
43: ; preds = %86, %53, %42
%44 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%45 = load i32*, i32** %9
%46 = call i64 @fgets(i8* %44, i32 100, i32* %45)
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %89
48: ; preds = %43
%49 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%50 = load i8, i8* %49
%51 = sext i8 %50 to i32
%52 = icmp ne i32 %51, 73
br i1 %52, label %53, label %59
53: ; preds = %48
%54 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%55 = load i32*, i32** %8
%56 = call i32 @fputs(i8* %54, i32* %55)
%57 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%58 = call i32 @memset(i8* %57, i32 0, i32 100)
br label %43
59: ; preds = %48
%60 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%61 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%62 = call i32 @getStringUntil(i8* %60, i8* %61, i8 signext 9)
%63 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%64 = load i8*, i8** %4
%65 = call i64 @strcmp(i8* %63, i8* %64)
%66 = icmp ne i64 %65, 0
br i1 %66, label %67, label %71
67: ; preds = %59
%68 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%69 = load i32*, i32** %8
%70 = call i32 @fputs(i8* %68, i32* %69)
br label %86
71: ; preds = %59
%72 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%73 = call i32 @splitHeaderJustSize(i8* %72, i32* %11, i32* %12)
store i32 0, i32* %10
br label %74
74: ; preds = %82, %71
%75 = load i32, i32* %10
%76 = load i32, i32* %12
%77 = icmp slt i32 %75, %76
br i1 %77, label %78, label %85
78: ; preds = %74
%79 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%80 = load i32*, i32** %9
%81 = call i64 @fgets(i8* %79, i32 100, i32* %80)
br label %82
82: ; preds = %78
%83 = load i32, i32* %10
%84 = add nsw i32 %83, 1
store i32 %84, i32* %10
br label %74
85: ; preds = %74
br label %86
86: ; preds = %85, %67
%87 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%88 = call i32 @memset(i8* %87, i32 0, i32 100)
br label %43
89: ; preds = %43
%90 = load i32*, i32** %8
%91 = call i32 @fclose(i32* %90)
%92 = load i32*, i32** %9
%93 = call i32 @fclose(i32* %92)
%94 = load i8*, i8** %5
%95 = call i64 @strcmp(i8* %94, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%96 = icmp eq i64 %95, 0
br i1 %96, label %97, label %99
97: ; preds = %89
%98 = call i32 @rename(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %113
99: ; preds = %89
%100 = load i8*, i8** %5
%101 = call i64 @strcmp(i8* %100, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%102 = icmp eq i64 %101, 0
br i1 %102, label %103, label %105
103: ; preds = %99
%104 = call i32 @rename(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
br label %112
105: ; preds = %99
%106 = load i8*, i8** %5
%107 = call i64 @strcmp(i8* %106, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%108 = icmp eq i64 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %105
%110 = call i32 @rename(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
br label %111
111: ; preds = %109, %105
br label %112
112: ; preds = %111, %103
br label %113
113: ; preds = %112, %97
store i32 0, i32* %3
br label %114
114: ; preds = %113, %41
%115 = load i32, i32* %3
ret i32 %115
}

LLVM IR (-O2):
@.str = [6 x i8] c"sound\00"
@.str.1 = [34 x i8] c"Bases/base_descripteur_audio.base\00"
@.str.2 = [2 x i8] c"r\00"
@.str.3 = [38 x i8] c"Bases/base_descripteur_audio.base.tmp\00"
@.str.4 = [2 x i8] c"w\00"
@.str.5 = [5 x i8] c"text\00"
@.str.6 = [33 x i8] c"Bases/base_descripteur_text.base\00"
@.str.7 = [37 x i8] c"Bases/base_descripteur_text.base.tmp\00"
@.str.8 = [6 x i8] c"image\00"
@.str.9 = [34 x i8] c"Bases/base_descripteur_image.base\00"
@.str.10 = [38 x i8] c"Bases/base_descripteur_image.base.tmp\00"
define i32 @supprDescriptor(i8* %0, i8* %1) {
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = alloca i32
%6 = alloca i32
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%9 = bitcast i32* %5 to i8*
%10 = bitcast i32* %6 to i8*
%11 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%12 = icmp eq i64 %11, 0
br i1 %12, label %19, label %13
13: ; preds = %2
%14 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %19, label %16
16: ; preds = %13
%17 = tail call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %70
19: ; preds = %16, %13, %2
%20 = phi i8* [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), %2 ], [ getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), %13 ], [ getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0), %16 ]
%21 = phi i8* [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), %2 ], [ getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), %13 ], [ getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), %16 ]
%22 = tail call i32* @fopen(i8* %20, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%23 = tail call i32* @fopen(i8* %21, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%24 = icmp eq i32* %23, null
%25 = icmp eq i32* %22, null
%26 = or i1 %24, %25
br i1 %26, label %70, label %27
27: ; preds = %19
%28 = call i64 @fgets(i8* %7, i32 100, i32* %22)
%29 = icmp eq i64 %28, 0
br i1 %29, label %53, label %30
30: ; preds = %27, %35
%31 = load i8, i8* %7
%32 = icmp eq i8 %31, 73
br i1 %32, label %39, label %33
33: ; preds = %30, %39
%34 = call i32 @fputs(i8* %7, i32* %23)
br label %35
35: ; preds = %47, %33, %43
%36 = call i32 @memset(i8* %7, i32 0, i32 100)
%37 = call i64 @fgets(i8* %7, i32 100, i32* %22)
%38 = icmp eq i64 %37, 0
br i1 %38, label %53, label %30
39: ; preds = %30
%40 = call i32 @getStringUntil(i8* %7, i8* %8, i8 signext 9)
%41 = call i64 @strcmp(i8* %8, i8* %0)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %33
43: ; preds = %39
%44 = call i32 @splitHeaderJustSize(i8* %7, i32* %5, i32* %6)
%45 = load i32, i32* %6
%46 = icmp sgt i32 %45, 0
br i1 %46, label %47, label %35
47: ; preds = %43, %47
%48 = phi i32 [ %50, %47 ], [ 0, %43 ]
%49 = call i64 @fgets(i8* %7, i32 100, i32* %22)
%50 = add nuw nsw i32 %48, 1
%51 = load i32, i32* %6
%52 = icmp slt i32 %50, %51
br i1 %52, label %47, label %35
53: ; preds = %35, %27
%54 = call i32 @fclose(i32* %23)
%55 = call i32 @fclose(i32* %22)
%56 = call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%57 = icmp eq i64 %56, 0
br i1 %57, label %58, label %60
58: ; preds = %53
%59 = call i32 @rename(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0))
br label %70
60: ; preds = %53
%61 = call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%62 = icmp eq i64 %61, 0
br i1 %62, label %63, label %65
63: ; preds = %60
%64 = call i32 @rename(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0))
br label %70
65: ; preds = %60
%66 = call i64 @strcmp(i8* %1, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %70
68: ; preds = %65
%69 = call i32 @rename(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.9, i64 0, i64 0))
br label %70
70: ; preds = %16, %58, %65, %68, %63, %19
%71 = phi i32 [ -1, %19 ], [ 0, %63 ], [ 0, %68 ], [ 0, %65 ], [ 0, %58 ], [ -1, %16 ]
ret i32 %71
}