// File: auton1[P]viterbi/bcf_file.cpp
// Function: bcf_file::open()
void bcf_file::open()
{
	int ret;

	if (filename.substr(filename.size()-4) == ".vcf")
			LOG.error("Filename ends in '.vcf'. Shouldn't you be using --vcf?\n");

	if (filename.substr(filename.size()-7) == ".vcf.gz")
			LOG.error("Filename ends in '.vcf.gz'. Shouldn't you be using --gzvcf?\n");

	ret = bgzf_is_bgzf(filename.c_str());

	if (ret == 1)
		is_BGZF = true;
	else
		is_BGZF = false;

	if (is_BGZF)
		open_gz();
	else
	{
		file_tmp.open(filename.c_str(), ios::in);
		if (!file_tmp.is_open())
			LOG.error("Could not open VCF file: " + filename, 0);
		file_in = &file_tmp;
	}
}

// Assembly:
subq $0x128, %rsp            # imm = 0x128
movq %rdi, 0x120(%rsp)
movq 0x120(%rsp), %rdi
movq %rdi, 0x38(%rsp)
addq $0x8, %rdi
movq %rdi, 0x40(%rsp)
callq 0x6350
movq 0x40(%rsp), %rsi
movq %rax, %rdx
addq $-0x4, %rdx
leaq 0xf8(%rsp), %rdi
movq %rdi, 0x48(%rsp)
movq $-0x1, %rcx
callq 0x6580
movq 0x48(%rsp), %rdi
leaq 0x54826(%rip), %rsi     # 0x743f1
callq 0xea20
movb %al, 0x57(%rsp)
jmp 0x1fbd6
leaq 0xf8(%rsp), %rdi
callq 0x6b50
movb 0x57(%rsp), %al
testb $0x1, %al
jne 0x1fbf0
jmp 0x1fcc3
leaq 0xc7(%rsp), %rdi
movq %rdi, 0x30(%rsp)
callq 0x69f0
movq 0x30(%rsp), %rdx
leaq 0x547e8(%rip), %rsi     # 0x743f6
leaq 0xc8(%rsp), %rdi
callq 0x67c0
jmp 0x1fc1d
leaq 0x739dc(%rip), %rdi     # 0x93600
leaq 0xc8(%rsp), %rsi
movl $0x1, %edx
callq 0x712f0
jmp 0x1fc38
leaq 0xc8(%rsp), %rdi
callq 0x6b50
leaq 0xc7(%rsp), %rdi
callq 0x65f0
jmp 0x1fcc3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xf8(%rsp), %rdi
callq 0x6b50
jmp 0x1ff09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x1fcb1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xc8(%rsp), %rdi
callq 0x6b50
leaq 0xc7(%rsp), %rdi
callq 0x65f0
jmp 0x1ff09
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
movq %rdi, 0x18(%rsp)
callq 0x6350
movq 0x18(%rsp), %rsi
movq %rax, %rdx
addq $-0x7, %rdx
leaq 0xa0(%rsp), %rdi
movq %rdi, 0x20(%rsp)
movq $-0x1, %rcx
callq 0x6580
movq 0x20(%rsp), %rdi
leaq 0x54727(%rip), %rsi     # 0x7442e
callq 0xea20
movb %al, 0x2f(%rsp)
jmp 0x1fd12
leaq 0xa0(%rsp), %rdi
callq 0x6b50
movb 0x2f(%rsp), %al
testb $0x1, %al
jne 0x1fd2c
jmp 0x1fdf6
leaq 0x7f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x69f0
movq 0x10(%rsp), %rdx
leaq 0x546ef(%rip), %rsi     # 0x74436
leaq 0x80(%rsp), %rdi
callq 0x67c0
jmp 0x1fd56
leaq 0x738a3(%rip), %rdi     # 0x93600
leaq 0x80(%rsp), %rsi
movl $0x1, %edx
callq 0x712f0
jmp 0x1fd71
leaq 0x80(%rsp), %rdi
callq 0x6b50
leaq 0x7f(%rsp), %rdi
callq 0x65f0
jmp 0x1fdf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0xa0(%rsp), %rdi
callq 0x6b50
jmp 0x1ff09
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
jmp 0x1fde7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x6b50
leaq 0x7f(%rsp), %rdi
callq 0x65f0
jmp 0x1ff09
movq 0x38(%rsp), %rdi
addq $0x8, %rdi
callq 0x61a0
movq %rax, %rdi
callq 0x72a40
movl %eax, 0x11c(%rsp)
cmpl $0x1, 0x11c(%rsp)
jne 0x1fe2b
movq 0x38(%rsp), %rax
movb $0x1, 0x460(%rax)
jmp 0x1fe37
movq 0x38(%rsp), %rax
movb $0x0, 0x460(%rax)
movq 0x38(%rsp), %rax
testb $0x1, 0x460(%rax)
je 0x1fe55
movq 0x38(%rsp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1ff01
movq 0x38(%rsp), %rdi
movq %rdi, %rax
addq $0x38, %rax
movq %rax, 0x8(%rsp)
addq $0x8, %rdi
callq 0x61a0
movq 0x8(%rsp), %rdi
movq %rax, %rsi
movl $0x8, %edx
callq 0x62c0
movq 0x38(%rsp), %rdi
addq $0x38, %rdi
callq 0x68d0
testb $0x1, %al
jne 0x1fef1
movq 0x38(%rsp), %rdx
addq $0x8, %rdx
leaq 0x545d0(%rip), %rsi     # 0x74473
leaq 0x58(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xe8d0
movq (%rsp), %rsi
leaq 0x73744(%rip), %rdi     # 0x93600
xorl %edx, %edx
callq 0x712f0
jmp 0x1fec5
leaq 0x58(%rsp), %rdi
callq 0x6b50
jmp 0x1fef1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xf0(%rsp)
movl %eax, 0xec(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x6b50
jmp 0x1ff09
movq 0x38(%rsp), %rax
movq %rax, %rcx
addq $0x38, %rcx
movq %rcx, 0x30(%rax)
addq $0x128, %rsp            # imm = 0x128
retq
movq 0xf0(%rsp), %rdi
callq 0x69e0
nopw %cs:(%rax,%rax)