#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 EXIT_FAILURE;
int EXIT_SUCCESS;
int /*<<< orphan*/ SEEK_SET;
int atoi(char *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int strlen(char *);
scalar_t__ strstr(char *, char *);
int main(int argc, char *argv[]) {
  if (argc != 5) {
    printf("Usage: refdict Nom_dict_entre Nom_dict_sorti Nom_reference "
           "Limite_inferieure_longueur\n");
    return EXIT_FAILURE;
  }
  FILE *entre_dict, *sorti_dict, *reference;
  entre_dict = fopen(argv[1], "r");
  sorti_dict = fopen(argv[2], "w");
  reference = fopen(argv[3], "w");
  int nombre_mot[40] = {0};
  int ligne_total = 0;
  int le_plus_court = atoi(argv[4]);
  char mot[30];
  int max_longueur = 0;
  while (fgets(mot, 100, entre_dict) != NULL) {
    if (strstr(mot, "-"))
      continue;
    int l = strlen(mot) - 1;
    if (l < le_plus_court)
      continue;
    if (l > max_longueur)
      max_longueur = l;
    ligne_total++;
  }
  fprintf(reference, "%d\n%d\n", ligne_total, max_longueur);
  int i;
  for (i = le_plus_court; i <= max_longueur; i++) {
    fseek(entre_dict, 0, SEEK_SET);
    while (fgets(mot, 100, entre_dict) != NULL) {
      if (strstr(mot, "-"))
        continue;
      if (strlen(mot) - 1 != i)
        continue;
      nombre_mot[i]++;
      fprintf(sorti_dict, "%s", mot);
    }
  }
  for (i = 1; i <= max_longueur; i++) {
    nombre_mot[i] = nombre_mot[i] + nombre_mot[i - 1];
    fprintf(reference, "%d %d\n", i, nombre_mot[i]);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x5,-0x8(%rbp)
je     11d0 <main+0x40>
lea    0xe46(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e12(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1481 <main+0x2f1>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe78(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe62(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
lea    0xe4a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x28(%rbp)
lea    -0xd0(%rbp),%rdi
xor    %esi,%esi
mov    $0xa0,%edx
call   1050 <memset@plt>
movl   $0x0,-0xd4(%rbp)
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
call   10a0 <atoi@plt>
mov    %eax,-0xd8(%rbp)
movl   $0x0,-0x104(%rbp)
lea    -0x100(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x64,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     12f1 <main+0x161>
lea    -0x100(%rbp),%rdi
lea    0xddc(%rip),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
je     1293 <main+0x103>
jmp    1252 <main+0xc2>
lea    -0x100(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0x108(%rbp)
mov    -0x108(%rbp),%eax
cmp    -0xd8(%rbp),%eax
jge    12bf <main+0x12f>
jmp    1252 <main+0xc2>
mov    -0x108(%rbp),%eax
cmp    -0x104(%rbp),%eax
jle    12dd <main+0x14d>
mov    -0x108(%rbp),%eax
mov    %eax,-0x104(%rbp)
mov    -0xd4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xd4(%rbp)
jmp    1252 <main+0xc2>
mov    -0x28(%rbp),%rdi
mov    -0xd4(%rbp),%edx
mov    -0x104(%rbp),%ecx
lea    0xd55(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0xd8(%rbp),%eax
mov    %eax,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
cmp    -0x104(%rbp),%eax
jg     13f1 <main+0x261>
mov    -0x18(%rbp),%rdi
mov    0x2ca8(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1080 <fseek@plt>
lea    -0x100(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x64,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     13d8 <main+0x248>
lea    -0x100(%rbp),%rdi
lea    0xced(%rip),%rsi
call   10b0 <strstr@plt>
cmp    $0x0,%rax
je     1382 <main+0x1f2>
jmp    1341 <main+0x1b1>
lea    -0x100(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
cmp    -0x10c(%rbp),%eax
je     13a2 <main+0x212>
jmp    1341 <main+0x1b1>
movslq -0x10c(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%ecx
add    $0x1,%ecx
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0x20(%rbp),%rdi
lea    -0x100(%rbp),%rdx
lea    0xc98(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
jmp    1341 <main+0x1b1>
jmp    13dd <main+0x24d>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    131b <main+0x18b>
movl   $0x1,-0x10c(%rbp)
mov    -0x10c(%rbp),%eax
cmp    -0x104(%rbp),%eax
jg     1475 <main+0x2e5>
movslq -0x10c(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%ecx
mov    -0x10c(%rbp),%eax
sub    $0x1,%eax
cltq
add    -0xd0(%rbp,%rax,4),%ecx
movslq -0x10c(%rbp),%rax
mov    %ecx,-0xd0(%rbp,%rax,4)
mov    -0x28(%rbp),%rdi
mov    -0x10c(%rbp),%edx
movslq -0x10c(%rbp),%rax
mov    -0xd0(%rbp,%rax,4),%ecx
lea    0xc0d(%rip),%rsi
mov    $0x0,%al
call   1070 <fprintf@plt>
mov    -0x10c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10c(%rbp)
jmp    13fb <main+0x26b>
mov    0x2b54(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xd8,%rsp
cmp    $0x5,%edi
jne    1298 <main+0x108>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xeae(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,%r13
mov    0x10(%rbx),%rdi
lea    0xe35(%rip),%rbp
mov    %rbp,%rsi
call   1090 <fopen@plt>
mov    %rax,%r12
mov    0x18(%rbx),%rdi
mov    %rbp,%rsi
call   1090 <fopen@plt>
mov    %rax,0x8(%rsp)
xorps  %xmm0,%xmm0
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
mov    0x20(%rbx),%rdi
call   10a0 <atoi@plt>
mov    %eax,%r14d
movl   $0x0,(%rsp)
lea    0xb0(%rsp),%rbx
lea    0xdbb(%rip),%rbp
xor    %r15d,%r15d
nopw   0x0(%rax,%rax,1)
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %r13,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     12ad <main+0x11d>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
jne    1250 <main+0xc0>
mov    %rbx,%rdi
call   1040 <strlen@plt>
lea    -0x1(%rax),%ecx
cmp    %r15d,%ecx
cmovle %r15d,%ecx
xor    %edx,%edx
cmp    %r14d,%eax
setg   %dl
cmovg  %ecx,%r15d
add    %edx,(%rsp)
jmp    1250 <main+0xc0>
lea    0xd73(%rip),%rdi
call   1030 <puts@plt>
mov    0x2d2d(%rip),%rax
jmp    1329 <main+0x199>
lea    0xd50(%rip),%rsi
mov    0x8(%rsp),%rdi
mov    (%rsp),%edx
mov    %r15d,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
mov    %r15,(%rsp)
cmp    %r15d,%r14d
jle    133d <main+0x1ad>
mov    (%rsp),%r15
test   %r15d,%r15d
mov    0x8(%rsp),%r14
jle    1322 <main+0x192>
add    $0x1,%r15d
mov    $0x1,%ebx
mov    0x10(%rsp),%ebp
lea    0xd1a(%rip),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    0x10(%rsp,%rbx,4),%ebp
mov    %ebp,0x10(%rsp,%rbx,4)
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
mov    %ebp,%ecx
xor    %eax,%eax
call   1070 <fprintf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1300 <main+0x170>
mov    0x2ca7(%rip),%rax
mov    (%rax),%eax
add    $0xd8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
movslq %r14d,%r14
mov    (%rsp),%rax
lea    0x1(%rax),%r15d
lea    0xb0(%rsp),%rbx
lea    0xcab(%rip),%rbp
jmp    136d <main+0x1dd>
nopl   0x0(%rax)
add    $0x1,%r14
cmp    %r14d,%r15d
je     12cf <main+0x13f>
mov    0x2c6c(%rip),%rax
mov    (%rax),%edx
mov    %r13,%rdi
xor    %esi,%esi
call   1080 <fseek@plt>
mov    %rbx,%rdi
mov    $0x64,%esi
mov    %r13,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     1360 <main+0x1d0>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   10b0 <strstr@plt>
test   %rax,%rax
jne    1380 <main+0x1f0>
mov    %rbx,%rdi
call   1040 <strlen@plt>
add    $0xffffffff,%eax
cmp    %r14d,%eax
jne    1380 <main+0x1f0>
addl   $0x1,0x10(%rsp,%r14,4)
mov    %rbx,%rdi
mov    %r12,%rsi
call   1050 <fputs@plt>
jmp    1380 <main+0x1f0>

LLVM IR (-O0):
@.str = [87 x i8] c"Usage: refdict Nom_dict_entre Nom_dict_sorti Nom_reference Limite_inferieure_longueur\0A\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [2 x i8] c"-\00"
@.str.4 = [7 x i8] c"%d\0A%d\0A\00"
@SEEK_SET = global i32 0
@.str.5 = [3 x i8] c"%s\00"
@.str.6 = [7 x i8] c"%d %d\0A\00"
@EXIT_SUCCESS = global i32 0
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 [40 x i32]
%10 = alloca i32
%11 = alloca i32
%12 = alloca [30 x i8]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%16 = load i32, i32* %4
%17 = icmp ne i32 %16, 5
br i1 %17, label %18, label %21
18: ; preds = %2
%19 = call i32 @printf(i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str, i64 0, i64 0))
%20 = load i32, i32* @EXIT_FAILURE
store i32 %20, i32* %3
br label %141
21: ; preds = %2
%22 = load i8**, i8*** %5
%23 = getelementptr inbounds i8*, i8** %22, i64 1
%24 = load i8*, i8** %23
%25 = call i32* @fopen(i8* %24, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %25, i32** %6
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 2
%28 = load i8*, i8** %27
%29 = call i32* @fopen(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %29, i32** %7
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 3
%32 = load i8*, i8** %31
%33 = call i32* @fopen(i8* %32, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
store i32* %33, i32** %8
%34 = bitcast [40 x i32]* %9 to i8*
store i32 0, i32* %10
%35 = load i8**, i8*** %5
%36 = getelementptr inbounds i8*, i8** %35, i64 4
%37 = load i8*, i8** %36
%38 = call i32 @atoi(i8* %37)
store i32 %38, i32* %11
store i32 0, i32* %13
br label %39
39: ; preds = %63, %56, %48, %21
%40 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%41 = load i32*, i32** %6
%42 = call i32* @fgets(i8* %40, i32 100, i32* %41)
%43 = icmp ne i32* %42, null
br i1 %43, label %44, label %66
44: ; preds = %39
%45 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%46 = call i64 @strstr(i8* %45, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%47 = icmp ne i64 %46, 0
br i1 %47, label %48, label %49
48: ; preds = %44
br label %39
49: ; preds = %44
%50 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%51 = call i32 @strlen(i8* %50)
%52 = sub nsw i32 %51, 1
store i32 %52, i32* %14
%53 = load i32, i32* %14
%54 = load i32, i32* %11
%55 = icmp slt i32 %53, %54
br i1 %55, label %56, label %57
56: ; preds = %49
br label %39
57: ; preds = %49
%58 = load i32, i32* %14
%59 = load i32, i32* %13
%60 = icmp sgt i32 %58, %59
br i1 %60, label %61, label %63
61: ; preds = %57
%62 = load i32, i32* %14
store i32 %62, i32* %13
br label %63
63: ; preds = %61, %57
%64 = load i32, i32* %10
%65 = add nsw i32 %64, 1
store i32 %65, i32* %10
br label %39
66: ; preds = %39
%67 = load i32*, i32** %8
%68 = load i32, i32* %10
%69 = load i32, i32* %13
%70 = call i32 (i32*, i8*, ...) @fprintf(i32* %67, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %68, i32 %69)
%71 = load i32, i32* %11
store i32 %71, i32* %15
br label %72
72: ; preds = %107, %66
%73 = load i32, i32* %15
%74 = load i32, i32* %13
%75 = icmp sle i32 %73, %74
br i1 %75, label %76, label %110
76: ; preds = %72
%77 = load i32*, i32** %6
%78 = load i32, i32* @SEEK_SET
%79 = call i32 @fseek(i32* %77, i32 0, i32 %78)
br label %80
80: ; preds = %97, %96, %89, %76
%81 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%82 = load i32*, i32** %6
%83 = call i32* @fgets(i8* %81, i32 100, i32* %82)
%84 = icmp ne i32* %83, null
br i1 %84, label %85, label %106
85: ; preds = %80
%86 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%87 = call i64 @strstr(i8* %86, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%88 = icmp ne i64 %87, 0
br i1 %88, label %89, label %90
89: ; preds = %85
br label %80
90: ; preds = %85
%91 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%92 = call i32 @strlen(i8* %91)
%93 = sub nsw i32 %92, 1
%94 = load i32, i32* %15
%95 = icmp ne i32 %93, %94
br i1 %95, label %96, label %97
96: ; preds = %90
br label %80
97: ; preds = %90
%98 = load i32, i32* %15
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [40 x i32], [40 x i32]* %9, i64 0, i64 %99
%101 = load i32, i32* %100
%102 = add nsw i32 %101, 1
store i32 %102, i32* %100
%103 = load i32*, i32** %7
%104 = getelementptr inbounds [30 x i8], [30 x i8]* %12, i64 0, i64 0
%105 = call i32 (i32*, i8*, ...) @fprintf(i32* %103, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.5, i64 0, i64 0), i8* %104)
br label %80
106: ; preds = %80
br label %107
107: ; preds = %106
%108 = load i32, i32* %15
%109 = add nsw i32 %108, 1
store i32 %109, i32* %15
br label %72
110: ; preds = %72
store i32 1, i32* %15
br label %111
111: ; preds = %136, %110
%112 = load i32, i32* %15
%113 = load i32, i32* %13
%114 = icmp sle i32 %112, %113
br i1 %114, label %115, label %139
115: ; preds = %111
%116 = load i32, i32* %15
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [40 x i32], [40 x i32]* %9, i64 0, i64 %117
%119 = load i32, i32* %118
%120 = load i32, i32* %15
%121 = sub nsw i32 %120, 1
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds [40 x i32], [40 x i32]* %9, i64 0, i64 %122
%124 = load i32, i32* %123
%125 = add nsw i32 %119, %124
%126 = load i32, i32* %15
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [40 x i32], [40 x i32]* %9, i64 0, i64 %127
store i32 %125, i32* %128
%129 = load i32*, i32** %8
%130 = load i32, i32* %15
%131 = load i32, i32* %15
%132 = sext i32 %131 to i64
%133 = getelementptr inbounds [40 x i32], [40 x i32]* %9, i64 0, i64 %132
%134 = load i32, i32* %133
%135 = call i32 (i32*, i8*, ...) @fprintf(i32* %129, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %130, i32 %134)
br label %136
136: ; preds = %115
%137 = load i32, i32* %15
%138 = add nsw i32 %137, 1
store i32 %138, i32* %15
br label %111
139: ; preds = %111
%140 = load i32, i32* @EXIT_SUCCESS
store i32 %140, i32* %3
br label %141
141: ; preds = %139, %18
%142 = load i32, i32* %3
ret i32 %142
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [2 x i8] c"w\00"
@.str.3 = [2 x i8] c"-\00"
@.str.4 = [7 x i8] c"%d\0A%d\0A\00"
@SEEK_SET = global i32 0
@.str.6 = [7 x i8] c"%d %d\0A\00"
@EXIT_SUCCESS = global i32 0
@str = [86 x i8] c"Usage: refdict Nom_dict_entre Nom_dict_sorti Nom_reference Limite_inferieure_longueur\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [40 x i32]
%4 = alloca [30 x i8]
%5 = icmp eq i32 %0, 5
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([86 x i8], [86 x i8]* @str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
br label %94
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = getelementptr inbounds i8*, i8** %1, i64 2
%14 = load i8*, i8** %13
%15 = tail call i32* @fopen(i8* %14, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%16 = getelementptr inbounds i8*, i8** %1, i64 3
%17 = load i8*, i8** %16
%18 = tail call i32* @fopen(i8* %17, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%19 = bitcast [40 x i32]* %3 to i8*
%20 = getelementptr inbounds i8*, i8** %1, i64 4
%21 = load i8*, i8** %20
%22 = tail call i32 @atoi(i8* %21)
%23 = getelementptr inbounds [30 x i8], [30 x i8]* %4, i64 0, i64 0
br label %24
24: ; preds = %33, %9
%25 = phi i32 [ %39, %33 ], [ 0, %9 ]
%26 = phi i32 [ %41, %33 ], [ 0, %9 ]
br label %27
27: ; preds = %24, %30
%28 = call i32* @fgets(i8* %23, i32 100, i32* %12)
%29 = icmp eq i32* %28, null
br i1 %29, label %42, label %30
30: ; preds = %27
%31 = call i64 @strstr(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i64 %31, 0
br i1 %32, label %33, label %27
33: ; preds = %30
%34 = call i32 @strlen(i8* %23)
%35 = add nsw i32 %34, -1
%36 = icmp sgt i32 %34, %22
%37 = icmp sgt i32 %35, %26
%38 = zext i1 %36 to i32
%39 = add nuw nsw i32 %25, %38
%40 = select i1 %36, i1 %37, i1 false
%41 = select i1 %40, i32 %35, i32 %26
br label %24
42: ; preds = %27
%43 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i32 %25, i32 %26)
%44 = icmp sgt i32 %22, %26
br i1 %44, label %48, label %45
45: ; preds = %42
%46 = sext i32 %22 to i64
%47 = add i32 %26, 1
br label %55
48: ; preds = %78, %42
%49 = icmp slt i32 %26, 1
br i1 %49, label %92, label %50
50: ; preds = %48
%51 = add nuw i32 %26, 1
%52 = zext i32 %51 to i64
%53 = getelementptr inbounds [40 x i32], [40 x i32]* %3, i64 0, i64 0
%54 = load i32, i32* %53
br label %82
55: ; preds = %45, %78
%56 = phi i64 [ %46, %45 ], [ %79, %78 ]
%57 = load i32, i32* @SEEK_SET
%58 = call i32 @fseek(i32* %12, i32 0, i32 %57)
%59 = call i32* @fgets(i8* %23, i32 100, i32* %12)
%60 = icmp eq i32* %59, null
br i1 %60, label %78, label %61
61: ; preds = %55
%62 = getelementptr inbounds [40 x i32], [40 x i32]* %3, i64 0, i64 %56
%63 = trunc i64 %56 to i32
br label %64
64: ; preds = %61, %75
%65 = call i64 @strstr(i8* %23, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %67, label %75
67: ; preds = %64
%68 = call i32 @strlen(i8* %23)
%69 = add nsw i32 %68, -1
%70 = icmp eq i32 %69, %63
br i1 %70, label %71, label %75
71: ; preds = %67
%72 = load i32, i32* %62
%73 = add nsw i32 %72, 1
store i32 %73, i32* %62
%74 = call i32 @fputs(i8* %23, i32* %15)
br label %75
75: ; preds = %71, %64, %67
%76 = call i32* @fgets(i8* %23, i32 100, i32* %12)
%77 = icmp eq i32* %76, null
br i1 %77, label %78, label %64
78: ; preds = %75, %55
%79 = add nsw i64 %56, 1
%80 = trunc i64 %79 to i32
%81 = icmp eq i32 %47, %80
br i1 %81, label %48, label %55
82: ; preds = %50, %82
%83 = phi i32 [ %54, %50 ], [ %87, %82 ]
%84 = phi i64 [ 1, %50 ], [ %90, %82 ]
%85 = getelementptr inbounds [40 x i32], [40 x i32]* %3, i64 0, i64 %84
%86 = load i32, i32* %85
%87 = add nsw i32 %83, %86
store i32 %87, i32* %85
%88 = trunc i64 %84 to i32
%89 = call i32 (i32*, i8*, ...) @fprintf(i32* %18, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %88, i32 %87)
%90 = add nuw nsw i64 %84, 1
%91 = icmp eq i64 %90, %52
br i1 %91, label %92, label %82
92: ; preds = %82, %48
%93 = load i32, i32* @EXIT_SUCCESS
br label %94
94: ; preds = %92, %6
%95 = phi i32 [ %8, %6 ], [ %93, %92 ]
ret i32 %95
}