// File: /workspace/github_cpp_makefile_star2_O3/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 0xee89
movq 0x3a13f(%rip), %rax     # 0x48fb0
movq (%rax), %rdi
callq 0x54b0
leaq 0x29d6e(%rip), %rsi     # 0x38bee
movl %eax, %edi
callq 0x5800
jmp 0xee99
movq 0x8(%rbx), %rdi
leaq 0x2968e(%rip), %rsi     # 0x38522
callq 0x5650
movq %rax, 0x248(%rbx)
testq %rax, %rax
jne 0xeee7
leaq 0x8(%rbx), %rdx
leaq 0x29675(%rip), %rsi     # 0x38525
leaq 0x80(%rsp), %r14
movq %r14, %rdi
callq 0xb777
leaq 0x3a5e1(%rip), %rdi     # 0x494a8
movq %r14, %rsi
xorl %edx, %edx
callq 0x36ec8
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xeee7
callq 0x5410
leaq 0x50(%rsp), %r14
movq %r14, -0x10(%r14)
leaq 0x2964d(%rip), %rsi     # 0x38544
leaq 0x2964c(%rip), %rdx     # 0x3854a
leaq 0x40(%rsp), %rdi
callq 0xc85e
leaq 0x2963c(%rip), %rsi     # 0x3854b
leaq 0x60(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0xb777
leaq 0x29231(%rip), %rsi     # 0x38156
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 0xef55
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0xef5c
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 0x3a52b(%rip), %rdi     # 0x494a8
callq 0x36e72
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xef90
callq 0x5410
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xefa3
callq 0x5410
movq 0x248(%rbx), %rdi
movl 0x240(%rbx), %esi
callq 0x5340
testl %eax, %eax
je 0xeffa
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x29597(%rip), %rsi     # 0x38560
leaq 0x295b2(%rip), %rdx     # 0x38582
leaq 0x20(%rsp), %rdi
callq 0xc85e
leaq 0x3a4c7(%rip), %rdi     # 0x494a8
leaq 0x20(%rsp), %rsi
callq 0x37146
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0xeffa
callq 0x5410
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xf009
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 0xf077
jmp 0xf081
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
jne 0xf063
jmp 0xf06d
jmp 0xf06a
jmp 0xf06a
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0xf055
callq 0x5410
jmp 0xf055
movq %rax, %rbx
leaq 0x70(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0xf06d
callq 0x5410
jmp 0xf06d
movq %rax, %rbx
movq 0x40(%rsp), %rdi
cmpq %r14, %rdi
je 0xf081
callq 0x5410
jmp 0xf081
movq %rax, %rbx
movq %rbx, %rdi
callq 0x57d0
nop