#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*/ assert(int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, ...);
int /*<<< orphan*/ free(char *);
scalar_t__ isalpha(char);
char *malloc(int);
int /*<<< orphan*/ stderr;
char *strdup(char *);
int strlen(char *);
char *read_fasta(char *fname) {
  char *seq;
  char buf[1024];
  int upto = 0;
  char *name = NULL;
  FILE *f = fopen(fname, "r");
  if (!f) {
    fprintf(stderr, "Unable to open sequence file '%s'.  Exiting...\n", fname);
    exit(1);
  }
  seq = malloc(100000);
  assert(seq && "Out of memory");
  while (!feof(f)) {
    int i;
    if (!fgets(buf, 1024, f))
      break;
    if (buf[0] != '>')
      continue;
    for (i = 1; buf[i] && buf[i] == ' '; i++)
      ;
    if (buf[strlen(buf) - 1] == '\n')
      buf[strlen(buf) - 1] = 0;
    name = strdup(buf + i);
    break;
  }
  if (!name) {
    fprintf(stderr,
            "Unable to find fasta header line in file '%s'. Exiting...\n",
            fname);
    exit(1);
  }
  while (!feof(f)) {
    int len;
    int i;
    if (!fgets(buf, 1024, f))
      break;
    len = strlen(buf);
    for (i = 0; i < len; i++)
      if (isalpha(buf[i])) {
        assert(upto < 100000 && "Sequence too long");
        seq[upto++] = buf[i];
      }
  }
  seq[upto] = 0;
  fprintf(stderr, "Sequence '%s': length=%d.\n", name, upto);
  free(name);
  fclose(f);
  return seq;
}


x86 assembly (clang, -O0):
<read_fasta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x440,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x414(%rbp)
movq   $0x0,-0x420(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe11(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x428(%rbp)
cmpq   $0x0,-0x428(%rbp)
jne    122e <read_fasta+0x6e>
mov    0x2dd0(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xde5(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    $0x186a0,%edi
call   10a0 <malloc@plt>
mov    %rax,-0x10(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x435(%rbp)
je     125c <read_fasta+0x9c>
mov    $0x1,%al
mov    %al,-0x435(%rbp)
jmp    125c <read_fasta+0x9c>
mov    -0x435(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x428(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    128d <read_fasta+0xcd>
jmp    1391 <read_fasta+0x1d1>
lea    -0x410(%rbp),%rdi
mov    -0x428(%rbp),%rdx
mov    $0x400,%esi
call   1060 <fgets@plt>
cmp    $0x0,%eax
jne    12b3 <read_fasta+0xf3>
jmp    1391 <read_fasta+0x1d1>
movsbl -0x410(%rbp),%eax
cmp    $0x3e,%eax
je     12c8 <read_fasta+0x108>
jmp    126c <read_fasta+0xac>
movl   $0x1,-0x42c(%rbp)
movslq -0x42c(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%ecx
ff
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x436(%rbp)
je     130d <read_fasta+0x14d>
movslq -0x42c(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x436(%rbp)
mov    -0x436(%rbp),%al
test   $0x1,%al
jne    1320 <read_fasta+0x160>
jmp    1339 <read_fasta+0x179>
jmp    1325 <read_fasta+0x165>
mov    -0x42c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x42c(%rbp)
jmp    12d2 <read_fasta+0x112>
lea    -0x410(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movsbl -0x410(%rbp,%rax,1),%eax
ff
cmp    $0xa,%eax
jne    1374 <read_fasta+0x1b4>
lea    -0x410(%rbp),%rdi
call   1050 <strlen@plt>
sub    $0x1,%eax
cltq
movb   $0x0,-0x410(%rbp,%rax,1)
lea    -0x410(%rbp),%rdi
movslq -0x42c(%rbp),%rax
add    %rax,%rdi
call   10e0 <strdup@plt>
mov    %rax,-0x420(%rbp)
cmpq   $0x0,-0x420(%rbp)
jne    13c4 <read_fasta+0x204>
mov    0x2c3a(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xc8d(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
jmp    13c9 <read_fasta+0x209>
mov    -0x428(%rbp),%rdi
call   1090 <feof@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    13ea <read_fasta+0x22a>
jmp    14d8 <read_fasta+0x318>
lea    -0x410(%rbp),%rdi
mov    -0x428(%rbp),%rdx
mov    $0x400,%esi
call   1060 <fgets@plt>
cmp    $0x0,%eax
jne    1410 <read_fasta+0x250>
jmp    14d8 <read_fasta+0x318>
lea    -0x410(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x430(%rbp)
movl   $0x0,-0x434(%rbp)
mov    -0x434(%rbp),%eax
cmp    -0x430(%rbp),%eax
jge    14d3 <read_fasta+0x313>
movslq -0x434(%rbp),%rax
movsbl -0x410(%rbp,%rax,1),%edi
ff
call   10b0 <isalpha@plt>
cmp    $0x0,%rax
je     14ba <read_fasta+0x2fa>
xor    %eax,%eax
cmpl   $0x186a0,-0x414(%rbp)
mov    %al,-0x437(%rbp)
jge    1481 <read_fasta+0x2c1>
mov    $0x1,%al
mov    %al,-0x437(%rbp)
jmp    1481 <read_fasta+0x2c1>
mov    -0x437(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
movslq -0x434(%rbp),%rax
mov    -0x410(%rbp,%rax,1),%dl
mov    -0x10(%rbp),%rax
mov    -0x414(%rbp),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,-0x414(%rbp)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
jmp    14bf <read_fasta+0x2ff>
mov    -0x434(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x434(%rbp)
jmp    142c <read_fasta+0x26c>
jmp    13c9 <read_fasta+0x209>
mov    -0x10(%rbp),%rax
movslq -0x414(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    0x2af2(%rip),%rax
mov    (%rax),%edi
mov    -0x420(%rbp),%rdx
mov    -0x414(%rbp),%ecx
lea    0xb89(%rip),%rsi
mov    $0x0,%al
call   1080 <fprintf@plt>
mov    -0x420(%rbp),%rdi
call   1030 <free@plt>
mov    -0x428(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x440,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_fasta>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x418,%rsp
mov    %rdi,%r12
lea    0xe25(%rip),%rsi
call   10c0 <fopen@plt>
test   %rax,%rax
je     13b1 <read_fasta+0x1f1>
mov    %rax,%r14
mov    $0x186a0,%edi
call   10a0 <malloc@plt>
mov    %rax,%r13
xor    %edi,%edi
test   %rax,%rax
setne  %dil
call   1070 <assert@plt>
lea    0x10(%rsp),%r15
nopl   0x0(%rax)
mov    %r14,%rdi
call   1090 <feof@plt>
test   %eax,%eax
jne    138d <read_fasta+0x1cd>
mov    %r15,%rdi
mov    $0x400,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %eax,%eax
je     138d <read_fasta+0x1cd>
cmpb   $0x3e,0x10(%rsp)
jne    1210 <read_fasta+0x50>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
cmpb   $0x20,0x11(%rsp,%rax,1)
lea    0x1(%rax),%rax
je     1250 <read_fasta+0x90>
mov    %eax,%eax
lea    (%rsp,%rax,1),%rbx
add    $0x10,%rbx
mov    %r15,%rdi
call   1050 <strlen@plt>
cltq
cmpb   $0xa,-0x1(%rax,%r15,1)
jne    1287 <read_fasta+0xc7>
mov    %r15,%rdi
call   1050 <strlen@plt>
cltq
movb   $0x0,-0x1(%rax,%r15,1)
mov    %rbx,%rdi
call   10e0 <strdup@plt>
mov    %rax,0x8(%rsp)
test   %rax,%rax
je     138d <read_fasta+0x1cd>
mov    %r14,%rdi
call   1090 <feof@plt>
xor    %ebx,%ebx
test   %eax,%eax
je     12f8 <read_fasta+0x138>
movslq %ebx,%rcx
movb   $0x0,0x0(%r13,%rcx,1)
mov    0x2d25(%rip),%rax
mov    (%rax),%edi
lea    0xda9(%rip),%rsi
mov    0x8(%rsp),%rbx
mov    %rbx,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1040 <fclose@plt>
mov    %r13,%rax
add    $0x418,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
lea    0x10(%rsp),%r12
jmp    131c <read_fasta+0x15c>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1090 <feof@plt>
test   %eax,%eax
jne    12ab <read_fasta+0xeb>
mov    %r12,%rdi
mov    $0x400,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %eax,%eax
je     12ab <read_fasta+0xeb>
mov    %r12,%rdi
call   1050 <strlen@plt>
test   %eax,%eax
jle    1310 <read_fasta+0x150>
mov    %eax,%ebp
xor    %r15d,%r15d
jmp    1359 <read_fasta+0x199>
nopw   0x0(%rax,%rax,1)
add    $0x1,%r15
cmp    %r15,%rbp
je     1310 <read_fasta+0x150>
movsbl 0x10(%rsp,%r15,1),%edi
call   10b0 <isalpha@plt>
test   %rax,%rax
je     1350 <read_fasta+0x190>
xor    %edi,%edi
cmp    $0x186a0,%ebx
setl   %dil
call   1070 <assert@plt>
movzbl 0x10(%rsp,%r15,1),%eax
movslq %ebx,%rcx
add    $0x1,%ebx
mov    %al,0x0(%r13,%rcx,1)
jmp    1350 <read_fasta+0x190>
mov    0x2c4c(%rip),%rax
mov    (%rax),%edi
lea    0xc95(%rip),%rsi
mov    %r12,%rdx
xor    %eax,%eax
call   1080 <fprintf@plt>
mov    $0x1,%edi
call   10d0 <exit@plt>
mov    0x2c28(%rip),%rax
mov    (%rax),%edi
lea    0xc41(%rip),%rsi
jmp    139d <read_fasta+0x1dd>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [48 x i8] c"Unable to open sequence file '%s'. Exiting...\0A\00"
@.str.2 = [14 x i8] c"Out of memory\00"
@.str.3 = [59 x i8] c"Unable to find fasta header line in file '%s'. Exiting...\0A\00"
@.str.4 = [18 x i8] c"Sequence too long\00"
@.str.5 = [27 x i8] c"Sequence '%s': length=%d.\0A\00"
define i8* @read_fasta(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [1024 x i8]
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %5
store i8* null, i8** %6
%11 = load i8*, i8** %2
%12 = call i32* @fopen(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %12, i32** %7
%13 = load i32*, i32** %7
%14 = icmp ne i32* %13, null
br i1 %14, label %20, label %15
15: ; preds = %1
%16 = load i32, i32* @stderr
%17 = load i8*, i8** %2
%18 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = call i32 @exit(i32 1)
unreachable
20: ; preds = %1
%21 = call i8* @malloc(i32 100000)
store i8* %21, i8** %3
%22 = load i8*, i8** %3
%23 = icmp ne i8* %22, null
br i1 %23, label %24, label %25
24: ; preds = %20
br label %25
25: ; preds = %24, %20
%26 = phi i1 [ false, %20 ], [ true, %24 ]
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
br label %29
29: ; preds = %45, %25
%30 = load i32*, i32** %7
%31 = call i32 @feof(i32* %30)
%32 = icmp ne i32 %31, 0
%33 = xor i1 %32, true
br i1 %33, label %34, label %88
34: ; preds = %29
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%36 = load i32*, i32** %7
%37 = call i32 @fgets(i8* %35, i32 1024, i32* %36)
%38 = icmp ne i32 %37, 0
br i1 %38, label %40, label %39
39: ; preds = %34
br label %88
40: ; preds = %34
%41 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp ne i32 %43, 62
br i1 %44, label %45, label %46
45: ; preds = %40
br label %29
46: ; preds = %40
store i32 1, i32* %8
br label %47
47: ; preds = %64, %46
%48 = load i32, i32* %8
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %49
%51 = load i8, i8* %50
%52 = sext i8 %51 to i32
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %61
54: ; preds = %47
%55 = load i32, i32* %8
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %56
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp eq i32 %59, 32
br label %61
61: ; preds = %54, %47
%62 = phi i1 [ false, %47 ], [ %60, %54 ]
br i1 %62, label %63, label %67
63: ; preds = %61
br label %64
64: ; preds = %63
%65 = load i32, i32* %8
%66 = add nsw i32 %65, 1
store i32 %66, i32* %8
br label %47
67: ; preds = %61
%68 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%69 = call i32 @strlen(i8* %68)
%70 = sub nsw i32 %69, 1
%71 = sext i32 %70 to i64
%72 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %71
%73 = load i8, i8* %72
%74 = sext i8 %73 to i32
%75 = icmp eq i32 %74, 10
br i1 %75, label %76, label %82
76: ; preds = %67
%77 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%78 = call i32 @strlen(i8* %77)
%79 = sub nsw i32 %78, 1
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %80
store i8 0, i8* %81
br label %82
82: ; preds = %76, %67
%83 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%84 = load i32, i32* %8
%85 = sext i32 %84 to i64
%86 = getelementptr inbounds i8, i8* %83, i64 %85
%87 = call i8* @strdup(i8* %86)
store i8* %87, i8** %6
br label %88
88: ; preds = %82, %39, %29
%89 = load i8*, i8** %6
%90 = icmp ne i8* %89, null
br i1 %90, label %96, label %91
91: ; preds = %88
%92 = load i32, i32* @stderr
%93 = load i8*, i8** %2
%94 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0), i8* %93)
%95 = call i32 @exit(i32 1)
unreachable
96: ; preds = %88
br label %97
97: ; preds = %143, %96
%98 = load i32*, i32** %7
%99 = call i32 @feof(i32* %98)
%100 = icmp ne i32 %99, 0
%101 = xor i1 %100, true
br i1 %101, label %102, label %144
102: ; preds = %97
%103 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%104 = load i32*, i32** %7
%105 = call i32 @fgets(i8* %103, i32 1024, i32* %104)
%106 = icmp ne i32 %105, 0
br i1 %106, label %108, label %107
107: ; preds = %102
br label %144
108: ; preds = %102
%109 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%110 = call i32 @strlen(i8* %109)
store i32 %110, i32* %9
store i32 0, i32* %10
br label %111
111: ; preds = %140, %108
%112 = load i32, i32* %10
%113 = load i32, i32* %9
%114 = icmp slt i32 %112, %113
br i1 %114, label %115, label %143
115: ; preds = %111
%116 = load i32, i32* %10
%117 = sext i32 %116 to i64
%118 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %117
%119 = load i8, i8* %118
%120 = call i64 @isalpha(i8 signext %119)
%121 = icmp ne i64 %120, 0
br i1 %121, label %122, label %139
122: ; preds = %115
%123 = load i32, i32* %5
%124 = icmp slt i32 %123, 100000
br i1 %124, label %125, label %126
125: ; preds = %122
br label %126
126: ; preds = %125, %122
%127 = phi i1 [ false, %122 ], [ true, %125 ]
%128 = zext i1 %127 to i32
%129 = call i32 @assert(i32 %128)
%130 = load i32, i32* %10
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 %131
%133 = load i8, i8* %132
%134 = load i8*, i8** %3
%135 = load i32, i32* %5
%136 = add nsw i32 %135, 1
store i32 %136, i32* %5
%137 = sext i32 %135 to i64
%138 = getelementptr inbounds i8, i8* %134, i64 %137
store i8 %133, i8* %138
br label %139
139: ; preds = %126, %115
br label %140
140: ; preds = %139
%141 = load i32, i32* %10
%142 = add nsw i32 %141, 1
store i32 %142, i32* %10
br label %111
143: ; preds = %111
br label %97
144: ; preds = %107, %97
%145 = load i8*, i8** %3
%146 = load i32, i32* %5
%147 = sext i32 %146 to i64
%148 = getelementptr inbounds i8, i8* %145, i64 %147
store i8 0, i8* %148
%149 = load i32, i32* @stderr
%150 = load i8*, i8** %6
%151 = load i32, i32* %5
%152 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %149, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i8* %150, i32 %151)
%153 = load i8*, i8** %6
%154 = call i32 @free(i8* %153)
%155 = load i32*, i32** %7
%156 = call i32 @fclose(i32* %155)
%157 = load i8*, i8** %3
ret i8* %157
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@stderr = global i32 0
@.str.1 = [48 x i8] c"Unable to open sequence file '%s'. Exiting...\0A\00"
@.str.3 = [59 x i8] c"Unable to find fasta header line in file '%s'. Exiting...\0A\00"
@.str.5 = [27 x i8] c"Sequence '%s': length=%d.\0A\00"
define noalias i8* @read_fasta(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i32* %4, null
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 (i32, i8*, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %1
%11 = tail call dereferenceable_or_null(100000) i8* @malloc(i32 100000)
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = tail call i32 @assert(i32 %13)
br label %15
15: ; preds = %21, %10
%16 = call i32 @feof(i32* %4)
%17 = icmp eq i32 %16, 0
br i1 %17, label %18, label %50
18: ; preds = %15
%19 = call i32 @fgets(i8* %3, i32 1024, i32* %4)
%20 = icmp eq i32 %19, 0
br i1 %20, label %50, label %21
21: ; preds = %18
%22 = load i8, i8* %3
%23 = icmp eq i8 %22, 62
br i1 %23, label %24, label %15
24: ; preds = %21, %24
%25 = phi i64 [ %29, %24 ], [ 1, %21 ]
%26 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %25
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 32
%29 = add nuw i64 %25, 1
br i1 %28, label %24, label %30
30: ; preds = %24
%31 = and i64 %25, 4294967295
%32 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %31
%33 = call i32 @strlen(i8* %3)
%34 = add nsw i32 %33, -1
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %35
%37 = load i8, i8* %36
%38 = icmp eq i8 %37, 10
br i1 %38, label %39, label %44
39: ; preds = %30
%40 = call i32 @strlen(i8* %3)
%41 = add nsw i32 %40, -1
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %42
store i8 0, i8* %43
br label %44
44: ; preds = %30, %39
%45 = call i8* @strdup(i8* %32)
%46 = icmp eq i8* %45, null
br i1 %46, label %50, label %47
47: ; preds = %44
%48 = call i32 @feof(i32* %4)
%49 = icmp eq i32 %48, 0
br i1 %49, label %58, label %86
50: ; preds = %18, %15, %44
%51 = load i32, i32* @stderr
%52 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %51, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%53 = call i32 @exit(i32 1)
unreachable
54: ; preds = %82, %62
%55 = phi i32 [ %59, %62 ], [ %83, %82 ]
%56 = call i32 @feof(i32* %4)
%57 = icmp eq i32 %56, 0
br i1 %57, label %58, label %86
58: ; preds = %47, %54
%59 = phi i32 [ %55, %54 ], [ 0, %47 ]
%60 = call i32 @fgets(i8* %3, i32 1024, i32* %4)
%61 = icmp eq i32 %60, 0
br i1 %61, label %86, label %62
62: ; preds = %58
%63 = call i32 @strlen(i8* %3)
%64 = icmp sgt i32 %63, 0
br i1 %64, label %65, label %54
65: ; preds = %62
%66 = zext i32 %63 to i64
br label %67
67: ; preds = %65, %82
%68 = phi i64 [ 0, %65 ], [ %84, %82 ]
%69 = phi i32 [ %59, %65 ], [ %83, %82 ]
%70 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 %68
%71 = load i8, i8* %70
%72 = call i64 @isalpha(i8 signext %71)
%73 = icmp eq i64 %72, 0
br i1 %73, label %82, label %74
74: ; preds = %67
%75 = icmp slt i32 %69, 100000
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76)
%78 = load i8, i8* %70
%79 = add nsw i32 %69, 1
%80 = sext i32 %69 to i64
%81 = getelementptr inbounds i8, i8* %11, i64 %80
store i8 %78, i8* %81
br label %82
82: ; preds = %67, %74
%83 = phi i32 [ %79, %74 ], [ %69, %67 ]
%84 = add nuw nsw i64 %68, 1
%85 = icmp eq i64 %84, %66
br i1 %85, label %54, label %67
86: ; preds = %54, %58, %47
%87 = phi i32 [ 0, %47 ], [ %59, %58 ], [ %55, %54 ]
%88 = sext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %11, i64 %88
store i8 0, i8* %89
%90 = load i32, i32* @stderr
%91 = call i32 (i32, i8*, i8*, ...) @fprintf(i32 %90, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.5, i64 0, i64 0), i8* %45, i32 %87)
%92 = call i32 @free(i8* %45)
%93 = call i32 @fclose(i32* %4)
ret i8* %11
}