#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 getopt(int, char **, char *);
scalar_t__ optind;
int /*<<< orphan*/ printf(char *, char *);
int regenerate_index(char *);
int /*<<< orphan*/ usage();
int main(int argc, char *argv[]) {
  char *fasta = NULL;
  char *qual = NULL;
  char *extras = NULL;
  int size = 5000;
  int res = 0;
  int ch;
  int output_fasta = 0;
  int output_qual = 0;
  while ((ch = getopt(argc, argv, "h")) != -1) {
    switch (ch) {
    case 'h':
      usage();
      break;
    case '?':
    default:
      usage();
    }
  }
  argc -= optind;
  argv += optind;
  if (argc != 1) {
    usage();
  }
  if (regenerate_index(argv[0]) == -1) {
    printf("File %s does not exists", argv[0]);
    exit(-1);
  }
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
movq   $0x0,-0x28(%rbp)
movl   $0x1388,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xe58(%rip),%rdx
call   1060 <getopt@plt>
mov    %eax,-0x34(%rbp)
cmp    $0xffffffff,%eax
je     11fb <main+0xab>
mov    -0x34(%rbp),%eax
mov    %eax,-0x40(%rbp)
sub    $0x3f,%eax
je     11ea <main+0x9a>
jmp    11cd <main+0x7d>
mov    -0x40(%rbp),%eax
sub    $0x68,%eax
jne    11ef <main+0x9f>
jmp    11de <main+0x8e>
mov    $0x0,%al
call   1050 <usage@plt>
jmp    11f6 <main+0xa6>
jmp    11ef <main+0x9f>
mov    $0x0,%al
call   1050 <usage@plt>
jmp    119a <main+0x4a>
mov    0x2de6(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    0x2dd2(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
je     1236 <main+0xe6>
mov    $0x0,%al
call   1050 <usage@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1040 <regenerate_index@plt>
cmp    $0xffffffff,%eax
jne    1268 <main+0x118>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xda9(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %edi,%ebp
lea    0xea0(%rip),%rdx
call   1060 <getopt@plt>
cmp    $0xffffffff,%eax
je     1199 <main+0x49>
lea    0xe8f(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1050 <usage@plt>
mov    %ebp,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1060 <getopt@plt>
cmp    $0xffffffff,%eax
jne    1180 <main+0x30>
mov    0x2e48(%rip),%rax
mov    (%rax),%rbx
sub    %ebx,%ebp
cmp    $0x1,%ebp
je     11b1 <main+0x61>
xor    %eax,%eax
call   1050 <usage@plt>
mov    (%r14,%rbx,8),%rdi
call   1040 <regenerate_index@plt>
cmp    $0xffffffff,%eax
jne    11d9 <main+0x89>
mov    (%r14,%rbx,8),%rsi
lea    0xe38(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1070 <exit@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"h\00"
@optind = global i64 0
@.str.1 = [24 x i8] c"File %s does not exists\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8* null, i8** %6
store i8* null, i8** %7
store i8* null, i8** %8
store i32 5000, i32* %9
store i32 0, i32* %10
store i32 0, i32* %12
store i32 0, i32* %13
br label %14
14: ; preds = %26, %2
%15 = load i32, i32* %4
%16 = load i8**, i8*** %5
%17 = call i32 @getopt(i32 %15, i8** %16, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32 %17, i32* %11
%18 = icmp ne i32 %17, -1
br i1 %18, label %19, label %27
19: ; preds = %14
%20 = load i32, i32* %11
switch i32 %20, label %24 [
i32 104, label %21
i32 63, label %23
]
21: ; preds = %19
%22 = call i32 (...) @usage()
br label %26
23: ; preds = %19
br label %24
24: ; preds = %19, %23
%25 = call i32 (...) @usage()
br label %26
26: ; preds = %24, %21
br label %14
27: ; preds = %14
%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 ne i32 %36, 1
br i1 %37, label %38, label %40
38: ; preds = %27
%39 = call i32 (...) @usage()
br label %40
40: ; preds = %38, %27
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 0
%43 = load i8*, i8** %42
%44 = call i32 @regenerate_index(i8* %43)
%45 = icmp eq i32 %44, -1
br i1 %45, label %46, label %52
46: ; preds = %40
%47 = load i8**, i8*** %5
%48 = getelementptr inbounds i8*, i8** %47, i64 0
%49 = load i8*, i8** %48
%50 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %49)
%51 = call i32 @exit(i32 -1)
unreachable
52: ; preds = %40
%53 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [2 x i8] c"h\00"
@optind = global i64 0
@.str.1 = [24 x i8] c"File %s does not exists\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = icmp eq i32 %3, -1
br i1 %4, label %9, label %5
5: ; preds = %2, %5
%6 = tail call i32 (...) @usage()
%7 = tail call i32 @getopt(i32 %0, i8** %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %5
9: ; preds = %5, %2
%10 = load i64, i64* @optind
%11 = trunc i64 %10 to i32
%12 = sub i32 %0, %11
%13 = getelementptr inbounds i8*, i8** %1, i64 %10
%14 = icmp eq i32 %12, 1
br i1 %14, label %17, label %15
15: ; preds = %9
%16 = tail call i32 (...) @usage()
br label %17
17: ; preds = %15, %9
%18 = load i8*, i8** %13
%19 = tail call i32 @regenerate_index(i8* %18)
%20 = icmp eq i32 %19, -1
br i1 %20, label %21, label %25
21: ; preds = %17
%22 = load i8*, i8** %13
%23 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %22)
%24 = tail call i32 @exit(i32 -1)
unreachable
25: ; preds = %17
%26 = tail call i32 @exit(i32 0)
unreachable
}