// File: auton1[P]viterbi/vcf_file.cpp
// Function: vcf_file::vcf_file(parameters const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, int)
vcf_file::vcf_file(const parameters &p, string &vcf_filename, int idx)
{
	filename = vcf_filename;
	compressed = p.vcf_compressed[idx];
	stream = p.stream_in;

	gzMAX_LINE_LEN = 0;
	N_entries = 0; N_kept_entries = 0;
	meta_data = header();

	if (stream && compressed)
		open_gz();
	else if (stream)
	{
		char first = cin.peek();
		if (first == 0x1f)
			LOG.error("File starts with gzip magic string. Shouldn't you be using --gzvcf?\n");

		file_in = &std::cin;
	}
	else
		open();

	read_header();
	include_indv = vector<bool>(meta_data.N_indv,true);
}

// Assembly:
subq $0x298, %rsp            # imm = 0x298
movq %rdi, 0x290(%rsp)
movq %rsi, 0x288(%rsp)
movq %rdx, 0x280(%rsp)
movl %ecx, 0x27c(%rsp)
movq 0x290(%rsp), %rdi
movq %rdi, 0x20(%rsp)
callq 0x20510
movq 0x20(%rsp), %rdi
leaq 0x6d704(%rip), %rax     # 0x92b58
movq %rax, (%rdi)
movq 0x280(%rsp), %rsi
addq $0x8, %rdi
callq 0x6060
jmp 0x2546a
movq 0x288(%rsp), %rdi
addq $0x498, %rdi            # imm = 0x498
movslq 0x27c(%rsp), %rsi
callq 0xf150
movb %al, 0x1f(%rsp)
jmp 0x2548c
movq 0x20(%rsp), %rax
movb 0x1f(%rsp), %cl
andb $0x1, %cl
movb %cl, 0x28(%rax)
movq 0x288(%rsp), %rcx
movb (%rcx), %cl
andb $0x1, %cl
movb %cl, 0x468(%rax)
movl $0x0, 0x240(%rax)
movl $0x0, 0x458(%rax)
movl $0x0, 0x45c(%rax)
leaq 0x88(%rsp), %rdi
callq 0x2ba50
jmp 0x254db
movq 0x20(%rsp), %rdi
addq $0x250, %rdi            # imm = 0x250
leaq 0x88(%rsp), %rsi
callq 0x205e0
jmp 0x254f6
leaq 0x88(%rsp), %rdi
callq 0x20740
movq 0x20(%rsp), %rax
testb $0x1, 0x468(%rax)
je 0x25570
movq 0x20(%rsp), %rax
testb $0x1, 0x28(%rax)
je 0x25570
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
movq 0x8(%rax), %rax
callq *%rax
jmp 0x2552c
jmp 0x2566d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x25706
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x88(%rsp), %rdi
callq 0x20740
jmp 0x25706
movq 0x20(%rsp), %rax
testb $0x1, 0x468(%rax)
je 0x2565a
movq 0x6da47(%rip), %rdi     # 0x92fd0
callq 0x6170
movl %eax, 0x18(%rsp)
jmp 0x25594
movl 0x18(%rsp), %eax
movb %al, 0x87(%rsp)
movsbl 0x87(%rsp), %eax
cmpl $0x1f, %eax
jne 0x25648
leaq 0x5f(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x69f0
movq 0x10(%rsp), %rdx
leaq 0x4ef7f(%rip), %rsi     # 0x7454a
leaq 0x60(%rsp), %rdi
callq 0x67c0
jmp 0x255d7
leaq 0x6e022(%rip), %rdi     # 0x93600
leaq 0x60(%rsp), %rsi
movl $0x1, %edx
callq 0x712f0
jmp 0x255ef
leaq 0x60(%rsp), %rdi
callq 0x6b50
leaq 0x5f(%rsp), %rdi
callq 0x65f0
jmp 0x25648
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0x25639
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x60(%rsp), %rdi
callq 0x6b50
leaq 0x5f(%rsp), %rdi
callq 0x65f0
jmp 0x25706
movq 0x20(%rsp), %rax
movq 0x6d97c(%rip), %rcx     # 0x92fd0
movq %rcx, 0x30(%rax)
jmp 0x2566b
movq 0x20(%rsp), %rdi
movq (%rdi), %rax
movq (%rax), %rax
callq *%rax
jmp 0x25669
jmp 0x2566b
jmp 0x2566d
movq 0x20(%rsp), %rdi
callq 0x25720
jmp 0x25679
movq 0x20(%rsp), %rax
movl 0x2a8(%rax), %eax
movq %rax, (%rsp)
movb $0x1, 0x2f(%rsp)
leaq 0x2e(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x20810
movq (%rsp), %rsi
movq 0x8(%rsp), %rcx
leaq 0x30(%rsp), %rdi
leaq 0x2f(%rsp), %rdx
callq 0x20820
jmp 0x256b6
movq 0x20(%rsp), %rdi
addq $0x430, %rdi            # imm = 0x430
leaq 0x30(%rsp), %rsi
callq 0x208a0
leaq 0x30(%rsp), %rdi
callq 0x11300
leaq 0x2e(%rsp), %rdi
callq 0x1e6a0
addq $0x298, %rsp            # imm = 0x298
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x2e(%rsp), %rdi
callq 0x1e6a0
movq 0x20(%rsp), %rdi
callq 0x27620
movq 0x270(%rsp), %rdi
callq 0x69e0
nopl (%rax)