// File: /workspace/github_cpp_makefile_star2_O1/BenLangmead[P]bowtie/pat.cpp
// Function: CFilePatternSource::open()
void CFilePatternSource::open() {
	if(is_open_) {
		is_open_ = false;
		if (compressed_) {
			gzclose(zfp_);
			zfp_ = NULL;
		}
		else if (fp_ != stdin) {
			fclose(fp_);
			fp_ = NULL;
		}
		if(qfp_ != NULL && qfp_ != stdin) {
			fclose(qfp_);
			qfp_ = NULL;
		}
	}
	while(filecur_ < infiles_.size()) {
		// Open read
		if(infiles_[filecur_] == "-") {
			compressed_ = true;
			int fn = dup(fileno(stdin));
			zfp_ = gzdopen(fn, "rb");
		}
		else {
			compressed_ = false;
			if (is_gzipped_file(infiles_[filecur_])) {
				compressed_ = true;
				zfp_ = gzopen(infiles_[filecur_].c_str(), "rb");
			}
			else {
				fp_ = fopen(infiles_[filecur_].c_str(), "rb");
			}
			if ((compressed_ && zfp_ == NULL) || (!compressed_ && fp_ == NULL)) {
				if(!errs_[filecur_]) {
					cerr << "Warning: Could not open read file \""
					     << infiles_[filecur_] << "\" for reading; skipping..."
					     << endl;
					errs_[filecur_] = true;
				}
				filecur_++;
				continue;
			}
		}
		is_open_ = true;
		if (compressed_) {
#if ZLIB_VERNUM < 0x1235
			cerr << "Warning: gzbuffer added in zlib v1.2.3.5. Unable to change "
			        "buffer size from default of 8192." << endl;
#else
			gzbuffer(zfp_, 64*1024);
#endif
		}
		else {
			setvbuf(fp_, buf_, _IOFBF, 64*1024);
		}
		if(!qinfiles_.empty()) {
			if(qinfiles_[filecur_] == "-") {
				qfp_ = stdin;
			} else if((qfp_ = fopen(qinfiles_[filecur_].c_str(), "rb")) == NULL) {
				if(!errs_[filecur_]) {
					cerr << "Warning: Could not open quality file \""
					     << qinfiles_[filecur_] << "\" for reading; skipping..."
						 << endl;
					errs_[filecur_] = true;
				}
				filecur_++;
				continue;
			}
			assert(qfp_ != NULL);
			setvbuf(qfp_, qbuf_, _IOFBF, 64*1024);
		}
		return;
	}
	throw 1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpb $0x1, 0xa0(%rdi)
jne 0x4c731
movb $0x0, 0xa0(%rbx)
cmpb $0x1, 0x200a2(%rbx)
jne 0x4c6e3
leaq 0x98(%rbx), %r14
movq 0x98(%rbx), %rdi
callq 0x98b0
jmp 0x4c702
movq 0x88(%rbx), %rdi
movq 0x1e88f(%rip), %rax     # 0x6af80
cmpq (%rax), %rdi
je 0x4c709
leaq 0x88(%rbx), %r14
callq 0x94a0
movq $0x0, (%r14)
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x4c731
movq 0x1e864(%rip), %rax     # 0x6af80
cmpq (%rax), %rdi
je 0x4c731
callq 0x94a0
movq $0x0, 0x90(%rbx)
movq 0x80(%rbx), %rdi
cmpq 0x38(%rbx), %rdi
jae 0x4c9c4
leaq 0x28(%rbx), %r14
leaq 0xa2(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x48(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0xa47a(%rip), %r15      # 0x56bdc
leaq 0x6d84(%rip), %r12      # 0x534ed
movq 0x1e880(%rip), %r13     # 0x6aff0
shlq $0x5, %rdi
addq (%r14), %rdi
movq %r15, %rsi
callq 0x9140
testl %eax, %eax
je 0x4c7d4
movb $0x0, 0x200a2(%rbx)
movq 0x80(%rbx), %rsi
shlq $0x5, %rsi
addq 0x28(%rbx), %rsi
movq %rbx, %rdi
callq 0x4eec6
testb %al, %al
je 0x4c82c
movb $0x1, 0x200a2(%rbx)
movq 0x28(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9750
movq %rax, 0x98(%rbx)
jmp 0x4c84e
movb $0x1, 0x200a2(%rbx)
movq 0x1e79e(%rip), %rax     # 0x6af80
movq (%rax), %rdi
callq 0x9500
movl %eax, %edi
callq 0x9780
movl %eax, %edi
movq %r12, %rsi
callq 0x9950
movq %rax, 0x98(%rbx)
movb $0x1, 0xa0(%rbx)
cmpb $0x1, 0x200a2(%rbx)
jne 0x4c8a1
movq 0x98(%rbx), %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0x9370
jmp 0x4c8b9
movq 0x28(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9530
movq %rax, 0x88(%rbx)
movb 0x200a2(%rbx), %al
cmpb $0x1, %al
jne 0x4c862
cmpq $0x0, 0x98(%rbx)
je 0x4c870
testb %al, %al
jne 0x4c802
cmpq $0x0, 0x88(%rbx)
jne 0x4c802
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x4c9a9
movl $0x23, %edx
movq %r13, %rdi
leaq 0xb6f8(%rip), %rsi      # 0x57f8c
callq 0x9560
movq %r14, %rax
jmp 0x4c93c
movq 0x88(%rbx), %rdi
movl $0x10000, %ecx          # imm = 0x10000
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x9040
cmpq $0x0, 0x58(%rbx)
je 0x4c9e5
movq 0x80(%rbx), %rdi
shlq $0x5, %rdi
addq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x9140
testl %eax, %eax
je 0x4c9f4
movq 0x48(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9530
movq %rax, 0x90(%rbx)
testq %rax, %rax
jne 0x4ca05
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x4c9a9
movl $0x26, %edx
movq %r13, %rdi
leaq 0xb699(%rip), %rsi      # 0x57fcb
callq 0x9560
movq 0x8(%rsp), %rax
movq 0x80(%rbx), %rcx
movq (%rax), %rax
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
movq %r13, %rdi
callq 0x9560
movq %rax, %rbp
movl $0x1a, %edx
movq %rax, %rdi
leaq 0xb643(%rip), %rsi      # 0x57fb0
callq 0x9560
movq (%rbp), %rax
movq -0x18(%rax), %rdi
addq %rbp, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbp, %rdi
callq 0x9050
movq %rax, %rdi
callq 0x92f0
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
movb $0x1, (%rax,%rcx)
movq 0x80(%rbx), %rdi
incq %rdi
movq %rdi, 0x80(%rbx)
cmpq 0x38(%rbx), %rdi
jb 0x4c770
movl $0x4, %edi
callq 0x9200
movl $0x1, (%rax)
movq 0x1e55d(%rip), %rsi     # 0x6af38
movq %rax, %rdi
xorl %edx, %edx
callq 0x98f0
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x1e585(%rip), %rax     # 0x6af80
movq (%rax), %rax
movq %rax, 0x90(%rbx)
movq 0x90(%rbx), %rdi
addq $0x100a2, %rbx          # imm = 0x100A2
movl $0x10000, %ecx          # imm = 0x10000
movq %rbx, %rsi
xorl %edx, %edx
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9040