#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*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ makeQual(char *, char *);
int /*<<< orphan*/ parseEland(char *, char *, char *);
int /*<<< orphan*/ stdout;
int main(int argc, char **argv) {
  FILE *inFD, *outFD;
  int total;
  char inLine[2048];
  char name[128], seq[128], qual[128];
  inFD = fopen(argv[1], "r");
  outFD = fopen(argv[2], "w");
  total = 0;
  while (fgets(inLine, 2048, inFD) != NULL) {
    total++;
    parseEland(inLine, name, seq);
    makeQual(seq, qual);
    fprintf(outFD, "@%s\n%s\n+\n%s\n", name, seq, qual);
  }
  fprintf(stdout, "%d\n", total);
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x9b0,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xe88(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
lea    0xe72(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
lea    -0x830(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    $0x800,%esi
call   1030 <fgets@plt>
cmp    $0x0,%rax
je     1223 <main+0xd3>
mov    -0x24(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x24(%rbp)
lea    -0x830(%rbp),%rdi
lea    -0x8b0(%rbp),%rsi
lea    -0x930(%rbp),%rdx
call   1070 <parseEland@plt>
lea    -0x930(%rbp),%rdi
lea    -0x9b0(%rbp),%rsi
call   1060 <makeQual@plt>
mov    -0x20(%rbp),%rax
mov    %eax,%edi
lea    -0x8b0(%rbp),%rdx
lea    -0x930(%rbp),%rcx
lea    -0x9b0(%rbp),%r8
lea    0xded(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
jmp    11a0 <main+0x50>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
mov    -0x24(%rbp),%edx
lea    0xddb(%rip),%rsi
mov    $0x0,%al
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x9b0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x998,%rsp
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
lea    0xe91(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r15
mov    0x10(%rbx),%rdi
lea    0xe80(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,%r12
lea    0x190(%rsp),%rdi
mov    $0x800,%esi
mov    %r15,%rdx
call   1030 <fgets@plt>
test   %rax,%rax
je     121f <main+0xcf>
mov    %r12,0x8(%rsp)
lea    0x90(%rsp),%rbx
lea    0x10(%rsp),%r14
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
add    $0x1,%ebp
lea    0x190(%rsp),%r13
mov    %r13,%rdi
lea    0x110(%rsp),%r12
mov    %r12,%rsi
mov    %rbx,%rdx
call   1070 <parseEland@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <makeQual@plt>
mov    0x8(%rsp),%rdi
lea    0xe0c(%rip),%rsi
mov    %r12,%rdx
mov    %rbx,%rcx
mov    %r14,%r8
xor    %eax,%eax
call   1040 <fprintf@plt>
mov    %r13,%rdi
mov    $0x800,%esi
mov    %r15,%rdx
call   1030 <fgets@plt>
test   %rax,%rax
jne    11c0 <main+0x70>
jmp    1221 <main+0xd1>
xor    %ebp,%ebp
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
lea    0xde0(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x998,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [13 x i8] c"@%s\0A%s\0A+\0A%s\0A\00"
@stdout = global i32 0
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i32
%9 = alloca [2048 x i8]
%10 = alloca [128 x i8]
%11 = alloca [128 x i8]
%12 = alloca [128 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %16, i32** %6
%17 = load i8**, i8*** %5
%18 = getelementptr inbounds i8*, i8** %17, i64 2
%19 = load i8*, i8** %18
%20 = call i32* @fopen(i8* %19, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %20, i32** %7
store i32 0, i32* %8
br label %21
21: ; preds = %26, %2
%22 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%23 = load i32*, i32** %6
%24 = call i32* @fgets(i8* %22, i32 2048, i32* %23)
%25 = icmp ne i32* %24, null
br i1 %25, label %26, label %42
26: ; preds = %21
%27 = load i32, i32* %8
%28 = add nsw i32 %27, 1
store i32 %28, i32* %8
%29 = getelementptr inbounds [2048 x i8], [2048 x i8]* %9, i64 0, i64 0
%30 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%31 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%32 = call i32 @parseEland(i8* %29, i8* %30, i8* %31)
%33 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%34 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%35 = call i32 @makeQual(i8* %33, i8* %34)
%36 = load i32*, i32** %7
%37 = ptrtoint i32* %36 to i32
%38 = getelementptr inbounds [128 x i8], [128 x i8]* %10, i64 0, i64 0
%39 = getelementptr inbounds [128 x i8], [128 x i8]* %11, i64 0, i64 0
%40 = getelementptr inbounds [128 x i8], [128 x i8]* %12, i64 0, i64 0
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %37, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %38, i8* %39, i8* %40)
br label %21
42: ; preds = %21
%43 = load i32, i32* @stdout
%44 = load i32, i32* %8
%45 = call i32 (i32, i8*, ...) @fprintf(i32 %43, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %44)
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
@.str.1 = [2 x i8] c"w\00"
@.str.2 = [13 x i8] c"@%s\0A%s\0A+\0A%s\0A\00"
@stdout = global i32 0
@.str.3 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [2048 x i8]
%4 = alloca [128 x i8]
%5 = alloca [128 x i8]
%6 = alloca [128 x i8]
%7 = getelementptr inbounds [2048 x i8], [2048 x i8]* %3, i64 0, i64 0
%8 = getelementptr inbounds [128 x i8], [128 x i8]* %4, i64 0, i64 0
%9 = getelementptr inbounds [128 x i8], [128 x i8]* %5, i64 0, i64 0
%10 = getelementptr inbounds [128 x i8], [128 x i8]* %6, i64 0, i64 0
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i32* @fopen(i8* %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds i8*, i8** %1, i64 2
%15 = load i8*, i8** %14
%16 = tail call i32* @fopen(i8* %15, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%17 = call i32* @fgets(i8* %7, i32 2048, i32* %13)
%18 = icmp eq i32* %17, null
br i1 %18, label %30, label %19
19: ; preds = %2
%20 = ptrtoint i32* %16 to i64
%21 = trunc i64 %20 to i32
br label %22
22: ; preds = %19, %22
%23 = phi i32 [ 0, %19 ], [ %24, %22 ]
%24 = add nuw nsw i32 %23, 1
%25 = call i32 @parseEland(i8* %7, i8* %8, i8* %9)
%26 = call i32 @makeQual(i8* %9, i8* %10)
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0), i8* %8, i8* %9, i8* %10)
%28 = call i32* @fgets(i8* %7, i32 2048, i32* %13)
%29 = icmp eq i32* %28, null
br i1 %29, label %30, label %22
30: ; preds = %22, %2
%31 = phi i32 [ 0, %2 ], [ %24, %22 ]
%32 = load i32, i32* @stdout
%33 = call i32 (i32, i8*, ...) @fprintf(i32 %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %31)
ret i32 0
}