// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::Haplotype(unsigned long, unsigned int)
Haplotype::Haplotype(dnapos_t length, unsigned ploidyCount)
	: length(length), total_mec(0), window_mec(0), isitecost(0)
{
	this->ploidyCount = ploidyCount;
	this->solution = vector<int>(this->length, -1);
	this->weights = vector<vector<int>>(this->length);
	this->siteCoverages = vector<dnacnt_t>(this->length);
	this->window.start = 0;
	this->window.end = this->length;

	for (dnapos_t i = 0; i < this->length; ++i) {
		this->solution[i] = -1;
		this->weights[i] = vector<int>(this->ploidyCount, 0);
		this->siteCoverages[i] = 0;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
xorl %eax, %eax
movq %rax, 0x10(%rdi)
movq %rsi, 0x18(%rdi)
leaq 0x20(%rdi), %rcx
movq %rcx, 0x30(%rsp)
leaq 0x38(%rdi), %r14
leaq 0xa0(%rdi), %rcx
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x40(%rdi)
movups %xmm0, 0x50(%rdi)
movq %rax, 0x60(%rdi)
movq %rcx, 0x70(%rdi)
movl $0x1, %ecx
movq %rcx, 0x78(%rdi)
movups %xmm0, 0x80(%rdi)
movl $0x3f800000, %edi       # imm = 0x3F800000
movl %edi, 0x90(%rbx)
movups %xmm0, 0x98(%rbx)
leaq 0xd8(%rbx), %r8
movq %r8, 0xa8(%rbx)
movq %rcx, 0xb0(%rbx)
movups %xmm0, 0xb8(%rbx)
movl %edi, 0xc8(%rbx)
movups %xmm0, 0xd0(%rbx)
movq $0x7fffffff, 0xe0(%rbx) # imm = 0x7FFFFFFF
movq %rax, 0xe8(%rbx)
movl %edx, 0x68(%rbx)
leaq 0x40(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
movq %r14, 0x38(%rsp)
callq 0x7a00
leaq 0x10(%rsp), %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x815e
movq (%r12), %rdi
testq %rdi, %rdi
je 0x6a3a
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2290
movq 0x18(%rbx), %rsi
leaq 0x40(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7a7e
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x20(%rbx), %rax
movups 0x28(%rbx), %xmm0
leaq 0x40(%rsp), %r12
movq (%r12), %rcx
movq %rcx, 0x20(%rbx)
movq 0x8(%r12), %rcx
movq %rcx, 0x28(%rbx)
movq 0x10(%r12), %rcx
movq %rcx, 0x30(%rbx)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, (%r12)
movq %rdx, 0x8(%r12)
movq %rsi, 0x10(%r12)
callq 0x61d8
movq %r12, %rdi
callq 0x61d8
movq 0x18(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x7b06
leaq 0x10(%rsp), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x819e
movq (%r12), %rdi
testq %rdi, %rdi
je 0x6aed
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2290
movq $0x0, 0xe0(%rbx)
movq 0x18(%rbx), %rax
movq %rax, 0xe8(%rbx)
testq %rax, %rax
je 0x6b84
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
leaq 0x40(%rsp), %r13
leaq 0xf(%rsp), %rbp
xorl %r14d, %r14d
movq (%rbx), %rax
movl $0xffffffff, (%rax,%r14,4) # imm = 0xFFFFFFFF
movl 0x68(%rbx), %esi
movl $0x0, 0x40(%rsp)
movq %r12, %rdi
movq %r13, %rdx
movq %rbp, %rcx
callq 0x7a00
movq 0x30(%rsp), %rax
movq (%rax), %rdi
addq %r15, %rdi
movq %r12, %rsi
callq 0x815e
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6b6b
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2290
movq 0x38(%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
addq $0x18, %r15
cmpq 0x18(%rbx), %r14
jb 0x6b1d
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6b99
jmp 0x6b99
jmp 0x6b99
movq %rax, %r12
leaq 0x70(%rbx), %r13
leaq 0xa8(%rbx), %rdi
callq 0x7caa
movq %r13, %rdi
callq 0x7caa
movq 0x38(%rsp), %rax
movq (%rax), %rdi
testq %rdi, %rdi
je 0x6bcd
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x2290
movq 0x30(%rsp), %rdi
callq 0x61d8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6beb
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2290
movq %r12, %rdi
callq 0x2450
nop