// File: BenLangmead[P]bowtie/./ebwt.h
// Function: readFlags(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
static inline int32_t readFlags(const string& instr) {
	ifstream in;
	// Initialize our primary and secondary input-stream fields
	in.open((instr + ".1." + gEbwt_ext).c_str(), ios_base::in | ios::binary);
	if(!in.is_open()) {
		throw EbwtFileOpenException("Cannot open file " + instr);
	}
	assert(in.is_open());
	assert(in.good());
	bool switchEndian = false;
	uint32_t one = readU<uint32_t>(in, switchEndian); // 1st word of primary stream
	if(one != 1) {
		assert_eq((1u<<24), one);
		assert_eq(1, endianSwapU32(one));
		switchEndian = true;
	}
	readU<TIndexOffU>(in, switchEndian);
	readI<int32_t>(in, switchEndian);
	readI<int32_t>(in, switchEndian);
	readI<int32_t>(in, switchEndian);
	readI<int32_t>(in, switchEndian);
	int32_t flags = readI<int32_t>(in, switchEndian);
	return flags;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3c0, %rsp            # imm = 0x3C0
movq %rdi, -0x8(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x5470
movq -0x8(%rbp), %rsi
leaq 0x3129d(%rip), %rdx     # 0x41903
leaq -0x250(%rbp), %rdi
callq 0x1a930
jmp 0x10674
leaq 0x3bb65(%rip), %rdx     # 0x4c1e0
leaq -0x230(%rbp), %rdi
leaq -0x250(%rbp), %rsi
callq 0x2bdc0
jmp 0x10690
leaq -0x230(%rbp), %rdi
callq 0x5150
movq %rax, -0x298(%rbp)
movl $0x8, %edi
movl $0x4, %esi
callq 0x2f850
movl %eax, -0x290(%rbp)
jmp 0x106ba
movl -0x290(%rbp), %edx
movq -0x298(%rbp), %rsi
leaq -0x210(%rbp), %rdi
callq 0x51d0
jmp 0x106d5
leaq -0x230(%rbp), %rdi
callq 0x5888
leaq -0x250(%rbp), %rdi
callq 0x5888
leaq -0x210(%rbp), %rdi
callq 0x5680
movb %al, -0x299(%rbp)
jmp 0x10701
movb -0x299(%rbp), %al
testb $0x1, %al
jne 0x10825
jmp 0x10711
movb $0x1, -0x281(%rbp)
movl $0x10, %edi
callq 0x5180
movq %rax, -0x2a8(%rbp)
movq -0x8(%rbp), %rdx
leaq 0x30e3d(%rip), %rsi     # 0x41571
leaq -0x280(%rbp), %rdi
callq 0x2f460
jmp 0x10742
movq -0x2a8(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x2f570
jmp 0x10757
movq -0x2a8(%rbp), %rdi
movb $0x0, -0x281(%rbp)
leaq 0x39594(%rip), %rsi     # 0x49d00
leaq 0x1ee3d(%rip), %rdx     # 0x2f5b0
callq 0x5720
jmp 0x10e14
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
jmp 0x10dfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
jmp 0x107c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x5888
leaq -0x250(%rbp), %rdi
callq 0x5888
jmp 0x10dfc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
jmp 0x10809
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x258(%rbp)
movl %eax, -0x25c(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x5888
testb $0x1, -0x281(%rbp)
jne 0x10814
jmp 0x10820
movq -0x2a8(%rbp), %rdi
callq 0x5240
jmp 0x10dfc
leaq -0x210(%rbp), %rdi
callq 0x5680
movb %al, -0x2a9(%rbp)
jmp 0x10839
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0x10845
jmp 0x10847
jmp 0x10866
leaq 0x30e13(%rip), %rdi     # 0x41661
leaq 0x2e868(%rip), %rsi     # 0x3f0bd
movl $0xdea, %edx            # imm = 0xDEA
leaq 0x30e0d(%rip), %rcx     # 0x4166e
callq 0x51e0
movq -0x210(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x210(%rbp,%rax), %rdi
callq 0x5710
movb %al, -0x2aa(%rbp)
jmp 0x10886
movb -0x2aa(%rbp), %al
testb $0x1, %al
jne 0x10892
jmp 0x10894
jmp 0x108b3
leaq 0x30df5(%rip), %rdi     # 0x41690
leaq 0x2e81b(%rip), %rsi     # 0x3f0bd
movl $0xdeb, %edx            # imm = 0xDEB
leaq 0x30dc0(%rip), %rcx     # 0x4166e
callq 0x51e0
movb $0x0, -0x282(%rbp)
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13a90
movl %eax, -0x2b0(%rbp)
jmp 0x108d8
movl -0x2b0(%rbp), %eax
movl %eax, -0x288(%rbp)
cmpl $0x1, -0x288(%rbp)
je 0x10d33
movl $0x1000000, %eax        # imm = 0x1000000
cmpl -0x288(%rbp), %eax
je 0x10b03
movq 0x396b7(%rip), %rdi     # 0x49fc0
leaq 0x2e809(%rip), %rsi     # 0x3f119
callq 0x5360
movq %rax, -0x2b8(%rbp)
jmp 0x1091e
movq -0x2b8(%rbp), %rdi
movl $0x1000000, %esi        # imm = 0x1000000
callq 0x5530
movq %rax, -0x2c0(%rbp)
jmp 0x10938
movq -0x2c0(%rbp), %rdi
leaq 0x2e7e9(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, -0x2c8(%rbp)
jmp 0x10954
movq -0x2c8(%rbp), %rdi
leaq 0x7e7e(%rip), %rsi      # 0x187e0
callq 0x5120
movq %rax, -0x2d0(%rbp)
jmp 0x10970
movq -0x2d0(%rbp), %rdi
movl $0x1000000, %esi        # imm = 0x1000000
callq 0x5530
movq %rax, -0x2d8(%rbp)
jmp 0x1098a
movq -0x2d8(%rbp), %rdi
leaq 0x7e78(%rip), %rsi      # 0x18810
callq 0x5120
movq %rax, -0x2e0(%rbp)
jmp 0x109a6
movq -0x2e0(%rbp), %rdi
leaq 0x2e780(%rip), %rsi     # 0x3f134
callq 0x5360
movq %rax, -0x2e8(%rbp)
jmp 0x109c2
movq -0x2e8(%rbp), %rdi
movl -0x288(%rbp), %esi
callq 0x5530
movq %rax, -0x2f0(%rbp)
jmp 0x109dd
movq -0x2f0(%rbp), %rdi
leaq 0x2e744(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, -0x2f8(%rbp)
jmp 0x109f9
movq -0x2f8(%rbp), %rdi
leaq 0x7dd9(%rip), %rsi      # 0x187e0
callq 0x5120
movq %rax, -0x300(%rbp)
jmp 0x10a15
movq -0x300(%rbp), %rdi
movl -0x288(%rbp), %esi
callq 0x5530
movq %rax, -0x308(%rbp)
jmp 0x10a30
movq -0x308(%rbp), %rdi
leaq 0x7dd2(%rip), %rsi      # 0x18810
callq 0x5120
movq %rax, -0x310(%rbp)
jmp 0x10a4c
movq -0x310(%rbp), %rdi
leaq 0x30b5e(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, -0x318(%rbp)
jmp 0x10a68
movq -0x318(%rbp), %rdi
movq 0x3950a(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10a7d
movq 0x3953c(%rip), %rdi     # 0x49fc0
leaq 0x2e632(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, -0x320(%rbp)
jmp 0x10a99
movq -0x320(%rbp), %rdi
leaq 0x2fce3(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, -0x328(%rbp)
jmp 0x10ab5
movq -0x328(%rbp), %rdi
movl $0xdef, %esi            # imm = 0xDEF
callq 0x5750
movq %rax, -0x330(%rbp)
jmp 0x10acf
movq -0x330(%rbp), %rdi
movq 0x394a3(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10ae4
leaq 0x2fb7f(%rip), %rdi     # 0x4066a
leaq 0x2e5cb(%rip), %rsi     # 0x3f0bd
movl $0xdef, %edx            # imm = 0xDEF
leaq 0x30b70(%rip), %rcx     # 0x4166e
callq 0x51e0
movl -0x288(%rbp), %edi
callq 0xe2d0
movl %eax, %ecx
movl $0x1, %eax
cmpl %ecx, %eax
je 0x10d2c
movq 0x3949c(%rip), %rdi     # 0x49fc0
leaq 0x2e5ee(%rip), %rsi     # 0x3f119
callq 0x5360
movq %rax, -0x338(%rbp)
jmp 0x10b39
movq -0x338(%rbp), %rdi
movl $0x1, %esi
callq 0x5750
movq %rax, -0x340(%rbp)
jmp 0x10b53
movq -0x340(%rbp), %rdi
leaq 0x2e5ce(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, -0x348(%rbp)
jmp 0x10b6f
movq -0x348(%rbp), %rdi
leaq 0x7c63(%rip), %rsi      # 0x187e0
callq 0x5120
movq %rax, -0x350(%rbp)
jmp 0x10b8b
movq -0x350(%rbp), %rdi
movl $0x1, %esi
callq 0x5750
movq %rax, -0x358(%rbp)
jmp 0x10ba5
movq -0x358(%rbp), %rdi
leaq 0x7c5d(%rip), %rsi      # 0x18810
callq 0x5120
movq %rax, -0x360(%rbp)
jmp 0x10bc1
movq -0x360(%rbp), %rdi
leaq 0x2e565(%rip), %rsi     # 0x3f134
callq 0x5360
movq %rax, -0x368(%rbp)
jmp 0x10bdd
movl -0x288(%rbp), %edi
callq 0xe2d0
movq -0x368(%rbp), %rdi
movl %eax, %esi
callq 0x5530
movq %rax, -0x370(%rbp)
jmp 0x10bff
movq -0x370(%rbp), %rdi
leaq 0x2e522(%rip), %rsi     # 0x3f12f
callq 0x5360
movq %rax, -0x378(%rbp)
jmp 0x10c1b
movq -0x378(%rbp), %rdi
leaq 0x7bb7(%rip), %rsi      # 0x187e0
callq 0x5120
movq %rax, -0x380(%rbp)
jmp 0x10c37
movl -0x288(%rbp), %edi
callq 0xe2d0
movq -0x380(%rbp), %rdi
movl %eax, %esi
callq 0x5530
movq %rax, -0x388(%rbp)
jmp 0x10c59
movq -0x388(%rbp), %rdi
leaq 0x7ba9(%rip), %rsi      # 0x18810
callq 0x5120
movq %rax, -0x390(%rbp)
jmp 0x10c75
movq -0x390(%rbp), %rdi
leaq 0x30935(%rip), %rsi     # 0x415b8
callq 0x5360
movq %rax, -0x398(%rbp)
jmp 0x10c91
movq -0x398(%rbp), %rdi
movq 0x392e1(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10ca6
movq 0x39313(%rip), %rdi     # 0x49fc0
leaq 0x2e409(%rip), %rsi     # 0x3f0bd
callq 0x5360
movq %rax, -0x3a0(%rbp)
jmp 0x10cc2
movq -0x3a0(%rbp), %rdi
leaq 0x2faba(%rip), %rsi     # 0x4078a
callq 0x5360
movq %rax, -0x3a8(%rbp)
jmp 0x10cde
movq -0x3a8(%rbp), %rdi
movl $0xdf0, %esi            # imm = 0xDF0
callq 0x5750
movq %rax, -0x3b0(%rbp)
jmp 0x10cf8
movq -0x3b0(%rbp), %rdi
movq 0x3927a(%rip), %rsi     # 0x49f80
callq 0x53c0
jmp 0x10d0d
leaq 0x2f956(%rip), %rdi     # 0x4066a
leaq 0x2e3a2(%rip), %rsi     # 0x3f0bd
movl $0xdf0, %edx            # imm = 0xDF0
leaq 0x30947(%rip), %rcx     # 0x4166e
callq 0x51e0
movb $0x1, -0x282(%rbp)
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13c40
jmp 0x10d4b
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13df0
jmp 0x10d63
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13df0
jmp 0x10d7b
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13df0
jmp 0x10d93
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13df0
jmp 0x10dab
movzbl -0x282(%rbp), %esi
andl $0x1, %esi
leaq -0x210(%rbp), %rdi
callq 0x13df0
movl %eax, -0x3b4(%rbp)
jmp 0x10dc9
movl -0x3b4(%rbp), %eax
movl %eax, -0x28c(%rbp)
movl -0x28c(%rbp), %eax
movl %eax, -0x3b8(%rbp)
leaq -0x210(%rbp), %rdi
callq 0x50e0
movl -0x3b8(%rbp), %eax
addq $0x3c0, %rsp            # imm = 0x3C0
popq %rbp
retq
leaq -0x210(%rbp), %rdi
callq 0x50e0
movq -0x258(%rbp), %rdi
callq 0x5760
nopw %cs:(%rax,%rax)