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

/* Variables and functions */
double CLOCKS_PER_SEC;
char EOF;
int /*<<< orphan*/ SEEK_SET;
scalar_t__ clock();
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int /*<<< orphan*/,
                         int /*<<< orphan*/);
char getc(int /*<<< orphan*/ *);
scalar_t__ malloc(int);
int /*<<< orphan*/ printf(char *, ...);
char scanf(char *, char *);
int strlen(char *);
int main() {
  char *swype;
  int swype_len;
  unsigned long swype_hash = 0UL;
  char *found = (char *)malloc(80 * sizeof(char));
  char c;
  int dict_len;
  int i, j;
  clock_t tstart;
  FILE *dict = fopen("enable1.txt", "r");
  printf("Input SWYPE string or Ctrl+D for exit:\n");
  while (scanf("%s", swype) != EOF) {
    tstart = clock();
    swype_len = strlen(swype);
    for (i = 0; i < swype_len; i++)
      swype_hash |= (1UL << (swype[i] - 'a'));
    fseek(dict, 0, SEEK_SET);
    dict_len = 0;
    do {
      c = getc(dict);
      if (c == '\n' || c == EOF) {
        found[dict_len] = '\0';
        if (dict_len >= 5 && swype[swype_len - 1] == found[dict_len - 1]) {
          i = 1;
          for (j = 1; i < dict_len - 1 && j < swype_len - 1; j++)
            if (found[i] == swype[j] || found[i] == swype[j - 1])
              i++;
          if (i >= dict_len - 1)
            printf("%s ", found);
        }
        dict_len = 0;
      } else if (c >= 'a' && c <= 'z' && dict_len >= 0) {
        if (dict_len == 0) {
          if (c == *swype)
            found[dict_len++] = c;
          else if (c > *swype)
            break;
          else
            dict_len = -1;
        } else {
          if (swype_hash & (1UL << (c - 'a')))
            found[dict_len++] = c;
          else
            dict_len = -1;
        }
      }
    } while (c != EOF);
    printf("(%f sec)", (double)(clock() - tstart) / CLOCKS_PER_SEC);
    printf("\nInput another one SWYPE string or Ctrl+D for exit:\n");
  }
  fclose(dict);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x20(%rbp)
mov    $0x50,%edi
call   1070 <malloc@plt>
mov    %rax,-0x28(%rbp)
lea    0xe44(%rip),%rdi
lea    0xe49(%rip),%rsi
call   10a0 <fopen@plt>
mov    %rax,-0x48(%rbp)
lea    0xe3b(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xe51(%rip),%rdi
call   1090 <scanf@plt>
movsbl %al,%eax
mov    0x2dec(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     14f4 <main+0x364>
mov    $0x0,%al
call   1030 <clock@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x14(%rbp)
movl   $0x0,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    125a <main+0xca>
mov    -0x10(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x61,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
or     -0x20(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    121d <main+0x8d>
mov    -0x48(%rbp),%rdi
mov    0x2d6b(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
call   1080 <fseek@plt>
movl   $0x0,-0x30(%rbp)
mov    -0x48(%rbp),%rdi
call   10b0 <getc@plt>
mov    %al,-0x29(%rbp)
movsbl -0x29(%rbp),%eax
cmp    $0xa,%eax
je     12a4 <main+0x114>
movsbl -0x29(%rbp),%eax
mov    0x2d47(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    13be <main+0x22e>
mov    -0x28(%rbp),%rax
movslq -0x30(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
cmpl   $0x5,-0x30(%rbp)
jl     13b2 <main+0x222>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    13b2 <main+0x222>
movl   $0x1,-0x34(%rbp)
movl   $0x1,-0x38(%rbp)
mov    -0x34(%rbp),%ecx
mov    -0x30(%rbp),%edx
sub    $0x1,%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x49(%rbp)
jge    1319 <main+0x189>
mov    -0x38(%rbp),%eax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
setl   %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
test   $0x1,%al
jne    1329 <main+0x199>
jmp    138a <main+0x1fa>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
movslq -0x38(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     136e <main+0x1de>
mov    -0x28(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x38(%rbp),%edx
sub    $0x1,%edx
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1377 <main+0x1e7>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    137c <main+0x1ec>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    12f2 <main+0x162>
mov    -0x34(%rbp),%eax
mov    -0x30(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jl     13ad <main+0x21d>
mov    -0x28(%rbp),%rsi
lea    0xc93(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13b2 <main+0x222>
movl   $0x0,-0x30(%rbp)
jmp    149d <main+0x30d>
movsbl -0x29(%rbp),%eax
cmp    $0x61,%eax
jl     1498 <main+0x308>
movsbl -0x29(%rbp),%eax
cmp    $0x7a,%eax
jg     1498 <main+0x308>
cmpl   $0x0,-0x30(%rbp)
jl     1498 <main+0x308>
cmpl   $0x0,-0x30(%rbp)
jne    1445 <main+0x2b5>
movsbl -0x29(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    141c <main+0x28c>
mov    -0x29(%rbp),%dl
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x30(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    1440 <main+0x2b0>
movsbl -0x29(%rbp),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jle    1434 <main+0x2a4>
jmp    14b8 <main+0x328>
movl   $0xffffffff,-0x30(%rbp)
jmp    1440 <main+0x2b0>
jmp    1493 <main+0x303>
mov    -0x20(%rbp),%rax
movsbl -0x29(%rbp),%ecx
sub    $0x61,%ecx
mov    %ecx,%ecx
mov    $0x1,%edx
shl    %cl,%rdx
mov    %rdx,%rcx
and    %rcx,%rax
cmp    $0x0,%rax
je     1487 <main+0x2f7>
mov    -0x29(%rbp),%dl
mov    -0x28(%rbp),%rax
mov    -0x30(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x30(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    148e <main+0x2fe>
movl   $0xffffffff,-0x30(%rbp)
jmp    1493 <main+0x303>
jmp    1498 <main+0x308>
jmp    149d <main+0x30d>
jmp    14a2 <main+0x312>
movsbl -0x29(%rbp),%eax
mov    0x2b33(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jne    1275 <main+0xe5>
mov    $0x0,%al
call   1030 <clock@plt>
sub    -0x40(%rbp),%rax
cvtsi2sd %rax,%xmm0
mov    0x2b19(%rip),%rax
divsd  (%rax),%xmm0
lea    0xb63(%rip),%rdi
mov    $0x1,%al
call   1060 <printf@plt>
lea    0xb5e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    11da <main+0x4a>
mov    -0x48(%rbp),%rdi
call   1040 <fclose@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    $0x50,%edi
call   1080 <malloc@plt>
mov    %rax,%r14
lea    0xe41(%rip),%rdi
lea    0xe46(%rip),%rsi
call   10b0 <fopen@plt>
mov    %rax,%rbx
lea    0xe45(%rip),%rdi
call   1030 <puts@plt>
lea    0xe2d(%rip),%rdi
call   10a0 <scanf@plt>
mov    0x2df3(%rip),%r15
cmp    (%r15),%al
jne    120b <main+0x6b>
mov    %rbx,%rdi
call   1050 <fclose@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xe2f(%rip),%r12
lea    0xdf5(%rip),%r13
jmp    1260 <main+0xc0>
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <clock@plt>
sub    %rbp,%rax
xorps  %xmm0,%xmm0
cvtsi2sd %rax,%xmm0
mov    0x2daf(%rip),%rax
divsd  (%rax),%xmm0
lea    0xdcd(%rip),%rdi
mov    $0x1,%al
call   1070 <printf@plt>
mov    %r12,%rdi
call   1030 <puts@plt>
mov    %r13,%rdi
call   10a0 <scanf@plt>
cmp    (%r15),%al
je     11f2 <main+0x52>
xor    %eax,%eax
call   1040 <clock@plt>
mov    %rax,%rbp
call   1060 <strlen@plt>
mov    0x2d5a(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1090 <fseek@plt>
jmp    1299 <main+0xf9>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movb   $0x0,(%r14)
cmp    (%r15),%al
je     1220 <main+0x80>
mov    %rbx,%rdi
call   10c0 <getc@plt>
cmp    $0xa,%al
je     1290 <main+0xf0>
cmp    (%r15),%al
je     1290 <main+0xf0>
lea    -0x61(%rax),%ecx
cmp    $0x1a,%cl
jae    1294 <main+0xf4>
jmp    1220 <main+0x80>

LLVM IR (-O0):
@.str = [12 x i8] c"enable1.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [40 x i8] c"Input SWYPE string or Ctrl+D for exit:\0A\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i8 0
@SEEK_SET = global i32 0
@.str.4 = [4 x i8] c"%s \00"
@.str.5 = [9 x i8] c"(%f sec)\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@.str.6 = [53 x i8] c"\0AInput another one SWYPE string or Ctrl+D for exit:\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
%5 = alloca i8*
%6 = alloca i8
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i64
%11 = alloca i32*
store i32 0, i32* %1
store i64 0, i64* %4
%12 = call i64 @malloc(i32 80)
%13 = inttoptr i64 %12 to i8*
store i8* %13, i8** %5
%14 = call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %14, i32** %11
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0))
br label %16
16: ; preds = %210, %0
%17 = load i8*, i8** %2
%18 = call signext i8 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* %17)
%19 = sext i8 %18 to i32
%20 = load i8, i8* @EOF
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %19, %21
br i1 %22, label %23, label %219
23: ; preds = %16
%24 = call i64 (...) @clock()
store i64 %24, i64* %10
%25 = load i8*, i8** %2
%26 = call i32 @strlen(i8* %25)
store i32 %26, i32* %3
store i32 0, i32* %8
br label %27
27: ; preds = %43, %23
%28 = load i32, i32* %8
%29 = load i32, i32* %3
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %46
31: ; preds = %27
%32 = load i8*, i8** %2
%33 = load i32, i32* %8
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = sub nsw i32 %37, 97
%39 = zext i32 %38 to i64
%40 = shl i64 1, %39
%41 = load i64, i64* %4
%42 = or i64 %41, %40
store i64 %42, i64* %4
br label %43
43: ; preds = %31
%44 = load i32, i32* %8
%45 = add nsw i32 %44, 1
store i32 %45, i32* %8
br label %27
46: ; preds = %27
%47 = load i32*, i32** %11
%48 = load i32, i32* @SEEK_SET
%49 = call i32 @fseek(i32* %47, i32 0, i32 %48)
store i32 0, i32* %7
br label %50
50: ; preds = %204, %46
%51 = load i32*, i32** %11
%52 = call signext i8 @getc(i32* %51)
store i8 %52, i8* %6
%53 = load i8, i8* %6
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 10
br i1 %55, label %62, label %56
56: ; preds = %50
%57 = load i8, i8* %6
%58 = sext i8 %57 to i32
%59 = load i8, i8* @EOF
%60 = sext i8 %59 to i32
%61 = icmp eq i32 %58, %60
br i1 %61, label %62, label %144
62: ; preds = %56, %50
%63 = load i8*, i8** %5
%64 = load i32, i32* %7
%65 = sext i32 %64 to i64
%66 = getelementptr inbounds i8, i8* %63, i64 %65
store i8 0, i8* %66
%67 = load i32, i32* %7
%68 = icmp sge i32 %67, 5
br i1 %68, label %69, label %143
69: ; preds = %62
%70 = load i8*, i8** %2
%71 = load i32, i32* %3
%72 = sub nsw i32 %71, 1
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i8, i8* %70, i64 %73
%75 = load i8, i8* %74
%76 = sext i8 %75 to i32
%77 = load i8*, i8** %5
%78 = load i32, i32* %7
%79 = sub nsw i32 %78, 1
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %77, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp eq i32 %76, %83
br i1 %84, label %85, label %143
85: ; preds = %69
store i32 1, i32* %8
store i32 1, i32* %9
br label %86
86: ; preds = %131, %85
%87 = load i32, i32* %8
%88 = load i32, i32* %7
%89 = sub nsw i32 %88, 1
%90 = icmp slt i32 %87, %89
br i1 %90, label %91, label %96
91: ; preds = %86
%92 = load i32, i32* %9
%93 = load i32, i32* %3
%94 = sub nsw i32 %93, 1
%95 = icmp slt i32 %92, %94
br label %96
96: ; preds = %91, %86
%97 = phi i1 [ false, %86 ], [ %95, %91 ]
br i1 %97, label %98, label %134
98: ; preds = %96
%99 = load i8*, i8** %5
%100 = load i32, i32* %8
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8, i8* %99, i64 %101
%103 = load i8, i8* %102
%104 = sext i8 %103 to i32
%105 = load i8*, i8** %2
%106 = load i32, i32* %9
%107 = sext i32 %106 to i64
%108 = getelementptr inbounds i8, i8* %105, i64 %107
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp eq i32 %104, %110
br i1 %111, label %127, label %112
112: ; preds = %98
%113 = load i8*, i8** %5
%114 = load i32, i32* %8
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %113, i64 %115
%117 = load i8, i8* %116
%118 = sext i8 %117 to i32
%119 = load i8*, i8** %2
%120 = load i32, i32* %9
%121 = sub nsw i32 %120, 1
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8, i8* %119, i64 %122
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp eq i32 %118, %125
br i1 %126, label %127, label %130
127: ; preds = %112, %98
%128 = load i32, i32* %8
%129 = add nsw i32 %128, 1
store i32 %129, i32* %8
br label %130
130: ; preds = %127, %112
br label %131
131: ; preds = %130
%132 = load i32, i32* %9
%133 = add nsw i32 %132, 1
store i32 %133, i32* %9
br label %86
134: ; preds = %96
%135 = load i32, i32* %8
%136 = load i32, i32* %7
%137 = sub nsw i32 %136, 1
%138 = icmp sge i32 %135, %137
br i1 %138, label %139, label %142
139: ; preds = %134
%140 = load i8*, i8** %5
%141 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %140)
br label %142
142: ; preds = %139, %134
br label %143
143: ; preds = %142, %69, %62
store i32 0, i32* %7
br label %203
144: ; preds = %56
%145 = load i8, i8* %6
%146 = sext i8 %145 to i32
%147 = icmp sge i32 %146, 97
br i1 %147, label %148, label %202
148: ; preds = %144
%149 = load i8, i8* %6
%150 = sext i8 %149 to i32
%151 = icmp sle i32 %150, 122
br i1 %151, label %152, label %202
152: ; preds = %148
%153 = load i32, i32* %7
%154 = icmp sge i32 %153, 0
br i1 %154, label %155, label %202
155: ; preds = %152
%156 = load i32, i32* %7
%157 = icmp eq i32 %156, 0
br i1 %157, label %158, label %183
158: ; preds = %155
%159 = load i8, i8* %6
%160 = sext i8 %159 to i32
%161 = load i8*, i8** %2
%162 = load i8, i8* %161
%163 = sext i8 %162 to i32
%164 = icmp eq i32 %160, %163
br i1 %164, label %165, label %172
165: ; preds = %158
%166 = load i8, i8* %6
%167 = load i8*, i8** %5
%168 = load i32, i32* %7
%169 = add nsw i32 %168, 1
store i32 %169, i32* %7
%170 = sext i32 %168 to i64
%171 = getelementptr inbounds i8, i8* %167, i64 %170
store i8 %166, i8* %171
br label %182
172: ; preds = %158
%173 = load i8, i8* %6
%174 = sext i8 %173 to i32
%175 = load i8*, i8** %2
%176 = load i8, i8* %175
%177 = sext i8 %176 to i32
%178 = icmp sgt i32 %174, %177
br i1 %178, label %179, label %180
179: ; preds = %172
br label %210
180: ; preds = %172
store i32 -1, i32* %7
br label %181
181: ; preds = %180
br label %182
182: ; preds = %181, %165
br label %201
183: ; preds = %155
%184 = load i64, i64* %4
%185 = load i8, i8* %6
%186 = sext i8 %185 to i32
%187 = sub nsw i32 %186, 97
%188 = zext i32 %187 to i64
%189 = shl i64 1, %188
%190 = and i64 %184, %189
%191 = icmp ne i64 %190, 0
br i1 %191, label %192, label %199
192: ; preds = %183
%193 = load i8, i8* %6
%194 = load i8*, i8** %5
%195 = load i32, i32* %7
%196 = add nsw i32 %195, 1
store i32 %196, i32* %7
%197 = sext i32 %195 to i64
%198 = getelementptr inbounds i8, i8* %194, i64 %197
store i8 %193, i8* %198
br label %200
199: ; preds = %183
store i32 -1, i32* %7
br label %200
200: ; preds = %199, %192
br label %201
201: ; preds = %200, %182
br label %202
202: ; preds = %201, %152, %148, %144
br label %203
203: ; preds = %202, %143
br label %204
204: ; preds = %203
%205 = load i8, i8* %6
%206 = sext i8 %205 to i32
%207 = load i8, i8* @EOF
%208 = sext i8 %207 to i32
%209 = icmp ne i32 %206, %208
br i1 %209, label %50, label %210
210: ; preds = %204, %179
%211 = call i64 (...) @clock()
%212 = load i64, i64* %10
%213 = sub nsw i64 %211, %212
%214 = sitofp i64 %213 to double
%215 = load double, double* @CLOCKS_PER_SEC
%216 = fdiv double %214, %215
%217 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), double %216)
%218 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str.6, i64 0, i64 0))
br label %16
219: ; preds = %16
%220 = load i32*, i32** %11
%221 = call i32 @fclose(i32* %220)
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"enable1.txt\00"
@.str.1 = [2 x i8] c"r\00"
@.str.3 = [3 x i8] c"%s\00"
@EOF = global i8 0
@SEEK_SET = global i32 0
@.str.5 = [9 x i8] c"(%f sec)\00"
@CLOCKS_PER_SEC = global double 0.000000e+00
@str = [39 x i8] c"Input SWYPE string or Ctrl+D for exit:\00"
@str.7 = [52 x i8] c"\0AInput another one SWYPE string or Ctrl+D for exit:\00"
define i32 @main() {
%1 = tail call i64 @malloc(i32 80)
%2 = inttoptr i64 %1 to i8*
%3 = tail call i32* @fopen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%5 = tail call signext i8 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* undef)
%6 = load i8, i8* @EOF
%7 = icmp eq i8 %5, %6
br i1 %7, label %40, label %8
8: ; preds = %0, %29
%9 = tail call i64 (...) @clock()
%10 = tail call i32 @strlen(i8* undef)
%11 = load i32, i32* @SEEK_SET
%12 = tail call i32 @fseek(i32* %3, i32 0, i32 %11)
br label %13
13: ; preds = %22, %8
%14 = tail call signext i8 @getc(i32* %3)
%15 = icmp eq i8 %14, 10
%16 = load i8, i8* @EOF
%17 = icmp eq i8 %14, %16
%18 = select i1 %15, i1 true, i1 %17
br i1 %18, label %19, label %23
19: ; preds = %13
store i8 0, i8* %2
%20 = load i8, i8* @EOF
%21 = icmp eq i8 %14, %20
br i1 %21, label %29, label %22
22: ; preds = %19, %23
br label %13
23: ; preds = %13
%24 = add i8 %14, -97
%25 = icmp ult i8 %24, 26
%26 = load i8, i8* @EOF
%27 = icmp eq i8 %14, %26
%28 = select i1 %25, i1 true, i1 %27
br i1 %28, label %29, label %22
29: ; preds = %23, %19
%30 = tail call i64 (...) @clock()
%31 = sub nsw i64 %30, %9
%32 = sitofp i64 %31 to double
%33 = load double, double* @CLOCKS_PER_SEC
%34 = fdiv double %32, %33
%35 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), double %34)
%36 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([52 x i8], [52 x i8]* @str.7, i64 0, i64 0))
%37 = tail call signext i8 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i8* undef)
%38 = load i8, i8* @EOF
%39 = icmp eq i8 %37, %38
br i1 %39, label %40, label %8
40: ; preds = %29, %0
%41 = tail call i32 @fclose(i32* %3)
ret i32 0
}