#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ free(char *);
char *get_line(int /*<<< orphan*/ *);
scalar_t__ isspace(int);
scalar_t__ space(int);
int /*<<< orphan*/ sscanf(char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
char *strdup(char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
scalar_t__ xrealloc(char *, int);
int read_clustal(FILE *clust, char *AlignedSeqs[], char *names[]) {
  char *line, name[100] = "", *seq;
  int n, nn = 0, num_seq = 0;
  if ((line = get_line(clust)) == NULL) {
    fprintf(stderr, "Empty CLUSTAL file\n");
    return 0;
  }
  if (strncmp(line, "CLUSTAL", 7) != 0) {
    fprintf(stderr, "This doesn't look like a CLUSTAL file, sorry\n");
    free(line);
    return 0;
  }
  free(line);
  line = get_line(clust);
  while (line != NULL) {
    if (((n = strlen(line)) < 4) || isspace((int)line[0])) {
      free(line);
      line = get_line(clust);
      nn = 0;
      continue;
    }
    seq = (char *)space((n + 1) * sizeof(char));
    sscanf(line, "%99s %s", name, seq);
    if (nn == num_seq) {
      names[nn] = strdup(name);
      AlignedSeqs[nn] = strdup(seq);
    } else {
      if (strcmp(name, names[nn]) != 0) {
        fprintf(stderr,
                "Sorry, your file is fucked up (inconsitent seq-names)\n");
        free(line);
        free(seq);
        return 0;
      }
      AlignedSeqs[nn] = (char *)xrealloc(
          AlignedSeqs[nn], strlen(seq) + strlen(AlignedSeqs[nn]) + 1);
      strcat(AlignedSeqs[nn], seq);
    }
    nn++;
    if (nn > num_seq)
      num_seq = nn;
    free(seq);
    free(line);
    if (num_seq >= 500) {
      fprintf(stderr, "Too many sequences in CLUSTAL file");
      return 0;
    }
    line = get_line(clust);
  }
  AlignedSeqs[num_seq] = NULL;
  names[num_seq] = NULL;
  if (num_seq == 0) {
    fprintf(stderr, "No sequences found in CLSUATL file\n");
    return 0;
  }
  n = strlen(AlignedSeqs[0]);
  for (nn = 1; nn < num_seq; nn++) {
    if (strlen(AlignedSeqs[nn]) != n) {
      fprintf(stderr, "Sorry, your file is fucked up.\n"
                      "Unequal lengths!\n\n");
      return 0;
    }
  }
  fprintf(stderr, "%d sequences; length of alignment %d.\n", nn, n);
  return num_seq;
}


x86 assembly (clang, -O0):
<read_clustal>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
lea    -0x90(%rbp),%rdi
xor    %esi,%esi
mov    $0x64,%edx
call   1090 <memset@plt>
movl   $0x0,-0xa0(%rbp)
movl   $0x0,-0xa4(%rbp)
mov    -0x10(%rbp),%rdi
call   1060 <get_line@plt>
mov    %rax,-0x28(%rbp)
cmp    $0x0,%rax
jne    1248 <read_clustal+0x78>
mov    0x2db4(%rip),%rax
mov    (%rax),%edi
lea    0xdcb(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1605 <read_clustal+0x435>
mov    -0x28(%rbp),%rdi
lea    0xdc1(%rip),%rsi
mov    $0x7,%edx
call   1050 <strncmp@plt>
cmp    $0x0,%rax
je     1293 <read_clustal+0xc3>
mov    0x2d72(%rip),%rax
mov    (%rax),%edi
lea    0xda5(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    1605 <read_clustal+0x435>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1060 <get_line@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     14f9 <read_clustal+0x329>
mov    -0x28(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x9c(%rbp)
cmp    $0x4,%eax
jl     12e2 <read_clustal+0x112>
mov    -0x28(%rbp),%rax
movsbl (%rax),%edi
call   10a0 <isspace@plt>
cmp    $0x0,%rax
je     1307 <read_clustal+0x137>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1060 <get_line@plt>
mov    %rax,-0x28(%rbp)
movl   $0x0,-0xa0(%rbp)
jmp    12a9 <read_clustal+0xd9>
mov    -0x9c(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <space@plt>
mov    %rax,-0x98(%rbp)
mov    -0x28(%rbp),%rdi
lea    -0x90(%rbp),%rdx
mov    -0x98(%rbp),%rcx
lea    0xd0d(%rip),%rsi
call   10d0 <sscanf@plt>
mov    -0xa0(%rbp),%eax
cmp    -0xa4(%rbp),%eax
jne    1395 <read_clustal+0x1c5>
lea    -0x90(%rbp),%rdi
call   10f0 <strdup@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x98(%rbp),%rdi
call   10f0 <strdup@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
jmp    1472 <read_clustal+0x2a2>
lea    -0x90(%rbp),%rdi
mov    -0x20(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   10b0 <strcmp@plt>
cmp    $0x0,%rax
je     13f2 <read_clustal+0x222>
mov    0x2c1f(%rip),%rax
mov    (%rax),%edi
lea    0xc88(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    1605 <read_clustal+0x435>
mov    -0x18(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0xb0(%rbp)
mov    -0x98(%rbp),%rdi
call   1070 <strlen@plt>
mov    %eax,-0xb4(%rbp)
mov    -0x18(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <strlen@plt>
mov    -0xb4(%rbp),%esi
mov    -0xb0(%rbp),%rdi
add    %eax,%esi
add    $0x1,%esi
call   1080 <xrealloc@plt>
mov    %rax,%rdx
mov    -0x18(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x18(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x98(%rbp),%rsi
call   10e0 <strcat@plt>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
cmp    -0xa4(%rbp),%eax
jle    149f <read_clustal+0x2cf>
mov    -0xa0(%rbp),%eax
mov    %eax,-0xa4(%rbp)
mov    -0x98(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
cmpl   $0x1f4,-0xa4(%rbp)
jl     14e7 <read_clustal+0x317>
mov    0x2b15(%rip),%rax
mov    (%rax),%edi
lea    0xbb5(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1605 <read_clustal+0x435>
mov    -0x10(%rbp),%rdi
call   1060 <get_line@plt>
mov    %rax,-0x28(%rbp)
jmp    12a9 <read_clustal+0xd9>
mov    -0x18(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
movslq -0xa4(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
cmpl   $0x0,-0xa4(%rbp)
jne    154f <read_clustal+0x37f>
mov    0x2aad(%rip),%rax
mov    (%rax),%edi
lea    0xb70(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1605 <read_clustal+0x435>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
call   1070 <strlen@plt>
mov    %eax,-0x9c(%rbp)
movl   $0x1,-0xa0(%rbp)
mov    -0xa0(%rbp),%eax
cmp    -0xa4(%rbp),%eax
jge    15d9 <read_clustal+0x409>
mov    -0x18(%rbp),%rax
movslq -0xa0(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1070 <strlen@plt>
cmp    -0x9c(%rbp),%eax
je     15c0 <read_clustal+0x3f0>
mov    0x2a3c(%rip),%rax
mov    (%rax),%edi
lea    0xb23(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1605 <read_clustal+0x435>
jmp    15c5 <read_clustal+0x3f5>
mov    -0xa0(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xa0(%rbp)
jmp    156b <read_clustal+0x39b>
mov    0x2a00(%rip),%rax
mov    (%rax),%edi
mov    -0xa0(%rbp),%edx
mov    -0x9c(%rbp),%ecx
lea    0xb0d(%rip),%rsi
mov    $0x0,%al
call   10c0 <fprintf@plt>
mov    -0xa4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_clustal>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x88,%rsp
mov    %rdx,%rbx
mov    %rsi,%r14
mov    %rdi,%r13
xorps  %xmm0,%xmm0
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movl   $0x0,0x80(%rsp)
call   1060 <get_line@plt>
test   %rax,%rax
je     1253 <read_clustal+0x93>
mov    %rax,%rbp
lea    0xdfa(%rip),%rsi
mov    %rax,%rdi
mov    $0x7,%edx
call   1050 <strncmp@plt>
test   %rax,%rax
je     1268 <read_clustal+0xa8>
mov    0x2dad(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
xor    %r12d,%r12d
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
jmp    147e <read_clustal+0x2be>
mov    0x2d86(%rip),%rax
mov    (%rax),%edi
lea    0xd9d(%rip),%rsi
jmp    1474 <read_clustal+0x2b4>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1060 <get_line@plt>
test   %rax,%rax
je     1456 <read_clustal+0x296>
mov    %rax,%rbp
mov    %rbx,0x8(%rsp)
xor    %r12d,%r12d
xor    %ebx,%ebx
mov    %ebx,%r15d
jmp    12bf <read_clustal+0xff>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %rbp,%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1060 <get_line@plt>
mov    %rax,%rbp
xor    %r15d,%r15d
test   %rax,%rax
je     13d8 <read_clustal+0x218>
mov    %rbp,%rdi
call   1070 <strlen@plt>
cmp    $0x4,%eax
jl     12a0 <read_clustal+0xe0>
mov    %eax,%ebx
movsbl 0x0(%rbp),%edi
call   1090 <isspace@plt>
test   %rax,%rax
jne    12a0 <read_clustal+0xe0>
add    $0x1,%ebx
mov    %ebx,%edi
call   1040 <space@plt>
mov    %rbp,%rdi
lea    0xd5a(%rip),%rsi
lea    0x20(%rsp),%rdx
mov    %rax,%rbx
mov    %rax,%rcx
call   10c0 <sscanf@plt>
cmp    %r12d,%r15d
jne    1331 <read_clustal+0x171>
lea    0x20(%rsp),%rdi
call   10e0 <strdup@plt>
movslq %r12d,%rdx
mov    %rdx,(%rsp)
mov    0x8(%rsp),%rcx
mov    %rax,(%rcx,%rdx,8)
mov    %rbx,%rdi
call   10e0 <strdup@plt>
mov    (%rsp),%rcx
mov    %rax,(%r14,%rcx,8)
jmp    139c <read_clustal+0x1dc>
mov    %rbx,(%rsp)
movslq %r15d,%rbx
mov    0x8(%rsp),%rax
mov    (%rax,%rbx,8),%rsi
lea    0x20(%rsp),%rdi
call   10a0 <strcmp@plt>
test   %rax,%rax
jne    14b7 <read_clustal+0x2f7>
mov    (%r14,%rbx,8),%rax
mov    %rax,0x18(%rsp)
mov    (%rsp),%rdi
call   1070 <strlen@plt>
mov    %rax,0x10(%rsp)
mov    (%r14,%rbx,8),%rdi
call   1070 <strlen@plt>
mov    0x10(%rsp),%rcx
lea    (%rcx,%rax,1),%esi
add    $0x1,%esi
mov    0x18(%rsp),%rdi
call   1080 <xrealloc@plt>
mov    %rax,(%r14,%rbx,8)
mov    %rax,%rdi
mov    (%rsp),%rbx
mov    %rbx,%rsi
call   10d0 <strcat@plt>
mov    %rbx,%rdi
lea    0x1(%r15),%ebx
cmp    %r12d,%r15d
cmovge %ebx,%r12d
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
cmp    $0x1f4,%r12d
jge    14a5 <read_clustal+0x2e5>
mov    %r13,%rdi
call   1060 <get_line@plt>
mov    %rax,%rbp
test   %rax,%rax
jne    128e <read_clustal+0xce>
movslq %r12d,%rax
movq   $0x0,(%r14,%rax,8)
mov    0x8(%rsp),%rcx
movq   $0x0,(%rcx,%rax,8)
test   %eax,%eax
je     1464 <read_clustal+0x2a4>
mov    (%r14),%rdi
call   1070 <strlen@plt>
mov    %eax,%r15d
mov    $0x1,%edx
cmp    $0x2,%r12d
jl     143a <read_clustal+0x27a>
mov    %r12d,%ebp
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    (%r14,%rbx,8),%rdi
call   1070 <strlen@plt>
cmp    %r15d,%eax
jne    1493 <read_clustal+0x2d3>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    1420 <read_clustal+0x260>
mov    %r12d,%edx
mov    0x2b9f(%rip),%rax
mov    (%rax),%edi
lea    0xcb8(%rip),%rsi
mov    %r15d,%ecx
xor    %eax,%eax
call   10b0 <fprintf@plt>
jmp    147e <read_clustal+0x2be>
movq   $0x0,(%r14)
movq   $0x0,(%rbx)
mov    0x2b75(%rip),%rax
mov    (%rax),%edi
lea    0xc38(%rip),%rsi
xor    %r12d,%r12d
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %r12d,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b46(%rip),%rax
mov    (%rax),%edi
lea    0xc2d(%rip),%rsi
jmp    1474 <read_clustal+0x2b4>
mov    0x2b34(%rip),%rax
mov    (%rax),%edi
lea    0xbd4(%rip),%rsi
jmp    1474 <read_clustal+0x2b4>
mov    0x2b22(%rip),%rax
mov    (%rax),%edi
lea    0xb8b(%rip),%rsi
xor    %r12d,%r12d
xor    %eax,%eax
call   10b0 <fprintf@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
mov    (%rsp),%rdi
call   1030 <free@plt>
jmp    147e <read_clustal+0x2be>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [20 x i8] c"Empty CLUSTAL file\0A\00"
@.str.1 = [8 x i8] c"CLUSTAL\00"
@.str.2 = [46 x i8] c"This doesn't look like a CLUSTAL file, sorry\0A\00"
@.str.3 = [8 x i8] c"%99s %s\00"
@.str.4 = [55 x i8] c"Sorry, your file is fucked up (inconsitent seq-names)\0A\00"
@.str.5 = [35 x i8] c"Too many sequences in CLUSTAL file\00"
@.str.6 = [36 x i8] c"No sequences found in CLSUATL file\0A\00"
@.str.7 = [50 x i8] c"Sorry, your file is fucked up.\0AUnequal lengths!\0A\0A\00"
@.str.8 = [39 x i8] c"%d sequences; length of alignment %d.\0A\00"
define i32 @read_clustal(i32* %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca [100 x i8]
%10 = alloca i8*
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%14 = bitcast [100 x i8]* %9 to i8*
store i32 0, i32* %12
store i32 0, i32* %13
%15 = load i32*, i32** %5
%16 = call i8* @get_line(i32* %15)
store i8* %16, i8** %8
%17 = icmp eq i8* %16, null
br i1 %17, label %18, label %21
18: ; preds = %3
%19 = load i32, i32* @stderr
%20 = call i32 (i32, i8*, ...) @fprintf(i32 %19, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %4
br label %193
21: ; preds = %3
%22 = load i8*, i8** %8
%23 = call i64 @strncmp(i8* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%24 = icmp ne i64 %23, 0
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i32, i32* @stderr
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %26, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%28 = load i8*, i8** %8
%29 = call i32 @free(i8* %28)
store i32 0, i32* %4
br label %193
30: ; preds = %21
%31 = load i8*, i8** %8
%32 = call i32 @free(i8* %31)
%33 = load i32*, i32** %5
%34 = call i8* @get_line(i32* %33)
store i8* %34, i8** %8
br label %35
35: ; preds = %145, %49, %30
%36 = load i8*, i8** %8
%37 = icmp ne i8* %36, null
br i1 %37, label %38, label %148
38: ; preds = %35
%39 = load i8*, i8** %8
%40 = call i32 @strlen(i8* %39)
store i32 %40, i32* %11
%41 = icmp slt i32 %40, 4
br i1 %41, label %49, label %42
42: ; preds = %38
%43 = load i8*, i8** %8
%44 = getelementptr inbounds i8, i8* %43, i64 0
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = call i64 @isspace(i32 %46)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %54
49: ; preds = %42, %38
%50 = load i8*, i8** %8
%51 = call i32 @free(i8* %50)
%52 = load i32*, i32** %5
%53 = call i8* @get_line(i32* %52)
store i8* %53, i8** %8
store i32 0, i32* %12
br label %35
54: ; preds = %42
%55 = load i32, i32* %11
%56 = add nsw i32 %55, 1
%57 = sext i32 %56 to i64
%58 = mul i64 %57, 1
%59 = trunc i64 %58 to i32
%60 = call i64 @space(i32 %59)
%61 = inttoptr i64 %60 to i8*
store i8* %61, i8** %10
%62 = load i8*, i8** %8
%63 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%64 = load i8*, i8** %10
%65 = call i32 @sscanf(i8* %62, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %63, i8* %64)
%66 = load i32, i32* %12
%67 = load i32, i32* %13
%68 = icmp eq i32 %66, %67
br i1 %68, label %69, label %82
69: ; preds = %54
%70 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%71 = call i8* @strdup(i8* %70)
%72 = load i8**, i8*** %7
%73 = load i32, i32* %12
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds i8*, i8** %72, i64 %74
store i8* %71, i8** %75
%76 = load i8*, i8** %10
%77 = call i8* @strdup(i8* %76)
%78 = load i8**, i8*** %6
%79 = load i32, i32* %12
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8*, i8** %78, i64 %80
store i8* %77, i8** %81
br label %127
82: ; preds = %54
%83 = getelementptr inbounds [100 x i8], [100 x i8]* %9, i64 0, i64 0
%84 = load i8**, i8*** %7
%85 = load i32, i32* %12
%86 = sext i32 %85 to i64
%87 = getelementptr inbounds i8*, i8** %84, i64 %86
%88 = load i8*, i8** %87
%89 = call i64 @strcmp(i8* %83, i8* %88)
%90 = icmp ne i64 %89, 0
br i1 %90, label %91, label %98
91: ; preds = %82
%92 = load i32, i32* @stderr
%93 = call i32 (i32, i8*, ...) @fprintf(i32 %92, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0))
%94 = load i8*, i8** %8
%95 = call i32 @free(i8* %94)
%96 = load i8*, i8** %10
%97 = call i32 @free(i8* %96)
store i32 0, i32* %4
br label %193
98: ; preds = %82
%99 = load i8**, i8*** %6
%100 = load i32, i32* %12
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8*, i8** %99, i64 %101
%103 = load i8*, i8** %102
%104 = load i8*, i8** %10
%105 = call i32 @strlen(i8* %104)
%106 = load i8**, i8*** %6
%107 = load i32, i32* %12
%108 = sext i32 %107 to i64
%109 = getelementptr inbounds i8*, i8** %106, i64 %108
%110 = load i8*, i8** %109
%111 = call i32 @strlen(i8* %110)
%112 = add nsw i32 %105, %111
%113 = add nsw i32 %112, 1
%114 = call i64 @xrealloc(i8* %103, i32 %113)
%115 = inttoptr i64 %114 to i8*
%116 = load i8**, i8*** %6
%117 = load i32, i32* %12
%118 = sext i32 %117 to i64
%119 = getelementptr inbounds i8*, i8** %116, i64 %118
store i8* %115, i8** %119
%120 = load i8**, i8*** %6
%121 = load i32, i32* %12
%122 = sext i32 %121 to i64
%123 = getelementptr inbounds i8*, i8** %120, i64 %122
%124 = load i8*, i8** %123
%125 = load i8*, i8** %10
%126 = call i32 @strcat(i8* %124, i8* %125)
br label %127
127: ; preds = %98, %69
%128 = load i32, i32* %12
%129 = add nsw i32 %128, 1
store i32 %129, i32* %12
%130 = load i32, i32* %12
%131 = load i32, i32* %13
%132 = icmp sgt i32 %130, %131
br i1 %132, label %133, label %135
133: ; preds = %127
%134 = load i32, i32* %12
store i32 %134, i32* %13
br label %135
135: ; preds = %133, %127
%136 = load i8*, i8** %10
%137 = call i32 @free(i8* %136)
%138 = load i8*, i8** %8
%139 = call i32 @free(i8* %138)
%140 = load i32, i32* %13
%141 = icmp sge i32 %140, 500
br i1 %141, label %142, label %145
142: ; preds = %135
%143 = load i32, i32* @stderr
%144 = call i32 (i32, i8*, ...) @fprintf(i32 %143, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
store i32 0, i32* %4
br label %193
145: ; preds = %135
%146 = load i32*, i32** %5
%147 = call i8* @get_line(i32* %146)
store i8* %147, i8** %8
br label %35
148: ; preds = %35
%149 = load i8**, i8*** %6
%150 = load i32, i32* %13
%151 = sext i32 %150 to i64
%152 = getelementptr inbounds i8*, i8** %149, i64 %151
store i8* null, i8** %152
%153 = load i8**, i8*** %7
%154 = load i32, i32* %13
%155 = sext i32 %154 to i64
%156 = getelementptr inbounds i8*, i8** %153, i64 %155
store i8* null, i8** %156
%157 = load i32, i32* %13
%158 = icmp eq i32 %157, 0
br i1 %158, label %159, label %162
159: ; preds = %148
%160 = load i32, i32* @stderr
%161 = call i32 (i32, i8*, ...) @fprintf(i32 %160, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %4
br label %193
162: ; preds = %148
%163 = load i8**, i8*** %6
%164 = getelementptr inbounds i8*, i8** %163, i64 0
%165 = load i8*, i8** %164
%166 = call i32 @strlen(i8* %165)
store i32 %166, i32* %11
store i32 1, i32* %12
br label %167
167: ; preds = %184, %162
%168 = load i32, i32* %12
%169 = load i32, i32* %13
%170 = icmp slt i32 %168, %169
br i1 %170, label %171, label %187
171: ; preds = %167
%172 = load i8**, i8*** %6
%173 = load i32, i32* %12
%174 = sext i32 %173 to i64
%175 = getelementptr inbounds i8*, i8** %172, i64 %174
%176 = load i8*, i8** %175
%177 = call i32 @strlen(i8* %176)
%178 = load i32, i32* %11
%179 = icmp ne i32 %177, %178
br i1 %179, label %180, label %183
180: ; preds = %171
%181 = load i32, i32* @stderr
%182 = call i32 (i32, i8*, ...) @fprintf(i32 %181, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
store i32 0, i32* %4
br label %193
183: ; preds = %171
br label %184
184: ; preds = %183
%185 = load i32, i32* %12
%186 = add nsw i32 %185, 1
store i32 %186, i32* %12
br label %167
187: ; preds = %167
%188 = load i32, i32* @stderr
%189 = load i32, i32* %12
%190 = load i32, i32* %11
%191 = call i32 (i32, i8*, ...) @fprintf(i32 %188, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i32 %189, i32 %190)
%192 = load i32, i32* %13
store i32 %192, i32* %4
br label %193
193: ; preds = %187, %180, %159, %142, %91, %25, %18
%194 = load i32, i32* %4
ret i32 %194
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [20 x i8] c"Empty CLUSTAL file\0A\00"
@.str.1 = [8 x i8] c"CLUSTAL\00"
@.str.2 = [46 x i8] c"This doesn't look like a CLUSTAL file, sorry\0A\00"
@.str.3 = [8 x i8] c"%99s %s\00"
@.str.4 = [55 x i8] c"Sorry, your file is fucked up (inconsitent seq-names)\0A\00"
@.str.5 = [35 x i8] c"Too many sequences in CLUSTAL file\00"
@.str.6 = [36 x i8] c"No sequences found in CLSUATL file\0A\00"
@.str.7 = [50 x i8] c"Sorry, your file is fucked up.\0AUnequal lengths!\0A\0A\00"
@.str.8 = [39 x i8] c"%d sequences; length of alignment %d.\0A\00"
define i32 @read_clustal(i32* %0, i8** nocapture %1, i8** nocapture %2) {
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%6 = tail call i8* @get_line(i32* %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %11
8: ; preds = %3
%9 = load i32, i32* @stderr
%10 = tail call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
br label %120
11: ; preds = %3
%12 = tail call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i32 7)
%13 = icmp eq i64 %12, 0
br i1 %13, label %18, label %14
14: ; preds = %11
%15 = load i32, i32* @stderr
%16 = tail call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.2, i64 0, i64 0))
%17 = tail call i32 @free(i8* %6)
br label %120
18: ; preds = %11
%19 = tail call i32 @free(i8* %6)
%20 = tail call i8* @get_line(i32* %0)
%21 = icmp eq i8* %20, null
br i1 %21, label %22, label %23
22: ; preds = %18
store i8* null, i8** %1
store i8* null, i8** %2
br label %95
23: ; preds = %18, %86
%24 = phi i32 [ %79, %86 ], [ 0, %18 ]
%25 = phi i32 [ %77, %86 ], [ 0, %18 ]
%26 = phi i8* [ %87, %86 ], [ %20, %18 ]
br label %27
27: ; preds = %23, %37
%28 = phi i32 [ %25, %23 ], [ 0, %37 ]
%29 = phi i8* [ %26, %23 ], [ %39, %37 ]
%30 = call i32 @strlen(i8* %29)
%31 = icmp slt i32 %30, 4
br i1 %31, label %37, label %32
32: ; preds = %27
%33 = load i8, i8* %29
%34 = sext i8 %33 to i32
%35 = call i64 @isspace(i32 %34)
%36 = icmp eq i64 %35, 0
br i1 %36, label %41, label %37
37: ; preds = %32, %27
%38 = call i32 @free(i8* %29)
%39 = call i8* @get_line(i32* %0)
%40 = icmp eq i8* %39, null
br i1 %40, label %89, label %27
41: ; preds = %32
%42 = add nuw nsw i32 %30, 1
%43 = call i64 @space(i32 %42)
%44 = inttoptr i64 %43 to i8*
%45 = call i32 @sscanf(i8* %29, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %5, i8* %44)
%46 = icmp eq i32 %28, %24
br i1 %46, label %47, label %53
47: ; preds = %41
%48 = call i8* @strdup(i8* %5)
%49 = sext i32 %24 to i64
%50 = getelementptr inbounds i8*, i8** %2, i64 %49
store i8* %48, i8** %50
%51 = call i8* @strdup(i8* %44)
%52 = getelementptr inbounds i8*, i8** %1, i64 %49
store i8* %51, i8** %52
br label %76
53: ; preds = %41
%54 = sext i32 %28 to i64
%55 = getelementptr inbounds i8*, i8** %2, i64 %54
%56 = load i8*, i8** %55
%57 = call i64 @strcmp(i8* %5, i8* %56)
%58 = icmp eq i64 %57, 0
br i1 %58, label %65, label %59
59: ; preds = %53
%60 = inttoptr i64 %43 to i8*
%61 = load i32, i32* @stderr
%62 = call i32 (i32, i8*, ...) @fprintf(i32 %61, i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.4, i64 0, i64 0))
%63 = call i32 @free(i8* %29)
%64 = call i32 @free(i8* %60)
br label %120
65: ; preds = %53
%66 = getelementptr inbounds i8*, i8** %1, i64 %54
%67 = load i8*, i8** %66
%68 = call i32 @strlen(i8* %44)
%69 = load i8*, i8** %66
%70 = call i32 @strlen(i8* %69)
%71 = add i32 %68, 1
%72 = add i32 %71, %70
%73 = call i64 @xrealloc(i8* %67, i32 %72)
%74 = inttoptr i64 %73 to i8*
store i8* %74, i8** %66
%75 = call i32 @strcat(i8* %74, i8* %44)
br label %76
76: ; preds = %65, %47
%77 = add nsw i32 %28, 1
%78 = icmp slt i32 %28, %24
%79 = select i1 %78, i32 %24, i32 %77
%80 = call i32 @free(i8* %44)
%81 = call i32 @free(i8* %29)
%82 = icmp sgt i32 %79, 499
br i1 %82, label %83, label %86
83: ; preds = %76
%84 = load i32, i32* @stderr
%85 = call i32 (i32, i8*, ...) @fprintf(i32 %84, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.5, i64 0, i64 0))
br label %120
86: ; preds = %76
%87 = call i8* @get_line(i32* %0)
%88 = icmp eq i8* %87, null
br i1 %88, label %89, label %23
89: ; preds = %86, %37
%90 = phi i32 [ %24, %37 ], [ %79, %86 ]
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds i8*, i8** %1, i64 %91
store i8* null, i8** %92
%93 = getelementptr inbounds i8*, i8** %2, i64 %91
store i8* null, i8** %93
%94 = icmp eq i32 %90, 0
br i1 %94, label %95, label %98
95: ; preds = %22, %89
%96 = load i32, i32* @stderr
%97 = call i32 (i32, i8*, ...) @fprintf(i32 %96, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.6, i64 0, i64 0))
br label %120
98: ; preds = %89
%99 = load i8*, i8** %1
%100 = call i32 @strlen(i8* %99)
%101 = icmp sgt i32 %90, 1
br i1 %101, label %102, label %116
102: ; preds = %98
%103 = zext i32 %90 to i64
br label %104
104: ; preds = %102, %113
%105 = phi i64 [ 1, %102 ], [ %114, %113 ]
%106 = getelementptr inbounds i8*, i8** %1, i64 %105
%107 = load i8*, i8** %106
%108 = call i32 @strlen(i8* %107)
%109 = icmp eq i32 %108, %100
br i1 %109, label %113, label %110
110: ; preds = %104
%111 = load i32, i32* @stderr
%112 = call i32 (i32, i8*, ...) @fprintf(i32 %111, i8* getelementptr inbounds ([50 x i8], [50 x i8]* @.str.7, i64 0, i64 0))
br label %120
113: ; preds = %104
%114 = add nuw nsw i64 %105, 1
%115 = icmp eq i64 %114, %103
br i1 %115, label %116, label %104
116: ; preds = %113, %98
%117 = phi i32 [ 1, %98 ], [ %90, %113 ]
%118 = load i32, i32* @stderr
%119 = call i32 (i32, i8*, ...) @fprintf(i32 %118, i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.8, i64 0, i64 0), i32 %117, i32 %100)
br label %120
120: ; preds = %116, %110, %95, %83, %59, %14, %8
%121 = phi i32 [ 0, %8 ], [ 0, %14 ], [ 0, %83 ], [ 0, %59 ], [ 0, %95 ], [ 0, %110 ], [ %90, %116 ]
ret i32 %121
}