LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_alloc_(Pool_Allocator*, unsigned long)
void *pool_alloc_(Pool_Allocator *pool, u64 size)
{
    if(!pool->current_block)
    {
        assert(pool->new_block_size > 0);
        
        Block_Header *block = pool_get_block(pool, 0);
        pool->current_block = block;
        pool->current_point = block->memory;
        pool->current_end = block->memory - sizeof(Block_Header) + block->size;
    }
    
    assert(pool->current_block && pool->current_point && pool->current_end);
    
    u64 available_space = pool->current_end - pool->current_point;
    
    if(size > available_space)
    {
        // Retire the old block
        pool->current_block->next = pool->used_blocks;
        pool->used_blocks = pool->current_block;
        pool->mark += available_space;
        
        // Get a new block
        u64 min_size = size + sizeof(Block_Header);
        
        Block_Header *block = pool_get_block(pool, min_size);
        pool->current_block = block;
        pool->current_point = block->memory;
        pool->current_end = block->memory - sizeof(Block_Header) + block->size;
        
        available_space = pool->current_end - pool->current_point;
    }
    
    assert(size <= available_space);
    
    byte *result = pool->current_point;
    uintptr_t unaligned_point = (uintptr_t)(pool->current_point + size);
    pool->current_point = (byte*)((unaligned_point + 7) & (~7));
    
    pool->mark += (pool->current_point - result);
    
    return (void*)result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rcx
testq %rcx, %rcx
je 0x964b
movq 0x8(%rbx), %rax
testq %rax, %rax
jne 0x9679
jmp 0x96f0
cmpq $0x0, 0x30(%rbx)
je 0x972e
movq %rbx, %rdi
xorl %esi, %esi
callq 0x974d
movq %rax, %rcx
movq %rax, (%rbx)
addq $0x10, %rax
movq %rax, 0x8(%rbx)
movq %rcx, %rdx
addq 0x8(%rcx), %rdx
movq %rdx, 0x10(%rbx)
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x96f0
subq %rax, %rdx
cmpq %r14, %rdx
jae 0x96c5
movq 0x20(%rbx), %rax
movq %rax, (%rcx)
movq (%rbx), %rax
movq %rax, 0x20(%rbx)
addq %rdx, 0x18(%rbx)
leaq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x974d
movq %rax, %rcx
movq %rax, (%rbx)
addq $0x10, %rax
movq %rax, 0x8(%rbx)
movq 0x8(%rcx), %rdx
addq %rdx, %rcx
movq %rcx, 0x10(%rbx)
addq $-0x10, %rdx
cmpq %r14, %rdx
jb 0x970f
leaq (%rax,%r14), %rcx
addq $0x7, %rcx
andq $-0x8, %rcx
movq %rcx, 0x8(%rbx)
movq 0x18(%rbx), %rdx
subq %rax, %rdx
addq %rcx, %rdx
movq %rdx, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7c35(%rip), %rdi      # 0x1132c
leaq 0x7b95(%rip), %rsi      # 0x11293
leaq 0x7bfe(%rip), %rcx      # 0x11303
movl $0x74, %edx
callq 0x3080
leaq 0x7c56(%rip), %rdi      # 0x1136c
leaq 0x7b76(%rip), %rsi      # 0x11293
leaq 0x7bdf(%rip), %rcx      # 0x11303
movl $0x8a, %edx
callq 0x3080
leaq 0x7bb5(%rip), %rdi      # 0x112ea
leaq 0x7b57(%rip), %rsi      # 0x11293
leaq 0x7bc0(%rip), %rcx      # 0x11303
movl $0x6c, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_get_block(Pool_Allocator*, unsigned long)
internal
Block_Header* pool_get_block(Pool_Allocator *pool, u64 min_size)
{
    if(pool->free_blocks)
    {
        Block_Header *prev_block = nullptr;
        Block_Header *block = pool->free_blocks;
        while(block && block->size < min_size)
        {
            prev_block = block;
            block = block->next;
        }
        if(block)
        {
            if(prev_block)
            {
                prev_block->next = block->next;
            }
            else
            {
                pool->free_blocks = block->next;
            }
            
            block->next = nullptr;
            return block;
        }
    }
    u64 alloc_size = min_size;
    if(alloc_size < pool->new_block_size)
    {
        alloc_size = pool->new_block_size;
    }
    return allocate_block(alloc_size);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq 0x28(%rdi), %rbx
testq %rbx, %rbx
je 0x9776
cmpq %r14, 0x8(%rbx)
jae 0x97c4
movq %rbx, %rax
movq (%rbx), %rbx
testq %rbx, %rbx
je 0x9776
cmpq %r14, 0x8(%rbx)
jb 0x9763
jmp 0x97c6
movq 0x30(%rdi), %rax
cmpq %r14, %rax
cmovaq %rax, %r14
leaq 0x8903(%rip), %rdi      # 0x1208b
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x416b
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x3110
cmpq $-0x1, %rax
je 0x97de
movq $0x0, (%rax)
movq %r14, 0x8(%rax)
movq %rax, %rbx
jmp 0x97de
xorl %eax, %eax
addq $0x28, %rdi
testq %rax, %rax
movq (%rbx), %rcx
cmovneq %rax, %rdi
movq %rcx, (%rdi)
movq $0x0, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_resize_(Pool_Allocator*, void*, unsigned long, unsigned long)
void *pool_resize_(Pool_Allocator *pool, void *old_ptr, u64 old_size, u64 new_size)
{
    byte *old_memory = (byte*)old_ptr;
    uintptr_t unaligned_point = (uintptr_t)(old_memory + old_size);
    byte *old_end = (byte*)((unaligned_point + 7) & (~7));
    if(old_end == pool->current_point)
    {
        u64 real_old_size = old_end - old_memory;
        pool->current_point = old_memory;
        pool->mark -= real_old_size;
        
        byte *new_memory = (byte*)pool_alloc_(pool, new_size);
        if(new_memory != old_memory)
        {
            copy_memory(new_memory, old_memory, old_size);
#ifdef USE_DEBUG_MEMORY_PATTERN
            fill_memory(old_memory, MEMORY_PATTERN, old_size);
#endif
        }
        return (void*)new_memory;
    }
    else if(new_size == 0)
    {
        return nullptr;
    }
    else
    {
        byte *new_memory = (byte*)pool_alloc_(pool, new_size);
        copy_memory(new_memory, old_memory, old_size);
        return (void*)new_memory;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
leaq (%rsi,%rdx), %rax
addq $0x7, %rax
andq $-0x8, %rax
cmpq %rax, 0x8(%rdi)
je 0x9814
testq %rcx, %rcx
je 0x9844
movq %rcx, %rsi
callq 0x962b
jmp 0x982f
movq %r14, %rdx
subq %rax, %rdx
movq %r14, 0x8(%rdi)
addq %rdx, 0x18(%rdi)
movq %rcx, %rsi
callq 0x962b
cmpq %r14, %rax
je 0x9846
movq %rax, %rdi
movq %r14, %rsi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x30a0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_release(Pool_Allocator*)
void pool_release(Pool_Allocator *pool)
{
    if(pool->current_block)
    {
        deallocate_blocks(pool->current_block);
        pool->current_block = nullptr;
    }
    if(pool->used_blocks)
    {
        deallocate_blocks(pool->used_blocks);
        pool->used_blocks = nullptr;
    }
    if(pool->free_blocks)
    {
        deallocate_blocks(pool->free_blocks);
        pool->free_blocks = nullptr;
    }
    
    pool->current_point = nullptr;
    pool->current_end = nullptr;
    pool->mark = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x98bc
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
callq 0x3070
movq %r14, %rdi
testq %r14, %r14
jne 0x98a1
movq $0x0, (%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x98e1
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
callq 0x3070
movq %r14, %rdi
testq %r14, %r14
jne 0x98c5
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x9906
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
callq 0x3070
movq %r14, %rdi
testq %r14, %r14
jne 0x98ea
movq $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.cpp
// Function: scope_find(Hashed_Scope*, Atom, unsigned long, unsigned long, bool)
Expr_AST *scope_find(Hashed_Scope *hs, Atom key, u64 scope_index, u64 hash, bool recurse)
{
    do
    {
        Scope_Entry *entry = set_find(&hs->entry_set, key, hash);
        if(entry && scope_index >= entry->index)
        {
            return entry->definition;
        }
        else
        {
            scope_index = hs->index_in_parent;
            hs = hs->parent_scope;
        }
    }
    while(hs && recurse);
    return nullptr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %r12
xorl %ebx, %ebx
leaq 0x10(%r12), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xf204
movq 0x20(%r12), %rcx
cmpq $0x0, (%rcx,%rax,8)
je 0x9a54
movq 0x28(%r12), %rcx
testq %rcx, %rcx
je 0x9a54
leaq (%rax,%rax,2), %rax
cmpq 0x8(%rcx,%rax,8), %r13
jae 0x9a6c
movq (%r12), %rax
testq %rax, %rax
je 0x9a74
movq 0x8(%r12), %r13
movq %rax, %r12
testb %bpl, %bpl
jne 0x9a23
jmp 0x9a74
leaq (%rcx,%rax,8), %rax
movq 0x10(%rax), %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.cpp
// Function: atomize_string(Atom_Table*, Array<char>)
Atom atomize_string(Atom_Table *at, String str)
{
    u64 hash = fnv1a_64(str);
    
    u64 slot = set_find_slot(&at->atom_set, str, hash);
    if(at->atom_set.hashes[slot] == 0)
    {
        String *new_str = pool_alloc(String, &at->atom_pool);
        assert(new_str);
        new_str->count = str.count;
        new_str->data = pool_alloc(byte, str.count, &at->atom_pool);
        copy_memory(new_str->data, str.data, str.count);
        
        Atom result = {new_str};
        set_insert_into_slot(&at->atom_set, slot, hash, result);
        
        return result;
    }
    else
    {
        return at->atom_set.entries[slot];
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movabsq $-0x340d631b7bdddcdb, %rcx # imm = 0xCBF29CE484222325
testq %rsi, %rsi
je 0x9ace
xorl %eax, %eax
movabsq $0x100000001b3, %rdx    # imm = 0x100000001B3
movsbq (%r15,%rax), %r12
xorq %rcx, %r12
imulq %rdx, %r12
incq %rax
movq %r12, %rcx
cmpq %rax, %r14
jne 0x9ab5
jmp 0x9ad1
movq %rcx, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xea7a
movq %rax, %r13
movq 0x10(%rbx), %rax
cmpq $0x0, (%rax,%r13,8)
je 0x9afa
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rbp
jmp 0x9b41
leaq 0x20(%rbx), %rdi
movq %rdi, (%rsp)
movl $0x10, %esi
callq 0x962b
movq %rax, %rbp
movq %r14, (%rax)
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x962b
movq %rax, 0x8(%rbp)
movq %rax, %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0x30a0
movq %rbx, %rdi
movq %r13, %rsi
movq %r12, %rdx
movq %rbp, %rcx
callq 0xeae9
movq %rbp, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/stb/stb_sprintf.h
// Function: stbsp_vsnprintf
STBSP__PUBLICDEF int STB_SPRINTF_DECORATE( vsnprintf )( char * buf, int count, char const * fmt, va_list va )
{
  stbsp__context c;
  int l;

  if ( count == 0 )
    return 0;

  c.buf = buf;
  c.count = count;

  STB_SPRINTF_DECORATE( vsprintfcb )( stbsp__clamp_callback, &c, stbsp__clamp_callback(0,&c,0), fmt, va );
  
  // zero-terminate
  l = (int)( c.buf - buf );
  if ( l >= count ) // should never be greater, only equal (or less) than count
    l = count - 1;
  buf[l] = 0;

  return l;
}

// Assembly:
testl %esi, %esi
je 0xc8a9
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rcx, %r8
movq %rdx, %rcx
movl %esi, %r14d
movq %rdi, %rbx
movq %rdi, (%rsp)
movl %esi, 0x8(%rsp)
movl %esi, %edx
sarl $0x1f, %edx
movq %rdi, %rax
andl %esi, %edx
je 0xc85d
movslq %edx, %rax
movq %rax, (%rsp)
movl %r14d, %esi
subl %eax, %esi
movl %esi, 0x8(%rsp)
cmpl $0x200, %esi            # imm = 0x200
leaq 0xc(%rsp), %rdi
cmovaeq %rax, %rdi
xorl %edx, %edx
testl %esi, %esi
cmovgq %rdi, %rdx
leaq 0x31(%rip), %rdi        # 0xc8ac
movq %rsp, %r15
movq %r15, %rsi
callq 0xa229
movl (%r15), %ecx
subl %ebx, %ecx
leal -0x1(%r14), %eax
cmpl %r14d, %ecx
cmovll %ecx, %eax
movslq %eax, %rcx
movb $0x0, (%rbx,%rcx)
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/stb/stb_sprintf.h
// Function: stbsp__clamp_callback(char*, void*, int)
static char * stbsp__clamp_callback( char * buf, void * user, int len )
{
  stbsp__context * c = (stbsp__context*)user;

  if ( len > c->count ) len = c->count;

  if (len)
  {
    if ( buf != c->buf )
    {
      char * s, * d, * se;
      d = c->buf; s = buf; se = buf+len;
      do{ *d++ = *s++; } while (s<se);
    }
    c->buf += len;
    c->count -= len;
  }
  
  if ( c->count <= 0 ) return 0;
  return ( c->count >= STB_SPRINTF_MIN ) ? c->buf : c->tmp; // go direct into buffer if you can
}

// Assembly:
movq %rsi, %rax
movl 0x8(%rsi), %ecx
cmpl %edx, %ecx
cmovll %ecx, %edx
testl %edx, %edx
je 0xc8ec
movq (%rax), %rsi
movslq %edx, %r8
cmpq %rdi, %rsi
je 0xc8e1
leaq (%rdi,%r8), %rcx
movb (%rdi), %r9b
incq %rdi
movb %r9b, (%rsi)
incq %rsi
cmpq %rcx, %rdi
jb 0xc8ca
movq (%rax), %rsi
movl 0x8(%rax), %ecx
addq %r8, %rsi
movq %rsi, (%rax)
subl %edx, %ecx
movl %ecx, 0x8(%rax)
testl %ecx, %ecx
jle 0xc8fc
cmpl $0x200, %ecx            # imm = 0x200
jb 0xc8ff
movq (%rax), %rax
retq
xorl %eax, %eax
retq
addq $0xc, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/basic.h
// Function: void array_add<Decl_AST*>(Dynamic_Array<Decl_AST*>*, Decl_AST*, Allocator)
void array_add(Dynamic_Array<T> *arr, T element, Allocator a)
{
    if(arr->count == arr->allocated)
    {
        u64 new_size = 4 * arr->allocated;
        if(new_size == 0)
        {
            new_size = 4;
        }
        array_resize(arr, new_size, a);
    }
    
    (*arr)[arr->count] = element;
    ++arr->count;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdi), %rax
cmpq 0x10(%rdi), %rax
jne 0xe793
shlq $0x2, %rax
testq %rax, %rax
movl $0x4, %esi
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0xf10a
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
movq %r14, (%rcx,%rax,8)
incq (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.h
// Function: void init_hash_set<Scope_Entry, Atom, &get_key(Scope_Entry&), &compute_hash64(Atom), &operator==(Atom, Atom)>(Hash_Set<Scope_Entry, Atom, &get_key(Scope_Entry&), &compute_hash64(Atom), &operator==(Atom, Atom)>*, unsigned long)
void init_hash_set(Hash_Set<T,K,GK,H,Eq> *hs, u64 initial_size)
{
    hs->set_size = initial_size;
    hs->count = 0;
    
    if(initial_size > 0)
    {
        // TODO: could replace with SOA allocation
        hs->hashes = mem_alloc(u64, initial_size);
        hs->entries = mem_alloc(T, initial_size);
        
        assert(hs->hashes);
        assert(hs->entries);
        
        zero_memory(hs->hashes, initial_size);
    }
    else
    {
        hs->hashes = nullptr;
        hs->entries = nullptr;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
movq %rsi, (%rdi)
movq $0x0, 0x8(%rdi)
testq %rsi, %rsi
je 0xe818
movq %rsi, %rbx
shlq $0x3, %rbx
movq 0x73a5(%rip), %rdi      # 0x15b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq *0x738e(%rip)           # 0x15b68
movq %rax, 0x10(%r14)
leaq (%rbx,%rbx,2), %r8
movq 0x7387(%rip), %rdi      # 0x15b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *0x7373(%rip)           # 0x15b68
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xe828
testq %rax, %rax
je 0xe847
xorl %esi, %esi
movq %rbx, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3060
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x39b3(%rip), %rdi      # 0x121e2
leaq 0x39b7(%rip), %rsi      # 0x121ed
leaq 0x39bc(%rip), %rcx      # 0x121f9
movl $0x6d, %edx
callq 0x3080
leaq 0x3a32(%rip), %rdi      # 0x12280
leaq 0x3998(%rip), %rsi      # 0x121ed
leaq 0x399d(%rip), %rcx      # 0x121f9
movl $0x6e, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.h
// Function: bool set_insert<Scope_Entry, Atom, &get_key(Scope_Entry&), &compute_hash64(Atom), &operator==(Atom, Atom)>(Hash_Set<Scope_Entry, Atom, &get_key(Scope_Entry&), &compute_hash64(Atom), &operator==(Atom, Atom)>*, Scope_Entry, unsigned long)
bool set_insert(Hash_Set<T,K,GK,H,Eq> *hs, T entry, u64 hash)
{
    u64 slot = set_find_slot(hs, GK(entry), hash);
    if(hs->hashes[slot] == 0)
    {
        set_insert_into_slot(hs, slot, hash, entry);
        return true;
    }
    else
    {
        return false;
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x20(%rsp), %rsi
movq %r14, %rdx
callq 0xf204
movq 0x10(%rbx), %rcx
movq (%rcx,%rax,8), %r15
testq %r15, %r15
jne 0xe8e0
leaq 0x20(%rsp), %rdx
cmpq $0x1, %r14
adcq $0x0, %r14
movq %r14, (%rcx,%rax,8)
movq 0x18(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movq 0x10(%rdx), %rsi
movq %rsi, 0x10(%rcx,%rax,8)
movups (%rdx), %xmm0
movups %xmm0, (%rcx,%rax,8)
movq (%rbx), %rsi
movq 0x8(%rbx), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rbx)
leaq 0x4(,%rax,4), %rax
leaq (%rsi,%rsi,2), %rcx
cmpq %rcx, %rax
jbe 0xe8e0
shlq $0x2, %rsi
movq %rbx, %rdi
callq 0xe8ec
testq %r15, %r15
sete %al
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.h
// Function: void set_resize<Scope_Entry, Atom, &get_key(Scope_Entry&), &compute_hash64(Atom), &operator==(Atom, Atom)>(Hash_Set<Scope_Entry, Atom, &get_key(Scope_Entry&), &compute_hash64(Atom), &operator==(Atom, Atom)>*, unsigned long)
void set_resize(Hash_Set<T,K,GK,H,Eq> *hs, u64 new_size)
{
    assert(new_size >= hs->count);
    
    u64 old_size = hs->set_size;
    u64 *old_hashes = hs->hashes;
    T *old_entries = hs->entries;
    
    init_hash_set(hs, new_size);
    
    for(u64 i = 0; i < old_size; ++i)
    {
        if(old_hashes[i] != 0)
        {
            set_insert(hs, old_entries[i], old_hashes[i]);
        }
    }
    
    mem_dealloc(old_hashes, old_size);
    mem_dealloc(old_entries, old_size);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
cmpq %rsi, 0x8(%rdi)
ja 0xe99c
movq %rdi, %r12
movq (%rdi), %r14
movq 0x10(%rdi), %r15
movq 0x18(%rdi), %rbx
callq 0xe7a6
testq %r14, %r14
je 0xe950
xorl %r13d, %r13d
movq %rbx, %rbp
movq (%r15,%r13,8), %rsi
testq %rsi, %rsi
je 0xe944
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movups (%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r12, %rdi
callq 0xe866
incq %r13
addq $0x18, %rbp
cmpq %r13, %r14
jne 0xe922
shlq $0x3, %r14
movq 0x7215(%rip), %rdi      # 0x15b70
movl $0x2, %esi
movq %r15, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq *0x71f9(%rip)           # 0x15b68
leaq (%r14,%r14,2), %rcx
movq 0x71ee(%rip), %rax      # 0x15b68
movq 0x71ef(%rip), %rdi      # 0x15b70
movl $0x2, %esi
movq %rbx, %rdx
xorl %r8d, %r8d
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmpq *%rax
leaq 0x38e9(%rip), %rdi      # 0x1228c
leaq 0x3843(%rip), %rsi      # 0x121ed
leaq 0x38f1(%rip), %rcx      # 0x122a2
movl $0x91, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.h
// Function: unsigned long set_find_slot<Atom, Array<char>, &get_str(Atom&), &fnv1a_64(Array<char>), &bool operator==<char>(Array<Atom>, Array<Atom>)>(Hash_Set<Atom, Array<char>, &get_str(Atom&), &fnv1a_64(Array<char>), &bool operator==<char>(Array<Atom>, Array<Atom>)>*, Array<char>, unsigned long)
u64 set_find_slot(Hash_Set<T,K,GK,H,Eq> *hs, K key, u64 hash)
{
    if(hash == 0)
    {
        hash = 1;
    }
    
    u64 mask = hs->set_size - 1;
    u64 idx = hash & mask;
    u64 inc = 0;
    
    while(true)
    {
        if(hs->hashes[idx] == 0)
        {
            return idx;
        }
        else if(hs->hashes[idx] == hash && Eq(GK(hs->entries[idx]), key))
        {
            return idx;
        }
        else
        {
            ++inc;
            idx = (idx + inc) & mask;
        }
    }
}

// Assembly:
pushq %rbp
pushq %rbx
cmpq $0x1, %rcx
adcq $0x0, %rcx
movq (%rdi), %r8
movq 0x10(%rdi), %r9
decq %r8
movq %rcx, %rax
andq %r8, %rax
movq (%r9,%rax,8), %r11
testq %r11, %r11
je 0xeae6
xorl %r10d, %r10d
cmpq %rcx, %r11
jne 0xead1
movq 0x18(%rdi), %r11
movq (%r11,%rax,8), %r11
cmpq %rsi, (%r11)
jne 0xead1
testq %rsi, %rsi
je 0xeae6
movq 0x8(%r11), %r11
xorl %ebx, %ebx
movb (%r11,%rbx), %bpl
cmpb (%rdx,%rbx), %bpl
jne 0xead1
incq %rbx
cmpq %rbx, %rsi
jne 0xeabd
jmp 0xeae6
addq %r10, %rax
incq %rax
incq %r10
andq %r8, %rax
movq (%r9,%rax,8), %r11
testq %r11, %r11
jne 0xeaa0
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/scope.h
// Function: void set_insert_into_slot<Atom, Array<char>, &get_str(Atom&), &fnv1a_64(Array<char>), &bool operator==<char>(Array<Atom>, Array<Atom>)>(Hash_Set<Atom, Array<char>, &get_str(Atom&), &fnv1a_64(Array<char>), &bool operator==<char>(Array<Atom>, Array<Atom>)>*, unsigned long, unsigned long, Atom)
void set_insert_into_slot(Hash_Set<T,K,GK,H,Eq> *hs, u64 slot, u64 hash, T entry)
{
    if(hash == 0)
    {
        hash = 1;
    }
    hs->hashes[slot] = hash;
    hs->entries[slot] = entry;
    ++hs->count;
    if(4*hs->count > 3*hs->set_size)
    {
        set_resize(hs, 4*hs->set_size);
    }
}

// Assembly:
cmpq $0x1, %rdx
adcq $0x0, %rdx
movq 0x10(%rdi), %rax
movq %rdx, (%rax,%rsi,8)
movq 0x18(%rdi), %rax
movq %rcx, (%rax,%rsi,8)
movq (%rdi), %rsi
movq 0x8(%rdi), %rax
leaq 0x1(%rax), %rcx
movq %rcx, 0x8(%rdi)
leaq 0x4(,%rax,4), %rax
leaq (%rsi,%rsi,2), %rcx
cmpq %rcx, %rax
jbe 0xeb2a
shlq $0x2, %rsi
jmp 0xf251
retq
// File: /workspace/github_cpp_makefile_star2_O3/cphinton42[P]hinton-language/src/basic.h
// Function: void array_resize<Job>(Dynamic_Array<Job>*, unsigned long, Allocator)
void array_resize(Dynamic_Array<T> *arr, u64 new_size, Allocator a)
{
    // TODO: take more care with OOM errors?
    if(arr->data)
    {
        if(new_size == 0)
        {
            mem_dealloc(arr->data, arr->allocated, a);
            arr->count = 0;
            arr->data = nullptr;
            arr->allocated = 0;
        }
        else
        {
            arr->data = mem_resize(arr->data, arr->allocated, new_size, a);
            assert(arr->data);
            arr->allocated = new_size;
            if(arr->count > new_size)
            {
                arr->count = new_size;
            }
        }
    }
    else
    {
        assert(arr->count == 0);
        
        arr->data = mem_alloc(T, new_size, a);
        assert(arr->data);
        arr->allocated = new_size;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rax
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdx
testq %rdx, %rdx
je 0xebdc
movq 0x10(%rbx), %rsi
shlq $0x3, %rsi
leaq (%rsi,%rsi,2), %r9
testq %r14, %r14
je 0xec08
leaq (,%r14,8), %rsi
leaq (%rsi,%rsi,2), %r8
movq %rcx, %rdi
movl $0x1, %esi
movq %r9, %rcx
callq *%rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xec2e
movq %r14, 0x10(%rbx)
cmpq %r14, (%rbx)
jbe 0xec26
movq %r14, (%rbx)
jmp 0xec26
cmpq $0x0, (%rbx)
jne 0xec4d
leaq (,%r14,8), %rdx
leaq (%rdx,%rdx,2), %r8
movq %rcx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xec6c
movq %r14, 0x10(%rbx)
jmp 0xec26
movq %rcx, %rdi
movl $0x2, %esi
movq %r9, %rcx
xorl %r8d, %r8d
callq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x29d3(%rip), %rdi      # 0x11608
leaq 0x29d6(%rip), %rsi      # 0x11612
leaq 0x29db(%rip), %rcx      # 0x1161e
movl $0x129, %edx            # imm = 0x129
callq 0x3080
leaq 0x2a0a(%rip), %rdi      # 0x1165e
leaq 0x29b7(%rip), %rsi      # 0x11612
leaq 0x29bc(%rip), %rcx      # 0x1161e
movl $0x133, %edx            # imm = 0x133
callq 0x3080
leaq 0x2995(%rip), %rdi      # 0x11608
leaq 0x2998(%rip), %rsi      # 0x11612
leaq 0x299d(%rip), %rcx      # 0x1161e
movl $0x136, %edx            # imm = 0x136
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/contig.cpp
// Function: Contig::Contig()
Contig::Contig(){
  reads = 0;
  extension = 0;
  contig = "";
  contig_id = "";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %r15
leaq 0x10(%rdi), %rbx
leaq 0x20(%rdi), %r12
movq %r12, 0x10(%rdi)
xorl %eax, %eax
movq %rax, 0x18(%rdi)
movb %al, 0x20(%rdi)
leaq 0x30(%rdi), %r14
leaq 0x40(%rdi), %r13
movq %r13, 0x30(%rdi)
movq %rax, 0x38(%rdi)
movb %al, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0x106ba(%rip), %rcx     # 0x15f4c
movq %rbx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x44f0
movq 0x38(%r15), %rdx
leaq 0x106a0(%rip), %rcx     # 0x15f4c
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x44f0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x58d8
callq 0x42f0
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x58e5
callq 0x42f0
movq %r15, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/contig.cpp
// Function: Contig::Contig(Contig const&)
Contig::Contig( const Contig& rhs ) : reads(rhs.reads), contig(rhs.contig), contig_id(rhs.contig_id){
  extension = new Extension( reads, extend_len );
  extension->matches = rhs.extension->matches;
  extension->ATCG = rhs.extension->ATCG;
  extension->missed_bp = rhs.extension->missed_bp;
  extension->missed_bp_tot = rhs.extension->missed_bp_tot;
  extension->missed_bp_avg = rhs.extension->missed_bp_avg;
  extension->start = rhs.extension->start;
  extension->back = rhs.extension->back;
  extension->contig = rhs.extension->contig;
  extension->exten_seq = rhs.extension->exten_seq;
  extension->pos_mult = rhs.extension->pos_mult;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r15
movq %rdi, %r14
movq (%rsi), %rax
movq %rax, (%rdi)
addq $0x10, %rdi
leaq 0x20(%r14), %rax
movq %rax, -0x38(%rbp)
movq %rax, 0x10(%r14)
movq 0x10(%rsi), %rsi
movq 0x18(%r15), %rdx
addq %rsi, %rdx
movq %rdi, -0x40(%rbp)
callq 0x68f6
leaq 0x30(%r14), %r12
leaq 0x40(%r14), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x30(%r14)
movq 0x30(%r15), %rsi
movq 0x38(%r15), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x68f6
movl $0xd8, %edi
callq 0x4310
movq %rax, %r13
movq (%r14), %rsi
leaq 0x17b2d(%rip), %rax     # 0x1d610
movl (%rax), %edx
movq %r13, %rdi
callq 0x12518
movq %r13, 0x8(%r14)
movq 0x8(%r15), %rbx
movq (%rbx), %rax
movq %rax, (%r13)
leaq 0x8(%r13), %rdi
leaq 0x8(%rbx), %rsi
callq 0x64ce
movb 0x20(%rbx), %al
movb %al, 0x20(%r13)
addq $0x28, %r13
addq $0x28, %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x41c0
movq 0x8(%r15), %rsi
addq $0x50, %rsi
movq 0x8(%r14), %rdi
addq $0x50, %rdi
callq 0x6122
movq 0x8(%r15), %rsi
addq $0x68, %rsi
movq 0x8(%r14), %rdi
addq $0x68, %rdi
callq 0x62ce
movq 0x8(%r15), %rsi
movl 0xd0(%rsi), %eax
movq 0x8(%r14), %rdi
movl %eax, 0xd0(%rdi)
movl 0xd4(%rsi), %eax
movl %eax, 0xd4(%rdi)
movl 0x80(%rsi), %eax
movl %eax, 0x80(%rdi)
movb 0x84(%rsi), %al
movb %al, 0x84(%rdi)
movl $0x88, %eax
addq %rax, %rsi
addq %rax, %rdi
callq 0x41c0
movl $0xa8, %edi
movq 0x8(%r15), %rsi
addq %rdi, %rsi
addq 0x8(%r14), %rdi
callq 0x41c0
movq 0x8(%r15), %rax
movl 0xc8(%rax), %eax
movq 0x8(%r14), %rcx
movl %eax, 0xc8(%rcx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %r13, %rdi
callq 0x42f0
jmp 0x5be2
movq %rax, %r14
jmp 0x5bf1
movq %rax, %r14
movq (%r12), %rdi
cmpq -0x30(%rbp), %rdi
je 0x5bf1
callq 0x42f0
movq -0x40(%rbp), %rax
movq (%rax), %rdi
cmpq -0x38(%rbp), %rdi
je 0x5c03
callq 0x42f0
movq %r14, %rdi
callq 0x4590
nop
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/process.cpp
// Function: Process::Process()
Process::Process(){
  outfile = "afin_out";
  readsfiles = "";
  contigsfiles = "";
  reads = 0;
  contigs = 0;
  fuse = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
addq $0x18, %rdi
leaq 0x28(%r15), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x18(%r15)
xorl %eax, %eax
movq %rax, 0x20(%r15)
movb %al, 0x28(%r15)
leaq 0x38(%r15), %r14
leaq 0x48(%r15), %r13
movq %r13, 0x38(%r15)
movq %rax, 0x40(%r15)
movb %al, 0x48(%r15)
leaq 0x58(%r15), %r12
leaq 0x68(%r15), %rbx
movq %rbx, 0x58(%r15)
movq %rax, 0x60(%r15)
movb %al, 0x68(%r15)
leaq 0xef56(%rip), %rcx      # 0x15c33
movl $0x8, %r8d
movq %rdi, -0x38(%rbp)
xorl %esi, %esi
xorl %edx, %edx
callq 0x44f0
movq 0x40(%r15), %rdx
leaq 0xf251(%rip), %rcx      # 0x15f4c
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x44f0
movq 0x60(%r15), %rdx
leaq 0xf239(%rip), %rcx      # 0x15f4c
movq %r12, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x44f0
xorps %xmm0, %xmm0
movups %xmm0, (%r15)
movq $0x0, 0x10(%r15)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq (%r12), %rdi
cmpq %rbx, %rdi
je 0x6d4f
callq 0x42f0
movq (%r14), %rdi
cmpq %r13, %rdi
je 0x6d5c
callq 0x42f0
movq -0x38(%rbp), %rax
movq (%rax), %rdi
cmpq -0x30(%rbp), %rdi
je 0x6d6e
callq 0x42f0
movq %r15, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/process.cpp
// Function: Process::thread_worker(Queue<int>&, unsigned int)
void Process::thread_worker( Queue<int>& q, unsigned int id) {
  for (;;) {
    auto item = q.pop();
    if( item == -1 ){
      break;
    }
    else{
      contigs->get_contig_ref(item)->extend( false );
      contigs->get_contig_ref(item)->extend( true );
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rsi, %rdi
callq 0x8a0a
cmpl $-0x1, %eax
je 0x8891
movl %eax, %r15d
movq 0x8(%r14), %rdi
movl %r15d, %esi
callq 0x13dc6
movq %rax, %rdi
xorl %esi, %esi
callq 0x5cee
movq 0x8(%r14), %rdi
movl %r15d, %esi
callq 0x13dc6
movq %rax, %rdi
movl $0x1, %esi
callq 0x5cee
movq %rbx, %rdi
callq 0x8a0a
movl %eax, %r15d
cmpl $-0x1, %eax
jne 0x8852
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/./process.hpp
// Function: Queue<int>::push(int const&)
void Queue<T>::push( const T& item ){
  unique_lock<mutex> mlock( mtx );
  qu.push( item );
  mlock.unlock();
  cv.notify_one();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x50(%rdi), %rax
leaq -0x28(%rbp), %r15
movq %rax, (%r15)
movb $0x0, 0x8(%r15)
movq %r15, %rdi
callq 0x907a
movb $0x1, 0x8(%r15)
movq 0x30(%rbx), %rax
movq 0x40(%rbx), %rcx
addq $-0x4, %rcx
cmpq %rcx, %rax
je 0x898a
movl (%r14), %ecx
movl %ecx, (%rax)
addq $0x4, %rax
movq %rax, 0x30(%rbx)
jmp 0x8995
movq %rbx, %rdi
movq %r14, %rsi
callq 0x90c0
leaq -0x28(%rbp), %rdi
callq 0x902e
addq $0x78, %rbx
movq %rbx, %rdi
callq 0x4180
leaq -0x28(%rbp), %rdi
callq 0x9060
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x28(%rbp), %rdi
callq 0x9060
movq %rbx, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/./process.hpp
// Function: Queue<int>::pop()
T Queue<T>::pop(){
  unique_lock<mutex> mlock( mtx );
  while( qu.empty() ){
    cv.wait(mlock);
  }

  auto item = qu.front();
  qu.pop();
  return item;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
leaq 0x50(%rdi), %rax
leaq -0x28(%rbp), %r14
movq %rax, (%r14)
movb $0x0, 0x8(%r14)
movq %r14, %rdi
callq 0x907a
movb $0x1, 0x8(%r14)
movq 0x10(%rbx), %rax
cmpq %rax, 0x30(%rbx)
jne 0x8a5e
leaq 0x78(%rbx), %r14
leaq -0x28(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x40e0
movq 0x10(%rbx), %rax
cmpq %rax, 0x30(%rbx)
je 0x8a49
movl (%rax), %r14d
movq %rbx, %rdi
callq 0x9376
leaq -0x28(%rbp), %rdi
callq 0x9060
movl %r14d, %eax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/read.cpp
// Function: Read::get_pos(int, bool)
char Read::get_pos( int pos, bool back ){
  if( back ){
    int read_pos = pos - start;
    if( read_pos >=0 && read_pos < read.length() ){
      return read[ read_pos ];
    }
  }
  else{
    int len = read.length();
    int read_pos = len - start + pos;
    if( read_pos >= 0 && read_pos < len ){
      return read[ read_pos ];
    }
  }

  return -1; 
}

// Assembly:
testl %edx, %edx
je 0x94ad
subl (%rdi), %esi
movb $-0x1, %al
js 0x94ac
cmpq %rsi, 0x10(%rdi)
ja 0x94c8
retq
movl 0x10(%rdi), %eax
movl %eax, %ecx
subl (%rdi), %ecx
addl %esi, %ecx
sets %dl
cmpl %eax, %ecx
setge %sil
movb $-0x1, %al
orb %dl, %sil
jne 0x94ac
movl %ecx, %esi
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movb (%rax,%rsi), %al
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/revcomp.cpp
// Function: revcomp(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string revcomp( string str ){
  string rc(str);
  int len = str.length();
  int i;

  for( i=0; i<len; i++ ){
    switch( str[i] ){
      case 'A':
        rc[ len - i - 1 ] = 'T';
        break;
      case 'T':
        rc[ len - i - 1 ] = 'A';
        break;
      case 'G':
        rc[ len - i - 1 ] = 'C';
        break;
      case 'C':
        rc[ len - i - 1 ] = 'G';
        break;
      case 'N':
        rc[ len - i - 1 ] = 'N';
        break;
      case 't':
        rc[ len - i - 1 ] = 'A';
        break;
      case 'a':
        rc[ len - i - 1 ] = 'T';
        break;
      case 'c':
        rc[ len - i - 1 ] = 'G';
        break;
      case 'g':
        rc[ len - i - 1 ] = 'C';
        break;
      default:
        printf( "Incorrect character present in string.\n" );
    }
  }
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
callq 0x68f6
movq 0x8(%r14), %r12
testl %r12d, %r12d
jle 0x95b1
andl $0x7fffffff, %r12d      # imm = 0x7FFFFFFF
xorl %r13d, %r13d
leaq 0xc9a5(%rip), %r15      # 0x15ec5
movq (%r14), %rax
movzbl (%rax,%r13), %eax
cmpl $0x53, %eax
jle 0x9543
cmpl $0x62, %eax
jle 0x9572
cmpl $0x63, %eax
je 0x9552
cmpl $0x67, %eax
je 0x9592
cmpl $0x74, %eax
je 0x9587
jmp 0x959d
cmpl $0x46, %eax
jg 0x955d
cmpl $0x41, %eax
je 0x957c
cmpl $0x43, %eax
jne 0x959d
movq (%rbx), %rax
movb $0x47, -0x1(%rax,%r12)
jmp 0x95a5
cmpl $0x47, %eax
je 0x9592
cmpl $0x4e, %eax
jne 0x959d
movq (%rbx), %rax
movb $0x4e, -0x1(%rax,%r12)
jmp 0x95a5
cmpl $0x54, %eax
je 0x9587
cmpl $0x61, %eax
jne 0x959d
movq (%rbx), %rax
movb $0x54, -0x1(%rax,%r12)
jmp 0x95a5
movq (%rbx), %rax
movb $0x41, -0x1(%rax,%r12)
jmp 0x95a5
movq (%rbx), %rax
movb $0x43, -0x1(%rax,%r12)
jmp 0x95a5
movq %r15, %rdi
callq 0x44e0
incq %r13
decq %r12
jne 0x9520
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/log.cpp
// Function: Log::Inst()
Log* Log::Inst(){
  if( !p_Inst ){
    p_Inst = new Log;
    // initialize timer
    time( &timer );
  }

  return p_Inst;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq 0x13fe8(%rip), %rax     # 0x1d688
testq %rax, %rax
jne 0x96d4
movl $0x210, %edi            # imm = 0x210
callq 0x4310
movq %rax, %rbx
movq %rax, %rdi
callq 0x4390
movq %rbx, 0x13fc7(%rip)     # 0x1d688
leaq 0x13fc8(%rip), %rdi     # 0x1d690
callq 0x42e0
movq 0x13fb4(%rip), %rax     # 0x1d688
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x42f0
movq %r14, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/log.cpp
// Function: Log::open_log(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::open_log( string logfile ){
  log_fs.open( logfile, fstream::out | fstream::trunc );

  // ensure logfile has opened properly
  if( log_fs.fail() ){
    fprintf( stderr, "Error: Could not open logfile '%s'. Check permissions for logfile location", logfile.c_str() );
    exit(1);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movl $0x30, %edx
callq 0x4410
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x20(%r14,%rax)
jne 0x9717
popq %rbx
popq %r14
popq %rbp
retq
movq %rbx, %rdi
callq 0x474b
nop
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/log.cpp
// Function: Log::get_time[abi:cxx11]()
string Log::get_time(){
  string curr_time = "";
  char buffer[100];

  int t_now = difftime( time(0), timer );   // get time now
  
  int t_hour = t_now / 3600;
  t_now = t_now % 3600;

  int t_min = t_now / 60;
  t_now = t_now % 60;

  // format time in xxx:xx:xx
  sprintf( buffer, "%d:%.2d:%.2d", t_hour, t_min, t_now);
  curr_time = buffer;

  return curr_time;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
leaq 0x10(%rdi), %r12
movq %r12, (%rdi)
leaq 0xc75c(%rip), %rdx      # 0x15f4c
movq %rdx, %rsi
callq 0x6be0
xorl %edi, %edi
callq 0x42e0
movq 0x13e8a(%rip), %rsi     # 0x1d690
movq %rax, %rdi
callq 0x4190
cvttsd2si %xmm0, %eax
cltq
imulq $-0x6e5d4c3b, %rax, %rdx # imm = 0x91A2B3C5
shrq $0x20, %rdx
addl %eax, %edx
movl %edx, %ecx
shrl $0x1f, %ecx
sarl $0xb, %edx
addl %ecx, %edx
imull $0xe10, %edx, %ecx      # imm = 0xE10
subl %ecx, %eax
movswl %ax, %ecx
imull $0xffff8889, %ecx, %ecx # imm = 0xFFFF8889
shrl $0x10, %ecx
addl %eax, %ecx
movzwl %cx, %ecx
movswl %cx, %esi
shrl $0xf, %ecx
sarl $0x5, %esi
addl %ecx, %esi
movswl %si, %ecx
imull $0x3c, %esi, %esi
subl %esi, %eax
movswl %ax, %r8d
leaq 0xc6eb(%rip), %rsi      # 0x15f4d
leaq -0x90(%rbp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x4070
movq 0x8(%rbx), %r15
movq %r14, %rdi
callq 0x4140
movq %rbx, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %r14, %rcx
movq %rax, %r8
callq 0x44f0
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r12, %rdi
je 0x98b2
callq 0x42f0
movq %r14, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/log.cpp
// Function: Log::log_it(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::log_it( string note ){
  if( log_output ){
    log_fs << get_time() << "\t" << note << endl;
  }
  if( screen_output ){
    cout << get_time() << "\t" << note << endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
leaq 0x13d73(%rip), %rax     # 0x1d644
cmpl $0x0, (%rax)
je 0x995e
movq %rdi, %r14
addq $0x10, %r14
leaq -0x38(%rbp), %r15
movq %r15, %rdi
callq 0x97d0
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r14, %rdi
callq 0x4360
movq %rax, %r14
leaq 0xc645(%rip), %rsi      # 0x15f4b
movl $0x1, %edx
movq %rax, %rdi
callq 0x4360
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4360
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x4300
movsbl %al, %esi
movq %r14, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4210
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x995e
callq 0x42f0
leaq 0x13cdb(%rip), %rax     # 0x1d640
cmpl $0x0, (%rax)
je 0x99ef
leaq -0x38(%rbp), %r14
movq %r14, %rdi
callq 0x97d0
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x13638(%rip), %rdi     # 0x1cfc0
callq 0x4360
movq %rax, %r14
leaq 0xc5b4(%rip), %rsi      # 0x15f4b
movl $0x1, %edx
movq %rax, %rdi
callq 0x4360
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %r14, %rdi
callq 0x4360
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x4300
movsbl %al, %esi
movq %rbx, %rdi
callq 0x4030
movq %rax, %rdi
callq 0x4210
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x99ef
callq 0x42f0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x99fc
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x9a11
callq 0x42f0
movq %rbx, %rdi
callq 0x4590
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/gzip.cpp
// Function: Gzip::Gzip(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Gzip::Gzip( string filename ): BUFF_SIZE(16384), buffer(""), filename(filename){
  fp = fopen( filename.c_str(), "rb" );
  
  /* allocate inflate state */
  zs.zalloc = Z_NULL;
  zs.zfree = Z_NULL;
  zs.opaque = Z_NULL;
  zs.avail_in = 0;
  zs.avail_out = BUFF_SIZE;
  zs.next_in = Z_NULL;
  status = inflateInit2(&zs, 32+MAX_WBITS);

  if (status != Z_OK)
    zerr();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r12
movq %rdi, %r14
leaq 0x13215(%rip), %rax     # 0x1cd18
movq %rax, (%rdi)
movl $0x4000, 0x8(%rdi)      # imm = 0x4000
leaq 0x10(%rdi), %rbx
leaq 0x20(%rdi), %rax
movq %rax, -0x30(%rbp)
movq %rax, 0x10(%rdi)
leaq 0xc428(%rip), %rdx      # 0x15f4c
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x6be0
leaq 0xa8(%r14), %r15
leaq 0xb8(%r14), %r13
movq %r13, 0xa8(%r14)
movq (%r12), %rsi
movq 0x8(%r12), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x68f6
movq (%r12), %rdi
leaq 0xc424(%rip), %rsi      # 0x15f87
callq 0x4380
movq %rax, 0xa0(%r14)
leaq 0x30(%r14), %rdi
movl $0x0, 0x38(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x70(%r14)
xorl %eax, %eax
movq %rax, 0x80(%r14)
movl 0x8(%r14), %ecx
movl %ecx, 0x50(%r14)
movq %rax, 0x30(%r14)
leaq 0xc3eb(%rip), %rdx      # 0x15f8a
movl $0x2f, %esi
movl $0x70, %ecx
callq 0x42b0
movl %eax, 0xc(%r14)
testl %eax, %eax
je 0x9bbe
movq %r14, %rdi
callq 0x9bf8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x9be2
movq %rax, %r14
movq (%r15), %rdi
cmpq %r13, %rdi
je 0x9be2
callq 0x42f0
movq (%rbx), %rdi
cmpq -0x30(%rbp), %rdi
je 0x9bf0
callq 0x42f0
movq %r14, %rdi
callq 0x4590
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/gzip.cpp
// Function: Gzip::fill_buffer()
void Gzip::fill_buffer(){
  unsigned char in[BUFF_SIZE];
  unsigned char out[BUFF_SIZE];
  int next_pos = 0;
  unsigned int char_in = 0;

  // read in data from gzipd file
  zs.avail_in = fread(in, 1, BUFF_SIZE, fp);

  // handle read errors
  if (ferror(fp)) {
    (void)inflateEnd(&zs);
    status = Z_ERRNO;
    return;
  }

  // handle data error
  if (zs.avail_in == 0){
    status = Z_DATA_ERROR;
    return;
  }

  // set next_in pointer to data from fread
  zs.next_in = in;
  do{
    zs.avail_out = BUFF_SIZE;
    zs.next_out = out;

    // decompress data
    status = inflate(&zs, Z_NO_FLUSH);

    // check for errors
    switch (status) {
      case Z_BUF_ERROR:
        status = Z_OK;
        return;
      case Z_NEED_DICT:
        status = Z_DATA_ERROR;     /* and fall through */
      case Z_DATA_ERROR:
      case Z_MEM_ERROR:
        (void)inflateEnd(&zs);
        zerr();
        return;
    }

    int have = BUFF_SIZE - zs.avail_out;
    char out_str[have+1];
    strncpy( out_str, (char*)out, have );
    out_str[have] = '\0';

    // append data to buffer
    buffer.append( out_str );
  }while( zs.avail_out == 0 );
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movslq 0x8(%rdi), %rdx
movl %edx, %eax
movq %rsp, %r12
addq $0xf, %rax
andq $-0x10, %rax
subq %rax, %r12
movq %r12, %rsp
movq %rsp, %r14
subq %rax, %r14
movq %r14, %rsp
movq 0xa0(%rdi), %rcx
movl $0x1, %esi
movq %r12, %rdi
callq 0x44b0
movq %rax, %r13
leaq 0x30(%rbx), %r15
movl %r13d, 0x38(%rbx)
movq 0xa0(%rbx), %rdi
callq 0x45e0
testl %eax, %eax
je 0x9fb1
movq %r15, %rdi
callq 0x4340
movl $0xffffffff, 0xc(%rbx)  # imm = 0xFFFFFFFF
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
testl %r13d, %r13d
je 0xa044
movq %r12, 0x30(%rbx)
leaq 0x10(%rbx), %rax
movq %rax, -0x30(%rbp)
movq %r15, -0x38(%rbp)
movl 0x8(%rbx), %eax
movl %eax, 0x50(%rbx)
movq %r14, 0x48(%rbx)
movq %r15, %rdi
xorl %esi, %esi
callq 0x4280
movl %eax, 0xc(%rbx)
leal 0x4(%rax), %ecx
cmpl $0x2, %ecx
jb 0xa063
cmpl $0x2, %eax
je 0xa05c
cmpl $-0x5, %eax
je 0xa050
movl 0x8(%rbx), %eax
subl 0x50(%rbx), %eax
movq %rsp, %r15
leal 0x1(%rax), %ecx
addq $0xf, %rcx
andq $-0x10, %rcx
movq %rsp, %r13
subq %rcx, %r13
movq %r13, %rsp
movslq %eax, %r12
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x41a0
movb $0x0, (%r12,%r13)
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x45f0
movq %r15, %rsp
movq -0x38(%rbp), %r15
cmpl $0x0, 0x50(%rbx)
je 0x9fca
jmp 0x9fa2
movl $0xfffffffd, 0xc(%rbx)  # imm = 0xFFFFFFFD
jmp 0x9fa2
movl $0x0, 0xc(%rbx)
jmp 0x9fa2
movl $0xfffffffd, 0xc(%rbx)  # imm = 0xFFFFFFFD
movq %r15, %rdi
callq 0x4340
movq %rbx, %rdi
callq 0x9bf8
jmp 0x9fa2
// File: /workspace/github_cpp_makefile_star2_O3/afinit[P]afin/gzip.cpp
// Function: Gzip::getline[abi:cxx11]()
string Gzip::getline(){
  size_t next_pos = 0;
  string line( "" );

  // check if buffer has a full line in it, if not, fill_buffer
  while((next_pos = buffer.find( '\n' )) == string::npos && status == Z_OK ){
    fill_buffer();
  }

  // if last line in file, store results for return
  if( status == Z_STREAM_END && next_pos == string::npos ){
    line = buffer;
    buffer = "";

    (void)inflateEnd(&zs);
  }
  // protect against errors
  else if( status != Z_OK && status != Z_STREAM_END ){
    (void)inflateEnd(&zs);
    zerr();
    return "";
  }
  // parse out next line in buffer
  else{
    line = buffer.substr( 0, next_pos );
    buffer.erase( 0, next_pos+1 );
  }

  return line;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r15
movq %rdi, %rbx
leaq -0x38(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0xbeae(%rip), %rdx      # 0x15f4c
leaq -0x48(%rbp), %rdi
movq %rdx, %rsi
callq 0x6be0
leaq 0x10(%r15), %r14
movq %r14, %rdi
movl $0xa, %esi
xorl %edx, %edx
callq 0x43e0
movq %rax, %r12
movl 0xc(%r15), %eax
cmpq $-0x1, %r12
jne 0xa0d8
testl %eax, %eax
jne 0xa0d8
movq %r15, %rdi
callq 0x9f30
jmp 0xa0ae
cmpq $-0x1, %r12
setne %cl
cmpl $0x1, %eax
setne %dl
orb %cl, %dl
jne 0xa11b
leaq -0x48(%rbp), %rdi
movq %r14, %rsi
callq 0x41c0
movq 0x18(%r15), %rdx
leaq 0xbe4c(%rip), %rcx      # 0x15f4c
movq %r14, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x44f0
addq $0x30, %r15
movq %r15, %rdi
callq 0x4340
jmp 0xa166
cmpl $0x2, %eax
jae 0xa1a5
leaq -0x68(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %r12, %rcx
callq 0x4330
leaq -0x48(%rbp), %rdi
leaq -0x68(%rbp), %r15
movq %r15, %rsi
callq 0x43b0
movq (%r15), %rdi
leaq -0x58(%rbp), %rax
cmpq %rax, %rdi
je 0xa156
callq 0x42f0
incq %r12
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x40a0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
movq -0x48(%rbp), %rcx
cmpq %r13, %rcx
je 0xa183
movq %rcx, (%rbx)
movq -0x38(%rbp), %rax
movq %rax, 0x10(%rbx)
jmp 0xa18b
movups (%r13), %xmm0
movups %xmm0, (%rax)
movq -0x40(%rbp), %rax
movq %rax, 0x8(%rbx)
movq %rbx, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x30(%r15), %rdi
callq 0x4340
movq %r15, %rdi
callq 0x9bf8
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
leaq 0xbd88(%rip), %rdx      # 0x15f4c
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x6be0
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xa193
callq 0x42f0
jmp 0xa193
jmp 0xa1e5
jmp 0xa1e5
jmp 0xa1e5
movq %rax, %rbx
movq -0x48(%rbp), %rdi
cmpq %r13, %rdi
je 0xa1f6
callq 0x42f0
movq %rbx, %rdi
callq 0x4590
nop