// File: /workspace/github_cpp_makefile_star2_O1/auton1[P]viterbi/bcf_file.cpp
// Function: bcf_file::open_gz()
void bcf_file::open_gz()
{
	int ret;
	gzMAX_LINE_LEN = 1024*1024;

	if (stream)
		gzfile_in = gzdopen(fileno(stdin), "r");
	else
		gzfile_in = gzopen(filename.c_str(), "rb");

	if (gzfile_in == NULL)
		LOG.error("Could not open BGZF BCF file: " + filename, 0);
	#ifdef ZLIB_VERNUM
		string tmp(ZLIB_VERSION);
		LOG.printLOG("Using zlib version: " + tmp + "\n");
		#if (ZLIB_VERNUM >= 0x1240)
			ret = gzbuffer(gzfile_in, gzMAX_LINE_LEN); // Included in zlib v1.2.4 and makes things MUCH faster
			if (ret != 0)
				LOG.warning("Unable to change zlib buffer size.");
		#else
			LOG.printLOG("Versions of zlib >= 1.2.4 will be *much* faster when reading compressed BCF files.\n");
		#endif
	#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
movq %rdi, %rbx
movl $0x100000, 0x240(%rdi)  # imm = 0x100000
cmpb $0x1, 0x462(%rdi)
jne 0xee71
movq 0x3b157(%rip), %rax     # 0x49fb0
movq (%rax), %rdi
callq 0x54b0
leaq 0x2ada4(%rip), %rsi     # 0x39c0c
movl %eax, %edi
callq 0x5800
jmp 0xee81
movq 0x8(%rbx), %rdi
leaq 0x2a6a6(%rip), %rsi     # 0x39522
callq 0x5650
movq %rax, 0x248(%rbx)
testq %rax, %rax
jne 0xeecf
leaq 0x8(%rbx), %rdx
leaq 0x2a68d(%rip), %rsi     # 0x39525
leaq 0x80(%rsp), %r14
movq %r14, %rdi
callq 0xb7dd
leaq 0x3b5f9(%rip), %rdi     # 0x4a4a8
movq %r14, %rsi
xorl %edx, %edx
callq 0x3721e
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xeecf
callq 0x5410
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2a665(%rip), %rsi     # 0x39544
leaq 0x2a664(%rip), %rdx     # 0x3954a
leaq 0x40(%rsp), %rdi
callq 0xc868
leaq 0x2a654(%rip), %rsi     # 0x3954b
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0xb7dd
leaq 0x2a249(%rip), %rsi     # 0x39156
leaq 0x60(%rsp), %rdi
callq 0x5870
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0xef3d
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xef44
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rdx
movq %rsp, %rsi
movq %rdx, 0x8(%rsi)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x3b543(%rip), %rdi     # 0x4a4a8
callq 0x371c8
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xef78
callq 0x5410
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xef8b
callq 0x5410
movq 0x248(%rbx), %rdi
movl 0x240(%rbx), %esi
callq 0x5340
testl %eax, %eax
je 0xefe2
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x2a5af(%rip), %rsi     # 0x39560
leaq 0x2a5ca(%rip), %rdx     # 0x39582
leaq 0x20(%rsp), %rdi
callq 0xc868
leaq 0x3b4df(%rip), %rdi     # 0x4a4a8
leaq 0x20(%rsp), %rsi
callq 0x3749c
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xefe2
callq 0x5410
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xeff1
callq 0x5410
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0xf05f
jmp 0xf069
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
jne 0xf04b
jmp 0xf055
jmp 0xf052
jmp 0xf052
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf03d
callq 0x5410
jmp 0xf03d
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf055
callq 0x5410
jmp 0xf055
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xf069
callq 0x5410
jmp 0xf069
movq %rax, %rbx
movq %rbx, %rdi
callq 0x57d0
nop