// File: BenLangmead[P]bowtie/bowtie_inspect.cpp
// Function: main
int main(int argc, char **argv) {
	try {
		string ebwtFile;  // read serialized Ebwt from this file
		string query;   // read query string(s) from this file
		EList<string> queries;
		string outfile; // write query results to this file
		argv0 = argv[0];
		parseOptions(argc, argv);
		if(showVersion) {
			cout << argv0 << " version " << BOWTIE_VERSION << endl;
			if(sizeof(void*) == 4) {
				cout << "32-bit" << endl;
			} else if(sizeof(void*) == 8) {
				cout << "64-bit" << endl;
			} else {
				cout << "Neither 32- nor 64-bit: sizeof(void*) = " << sizeof(void*) << endl;
			}
			cout << "Built on " << BUILD_HOST << endl;
			cout << BUILD_TIME << endl;
			cout << "Compiler: " << COMPILER_VERSION << endl;
			cout << "Options: " << COMPILER_OPTIONS << endl;
			cout << "Sizeof {int, long, long long, void*, size_t, off_t}: {"
				 << sizeof(int)
				 << ", " << sizeof(long) << ", " << sizeof(long long)
				 << ", " << sizeof(void *) << ", " << sizeof(size_t)
				 << ", " << sizeof(off_t) << "}" << endl;
			return 0;
		}

		// Get input filename
		if(optind >= argc) {
			cerr << "No index name given!" << endl;
			printUsage(cerr);
			return 1;
		}
		ebwtFile = argv[optind++];

		// Optionally summarize
		if(verbose) {
			cout << "Input ebwt file: \"" << ebwtFile << "\"" << endl;
			cout << "Output file: \"" << outfile << "\"" << endl;
			cout << "Local endianness: " << (currentlyBigEndian()? "big":"little") << endl;
#ifdef NDEBUG
			cout << "Assertions: disabled" << endl;
#else
			cout << "Assertions: enabled" << endl;
#endif
		}
		driver(ebwtFile, query);
		return 0;
	} catch(std::exception& e) {
		cerr << "Command: ";
		for(int i = 0; i < argc; i++) cerr << argv[i] << " ";
		cerr << endl;
		return 1;
	} catch(int e) {
		if(e != 0) {
			cerr << "Command: ";
			for(int i = 0; i < argc; i++) cerr << argv[i] << " ";
			cerr << endl;
		}
		return e;
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x5580
leaq -0x50(%rbp), %rdi
callq 0x5580
leaq -0x70(%rbp), %rdi
callq 0x22020
jmp 0x10e96
leaq -0xa0(%rbp), %rdi
callq 0x5580
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, 0x3b310(%rip)     # 0x4c1c0
movl -0x8(%rbp), %edi
movq -0x10(%rbp), %rsi
callq 0x11690
jmp 0x10ebe
testb $0x1, 0x3b303(%rip)     # 0x4c1c8
je 0x1123f
movq 0x3b2ee(%rip), %rsi     # 0x4c1c0
movq 0x390e7(%rip), %rdi     # 0x49fc0
callq 0x5360
movq %rax, -0xc8(%rbp)
jmp 0x10ee7
movq -0xc8(%rbp), %rdi
leaq 0x2eed3(%rip), %rsi     # 0x3fdc8
callq 0x5360
movq %rax, -0xd0(%rbp)
jmp 0x10f03
movq -0xd0(%rbp), %rdi
leaq 0x2eec1(%rip), %rsi     # 0x3fdd2
callq 0x5360
movq %rax, -0xd8(%rbp)
jmp 0x10f1f
movq -0xd8(%rbp), %rdi
movq 0x39053(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10f34
movq 0x39085(%rip), %rdi     # 0x49fc0
leaq 0x2ee96(%rip), %rsi     # 0x3fdd8
callq 0x5360
movq %rax, -0xe0(%rbp)
jmp 0x10f50
movq -0xe0(%rbp), %rdi
movq 0x39022(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10f65
movq 0x39054(%rip), %rdi     # 0x49fc0
leaq 0x2ee6c(%rip), %rsi     # 0x3fddf
callq 0x5360
movq %rax, -0xe8(%rbp)
jmp 0x10f81
movq -0xe8(%rbp), %rdi
leaq 0x2ee5a(%rip), %rsi     # 0x3fde9
callq 0x5360
movq %rax, -0xf0(%rbp)
jmp 0x10f9d
movq -0xf0(%rbp), %rdi
movq 0x38fd5(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10fb2
movq 0x39007(%rip), %rdi     # 0x49fc0
leaq 0x2ee36(%rip), %rsi     # 0x3fdf6
callq 0x5360
movq %rax, -0xf8(%rbp)
jmp 0x10fce
movq -0xf8(%rbp), %rdi
movq 0x38fa4(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10fe3
movq 0x38fd6(%rip), %rdi     # 0x49fc0
leaq 0x2ee19(%rip), %rsi     # 0x3fe0a
callq 0x5360
movq %rax, -0x100(%rbp)
jmp 0x10fff
movq -0x100(%rbp), %rdi
leaq 0x2ee08(%rip), %rsi     # 0x3fe15
callq 0x5360
movq %rax, -0x108(%rbp)
jmp 0x1101b
movq -0x108(%rbp), %rdi
movq 0x38f57(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x11030
movq 0x38f89(%rip), %rdi     # 0x49fc0
leaq 0x2ee33(%rip), %rsi     # 0x3fe71
callq 0x5360
movq %rax, -0x110(%rbp)
jmp 0x1104c
movq -0x110(%rbp), %rdi
leaq 0x2ee21(%rip), %rsi     # 0x3fe7b
callq 0x5360
movq %rax, -0x118(%rbp)
jmp 0x11068
movq -0x118(%rbp), %rdi
movq 0x38f0a(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x1107d
movq 0x38f3c(%rip), %rdi     # 0x49fc0
leaq 0x2ee2c(%rip), %rsi     # 0x3feb7
callq 0x5360
movq %rax, -0x120(%rbp)
jmp 0x11099
movq -0x120(%rbp), %rdi
movl $0x4, %esi
callq 0x50c0
movq %rax, -0x128(%rbp)
jmp 0x110b3
movq -0x128(%rbp), %rdi
leaq 0x2e5f9(%rip), %rsi     # 0x3f6ba
callq 0x5360
movq %rax, -0x130(%rbp)
jmp 0x110cf
movq -0x130(%rbp), %rdi
movl $0x8, %esi
callq 0x50c0
movq %rax, -0x138(%rbp)
jmp 0x110e9
movq -0x138(%rbp), %rdi
leaq 0x2e5c3(%rip), %rsi     # 0x3f6ba
callq 0x5360
movq %rax, -0x140(%rbp)
jmp 0x11105
movq -0x140(%rbp), %rdi
movl $0x8, %esi
callq 0x50c0
movq %rax, -0x148(%rbp)
jmp 0x1111f
movq -0x148(%rbp), %rdi
leaq 0x2e58d(%rip), %rsi     # 0x3f6ba
callq 0x5360
movq %rax, -0x150(%rbp)
jmp 0x1113b
movq -0x150(%rbp), %rdi
movl $0x8, %esi
callq 0x50c0
movq %rax, -0x158(%rbp)
jmp 0x11155
movq -0x158(%rbp), %rdi
leaq 0x2e557(%rip), %rsi     # 0x3f6ba
callq 0x5360
movq %rax, -0x160(%rbp)
jmp 0x11171
movq -0x160(%rbp), %rdi
movl $0x8, %esi
callq 0x50c0
movq %rax, -0x168(%rbp)
jmp 0x1118b
movq -0x168(%rbp), %rdi
leaq 0x2e521(%rip), %rsi     # 0x3f6ba
callq 0x5360
movq %rax, -0x170(%rbp)
jmp 0x111a7
movq -0x170(%rbp), %rdi
movl $0x8, %esi
callq 0x50c0
movq %rax, -0x178(%rbp)
jmp 0x111c1
movq -0x178(%rbp), %rdi
leaq 0x2df70(%rip), %rsi     # 0x3f13f
callq 0x5360
movq %rax, -0x180(%rbp)
jmp 0x111dd
movq -0x180(%rbp), %rdi
movq 0x38d95(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x111f2
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa4(%rbp)
jmp 0x11462
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x1148e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5888
leaq -0x70(%rbp), %rdi
callq 0x22160
jmp 0x1148e
movq 0x38d8a(%rip), %rax     # 0x49fd0
movl (%rax), %eax
cmpl -0x8(%rbp), %eax
jl 0x112a2
movq 0x38d9c(%rip), %rdi     # 0x49ff0
leaq 0x2ec93(%rip), %rsi     # 0x3feee
callq 0x5360
movq %rax, -0x188(%rbp)
jmp 0x11269
movq -0x188(%rbp), %rdi
movq 0x38d09(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x1127e
movq 0x38d6b(%rip), %rdi     # 0x49ff0
callq 0x118a0
jmp 0x1128c
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa4(%rbp)
jmp 0x11462
movq -0x10(%rbp), %rax
movq 0x38d23(%rip), %rdx     # 0x49fd0
movslq (%rdx), %rcx
movl %ecx, %esi
incl %esi
movl %esi, (%rdx)
movq (%rax,%rcx,8), %rsi
leaq -0x30(%rbp), %rdi
callq 0x5570
jmp 0x112c5
cmpl $0x0, 0x3aec4(%rip)     # 0x4c190
je 0x11442
movq 0x38ce7(%rip), %rdi     # 0x49fc0
leaq 0x2ec23(%rip), %rsi     # 0x3ff03
callq 0x5360
movq %rax, -0x190(%rbp)
jmp 0x112ee
movq -0x190(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x52f0
movq %rax, -0x198(%rbp)
jmp 0x11307
movq -0x198(%rbp), %rdi
leaq 0x2ec0e(%rip), %rsi     # 0x3ff23
callq 0x5360
movq %rax, -0x1a0(%rbp)
jmp 0x11323
movq -0x1a0(%rbp), %rdi
movq 0x38c4f(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x11338
movq 0x38c81(%rip), %rdi     # 0x49fc0
leaq 0x2ebd0(%rip), %rsi     # 0x3ff16
callq 0x5360
movq %rax, -0x1a8(%rbp)
jmp 0x11354
movq -0x1a8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x52f0
movq %rax, -0x1b0(%rbp)
jmp 0x11370
movq -0x1b0(%rbp), %rdi
leaq 0x2eba5(%rip), %rsi     # 0x3ff23
callq 0x5360
movq %rax, -0x1b8(%rbp)
jmp 0x1138c
movq -0x1b8(%rbp), %rdi
movq 0x38be6(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x113a1
movq 0x38c18(%rip), %rdi     # 0x49fc0
leaq 0x2eb76(%rip), %rsi     # 0x3ff25
callq 0x5360
movq %rax, -0x1c0(%rbp)
jmp 0x113bd
callq 0x11c90
movb %al, -0x1c1(%rbp)
jmp 0x113ca
movq -0x1c0(%rbp), %rdi
movb -0x1c1(%rbp), %cl
leaq 0x30497(%rip), %rax     # 0x41875
leaq 0x2eb53(%rip), %rsi     # 0x3ff38
testb $0x1, %cl
cmovneq %rax, %rsi
callq 0x5360
movq %rax, -0x1d0(%rbp)
jmp 0x113fa
movq -0x1d0(%rbp), %rdi
movq 0x38b78(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x1140f
movq 0x38baa(%rip), %rdi     # 0x49fc0
leaq 0x2eb22(%rip), %rsi     # 0x3ff3f
callq 0x5360
movq %rax, -0x1d8(%rbp)
jmp 0x1142b
movq -0x1d8(%rbp), %rdi
movq 0x38b47(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x11440
jmp 0x11442
leaq -0x30(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x11cb0
jmp 0x11451
movl $0x0, -0x4(%rbp)
movl $0x1, -0xa4(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x5888
leaq -0x70(%rbp), %rdi
callq 0x22160
leaq -0x50(%rbp), %rdi
callq 0x5888
leaq -0x30(%rbp), %rdi
callq 0x5888
jmp 0x1166d
leaq -0x50(%rbp), %rdi
callq 0x5888
leaq -0x30(%rbp), %rdi
callq 0x5888
movl -0x7c(%rbp), %eax
movl %eax, -0x1dc(%rbp)
movl $0x2, %ecx
cmpl %ecx, %eax
jne 0x11540
movq -0x78(%rbp), %rdi
callq 0x5140
movq %rax, -0xb8(%rbp)
movq 0x38b23(%rip), %rdi     # 0x49ff0
leaq 0x2ea7f(%rip), %rsi     # 0x3ff53
callq 0x5360
jmp 0x114db
movl $0x0, -0xbc(%rbp)
movl -0xbc(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x1163e
movq -0x10(%rbp), %rax
movslq -0xbc(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x38ae6(%rip), %rdi     # 0x49ff0
callq 0x5360
movq %rax, -0x1e8(%rbp)
jmp 0x11518
movq -0x1e8(%rbp), %rdi
leaq 0x2e195(%rip), %rsi     # 0x3f6bb
callq 0x5360
jmp 0x1152d
jmp 0x1152f
movl -0xbc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xbc(%rbp)
jmp 0x114e5
movl -0x1dc(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x11679
movq -0x78(%rbp), %rdi
callq 0x5140
movl (%rax), %eax
movl %eax, -0xa8(%rbp)
cmpl $0x0, -0xa8(%rbp)
je 0x11611
movq 0x38a78(%rip), %rdi     # 0x49ff0
leaq 0x2e9d4(%rip), %rsi     # 0x3ff53
callq 0x5360
jmp 0x11586
movl $0x0, -0xac(%rbp)
movl -0xac(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x115fa
movq -0x10(%rbp), %rax
movslq -0xac(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x38a3f(%rip), %rdi     # 0x49ff0
callq 0x5360
movq %rax, -0x1f0(%rbp)
jmp 0x115bf
movq -0x1f0(%rbp), %rdi
leaq 0x2e0ee(%rip), %rsi     # 0x3f6bb
callq 0x5360
jmp 0x115d4
jmp 0x115d6
movl -0xac(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xac(%rbp)
jmp 0x11590
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
callq 0x56a0
jmp 0x11679
movq 0x389ef(%rip), %rdi     # 0x49ff0
movq 0x38978(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x1160f
jmp 0x11611
movl -0xa8(%rbp), %eax
movl %eax, -0x4(%rbp)
movl $0x1, -0xa4(%rbp)
callq 0x56a0
jmp 0x1166d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
callq 0x56a0
jmp 0x1166b
movq 0x389ab(%rip), %rdi     # 0x49ff0
movq 0x38934(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x11653
movl $0x1, -0x4(%rbp)
movl $0x1, -0xa4(%rbp)
callq 0x56a0
jmp 0x1166d
jmp 0x11679
movl -0x4(%rbp), %eax
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0x5760
movq %rax, %rdi
callq 0x18920
nopw (%rax,%rax)