// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rdi, %rbx
cmpb $0x1, 0xa0(%rdi)
jne 0x414ee
movb $0x0, 0xa0(%rbx)
cmpb $0x1, 0x200a2(%rbx)
jne 0x414a6
leaq 0x98(%rbx), %r14
movq 0x98(%rbx), %rdi
callq 0x98d0
jmp 0x414c5
movq 0x88(%rbx), %rdi
movq 0x20adc(%rip), %rax     # 0x61f90
cmpq (%rax), %rdi
je 0x414c9
leaq 0x88(%rbx), %r14
callq 0x94f0
andq $0x0, (%r14)
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x414ee
movq 0x20ab4(%rip), %rax     # 0x61f90
cmpq (%rax), %rdi
je 0x414ee
callq 0x94f0
andq $0x0, 0x90(%rbx)
leaq 0x28(%rbx), %r13
leaq 0xa2(%rbx), %rax
movq %rax, (%rsp)
leaq 0x48(%rbx), %r14
movq 0x80(%rbx), %rdi
leaq 0x9718(%rip), %r15      # 0x4ac27
leaq 0x6022(%rip), %r12      # 0x47538
cmpq 0x38(%rbx), %rdi
jae 0x41777
shlq $0x5, %rdi
addq (%r13), %rdi
movq %r15, %rsi
callq 0x17c2c
testb %al, %al
je 0x41583
movb $0x1, 0x200a2(%rbx)
movq 0x20a4e(%rip), %rax     # 0x61f90
movq (%rax), %rdi
callq 0x9540
movl %eax, %edi
callq 0x9790
movl %eax, %edi
movq %r12, %rsi
callq 0x9970
movq %rax, 0x98(%rbx)
movb 0x200a2(%rbx), %cl
movb $0x1, 0xa0(%rbx)
testb $0x1, %cl
je 0x415d7
movq %rax, %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0x93b0
jmp 0x415ee
movb $0x0, 0x200a2(%rbx)
movq 0x80(%rbx), %rsi
shlq $0x5, %rsi
addq 0x28(%rbx), %rsi
movq %rbx, %rdi
callq 0x43774
testb %al, %al
je 0x416bd
movb $0x1, 0x200a2(%rbx)
movq 0x28(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9780
movq %rax, 0x98(%rbx)
jmp 0x416e6
movq 0x88(%rbx), %rdi
movl $0x10000, %ecx          # imm = 0x10000
movq (%rsp), %rsi
xorl %edx, %edx
callq 0x9040
cmpq $0x0, 0x58(%rbx)
je 0x41730
movq 0x80(%rbx), %rdi
shlq $0x5, %rdi
addq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x17c2c
testb %al, %al
jne 0x4173f
movq 0x48(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9570
movq %rax, 0x90(%rbx)
testq %rax, %rax
jne 0x41750
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
leaq 0xa958(%rip), %rsi      # 0x4bfb1
movq %r14, %rbp
jne 0x416a7
movq 0x2098b(%rip), %rdi     # 0x61ff0
callq 0x94e0
movq 0x80(%rbx), %rsi
shlq $0x5, %rsi
addq (%rbp), %rsi
movq %rax, %rdi
callq 0x9460
movq %rax, %rdi
leaq 0xa90b(%rip), %rsi      # 0x4bf96
callq 0x94e0
movq %rax, %rdi
callq 0x9210
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
movb $0x1, (%rax,%rcx)
movq 0x80(%rbx), %rdi
incq %rdi
movq %rdi, 0x80(%rbx)
jmp 0x41516
movq 0x28(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9570
movq %rax, 0x88(%rbx)
movq 0x98(%rbx), %rax
movb 0x200a2(%rbx), %cl
cmpb $0x1, %cl
jne 0x416f6
testq %rax, %rax
je 0x4170c
testb %cl, %cl
jne 0x41568
cmpq $0x0, 0x88(%rbx)
jne 0x41568
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
leaq 0xa850(%rip), %rsi      # 0x4bf72
movq %r13, %rbp
je 0x4165e
jmp 0x416a7
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x2084a(%rip), %rax     # 0x61f90
movq (%rax), %rax
movq %rax, 0x90(%rbx)
addq $0x100a2, %rbx          # imm = 0x100A2
movl $0x10000, %ecx          # imm = 0x10000
movq %rax, %rdi
movq %rbx, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9040
pushq $0x4
popq %rdi
callq 0x9220
movl $0x1, (%rax)
movq 0x207cc(%rip), %rsi     # 0x61f58
movq %rax, %rdi
xorl %edx, %edx
callq 0x9910