// File: BenLangmead[P]bowtie/bowtie_inspect.cpp
// Function: parseOptions(int, char**)
static void parseOptions(int argc, char **argv) {
	int option_index = 0;
	int next_option;
	do {
		next_option = getopt_long(argc, argv, short_options, long_options, &option_index);
		switch (next_option) {
			case ARG_WRAPPER:
				wrapper = optarg;
				break;
			case ARG_USAGE:
			case 'h':
				printUsage(cout);
				throw 0;
				break;
			case 'v': verbose = true; break;
			case ARG_VERSION: showVersion = true; break;
			case ARG_EXCL_AMBIG: exclAllGaps = true; break;
			case ARG_EXTRA: extra = true; break;
			case 'e': refFromEbwt = true; break;
			case 'n': names_only = true; break;
			case 's': summarize_only = true; break;
			case 'a': across = parseInt(-1, "-a/--across arg must be at least 1"); break;
			case -1: break; /* Done with options. */
			case 0:
				if (long_options[option_index].flag != 0)
					break;
			default:
				printUsage(cerr);
				throw 1;
		}
	} while(next_option != -1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x4(%rbp), %edi
movq -0x10(%rbp), %rsi
movq 0x38da4(%rip), %rdx     # 0x4a458
leaq 0x38da5(%rip), %rcx     # 0x4a460
leaq -0x14(%rbp), %r8
callq 0x56c0
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
subl $-0x1, %eax
je 0x11838
jmp 0x116d8
movl -0x1c(%rbp), %eax
testl %eax, %eax
je 0x1183a
jmp 0x116e5
movl -0x1c(%rbp), %eax
subl $0x61, %eax
je 0x1181f
jmp 0x116f3
movl -0x1c(%rbp), %eax
subl $0x65, %eax
je 0x117fe
jmp 0x11701
movl -0x1c(%rbp), %eax
subl $0x68, %eax
je 0x1179c
jmp 0x1170f
movl -0x1c(%rbp), %eax
subl $0x6e, %eax
je 0x11807
jmp 0x1171d
movl -0x1c(%rbp), %eax
subl $0x73, %eax
je 0x11813
jmp 0x1172b
movl -0x1c(%rbp), %eax
subl $0x76, %eax
je 0x117cb
jmp 0x11739
movl -0x1c(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
je 0x117da
jmp 0x11749
movl -0x1c(%rbp), %eax
subl $0x101, %eax            # imm = 0x101
je 0x1179c
jmp 0x11755
movl -0x1c(%rbp), %eax
subl $0x102, %eax            # imm = 0x102
je 0x117f2
jmp 0x11765
movl -0x1c(%rbp), %eax
subl $0x103, %eax            # imm = 0x103
je 0x117e6
jmp 0x11771
movl -0x1c(%rbp), %eax
subl $0x104, %eax            # imm = 0x104
jne 0x11857
jmp 0x11781
movq 0x38800(%rip), %rax     # 0x49f88
movq (%rax), %rsi
leaq 0x3aa06(%rip), %rdi     # 0x4c198
callq 0x5570
jmp 0x11886
movq 0x3881d(%rip), %rdi     # 0x49fc0
callq 0x118a0
movl $0x4, %edi
callq 0x5180
movq %rax, %rdi
movl $0x0, (%rdi)
movq 0x387ae(%rip), %rsi     # 0x49f70
xorl %eax, %eax
movl %eax, %edx
callq 0x5720
movl $0x1, 0x3a9bb(%rip)     # 0x4c190
jmp 0x11886
movb $0x1, 0x3a9e7(%rip)     # 0x4c1c8
jmp 0x11886
movb $0x1, 0x3a9dc(%rip)     # 0x4c1c9
jmp 0x11886
movb $0x1, 0x3a9bf(%rip)     # 0x4c1b8
jmp 0x11886
movb $0x1, 0x3a9c5(%rip)     # 0x4c1ca
jmp 0x11886
movl $0x1, 0x3a9bb(%rip)     # 0x4c1cc
jmp 0x11886
movl $0x1, 0x3a9b3(%rip)     # 0x4c1d0
jmp 0x11886
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
leaq 0x30004(%rip), %rsi     # 0x4182f
callq 0x140e0
movl %eax, 0x38c1a(%rip)     # 0x4a450
jmp 0x11886
jmp 0x11886
movslq -0x14(%rbp), %rcx
leaq 0x38c1b(%rip), %rax     # 0x4a460
shlq $0x5, %rcx
addq %rcx, %rax
cmpq $0x0, 0x10(%rax)
je 0x11855
jmp 0x11886
jmp 0x11857
movq 0x38792(%rip), %rdi     # 0x49ff0
callq 0x118a0
movl $0x4, %edi
callq 0x5180
movq %rax, %rdi
movl $0x1, (%rdi)
movq 0x386f3(%rip), %rsi     # 0x49f70
xorl %eax, %eax
movl %eax, %edx
callq 0x5720
jmp 0x11888
cmpl $-0x1, -0x18(%rbp)
jne 0x116a6
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax,%rax)