// File: /workspace/github_cpp_makefile_star2_O3/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 0x4b36b
movb $0x0, 0xa0(%rbx)
cmpb $0x1, 0x200a2(%rbx)
jne 0x4b31d
leaq 0x98(%rbx), %r14
movq 0x98(%rbx), %rdi
callq 0x98b0
jmp 0x4b33c
movq 0x88(%rbx), %rdi
movq 0x1ec55(%rip), %rax     # 0x69f80
cmpq (%rax), %rdi
je 0x4b343
leaq 0x88(%rbx), %r14
callq 0x94a0
movq $0x0, (%r14)
movq 0x90(%rbx), %rdi
testq %rdi, %rdi
je 0x4b36b
movq 0x1ec2a(%rip), %rax     # 0x69f80
cmpq (%rax), %rdi
je 0x4b36b
callq 0x94a0
movq $0x0, 0x90(%rbx)
movq 0x80(%rbx), %rdi
cmpq 0x38(%rbx), %rdi
jae 0x4b5ff
leaq 0x28(%rbx), %r14
leaq 0xa2(%rbx), %rax
movq %rax, 0x10(%rsp)
leaq 0x48(%rbx), %rax
movq %rax, 0x8(%rsp)
leaq 0xa920(%rip), %r15      # 0x55cbc
leaq 0x722a(%rip), %r12      # 0x525cd
movq 0x1ec46(%rip), %r13     # 0x69ff0
shlq $0x5, %rdi
addq (%r14), %rdi
movq %r15, %rsi
callq 0x9140
testl %eax, %eax
je 0x4b40e
movb $0x0, 0x200a2(%rbx)
movq 0x80(%rbx), %rsi
shlq $0x5, %rsi
addq 0x28(%rbx), %rsi
movq %rbx, %rdi
callq 0x4daa2
testb %al, %al
je 0x4b464
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 0x4b48d
movb $0x1, 0x200a2(%rbx)
movq 0x1eb64(%rip), %rax     # 0x69f80
movq (%rax), %rdi
callq 0x9500
movl %eax, %edi
callq 0x9780
movl %eax, %edi
movq %r12, %rsi
callq 0x9950
movq %rax, 0x98(%rbx)
movb 0x200a2(%rbx), %cl
movb $0x1, 0xa0(%rbx)
testb $0x1, %cl
je 0x4b4dc
movq %rax, %rdi
movl $0x10000, %esi          # imm = 0x10000
callq 0x9370
jmp 0x4b4f4
movq 0x28(%rbx), %rax
movq 0x80(%rbx), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rdi
movq %r12, %rsi
callq 0x9530
movq %rax, 0x88(%rbx)
movq 0x98(%rbx), %rax
movb 0x200a2(%rbx), %cl
cmpb $0x1, %cl
jne 0x4b49d
testq %rax, %rax
je 0x4b4ab
testb %cl, %cl
jne 0x4b442
cmpq $0x0, 0x88(%rbx)
jne 0x4b442
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x4b5e4
movl $0x23, %edx
movq %r13, %rdi
leaq 0xbb65(%rip), %rsi      # 0x57034
callq 0x9560
movq %r14, %rax
jmp 0x4b577
movq 0x88(%rbx), %rdi
movl $0x10000, %ecx          # imm = 0x10000
movq 0x10(%rsp), %rsi
xorl %edx, %edx
callq 0x9040
cmpq $0x0, 0x58(%rbx)
je 0x4b620
movq 0x80(%rbx), %rdi
shlq $0x5, %rdi
addq 0x48(%rbx), %rdi
movq %r15, %rsi
callq 0x9140
testl %eax, %eax
je 0x4b62f
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 0x4b640
movq 0x68(%rbx), %rax
movq 0x80(%rbx), %rcx
cmpb $0x0, (%rax,%rcx)
jne 0x4b5e4
movl $0x26, %edx
movq %r13, %rdi
leaq 0xbb06(%rip), %rsi      # 0x57073
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 0xbab0(%rip), %rsi      # 0x57058
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 0x4b3aa
movl $0x4, %edi
callq 0x9200
movl $0x1, (%rax)
movq 0x1e922(%rip), %rsi     # 0x69f38
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 0x1e94a(%rip), %rax     # 0x69f80
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 $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9040
nop