#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 getopt(int, char **, char *);
int iterate_fastq(char *, int, int, int);
scalar_t__ optind;
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  int ch;
  int output_fasta = 0;
  int output_extras = 0;
  int only_extras = 0;
  while ((ch = getopt(argc, argv, "feEh")) != -1) {
    switch (ch) {
    case 'f':
      output_fasta = 1;
      break;
    case 'e':
      output_extras = 1;
      break;
    case 'E':
      output_extras = 1;
      only_extras = 1;
      break;
    case 'h':
      usage();
      break;
    case '?':
    default:
      usage();
    }
  }
  argc -= optind;
  argv += optind;
  if (argc < 1) {
    usage();
    return -1;
  }
  int res = iterate_fastq(argv[0], only_extras, output_fasta, output_extras);
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xf3f(%rip),%rdx
call   1050 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     11eb <main+0xbb>
mov    -0x14(%rbp),%eax
add    $0xffffffc1,%eax
mov    %eax,%ecx
mov    %rcx,-0x30(%rbp)
sub    $0x29,%eax
ja     11df <main+0xaf>
mov    -0x30(%rbp),%rax
lea    0xe66(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x18(%rbp)
jmp    11e6 <main+0xb6>
movl   $0x1,-0x1c(%rbp)
jmp    11e6 <main+0xb6>
movl   $0x1,-0x1c(%rbp)
movl   $0x1,-0x20(%rbp)
jmp    11e6 <main+0xb6>
mov    $0x0,%al
call   1040 <usage@plt>
jmp    11e6 <main+0xb6>
jmp    11df <main+0xaf>
mov    $0x0,%al
call   1040 <usage@plt>
jmp    115b <main+0x2b>
mov    0x2df6(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    0x2de2(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jge    1232 <main+0x102>
mov    $0x0,%al
call   1040 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1250 <main+0x120>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
call   1030 <iterate_fastq@plt>
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xf49(%rip),%r13
lea    0xeb2(%rip),%r14
movl   $0x0,0x4(%rsp)
xor    %r15d,%r15d
xor    %r12d,%r12d
jmp    116c <main+0x3c>
xchg   %ax,%ax
cmp    $0xffffffff,%eax
je     11a2 <main+0x72>
xor    %eax,%eax
call   1040 <usage@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r13,%rdx
call   1050 <getopt@plt>
lea    -0x45(%rax),%ecx
cmp    $0x23,%ecx
ja     1160 <main+0x30>
movslq (%r14,%rcx,4),%rax
add    %r14,%rax
jmp    *%rax
movl   $0x1,0x4(%rsp)
mov    $0x1,%r12d
jmp    116c <main+0x3c>
mov    $0x1,%r15d
jmp    116c <main+0x3c>
mov    0x2e3f(%rip),%rax
mov    (%rax),%rax
sub    %eax,%ebp
test   %ebp,%ebp
jle    11d3 <main+0xa3>
mov    (%rbx,%rax,8),%rdi
mov    0x4(%rsp),%esi
mov    %r15d,%edx
mov    %r12d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <iterate_fastq@plt>
xor    %eax,%eax
call   1040 <usage@plt>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"feEh\00"
@optind = global i64 0
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 i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %7
store i32 0, i32* %8
store i32 0, i32* %9
br label %11
11: ; preds = %26, %2
%12 = load i32, i32* %4
%13 = load i8**, i8*** %5
%14 = call i32 @getopt(i32 %12, i8** %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 %14, i32* %6
%15 = icmp ne i32 %14, -1
br i1 %15, label %16, label %27
16: ; preds = %11
%17 = load i32, i32* %6
switch i32 %17, label %24 [
i32 102, label %18
i32 101, label %19
i32 69, label %20
i32 104, label %21
i32 63, label %23
]
18: ; preds = %16
store i32 1, i32* %7
br label %26
19: ; preds = %16
store i32 1, i32* %8
br label %26
20: ; preds = %16
store i32 1, i32* %8
store i32 1, i32* %9
br label %26
21: ; preds = %16
%22 = call i32 (...) @usage()
br label %26
23: ; preds = %16
br label %24
24: ; preds = %16, %23
%25 = call i32 (...) @usage()
br label %26
26: ; preds = %24, %21, %20, %19, %18
br label %11
27: ; preds = %11
%28 = load i64, i64* @optind
%29 = load i32, i32* %4
%30 = sext i32 %29 to i64
%31 = sub nsw i64 %30, %28
%32 = trunc i64 %31 to i32
store i32 %32, i32* %4
%33 = load i64, i64* @optind
%34 = load i8**, i8*** %5
%35 = getelementptr inbounds i8*, i8** %34, i64 %33
store i8** %35, i8*** %5
%36 = load i32, i32* %4
%37 = icmp slt i32 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %27
%39 = call i32 (...) @usage()
store i32 -1, i32* %3
br label %49
40: ; preds = %27
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 0
%43 = load i8*, i8** %42
%44 = load i32, i32* %9
%45 = load i32, i32* %7
%46 = load i32, i32* %8
%47 = call i32 @iterate_fastq(i8* %43, i32 %44, i32 %45, i32 %46)
store i32 %47, i32* %10
%48 = load i32, i32* %10
store i32 %48, i32* %3
br label %49
49: ; preds = %40, %38
%50 = load i32, i32* %3
ret i32 %50
}

LLVM IR (-O2):
@.str = [5 x i8] c"feEh\00"
@optind = global i64 0
define i32 @main(i32 %0, i8** %1) {
br label %3
3: ; preds = %12, %2
%4 = phi i32 [ 0, %2 ], [ 1, %12 ]
%5 = phi i32 [ 0, %2 ], [ %11, %12 ]
%6 = phi i32 [ 0, %2 ], [ %9, %12 ]
br label %7
7: ; preds = %12, %3
%8 = phi i32 [ %5, %3 ], [ 1, %12 ]
%9 = phi i32 [ %6, %3 ], [ 1, %12 ]
br label %10
10: ; preds = %12, %7
%11 = phi i32 [ %8, %7 ], [ 1, %12 ]
br label %12
12: ; preds = %18, %10
%13 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
switch i32 %13, label %16 [
i32 -1, label %19
i32 102, label %3
i32 101, label %10
i32 69, label %7
i32 104, label %14
]
14: ; preds = %12
%15 = tail call i32 (...) @usage()
br label %18
16: ; preds = %12
%17 = tail call i32 (...) @usage()
br label %18
18: ; preds = %16, %14
br label %12
19: ; preds = %12
%20 = load i64, i64* @optind
%21 = trunc i64 %20 to i32
%22 = sub i32 %0, %21
%23 = icmp slt i32 %22, 1
br i1 %23, label %24, label %26
24: ; preds = %19
%25 = tail call i32 (...) @usage()
br label %30
26: ; preds = %19
%27 = getelementptr inbounds i8*, i8** %1, i64 %20
%28 = load i8*, i8** %27
%29 = tail call i32 @iterate_fastq(i8* %28, i32 %9, i32 %4, i32 %11)
br label %30
30: ; preds = %26, %24
%31 = phi i32 [ -1, %24 ], [ %29, %26 ]
ret i32 %31
}