#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 */

/* Variables and functions */
int /*<<< orphan*/ compare_headers(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned long, ...);
int /*<<< orphan*/ stderr;
int validate_entry(char *hdr, char *hdr2, char *seq, char *qual,
                   unsigned long linenum, const char *filename) {
  if (hdr[0] != '@') {
    fprintf(stderr,
            "Error in file %s, line %lu: sequence identifier should start with "
            "an @ - %s\n",
            filename, linenum, hdr);
    return 1;
  }
  if (hdr[1] == '\0' || hdr[1] == '\n' || hdr[1] == '\r') {
    fprintf(stderr,
            "Error in file %s, line %lu: sequence identifier should be longer "
            "than 1\n",
            filename, linenum);
    return 1;
  }
  unsigned int slen = 0;
  while (seq[slen] != '\0' && seq[slen] != '\n' && seq[slen] != '\r') {
    if (seq[slen] != 'A' && seq[slen] != 'C' && seq[slen] != 'G' &&
        seq[slen] != 'T' && seq[slen] != 'a' && seq[slen] != 'c' &&
        seq[slen] != 'g' && seq[slen] != 't' && seq[slen] != '0' &&
        seq[slen] != '1' && seq[slen] != '2' && seq[slen] != '3' &&
        seq[slen] != 'n' && seq[slen] != 'N' && seq[slen] != '.') {
      fprintf(stderr,
              "Error in file %s, line %lu: invalid character '%c' (hex. "
              "code:'%x'), expected ACGTacgt0123nN.\n",
              filename, linenum + 1, seq[slen], seq[slen]);
      return 1;
    }
    slen++;
  }
  if (slen < 1) {
    fprintf(stderr, "Error in file %s, line %lu: read length too small - %u\n",
            filename, linenum + 1, slen);
    return 1;
  }
  if (hdr2[0] != '+') {
    fprintf(stderr,
            "Error in file %s, line %lu:  header2 wrong. The line should "
            "contain only '+' followed by a newline or read name (header1).\n",
            filename, linenum + 2);
    return 1;
  }
  hdr2 = &hdr2[1];
  hdr = &hdr[1];
  if (hdr2[0] != '\0' && hdr2[0] != '\r') {
    if (!compare_headers(&hdr[1], &hdr2[1])) {
      fprintf(stderr,
              "Error in file %s, line %lu:  header2 differs from "
              "header1\nheader 1 \"%s\"\nheader 2 \"%s\"\n",
              filename, linenum, hdr, hdr2);
      return 1;
    }
  }
  unsigned int qlen = 0;
  while (qual[qlen] != '\0' && qual[qlen] != '\n' && qual[qlen] != '\r') {
    qlen++;
  }
  if (qlen != slen) {
    fprintf(stderr,
            "Error in file %s, line %lu: sequence and quality don't have the "
            "same length %u!=%u\n",
            filename, linenum + 3, slen, qlen);
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<validate_entry>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x40,%eax
je     117f <validate_entry+0x5f>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
je     11b2 <validate_entry+0x92>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0xa,%eax
je     11b2 <validate_entry+0x92>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0xd,%eax
jne    11dd <validate_entry+0xbd>
mov    0x2e27(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
lea    0xe83(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
movl   $0x0,-0x3c(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x41(%rbp)
je     122a <validate_entry+0x10a>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x41(%rbp)
je     122a <validate_entry+0x10a>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x41(%rbp)
mov    -0x41(%rbp),%al
test   $0x1,%al
jne    123a <validate_entry+0x11a>
jmp    13bb <validate_entry+0x29b>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x41,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x43,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x47,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x54,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x63,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x67,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x74,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x31,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x32,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x33,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x6e,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x4e,%eax
je     13ad <validate_entry+0x28d>
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2e,%eax
je     13ad <validate_entry+0x28d>
mov    0x2c73(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
add    $0x1,%rcx
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%esi
movsbl (%rax,%rsi,1),%r8d
mov    -0x20(%rbp),%rax
mov    -0x3c(%rbp),%esi
movsbl (%rax,%rsi,1),%r9d
lea    0xcfc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11e4 <validate_entry+0xc4>
cmpl   $0x1,-0x3c(%rbp)
jae    13f8 <validate_entry+0x2d8>
mov    0x2c14(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
add    $0x1,%rcx
mov    -0x3c(%rbp),%r8d
lea    0xd10(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2b,%eax
je     1437 <validate_entry+0x317>
mov    0x2bd1(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
add    $0x2,%rcx
lea    0xd09(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     14c5 <validate_entry+0x3a5>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xd,%eax
je     14c5 <validate_entry+0x3a5>
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    -0x18(%rbp),%rsi
add    $0x1,%rsi
call   1040 <compare_headers@plt>
cmp    $0x0,%eax
jne    14c0 <validate_entry+0x3a0>
mov    0x2b4c(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x18(%rbp),%r9
lea    0xcfc(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
jmp    14c5 <validate_entry+0x3a5>
movl   $0x0,-0x40(%rbp)
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x42(%rbp)
je     1512 <validate_entry+0x3f2>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
movsbl (%rax,%rcx,1),%ecx
xor    %eax,%eax
cmp    $0xa,%ecx
mov    %al,-0x42(%rbp)
je     1512 <validate_entry+0x3f2>
mov    -0x28(%rbp),%rax
mov    -0x40(%rbp),%ecx
movsbl (%rax,%rcx,1),%eax
cmp    $0xd,%eax
setne  %al
mov    %al,-0x42(%rbp)
mov    -0x42(%rbp),%al
test   $0x1,%al
jne    1522 <validate_entry+0x402>
jmp    1530 <validate_entry+0x410>
mov    -0x40(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x40(%rbp)
jmp    14cc <validate_entry+0x3ac>
mov    -0x40(%rbp),%eax
cmp    -0x3c(%rbp),%eax
je     1573 <validate_entry+0x453>
mov    0x2a9d(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rdx
mov    -0x30(%rbp),%rcx
add    $0x3,%rcx
mov    -0x3c(%rbp),%r8d
mov    -0x40(%rbp),%r9d
lea    0xca0(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    157a <validate_entry+0x45a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_entry>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r14
mov    %r8,%r15
mov    %rdi,%r8
cmpb   $0x40,(%rdi)
jne    1174 <validate_entry+0x54>
mov    %rcx,%rbx
mov    %rsi,%r12
movzbl 0x1(%r8),%eax
cmp    $0xd,%rax
ja     11a5 <validate_entry+0x85>
mov    $0x2401,%ecx
bt     %rax,%rcx
jae    11a5 <validate_entry+0x85>
mov    0x2e84(%rip),%rax
mov    (%rax),%edi
lea    0x10bc(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1191 <validate_entry+0x71>
mov    0x2e65(%rip),%rax
mov    (%rax),%edi
lea    0x1050(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    $0x1,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x1(%r8),%r13
xor    %ebp,%ebp
lea    0xe4e(%rip),%rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %ebp,%ecx
movzbl (%rdx,%rcx,1),%ecx
cmp    $0x74,%rcx
ja     128a <validate_entry+0x16a>
movslq (%rax,%rcx,4),%rsi
add    %rax,%rsi
jmp    *%rsi
add    $0x1,%ebp
jmp    11c0 <validate_entry+0xa0>
test   %ebp,%ebp
je     1261 <validate_entry+0x141>
cmpb   $0x2b,(%r12)
jne    12b7 <validate_entry+0x197>
mov    0x1(%r12),%al
test   %al,%al
je     1213 <validate_entry+0xf3>
cmp    $0xd,%al
je     1213 <validate_entry+0xf3>
add    $0x2,%r8
lea    0x2(%r12),%rsi
mov    %r8,%rdi
call   1040 <compare_headers@plt>
test   %eax,%eax
je     12d0 <validate_entry+0x1b0>
xor    %r9d,%r9d
mov    $0x2401,%eax
jmp    1224 <validate_entry+0x104>
nopl   (%rax)
add    $0x1,%r9d
mov    %r9d,%ecx
movzbl (%rbx,%rcx,1),%ecx
cmp    $0xd,%rcx
ja     1220 <validate_entry+0x100>
bt     %rcx,%rax
jae    1220 <validate_entry+0x100>
xor    %eax,%eax
cmp    %r9d,%ebp
je     1196 <validate_entry+0x76>
mov    0x2d97(%rip),%rax
mov    (%rax),%edi
add    $0x3,%r15
lea    0x117e(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %ebp,%r8d
jmp    12ab <validate_entry+0x18b>
mov    0x2d78(%rip),%rax
mov    (%rax),%edi
add    $0x1,%r15
lea    0x1054(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
xor    %r8d,%r8d
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1191 <validate_entry+0x71>
movsbl %cl,%r8d
mov    0x2d4b(%rip),%rax
mov    (%rax),%edi
add    $0x1,%r15
lea    0xfc8(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r8d,%r9d
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1191 <validate_entry+0x71>
mov    0x2d22(%rip),%rax
mov    (%rax),%edi
add    $0x2,%r15
lea    0x1036(%rip),%rsi
jmp    1165 <validate_entry+0x45>
add    $0x1,%r12
mov    0x2d05(%rip),%rax
mov    (%rax),%edi
lea    0x1099(%rip),%rsi
mov    %r14,%rdx
mov    %r15,%rcx
mov    %r13,%r8
mov    %r12,%r9
xor    %eax,%eax
call   1030 <fprintf@plt>
jmp    1191 <validate_entry+0x71>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [77 x i8] c"Error in file %s, line %lu: sequence identifier should start with an @ - %s\0A\00"
@.str.1 = [73 x i8] c"Error in file %s, line %lu: sequence identifier should be longer than 1\0A\00"
@.str.2 = [95 x i8] c"Error in file %s, line %lu: invalid character '%c' (hex. code:'%x'), expected ACGTacgt0123nN.\0A\00"
@.str.3 = [56 x i8] c"Error in file %s, line %lu: read length too small - %u\0A\00"
@.str.4 = [124 x i8] c"Error in file %s, line %lu: header2 wrong. The line should contain only '+' followed by a newline or read name (header1).\0A\00"
@.str.5 = [87 x i8] c"Error in file %s, line %lu: header2 differs from header1\0Aheader 1 \22%s\22\0Aheader 2 \22%s\22\0A\00"
@.str.6 = [84 x i8] c"Error in file %s, line %lu: sequence and quality don't have the same length %u!=%u\0A\00"
define i32 @validate_entry(i8* %0, i8* %1, i8* %2, i8* %3, i64 %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i64
%13 = alloca i8*
%14 = alloca i32
%15 = alloca i32
store i8* %0, i8** %8
store i8* %1, i8** %9
store i8* %2, i8** %10
store i8* %3, i8** %11
store i64 %4, i64* %12
store i8* %5, i8** %13
%16 = load i8*, i8** %8
%17 = getelementptr inbounds i8, i8* %16, i64 0
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 64
br i1 %20, label %21, label %27
21: ; preds = %6
%22 = load i32, i32* @stderr
%23 = load i8*, i8** %13
%24 = load i64, i64* %12
%25 = load i8*, i8** %8
%26 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %22, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %23, i64 %24, i8* %25)
store i32 1, i32* %7
br label %314
27: ; preds = %6
%28 = load i8*, i8** %8
%29 = getelementptr inbounds i8, i8* %28, i64 1
%30 = load i8, i8* %29
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 0
br i1 %32, label %45, label %33
33: ; preds = %27
%34 = load i8*, i8** %8
%35 = getelementptr inbounds i8, i8* %34, i64 1
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 %37, 10
br i1 %38, label %45, label %39
39: ; preds = %33
%40 = load i8*, i8** %8
%41 = getelementptr inbounds i8, i8* %40, i64 1
%42 = load i8, i8* %41
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 13
br i1 %44, label %45, label %50
45: ; preds = %39, %33, %27
%46 = load i32, i32* @stderr
%47 = load i8*, i8** %13
%48 = load i64, i64* %12
%49 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i8* %47, i64 %48)
store i32 1, i32* %7
br label %314
50: ; preds = %39
store i32 0, i32* %14
br label %51
51: ; preds = %215, %50
%52 = load i8*, i8** %10
%53 = load i32, i32* %14
%54 = zext i32 %53 to i64
%55 = getelementptr inbounds i8, i8* %52, i64 %54
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp ne i32 %57, 0
br i1 %58, label %59, label %75
59: ; preds = %51
%60 = load i8*, i8** %10
%61 = load i32, i32* %14
%62 = zext i32 %61 to i64
%63 = getelementptr inbounds i8, i8* %60, i64 %62
%64 = load i8, i8* %63
%65 = sext i8 %64 to i32
%66 = icmp ne i32 %65, 10
br i1 %66, label %67, label %75
67: ; preds = %59
%68 = load i8*, i8** %10
%69 = load i32, i32* %14
%70 = zext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = icmp ne i32 %73, 13
br label %75
75: ; preds = %67, %59, %51
%76 = phi i1 [ false, %59 ], [ false, %51 ], [ %74, %67 ]
br i1 %76, label %77, label %218
77: ; preds = %75
%78 = load i8*, i8** %10
%79 = load i32, i32* %14
%80 = zext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
%82 = load i8, i8* %81
%83 = sext i8 %82 to i32
%84 = icmp ne i32 %83, 65
br i1 %84, label %85, label %215
85: ; preds = %77
%86 = load i8*, i8** %10
%87 = load i32, i32* %14
%88 = zext i32 %87 to i64
%89 = getelementptr inbounds i8, i8* %86, i64 %88
%90 = load i8, i8* %89
%91 = sext i8 %90 to i32
%92 = icmp ne i32 %91, 67
br i1 %92, label %93, label %215
93: ; preds = %85
%94 = load i8*, i8** %10
%95 = load i32, i32* %14
%96 = zext i32 %95 to i64
%97 = getelementptr inbounds i8, i8* %94, i64 %96
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 71
br i1 %100, label %101, label %215
101: ; preds = %93
%102 = load i8*, i8** %10
%103 = load i32, i32* %14
%104 = zext i32 %103 to i64
%105 = getelementptr inbounds i8, i8* %102, i64 %104
%106 = load i8, i8* %105
%107 = sext i8 %106 to i32
%108 = icmp ne i32 %107, 84
br i1 %108, label %109, label %215
109: ; preds = %101
%110 = load i8*, i8** %10
%111 = load i32, i32* %14
%112 = zext i32 %111 to i64
%113 = getelementptr inbounds i8, i8* %110, i64 %112
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp ne i32 %115, 97
br i1 %116, label %117, label %215
117: ; preds = %109
%118 = load i8*, i8** %10
%119 = load i32, i32* %14
%120 = zext i32 %119 to i64
%121 = getelementptr inbounds i8, i8* %118, i64 %120
%122 = load i8, i8* %121
%123 = sext i8 %122 to i32
%124 = icmp ne i32 %123, 99
br i1 %124, label %125, label %215
125: ; preds = %117
%126 = load i8*, i8** %10
%127 = load i32, i32* %14
%128 = zext i32 %127 to i64
%129 = getelementptr inbounds i8, i8* %126, i64 %128
%130 = load i8, i8* %129
%131 = sext i8 %130 to i32
%132 = icmp ne i32 %131, 103
br i1 %132, label %133, label %215
133: ; preds = %125
%134 = load i8*, i8** %10
%135 = load i32, i32* %14
%136 = zext i32 %135 to i64
%137 = getelementptr inbounds i8, i8* %134, i64 %136
%138 = load i8, i8* %137
%139 = sext i8 %138 to i32
%140 = icmp ne i32 %139, 116
br i1 %140, label %141, label %215
141: ; preds = %133
%142 = load i8*, i8** %10
%143 = load i32, i32* %14
%144 = zext i32 %143 to i64
%145 = getelementptr inbounds i8, i8* %142, i64 %144
%146 = load i8, i8* %145
%147 = sext i8 %146 to i32
%148 = icmp ne i32 %147, 48
br i1 %148, label %149, label %215
149: ; preds = %141
%150 = load i8*, i8** %10
%151 = load i32, i32* %14
%152 = zext i32 %151 to i64
%153 = getelementptr inbounds i8, i8* %150, i64 %152
%154 = load i8, i8* %153
%155 = sext i8 %154 to i32
%156 = icmp ne i32 %155, 49
br i1 %156, label %157, label %215
157: ; preds = %149
%158 = load i8*, i8** %10
%159 = load i32, i32* %14
%160 = zext i32 %159 to i64
%161 = getelementptr inbounds i8, i8* %158, i64 %160
%162 = load i8, i8* %161
%163 = sext i8 %162 to i32
%164 = icmp ne i32 %163, 50
br i1 %164, label %165, label %215
165: ; preds = %157
%166 = load i8*, i8** %10
%167 = load i32, i32* %14
%168 = zext i32 %167 to i64
%169 = getelementptr inbounds i8, i8* %166, i64 %168
%170 = load i8, i8* %169
%171 = sext i8 %170 to i32
%172 = icmp ne i32 %171, 51
br i1 %172, label %173, label %215
173: ; preds = %165
%174 = load i8*, i8** %10
%175 = load i32, i32* %14
%176 = zext i32 %175 to i64
%177 = getelementptr inbounds i8, i8* %174, i64 %176
%178 = load i8, i8* %177
%179 = sext i8 %178 to i32
%180 = icmp ne i32 %179, 110
br i1 %180, label %181, label %215
181: ; preds = %173
%182 = load i8*, i8** %10
%183 = load i32, i32* %14
%184 = zext i32 %183 to i64
%185 = getelementptr inbounds i8, i8* %182, i64 %184
%186 = load i8, i8* %185
%187 = sext i8 %186 to i32
%188 = icmp ne i32 %187, 78
br i1 %188, label %189, label %215
189: ; preds = %181
%190 = load i8*, i8** %10
%191 = load i32, i32* %14
%192 = zext i32 %191 to i64
%193 = getelementptr inbounds i8, i8* %190, i64 %192
%194 = load i8, i8* %193
%195 = sext i8 %194 to i32
%196 = icmp ne i32 %195, 46
br i1 %196, label %197, label %215
197: ; preds = %189
%198 = load i32, i32* @stderr
%199 = load i8*, i8** %13
%200 = load i64, i64* %12
%201 = add i64 %200, 1
%202 = load i8*, i8** %10
%203 = load i32, i32* %14
%204 = zext i32 %203 to i64
%205 = getelementptr inbounds i8, i8* %202, i64 %204
%206 = load i8, i8* %205
%207 = sext i8 %206 to i32
%208 = load i8*, i8** %10
%209 = load i32, i32* %14
%210 = zext i32 %209 to i64
%211 = getelementptr inbounds i8, i8* %208, i64 %210
%212 = load i8, i8* %211
%213 = sext i8 %212 to i32
%214 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %198, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.2, i64 0, i64 0), i8* %199, i64 %201, i32 %207, i32 %213)
store i32 1, i32* %7
br label %314
215: ; preds = %189, %181, %173, %165, %157, %149, %141, %133, %125, %117, %109, %101, %93, %85, %77
%216 = load i32, i32* %14
%217 = add i32 %216, 1
store i32 %217, i32* %14
br label %51
218: ; preds = %75
%219 = load i32, i32* %14
%220 = icmp ult i32 %219, 1
br i1 %220, label %221, label %228
221: ; preds = %218
%222 = load i32, i32* @stderr
%223 = load i8*, i8** %13
%224 = load i64, i64* %12
%225 = add i64 %224, 1
%226 = load i32, i32* %14
%227 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %222, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0), i8* %223, i64 %225, i32 %226)
store i32 1, i32* %7
br label %314
228: ; preds = %218
%229 = load i8*, i8** %9
%230 = getelementptr inbounds i8, i8* %229, i64 0
%231 = load i8, i8* %230
%232 = sext i8 %231 to i32
%233 = icmp ne i32 %232, 43
br i1 %233, label %234, label %240
234: ; preds = %228
%235 = load i32, i32* @stderr
%236 = load i8*, i8** %13
%237 = load i64, i64* %12
%238 = add i64 %237, 2
%239 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %235, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.4, i64 0, i64 0), i8* %236, i64 %238)
store i32 1, i32* %7
br label %314
240: ; preds = %228
%241 = load i8*, i8** %9
%242 = getelementptr inbounds i8, i8* %241, i64 1
store i8* %242, i8** %9
%243 = load i8*, i8** %8
%244 = getelementptr inbounds i8, i8* %243, i64 1
store i8* %244, i8** %8
%245 = load i8*, i8** %9
%246 = getelementptr inbounds i8, i8* %245, i64 0
%247 = load i8, i8* %246
%248 = sext i8 %247 to i32
%249 = icmp ne i32 %248, 0
br i1 %249, label %250, label %271
250: ; preds = %240
%251 = load i8*, i8** %9
%252 = getelementptr inbounds i8, i8* %251, i64 0
%253 = load i8, i8* %252
%254 = sext i8 %253 to i32
%255 = icmp ne i32 %254, 13
br i1 %255, label %256, label %271
256: ; preds = %250
%257 = load i8*, i8** %8
%258 = getelementptr inbounds i8, i8* %257, i64 1
%259 = load i8*, i8** %9
%260 = getelementptr inbounds i8, i8* %259, i64 1
%261 = call i32 @compare_headers(i8* %258, i8* %260)
%262 = icmp ne i32 %261, 0
br i1 %262, label %270, label %263
263: ; preds = %256
%264 = load i32, i32* @stderr
%265 = load i8*, i8** %13
%266 = load i64, i64* %12
%267 = load i8*, i8** %8
%268 = load i8*, i8** %9
%269 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %264, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0), i8* %265, i64 %266, i8* %267, i8* %268)
store i32 1, i32* %7
br label %314
270: ; preds = %256
br label %271
271: ; preds = %270, %250, %240
store i32 0, i32* %15
br label %272
272: ; preds = %298, %271
%273 = load i8*, i8** %11
%274 = load i32, i32* %15
%275 = zext i32 %274 to i64
%276 = getelementptr inbounds i8, i8* %273, i64 %275
%277 = load i8, i8* %276
%278 = sext i8 %277 to i32
%279 = icmp ne i32 %278, 0
br i1 %279, label %280, label %296
280: ; preds = %272
%281 = load i8*, i8** %11
%282 = load i32, i32* %15
%283 = zext i32 %282 to i64
%284 = getelementptr inbounds i8, i8* %281, i64 %283
%285 = load i8, i8* %284
%286 = sext i8 %285 to i32
%287 = icmp ne i32 %286, 10
br i1 %287, label %288, label %296
288: ; preds = %280
%289 = load i8*, i8** %11
%290 = load i32, i32* %15
%291 = zext i32 %290 to i64
%292 = getelementptr inbounds i8, i8* %289, i64 %291
%293 = load i8, i8* %292
%294 = sext i8 %293 to i32
%295 = icmp ne i32 %294, 13
br label %296
296: ; preds = %288, %280, %272
%297 = phi i1 [ false, %280 ], [ false, %272 ], [ %295, %288 ]
br i1 %297, label %298, label %301
298: ; preds = %296
%299 = load i32, i32* %15
%300 = add i32 %299, 1
store i32 %300, i32* %15
br label %272
301: ; preds = %296
%302 = load i32, i32* %15
%303 = load i32, i32* %14
%304 = icmp ne i32 %302, %303
br i1 %304, label %305, label %313
305: ; preds = %301
%306 = load i32, i32* @stderr
%307 = load i8*, i8** %13
%308 = load i64, i64* %12
%309 = add i64 %308, 3
%310 = load i32, i32* %14
%311 = load i32, i32* %15
%312 = call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %306, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.6, i64 0, i64 0), i8* %307, i64 %309, i32 %310, i32 %311)
store i32 1, i32* %7
br label %314
313: ; preds = %301
store i32 0, i32* %7
br label %314
314: ; preds = %313, %305, %263, %234, %221, %197, %45, %21
%315 = load i32, i32* %7
ret i32 %315
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [77 x i8] c"Error in file %s, line %lu: sequence identifier should start with an @ - %s\0A\00"
@.str.1 = [73 x i8] c"Error in file %s, line %lu: sequence identifier should be longer than 1\0A\00"
@.str.2 = [95 x i8] c"Error in file %s, line %lu: invalid character '%c' (hex. code:'%x'), expected ACGTacgt0123nN.\0A\00"
@.str.3 = [56 x i8] c"Error in file %s, line %lu: read length too small - %u\0A\00"
@.str.4 = [124 x i8] c"Error in file %s, line %lu: header2 wrong. The line should contain only '+' followed by a newline or read name (header1).\0A\00"
@.str.5 = [87 x i8] c"Error in file %s, line %lu: header2 differs from header1\0Aheader 1 \22%s\22\0Aheader 2 \22%s\22\0A\00"
@.str.6 = [84 x i8] c"Error in file %s, line %lu: sequence and quality don't have the same length %u!=%u\0A\00"
define i32 @validate_entry(i8* %0, i8* %1, i8* nocapture %2, i8* nocapture %3, i64 %4, i8* %5) {
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 64
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = load i32, i32* @stderr
%11 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %10, i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0), i8* %5, i64 %4, i8* %0)
br label %68
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %0, i64 1
%14 = load i8, i8* %13
switch i8 %14, label %18 [
i8 0, label %15
i8 10, label %15
i8 13, label %15
]
15: ; preds = %12, %12, %12
%16 = load i32, i32* @stderr
%17 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.1, i64 0, i64 0), i8* %5, i64 %4)
br label %68
18: ; preds = %12, %28
%19 = phi i32 [ %29, %28 ], [ 0, %12 ]
%20 = zext i32 %19 to i64
%21 = getelementptr inbounds i8, i8* %2, i64 %20
%22 = load i8, i8* %21
switch i8 %22, label %23 [
i8 0, label %30
i8 10, label %30
i8 13, label %30
i8 65, label %28
i8 67, label %28
i8 71, label %28
i8 84, label %28
i8 97, label %28
i8 99, label %28
i8 103, label %28
i8 116, label %28
i8 48, label %28
i8 49, label %28
i8 50, label %28
i8 51, label %28
i8 110, label %28
i8 78, label %28
i8 46, label %28
]
23: ; preds = %18
%24 = sext i8 %22 to i32
%25 = load i32, i32* @stderr
%26 = add i64 %4, 1
%27 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %25, i8* getelementptr inbounds ([95 x i8], [95 x i8]* @.str.2, i64 0, i64 0), i8* %5, i64 %26, i32 %24, i32 %24)
br label %68
28: ; preds = %18, %18, %18, %18, %18, %18, %18, %18, %18, %18, %18, %18, %18, %18, %18
%29 = add i32 %19, 1
br label %18
30: ; preds = %18, %18, %18
%31 = icmp eq i32 %19, 0
br i1 %31, label %32, label %36
32: ; preds = %30
%33 = load i32, i32* @stderr
%34 = add i64 %4, 1
%35 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %33, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.3, i64 0, i64 0), i8* %5, i64 %34, i32 0)
br label %68
36: ; preds = %30
%37 = load i8, i8* %1
%38 = icmp eq i8 %37, 43
br i1 %38, label %43, label %39
39: ; preds = %36
%40 = load i32, i32* @stderr
%41 = add i64 %4, 2
%42 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([124 x i8], [124 x i8]* @.str.4, i64 0, i64 0), i8* %5, i64 %41)
br label %68
43: ; preds = %36
%44 = getelementptr inbounds i8, i8* %1, i64 1
%45 = load i8, i8* %44
switch i8 %45, label %46 [
i8 0, label %51
i8 13, label %51
]
46: ; preds = %43
%47 = getelementptr inbounds i8, i8* %0, i64 2
%48 = getelementptr inbounds i8, i8* %1, i64 2
%49 = tail call i32 @compare_headers(i8* %47, i8* %48)
%50 = icmp eq i32 %49, 0
br i1 %50, label %52, label %51
51: ; preds = %43, %43, %46
br label %55
52: ; preds = %46
%53 = load i32, i32* @stderr
%54 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %53, i8* getelementptr inbounds ([87 x i8], [87 x i8]* @.str.5, i64 0, i64 0), i8* %5, i64 %4, i8* %13, i8* %44)
br label %68
55: ; preds = %51, %60
%56 = phi i32 [ %61, %60 ], [ 0, %51 ]
%57 = zext i32 %56 to i64
%58 = getelementptr inbounds i8, i8* %3, i64 %57
%59 = load i8, i8* %58
switch i8 %59, label %60 [
i8 0, label %62
i8 10, label %62
i8 13, label %62
]
60: ; preds = %55
%61 = add i32 %56, 1
br label %55
62: ; preds = %55, %55, %55
%63 = icmp eq i32 %56, %19
br i1 %63, label %68, label %64
64: ; preds = %62
%65 = load i32, i32* @stderr
%66 = add i64 %4, 3
%67 = tail call i32 (i32, i8*, i8*, i64, ...) @fprintf(i32 %65, i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str.6, i64 0, i64 0), i8* %5, i64 %66, i32 %19, i32 %56)
br label %68
68: ; preds = %23, %32, %39, %52, %62, %64, %15, %9
%69 = phi i32 [ 1, %9 ], [ 1, %15 ], [ 1, %23 ], [ 1, %32 ], [ 1, %39 ], [ 1, %52 ], [ 1, %64 ], [ 0, %62 ]
ret i32 %69
}