// File: /workspace/github_c_makefile_star2_O3/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 $0x48, %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, 0x28(%rsp)
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 0x30(%rsp), %rdx
movl $0xffffffff, (%rdx)     # imm = 0xFFFFFFFF
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rcx
callq 0x79be
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x6a78
subq %rdi, %rsi
callq 0x2290
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6a78
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2290
movq 0x18(%rbx), %rsi
leaq 0x30(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x7b3a
movq 0x30(%rbx), %rax
leaq 0x30(%rsp), %r15
movaps (%r15), %xmm0
movq 0x10(%r15), %rcx
movq %rcx, 0x30(%rbx)
movups 0x20(%rbx), %xmm1
movups %xmm0, 0x20(%rbx)
leaq 0x10(%rsp), %rdi
movaps %xmm1, (%rdi)
movq %rax, 0x10(%rdi)
xorps %xmm0, %xmm0
movaps %xmm0, (%r15)
movq $0x0, 0x10(%r15)
callq 0x6200
movq %r15, %rdi
callq 0x6200
movq 0x18(%rbx), %rsi
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x7bb8
movq 0x38(%rbx), %rdi
movq 0x48(%rbx), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, 0x38(%rbx)
movq 0x20(%rsp), %rax
movq %rax, 0x48(%rbx)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x6b32
subq %rdi, %rsi
callq 0x2290
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6b32
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 0x6c02
movl $0x8, %ebp
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0x30(%rsp), %r12
leaq 0xf(%rsp), %r13
movq (%rbx), %rax
movl $0xffffffff, (%rax,%r14,4) # imm = 0xFFFFFFFF
movl 0x68(%rbx), %esi
movl $0x0, 0x30(%rsp)
movq %r15, %rdi
movq %r12, %rdx
movq %r13, %rcx
callq 0x79be
movq 0x28(%rsp), %rax
movq (%rax), %rax
movq -0x10(%rax,%rbp,2), %rdi
movq (%rax,%rbp,2), %rsi
movaps 0x10(%rsp), %xmm0
movups %xmm0, -0x10(%rax,%rbp,2)
movq 0x20(%rsp), %rcx
movq %rcx, (%rax,%rbp,2)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
testq %rdi, %rdi
je 0x6be5
subq %rdi, %rsi
callq 0x2290
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x6be5
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x2290
movq 0x38(%rbx), %rax
movq $0x0, (%rax,%r14,8)
incq %r14
addq $0xc, %rbp
cmpq 0x18(%rbx), %r14
jb 0x6b68
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x6c17
jmp 0x6c17
jmp 0x6c17
movq %rax, %r15
leaq 0x70(%rbx), %r12
leaq 0xa8(%rbx), %rdi
callq 0x7d60
movq %r12, %rdi
callq 0x7d60
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x6c47
movq 0x48(%rbx), %rsi
subq %rdi, %rsi
callq 0x2290
movq 0x28(%rsp), %rdi
callq 0x6200
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6c65
movq 0x10(%rbx), %rsi
subq %rdi, %rsi
callq 0x2290
movq %r15, %rdi
callq 0x2450
nop