#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*/ add_sequence(char *, char *, char ***, char ***, int);
int asprintf(char **, char *, int, int);
int /*<<< orphan*/ endmarker_msa_record(char ***, char ***, int);
int /*<<< orphan*/ free(char *);
char *get_line(int /*<<< orphan*/ *);
scalar_t__ isspace(int);
int sscanf(char *, char *, char *, char *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
scalar_t__ strncmp(char *, char *, int);
scalar_t__ vrna_alloc(int);
int /*<<< orphan*/ vrna_message_info(int /*<<< orphan*/, char *);
int /*<<< orphan*/ vrna_message_warning(char *);
scalar_t__ vrna_realloc(char *, int);
int /*<<< orphan*/ vrna_seq_toupper(char *);
int parse_clustal_alignment(FILE *clust, char ***names, char ***aln,
                            int verbosity) {
  char *line, *name, *seq;
  int n, r, nn = 0, seq_num = 0, i;
  if ((line = get_line(clust)) == NULL) {
    return -1;
  }
  if (strncmp(line, "CLUSTAL", 7) != 0) {
    if (verbosity > 0)
      vrna_message_warning("This doesn't look like a CLUSTALW file, sorry");
    free(line);
    return -1;
  }
  free(line);
  line = get_line(clust);
  while (line != NULL) {
    n = strlen(line);
    if ((n < 4) || isspace((int)line[0])) {
      free(line);
      line = get_line(clust);
      nn = 0;
      continue;
    }
    if (line[0] == '#') {
      free(line);
      line = get_line(clust);
      continue;
    }
    seq = (char *)vrna_alloc(sizeof(char) * (n + 1));
    name = (char *)vrna_alloc(sizeof(char) * (n + 1));
    if (sscanf(line, "%s %s", name, seq) == 2) {
      seq = (char *)vrna_realloc(seq, sizeof(char) * (strlen(seq) + 1));
      name = (char *)vrna_realloc(name, sizeof(char) * (strlen(name) + 1));
      for (i = 0; i < strlen(seq); i++) {
        if (seq[i] == '.')
          seq[i] = '-';
      }
      vrna_seq_toupper(seq);
      if (nn == seq_num) {
        add_sequence(name, seq, names, aln, nn + 1);
      } else {
        if (strcmp(name, (*names)[nn]) != 0) {
          vrna_message_warning(
              "Sorry, your file is messed up (inconsitent seq-names)");
          free(line);
          free(seq);
          return 0;
        }
        (*aln)[nn] = (char *)vrna_realloc((*aln)[nn],
                                          strlen(seq) + strlen((*aln)[nn]) + 1);
        strcat((*aln)[nn], seq);
      }
      nn++;
      if (nn > seq_num)
        seq_num = nn;
      free(seq);
      free(name);
    }
    free(line);
    line = get_line(clust);
  }
  endmarker_msa_record(names, aln, seq_num);
  if ((seq_num > 0) && (verbosity >= 0)) {
    int r;
    char *msg = NULL;
    r = asprintf(&msg, "%d sequences; length of alignment %d.", seq_num,
                 (int)strlen((*aln)[0]));
    if (r != -1)
      vrna_message_info(stderr, msg);
    free(msg);
  }
  return seq_num;
}


x86 assembly (clang, -O0):
<parse_clustal_alignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movl   $0x0,-0x4c(%rbp)
movl   $0x0,-0x50(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <get_line@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
jne    124b <parse_clustal_alignment+0x4b>
movl   $0xffffffff,-0x4(%rbp)
jmp    15f0 <parse_clustal_alignment+0x3f0>
mov    -0x30(%rbp),%rdi
lea    0xdaa(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%rax
je     1295 <parse_clustal_alignment+0x95>
cmpl   $0x0,-0x24(%rbp)
jle    1280 <parse_clustal_alignment+0x80>
lea    0xd8d(%rip),%rdi
call   10c0 <vrna_message_warning@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15f0 <parse_clustal_alignment+0x3f0>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <get_line@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     1566 <parse_clustal_alignment+0x366>
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x44(%rbp)
cmpl   $0x4,-0x44(%rbp)
jl     12e2 <parse_clustal_alignment+0xe2>
mov    -0x30(%rbp),%rax
movsbl (%rax),%edi
call   1070 <isspace@plt>
cmp    $0x0,%rax
je     1304 <parse_clustal_alignment+0x104>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <get_line@plt>
mov    %rax,-0x30(%rbp)
movl   $0x0,-0x4c(%rbp)
jmp    12ab <parse_clustal_alignment+0xab>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    132f <parse_clustal_alignment+0x12f>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <get_line@plt>
mov    %rax,-0x30(%rbp)
jmp    12ab <parse_clustal_alignment+0xab>
mov    -0x44(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10f0 <vrna_alloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   10f0 <vrna_alloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rcx
lea    0xcc6(%rip),%rsi
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    154b <parse_clustal_alignment+0x34b>
mov    -0x40(%rbp),%rax
mov    %rax,-0x70(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x70(%rbp),%rdi
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   10d0 <vrna_realloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x38(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x68(%rbp),%rdi
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   10d0 <vrna_realloc@plt>
mov    %rax,-0x38(%rbp)
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
mov    %eax,-0x74(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,%ecx
mov    -0x74(%rbp),%eax
cmp    %ecx,%eax
jge    1427 <parse_clustal_alignment+0x227>
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
jne    1414 <parse_clustal_alignment+0x214>
mov    -0x40(%rbp),%rax
movslq -0x54(%rbp),%rcx
movb   $0x2d,(%rax,%rcx,1)
jmp    1419 <parse_clustal_alignment+0x219>
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    13d7 <parse_clustal_alignment+0x1d7>
mov    -0x40(%rbp),%rdi
call   1080 <vrna_seq_toupper@plt>
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jne    145e <parse_clustal_alignment+0x25e>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x4c(%rbp),%r8d
add    $0x1,%r8d
call   1120 <add_sequence@plt>
jmp    151e <parse_clustal_alignment+0x31e>
mov    -0x38(%rbp),%rdi
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
call   1090 <strcmp@plt>
cmp    $0x0,%rax
je     14aa <parse_clustal_alignment+0x2aa>
lea    0xbb5(%rip),%rdi
call   10c0 <vrna_message_warning@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
movl   $0x0,-0x4(%rbp)
jmp    15f0 <parse_clustal_alignment+0x3f0>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rdi
call   1060 <strlen@plt>
mov    %eax,-0x84(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1060 <strlen@plt>
mov    -0x84(%rbp),%esi
mov    -0x80(%rbp),%rdi
add    %eax,%esi
add    $0x1,%esi
call   10d0 <vrna_realloc@plt>
mov    %rax,%rdx
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
movslq -0x4c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
mov    -0x40(%rbp),%rsi
call   1100 <strcat@plt>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x50(%rbp),%eax
jle    1539 <parse_clustal_alignment+0x339>
mov    -0x4c(%rbp),%eax
mov    %eax,-0x50(%rbp)
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rdi
call   1050 <get_line@plt>
mov    %rax,-0x30(%rbp)
jmp    12ab <parse_clustal_alignment+0xab>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x50(%rbp),%edx
call   10a0 <endmarker_msa_record@plt>
cmpl   $0x0,-0x50(%rbp)
jle    15ea <parse_clustal_alignment+0x3ea>
cmpl   $0x0,-0x24(%rbp)
jl     15ea <parse_clustal_alignment+0x3ea>
movq   $0x0,-0x60(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x88(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
call   1060 <strlen@plt>
mov    -0x88(%rbp),%edx
mov    %eax,%ecx
lea    -0x60(%rbp),%rdi
lea    0xab5(%rip),%rsi
call   10e0 <asprintf@plt>
mov    %eax,-0x58(%rbp)
cmpl   $0xffffffff,-0x58(%rbp)
je     15e1 <parse_clustal_alignment+0x3e1>
mov    0x2a0a(%rip),%rax
mov    (%rax),%edi
mov    -0x60(%rbp),%rsi
call   1110 <vrna_message_info@plt>
mov    -0x60(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_clustal_alignment>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %ecx,%r15d
mov    %rdx,%r13
mov    %rsi,%rbp
mov    %rdi,%r14
call   1050 <get_line@plt>
mov    $0xffffffff,%r12d
test   %rax,%rax
je     1521 <parse_clustal_alignment+0x321>
mov    %rax,%rbx
lea    0xdc8(%rip),%rsi
mov    %rax,%rdi
mov    $0x7,%edx
call   1040 <strncmp@plt>
test   %rax,%rax
je     1263 <parse_clustal_alignment+0x63>
test   %r15d,%r15d
jle    125b <parse_clustal_alignment+0x5b>
lea    0xdb2(%rip),%rdi
call   10c0 <vrna_message_warning@plt>
mov    %rbx,%rdi
jmp    151c <parse_clustal_alignment+0x31c>
mov    %r13,0x10(%rsp)
mov    %rbp,0x18(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1050 <get_line@plt>
test   %rax,%rax
je     14b3 <parse_clustal_alignment+0x2b3>
mov    %rax,%r13
xor    %r12d,%r12d
lea    0xda3(%rip),%rbp
xor    %ebx,%ebx
jmp    12be <parse_clustal_alignment+0xbe>
nopw   0x0(%rax,%rax,1)
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1050 <get_line@plt>
mov    %rax,%r13
xor    %ebx,%ebx
test   %rax,%rax
je     14b6 <parse_clustal_alignment+0x2b6>
mov    %rbx,0x20(%rsp)
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r13,%rdi
call   1060 <strlen@plt>
cmp    $0x4,%eax
jl     12a0 <parse_clustal_alignment+0xa0>
mov    %eax,%ebx
movsbl 0x0(%r13),%edi
call   1070 <isspace@plt>
test   %rax,%rax
jne    12a0 <parse_clustal_alignment+0xa0>
cmpb   $0x23,0x0(%r13)
jne    1312 <parse_clustal_alignment+0x112>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1050 <get_line@plt>
mov    %rax,%r13
test   %rax,%rax
jne    12d0 <parse_clustal_alignment+0xd0>
jmp    14b6 <parse_clustal_alignment+0x2b6>
mov    %r15d,0x34(%rsp)
add    $0x1,%ebx
mov    %ebx,%edi
call   10f0 <vrna_alloc@plt>
mov    %rax,%r15
mov    %ebx,%edi
call   10f0 <vrna_alloc@plt>
mov    %rax,%rbx
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %rax,%rdx
mov    %r15,%rcx
call   10b0 <sscanf@plt>
cmp    $0x2,%eax
jne    13b1 <parse_clustal_alignment+0x1b1>
mov    %r15,%rdi
call   1060 <strlen@plt>
lea    0x1(%rax),%esi
mov    %r15,%rdi
call   10d0 <vrna_realloc@plt>
mov    %rax,%r15
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    0x1(%rax),%esi
mov    %rbx,%rdi
call   10d0 <vrna_realloc@plt>
mov    %rax,0x8(%rsp)
mov    %r15,%rdi
call   1060 <strlen@plt>
test   %eax,%eax
jle    13bb <parse_clustal_alignment+0x1bb>
xor    %ebx,%ebx
jmp    13a3 <parse_clustal_alignment+0x1a3>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rbx
mov    %r15,%rdi
call   1060 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    13bb <parse_clustal_alignment+0x1bb>
cmpb   $0x2e,(%r15,%rbx,1)
jne    1390 <parse_clustal_alignment+0x190>
movb   $0x2d,(%r15,%rbx,1)
jmp    1390 <parse_clustal_alignment+0x190>
mov    0x20(%rsp),%rbx
jmp    1490 <parse_clustal_alignment+0x290>
mov    %r15,%rdi
call   1080 <vrna_seq_toupper@plt>
mov    0x20(%rsp),%rbx
cmp    %r12d,%ebx
jne    13ee <parse_clustal_alignment+0x1ee>
lea    0x1(%r12),%r8d
mov    0x8(%rsp),%rdi
mov    %r15,%rsi
mov    0x18(%rsp),%rdx
mov    0x10(%rsp),%rcx
call   1120 <add_sequence@plt>
jmp    1471 <parse_clustal_alignment+0x271>
mov    0x18(%rsp),%rax
mov    (%rax),%rax
movslq %ebx,%rbp
mov    (%rax,%rbp,8),%rsi
mov    0x8(%rsp),%rdi
call   1090 <strcmp@plt>
test   %rax,%rax
jne    1533 <parse_clustal_alignment+0x333>
mov    0x10(%rsp),%rbx
mov    (%rbx),%rax
mov    (%rax,%rbp,8),%rax
mov    %rax,0x40(%rsp)
mov    %r15,%rdi
call   1060 <strlen@plt>
mov    %rax,0x38(%rsp)
mov    (%rbx),%rax
mov    (%rax,%rbp,8),%rdi
call   1060 <strlen@plt>
mov    0x38(%rsp),%rcx
lea    (%rcx,%rax,1),%esi
add    $0x1,%esi
mov    0x40(%rsp),%rdi
call   10d0 <vrna_realloc@plt>
mov    (%rbx),%rcx
mov    %rax,(%rcx,%rbp,8)
mov    (%rbx),%rax
mov    (%rax,%rbp,8),%rdi
mov    0x20(%rsp),%rbx
mov    %r15,%rsi
call   1100 <strcat@plt>
lea    0xbc5(%rip),%rbp
mov    %rbx,%rax
add    $0x1,%ebx
cmp    %r12d,%eax
cmovge %ebx,%r12d
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1050 <get_line@plt>
mov    %rax,%r13
test   %rax,%rax
mov    0x34(%rsp),%r15d
jne    12be <parse_clustal_alignment+0xbe>
jmp    14b6 <parse_clustal_alignment+0x2b6>
xor    %r12d,%r12d
mov    0x18(%rsp),%rdi
mov    0x10(%rsp),%rbx
mov    %rbx,%rsi
mov    %r12d,%edx
call   10a0 <endmarker_msa_record@plt>
test   %r15d,%r15d
js     1521 <parse_clustal_alignment+0x321>
test   %r12d,%r12d
jle    1521 <parse_clustal_alignment+0x321>
movq   $0x0,0x28(%rsp)
mov    (%rbx),%rax
mov    (%rax),%rdi
call   1060 <strlen@plt>
lea    0xb82(%rip),%rsi
lea    0x28(%rsp),%rdi
mov    %r12d,%edx
mov    %eax,%ecx
call   10e0 <asprintf@plt>
cmp    $0xffffffff,%eax
je     1517 <parse_clustal_alignment+0x317>
mov    0x2ad5(%rip),%rax
mov    (%rax),%edi
mov    0x28(%rsp),%rsi
call   1110 <vrna_message_info@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    %r12d,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xb02(%rip),%rdi
call   10c0 <vrna_message_warning@plt>
mov    %r13,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %r12d,%r12d
jmp    1521 <parse_clustal_alignment+0x321>

LLVM IR (-O0):
@.str = [8 x i8] c"CLUSTAL\00"
@.str.1 = [46 x i8] c"This doesn't look like a CLUSTALW file, sorry\00"
@.str.2 = [6 x i8] c"%s %s\00"
@.str.3 = [54 x i8] c"Sorry, your file is messed up (inconsitent seq-names)\00"
@.str.4 = [38 x i8] c"%d sequences; length of alignment %d.\00"
@stderr = global i32 0
define i32 @parse_clustal_alignment(i32* %0, i8*** %1, i8*** %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i8***
%8 = alloca i8***
%9 = alloca i32
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i8*
store i32* %0, i32** %6
store i8*** %1, i8**** %7
store i8*** %2, i8**** %8
store i32 %3, i32* %9
store i32 0, i32* %15
store i32 0, i32* %16
%20 = load i32*, i32** %6
%21 = call i8* @get_line(i32* %20)
store i8* %21, i8** %10
%22 = icmp eq i8* %21, null
br i1 %22, label %23, label %24
23: ; preds = %4
store i32 -1, i32* %5
br label %243
24: ; preds = %4
%25 = load i8*, i8** %10
%26 = call i64 @strncmp(i8* %25, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%27 = icmp ne i64 %26, 0
br i1 %27, label %28, label %36
28: ; preds = %24
%29 = load i32, i32* %9
%30 = icmp sgt i32 %29, 0
br i1 %30, label %31, label %33
31: ; preds = %28
%32 = call i32 @vrna_message_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
br label %33
33: ; preds = %31, %28
%34 = load i8*, i8** %10
%35 = call i32 @free(i8* %34)
store i32 -1, i32* %5
br label %243
36: ; preds = %24
%37 = load i8*, i8** %10
%38 = call i32 @free(i8* %37)
%39 = load i32*, i32** %6
%40 = call i8* @get_line(i32* %39)
store i8* %40, i8** %10
br label %41
41: ; preds = %209, %67, %56, %36
%42 = load i8*, i8** %10
%43 = icmp ne i8* %42, null
br i1 %43, label %44, label %214
44: ; preds = %41
%45 = load i8*, i8** %10
%46 = call i32 @strlen(i8* %45)
store i32 %46, i32* %13
%47 = load i32, i32* %13
%48 = icmp slt i32 %47, 4
br i1 %48, label %56, label %49
49: ; preds = %44
%50 = load i8*, i8** %10
%51 = getelementptr inbounds i8, i8* %50, i64 0
%52 = load i8, i8* %51
%53 = sext i8 %52 to i32
%54 = call i64 @isspace(i32 %53)
%55 = icmp ne i64 %54, 0
br i1 %55, label %56, label %61
56: ; preds = %49, %44
%57 = load i8*, i8** %10
%58 = call i32 @free(i8* %57)
%59 = load i32*, i32** %6
%60 = call i8* @get_line(i32* %59)
store i8* %60, i8** %10
store i32 0, i32* %15
br label %41
61: ; preds = %49
%62 = load i8*, i8** %10
%63 = getelementptr inbounds i8, i8* %62, i64 0
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp eq i32 %65, 35
br i1 %66, label %67, label %72
67: ; preds = %61
%68 = load i8*, i8** %10
%69 = call i32 @free(i8* %68)
%70 = load i32*, i32** %6
%71 = call i8* @get_line(i32* %70)
store i8* %71, i8** %10
br label %41
72: ; preds = %61
%73 = load i32, i32* %13
%74 = add nsw i32 %73, 1
%75 = sext i32 %74 to i64
%76 = mul i64 1, %75
%77 = trunc i64 %76 to i32
%78 = call i64 @vrna_alloc(i32 %77)
%79 = inttoptr i64 %78 to i8*
store i8* %79, i8** %12
%80 = load i32, i32* %13
%81 = add nsw i32 %80, 1
%82 = sext i32 %81 to i64
%83 = mul i64 1, %82
%84 = trunc i64 %83 to i32
%85 = call i64 @vrna_alloc(i32 %84)
%86 = inttoptr i64 %85 to i8*
store i8* %86, i8** %11
%87 = load i8*, i8** %10
%88 = load i8*, i8** %11
%89 = load i8*, i8** %12
%90 = call i32 @sscanf(i8* %87, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %88, i8* %89)
%91 = icmp eq i32 %90, 2
br i1 %91, label %92, label %209
92: ; preds = %72
%93 = load i8*, i8** %12
%94 = load i8*, i8** %12
%95 = call i32 @strlen(i8* %94)
%96 = add nsw i32 %95, 1
%97 = sext i32 %96 to i64
%98 = mul i64 1, %97
%99 = trunc i64 %98 to i32
%100 = call i64 @vrna_realloc(i8* %93, i32 %99)
%101 = inttoptr i64 %100 to i8*
store i8* %101, i8** %12
%102 = load i8*, i8** %11
%103 = load i8*, i8** %11
%104 = call i32 @strlen(i8* %103)
%105 = add nsw i32 %104, 1
%106 = sext i32 %105 to i64
%107 = mul i64 1, %106
%108 = trunc i64 %107 to i32
%109 = call i64 @vrna_realloc(i8* %102, i32 %108)
%110 = inttoptr i64 %109 to i8*
store i8* %110, i8** %11
store i32 0, i32* %17
br label %111
111: ; preds = %130, %92
%112 = load i32, i32* %17
%113 = load i8*, i8** %12
%114 = call i32 @strlen(i8* %113)
%115 = icmp slt i32 %112, %114
br i1 %115, label %116, label %133
116: ; preds = %111
%117 = load i8*, i8** %12
%118 = load i32, i32* %17
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i8, i8* %117, i64 %119
%121 = load i8, i8* %120
%122 = sext i8 %121 to i32
%123 = icmp eq i32 %122, 46
br i1 %123, label %124, label %129
124: ; preds = %116
%125 = load i8*, i8** %12
%126 = load i32, i32* %17
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8, i8* %125, i64 %127
store i8 45, i8* %128
br label %129
129: ; preds = %124, %116
br label %130
130: ; preds = %129
%131 = load i32, i32* %17
%132 = add nsw i32 %131, 1
store i32 %132, i32* %17
br label %111
133: ; preds = %111
%134 = load i8*, i8** %12
%135 = call i32 @vrna_seq_toupper(i8* %134)
%136 = load i32, i32* %15
%137 = load i32, i32* %16
%138 = icmp eq i32 %136, %137
br i1 %138, label %139, label %147
139: ; preds = %133
%140 = load i8*, i8** %11
%141 = load i8*, i8** %12
%142 = load i8***, i8**** %7
%143 = load i8***, i8**** %8
%144 = load i32, i32* %15
%145 = add nsw i32 %144, 1
%146 = call i32 @add_sequence(i8* %140, i8* %141, i8*** %142, i8*** %143, i32 %145)
br label %196
147: ; preds = %133
%148 = load i8*, i8** %11
%149 = load i8***, i8**** %7
%150 = load i8**, i8*** %149
%151 = load i32, i32* %15
%152 = sext i32 %151 to i64
%153 = getelementptr inbounds i8*, i8** %150, i64 %152
%154 = load i8*, i8** %153
%155 = call i64 @strcmp(i8* %148, i8* %154)
%156 = icmp ne i64 %155, 0
br i1 %156, label %157, label %163
157: ; preds = %147
%158 = call i32 @vrna_message_warning(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%159 = load i8*, i8** %10
%160 = call i32 @free(i8* %159)
%161 = load i8*, i8** %12
%162 = call i32 @free(i8* %161)
store i32 0, i32* %5
br label %243
163: ; preds = %147
%164 = load i8***, i8**** %8
%165 = load i8**, i8*** %164
%166 = load i32, i32* %15
%167 = sext i32 %166 to i64
%168 = getelementptr inbounds i8*, i8** %165, i64 %167
%169 = load i8*, i8** %168
%170 = load i8*, i8** %12
%171 = call i32 @strlen(i8* %170)
%172 = load i8***, i8**** %8
%173 = load i8**, i8*** %172
%174 = load i32, i32* %15
%175 = sext i32 %174 to i64
%176 = getelementptr inbounds i8*, i8** %173, i64 %175
%177 = load i8*, i8** %176
%178 = call i32 @strlen(i8* %177)
%179 = add nsw i32 %171, %178
%180 = add nsw i32 %179, 1
%181 = call i64 @vrna_realloc(i8* %169, i32 %180)
%182 = inttoptr i64 %181 to i8*
%183 = load i8***, i8**** %8
%184 = load i8**, i8*** %183
%185 = load i32, i32* %15
%186 = sext i32 %185 to i64
%187 = getelementptr inbounds i8*, i8** %184, i64 %186
store i8* %182, i8** %187
%188 = load i8***, i8**** %8
%189 = load i8**, i8*** %188
%190 = load i32, i32* %15
%191 = sext i32 %190 to i64
%192 = getelementptr inbounds i8*, i8** %189, i64 %191
%193 = load i8*, i8** %192
%194 = load i8*, i8** %12
%195 = call i32 @strcat(i8* %193, i8* %194)
br label %196
196: ; preds = %163, %139
%197 = load i32, i32* %15
%198 = add nsw i32 %197, 1
store i32 %198, i32* %15
%199 = load i32, i32* %15
%200 = load i32, i32* %16
%201 = icmp sgt i32 %199, %200
br i1 %201, label %202, label %204
202: ; preds = %196
%203 = load i32, i32* %15
store i32 %203, i32* %16
br label %204
204: ; preds = %202, %196
%205 = load i8*, i8** %12
%206 = call i32 @free(i8* %205)
%207 = load i8*, i8** %11
%208 = call i32 @free(i8* %207)
br label %209
209: ; preds = %204, %72
%210 = load i8*, i8** %10
%211 = call i32 @free(i8* %210)
%212 = load i32*, i32** %6
%213 = call i8* @get_line(i32* %212)
store i8* %213, i8** %10
br label %41
214: ; preds = %41
%215 = load i8***, i8**** %7
%216 = load i8***, i8**** %8
%217 = load i32, i32* %16
%218 = call i32 @endmarker_msa_record(i8*** %215, i8*** %216, i32 %217)
%219 = load i32, i32* %16
%220 = icmp sgt i32 %219, 0
br i1 %220, label %221, label %241
221: ; preds = %214
%222 = load i32, i32* %9
%223 = icmp sge i32 %222, 0
br i1 %223, label %224, label %241
224: ; preds = %221
store i8* null, i8** %19
%225 = load i32, i32* %16
%226 = load i8***, i8**** %8
%227 = load i8**, i8*** %226
%228 = getelementptr inbounds i8*, i8** %227, i64 0
%229 = load i8*, i8** %228
%230 = call i32 @strlen(i8* %229)
%231 = call i32 @asprintf(i8** %19, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %225, i32 %230)
store i32 %231, i32* %18
%232 = load i32, i32* %18
%233 = icmp ne i32 %232, -1
br i1 %233, label %234, label %238
234: ; preds = %224
%235 = load i32, i32* @stderr
%236 = load i8*, i8** %19
%237 = call i32 @vrna_message_info(i32 %235, i8* %236)
br label %238
238: ; preds = %234, %224
%239 = load i8*, i8** %19
%240 = call i32 @free(i8* %239)
br label %241
241: ; preds = %238, %221, %214
%242 = load i32, i32* %16
store i32 %242, i32* %5
br label %243
243: ; preds = %241, %157, %33, %23
%244 = load i32, i32* %5
ret i32 %244
}

LLVM IR (-O2):
@.str = [8 x i8] c"CLUSTAL\00"
@.str.1 = [46 x i8] c"This doesn't look like a CLUSTALW file, sorry\00"
@.str.2 = [6 x i8] c"%s %s\00"
@.str.3 = [54 x i8] c"Sorry, your file is messed up (inconsitent seq-names)\00"
@.str.4 = [38 x i8] c"%d sequences; length of alignment %d.\00"
@stderr = global i32 0
define i32 @parse_clustal_alignment(i32* %0, i8*** %1, i8*** %2, i32 %3) {
%5 = alloca i8*
%6 = tail call i8* @get_line(i32* %0)
%7 = icmp eq i8* %6, null
br i1 %7, label %147, label %8
8: ; preds = %4
%9 = tail call i64 @strncmp(i8* %6, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%10 = icmp eq i64 %9, 0
br i1 %10, label %17, label %11
11: ; preds = %8
%12 = icmp sgt i32 %3, 0
br i1 %12, label %13, label %15
13: ; preds = %11
%14 = tail call i32 @vrna_message_warning(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %11
%16 = tail call i32 @free(i8* %6)
br label %147
17: ; preds = %8
%18 = tail call i32 @free(i8* %6)
%19 = tail call i8* @get_line(i32* %0)
%20 = icmp eq i8* %19, null
br i1 %20, label %127, label %21
21: ; preds = %17, %121
%22 = phi i32 [ %123, %121 ], [ 0, %17 ]
%23 = phi i32 [ %122, %121 ], [ 0, %17 ]
%24 = phi i8* [ %125, %121 ], [ %19, %17 ]
br label %25
25: ; preds = %21, %37
%26 = phi i32 [ %23, %21 ], [ 0, %37 ]
%27 = phi i8* [ %24, %21 ], [ %39, %37 ]
br label %28
28: ; preds = %25, %44
%29 = phi i8* [ %27, %25 ], [ %46, %44 ]
%30 = tail call i32 @strlen(i8* %29)
%31 = icmp slt i32 %30, 4
br i1 %31, label %37, label %32
32: ; preds = %28
%33 = load i8, i8* %29
%34 = sext i8 %33 to i32
%35 = tail call i64 @isspace(i32 %34)
%36 = icmp eq i64 %35, 0
br i1 %36, label %41, label %37
37: ; preds = %32, %28
%38 = tail call i32 @free(i8* %29)
%39 = tail call i8* @get_line(i32* %0)
%40 = icmp eq i8* %39, null
br i1 %40, label %127, label %25
41: ; preds = %32
%42 = load i8, i8* %29
%43 = icmp eq i8 %42, 35
br i1 %43, label %44, label %48
44: ; preds = %41
%45 = tail call i32 @free(i8* %29)
%46 = tail call i8* @get_line(i32* %0)
%47 = icmp eq i8* %46, null
br i1 %47, label %127, label %28
48: ; preds = %41
%49 = add nuw nsw i32 %30, 1
%50 = tail call i64 @vrna_alloc(i32 %49)
%51 = inttoptr i64 %50 to i8*
%52 = tail call i64 @vrna_alloc(i32 %49)
%53 = inttoptr i64 %52 to i8*
%54 = tail call i32 @sscanf(i8* %29, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* %53, i8* %51)
%55 = icmp eq i32 %54, 2
br i1 %55, label %56, label %121
56: ; preds = %48
%57 = tail call i32 @strlen(i8* %51)
%58 = add nsw i32 %57, 1
%59 = tail call i64 @vrna_realloc(i8* %51, i32 %58)
%60 = inttoptr i64 %59 to i8*
%61 = tail call i32 @strlen(i8* %53)
%62 = add nsw i32 %61, 1
%63 = tail call i64 @vrna_realloc(i8* %53, i32 %62)
%64 = inttoptr i64 %63 to i8*
%65 = tail call i32 @strlen(i8* %60)
%66 = icmp sgt i32 %65, 0
br i1 %66, label %67, label %78
67: ; preds = %56, %73
%68 = phi i64 [ %74, %73 ], [ 0, %56 ]
%69 = getelementptr inbounds i8, i8* %60, i64 %68
%70 = load i8, i8* %69
%71 = icmp eq i8 %70, 46
br i1 %71, label %72, label %73
72: ; preds = %67
store i8 45, i8* %69
br label %73
73: ; preds = %67, %72
%74 = add nuw nsw i64 %68, 1
%75 = tail call i32 @strlen(i8* %60)
%76 = sext i32 %75 to i64
%77 = icmp slt i64 %74, %76
br i1 %77, label %67, label %78
78: ; preds = %73, %56
%79 = tail call i32 @vrna_seq_toupper(i8* %60)
%80 = icmp eq i32 %26, %22
br i1 %80, label %81, label %84
81: ; preds = %78
%82 = add nsw i32 %22, 1
%83 = tail call i32 @add_sequence(i8* %64, i8* %60, i8*** %1, i8*** %2, i32 %82)
br label %115
84: ; preds = %78
%85 = load i8**, i8*** %1
%86 = sext i32 %26 to i64
%87 = getelementptr inbounds i8*, i8** %85, i64 %86
%88 = load i8*, i8** %87
%89 = tail call i64 @strcmp(i8* %64, i8* %88)
%90 = icmp eq i64 %89, 0
br i1 %90, label %96, label %91
91: ; preds = %84
%92 = inttoptr i64 %59 to i8*
%93 = tail call i32 @vrna_message_warning(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.3, i64 0, i64 0))
%94 = tail call i32 @free(i8* %29)
%95 = tail call i32 @free(i8* %92)
br label %147
96: ; preds = %84
%97 = load i8**, i8*** %2
%98 = getelementptr inbounds i8*, i8** %97, i64 %86
%99 = load i8*, i8** %98
%100 = tail call i32 @strlen(i8* %60)
%101 = load i8**, i8*** %2
%102 = getelementptr inbounds i8*, i8** %101, i64 %86
%103 = load i8*, i8** %102
%104 = tail call i32 @strlen(i8* %103)
%105 = add i32 %100, 1
%106 = add i32 %105, %104
%107 = tail call i64 @vrna_realloc(i8* %99, i32 %106)
%108 = inttoptr i64 %107 to i8*
%109 = load i8**, i8*** %2
%110 = getelementptr inbounds i8*, i8** %109, i64 %86
store i8* %108, i8** %110
%111 = load i8**, i8*** %2
%112 = getelementptr inbounds i8*, i8** %111, i64 %86
%113 = load i8*, i8** %112
%114 = tail call i32 @strcat(i8* %113, i8* %60)
br label %115
115: ; preds = %96, %81
%116 = add nsw i32 %26, 1
%117 = icmp slt i32 %26, %22
%118 = select i1 %117, i32 %22, i32 %116
%119 = tail call i32 @free(i8* %60)
%120 = tail call i32 @free(i8* %64)
br label %121
121: ; preds = %115, %48
%122 = phi i32 [ %116, %115 ], [ %26, %48 ]
%123 = phi i32 [ %118, %115 ], [ %22, %48 ]
%124 = tail call i32 @free(i8* %29)
%125 = tail call i8* @get_line(i32* %0)
%126 = icmp eq i8* %125, null
br i1 %126, label %127, label %21
127: ; preds = %121, %37, %44, %17
%128 = phi i32 [ 0, %17 ], [ %22, %44 ], [ %22, %37 ], [ %123, %121 ]
%129 = tail call i32 @endmarker_msa_record(i8*** %1, i8*** %2, i32 %128)
%130 = icmp sgt i32 %128, 0
%131 = icmp sgt i32 %3, -1
%132 = and i1 %131, %130
br i1 %132, label %133, label %147
133: ; preds = %127
%134 = bitcast i8** %5 to i8*
store i8* null, i8** %5
%135 = load i8**, i8*** %2
%136 = load i8*, i8** %135
%137 = tail call i32 @strlen(i8* %136)
%138 = call i32 @asprintf(i8** %5, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %128, i32 %137)
%139 = icmp eq i32 %138, -1
br i1 %139, label %144, label %140
140: ; preds = %133
%141 = load i32, i32* @stderr
%142 = load i8*, i8** %5
%143 = call i32 @vrna_message_info(i32 %141, i8* %142)
br label %144
144: ; preds = %140, %133
%145 = load i8*, i8** %5
%146 = call i32 @free(i8* %145)
br label %147
147: ; preds = %127, %144, %4, %91, %15
%148 = phi i32 [ -1, %15 ], [ 0, %91 ], [ -1, %4 ], [ %128, %144 ], [ %128, %127 ]
ret i32 %148
}