#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(char);
int sscanf(char *, char *, char *, int *, int *, char *, int *, char *);
int /*<<< orphan*/ stderr;
int strlen(char *);
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_maf_alignment(FILE *fp, char ***names, char ***aln, int verbosity) {
  char *line = NULL, *tmp_name, *tmp_sequence, strand;
  int i, n, seq_num, seq_length, start, length, src_length;
  seq_num = 0;
  seq_length = 0;
  if (!fp) {
    if (verbosity >= 0)
      vrna_message_warning("Can't read from filepointer while parsing MAF "
                           "formatted sequence alignment!");
    return -1;
  }
  if (names && aln) {
    *names = NULL;
    *aln = NULL;
  } else {
    return -1;
  }
  int inrecord = 0;
  while ((line = get_line(fp))) {
    if (*line == 'a') {
      if ((line[1] == '\0') || isspace(line[1])) {
        inrecord = 1;
        free(line);
        break;
      }
    }
    free(line);
  }
  if (inrecord) {
    while ((line = get_line(fp))) {
      n = (int)strlen(line);
      switch (*line) {
      case '#':
        break;
      case 's':
        tmp_name = (char *)vrna_alloc(sizeof(char) * n);
        tmp_sequence = (char *)vrna_alloc(sizeof(char) * n);
        if (sscanf(line, "s %s %d %d %c %d %s", tmp_name, &start, &length,
                   &strand, &src_length, tmp_sequence) == 6) {
          seq_num++;
          tmp_name = (char *)vrna_realloc(tmp_name, sizeof(char) *
                                                        (strlen(tmp_name) + 1));
          tmp_sequence = (char *)vrna_realloc(
              tmp_sequence, sizeof(char) * (strlen(tmp_sequence) + 1));
          vrna_seq_toupper(tmp_sequence);
          add_sequence(tmp_name, tmp_sequence, names, aln, seq_num);
          free(tmp_name);
          free(tmp_sequence);
          break;
        }
        free(tmp_name);
        free(tmp_sequence);
      default:
        free(line);
        goto maf_exit;
      }
      free(line);
    }
  } else {
    if (verbosity > 0)
      vrna_message_warning("Did not find any MAF formatted record!");
    return -1;
  }
maf_exit:
  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_maf_alignment>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
movq   $0x0,-0x30(%rbp)
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x54(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    122d <parse_maf_alignment+0x5d>
cmpl   $0x0,-0x24(%rbp)
jl     1221 <parse_maf_alignment+0x51>
lea    0xde4(%rip),%rdi
call   10a0 <vrna_message_warning@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1526 <parse_maf_alignment+0x356>
cmpq   $0x0,-0x18(%rbp)
je     125e <parse_maf_alignment+0x8e>
cmpq   $0x0,-0x20(%rbp)
je     125e <parse_maf_alignment+0x8e>
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x20(%rbp),%rax
movq   $0x0,(%rax)
jmp    126a <parse_maf_alignment+0x9a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1526 <parse_maf_alignment+0x356>
movl   $0x0,-0x64(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <get_line@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     12e8 <parse_maf_alignment+0x118>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jne    12da <parse_maf_alignment+0x10a>
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     12c0 <parse_maf_alignment+0xf0>
mov    -0x30(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1060 <isspace@plt>
cmp    $0x0,%rax
je     12d5 <parse_maf_alignment+0x105>
movl   $0x1,-0x64(%rbp)
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
jmp    12e8 <parse_maf_alignment+0x118>
jmp    12da <parse_maf_alignment+0x10a>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
jmp    1271 <parse_maf_alignment+0xa1>
cmpl   $0x0,-0x64(%rbp)
je     1475 <parse_maf_alignment+0x2a5>
jmp    12f7 <parse_maf_alignment+0x127>
mov    -0x10(%rbp),%rdi
call   1040 <get_line@plt>
mov    %rax,-0x30(%rbp)
cmp    $0x0,%rax
je     1470 <parse_maf_alignment+0x2a0>
mov    -0x30(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x4c(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x74(%rbp)
sub    $0x23,%eax
je     1343 <parse_maf_alignment+0x173>
jmp    1332 <parse_maf_alignment+0x162>
mov    -0x74(%rbp),%eax
sub    $0x73,%eax
je     1348 <parse_maf_alignment+0x178>
jmp    1454 <parse_maf_alignment+0x284>
jmp    1462 <parse_maf_alignment+0x292>
movslq -0x4c(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10d0 <vrna_alloc@plt>
mov    %rax,-0x38(%rbp)
movslq -0x4c(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   10d0 <vrna_alloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x30(%rbp),%rdi
mov    -0x38(%rbp),%rdx
mov    -0x40(%rbp),%rax
lea    0xccb(%rip),%rsi
lea    -0x58(%rbp),%rcx
lea    -0x5c(%rbp),%r8
lea    -0x41(%rbp),%r9
lea    -0x60(%rbp),%r10
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1090 <sscanf@plt>
cmp    $0x6,%eax
jne    1442 <parse_maf_alignment+0x272>
mov    -0x50(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x50(%rbp)
mov    -0x38(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x38(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x88(%rbp),%rdi
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   10b0 <vrna_realloc@plt>
mov    %rax,-0x38(%rbp)
mov    -0x40(%rbp),%rax
mov    %rax,-0x80(%rbp)
mov    -0x40(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0x80(%rbp),%rdi
add    $0x1,%eax
cltq
shl    $0x0,%rax
mov    %eax,%esi
call   10b0 <vrna_realloc@plt>
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rdi
call   1070 <vrna_seq_toupper@plt>
mov    -0x38(%rbp),%rdi
mov    -0x40(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x50(%rbp),%r8d
call   10f0 <add_sequence@plt>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
jmp    1462 <parse_maf_alignment+0x292>
mov    -0x38(%rbp),%rdi
call   1030 <free@plt>
mov    -0x40(%rbp),%rdi
call   1030 <free@plt>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
jmp    149c <parse_maf_alignment+0x2cc>
mov    -0x30(%rbp),%rdi
call   1030 <free@plt>
jmp    12f7 <parse_maf_alignment+0x127>
jmp    1497 <parse_maf_alignment+0x2c7>
cmpl   $0x0,-0x24(%rbp)
jle    148b <parse_maf_alignment+0x2bb>
lea    0xbda(%rip),%rdi
call   10a0 <vrna_message_warning@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1526 <parse_maf_alignment+0x356>
jmp    149c <parse_maf_alignment+0x2cc>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x50(%rbp),%edx
call   1080 <endmarker_msa_record@plt>
cmpl   $0x0,-0x50(%rbp)
jle    1520 <parse_maf_alignment+0x350>
cmpl   $0x0,-0x24(%rbp)
jl     1520 <parse_maf_alignment+0x350>
movq   $0x0,-0x70(%rbp)
mov    -0x50(%rbp),%eax
mov    %eax,-0x8c(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%rdi
call   1050 <strlen@plt>
mov    -0x8c(%rbp),%edx
mov    %eax,%ecx
lea    -0x70(%rbp),%rdi
lea    0xb94(%rip),%rsi
call   10c0 <asprintf@plt>
mov    %eax,-0x68(%rbp)
cmpl   $0xffffffff,-0x68(%rbp)
je     1517 <parse_maf_alignment+0x347>
mov    0x2ad4(%rip),%rax
mov    (%rax),%edi
mov    -0x70(%rbp),%rsi
call   10e0 <vrna_message_info@plt>
mov    -0x70(%rbp),%rdi
call   1030 <free@plt>
mov    -0x50(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_maf_alignment>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,%ebp
mov    $0xffffffff,%r13d
test   %rdi,%rdi
je     1378 <parse_maf_alignment+0x1a8>
test   %rsi,%rsi
je     1395 <parse_maf_alignment+0x1c5>
mov    %rdx,%r15
test   %rdx,%rdx
je     1395 <parse_maf_alignment+0x1c5>
mov    %rdi,%r12
mov    %rsi,0x20(%rsp)
movq   $0x0,(%rsi)
movq   $0x0,(%r15)
call   1040 <get_line@plt>
test   %rax,%rax
je     1385 <parse_maf_alignment+0x1b5>
mov    %rax,%rbx
jmp    124c <parse_maf_alignment+0x7c>
nopl   (%rax)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1040 <get_line@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1385 <parse_maf_alignment+0x1b5>
cmpb   $0x61,(%rbx)
jne    1230 <parse_maf_alignment+0x60>
movzbl 0x1(%rbx),%eax
test   %al,%al
je     1266 <parse_maf_alignment+0x96>
movsbl %al,%edi
call   1060 <isspace@plt>
test   %rax,%rax
je     1230 <parse_maf_alignment+0x60>
mov    %ebp,0x14(%rsp)
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1040 <get_line@plt>
test   %rax,%rax
je     13a7 <parse_maf_alignment+0x1d7>
mov    %rax,%rbx
xor    %r13d,%r13d
mov    %r15,0x18(%rsp)
jmp    12ac <parse_maf_alignment+0xdc>
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r12,%rdi
call   1040 <get_line@plt>
mov    %rax,%rbx
test   %rax,%rax
je     13c9 <parse_maf_alignment+0x1f9>
mov    %rbx,%rdi
call   1050 <strlen@plt>
mov    %eax,%ebp
movsbl (%rbx),%eax
cmp    $0x23,%eax
je     1290 <parse_maf_alignment+0xc0>
cmp    $0x73,%eax
jne    13c1 <parse_maf_alignment+0x1f1>
mov    %ebp,%edi
call   10d0 <vrna_alloc@plt>
mov    %rax,%r14
mov    %ebp,%edi
call   10d0 <vrna_alloc@plt>
mov    %rax,%r15
mov    %rbx,%rdi
lea    0xd67(%rip),%rsi
mov    %r14,%rdx
lea    0x34(%rsp),%rcx
lea    0x30(%rsp),%r8
lea    0x7(%rsp),%r9
push   %rax
lea    0x34(%rsp),%rax
push   %rax
call   1090 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    13ac <parse_maf_alignment+0x1dc>
add    $0x1,%r13d
mov    %r14,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%esi
mov    %r14,%rdi
call   10b0 <vrna_realloc@plt>
mov    %rax,%r14
mov    %r15,%rdi
call   1050 <strlen@plt>
lea    0x1(%rax),%esi
mov    %r15,%rdi
call   10b0 <vrna_realloc@plt>
mov    %rax,%rbp
mov    %rax,%rdi
call   1070 <vrna_seq_toupper@plt>
mov    %r14,%rdi
mov    %rbp,%rsi
mov    0x20(%rsp),%rdx
mov    0x18(%rsp),%r15
mov    %r15,%rcx
mov    %r13d,%r8d
call   10f0 <add_sequence@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbp,%rdi
call   1030 <free@plt>
jmp    1290 <parse_maf_alignment+0xc0>
test   %ebp,%ebp
js     1395 <parse_maf_alignment+0x1c5>
lea    0xc7d(%rip),%rdi
jmp    1390 <parse_maf_alignment+0x1c0>
test   %ebp,%ebp
jle    1395 <parse_maf_alignment+0x1c5>
lea    0xcd0(%rip),%rdi
call   10a0 <vrna_message_warning@plt>
mov    %r13d,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r13d,%r13d
jmp    13c9 <parse_maf_alignment+0x1f9>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %r15,%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%r15
mov    %rbx,%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
mov    %r15,%rsi
mov    %r13d,%edx
call   1080 <endmarker_msa_record@plt>
cmpl   $0x0,0x14(%rsp)
js     1395 <parse_maf_alignment+0x1c5>
test   %r13d,%r13d
jle    1395 <parse_maf_alignment+0x1c5>
movq   $0x0,0x8(%rsp)
mov    (%r15),%rax
mov    (%rax),%rdi
call   1050 <strlen@plt>
lea    0xc87(%rip),%rsi
lea    0x8(%rsp),%rdi
mov    %r13d,%edx
mov    %eax,%ecx
call   10c0 <asprintf@plt>
cmp    $0xffffffff,%eax
je     1427 <parse_maf_alignment+0x257>
mov    0x2bc5(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rsp),%rsi
call   10e0 <vrna_message_info@plt>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
jmp    1395 <parse_maf_alignment+0x1c5>

LLVM IR (-O0):
@.str = [76 x i8] c"Can't read from filepointer while parsing MAF formatted sequence alignment!\00"
@.str.1 = [20 x i8] c"s %s %d %d %c %d %s\00"
@.str.2 = [39 x i8] c"Did not find any MAF formatted record!\00"
@.str.3 = [38 x i8] c"%d sequences; length of alignment %d.\00"
@stderr = global i32 0
define i32 @parse_maf_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 i8
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
%23 = alloca i8*
store i32* %0, i32** %6
store i8*** %1, i8**** %7
store i8*** %2, i8**** %8
store i32 %3, i32* %9
store i8* null, i8** %10
store i32 0, i32* %16
store i32 0, i32* %17
%24 = load i32*, i32** %6
%25 = icmp ne i32* %24, null
br i1 %25, label %32, label %26
26: ; preds = %4
%27 = load i32, i32* %9
%28 = icmp sge i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @vrna_message_warning(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
store i32 -1, i32* %5
br label %185
32: ; preds = %4
%33 = load i8***, i8**** %7
%34 = icmp ne i8*** %33, null
br i1 %34, label %35, label %41
35: ; preds = %32
%36 = load i8***, i8**** %8
%37 = icmp ne i8*** %36, null
br i1 %37, label %38, label %41
38: ; preds = %35
%39 = load i8***, i8**** %7
store i8** null, i8*** %39
%40 = load i8***, i8**** %8
store i8** null, i8*** %40
br label %42
41: ; preds = %35, %32
store i32 -1, i32* %5
br label %185
42: ; preds = %38
store i32 0, i32* %21
br label %43
43: ; preds = %68, %42
%44 = load i32*, i32** %6
%45 = call i8* @get_line(i32* %44)
store i8* %45, i8** %10
%46 = icmp ne i8* %45, null
br i1 %46, label %47, label %71
47: ; preds = %43
%48 = load i8*, i8** %10
%49 = load i8, i8* %48
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 97
br i1 %51, label %52, label %68
52: ; preds = %47
%53 = load i8*, i8** %10
%54 = getelementptr inbounds i8, i8* %53, i64 1
%55 = load i8, i8* %54
%56 = sext i8 %55 to i32
%57 = icmp eq i32 %56, 0
br i1 %57, label %64, label %58
58: ; preds = %52
%59 = load i8*, i8** %10
%60 = getelementptr inbounds i8, i8* %59, i64 1
%61 = load i8, i8* %60
%62 = call i64 @isspace(i8 signext %61)
%63 = icmp ne i64 %62, 0
br i1 %63, label %64, label %67
64: ; preds = %58, %52
store i32 1, i32* %21
%65 = load i8*, i8** %10
%66 = call i32 @free(i8* %65)
br label %71
67: ; preds = %58
br label %68
68: ; preds = %67, %47
%69 = load i8*, i8** %10
%70 = call i32 @free(i8* %69)
br label %43
71: ; preds = %64, %43
%72 = load i32, i32* %21
%73 = icmp ne i32 %72, 0
br i1 %73, label %74, label %149
74: ; preds = %71
br label %75
75: ; preds = %145, %74
%76 = load i32*, i32** %6
%77 = call i8* @get_line(i32* %76)
store i8* %77, i8** %10
%78 = icmp ne i8* %77, null
br i1 %78, label %79, label %148
79: ; preds = %75
%80 = load i8*, i8** %10
%81 = call i32 @strlen(i8* %80)
store i32 %81, i32* %15
%82 = load i8*, i8** %10
%83 = load i8, i8* %82
%84 = sext i8 %83 to i32
switch i32 %84, label %142 [
i32 35, label %85
i32 115, label %86
]
85: ; preds = %79
br label %145
86: ; preds = %79
%87 = load i32, i32* %15
%88 = sext i32 %87 to i64
%89 = mul i64 1, %88
%90 = trunc i64 %89 to i32
%91 = call i64 @vrna_alloc(i32 %90)
%92 = inttoptr i64 %91 to i8*
store i8* %92, i8** %11
%93 = load i32, i32* %15
%94 = sext i32 %93 to i64
%95 = mul i64 1, %94
%96 = trunc i64 %95 to i32
%97 = call i64 @vrna_alloc(i32 %96)
%98 = inttoptr i64 %97 to i8*
store i8* %98, i8** %12
%99 = load i8*, i8** %10
%100 = load i8*, i8** %11
%101 = load i8*, i8** %12
%102 = call i32 @sscanf(i8* %99, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %100, i32* %18, i32* %19, i8* %13, i32* %20, i8* %101)
%103 = icmp eq i32 %102, 6
br i1 %103, label %104, label %137
104: ; preds = %86
%105 = load i32, i32* %16
%106 = add nsw i32 %105, 1
store i32 %106, i32* %16
%107 = load i8*, i8** %11
%108 = load i8*, i8** %11
%109 = call i32 @strlen(i8* %108)
%110 = add nsw i32 %109, 1
%111 = sext i32 %110 to i64
%112 = mul i64 1, %111
%113 = trunc i64 %112 to i32
%114 = call i64 @vrna_realloc(i8* %107, i32 %113)
%115 = inttoptr i64 %114 to i8*
store i8* %115, i8** %11
%116 = load i8*, i8** %12
%117 = load i8*, i8** %12
%118 = call i32 @strlen(i8* %117)
%119 = add nsw i32 %118, 1
%120 = sext i32 %119 to i64
%121 = mul i64 1, %120
%122 = trunc i64 %121 to i32
%123 = call i64 @vrna_realloc(i8* %116, i32 %122)
%124 = inttoptr i64 %123 to i8*
store i8* %124, i8** %12
%125 = load i8*, i8** %12
%126 = call i32 @vrna_seq_toupper(i8* %125)
%127 = load i8*, i8** %11
%128 = load i8*, i8** %12
%129 = load i8***, i8**** %7
%130 = load i8***, i8**** %8
%131 = load i32, i32* %16
%132 = call i32 @add_sequence(i8* %127, i8* %128, i8*** %129, i8*** %130, i32 %131)
%133 = load i8*, i8** %11
%134 = call i32 @free(i8* %133)
%135 = load i8*, i8** %12
%136 = call i32 @free(i8* %135)
br label %145
137: ; preds = %86
%138 = load i8*, i8** %11
%139 = call i32 @free(i8* %138)
%140 = load i8*, i8** %12
%141 = call i32 @free(i8* %140)
br label %142
142: ; preds = %79, %137
%143 = load i8*, i8** %10
%144 = call i32 @free(i8* %143)
br label %156
145: ; preds = %104, %85
%146 = load i8*, i8** %10
%147 = call i32 @free(i8* %146)
br label %75
148: ; preds = %75
br label %155
149: ; preds = %71
%150 = load i32, i32* %9
%151 = icmp sgt i32 %150, 0
br i1 %151, label %152, label %154
152: ; preds = %149
%153 = call i32 @vrna_message_warning(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
br label %154
154: ; preds = %152, %149
store i32 -1, i32* %5
br label %185
155: ; preds = %148
br label %156
156: ; preds = %155, %142
%157 = load i8***, i8**** %7
%158 = load i8***, i8**** %8
%159 = load i32, i32* %16
%160 = call i32 @endmarker_msa_record(i8*** %157, i8*** %158, i32 %159)
%161 = load i32, i32* %16
%162 = icmp sgt i32 %161, 0
br i1 %162, label %163, label %183
163: ; preds = %156
%164 = load i32, i32* %9
%165 = icmp sge i32 %164, 0
br i1 %165, label %166, label %183
166: ; preds = %163
store i8* null, i8** %23
%167 = load i32, i32* %16
%168 = load i8***, i8**** %8
%169 = load i8**, i8*** %168
%170 = getelementptr inbounds i8*, i8** %169, i64 0
%171 = load i8*, i8** %170
%172 = call i32 @strlen(i8* %171)
%173 = call i32 @asprintf(i8** %23, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %167, i32 %172)
store i32 %173, i32* %22
%174 = load i32, i32* %22
%175 = icmp ne i32 %174, -1
br i1 %175, label %176, label %180
176: ; preds = %166
%177 = load i32, i32* @stderr
%178 = load i8*, i8** %23
%179 = call i32 @vrna_message_info(i32 %177, i8* %178)
br label %180
180: ; preds = %176, %166
%181 = load i8*, i8** %23
%182 = call i32 @free(i8* %181)
br label %183
183: ; preds = %180, %163, %156
%184 = load i32, i32* %16
store i32 %184, i32* %5
br label %185
185: ; preds = %183, %154, %41, %31
%186 = load i32, i32* %5
ret i32 %186
}

LLVM IR (-O2):
@.str = [76 x i8] c"Can't read from filepointer while parsing MAF formatted sequence alignment!\00"
@.str.1 = [20 x i8] c"s %s %d %d %c %d %s\00"
@.str.2 = [39 x i8] c"Did not find any MAF formatted record!\00"
@.str.3 = [38 x i8] c"%d sequences; length of alignment %d.\00"
@stderr = global i32 0
define i32 @parse_maf_alignment(i32* %0, i8*** %1, i8*** %2, i32 %3) {
%5 = alloca i8
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i8*
%10 = bitcast i32* %6 to i8*
%11 = bitcast i32* %7 to i8*
%12 = bitcast i32* %8 to i8*
%13 = icmp eq i32* %0, null
br i1 %13, label %14, label %18
14: ; preds = %4
%15 = icmp sgt i32 %3, -1
br i1 %15, label %16, label %107
16: ; preds = %14
%17 = tail call i32 @vrna_message_warning(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str, i64 0, i64 0))
br label %107
18: ; preds = %4
%19 = icmp ne i8*** %1, null
%20 = icmp ne i8*** %2, null
%21 = and i1 %19, %20
br i1 %21, label %22, label %107
22: ; preds = %18
store i8** null, i8*** %1
store i8** null, i8*** %2
%23 = tail call i8* @get_line(i32* %0)
%24 = icmp eq i8* %23, null
br i1 %24, label %83, label %25
25: ; preds = %22, %40
%26 = phi i8* [ %42, %40 ], [ %23, %22 ]
%27 = load i8, i8* %26
%28 = icmp eq i8 %27, 97
br i1 %28, label %29, label %40
29: ; preds = %25
%30 = getelementptr inbounds i8, i8* %26, i64 1
%31 = load i8, i8* %30
%32 = icmp eq i8 %31, 0
br i1 %32, label %36, label %33
33: ; preds = %29
%34 = tail call i64 @isspace(i8 signext %31)
%35 = icmp eq i64 %34, 0
br i1 %35, label %40, label %36
36: ; preds = %33, %29
%37 = tail call i32 @free(i8* %26)
%38 = call i8* @get_line(i32* %0)
%39 = icmp eq i8* %38, null
br i1 %39, label %87, label %44
40: ; preds = %33, %25
%41 = tail call i32 @free(i8* %26)
%42 = tail call i8* @get_line(i32* %0)
%43 = icmp eq i8* %42, null
br i1 %43, label %83, label %25
44: ; preds = %36, %78
%45 = phi i8* [ %81, %78 ], [ %38, %36 ]
%46 = phi i32 [ %79, %78 ], [ 0, %36 ]
%47 = call i32 @strlen(i8* %45)
%48 = load i8, i8* %45
%49 = sext i8 %48 to i32
switch i32 %49, label %76 [
i32 35, label %78
i32 115, label %50
]
50: ; preds = %44
%51 = call i64 @vrna_alloc(i32 %47)
%52 = inttoptr i64 %51 to i8*
%53 = call i64 @vrna_alloc(i32 %47)
%54 = inttoptr i64 %53 to i8*
%55 = call i32 @sscanf(i8* %45, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i8* %52, i32* %6, i32* %7, i8* %5, i32* %8, i8* %54)
%56 = icmp eq i32 %55, 6
br i1 %56, label %57, label %71
57: ; preds = %50
%58 = add nsw i32 %46, 1
%59 = call i32 @strlen(i8* %52)
%60 = add nsw i32 %59, 1
%61 = call i64 @vrna_realloc(i8* %52, i32 %60)
%62 = inttoptr i64 %61 to i8*
%63 = call i32 @strlen(i8* %54)
%64 = add nsw i32 %63, 1
%65 = call i64 @vrna_realloc(i8* %54, i32 %64)
%66 = inttoptr i64 %65 to i8*
%67 = call i32 @vrna_seq_toupper(i8* %66)
%68 = call i32 @add_sequence(i8* %62, i8* %66, i8*** %1, i8*** %2, i32 %58)
%69 = call i32 @free(i8* %62)
%70 = call i32 @free(i8* %66)
br label %78
71: ; preds = %50
%72 = inttoptr i64 %51 to i8*
%73 = inttoptr i64 %53 to i8*
%74 = call i32 @free(i8* %72)
%75 = call i32 @free(i8* %73)
br label %76
76: ; preds = %44, %71
%77 = call i32 @free(i8* %45)
br label %87
78: ; preds = %57, %44
%79 = phi i32 [ %58, %57 ], [ %46, %44 ]
%80 = call i32 @free(i8* %45)
%81 = call i8* @get_line(i32* %0)
%82 = icmp eq i8* %81, null
br i1 %82, label %87, label %44
83: ; preds = %40, %22
%84 = icmp sgt i32 %3, 0
br i1 %84, label %85, label %107
85: ; preds = %83
%86 = tail call i32 @vrna_message_warning(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.2, i64 0, i64 0))
br label %107
87: ; preds = %78, %36, %76
%88 = phi i32 [ %46, %76 ], [ 0, %36 ], [ %79, %78 ]
%89 = call i32 @endmarker_msa_record(i8*** %1, i8*** %2, i32 %88)
%90 = icmp sgt i32 %88, 0
%91 = icmp sgt i32 %3, -1
%92 = and i1 %91, %90
br i1 %92, label %93, label %107
93: ; preds = %87
%94 = bitcast i8** %9 to i8*
store i8* null, i8** %9
%95 = load i8**, i8*** %2
%96 = load i8*, i8** %95
%97 = call i32 @strlen(i8* %96)
%98 = call i32 @asprintf(i8** %9, i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 %88, i32 %97)
%99 = icmp eq i32 %98, -1
br i1 %99, label %104, label %100
100: ; preds = %93
%101 = load i32, i32* @stderr
%102 = load i8*, i8** %9
%103 = call i32 @vrna_message_info(i32 %101, i8* %102)
br label %104
104: ; preds = %100, %93
%105 = load i8*, i8** %9
%106 = call i32 @free(i8* %105)
br label %107
107: ; preds = %85, %83, %104, %87, %18, %14, %16
%108 = phi i32 [ -1, %16 ], [ -1, %14 ], [ -1, %18 ], [ -1, %85 ], [ -1, %83 ], [ %88, %104 ], [ %88, %87 ]
ret i32 %108
}