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


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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
lea    0xeac(%rip),%rdx
call   1050 <getopt@plt>
mov    %eax,-0x14(%rbp)
cmp    $0xffffffff,%eax
je     11a7 <main+0x77>
mov    -0x14(%rbp),%eax
mov    %eax,-0x1c(%rbp)
sub    $0x3f,%eax
je     1196 <main+0x66>
jmp    1179 <main+0x49>
mov    -0x1c(%rbp),%eax
sub    $0x68,%eax
jne    119b <main+0x6b>
jmp    118a <main+0x5a>
mov    $0x0,%al
call   1040 <usage@plt>
jmp    11a2 <main+0x72>
jmp    119b <main+0x6b>
mov    $0x0,%al
call   1040 <usage@plt>
jmp    1146 <main+0x16>
mov    0x2e3a(%rip),%rax
mov    (%rax),%rcx
movslq -0x8(%rbp),%rax
sub    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    0x2e26(%rip),%rax
mov    (%rax),%rax
shl    $0x3,%rax
add    -0x10(%rbp),%rax
mov    %rax,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    11ee <main+0xbe>
mov    $0x0,%al
call   1040 <usage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    120b <main+0xdb>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1030 <find_in_fastq@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec0(%rip),%rdx
call   1050 <getopt@plt>
cmp    $0xffffffff,%eax
je     1179 <main+0x49>
lea    0xeaf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <usage@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14,%rdx
call   1050 <getopt@plt>
cmp    $0xffffffff,%eax
jne    1160 <main+0x30>
mov    0x2e68(%rip),%rax
mov    (%rax),%rax
sub    %eax,%ebp
cmp    $0x1,%ebp
jg     119b <main+0x6b>
xor    %eax,%eax
call   1040 <usage@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    (%rbx,%rax,8),%rdi
mov    0x8(%rbx,%rax,8),%rsi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <find_in_fastq@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"h\00"
@optind = global i64 0
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 slt i32 %12, 2
br i1 %14, label %15, label %17
15: ; preds = %9
%16 = tail call i32 (...) @usage()
br label %22
17: ; preds = %9
%18 = load i8*, i8** %13
%19 = getelementptr inbounds i8*, i8** %13, i64 1
%20 = load i8*, i8** %19
%21 = tail call i32 @find_in_fastq(i8* %18, i8* %20)
br label %22
22: ; preds = %17, %15
%23 = phi i32 [ -1, %15 ], [ %21, %17 ]
ret i32 %23
}