#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*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char);
int /*<<< orphan*/ printf(char *, char *, ...);
int /*<<< orphan*/ stderr;
int strlen(char *);
int print_seq(int ilmn_trinity, char *append, int to_fasta, char *s[]) {
  if (ilmn_trinity && (s[0][strlen(s[0]) - 2] != '/') && s[3] != NULL) {
    char read_dir = s[3][0];
    if (!(read_dir == '1' || read_dir == '2')) {
      fprintf(stderr,
              "Error, cannot convert fastq file to fasta since cannot "
              "recognize read orientation as /1 or /2 (instead: %c)",
              read_dir);
      exit(3);
    }
    printf(">%s/%c\n", s[0], s[3][0]);
  } else if (append == NULL) {
    printf(">%s\n", s[0]);
  } else {
    printf(">%s%s\n", s[0], append);
  }
  printf("%s\n", s[1]);
  if (!to_fasta && s[2] != NULL && !ilmn_trinity) {
    printf("+\n%s\n", s[2]);
  }
  return 0;
}


x86 assembly (clang, -O0):
<print_seq>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     120e <print_seq+0xce>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x30(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
sub    $0x2,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     120e <print_seq+0xce>
mov    -0x20(%rbp),%rax
cmpq   $0x0,0x18(%rax)
je     120e <print_seq+0xce>
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
mov    (%rax),%al
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x31,%eax
je     11e9 <print_seq+0xa9>
movsbl -0x21(%rbp),%eax
cmp    $0x32,%eax
je     11e9 <print_seq+0xa9>
mov    0x2e13(%rip),%rax
mov    (%rax),%edi
lea    0xe2a(%rip),%rsi
movsbl -0x21(%rbp),%edx
call   1050 <fprintf@plt>
mov    $0x3,%edi
call   1060 <exit@plt>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
mov    -0x20(%rbp),%rax
mov    0x18(%rax),%rax
movsbl (%rax),%edx
lea    0xe6a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1251 <print_seq+0x111>
cmpq   $0x0,-0x10(%rbp)
jne    1233 <print_seq+0xf3>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    124c <print_seq+0x10c>
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1251 <print_seq+0x111>
mov    -0x20(%rbp),%rax
mov    0x8(%rax),%rsi
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
jne    12a0 <print_seq+0x160>
mov    -0x20(%rbp),%rax
cmpq   $0x0,0x10(%rax)
je     12a0 <print_seq+0x160>
cmpl   $0x0,-0x4(%rbp)
jne    12a0 <print_seq+0x160>
mov    -0x20(%rbp),%rax
mov    0x10(%rax),%rsi
lea    0xde7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_seq>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rcx,%r12
mov    %edx,%r14d
mov    %rsi,%rbp
mov    %edi,%r15d
test   %edi,%edi
je     1195 <print_seq+0x55>
mov    (%r12),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
cltq
cmpb   $0x2f,-0x2(%rax,%rbx,1)
je     1195 <print_seq+0x55>
mov    0x18(%r12),%rax
test   %rax,%rax
je     1195 <print_seq+0x55>
movzbl (%rax),%edx
lea    -0x31(%rdx),%eax
cmp    $0x2,%al
jae    11ff <print_seq+0xbf>
mov    (%r12),%rsi
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11bf <print_seq+0x7f>
mov    (%r12),%rsi
test   %rbp,%rbp
je     11b1 <print_seq+0x71>
lea    0xed4(%rip),%rdi
mov    %rbp,%rdx
xor    %eax,%eax
call   1040 <printf@plt>
jmp    11bf <print_seq+0x7f>
lea    0xebc(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    0x8(%r12),%rsi
lea    0xeb7(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
test   %r14d,%r14d
jne    11f4 <print_seq+0xb4>
test   %r15d,%r15d
jne    11f4 <print_seq+0xb4>
mov    0x10(%r12),%rsi
test   %rsi,%rsi
je     11f4 <print_seq+0xb4>
lea    0xe93(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2dda(%rip),%rax
mov    (%rax),%edi
movsbl %dl,%edx
lea    0xdee(%rip),%rsi
call   1050 <fprintf@plt>
mov    $0x3,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [108 x i8] c"Error, cannot convert fastq file to fasta since cannot recognize read orientation as /1 or /2 (instead: %c)\00"
@.str.1 = [8 x i8] c">%s/%c\0A\00"
@.str.2 = [5 x i8] c">%s\0A\00"
@.str.3 = [7 x i8] c">%s%s\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
@.str.5 = [6 x i8] c"+\0A%s\0A\00"
define i32 @print_seq(i32 %0, i8* %1, i32 %2, i8** %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8**
%9 = alloca i8
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8** %3, i8*** %8
%10 = load i32, i32* %5
%11 = icmp ne i32 %10, 0
br i1 %11, label %12, label %60
12: ; preds = %4
%13 = load i8**, i8*** %8
%14 = getelementptr inbounds i8*, i8** %13, i64 0
%15 = load i8*, i8** %14
%16 = load i8**, i8*** %8
%17 = getelementptr inbounds i8*, i8** %16, i64 0
%18 = load i8*, i8** %17
%19 = call i32 @strlen(i8* %18)
%20 = sub nsw i32 %19, 2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i8, i8* %15, i64 %21
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 47
br i1 %25, label %26, label %60
26: ; preds = %12
%27 = load i8**, i8*** %8
%28 = getelementptr inbounds i8*, i8** %27, i64 3
%29 = load i8*, i8** %28
%30 = icmp ne i8* %29, null
br i1 %30, label %31, label %60
31: ; preds = %26
%32 = load i8**, i8*** %8
%33 = getelementptr inbounds i8*, i8** %32, i64 3
%34 = load i8*, i8** %33
%35 = getelementptr inbounds i8, i8* %34, i64 0
%36 = load i8, i8* %35
store i8 %36, i8* %9
%37 = load i8, i8* %9
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 49
br i1 %39, label %49, label %40
40: ; preds = %31
%41 = load i8, i8* %9
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 50
br i1 %43, label %49, label %44
44: ; preds = %40
%45 = load i32, i32* @stderr
%46 = load i8, i8* %9
%47 = call i32 @fprintf(i32 %45, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0), i8 signext %46)
%48 = call i32 @exit(i32 3)
unreachable
49: ; preds = %40, %31
%50 = load i8**, i8*** %8
%51 = getelementptr inbounds i8*, i8** %50, i64 0
%52 = load i8*, i8** %51
%53 = load i8**, i8*** %8
%54 = getelementptr inbounds i8*, i8** %53, i64 3
%55 = load i8*, i8** %54
%56 = getelementptr inbounds i8, i8* %55, i64 0
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %52, i32 %58)
br label %75
60: ; preds = %26, %12, %4
%61 = load i8*, i8** %6
%62 = icmp eq i8* %61, null
br i1 %62, label %63, label %68
63: ; preds = %60
%64 = load i8**, i8*** %8
%65 = getelementptr inbounds i8*, i8** %64, i64 0
%66 = load i8*, i8** %65
%67 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %66)
br label %74
68: ; preds = %60
%69 = load i8**, i8*** %8
%70 = getelementptr inbounds i8*, i8** %69, i64 0
%71 = load i8*, i8** %70
%72 = load i8*, i8** %6
%73 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %71, i8* %72)
br label %74
74: ; preds = %68, %63
br label %75
75: ; preds = %74, %49
%76 = load i8**, i8*** %8
%77 = getelementptr inbounds i8*, i8** %76, i64 1
%78 = load i8*, i8** %77
%79 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %78)
%80 = load i32, i32* %7
%81 = icmp ne i32 %80, 0
br i1 %81, label %95, label %82
82: ; preds = %75
%83 = load i8**, i8*** %8
%84 = getelementptr inbounds i8*, i8** %83, i64 2
%85 = load i8*, i8** %84
%86 = icmp ne i8* %85, null
br i1 %86, label %87, label %95
87: ; preds = %82
%88 = load i32, i32* %5
%89 = icmp ne i32 %88, 0
br i1 %89, label %95, label %90
90: ; preds = %87
%91 = load i8**, i8*** %8
%92 = getelementptr inbounds i8*, i8** %91, i64 2
%93 = load i8*, i8** %92
%94 = call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %93)
br label %95
95: ; preds = %90, %87, %82, %75
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [108 x i8] c"Error, cannot convert fastq file to fasta since cannot recognize read orientation as /1 or /2 (instead: %c)\00"
@.str.1 = [8 x i8] c">%s/%c\0A\00"
@.str.2 = [5 x i8] c">%s\0A\00"
@.str.3 = [7 x i8] c">%s%s\0A\00"
@.str.4 = [4 x i8] c"%s\0A\00"
@.str.5 = [6 x i8] c"+\0A%s\0A\00"
define i32 @print_seq(i32 %0, i8* %1, i32 %2, i8** nocapture %3) {
%5 = icmp ne i32 %0, 0
br i1 %5, label %6, label %30
6: ; preds = %4
%7 = load i8*, i8** %3
%8 = tail call i32 @strlen(i8* %7)
%9 = add nsw i32 %8, -2
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8, i8* %7, i64 %10
%12 = load i8, i8* %11
%13 = icmp eq i8 %12, 47
br i1 %13, label %30, label %14
14: ; preds = %6
%15 = getelementptr inbounds i8*, i8** %3, i64 3
%16 = load i8*, i8** %15
%17 = icmp eq i8* %16, null
br i1 %17, label %30, label %18
18: ; preds = %14
%19 = load i8, i8* %16
%20 = add i8 %19, -49
%21 = icmp ult i8 %20, 2
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i32, i32* @stderr
%24 = tail call i32 @fprintf(i32 %23, i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str, i64 0, i64 0), i8 signext %19)
%25 = tail call i32 @exit(i32 3)
unreachable
26: ; preds = %18
%27 = zext i8 %19 to i32
%28 = load i8*, i8** %3
%29 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), i8* %28, i32 %27)
br label %37
30: ; preds = %14, %6, %4
%31 = icmp eq i8* %1, null
%32 = load i8*, i8** %3
br i1 %31, label %33, label %35
33: ; preds = %30
%34 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8* %32)
br label %37
35: ; preds = %30
%36 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i8* %32, i8* %1)
br label %37
37: ; preds = %33, %35, %26
%38 = getelementptr inbounds i8*, i8** %3, i64 1
%39 = load i8*, i8** %38
%40 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* %39)
%41 = icmp eq i32 %2, 0
br i1 %41, label %42, label %49
42: ; preds = %37
%43 = getelementptr inbounds i8*, i8** %3, i64 2
%44 = load i8*, i8** %43
%45 = icmp eq i8* %44, null
%46 = or i1 %5, %45
br i1 %46, label %49, label %47
47: ; preds = %42
%48 = tail call i32 (i8*, i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i8* %44)
br label %49
49: ; preds = %47, %42, %37
ret i32 0
}