#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 atoi(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ print_help(char *);
int /*<<< orphan*/ print_usage(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ strcmp(char *, char *);
int main(int argc, char *argv[]) {
  if (argc < 2) {
    print_usage(argv[0]);
    exit(0);
  }
  int fasta_output = 0;
  int nseqs_to_print = 0;
  int i = 1;
  while (i < argc) {
    if (!strcmp(argv[i], "-h")) {
      print_help(argv[0]);
      exit(0);
    } else if (!strcmp(argv[i], "-a")) {
      fasta_output = 1;
    } else if (!strcmp(argv[i], "-n")) {
      nseqs_to_print = atoi(argv[++i]);
    } else {
      printf("Unknown option '%s'\n", argv[i]);
    }
    i++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1193 <main+0x33>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1080 <print_usage@plt>
xor    %edi,%edi
call   1070 <exit@plt>
movl   $0x0,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
movl   $0x1,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1287 <main+0x127>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe39(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    11e8 <main+0x88>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <print_help@plt>
xor    %edi,%edi
call   1070 <exit@plt>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xe08(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1215 <main+0xb5>
movl   $0x1,-0x14(%rbp)
jmp    1274 <main+0x114>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
lea    0xdde(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
jne    1257 <main+0xf7>
mov    -0x10(%rbp),%rax
mov    -0x1c(%rbp),%ecx
add    $0x1,%ecx
mov    %ecx,-0x1c(%rbp)
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x18(%rbp)
jmp    126f <main+0x10f>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xd9f(%rip),%rdi
call   1030 <printf@plt>
jmp    1274 <main+0x114>
jmp    1279 <main+0x119>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    11a8 <main+0x48>
mov    -0x4(%rbp),%eax
add    $0x20,%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
cmp    $0x2,%edi
jl     11f6 <main+0xa6>
mov    %edi,%ebp
mov    $0x1,%r12d
lea    0xe8a(%rip),%r14
lea    0xe86(%rip),%r15
jmp    1198 <main+0x48>
nop
lea    0xe82(%rip),%rdi
mov    %r13,%rsi
call   1030 <printf@plt>
add    $0x1,%r12d
cmp    %ebp,%r12d
jge    11d6 <main+0x86>
movslq %r12d,%rax
mov    (%rbx,%rax,8),%r13
mov    %r13,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     11e7 <main+0x97>
mov    %r13,%rdi
mov    %r15,%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
je     118f <main+0x3f>
mov    %r13,%rdi
lea    0xe3f(%rip),%rsi
call   1040 <strcmp@plt>
test   %eax,%eax
jne    1180 <main+0x30>
add    $0x1,%r12d
jmp    118f <main+0x3f>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rbx),%rdi
call   1050 <print_help@plt>
xor    %edi,%edi
call   1060 <exit@plt>
mov    (%rbx),%rdi
call   1070 <print_usage@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"-h\00"
@.str.1 = [3 x i8] c"-a\00"
@.str.2 = [3 x i8] c"-n\00"
@.str.3 = [21 x i8] c"Unknown option '%s'\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
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 2
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i8**, i8*** %5
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = call i32 @print_usage(i8* %14)
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %2
store i32 0, i32* %6
store i32 0, i32* %7
store i32 1, i32* %8
br label %18
18: ; preds = %70, %17
%19 = load i32, i32* %8
%20 = load i32, i32* %4
%21 = icmp slt i32 %19, %20
br i1 %21, label %22, label %73
22: ; preds = %18
%23 = load i8**, i8*** %5
%24 = load i32, i32* %8
%25 = sext i32 %24 to i64
%26 = getelementptr inbounds i8*, i8** %23, i64 %25
%27 = load i8*, i8** %26
%28 = call i32 @strcmp(i8* %27, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%29 = icmp ne i32 %28, 0
br i1 %29, label %36, label %30
30: ; preds = %22
%31 = load i8**, i8*** %5
%32 = getelementptr inbounds i8*, i8** %31, i64 0
%33 = load i8*, i8** %32
%34 = call i32 @print_help(i8* %33)
%35 = call i32 @exit(i32 0)
unreachable
36: ; preds = %22
%37 = load i8**, i8*** %5
%38 = load i32, i32* %8
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i8*, i8** %37, i64 %39
%41 = load i8*, i8** %40
%42 = call i32 @strcmp(i8* %41, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%43 = icmp ne i32 %42, 0
br i1 %43, label %45, label %44
44: ; preds = %36
store i32 1, i32* %6
br label %69
45: ; preds = %36
%46 = load i8**, i8*** %5
%47 = load i32, i32* %8
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i8*, i8** %46, i64 %48
%50 = load i8*, i8** %49
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%52 = icmp ne i32 %51, 0
br i1 %52, label %61, label %53
53: ; preds = %45
%54 = load i8**, i8*** %5
%55 = load i32, i32* %8
%56 = add nsw i32 %55, 1
store i32 %56, i32* %8
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i8*, i8** %54, i64 %57
%59 = load i8*, i8** %58
%60 = call i32 @atoi(i8* %59)
store i32 %60, i32* %7
br label %68
61: ; preds = %45
%62 = load i8**, i8*** %5
%63 = load i32, i32* %8
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8*, i8** %62, i64 %64
%66 = load i8*, i8** %65
%67 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %66)
br label %68
68: ; preds = %61, %53
br label %69
69: ; preds = %68, %44
br label %70
70: ; preds = %69
%71 = load i32, i32* %8
%72 = add nsw i32 %71, 1
store i32 %72, i32* %8
br label %18
73: ; preds = %18
%74 = load i32, i32* %3
ret i32 %74
}

LLVM IR (-O2):
@.str = [3 x i8] c"-h\00"
@.str.1 = [3 x i8] c"-a\00"
@.str.2 = [3 x i8] c"-n\00"
@.str.3 = [21 x i8] c"Unknown option '%s'\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i8*, i8** %1
%6 = tail call i32 @print_usage(i8* %5)
%7 = tail call i32 @exit(i32 0)
unreachable
8: ; preds = %2, %29
%9 = phi i32 [ %31, %29 ], [ 1, %2 ]
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i8*, i8** %1, i64 %10
%12 = load i8*, i8** %11
%13 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %19
15: ; preds = %8
%16 = load i8*, i8** %1
%17 = tail call i32 @print_help(i8* %16)
%18 = tail call i32 @exit(i32 0)
unreachable
19: ; preds = %8
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %29, label %22
22: ; preds = %19
%23 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%24 = icmp eq i32 %23, 0
br i1 %24, label %25, label %27
25: ; preds = %22
%26 = add nsw i32 %9, 1
br label %29
27: ; preds = %22
%28 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.3, i64 0, i64 0), i8* %12)
br label %29
29: ; preds = %19, %27, %25
%30 = phi i32 [ %9, %27 ], [ %26, %25 ], [ %9, %19 ]
%31 = add nsw i32 %30, 1
%32 = icmp slt i32 %31, %0
br i1 %32, label %8, label %33
33: ; preds = %29
ret i32 0
}