LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/Carben-dev[P]ext2fs-simple-utilities/ext2_utils.c
// Function: dfree
void dfree(int block_num) {
    block_num++;
    
    unsigned char *ptr;
    int in_which_byte;
    int off;
    
    in_which_byte = block_num/8;
    if (block_num%8) {
        in_which_byte++;
        off = block_num%8;
    } else {
        off = 8;
    }
    
    
    ptr = block_bitmap + in_which_byte - 1;
    *ptr = *ptr & ~(1<<(off - 1));
    
    //update superblock and gdt
    gdt->bg_free_blocks_count++;
    sb->s_free_blocks_count++;
}

// Assembly:
leal 0x1(%rdi), %eax
leal 0x8(%rdi), %ecx
testl %eax, %eax
cmovnsl %eax, %ecx
movl %ecx, %eax
sarl $0x3, %eax
andl $-0x8, %ecx
negl %ecx
leal (%rdi,%rcx), %edx
incl %edx
movl %edx, %ecx
addl $-0x1, %ecx
adcl $0x0, %eax
movl $0x1, %esi
shll %cl, %esi
addl $-0x1, %edx
leaq 0x30a3(%rip), %rcx      # 0x50d0
movq (%rcx), %rcx
notb %sil
movzbl %sil, %edx
movl $0x7f, %esi
cmovbl %edx, %esi
cltq
andb %sil, -0x1(%rcx,%rax)
leaq 0x307b(%rip), %rax      # 0x50c8
movq (%rax), %rax
incw 0xc(%rax)
leaq 0x3065(%rip), %rax      # 0x50c0
movq (%rax), %rax
incl 0xc(%rax)
retq
// File: /workspace/github_c_makefile_star2_O1/Carben-dev[P]ext2fs-simple-utilities/ext2_utils.c
// Function: count_inode_bitmap
int count_inode_bitmap() {
    unsigned char *inode_bitmap_ptr;
    int curr_byte = 0;
    int vaild_byte_count = sb->s_inodes_count/8;
    int result = 0;
    int i;
    
    while (curr_byte < vaild_byte_count) {
        inode_bitmap_ptr = inode_bitmap + curr_byte;
        for (i = 0; i < 8; i++) {
            if (!(*inode_bitmap_ptr>>i & 1)) {
                result++;
            }
            
        }
        curr_byte++;
    }
    
    return result;
}

// Assembly:
leaq 0x3057(%rip), %rax      # 0x50c0
movq (%rax), %rax
movl (%rax), %ecx
xorl %eax, %eax
cmpq $0x8, %rcx
jb 0x20a8
shrl $0x3, %ecx
leaq 0x3058(%rip), %rax      # 0x50d8
movq (%rax), %rdx
xorl %esi, %esi
xorl %eax, %eax
movzbl (%rdx,%rsi), %edi
notl %edi
xorl %r8d, %r8d
btl %r8d, %edi
adcl $0x0, %eax
incl %r8d
cmpl $0x8, %r8d
jne 0x2090
incq %rsi
cmpq %rcx, %rsi
jne 0x2087
retq
// File: /workspace/github_c_makefile_star2_O1/Carben-dev[P]ext2fs-simple-utilities/ext2_utils.c
// Function: count_block_bitmap
int count_block_bitmap() {
    unsigned char *block_bitmap_ptr;
    int curr_byte = 0;
    int vaild_byte_count = sb->s_blocks_count/8;
    int result = 0;
    int i;
    
    while (curr_byte < vaild_byte_count) {
        block_bitmap_ptr = block_bitmap + curr_byte;
        for (i = 0; i < 8; i++) {
            if (!(*block_bitmap_ptr>>i & 1)){
                result++;
            }
            
        }
        curr_byte++;
    }
    
    return result;
}

// Assembly:
leaq 0x3010(%rip), %rax      # 0x50c0
movq (%rax), %rax
movl 0x4(%rax), %ecx
xorl %eax, %eax
cmpq $0x8, %rcx
jb 0x20f0
shrl $0x3, %ecx
leaq 0x3008(%rip), %rax      # 0x50d0
movq (%rax), %rdx
xorl %esi, %esi
xorl %eax, %eax
movzbl (%rdx,%rsi), %edi
notl %edi
xorl %r8d, %r8d
btl %r8d, %edi
adcl $0x0, %eax
incl %r8d
cmpl $0x8, %r8d
jne 0x20d8
incq %rsi
cmpq %rcx, %rsi
jne 0x20cf
retq
// File: /workspace/github_c_makefile_star2_O1/Carben-dev[P]ext2fs-simple-utilities/ext2_utils.c
// Function: cut_path
void cut_path(char *path,
              char *parent,
              char *name)
{
    int i;
    // Find out the index of the last '/' in path;
    int last_slash_index = 0;
    for (i = 0; i < strlen(path); i++) {
        if (path[i] == '/') {
            last_slash_index = i;
        }
    }
    // Set parent path
    if (last_slash_index == 0) {
        parent[0] = '/';
        parent[1] = '\0';
    } else {
        memcpy(parent, path, last_slash_index);
        parent[last_slash_index] = '\0';
    }
    // Set name
    strncpy(name, path + last_slash_index + 1, EXT2_NAME_LEN);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
callq 0x1070
testq %rax, %rax
je 0x2139
xorl %edx, %edx
xorl %ecx, %ecx
cmpb $0x2f, (%r14,%rdx)
cmovel %edx, %ecx
incq %rdx
cmpq %rdx, %rax
jne 0x2127
jmp 0x213b
xorl %ecx, %ecx
movslq %ecx, %r12
testl %ecx, %ecx
je 0x2155
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x10c0
movq %r12, %rax
jmp 0x215e
movb $0x2f, (%r15)
movl $0x1, %eax
movb $0x0, (%r15,%rax)
leaq (%r14,%r12), %rsi
incq %rsi
movl $0xff, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x1040
// File: /workspace/github_c_makefile_star2_O1/Carben-dev[P]ext2fs-simple-utilities/ext2_utils.c
// Function: copy_to_inode_datablock
int copy_to_inode_datablock(struct ext2_inode *dst_file_inode,
                            unsigned char *src_file,
                            int src_size)
{
    // allocate datablock space for cpy_file
    int dst_file_i_block_array_size = src_size/EXT2_BLOCK_SIZE;
    if (src_size%EXT2_BLOCK_SIZE) {
        dst_file_i_block_array_size++;
    }
    dst_file_inode->i_blocks = dst_file_i_block_array_size * 2; // set inode->blocks
    int *dst_file_i_block_array = malloc(sizeof(int) * dst_file_i_block_array_size);
    int i;
    for (i = 0; i < dst_file_i_block_array_size; i++) {
        dst_file_i_block_array[i] = dalloc();
        if (dst_file_i_block_array[i] < 0) {
            return ENOSPC;
        }
    }
    write_array_into_i_block(dst_file_inode, dst_file_i_block_array, dst_file_i_block_array_size);
    // do copy
    i = 0;
    while (i < dst_file_i_block_array_size) {
        unsigned char *src = src_file + EXT2_BLOCK_SIZE * i;
        unsigned char *dst = disk + EXT2_BLOCK_SIZE * dst_file_i_block_array[i];
        memcpy(dst, src, EXT2_BLOCK_SIZE);
        i++;
    }
    
    free(dst_file_i_block_array);
    return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r12
movl $0x3ff, %eax            # imm = 0x3FF
leal (%rdx,%rax), %r15d
testl %edx, %edx
cmovnsl %edx, %r15d
sarl $0xa, %r15d
andl %eax, %edx
cmpl $0x1, %edx
sbbl $-0x1, %r15d
leal (%r15,%r15), %eax
movl %eax, 0x1c(%rdi)
movslq %r15d, %rbp
leaq (,%rbp,4), %rdi
callq 0x10e0
movq %rax, %r14
movl %r15d, %r13d
testl %ebp, %ebp
jle 0x21e7
xorl %ebp, %ebp
callq 0x1815
movl %eax, (%r14,%rbp,4)
testl %eax, %eax
js 0x2238
incq %rbp
cmpq %rbp, %r13
jne 0x21d2
movq %r12, %rdi
movq %r14, %rsi
movl %r15d, %edx
callq 0x1f0f
testl %r15d, %r15d
jle 0x222c
xorl %r15d, %r15d
leaq 0x2eac(%rip), %r12      # 0x50b0
movslq (%r14,%r15,4), %rdi
shlq $0xa, %rdi
addq (%r12), %rdi
movl $0x400, %edx            # imm = 0x400
movq %rbx, %rsi
callq 0x10c0
incq %r15
addq $0x400, %rbx            # imm = 0x400
cmpq %r15, %r13
jne 0x2204
movq %r14, %rdi
callq 0x1030
xorl %eax, %eax
jmp 0x223d
movl $0x1c, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/Carben-dev[P]ext2fs-simple-utilities/ext2_utils.c
// Function: new_inode
int new_inode(unsigned short type,
              unsigned int size){
    // allocate space in inode table
    int new_inode_num = ialloc();
    if (new_inode_num < 0) {
        return ENOSPC;
    }
    struct ext2_inode *new_inode = inode_table + (new_inode_num - 1);
    
    // build dst file inode
    new_inode->i_mode           = 0x0000 | type;
    new_inode->i_uid            = 0;
    new_inode->i_size           = size;
    new_inode->i_ctime          = 0;
    new_inode->i_mtime          = 0;
    new_inode->i_dtime          = 0;
    new_inode->i_gid            = 0;
    new_inode->i_links_count    = 0;
    new_inode->i_blocks         = 0;
    new_inode->i_flags          = 0;
    // block[15]
    new_inode->osd1             = 0;
    new_inode->i_generation     = 0;
    new_inode->i_file_acl       = 0;
    new_inode->i_dir_acl        = 0;
    // padding
    memset(new_inode->extra, 0, 3);
    
    return new_inode_num;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebx
movl %edi, %ebp
callq 0x1790
testl %eax, %eax
js 0x22a6
leaq 0x2e55(%rip), %rcx      # 0x50b8
movq (%rcx), %rcx
movl %eax, %edx
shlq $0x7, %rdx
movw %bp, -0x80(%rcx,%rdx)
xorl %esi, %esi
movw %si, -0x7e(%rcx,%rdx)
movl %ebx, -0x7c(%rcx,%rdx)
movq $0x0, -0x1c(%rcx,%rdx)
movl $0x0, -0x14(%rcx,%rdx)
movw %si, -0xc(%rcx,%rdx)
movb $0x0, -0xa(%rcx,%rdx)
xorps %xmm0, %xmm0
movups %xmm0, -0x74(%rcx,%rdx)
movups %xmm0, -0x68(%rcx,%rdx)
jmp 0x22ab
movl $0x1c, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::shuffle()
void Genome::shuffle() {
	uniform_int_distribution<size_t> distribution(0, this->haplotypes.size() - 1);

	this->maxIterations = this->haplotypes[0].size() * 100;

	if (this->initialized) {
		auto ploidy = this->haplotypes.size();
		auto length = this->haplotypes[0].size();
		this->haplotypes.clear();
		this->haplotypes = vector<Haplotype>(ploidy, Haplotype(length, ploidy));
	}

	for (auto& r : this->file.reads) {
		this->haplotypes[distribution(this->randomEngine)].add(&r);
	}

	this->initialized = true;

	// for (auto& ch : this->haplotypes) {
	// 	cout << ch << endl;
	// }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x148, %rsp            # imm = 0x148
movq %rdi, %rbx
movq 0x2368(%rdi), %rdi
movq 0x2370(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
movabsq $-0x1084210842108421, %r15 # imm = 0xEF7BDEF7BDEF7BDF
imulq %r15, %rax
decq %rax
movq $0x0, 0x8(%rsp)
movq %rax, 0x10(%rsp)
callq 0x6e40
imulq $0x64, %rax, %rax
movq %rax, 0x3bd8(%rbx)
cmpb $0x1, 0x37c0(%rbx)
jne 0x2e53
movq 0x2368(%rbx), %rdi
movq 0x2370(%rbx), %r14
subq %rdi, %r14
sarq $0x3, %r14
imulq %r15, %r14
callq 0x6e40
movq %rax, %r15
movq 0x2368(%rbx), %r13
movq 0x2370(%rbx), %rbp
cmpq %r13, %rbp
je 0x2db1
movq %r13, %r12
movq %r12, %rdi
callq 0x6d7e
addq $0xf8, %r12
cmpq %rbp, %r12
jne 0x2d96
movq %r13, 0x2370(%rbx)
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movl %r14d, %edx
callq 0x6948
leaq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rcx
movq %r14, %rsi
movq %r12, %rdx
callq 0x5142
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x2368(%rbx), %rax
movups 0x2370(%rbx), %xmm0
leaq 0x18(%rsp), %r14
movq (%r14), %rcx
movq %rcx, 0x2368(%rbx)
movq 0x8(%r14), %rcx
movq %rcx, 0x2370(%rbx)
movq 0x10(%r14), %rcx
movq %rcx, 0x2378(%rbx)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, (%r14)
movq %rdx, 0x8(%r14)
movq %rsi, 0x10(%r14)
callq 0x51dc
movq %r14, %rdi
callq 0x51dc
leaq 0x50(%rsp), %rdi
callq 0x6d7e
movq 0x23d8(%rbx), %r14
movq 0x23e0(%rbx), %r13
cmpq %r13, %r14
je 0x2e9f
leaq 0x2438(%rbx), %r15
leaq 0x8(%rsp), %r12
movq %r12, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x63d4
imulq $0xf8, %rax, %rdi
addq 0x2368(%rbx), %rdi
movq %r14, %rsi
callq 0x722e
addq $0x30, %r14
cmpq %r13, %r14
jne 0x2e72
movb $0x1, 0x37c0(%rbx)
addq $0x148, %rsp            # imm = 0x148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x6d7e
movq %rbx, %rdi
callq 0x2450
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::mec()
dnaweight_t Genome::mec() {
	dnaweight_t out = 0;
	for (size_t i = 0; i < haplotypes.size(); i++) {
		out = out + haplotypes[i].mec();
	}

	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2368(%rdi), %rdi
cmpq %rdi, 0x2370(%rbx)
je 0x2fd1
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movabsq $-0x1084210842108421, %r15 # imm = 0xEF7BDEF7BDEF7BDF
xorl %r12d, %r12d
movsd %xmm0, (%rsp)
addq %r14, %rdi
callq 0x6e4e
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
movq 0x2368(%rbx), %rdi
movq 0x2370(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
addq $0xf8, %r14
cmpq %rax, %r12
jb 0x2f87
jmp 0x2fd5
xorpd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::windowMEC()
dnaweight_t Genome::windowMEC() { 
	dnaweight_t out = 0;
	for (size_t i = 0; i < haplotypes.size(); i++) {
		assert(haplotypes[i].windowMec()>=0);
		out += haplotypes[i].windowMec();
		assert(out>=0);
	}
	return out;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2368(%rdi), %rdi
cmpq %rdi, 0x2370(%rbx)
je 0x3078
xorl %r14d, %r14d
movabsq $-0x1084210842108421, %r15 # imm = 0xEF7BDEF7BDEF7BDF
xorl %r12d, %r12d
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
addq %r14, %rdi
callq 0x6f42
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x3088
movq 0x2368(%rbx), %rdi
addq %r14, %rdi
callq 0x6f42
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
ucomisd 0x7fc0(%rip), %xmm1     # 0xb008
jb 0x30a7
movapd %xmm1, %xmm0
incq %r12
movq 0x2368(%rbx), %rdi
movq 0x2370(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
addq $0xf8, %r14
cmpq %rax, %r12
jb 0x3011
jmp 0x307c
xorpd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x80b7(%rip), %rdi      # 0xb146
leaq 0x80cd(%rip), %rsi      # 0xb163
leaq 0x80d5(%rip), %rcx      # 0xb172
movl $0x4c, %edx
callq 0x2180
leaq 0x80eb(%rip), %rdi      # 0xb199
leaq 0x80ae(%rip), %rsi      # 0xb163
leaq 0x80b6(%rip), %rcx      # 0xb172
movl $0x4e, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::windowTotalCoverage()
double Genome::windowTotalCoverage() {
	double coverage = 0;
	for (size_t i = 0; i < this->haplotypes.size(); i++)
		coverage += this->haplotypes[i].windowTotalCoverage();
	return coverage;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x2368(%rdi), %rdi
cmpq %rdi, 0x2370(%rbx)
je 0x324d
xorpd %xmm0, %xmm0
xorl %r14d, %r14d
movabsq $-0x1084210842108421, %r15 # imm = 0xEF7BDEF7BDEF7BDF
xorl %r12d, %r12d
movsd %xmm0, (%rsp)
addq %r14, %rdi
callq 0x7158
movsd (%rsp), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd (%rsp), %xmm0
incq %r12
movq 0x2368(%rbx), %rdi
movq 0x2370(%rbx), %rax
subq %rdi, %rax
sarq $0x3, %rax
imulq %r15, %rax
addq $0xf8, %r14
cmpq %rax, %r12
jb 0x3203
jmp 0x3251
xorpd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::acceptance(double, double)
double Genome::acceptance(double newScore, double curScore) {
	if (newScore < curScore) return 1;
	if (this->t == 0) return 0;
	double energyDiff = curScore - newScore;
	// cout << "Acceptance(" << energyDiff << ") = " << exp(energyDiff / this->t) << endl;

	// cout << "newScore: " << newScore << ", energyDiff: " << energyDiff << ", acceptance: " << exp(energyDiff / this->t) << endl;
	return exp(energyDiff / this->t);
}

// Assembly:
ucomisd %xmm0, %xmm1
jbe 0x33d4
movsd 0x7c3e(%rip), %xmm2     # 0xb010
jmp 0x33e8
movsd 0x3bc0(%rdi), %xmm3
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm3
jne 0x33ed
jp 0x33ed
movapd %xmm2, %xmm0
retq
subsd %xmm0, %xmm1
divsd %xmm3, %xmm1
movapd %xmm1, %xmm0
jmp 0x2460
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::setParameters(double, double, unsigned long long)
void Genome::setParameters(double tInitial, double tEnd, iteration_t maxIterations) {
	if (this->curIteration) {
		// Probably warn the user in some way that the simulation is in process
	}

	this->tInitial = tInitial;
	// this->tEnd = tEnd;
	this->tDecay = -log(tEnd / this->tInitial);
	this->maxIterations = maxIterations;

	cout << "decay is " << this->tDecay << endl;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movsd %xmm0, 0x3bc8(%rdi)
divsd %xmm0, %xmm1
movapd %xmm1, %xmm0
callq 0x2200
xorpd 0x7ca9(%rip), %xmm0     # 0xb0e0
movlpd %xmm0, 0x3bd0(%r14)
movq %rbx, 0x3bd8(%r14)
movq 0xcb7a(%rip), %rbx      # 0xffc8
leaq 0x7d4b(%rip), %rsi      # 0xb1a0
movl $0x9, %edx
movq %rbx, %rdi
callq 0x22b0
movsd 0x3bd0(%r14), %xmm0
movq %rbx, %rdi
callq 0x23d0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21a0
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::iteration()
void Genome::iteration() {
	auto oldScore = this->windowMec();
	// FIXME: these lines recomputes ALL the sites?? It should only incrementally compute the old and new scores at the sites touched by this read! Inefficient!
	this->move();
	auto newScore = this->windowMec();

	uniform_real_distribution<double> distribution(0, 1);
	double chanceToKeep = this->acceptance(newScore, oldScore);
	double randomIndex = distribution(this->randomEngine);

	bool isGood = newScore < oldScore;
	bool accept = randomIndex <= chanceToKeep;
	assert(!isGood || accept);

	if (isGood) {
		// always accept
	} else if (!accept) {
		// reject
		this->revertMove();
	}

	this->fAccept.record(isGood);

	if (!(isGood || oldScore == newScore)) {
		this->totalBad++;
		if (accept) {
			this->totalBadAccepted++;
		}
		this->pBad.record(chanceToKeep);
	}

#if 0
	uniform_real_distribution<double> d(0, 3);
	if (d(this->randomEngine) <= 1) {
		this->pBad.record(false);
	} else {
		this->pBad.record(true);
	}
#endif
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
callq 0x325e
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0x34ae
movq %rbx, %rdi
callq 0x325e
movsd %xmm0, 0x10(%rsp)
movsd 0x8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x36b0
movsd 0x7962(%rip), %xmm0     # 0xb010
jmp 0x36e2
movsd 0x3bc0(%rbx), %xmm1
xorpd %xmm2, %xmm2
xorpd %xmm0, %xmm0
movsd %xmm0, (%rsp)
ucomisd %xmm2, %xmm1
jne 0x36cd
jnp 0x36e7
movsd 0x8(%rsp), %xmm0
subsd 0x10(%rsp), %xmm0
divsd %xmm1, %xmm0
callq 0x2460
movsd %xmm0, (%rsp)
leaq 0x2438(%rbx), %rdi
callq 0x660e
movapd %xmm0, %xmm1
xorl %ebp, %ebp
movsd 0x8(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
seta %r14b
jbe 0x371a
movsd (%rsp), %xmm0
ucomisd %xmm1, %xmm0
jb 0x379a
movsd 0x8(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
movsd %xmm1, 0x18(%rsp)
ja 0x3741
movsd (%rsp), %xmm0
ucomisd %xmm1, %xmm0
jae 0x3741
movq %rbx, %rdi
callq 0x362c
movb %r14b, %bpl
movq %rbx, %rdi
movl %ebp, %esi
callq 0x37ba
movsd 0x8(%rsp), %xmm0
ucomisd 0x10(%rsp), %xmm0
jae 0x3791
incl 0x2360(%rbx)
movsd (%rsp), %xmm0
ucomisd 0x18(%rsp), %xmm0
jb 0x3775
incl 0x2364(%rbx)
addq $0x408, %rbx            # imm = 0x408
movq %rbx, %rdi
movsd (%rsp), %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x3834
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x7a4e(%rip), %rdi      # 0xb1ef
leaq 0x79bb(%rip), %rsi      # 0xb163
leaq 0x7a52(%rip), %rcx      # 0xb201
movl $0x119, %edx            # imm = 0x119
callq 0x2180
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::AcceptBuffer::record(char)
void Genome::AcceptBuffer::record(char good) {
	size_t next = this->pos == LENGTH - 1 ? 0 : this->pos + 1;
	assert(good == 0 || good == 1);
	if (this->len == LENGTH) {
		this->sum -= this->buffer[next]; // the next one is the first one
	} else {
		this->len++;
	}
	this->pos = next;
	this->buffer[next] = good;
	this->sum += good;
}

// Assembly:
movq 0x3f0(%rdi), %rcx
leaq 0x1(%rcx), %rdx
xorl %eax, %eax
cmpq $0x3e7, %rcx            # imm = 0x3E7
cmovneq %rdx, %rax
cmpb $0x2, %sil
jae 0x3814
movq 0x3e8(%rdi), %rcx
cmpq $0x3e8, %rcx            # imm = 0x3E8
jne 0x37f4
movsbl (%rdi,%rax), %ecx
subl %ecx, 0x3f8(%rdi)
jmp 0x37fe
incq %rcx
movq %rcx, 0x3e8(%rdi)
movzbl %sil, %ecx
movq %rax, 0x3f0(%rdi)
movb %sil, (%rdi,%rax)
addl %ecx, 0x3f8(%rdi)
retq
pushq %rax
leaq 0x7cde(%rip), %rdi      # 0xb4fa
leaq 0x7940(%rip), %rsi      # 0xb163
leaq 0x7ce7(%rip), %rcx      # 0xb511
movl $0x201, %edx            # imm = 0x201
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::PbadBuffer::record(double)
void Genome::PbadBuffer::record(double acceptance) {
	size_t next = this->pos == LENGTH - 1 ? 0 : this->pos + 1;
	assert(acceptance >= 0.0 && acceptance <= 1.0);
	if (this->len == LENGTH) {
		this->sum -= this->buffer[next]; // the next one is the first one
	} else {
		this->len++;
	}
	this->pos = next;
	this->buffer[next] = acceptance;
	this->sum += acceptance;
	if(this->sum < 0) this->sum = 0;
}

// Assembly:
movq 0x1f48(%rdi), %rcx
leaq 0x1(%rcx), %rdx
xorl %eax, %eax
cmpq $0x3e7, %rcx            # imm = 0x3E7
cmovneq %rdx, %rax
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x38ba
movsd 0x77b2(%rip), %xmm1     # 0xb010
ucomisd %xmm0, %xmm1
jb 0x38ba
movq 0x1f40(%rdi), %rcx
cmpq $0x3e8, %rcx            # imm = 0x3E8
jne 0x388b
movsd 0x1f50(%rdi), %xmm1
subsd (%rdi,%rax,8), %xmm1
movsd %xmm1, 0x1f50(%rdi)
jmp 0x3895
incq %rcx
movq %rcx, 0x1f40(%rdi)
movq %rax, 0x1f48(%rdi)
movsd %xmm0, (%rdi,%rax,8)
addsd 0x1f50(%rdi), %xmm0
xorpd %xmm1, %xmm1
maxsd %xmm0, %xmm1
movsd %xmm1, 0x1f50(%rdi)
retq
pushq %rax
leaq 0x7be2(%rip), %rdi      # 0xb4a4
leaq 0x789a(%rip), %rsi      # 0xb163
leaq 0x7bfb(%rip), %rcx      # 0xb4cb
movl $0x1ee, %edx            # imm = 0x1EE
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::getTemperature(unsigned long long)
double Genome::getTemperature(iteration_t iteration) {
	double s = iteration / (double)this->maxIterations;
	double temp = (double)this->tInitial * exp(-this->tDecay * s);

	// cout << iteration << ": " << temp << endl;
	return temp;
}

// Assembly:
pushq %rax
movq %rsi, %xmm0
movq 0x77d8(%rip), %xmm1     # 0xb0c0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
movapd 0x77dc(%rip), %xmm2     # 0xb0d0
subpd %xmm2, %xmm0
movapd %xmm0, %xmm3
unpckhpd %xmm0, %xmm3            # xmm3 = xmm3[1],xmm0[1]
addsd %xmm0, %xmm3
movq 0x3bd8(%rdi), %xmm0
punpckldq %xmm1, %xmm0    # xmm0 = xmm0[0],xmm1[0],xmm0[1],xmm1[1]
subpd %xmm2, %xmm0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
divsd %xmm1, %xmm3
movsd 0x3bc8(%rdi), %xmm0
movsd %xmm0, (%rsp)
movsd 0x3bd0(%rdi), %xmm0
xorpd 0x779f(%rip), %xmm0     # 0xb0e0
mulsd %xmm3, %xmm0
callq 0x2460
mulsd (%rsp), %xmm0
popq %rax
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::ResetBuffers()
void Genome::ResetBuffers() {
    for (iteration_t i = 0; i < this->fAccept.LENGTH; ++i) this->fAccept.buffer[i]=0;
    for (iteration_t i = 0; i < this->pBad.LENGTH; ++i) this->pBad.buffer[i]=0;
    this->pBad.len = this->fAccept.len = 0;
    this->pBad.pos = this->fAccept.pos = 0;
    this->pBad.sum = this->fAccept.sum = 0;
    this->totalBad = 0;
    this->totalBadAccepted = this->totalGood = 0;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %ebp, %ebp
movl $0x3e8, %edx            # imm = 0x3E8
xorl %esi, %esi
callq 0x2140
leaq 0x408(%rbx), %rdi
movl $0x1f40, %edx           # imm = 0x1F40
xorl %esi, %esi
callq 0x2140
movl %ebp, 0x400(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x3e8(%rbx)
movl %ebp, 0x3f8(%rbx)
movups %xmm0, 0x2348(%rbx)
movups %xmm0, 0x2358(%rbx)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::combineBlocks(SAHap::Range, SAHap::Range)
Range Genome::combineBlocks(Range a, Range b) {
	Range ret;
	ret.start = min(a.start, b.start);
	ret.end = max(a.end, b.end);
	return ret;
}

// Assembly:
movq %rsi, %rax
cmpq %rsi, %rcx
cmovbq %rcx, %rax
cmpq %r8, %rdx
cmovbeq %r8, %rdx
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::Genome::compareGroundTruth(SAHap::Haplotype const&, std::vector<int, std::allocator<int>> const&)
dnacnt_t Genome::compareGroundTruth(const Haplotype& ch, const vector<int>& truth) {
	dnacnt_t loss = 0;
	for (size_t i = 0; i < ch.size(); ++i) {
		if (ch.solution[i] != truth[i]) {
			loss++;
		}
	}
	return loss;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rsi, %rdi
callq 0x6e40
testq %rax, %rax
je 0x4f77
xorl %r12d, %r12d
xorl %r15d, %r15d
movq (%r14), %rax
movl (%rax,%r12,4), %eax
movq (%rbx), %rcx
xorl %edx, %edx
cmpl (%rcx,%r12,4), %eax
setne %dl
addq %rdx, %r15
incq %r12
movq %r14, %rdi
callq 0x6e40
cmpq %rax, %r12
jb 0x4f4f
jmp 0x4f7a
xorl %r15d, %r15d
movq %r15, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Genome.cpp
// Function: SAHap::operator<<(std::ostream&, SAHap::Genome const&)
ostream& operator << (ostream& stream, const Genome& ge) {
	int blockNum = 1;
	for (Range r : ge.blocks) {
		stream << "BLOCK " << blockNum++ << endl;
		for (size_t i = 0; i < ge.haplotypes.size(); ++i) {
			for (size_t j = 0; j < ge.haplotypes[i].size(); ++j) {
				if (j >= r.start && j <= r.end) {
					if (ge.haplotypes[i].solution[j] < 0)
						stream << 'X';
					else
						stream << ge.haplotypes[i].solution[j];
				}
				else
					stream << '-';
			}
			stream << endl;
		}
	}
	return stream;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x3c30(%rsi), %rax
movq 0x3c38(%rsi), %rcx
movq %rcx, 0x10(%rsp)
cmpq %rcx, %rax
je 0x512f
movq %rsi, %r14
movl $0x1, %r12d
movq (%rax), %rbp
movq %rax, 0x18(%rsp)
movq 0x8(%rax), %r15
movl $0x6, %edx
movq %rbx, %rdi
leaq 0x6566(%rip), %rsi      # 0xb540
callq 0x22b0
movq %rbx, %rdi
movl %r12d, 0xc(%rsp)
movl %r12d, %esi
callq 0x2430
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x21a0
movq 0x2370(%r14), %rax
cmpq 0x2368(%r14), %rax
je 0x5113
xorl %edx, %edx
movq %rdx, 0x20(%rsp)
imulq $0xf8, %rdx, %r12
movq 0x2368(%r14), %rdi
addq %r12, %rdi
callq 0x6e40
testq %rax, %rax
je 0x50bb
xorl %r13d, %r13d
cmpq %rbp, %r13
jb 0x5079
cmpq %r15, %r13
ja 0x5079
movq 0x2368(%r14), %rax
movq (%rax,%r12), %rax
movl (%rax,%r13,4), %esi
testl %esi, %esi
js 0x508d
movq %rbx, %rdi
callq 0x2430
jmp 0x50a4
movb $0x2d, 0xb(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xb(%rsp), %rsi
jmp 0x509f
movb $0x58, 0xa(%rsp)
movl $0x1, %edx
movq %rbx, %rdi
leaq 0xa(%rsp), %rsi
callq 0x22b0
incq %r13
movq 0x2368(%r14), %rdi
addq %r12, %rdi
callq 0x6e40
cmpq %rax, %r13
jb 0x5052
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x21a0
movq 0x2370(%r14), %rax
subq 0x2368(%r14), %rax
movq 0x20(%rsp), %rdx
incq %rdx
sarq $0x3, %rax
movabsq $-0x1084210842108421, %rcx # imm = 0xEF7BDEF7BDEF7BDF
imulq %rcx, %rax
cmpq %rax, %rdx
jb 0x502f
movl 0xc(%rsp), %r12d
incl %r12d
movq 0x18(%rsp), %rax
addq $0x10, %rax
cmpq 0x10(%rsp), %rax
jne 0x4fbf
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::meanCoverage()
double Haplotype::meanCoverage() {
    double result = 0.0;
    for (dnapos_t i = 0; i < this->length; ++i) {
		result += this->siteCoverages[i];
    }
    return result/this->length;
}

// Assembly:
movq 0x18(%rdi), %rax
testq %rax, %rax
je 0x6e15
movq 0x38(%rdi), %rcx
xorpd %xmm0, %xmm0
xorl %edx, %edx
movsd 0x42d9(%rip), %xmm1     # 0xb0c0
movapd 0x42e1(%rip), %xmm2     # 0xb0d0
movsd (%rcx,%rdx,8), %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
subpd %xmm2, %xmm3
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
addsd %xmm4, %xmm0
incq %rdx
cmpq %rdx, %rax
jne 0x6def
jmp 0x6e19
xorpd %xmm0, %xmm0
movq %rax, %xmm1
punpckldq 0x429a(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x42a2(%rip), %xmm1     # 0xb0d0
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
divsd %xmm2, %xmm0
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::mec(unsigned long, unsigned long)
double Haplotype::mec(dnapos_t s, dnapos_t e) {
    double out = 0;
    assert(e>=s);

    for (unsigned j = 0; j < ploidyCount; j++) {
	for (dnapos_t i = s; i <= e && i < this->length; i++) {
	    if (solution[i] == (int)j) // solution is signed since (-1) is used to mean "undefined"
		continue;
	    if(weights[i][j] < 0 && weights[i][j] > -SMALL_ENOUGH_TO_IGNORE) weights[i][j] = 0;
	    assert(weights[i][j]>=0);
	    out += weights[i][j];
	}
    }
    assert(out>=0);
    return out;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
cmpq %rsi, %rdx
jb 0x6f04
movl 0x68(%rdi), %eax
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testq %rax, %rax
je 0x6eda
cmpq %rdx, %rsi
setbe %r10b
movq 0x18(%rdi), %rcx
cmpq %rsi, %rcx
seta %r8b
movq (%rdi), %r9
andb %r10b, %r8b
leaq (%rsi,%rsi,2), %r10
shlq $0x3, %r10
addq 0x20(%rdi), %r10
xorl %edi, %edi
movq %r10, %r11
movq %rsi, %rbx
testb %r8b, %r8b
je 0x6ed2
movl (%r9,%rbx,4), %r14d
cmpq %r14, %rdi
je 0x6ec1
movq (%r11), %r14
movl (%r14,%rdi,4), %ebp
testl %ebp, %ebp
js 0x6ee5
xorps %xmm2, %xmm2
cvtsi2sd %ebp, %xmm2
addsd %xmm2, %xmm0
cmpq %rdx, %rbx
jae 0x6ed2
incq %rbx
addq $0x18, %r11
cmpq %rcx, %rbx
jb 0x6ea2
incq %rdi
cmpq %rax, %rdi
jne 0x6e97
ucomisd %xmm1, %xmm0
jb 0x6f23
popq %rbx
popq %r14
popq %rbp
retq
leaq 0x4744(%rip), %rdi      # 0xb630
leaq 0x46fa(%rip), %rsi      # 0xb5ed
leaq 0x4705(%rip), %rcx      # 0xb5ff
movl $0x62, %edx
callq 0x2180
leaq 0x46dd(%rip), %rdi      # 0xb5e8
leaq 0x46db(%rip), %rsi      # 0xb5ed
leaq 0x46e6(%rip), %rcx      # 0xb5ff
movl $0x5b, %edx
callq 0x2180
leaq 0x426f(%rip), %rdi      # 0xb199
leaq 0x46bc(%rip), %rsi      # 0xb5ed
leaq 0x46c7(%rip), %rcx      # 0xb5ff
movl $0x66, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::pickReads(unsigned int)
void Haplotype::pickReads(unsigned overlap) {
	this->reads.clear();
	
	for (auto r : this->saved_reads) {
		if (r->range.end > this->window.start + overlap && r->range.start <= this->window.end) {
			this->reads.insert(r);
		}
	}
	//cout << "MIN START: " << mx << endl;
	for (auto r : this->reads)
		this->saved_reads.erase(r);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x70(%rdi), %r14
movq %r14, %rdi
callq 0x7cd0
movq 0xb8(%rbx), %r13
testq %r13, %r13
je 0x7055
movl %ebp, %ebp
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movq 0x8(%r13), %rax
movq %rax, 0x10(%rsp)
movq 0xe0(%rbx), %rcx
addq %rbp, %rcx
cmpq %rcx, 0x28(%rax)
jbe 0x704c
movq 0x20(%rax), %rax
cmpq 0xe8(%rbx), %rax
ja 0x704c
movq %r14, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x81de
movq (%r13), %r13
testq %r13, %r13
jne 0x7013
movq 0x80(%rbx), %r15
testq %r15, %r15
je 0x7089
addq $0xa8, %rbx
leaq 0x8(%rsp), %r14
movq 0x8(%r15), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x84a4
movq (%r15), %r15
testq %r15, %r15
jne 0x706d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::initializeWindow(unsigned int, unsigned int)
void Haplotype::initializeWindow(unsigned windowSize, unsigned incrementBy) {
	this->window.start = 0;
	this->window.end = windowSize;
	this->increment_window_by = incrementBy;
	this->saved_reads = this->reads;

	this->pickReads(0);

	this->window_mec = mec(this->window.start, this->window.end);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0xe0(%rdi)
movl %esi, %eax
movq %rax, 0xe8(%rdi)
movl %edx, 0xf0(%rdi)
leaq 0x70(%rdi), %rsi
addq $0xa8, %rdi
callq 0x7e5c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x6fdc
movq 0xe0(%rbx), %rsi
movq 0xe8(%rbx), %rdx
movq %rbx, %rdi
callq 0x6e54
movsd %xmm0, 0x58(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::incrementWindow()
void Haplotype::incrementWindow() {
	dnapos_t old_end = this->window.end;

	this->window.start += this->increment_window_by;
	this->window.end = min(this->window.end + this->increment_window_by, this->length);

	this->saveReads();
	this->pickReads(old_end - this->window.start);
	
	this->window_mec = mec(this->window.start, this->window.end);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x18(%rdi), %rax
movq 0xe8(%rdi), %r14
movl 0xf0(%rdi), %ecx
addq %rcx, 0xe0(%rdi)
addq %r14, %rcx
cmpq %rcx, %rax
cmovbq %rax, %rcx
movq %rcx, 0xe8(%rdi)
callq 0x6f72
subl 0xe0(%rbx), %r14d
movq %rbx, %rdi
movl %r14d, %esi
callq 0x6fdc
movq 0xe0(%rbx), %rsi
movq 0xe8(%rbx), %rdx
movq %rbx, %rdi
callq 0x6e54
movsd %xmm0, 0x58(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::windowTotalCoverage()
double Haplotype::windowTotalCoverage() {
    double result = 0.0;
    for (dnapos_t i = this->window.start; i < this->window.end; ++i) {
		result += this->siteCoverages[i];
    }
    return result;//(this->window.end - this->window.start);
}

// Assembly:
movq 0xe0(%rdi), %rax
movq 0xe8(%rdi), %rcx
xorpd %xmm0, %xmm0
cmpq %rcx, %rax
jae 0x71a7
movq 0x38(%rdi), %rdx
movsd 0x3f45(%rip), %xmm1     # 0xb0c0
movapd 0x3f4d(%rip), %xmm2     # 0xb0d0
movsd (%rdx,%rax,8), %xmm3
unpcklps %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
subpd %xmm2, %xmm3
movapd %xmm3, %xmm4
unpckhpd %xmm3, %xmm4            # xmm4 = xmm4[1],xmm3[1]
addsd %xmm3, %xmm4
addsd %xmm4, %xmm0
incq %rax
cmpq %rax, %rcx
jne 0x7183
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::add(SAHap::Read*)
void Haplotype::add(Read * r) {
	if (this->reads.find(r) != this->reads.end()) {
		throw "Haplotype already contains read";
	}
	// std::cout << "adding\n";
	this->reads.insert(r);
	this->vote(*r);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rsi, 0x8(%rsp)
movq 0x70(%rdi), %rdi
movq 0x78(%rbx), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x7297
movq (%rax), %r9
movq %rax, %r10
cmpq %rsi, 0x8(%r9)
je 0x7297
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x7294
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x7297
movq %r11, %r10
cmpq %rsi, %rdi
jne 0x7268
jmp 0x7297
xorl %r10d, %r10d
testq %r10, %r10
je 0x72a2
cmpq $0x0, (%r10)
jne 0x72d0
leaq 0x70(%rbx), %rdi
leaq 0x10(%rsp), %rdx
movq %rdi, (%rdx)
leaq 0x8(%rsp), %r14
movq %r14, %rsi
callq 0x81de
movq (%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x72f6
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movl $0x8, %edi
callq 0x2100
leaq 0x4399(%rip), %rcx      # 0xb67a
movq %rcx, (%rax)
movq 0x8cc5(%rip), %rsi      # 0xffb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x2420
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::remove(SAHap::Read*)
void Haplotype::remove(Read * r) {
	if (this->reads.find(r) == this->reads.end()) {
		cout << "Offending read is " << r << endl;
		// cout << "Offending read has #sites=" << r->sites.size();
		throw "Haplotype does not contain read";
	}

	this->reads.erase(r);
	this->vote(*r, true);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsi, (%rsp)
movq 0x70(%rdi), %rdi
movq 0x78(%rbx), %r8
xorl %r10d, %r10d
movq %rsi, %rax
xorl %edx, %edx
divq %r8
movq (%rdi,%rdx,8), %rax
testq %rax, %rax
je 0x73b9
movq (%rax), %r9
movq %rax, %r10
cmpq %rsi, 0x8(%r9)
je 0x73b9
movq %rdx, %rcx
movq %r9, %r11
movq (%r9), %r9
testq %r9, %r9
je 0x73b6
movq 0x8(%r9), %rdi
movq %rdi, %rax
xorl %edx, %edx
divq %r8
movl $0x0, %r10d
cmpq %rcx, %rdx
jne 0x73b9
movq %r11, %r10
cmpq %rsi, %rdi
jne 0x738a
jmp 0x73b9
xorl %r10d, %r10d
testq %r10, %r10
je 0x73eb
cmpq $0x0, (%r10)
je 0x73eb
leaq 0x70(%rbx), %rdi
movq %rsp, %r14
movq %r14, %rsi
callq 0x84a4
movq (%r14), %rsi
movq %rbx, %rdi
movl $0x1, %edx
callq 0x72f6
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x8bd6(%rip), %rdi      # 0xffc8
leaq 0x42a1(%rip), %rsi      # 0xb69a
callq 0x2260
movq (%rsp), %rsi
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
callq 0x20f0
movl $0x8, %edi
callq 0x2100
leaq 0x428a(%rip), %rcx      # 0xb6ad
movq %rcx, (%rax)
movq 0x8b83(%rip), %rsi      # 0xffb0
movq %rax, %rdi
xorl %edx, %edx
callq 0x2420
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::randomRead()
Read * Haplotype::randomRead() {
	long int seed = GetFancySeed(true);
	cout << "Haplotype seed " << seed << endl;
	mt19937 engine(seed);

	return this->randomRead(engine);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1390, %rsp           # imm = 0x1390
movq %rdi, %rbx
movl $0x1, %edi
callq 0xaac0
movq %rax, %r14
movq 0x8b6d(%rip), %r15      # 0xffc8
leaq 0x426b(%rip), %rsi      # 0xb6cd
movl $0xf, %edx
movq %r15, %rdi
callq 0x22b0
movq %r15, %rdi
movq %r14, %rsi
callq 0x2240
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x2250
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x21a0
movl %r14d, %eax
movq %rax, 0x8(%rsp)
movl $0x1, %ecx
movq %rax, %rdx
shrq $0x1e, %rdx
xorl %eax, %edx
imull $0x6c078965, %edx, %eax # imm = 0x6C078965
addl %ecx, %eax
movq %rax, 0x8(%rsp,%rcx,8)
incq %rcx
cmpq $0x270, %rcx            # imm = 0x270
jne 0x74b1
leaq 0x8(%rsp), %rsi
movq $0x270, 0x1380(%rsi) # imm = 0x270
movq %rbx, %rdi
callq 0x74f8
addq $0x1390, %rsp           # imm = 0x1390
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::subtractMECValuesAt(unsigned long)
void Haplotype::subtractMECValuesAt(dnapos_t pos) {
	for (unsigned i = 0; i < ploidyCount; i++) {
		if ((int)i == solution[pos])
			continue;
		auto mec = weights[pos][i];
		total_mec -= mec;
		assert(total_mec>=0);

		if (isInRangeOf(window, pos))
			window_mec -= mec;
		if(window_mec < 0 && window_mec > -SMALL_ENOUGH_TO_IGNORE) window_mec = 0;
		assert(window_mec>=0);

		if(siteCoverages[i]) isitecost -= -log_poisson_1_cdf(READ_ERROR_RATE * siteCoverages[i], mec);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x68(%rdi)
je 0x7662
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq (%rsi,%rsi,2), %r12
xorpd %xmm2, %xmm2
movq (%r14), %rax
movl (%rax,%rbx,4), %eax
cmpq %rax, %r15
je 0x7652
movq 0x20(%r14), %rax
movq (%rax,%r12,8), %rax
movl (%rax,%r15,4), %edi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movsd 0x50(%r14), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x50(%r14)
ucomisd %xmm2, %xmm1
jb 0x766e
cmpq %rbx, 0xe0(%r14)
ja 0x75d9
cmpq %rbx, 0xe8(%r14)
jb 0x75d9
movsd 0x58(%r14), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x58(%r14)
movsd 0x58(%r14), %xmm0
ucomisd %xmm0, %xmm2
jbe 0x75f7
ucomisd 0x3ff3(%rip), %xmm0     # 0xb5e0
jbe 0x75f7
movq $0x0, 0x58(%r14)
movsd 0x58(%r14), %xmm0
ucomisd %xmm2, %xmm0
jb 0x768d
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x7652
movq %rax, %xmm1
punpckldq 0x3a9f(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x3aa7(%rip), %xmm1     # 0xb0d0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x39db(%rip), %xmm0     # 0xb018
callq 0xa9ba
xorpd %xmm2, %xmm2
addsd 0x60(%r14), %xmm0
movsd %xmm0, 0x60(%r14)
incq %r15
movl 0x68(%r14), %eax
cmpq %rax, %r15
jb 0x757b
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x4068(%rip), %rdi      # 0xb6dd
leaq 0x3f71(%rip), %rsi      # 0xb5ed
leaq 0x4067(%rip), %rcx      # 0xb6ea
movl $0xdd, %edx
callq 0x2180
leaq 0x3fb3(%rip), %rdi      # 0xb647
leaq 0x3f52(%rip), %rsi      # 0xb5ed
leaq 0x4048(%rip), %rcx      # 0xb6ea
movl $0xe2, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::addMECValuesAt(unsigned long)
void Haplotype::addMECValuesAt(dnapos_t pos) {
	for (unsigned i = 0; i < ploidyCount; i++) {
		if ((int)i == solution[pos])
			continue;
		auto mec = weights[pos][i];
		total_mec += mec;

		if (isInRangeOf(window, pos))
			window_mec += mec;
		if(window_mec < 0 && window_mec > -SMALL_ENOUGH_TO_IGNORE) window_mec = 0;
		assert(window_mec>=0);

		if(siteCoverages[i]) isitecost += -log_poisson_1_cdf(READ_ERROR_RATE * siteCoverages[i], mec);
	}
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
cmpl $0x0, 0x68(%rdi)
je 0x77ab
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
leaq (%rsi,%rsi,2), %r12
xorpd %xmm2, %xmm2
movq (%r14), %rax
movl (%rax,%rbx,4), %eax
cmpq %rax, %r15
je 0x779b
movq 0x20(%r14), %rax
movq 0xe0(%r14), %rcx
movq (%rax,%r12,8), %rax
movl (%rax,%r15,4), %edi
xorps %xmm0, %xmm0
cvtsi2sd %edi, %xmm0
movsd 0x50(%r14), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x50(%r14)
cmpq %rbx, %rcx
ja 0x7722
cmpq %rbx, 0xe8(%r14)
jb 0x7722
addsd 0x58(%r14), %xmm0
movsd %xmm0, 0x58(%r14)
movsd 0x58(%r14), %xmm0
ucomisd %xmm0, %xmm2
jbe 0x7740
ucomisd 0x3eaa(%rip), %xmm0     # 0xb5e0
jbe 0x7740
movq $0x0, 0x58(%r14)
movsd 0x58(%r14), %xmm0
ucomisd %xmm2, %xmm0
jb 0x77b7
movq 0x38(%r14), %rax
movq (%rax,%r15,8), %rax
testq %rax, %rax
je 0x779b
movq %rax, %xmm1
punpckldq 0x395a(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x3962(%rip), %xmm1     # 0xb0d0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
mulsd 0x3896(%rip), %xmm0     # 0xb018
callq 0xa9ba
xorpd %xmm2, %xmm2
movsd 0x60(%r14), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, 0x60(%r14)
incq %r15
movl 0x68(%r14), %eax
cmpq %rax, %r15
jb 0x76cf
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x3e89(%rip), %rdi      # 0xb647
leaq 0x3e28(%rip), %rsi      # 0xb5ed
leaq 0x3f53(%rip), %rcx      # 0xb71f
movl $0xf2, %edx
callq 0x2180
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::addSite(SAHap::Site const&)
void Haplotype::addSite(const Site &s) {
	weights[s.pos][s.value] += s.weight;

	if (s.value != solution[s.pos] && weights[s.pos][s.value] > weights[s.pos][solution[s.pos]])
		solution[s.pos] = s.value;
	
	siteCoverages[s.pos]++;
}

// Assembly:
movl 0x10(%rsi), %ecx
movq 0x8(%rsi), %rax
movq 0x20(%rdi), %rdx
leaq (%rax,%rax,2), %r8
movslq (%rsi), %r9
movq (%rdx,%r8,8), %r8
addl %ecx, (%r8,%r9,4)
movl (%rsi), %ecx
movq (%rdi), %rdx
movslq (%rdx,%rax,4), %rsi
cmpl %esi, %ecx
je 0x780d
movslq %ecx, %r9
movl (%r8,%r9,4), %r9d
cmpl (%r8,%rsi,4), %r9d
jle 0x780d
movl %ecx, (%rdx,%rax,4)
movq 0x38(%rdi), %rcx
incq (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::Haplotype::removeSite(SAHap::Site const&)
void Haplotype::removeSite(const Site &s) {
	weights[s.pos][s.value] -= s.weight;

	if (solution[s.pos] == s.value)
		findSolution(s.pos);

	siteCoverages[s.pos]--;
}

// Assembly:
movl 0x10(%rsi), %edx
movq 0x8(%rsi), %rax
movq 0x20(%rdi), %rcx
leaq (%rax,%rax,2), %r8
movslq (%rsi), %r9
movq (%rcx,%r8,8), %rcx
subl %edx, (%rcx,%r9,4)
movq (%rdi), %rdx
movl (%rdx,%rax,4), %r8d
cmpl (%rsi), %r8d
jne 0x7861
cmpl $0x0, 0x68(%rdi)
je 0x7861
xorl %esi, %esi
movl (%rcx,%rsi,4), %r8d
movslq (%rdx,%rax,4), %r9
cmpl (%rcx,%r9,4), %r8d
jle 0x7855
movl %esi, (%rdx,%rax,4)
incq %rsi
movl 0x68(%rdi), %r8d
cmpq %r8, %rsi
jb 0x7844
movq 0x38(%rdi), %rcx
decq (%rcx,%rax,8)
retq
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/Haplotype.cpp
// Function: SAHap::operator<<(std::ostream&, SAHap::Haplotype&)
ostream & operator << (ostream& stream, Haplotype& ch) {
	stream << "ch[";
	stream << "m=" << ch.length << ", ";
	stream << "n=" << ch.reads.size() << ", ";
	stream << "mec=" << ch.mec() << "] ";
	for (dnapos_t i = 0; i < ch.size(); ++i) {
		stream << ch.solution[i];
	}
	return stream;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x3e5d(%rip), %rsi      # 0xb787
movl $0x3, %edx
callq 0x22b0
leaq 0x3e50(%rip), %rsi      # 0xb78b
movl $0x2, %edx
movq %rbx, %rdi
callq 0x22b0
movq 0x18(%r14), %rsi
movq %rbx, %rdi
callq 0x2190
leaq 0x3c31(%rip), %r15      # 0xb58c
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x22b0
leaq 0x3e1c(%rip), %rsi      # 0xb78e
movl $0x2, %edx
movq %rbx, %rdi
callq 0x22b0
movq 0x88(%r14), %rsi
movq %rbx, %rdi
callq 0x2190
movl $0x2, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x22b0
leaq 0x3dec(%rip), %rsi      # 0xb791
movl $0x4, %edx
movq %rbx, %rdi
callq 0x22b0
movsd 0x50(%r14), %xmm0
movq %rbx, %rdi
callq 0x23d0
leaq 0x3dcf(%rip), %rsi      # 0xb796
movl $0x2, %edx
movq %rax, %rdi
callq 0x22b0
cmpq $0x0, 0x18(%r14)
je 0x79f6
xorl %r15d, %r15d
movq (%r14), %rax
movl (%rax,%r15,4), %esi
movq %rbx, %rdi
callq 0x2430
incq %r15
cmpq 0x18(%r14), %r15
jb 0x79de
movq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O1/waynebhayes[P]SAHap/src/InputReader.cpp
// Function: SAHap::WIFInputReader::getPloidy(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
dnacnt_t WIFInputReader::getPloidy(string line) {
	int result = 0;
	istringstream iss(line);
	string buf;
	while (getline(iss, buf, ':')) {
		istringstream siss(buf);
		char a;
		siss >> a;
		if (a == '#') break;

		int throwaway;

		istringstream onesite(buf);
		onesite >> throwaway;

		onesite.ignore(256, ' ');
		onesite.ignore(256, ' ');

		int weight, value;
		onesite >> value >> weight;
		result = max(result,value);

	}
	return result;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x4b8, %rsp            # imm = 0x4B8
movq %rdi, %rsi
leaq 0x38(%rsp), %rdi
movl $0x8, %edx
callq 0x2400
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %ebx, %ebx
leaq 0x10(%rsp), %r12
leaq 0x338(%rsp), %r13
movq 0x7715(%rip), %r14      # 0xffc0
leaq 0x1b8(%rsp), %r15
leaq 0x38(%rsp), %rdi
movq %r12, %rsi
movl $0x3a, %edx
callq 0x2480
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x899d
movq %r13, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x2400
movq %r13, %rdi
leaq 0xb(%rsp), %rsi
callq 0x22f0
movb 0xb(%rsp), %bpl
cmpb $0x23, %bpl
je 0x897b
movq %r15, %rdi
movq %r12, %rsi
movl $0x8, %edx
callq 0x2400
movq %r15, %rdi
leaq 0x34(%rsp), %rsi
callq 0x2150
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movl $0x20, %edx
callq 0x2170
movl $0x100, %esi            # imm = 0x100
movq %r15, %rdi
movl $0x20, %edx
callq 0x2170
movq %r15, %rdi
leaq 0xc(%rsp), %rsi
callq 0x2150
movq %rax, %rdi
leaq 0x30(%rsp), %rsi
callq 0x2150
movl 0xc(%rsp), %eax
cmpl %eax, %ebx
cmovlel %eax, %ebx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2340
leaq 0x230(%rsp), %rdi
callq 0x20b0
movq %r13, %rdi
movq %r14, %rsi
callq 0x2340
leaq 0x3b0(%rsp), %rdi
callq 0x20b0
cmpb $0x23, %bpl
jne 0x88b3
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x89b9
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
movl %ebx, %ebx
movq 0x75fe(%rip), %rsi      # 0xffc0
leaq 0x38(%rsp), %rdi
callq 0x2340
leaq 0xb0(%rsp), %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x4b8, %rsp            # imm = 0x4B8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x89f2
jmp 0x89fe
movq %rax, %rbx
jmp 0x8a22
jmp 0x89f9
movq %rax, %rbx
jmp 0x8a43
movq %rax, %rbx
movq 0x75b8(%rip), %rsi      # 0xffc0
leaq 0x1b8(%rsp), %rdi
callq 0x2340
leaq 0x230(%rsp), %rdi
callq 0x20b0
movq 0x7597(%rip), %rsi      # 0xffc0
leaq 0x338(%rsp), %rdi
callq 0x2340
leaq 0x3b0(%rsp), %rdi
callq 0x20b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x8a5f
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x2290
movq 0x755a(%rip), %rsi      # 0xffc0
leaq 0x38(%rsp), %rdi
callq 0x2340
leaq 0xb0(%rsp), %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x2450
nop