#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 */
scalar_t__ EOF;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
scalar_t__ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *);
scalar_t__ strncmp(char *, char *, int);
void transform_singlehmmfile_to_multi(FILE *hmmfile, FILE *outfile) {
  char s[500], s_2[500];
  if (outfile == NULL || hmmfile == NULL) {
    printf("Could not transform singlehmm to multi\n");
    exit(0);
  }
  while (1) {
    if (fgets(s, 500, hmmfile) != NULL) {
      if (strncmp(s, "ALPHABET:", 9) == 0) {
        if (fputs("NR OF ALPHABETS: 1\n", outfile) == EOF) {
          perror("");
        }
        if (fputs("ALPHABET 1:", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[9], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "ALPHABET LENGTH:", 16) == 0) {
        if (fputs("ALPHABET LENGTH 1:", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[16], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "NR OF EMISSION PRIORFILES:", 26) == 0) {
        if (fputs("NR OF EMISSION PRIORFILES 1:", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[26], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "EMISSION PRIORFILES:", 20) == 0) {
        if (fputs("EMISSION PRIORFILES_1:", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[20], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "Emission prior file:", 20) == 0) {
        if (fputs("Emission prior file 1:", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[20], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "Emission prior scaler:", 22) == 0) {
        if (fputs("Emission prior scaler 1:", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[22], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "Nr emissions =", 14) == 0) {
        if (fputs("Nr emissions 1 =", outfile) == EOF) {
          perror("");
        }
        if (fputs(&s[14], outfile) == EOF) {
          perror("");
        }
      } else if (strncmp(s, "Emission probabilities", 22) == 0) {
        if (fputs("Emission probabilities 1\n", outfile) == EOF) {
          perror("");
        }
      } else {
        if (fputs(s, outfile) == EOF) {
          perror("");
        }
      }
    } else {
      break;
    }
  }
}


x86 assembly (clang, -O0):
<transform_singlehmmfile_to_multi>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1189 <transform_singlehmmfile_to_multi+0x29>
cmpq   $0x0,-0x8(%rbp)
jne    119c <transform_singlehmmfile_to_multi+0x3c>
lea    0xe70(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1080 <exit@plt>
jmp    11a1 <transform_singlehmmfile_to_multi+0x41>
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x1f4,%esi
call   1060 <fgets@plt>
cmp    $0x0,%rax
je     162d <transform_singlehmmfile_to_multi+0x4cd>
lea    -0x210(%rbp),%rdi
lea    0xe5a(%rip),%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    126f <transform_singlehmmfile_to_multi+0x10f>
mov    -0x10(%rbp),%rsi
lea    0xe45(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2def(%rip),%rcx
cmp    (%rcx),%rax
jne    120e <transform_singlehmmfile_to_multi+0xae>
lea    0xe3c(%rip),%rdi
call   1070 <perror@plt>
mov    -0x10(%rbp),%rsi
lea    0xe2d(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2dc3(%rip),%rcx
cmp    (%rcx),%rax
jne    123a <transform_singlehmmfile_to_multi+0xda>
lea    0xe10(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0x9,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2d93(%rip),%rcx
cmp    (%rcx),%rax
jne    126a <transform_singlehmmfile_to_multi+0x10a>
lea    0xde0(%rip),%rdi
call   1070 <perror@plt>
jmp    1628 <transform_singlehmmfile_to_multi+0x4c8>
lea    -0x210(%rbp),%rdi
lea    0xdd5(%rip),%rsi
mov    $0x10,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    12f2 <transform_singlehmmfile_to_multi+0x192>
mov    -0x10(%rbp),%rsi
lea    0xdc7(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2d40(%rip),%rcx
cmp    (%rcx),%rax
jne    12bd <transform_singlehmmfile_to_multi+0x15d>
lea    0xd8d(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0x10,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2d10(%rip),%rcx
cmp    (%rcx),%rax
jne    12ed <transform_singlehmmfile_to_multi+0x18d>
lea    0xd5d(%rip),%rdi
call   1070 <perror@plt>
jmp    1623 <transform_singlehmmfile_to_multi+0x4c3>
lea    -0x210(%rbp),%rdi
lea    0xd76(%rip),%rsi
mov    $0x1a,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1375 <transform_singlehmmfile_to_multi+0x215>
mov    -0x10(%rbp),%rsi
lea    0xd72(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2cbd(%rip),%rcx
cmp    (%rcx),%rax
jne    1340 <transform_singlehmmfile_to_multi+0x1e0>
lea    0xd0a(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0x1a,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2c8d(%rip),%rcx
cmp    (%rcx),%rax
jne    1370 <transform_singlehmmfile_to_multi+0x210>
lea    0xcda(%rip),%rdi
call   1070 <perror@plt>
jmp    161e <transform_singlehmmfile_to_multi+0x4be>
lea    -0x210(%rbp),%rdi
lea    0xcf9(%rip),%rsi
mov    $0x14,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    13f8 <transform_singlehmmfile_to_multi+0x298>
mov    -0x10(%rbp),%rsi
lea    0xd0c(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2c3a(%rip),%rcx
cmp    (%rcx),%rax
jne    13c3 <transform_singlehmmfile_to_multi+0x263>
lea    0xc87(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0x14,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2c0a(%rip),%rcx
cmp    (%rcx),%rax
jne    13f3 <transform_singlehmmfile_to_multi+0x293>
lea    0xc57(%rip),%rdi
call   1070 <perror@plt>
jmp    1619 <transform_singlehmmfile_to_multi+0x4b9>
lea    -0x210(%rbp),%rdi
lea    0xcbf(%rip),%rsi
mov    $0x14,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    147b <transform_singlehmmfile_to_multi+0x31b>
mov    -0x10(%rbp),%rsi
lea    0xcb5(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2bb7(%rip),%rcx
cmp    (%rcx),%rax
jne    1446 <transform_singlehmmfile_to_multi+0x2e6>
lea    0xc04(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0x14,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2b87(%rip),%rcx
cmp    (%rcx),%rax
jne    1476 <transform_singlehmmfile_to_multi+0x316>
lea    0xbd4(%rip),%rdi
call   1070 <perror@plt>
jmp    1614 <transform_singlehmmfile_to_multi+0x4b4>
lea    -0x210(%rbp),%rdi
lea    0xc68(%rip),%rsi
mov    $0x16,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    14fe <transform_singlehmmfile_to_multi+0x39e>
mov    -0x10(%rbp),%rsi
lea    0xc60(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2b34(%rip),%rcx
cmp    (%rcx),%rax
jne    14c9 <transform_singlehmmfile_to_multi+0x369>
lea    0xb81(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0x16,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2b04(%rip),%rcx
cmp    (%rcx),%rax
jne    14f9 <transform_singlehmmfile_to_multi+0x399>
lea    0xb51(%rip),%rdi
call   1070 <perror@plt>
jmp    160f <transform_singlehmmfile_to_multi+0x4af>
lea    -0x210(%rbp),%rdi
lea    0xc15(%rip),%rsi
mov    $0xe,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    1581 <transform_singlehmmfile_to_multi+0x421>
mov    -0x10(%rbp),%rsi
lea    0xc05(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2ab1(%rip),%rcx
cmp    (%rcx),%rax
jne    154c <transform_singlehmmfile_to_multi+0x3ec>
lea    0xafe(%rip),%rdi
call   1070 <perror@plt>
lea    -0x210(%rbp),%rdi
add    $0xe,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x2a81(%rip),%rcx
cmp    (%rcx),%rax
jne    157c <transform_singlehmmfile_to_multi+0x41c>
lea    0xace(%rip),%rdi
call   1070 <perror@plt>
jmp    160a <transform_singlehmmfile_to_multi+0x4aa>
lea    -0x210(%rbp),%rdi
lea    0xbb2(%rip),%rsi
mov    $0x16,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
jne    15d4 <transform_singlehmmfile_to_multi+0x474>
mov    -0x10(%rbp),%rsi
lea    0xbaa(%rip),%rdi
call   1050 <fputs@plt>
mov    0x2a2e(%rip),%rcx
cmp    (%rcx),%rax
jne    15cf <transform_singlehmmfile_to_multi+0x46f>
lea    0xa7b(%rip),%rdi
call   1070 <perror@plt>
jmp    1605 <transform_singlehmmfile_to_multi+0x4a5>
lea    -0x210(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1050 <fputs@plt>
mov    0x29fd(%rip),%rcx
cmp    (%rcx),%rax
jne    1600 <transform_singlehmmfile_to_multi+0x4a0>
lea    0xa4a(%rip),%rdi
call   1070 <perror@plt>
jmp    1605 <transform_singlehmmfile_to_multi+0x4a5>
jmp    160a <transform_singlehmmfile_to_multi+0x4aa>
jmp    160f <transform_singlehmmfile_to_multi+0x4af>
jmp    1614 <transform_singlehmmfile_to_multi+0x4b4>
jmp    1619 <transform_singlehmmfile_to_multi+0x4b9>
jmp    161e <transform_singlehmmfile_to_multi+0x4be>
jmp    1623 <transform_singlehmmfile_to_multi+0x4c3>
jmp    1628 <transform_singlehmmfile_to_multi+0x4c8>
jmp    1632 <transform_singlehmmfile_to_multi+0x4d2>
jmp    1637 <transform_singlehmmfile_to_multi+0x4d7>
jmp    11a1 <transform_singlehmmfile_to_multi+0x41>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<transform_singlehmmfile_to_multi>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x1f8,%rsp
test   %rdi,%rdi
je     146e <transform_singlehmmfile_to_multi+0x30e>
mov    %rsi,%rbx
test   %rsi,%rsi
je     146e <transform_singlehmmfile_to_multi+0x30e>
mov    %rdi,%r14
mov    %rsp,%rdi
mov    $0x1f4,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     145c <transform_singlehmmfile_to_multi+0x2fc>
lea    0xe57(%rip),%rbp
mov    %rsp,%r13
mov    0x2e35(%rip),%r12
lea    0xe70(%rip),%r15
jmp    11f0 <transform_singlehmmfile_to_multi+0x90>
nopl   0x0(%rax)
lea    0x9(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     137f <transform_singlehmmfile_to_multi+0x21f>
mov    %r13,%rdi
mov    $0x1f4,%esi
mov    %r14,%rdx
call   1060 <fgets@plt>
test   %rax,%rax
je     145c <transform_singlehmmfile_to_multi+0x2fc>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    $0x9,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     12e0 <transform_singlehmmfile_to_multi+0x180>
mov    %r13,%rdi
mov    %r15,%rsi
mov    $0x10,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1330 <transform_singlehmmfile_to_multi+0x1d0>
mov    %r13,%rdi
lea    0xe22(%rip),%rsi
mov    $0x1a,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1353 <transform_singlehmmfile_to_multi+0x1f3>
mov    %r13,%rdi
lea    0xe0b(%rip),%rsi
mov    $0x14,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1376 <transform_singlehmmfile_to_multi+0x216>
mov    %r13,%rdi
lea    0xe37(%rip),%rsi
mov    $0x14,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     1390 <transform_singlehmmfile_to_multi+0x230>
mov    %r13,%rdi
lea    0xe46(%rip),%rsi
mov    $0x16,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13af <transform_singlehmmfile_to_multi+0x24f>
mov    %r13,%rdi
lea    0xe59(%rip),%rsi
mov    $0xe,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13ce <transform_singlehmmfile_to_multi+0x26e>
mov    %r13,%rdi
lea    0xe5c(%rip),%rsi
mov    $0x16,%edx
call   1030 <strncmp@plt>
test   %rax,%rax
je     13fe <transform_singlehmmfile_to_multi+0x29e>
mov    %r13,%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
nopl   0x0(%rax,%rax,1)
lea    0xd23(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     13ed <transform_singlehmmfile_to_multi+0x28d>
lea    0xd1e(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
jne    11c0 <transform_singlehmmfile_to_multi+0x60>
lea    0xd04(%rip),%rdi
call   1070 <perror@plt>
jmp    11c0 <transform_singlehmmfile_to_multi+0x60>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
lea    0xd04(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     140a <transform_singlehmmfile_to_multi+0x2aa>
lea    0x10(%rsp),%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
lea    0xd0f(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     142c <transform_singlehmmfile_to_multi+0x2cc>
lea    0x1a(%rsp),%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
lea    0xd09(%rip),%rdi
jmp    1397 <transform_singlehmmfile_to_multi+0x237>
lea    0xc97(%rip),%rdi
call   1070 <perror@plt>
jmp    11d7 <transform_singlehmmfile_to_multi+0x77>
lea    0xd1b(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     141b <transform_singlehmmfile_to_multi+0x2bb>
lea    0x14(%rsp),%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
lea    0xd2a(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     143d <transform_singlehmmfile_to_multi+0x2dd>
lea    0x16(%rsp),%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
lea    0xd33(%rip),%rdi
mov    %rbx,%rsi
call   1050 <fputs@plt>
cmp    (%r12),%rax
je     144e <transform_singlehmmfile_to_multi+0x2ee>
lea    0xe(%rsp),%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
lea    0xc29(%rip),%rdi
call   1070 <perror@plt>
jmp    12f9 <transform_singlehmmfile_to_multi+0x199>
lea    0xd2b(%rip),%rdi
jmp    11c5 <transform_singlehmmfile_to_multi+0x65>
lea    0xc0c(%rip),%rdi
call   1070 <perror@plt>
jmp    1349 <transform_singlehmmfile_to_multi+0x1e9>
lea    0xbfb(%rip),%rdi
call   1070 <perror@plt>
jmp    13a5 <transform_singlehmmfile_to_multi+0x245>
lea    0xbea(%rip),%rdi
call   1070 <perror@plt>
jmp    136c <transform_singlehmmfile_to_multi+0x20c>
lea    0xbd9(%rip),%rdi
call   1070 <perror@plt>
jmp    13c4 <transform_singlehmmfile_to_multi+0x264>
lea    0xbc8(%rip),%rdi
call   1070 <perror@plt>
jmp    13e3 <transform_singlehmmfile_to_multi+0x283>
add    $0x1f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0xcd5(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1080 <exit@plt>

LLVM IR (-O0):
@.str = [40 x i8] c"Could not transform singlehmm to multi\0A\00"
@.str.1 = [10 x i8] c"ALPHABET:\00"
@.str.2 = [20 x i8] c"NR OF ALPHABETS: 1\0A\00"
@EOF = global i64 0
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"ALPHABET 1:\00"
@.str.5 = [17 x i8] c"ALPHABET LENGTH:\00"
@.str.6 = [19 x i8] c"ALPHABET LENGTH 1:\00"
@.str.7 = [27 x i8] c"NR OF EMISSION PRIORFILES:\00"
@.str.8 = [29 x i8] c"NR OF EMISSION PRIORFILES 1:\00"
@.str.9 = [21 x i8] c"EMISSION PRIORFILES:\00"
@.str.10 = [23 x i8] c"EMISSION PRIORFILES_1:\00"
@.str.11 = [21 x i8] c"Emission prior file:\00"
@.str.12 = [23 x i8] c"Emission prior file 1:\00"
@.str.13 = [23 x i8] c"Emission prior scaler:\00"
@.str.14 = [25 x i8] c"Emission prior scaler 1:\00"
@.str.15 = [15 x i8] c"Nr emissions =\00"
@.str.16 = [17 x i8] c"Nr emissions 1 =\00"
@.str.17 = [23 x i8] c"Emission probabilities\00"
@.str.18 = [26 x i8] c"Emission probabilities 1\0A\00"
define void @transform_singlehmmfile_to_multi(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca [500 x i8]
%6 = alloca [500 x i8]
store i32* %0, i32** %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = icmp eq i32* %7, null
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i32*, i32** %3
%11 = icmp eq i32* %10, null
br i1 %11, label %12, label %15
12: ; preds = %9, %2
%13 = call i32 @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 0)
unreachable
15: ; preds = %9
br label %16
16: ; preds = %15, %198
%17 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%18 = load i32*, i32** %3
%19 = call i32* @fgets(i8* %17, i32 500, i32* %18)
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %197
21: ; preds = %16
%22 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%23 = call i64 @strncmp(i8* %22, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %48
25: ; preds = %21
%26 = load i32*, i32** %4
%27 = call i64 @fputs(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32* %26)
%28 = load i64, i64* @EOF
%29 = icmp eq i64 %27, %28
br i1 %29, label %30, label %32
30: ; preds = %25
%31 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %32
32: ; preds = %30, %25
%33 = load i32*, i32** %4
%34 = call i64 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32* %33)
%35 = load i64, i64* @EOF
%36 = icmp eq i64 %34, %35
br i1 %36, label %37, label %39
37: ; preds = %32
%38 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %39
39: ; preds = %37, %32
%40 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 9
%41 = load i32*, i32** %4
%42 = call i64 @fputs(i8* %40, i32* %41)
%43 = load i64, i64* @EOF
%44 = icmp eq i64 %42, %43
br i1 %44, label %45, label %47
45: ; preds = %39
%46 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %47
47: ; preds = %45, %39
br label %196
48: ; preds = %21
%49 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%50 = call i64 @strncmp(i8* %49, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 16)
%51 = icmp eq i64 %50, 0
br i1 %51, label %52, label %68
52: ; preds = %48
%53 = load i32*, i32** %4
%54 = call i64 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32* %53)
%55 = load i64, i64* @EOF
%56 = icmp eq i64 %54, %55
br i1 %56, label %57, label %59
57: ; preds = %52
%58 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %59
59: ; preds = %57, %52
%60 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 16
%61 = load i32*, i32** %4
%62 = call i64 @fputs(i8* %60, i32* %61)
%63 = load i64, i64* @EOF
%64 = icmp eq i64 %62, %63
br i1 %64, label %65, label %67
65: ; preds = %59
%66 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %67
67: ; preds = %65, %59
br label %195
68: ; preds = %48
%69 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%70 = call i64 @strncmp(i8* %69, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 26)
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %88
72: ; preds = %68
%73 = load i32*, i32** %4
%74 = call i64 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32* %73)
%75 = load i64, i64* @EOF
%76 = icmp eq i64 %74, %75
br i1 %76, label %77, label %79
77: ; preds = %72
%78 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %79
79: ; preds = %77, %72
%80 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 26
%81 = load i32*, i32** %4
%82 = call i64 @fputs(i8* %80, i32* %81)
%83 = load i64, i64* @EOF
%84 = icmp eq i64 %82, %83
br i1 %84, label %85, label %87
85: ; preds = %79
%86 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %87
87: ; preds = %85, %79
br label %194
88: ; preds = %68
%89 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%90 = call i64 @strncmp(i8* %89, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 20)
%91 = icmp eq i64 %90, 0
br i1 %91, label %92, label %108
92: ; preds = %88
%93 = load i32*, i32** %4
%94 = call i64 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i32* %93)
%95 = load i64, i64* @EOF
%96 = icmp eq i64 %94, %95
br i1 %96, label %97, label %99
97: ; preds = %92
%98 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %99
99: ; preds = %97, %92
%100 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 20
%101 = load i32*, i32** %4
%102 = call i64 @fputs(i8* %100, i32* %101)
%103 = load i64, i64* @EOF
%104 = icmp eq i64 %102, %103
br i1 %104, label %105, label %107
105: ; preds = %99
%106 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %107
107: ; preds = %105, %99
br label %193
108: ; preds = %88
%109 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%110 = call i64 @strncmp(i8* %109, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i32 20)
%111 = icmp eq i64 %110, 0
br i1 %111, label %112, label %128
112: ; preds = %108
%113 = load i32*, i32** %4
%114 = call i64 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32* %113)
%115 = load i64, i64* @EOF
%116 = icmp eq i64 %114, %115
br i1 %116, label %117, label %119
117: ; preds = %112
%118 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %119
119: ; preds = %117, %112
%120 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 20
%121 = load i32*, i32** %4
%122 = call i64 @fputs(i8* %120, i32* %121)
%123 = load i64, i64* @EOF
%124 = icmp eq i64 %122, %123
br i1 %124, label %125, label %127
125: ; preds = %119
%126 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %127
127: ; preds = %125, %119
br label %192
128: ; preds = %108
%129 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%130 = call i64 @strncmp(i8* %129, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i32 22)
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %148
132: ; preds = %128
%133 = load i32*, i32** %4
%134 = call i64 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32* %133)
%135 = load i64, i64* @EOF
%136 = icmp eq i64 %134, %135
br i1 %136, label %137, label %139
137: ; preds = %132
%138 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %139
139: ; preds = %137, %132
%140 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 22
%141 = load i32*, i32** %4
%142 = call i64 @fputs(i8* %140, i32* %141)
%143 = load i64, i64* @EOF
%144 = icmp eq i64 %142, %143
br i1 %144, label %145, label %147
145: ; preds = %139
%146 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %147
147: ; preds = %145, %139
br label %191
148: ; preds = %128
%149 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%150 = call i64 @strncmp(i8* %149, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i32 14)
%151 = icmp eq i64 %150, 0
br i1 %151, label %152, label %168
152: ; preds = %148
%153 = load i32*, i32** %4
%154 = call i64 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i32* %153)
%155 = load i64, i64* @EOF
%156 = icmp eq i64 %154, %155
br i1 %156, label %157, label %159
157: ; preds = %152
%158 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %159
159: ; preds = %157, %152
%160 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 14
%161 = load i32*, i32** %4
%162 = call i64 @fputs(i8* %160, i32* %161)
%163 = load i64, i64* @EOF
%164 = icmp eq i64 %162, %163
br i1 %164, label %165, label %167
165: ; preds = %159
%166 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %167
167: ; preds = %165, %159
br label %190
168: ; preds = %148
%169 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%170 = call i64 @strncmp(i8* %169, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i32 22)
%171 = icmp eq i64 %170, 0
br i1 %171, label %172, label %180
172: ; preds = %168
%173 = load i32*, i32** %4
%174 = call i64 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i32* %173)
%175 = load i64, i64* @EOF
%176 = icmp eq i64 %174, %175
br i1 %176, label %177, label %179
177: ; preds = %172
%178 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %179
179: ; preds = %177, %172
br label %189
180: ; preds = %168
%181 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%182 = load i32*, i32** %4
%183 = call i64 @fputs(i8* %181, i32* %182)
%184 = load i64, i64* @EOF
%185 = icmp eq i64 %183, %184
br i1 %185, label %186, label %188
186: ; preds = %180
%187 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %188
188: ; preds = %186, %180
br label %189
189: ; preds = %188, %179
br label %190
190: ; preds = %189, %167
br label %191
191: ; preds = %190, %147
br label %192
192: ; preds = %191, %127
br label %193
193: ; preds = %192, %107
br label %194
194: ; preds = %193, %87
br label %195
195: ; preds = %194, %67
br label %196
196: ; preds = %195, %47
br label %198
197: ; preds = %16
br label %199
198: ; preds = %196
br label %16
199: ; preds = %197
ret void
}

LLVM IR (-O2):
@.str.1 = [10 x i8] c"ALPHABET:\00"
@.str.2 = [20 x i8] c"NR OF ALPHABETS: 1\0A\00"
@EOF = global i64 0
@.str.3 = [1 x i8] zeroinitializer
@.str.4 = [12 x i8] c"ALPHABET 1:\00"
@.str.5 = [17 x i8] c"ALPHABET LENGTH:\00"
@.str.6 = [19 x i8] c"ALPHABET LENGTH 1:\00"
@.str.7 = [27 x i8] c"NR OF EMISSION PRIORFILES:\00"
@.str.8 = [29 x i8] c"NR OF EMISSION PRIORFILES 1:\00"
@.str.9 = [21 x i8] c"EMISSION PRIORFILES:\00"
@.str.10 = [23 x i8] c"EMISSION PRIORFILES_1:\00"
@.str.11 = [21 x i8] c"Emission prior file:\00"
@.str.12 = [23 x i8] c"Emission prior file 1:\00"
@.str.13 = [23 x i8] c"Emission prior scaler:\00"
@.str.14 = [25 x i8] c"Emission prior scaler 1:\00"
@.str.15 = [15 x i8] c"Nr emissions =\00"
@.str.16 = [17 x i8] c"Nr emissions 1 =\00"
@.str.17 = [23 x i8] c"Emission probabilities\00"
@.str.18 = [26 x i8] c"Emission probabilities 1\0A\00"
@str = [39 x i8] c"Could not transform singlehmm to multi\00"
define void @transform_singlehmmfile_to_multi(i32* %0, i32* %1) {
%3 = alloca [500 x i8]
%4 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%5 = icmp eq i32* %1, null
%6 = icmp eq i32* %0, null
%7 = or i1 %6, %5
br i1 %7, label %18, label %8
8: ; preds = %2
%9 = call i32* @fgets(i8* %4, i32 500, i32* %0)
%10 = icmp eq i32* %9, null
br i1 %10, label %134, label %11
11: ; preds = %8
%12 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 14
%13 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 22
%14 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 20
%15 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 26
%16 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 16
%17 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 9
br label %21
18: ; preds = %2
%19 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @str, i64 0, i64 0))
%20 = tail call i32 @exit(i32 0)
unreachable
21: ; preds = %11, %131
%22 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 9)
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %40
24: ; preds = %21
%25 = call i64 @fputs(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32* %1)
%26 = load i64, i64* @EOF
%27 = icmp eq i64 %25, %26
br i1 %27, label %28, label %30
28: ; preds = %24
%29 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %30
30: ; preds = %28, %24
%31 = call i64 @fputs(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i32* %1)
%32 = load i64, i64* @EOF
%33 = icmp eq i64 %31, %32
br i1 %33, label %34, label %36
34: ; preds = %30
%35 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %30
%37 = call i64 @fputs(i8* %17, i32* %1)
%38 = load i64, i64* @EOF
%39 = icmp eq i64 %37, %38
br i1 %39, label %129, label %131
40: ; preds = %21
%41 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0), i32 16)
%42 = icmp eq i64 %41, 0
br i1 %42, label %43, label %53
43: ; preds = %40
%44 = call i64 @fputs(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.6, i64 0, i64 0), i32* %1)
%45 = load i64, i64* @EOF
%46 = icmp eq i64 %44, %45
br i1 %46, label %47, label %49
47: ; preds = %43
%48 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %49
49: ; preds = %47, %43
%50 = call i64 @fputs(i8* %16, i32* %1)
%51 = load i64, i64* @EOF
%52 = icmp eq i64 %50, %51
br i1 %52, label %129, label %131
53: ; preds = %40
%54 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.7, i64 0, i64 0), i32 26)
%55 = icmp eq i64 %54, 0
br i1 %55, label %56, label %66
56: ; preds = %53
%57 = call i64 @fputs(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.8, i64 0, i64 0), i32* %1)
%58 = load i64, i64* @EOF
%59 = icmp eq i64 %57, %58
br i1 %59, label %60, label %62
60: ; preds = %56
%61 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %62
62: ; preds = %60, %56
%63 = call i64 @fputs(i8* %15, i32* %1)
%64 = load i64, i64* @EOF
%65 = icmp eq i64 %63, %64
br i1 %65, label %129, label %131
66: ; preds = %53
%67 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.9, i64 0, i64 0), i32 20)
%68 = icmp eq i64 %67, 0
br i1 %68, label %69, label %79
69: ; preds = %66
%70 = call i64 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.10, i64 0, i64 0), i32* %1)
%71 = load i64, i64* @EOF
%72 = icmp eq i64 %70, %71
br i1 %72, label %73, label %75
73: ; preds = %69
%74 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %75
75: ; preds = %73, %69
%76 = call i64 @fputs(i8* %14, i32* %1)
%77 = load i64, i64* @EOF
%78 = icmp eq i64 %76, %77
br i1 %78, label %129, label %131
79: ; preds = %66
%80 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.11, i64 0, i64 0), i32 20)
%81 = icmp eq i64 %80, 0
br i1 %81, label %82, label %92
82: ; preds = %79
%83 = call i64 @fputs(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.12, i64 0, i64 0), i32* %1)
%84 = load i64, i64* @EOF
%85 = icmp eq i64 %83, %84
br i1 %85, label %86, label %88
86: ; preds = %82
%87 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %88
88: ; preds = %86, %82
%89 = call i64 @fputs(i8* %14, i32* %1)
%90 = load i64, i64* @EOF
%91 = icmp eq i64 %89, %90
br i1 %91, label %129, label %131
92: ; preds = %79
%93 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.13, i64 0, i64 0), i32 22)
%94 = icmp eq i64 %93, 0
br i1 %94, label %95, label %105
95: ; preds = %92
%96 = call i64 @fputs(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.14, i64 0, i64 0), i32* %1)
%97 = load i64, i64* @EOF
%98 = icmp eq i64 %96, %97
br i1 %98, label %99, label %101
99: ; preds = %95
%100 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %101
101: ; preds = %99, %95
%102 = call i64 @fputs(i8* %13, i32* %1)
%103 = load i64, i64* @EOF
%104 = icmp eq i64 %102, %103
br i1 %104, label %129, label %131
105: ; preds = %92
%106 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.15, i64 0, i64 0), i32 14)
%107 = icmp eq i64 %106, 0
br i1 %107, label %108, label %118
108: ; preds = %105
%109 = call i64 @fputs(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.16, i64 0, i64 0), i32* %1)
%110 = load i64, i64* @EOF
%111 = icmp eq i64 %109, %110
br i1 %111, label %112, label %114
112: ; preds = %108
%113 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %114
114: ; preds = %112, %108
%115 = call i64 @fputs(i8* %12, i32* %1)
%116 = load i64, i64* @EOF
%117 = icmp eq i64 %115, %116
br i1 %117, label %129, label %131
118: ; preds = %105
%119 = call i64 @strncmp(i8* %4, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.17, i64 0, i64 0), i32 22)
%120 = icmp eq i64 %119, 0
br i1 %120, label %121, label %125
121: ; preds = %118
%122 = call i64 @fputs(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.18, i64 0, i64 0), i32* %1)
%123 = load i64, i64* @EOF
%124 = icmp eq i64 %122, %123
br i1 %124, label %129, label %131
125: ; preds = %118
%126 = call i64 @fputs(i8* %4, i32* %1)
%127 = load i64, i64* @EOF
%128 = icmp eq i64 %126, %127
br i1 %128, label %129, label %131
129: ; preds = %125, %121, %114, %101, %88, %75, %62, %49, %36
%130 = call i32 @perror(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.3, i64 0, i64 0))
br label %131
131: ; preds = %129, %36, %62, %88, %114, %125, %121, %101, %75, %49
%132 = call i32* @fgets(i8* %4, i32 500, i32* %0)
%133 = icmp eq i32* %132, null
br i1 %133, label %134, label %21
134: ; preds = %131, %8
ret void
}