LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/main.cpp
// Function: Simulator::tick()
void tick() {
        for(auto &l : _links)
            l->on_tick();
        for(auto &n : _nodes)
            if(n != nullptr)
                n->on_tick();
        if(_client->ready() && _actions.size() > 0) {
            _client->action(std::move(_actions.front()), alive_nodes());
            _actions.erase(_actions.begin());
        }
        _client->on_tick();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %r14
movq 0x30(%rdi), %r15
cmpq %r15, %r14
je 0x5671
movq (%r14), %rdi
callq 0x28e8
addq $0x10, %r14
jmp 0x565e
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %r15
cmpq %r15, %r14
je 0x5692
movq (%r14), %rdi
testq %rdi, %rdi
je 0x568c
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x10, %r14
jmp 0x5679
movq (%rbx), %r14
movl 0x60(%r14), %eax
cmpl 0x64(%r14), %eax
jne 0x56d6
cmpq $0x0, 0x50(%rbx)
je 0x56d6
leaq 0x40(%rbx), %r15
movq 0x40(%rbx), %r12
addq $0x10, %r12
movq %rbx, %rdi
callq 0x576c
movq %r14, %rdi
movq %r12, %rsi
movl %eax, %edx
callq 0x56e8
movq 0x40(%rbx), %rsi
movq %r15, %rdi
callq 0x578e
movq (%rbx), %r14
movq (%r14), %rax
movq %r14, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
nop
// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/main.cpp
// Function: ClientNode::action(Message::OpRequestMessage&&, int)
void action(Message::OpRequestMessage &&msg, int answers) {
        std::cout << "Send " << msg << std::endl;
        broadcast(std::move(msg)); // don't care. only primary node should process it
        _actual_answers = 0;
        _expected_answers = answers;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
movq 0x58d0(%rip), %rdi      # 0xafd8
leaq 0xe7e(%rip), %rsi       # 0x658d
callq 0x2100
movq %rax, %r12
leaq -0x60(%rbp), %r13
movq %r13, %rdi
movq %r15, %rsi
callq 0x4296
movq %r12, %rdi
movq %r13, %rsi
callq 0x3f11
movq %rax, %rdi
callq 0x2080
leaq -0x60(%rbp), %r12
movq %r12, %rdi
movq %r15, %rsi
callq 0x57a6
movq %r14, %rdi
movq %r12, %rsi
callq 0x2614
andl $0x0, 0x64(%r14)
movl %ebx, 0x60(%r14)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/frolosofsky[P]pbft/main.cpp
// Function: Simulator::alive_nodes()
int alive_nodes() {
        int c = 0;
        for(auto const &n : _nodes)
            if(n != nullptr)
                ++c;
        return c;
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x10(%rdi), %rcx
movq 0x18(%rdi), %rdx
xorl %eax, %eax
cmpq %rdx, %rcx
je 0x578c
cmpq $0x1, (%rcx)
sbbl $-0x1, %eax
addq $0x10, %rcx
jmp 0x577a
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/ast.cpp
// Function: construct_ast_(AST*, AST_Type, unsigned long, unsigned long)
AST* construct_ast_(AST *new_ast, AST_Type type, u64 line_number, u64 line_offset)
{
    new_ast->type = type;
    new_ast->flags = 0;
    new_ast->s = next_serial++;
    new_ast->line_number = line_number;
    new_ast->line_offset = line_offset;
    return new_ast;
}

// Assembly:
movq %rdi, %rax
movw %si, (%rdi)
andw $0x0, 0x2(%rdi)
movl 0x1134a(%rip), %esi     # 0x14b78
leal 0x1(%rsi), %edi
movl %edi, 0x11341(%rip)     # 0x14b78
movl %esi, 0x4(%rax)
movl %edx, 0x8(%rax)
movl %ecx, 0xc(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/ast.cpp
// Function: print_dot(Print_Buffer*, Array<Decl_AST*>)
void print_dot(Print_Buffer *pb, Array<Decl_AST*> decls)
{
    print_buf(pb, "digraph decls {\n");
    
    for(u64 i = 0; i < decls.count; ++i)
    {
        print_dot_rec(pb, decls[i]);
    }
    
    print_buf(pb, "}\n");
    flush_buffer(pb);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0xb47d(%rip), %rsi      # 0xecd6
xorl %r12d, %r12d
xorl %eax, %eax
callq 0x389d
cmpq %r12, %r15
je 0x3879
movq (%r14,%r12,8), %rsi
movq %rbx, %rdi
callq 0x3921
incq %r12
jmp 0x3863
leaq 0xb467(%rip), %rsi      # 0xece7
movq %rbx, %rdi
xorl %eax, %eax
callq 0x389d
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x3e47
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/io.cpp
// Function: flush_buffer(Print_Buffer*)
void flush_buffer(Print_Buffer *pb)
{
    assert(pb->fd >= 0);
    assert(pb->buffer.data);
    
    if(pb->buffer.count)
    {
        // TODO: handle error and/or return error code ?
        s64 result = write(pb->fd, pb->buffer.data, pb->buffer.count);
        pb->buffer.count = 0;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl (%rdi), %edi
testl %edi, %edi
js 0x3e6f
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x3e8e
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x3e6d
callq 0x3040
andq $0x0, 0x8(%rbx)
popq %rbx
retq
leaq 0xb2cc(%rip), %rdi      # 0xf142
leaq 0xb291(%rip), %rsi      # 0xf10e
leaq 0xb2ca(%rip), %rcx      # 0xf14e
movl $0x91, %edx
callq 0x3080
leaq 0xb2db(%rip), %rdi      # 0xf170
leaq 0xb272(%rip), %rsi      # 0xf10e
leaq 0xb2ab(%rip), %rcx      # 0xf14e
movl $0x92, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/check.cpp
// Function: print_jobs(Array<Job>)
void print_jobs(Array<Job> jobs)
{
    for(u64 i = 0; i < jobs.count; ++i)
    {
        Job *job = &jobs[i];
        AST *ast = job->typecheck.ast;
        print_err("Waiting job %lu:\n\tStage: %lu\n\tLocation: %lu:%lu\n\tAST_Type: %s\n", i, job->stage, ast->line_number, ast->line_offset, ast_type_names[(u64)ast->type]);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x10, %rbx
leaq 0xd8e2(%rip), %r13      # 0x140c0
leaq 0x8878(%rip), %r15      # 0xf05d
xorl %r12d, %r12d
cmpq %r12, %r14
je 0x6818
movq (%rbx), %rax
movl -0xc(%rbx), %edx
movl 0x8(%rax), %ecx
movl 0xc(%rax), %r8d
movzwl (%rax), %eax
movq (%r13,%rax,8), %r9
movq %r15, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x3ec6
incq %r12
addq $0x18, %rbx
jmp 0x67e8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/check.cpp
// Function: typecheck_all(Pool_Allocator*, Array<Decl_AST*>)
bool typecheck_all(Pool_Allocator *ast_pool, Array<Decl_AST*> decls)
{
    Dynamic_Array<Job> job_arrays[2] = {0};
    auto current = &job_arrays[0];
    auto next = &job_arrays[1];
    
    Context ctx;
    ctx.ast_pool = ast_pool;
    ctx.waiting_jobs = next;
    ctx.success = true;
    
    for(u64 i = 0; i < decls.count; ++i)
    {
        auto job = make_typecheck_job(nullptr, decls[i]);
        do_typecheck_job(&ctx, job);
    }
    
    if(!ctx.success)
    {
        print_err("Success flag was unset (1)\n");
        return false;
    }
    
    while(true)
    {
        auto tmp = current;
        current = next;
        next = tmp;
        
        if(current->count == 0)
        {
            return true;
        }
        next->count = 0;
        ctx.waiting_jobs = next;
        
        bool change = false;
        for(u64 i = 0; i < current->count; ++i)
        {
            if(do_typecheck_job(&ctx, (*current)[i]))
            {
                change = true;
            }
        }
        
        if(!ctx.success)
        {
            print_err("Success flag was unset (2)\n");
            return false;
        }
        else if(!change)
        {
            // TODO: detect error
            print_err("Error: no progress (%lu waiting jobs)\n", next->count);
            print_jobs(next->array);
            return false;
        }
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rdx, %rbx
movq %rsi, %r14
xorps %xmm0, %xmm0
leaq 0x68(%rsp), %r12
movaps %xmm0, 0x8(%r12)
movaps %xmm0, -0x8(%r12)
movaps %xmm0, -0x18(%r12)
leaq 0x18(%rsp), %r15
movq %rdi, (%r15)
movq %r12, 0x8(%r15)
movb $0x1, 0x10(%r15)
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x6898
movq (%rbx,%r13,8), %rax
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movq %rax, 0x40(%rsp)
movq %rax, 0x10(%rsp)
movaps 0x30(%rsp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0x3fbc
incq %r13
jmp 0x6867
cmpb $0x1, 0x28(%rsp)
jne 0x6930
leaq 0x50(%rsp), %r15
leaq 0x18(%rsp), %rbx
cmpq $0x0, (%r12)
je 0x6939
movq %r15, %r14
movq %r12, %r15
andq $0x0, (%r14)
movq %r14, 0x20(%rsp)
xorl %r12d, %r12d
xorl %r13d, %r13d
xorl %ebp, %ebp
cmpq (%r15), %rbp
jae 0x68ff
movq 0x8(%r15), %rax
movq 0x10(%rax,%r12), %rcx
movq %rcx, 0x10(%rsp)
movups (%rax,%r12), %xmm0
movups %xmm0, (%rsp)
movq %rbx, %rdi
callq 0x3fbc
orb %al, %r13b
incq %rbp
addq $0x18, %r12
jmp 0x68cf
cmpb $0x0, 0x28(%rsp)
je 0x693d
movq %r14, %r12
testb $0x1, %r13b
jne 0x68ad
movq (%r14), %rsi
leaq 0x87bb(%rip), %rdi      # 0xf0d4
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3ec6
movq (%r14), %rdi
movq 0x8(%r14), %rsi
callq 0x67c4
jmp 0x694d
leaq 0x8765(%rip), %rdi      # 0xf09c
jmp 0x6944
movb $0x1, %bl
jmp 0x694d
leaq 0x8774(%rip), %rdi      # 0xf0b8
xorl %ebx, %ebx
xorl %eax, %eax
callq 0x3ec6
movl %ebx, %eax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/io.cpp
// Function: read_entire_file(char const*)
String read_entire_file(const byte *file_name)
{
    String result = {0};
    
    int fd = open(file_name, O_CLOEXEC | O_RDONLY, 0);
    if(fd < 0)
    {
        return result;
    }
    defer {
        close(fd);
    };
    
    struct stat file_info;
    
    int status = fstat(fd, &file_info);
    if(status < 0)
    {
        return result;
    }
    
    u64 len = file_info.st_size;
    
    byte *memory = mem_alloc(byte, len+1);
    if(!memory)
    {
        return result;
    }
    
    u64 bytes_read = read(fd, memory, len);
    if(bytes_read < len)
    {
        mem_dealloc(memory, len+1);
        return result;
    }
    
    result.count = len+1;
    result.data = memory;
    result[len] = '\0';
    
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0xa0, %rsp
xorl %ebx, %ebx
movl $0x80000, %esi          # imm = 0x80000
xorl %edx, %edx
xorl %eax, %eax
callq 0x3090
movl %eax, 0x4(%rsp)
testl %eax, %eax
js 0x6a01
leaq 0x4(%rsp), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
movl %eax, %edi
callq 0x30f0
testl %eax, %eax
js 0x69fa
movq 0x40(%rsp), %r15
leaq 0x1(%r15), %r14
movq 0xe1c1(%rip), %rdi      # 0x14b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq *0xe1aa(%rip)           # 0x14b68
movq %rax, %rbx
testq %rax, %rax
je 0x69fa
movl 0x4(%rsp), %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x30d0
cmpq %r15, %rax
jae 0x6a06
movq 0xe18f(%rip), %rdi      # 0x14b70
pushq $0x2
popq %rsi
movq %rbx, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq *0xe175(%rip)           # 0x14b68
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x6a0b
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x6a0b
xorl %r14d, %r14d
jmp 0x6a15
movb $0x0, (%rbx,%r15)
leaq 0x8(%rsp), %rdi
callq 0x6a40
movq %r14, %rax
movq %rbx, %rdx
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x6a2a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x6a40
movq %rbx, %rdi
callq 0x3100
nop
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/io.cpp
// Function: make_print_buffer(int, unsigned long)
Print_Buffer make_print_buffer(int fd, u64 buffer_size)
{
    Print_Buffer result;
    result.fd = fd;
    result.buffer.count = 0;
    result.buffer.data = mem_alloc(byte, buffer_size);
    result.buffer.allocated = buffer_size;
    
    assert(result.buffer.data);
    
    return result;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movl %esi, (%rdi)
andq $0x0, 0x8(%rdi)
movq 0xe103(%rip), %rdi      # 0x14b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq *0xe0ec(%rip)           # 0x14b68
movq %rax, 0x10(%rbx)
movq %r14, 0x18(%rbx)
testq %rax, %rax
je 0x6a94
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8660(%rip), %rdi      # 0xf0fb
leaq 0x866c(%rip), %rsi      # 0xf10e
leaq 0x8670(%rip), %rcx      # 0xf119
pushq $0x3e
popq %rdx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/io.cpp
// Function: make_file_print_buffer(char const*, unsigned long)
Print_Buffer make_file_print_buffer(const byte *file_name, u64 buffer_size)
{
    // Note: let umask decide the file permissions (except execute)
    int file = open(file_name, O_CLOEXEC | O_WRONLY | O_APPEND | O_CREAT, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
    
    if(file < 0)
    {
        Print_Buffer result = {0};
        result.fd = file;
        return result;
    }
    else
    {
        return make_print_buffer(file, buffer_size);
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x80441, %esi          # imm = 0x80441
movl $0x1b6, %edx            # imm = 0x1B6
xorl %eax, %eax
callq 0x3090
testl %eax, %eax
js 0x6ae2
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x6a55
jmp 0x6aee
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movups %xmm0, 0x10(%rbx)
movl %eax, (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/io.cpp
// Function: free_buffer(Print_Buffer*, bool)
void free_buffer(Print_Buffer *pb, bool close_file)
{
    if(close_file && pb->fd >= 0)
    {
        close(pb->fd);
        pb->fd = -1;
    }
    if(pb->buffer.data)
    {
        mem_dealloc(pb->buffer.data, pb->buffer.allocated);
        zero_struct(&pb->buffer);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testl %esi, %esi
je 0x6c75
movl (%rbx), %edi
testl %edi, %edi
js 0x6c75
callq 0x3120
orl $-0x1, (%rbx)
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x6ca1
movq 0x18(%rbx), %rcx
movq 0xdee7(%rip), %rdi      # 0x14b70
pushq $0x2
popq %rsi
xorl %r8d, %r8d
callq *0xded3(%rip)           # 0x14b68
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/io.cpp
// Function: print_err_indented(char*, char*, bool)
void print_err_indented(byte *start, byte *end, bool indent_first)
{
    bool indent = indent_first;
    
    if(start == end && indent)
    {
        print_err("    ");
    }
    
    while(start < end)
    {
        byte *end_section = start;
        while(end_section < end)
        {
            byte b = *end_section;
            ++end_section;
            
            if(b == '\r')
            {
                if(end_section < end && *end_section == '\n')
                {
                    ++end_section;
                }
                break;
            }
            else if(b == '\n')
            {
                break;
            }
        }
        
        if(indent)
        {
            print_err("    %.*s", (u32)(end_section - start), start);
        }
        else
        {
            print_err("%.*s", (u32)(end_section - start), start);
            indent = true;
        }
        
        start = end_section;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movl %ebp, %eax
xorb $0x1, %al
cmpq %rsi, %rdi
setne %cl
orb %al, %cl
jne 0x6ccf
leaq 0x84b8(%rip), %rdi      # 0xf180
xorl %eax, %eax
callq 0x3ec6
leaq 0x84af(%rip), %r15      # 0xf185
leaq 0x84ac(%rip), %rdi      # 0xf189
testb %bpl, %bpl
cmovneq %r15, %rdi
cmpq %rbx, %r14
jae 0x6d2e
movq %r14, %r12
cmpq %rbx, %r12
jae 0x6d16
movzbl (%r12), %eax
incq %r12
cmpl $0xa, %eax
je 0x6d16
cmpl $0xd, %eax
jne 0x6cec
cmpq %rbx, %r12
jae 0x6d16
leaq 0x1(%r12), %rax
cmpb $0xa, (%r12)
cmoveq %rax, %r12
movl %r12d, %esi
subl %r14d, %esi
movq %r14, %rdx
xorl %eax, %eax
callq 0x3ec6
movq %r15, %rdi
movq %r12, %r14
jmp 0x6ce4
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/lex.cpp
// Function: report_error(Array<char>, char*, char*, unsigned int, unsigned int, char const*)
internal void report_error(String program_text, byte *start_tok, byte *current, u32 line_number, u32 line_offset, const byte *error_text)
{
    byte *start_program = program_text.data;
    byte *end_program = start_program + program_text.count;
    
    byte *start = start_tok;
    byte *end = current;
    while(start > start_program)
    {
        if(*start == '\n' || *start == '\r')
        {
            ++start;
            break;
        }
        else
        {
            --start;
        }
    }
    while(end < end_program)
    {
        byte b = *end;
        ++end;
        
        if(b == '\r')
        {
            if(end < end_program && *end == '\n')
            {
                ++end;
            }
            break;
        }
        else if(b == '\n')
        {
            break;
        }
    }
    
    // TODO: remove color codes when not outputing to a terminal
    // TODO: perhaps change to highlight in the program text, rather than use an arrow ?
    
    print_err("\x1B[1;31mError\x1B[0m: %d:%d:\n    %s\n", line_number, line_offset, error_text);
    print_err_indented(start, start_tok);
    
    print_err("\x1B[1;33m%.*s\x1B[1;31m%c\x1B[0m", (u32)(current - start_tok), start_tok, *current);
    
    if(current != end)
    {
        print_err_indented(current+1, end, false);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, %r14
movq 0x30(%rsp), %rcx
addq %rsi, %rdi
movq %rdx, %r15
cmpq %rsi, %r15
jbe 0x761b
movzbl (%r15), %eax
cmpl $0xd, %eax
je 0x7618
cmpl $0xa, %eax
je 0x7618
decq %r15
jmp 0x7600
incq %r15
movq %rbx, %r12
cmpq %rdi, %r12
jae 0x7648
movzbl (%r12), %eax
incq %r12
cmpl $0xa, %eax
je 0x7648
cmpl $0xd, %eax
jne 0x761e
cmpq %rdi, %r12
jae 0x7648
leaq 0x1(%r12), %rax
cmpb $0xa, (%r12)
cmoveq %rax, %r12
leaq 0x7bd3(%rip), %rdi      # 0xf222
movl %r8d, %esi
movl %r9d, %edx
xorl %eax, %eax
callq 0x3ec6
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x6ca3
movl %ebx, %esi
subl %r14d, %esi
movsbl (%rbx), %ecx
leaq 0x8536(%rip), %rdi      # 0xfbaf
movq %r14, %rdx
xorl %eax, %eax
callq 0x3ec6
cmpq %rbx, %r12
je 0x76a3
incq %rbx
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x6ca3
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/parse.cpp
// Function: parse_tokens(Parsing_Context*)
Dynamic_Array<Decl_AST*> parse_tokens(Parsing_Context *ctx)
{
    Dynamic_Array<Decl_AST*> result = {0};
    
    Token *current = ctx->tokens.data;
    Token *start_section = current;
    
    while(current->type != Token_Type::eof)
    {
        start_section = current;
        Decl_AST *decl = parse_decl(ctx, &current, Decl_Type::Statement);
        if(decl)
        {
            array_add(&result, decl);
        }
        else
        {
            while(true)
            {
                if(current->type == Token_Type::eof)
                {
                    break;
                }
                else if(current->type == Token_Type::semicolon)
                {
                    ++current;
                    break;
                }
                else
                {
                    ++current;
                }
            }
        }
    }
    
    return result;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
andq $0x0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq 0x18(%rsi), %rax
leaq 0x8(%rsp), %r15
movq %rax, (%r15)
cmpq $0x41, (%rax)
je 0x7adf
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x7cf1
testq %rax, %rax
je 0x7ac0
movq 0xd0c1(%rip), %rdx      # 0x14b68
movq 0xd0c2(%rip), %rcx      # 0x14b70
movq %rbx, %rdi
movq %rax, %rsi
callq 0xcb6d
movq 0x8(%rsp), %rax
jmp 0x7a88
movq 0x8(%rsp), %rax
movq (%rax), %rcx
cmpq $0x41, %rcx
je 0x7ad8
addq $0x20, %rax
cmpq $0x21, %rcx
jne 0x7ac5
movq %rax, 0x8(%rsp)
jmp 0x7a88
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/scope.cpp
// Function: create_scope_metadata(Scoping_Context*, Array<Decl_AST*>)
bool create_scope_metadata(Scoping_Context *ctx, Array<Decl_AST*> decls)
{
    ctx->success = true;
    
    Hashed_Scope *file_scope = pool_alloc(Hashed_Scope, ctx->ast_pool);
    init_hashed_scope(file_scope, nullptr, 0, 16);
    
    for(u64 i = 0; i < decls.count; ++i)
    {
        create_scope_metadata(ctx, nullptr, IDENT_DECL, file_scope, 0, decls[i]);
    }
    return ctx->success;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, 0x10(%rdi)
movq 0x8(%rdi), %rdi
pushq $0x30
popq %rsi
callq 0x7fa2
movq %rax, %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
leaq 0x10(%rax), %rdi
pushq $0x10
popq %rsi
callq 0xcbac
xorl %ebp, %ebp
pushq $0x2
popq %r13
cmpq %rbp, %r15
je 0x7ba6
movq (%rbx,%rbp,8), %r9
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x83f6
incq %rbp
jmp 0x7b85
movb 0x10(%r14), %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_alloc_func(void*, Allocator_Mode, void*, unsigned long, unsigned long)
void *pool_alloc_func(void *data, Allocator_Mode mode, void *old_ptr, u64 old_size, u64 new_size)
{
    Pool_Allocator *pool = static_cast<Pool_Allocator*>(data);
    if(mode == Allocator_Mode::alloc)
    {
        return pool_alloc_(pool, new_size);
    }
    else if(mode == Allocator_Mode::resize)
    {
        // return pool_resize_(pool, old_ptr, old_size, new_size);
        return nullptr;
    }
    else if(mode == Allocator_Mode::dealloc)
    {
        // TODO: perhaps deallocate if the allocation was the most recent?
        assert(false);
        return nullptr;
    }
    
    assert(false);
    return nullptr;
}

// Assembly:
pushq %rax
testl %esi, %esi
je 0x7f65
cmpl $0x1, %esi
jne 0x7f6e
xorl %eax, %eax
popq %rcx
retq
movq %r8, %rsi
popq %rax
jmp 0x7fa2
leaq 0x6d2b(%rip), %rdi      # 0xeca0
cmpl $0x2, %esi
jne 0x7f8c
leaq 0x72e2(%rip), %rsi      # 0xf263
leaq 0x72f2(%rip), %rcx      # 0xf27a
pushq $0x19
jmp 0x7f9c
leaq 0x72d0(%rip), %rsi      # 0xf263
leaq 0x72e0(%rip), %rcx      # 0xf27a
pushq $0x1d
popq %rdx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7fc2
movq 0x8(%rbx), %rax
testq %rax, %rax
jne 0x7ff0
jmp 0x8067
cmpq $0x0, 0x30(%rbx)
je 0x80a3
movq %rbx, %rdi
xorl %esi, %esi
callq 0x80bc
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 0x8067
subq %rax, %rdx
cmpq %r14, %rdx
jae 0x803c
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 0x80bc
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 0x8084
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 0x728e(%rip), %rdi      # 0xf2fc
leaq 0x71ee(%rip), %rsi      # 0xf263
leaq 0x7257(%rip), %rcx      # 0xf2d3
pushq $0x74
popq %rdx
callq 0x3080
leaq 0x72b1(%rip), %rdi      # 0xf33c
leaq 0x71d1(%rip), %rsi      # 0xf263
leaq 0x723a(%rip), %rcx      # 0xf2d3
movl $0x8a, %edx
callq 0x3080
leaq 0x7210(%rip), %rdi      # 0xf2ba
leaq 0x71b2(%rip), %rsi      # 0xf263
leaq 0x721b(%rip), %rcx      # 0xf2d3
pushq $0x6c
jmp 0x807e
// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq 0x28(%rdi), %r14
testq %r14, %r14
je 0x80e5
leaq 0x28(%rdi), %rax
xorl %ecx, %ecx
testq %r14, %r14
je 0x80e5
cmpq %rbx, 0x8(%r14)
jae 0x812b
movq %r14, %rcx
movq (%r14), %r14
jmp 0x80d2
movq 0x30(%rdi), %rax
cmpq %rbx, %rax
cmovaq %rax, %rbx
leaq 0x7f64(%rip), %rdi      # 0x1005b
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x3ec6
pushq $0x3
popq %rdx
pushq $0x22
popq %rcx
pushq $-0x1
popq %r8
xorl %edi, %edi
movq %rbx, %rsi
xorl %r9d, %r9d
callq 0x3110
cmpq $-0x1, %rax
je 0x813c
andq $0x0, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, %r14
jmp 0x813c
testq %rcx, %rcx
movq (%r14), %rdx
cmovneq %rcx, %rax
movq %rdx, (%rax)
andq $0x0, (%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x8172
testq %rcx, %rcx
je 0x81a2
movq %rcx, %rsi
callq 0x7fa2
jmp 0x818d
movq %r14, %rdx
subq %rax, %rdx
movq %r14, 0x8(%rdi)
addq %rdx, 0x18(%rdi)
movq %rcx, %rsi
callq 0x7fa2
cmpq %r14, %rax
je 0x81a4
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_O2/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 %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x81ff
callq 0x8233
andq $0x0, (%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x8212
callq 0x8233
andq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x8225
callq 0x8233
andq $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
andq $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: deallocate_blocks(Block_Header*)
internal
void deallocate_blocks(Block_Header *block)
{
    while(block)
    {
        Block_Header *next_block = block->next;
        munmap(block, block->size);
        block = next_block;
    }
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x824a
movq (%rdi), %rbx
movq 0x8(%rdi), %rsi
callq 0x3070
movq %rbx, %rdi
jmp 0x8234
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcda2
testq %rax, %rax
je 0x8326
cmpq 0x8(%rax), %r13
jae 0x833e
movq (%r12), %rax
testq %rax, %rax
je 0x8342
movq 0x8(%r12), %r13
movq %rax, %r12
testb %bpl, %bpl
jne 0x830b
jmp 0x8342
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_O2/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
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x7aec
movq %rax, %r12
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
movq %rax, %rcx
callq 0xce78
movq %rax, %r13
movq 0x10(%rbx), %rax
cmpq $0x0, (%rax,%r13,8)
je 0x839f
movq 0x18(%rbx), %rax
movq (%rax,%r13,8), %rbp
jmp 0x83e4
leaq 0x20(%rbx), %rdi
movq %rdi, (%rsp)
pushq $0x10
popq %rsi
callq 0x7fa2
movq %rax, %rbp
movq %r14, (%rax)
movq (%rsp), %rdi
movq %r14, %rsi
callq 0x7fa2
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 0xcef5
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_O2/cphinton42[P]hinton-language/src/stb/stb_sprintf.h
// Function: stbsp__lead_sign(unsigned int, char*)
static void stbsp__lead_sign(stbsp__uint32 fl, char *sign)
{
  sign[0] = 0;
  if (fl&STBSP__NEGATIVE) {
    sign[0]=1;
    sign[1]='-';
  } else if (fl&STBSP__LEADINGSPACE) {
    sign[0]=1;
    sign[1]=' ';
  } else if (fl&STBSP__LEADINGPLUS) {
    sign[0]=1;
    sign[1]='+';
  }
}

// Assembly:
movb $0x0, (%rsi)
movb $0x2d, %al
testb %dil, %dil
js 0xa558
movb $0x20, %al
testb $0x4, %dil
jne 0xa558
movb $0x2b, %al
testb $0x2, %dil
je 0xa55e
movb $0x1, (%rsi)
movb %al, 0x1(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xafb7
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rcx, %r15
movq %rdx, %r12
movl %esi, %r14d
movq %rdi, %rbx
movq %rsp, %r13
movq %rdi, (%r13)
movl %esi, 0x8(%r13)
xorl %edi, %edi
movq %r13, %rsi
xorl %edx, %edx
callq 0xafba
leaq 0x3c(%rip), %rdi        # 0xafba
movq %r13, %rsi
movq %rax, %rdx
movq %r12, %rcx
movq %r15, %r8
callq 0x89f3
movl (%r13), %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 %r12
popq %r13
popq %r14
popq %r15
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xaffa
movq (%rax), %rsi
movslq %edx, %r8
cmpq %rdi, %rsi
je 0xafef
leaq (%rdi,%r8), %rcx
movb (%rdi), %r9b
incq %rdi
movb %r9b, (%rsi)
incq %rsi
cmpq %rcx, %rdi
jb 0xafd8
movq (%rax), %rsi
movl 0x8(%rax), %ecx
addq %r8, %rsi
movq %rsi, (%rax)
subl %edx, %ecx
movl %ecx, 0x8(%rax)
testl %ecx, %ecx
jle 0xb00a
cmpl $0x200, %ecx            # imm = 0x200
jb 0xb00d
movq (%rax), %rax
retq
xorl %eax, %eax
retq
addq $0xc, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/cphinton42[P]hinton-language/src/basic.h
// Function: void array_add<Token>(Dynamic_Array<Token>*, Token, 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 %rdi, %rbx
leaq 0x20(%rsp), %r14
movq (%rdi), %rax
cmpq 0x10(%rdi), %rax
jne 0xcb3a
movq %rdx, %rcx
movq %rsi, %rdx
shlq $0x2, %rax
testq %rax, %rax
pushq $0x4
popq %rsi
cmovneq %rax, %rsi
movq %rbx, %rdi
callq 0xd426
movq (%rbx), %rax
movq 0x8(%rbx), %rcx
shlq $0x5, %rax
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x10(%rcx,%rax)
movups %xmm0, (%rcx,%rax)
incq (%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
movq %rsi, (%rdi)
andq $0x0, 0x8(%rdi)
testq %rsi, %rsi
je 0xcc1e
movq %rsi, %r15
leaq (,%rsi,8), %rbx
movq 0x7f9d(%rip), %rdi      # 0x14b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %rbx, %r8
callq *0x7f86(%rip)           # 0x14b68
movq %rax, 0x10(%r14)
imulq $0x18, %r15, %r8
movq 0x7f7f(%rip), %rdi      # 0x14b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *0x7f6b(%rip)           # 0x14b68
movq %rax, 0x18(%r14)
movq 0x10(%r14), %rdi
testq %rdi, %rdi
je 0xcc2c
testq %rax, %rax
je 0xcc45
xorl %esi, %esi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0x3060
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x357f(%rip), %rdi      # 0x101b2
leaq 0x3583(%rip), %rsi      # 0x101bd
leaq 0x3588(%rip), %rcx      # 0x101c9
pushq $0x6d
jmp 0xcc5c
leaq 0x3604(%rip), %rdi      # 0x10250
leaq 0x356a(%rip), %rsi      # 0x101bd
leaq 0x356f(%rip), %rcx      # 0x101c9
pushq $0x6e
popq %rdx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O2/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
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x40(%rsp), %rsi
movq %rbx, %rdx
callq 0xd60a
movq 0x10(%r14), %rcx
movq (%rcx,%rax,8), %r15
testq %r15, %r15
jne 0xccc8
leaq 0x40(%rsp), %rcx
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rsp)
movups (%rcx), %xmm0
movups %xmm0, (%rsp)
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0xd64d
testq %r15, %r15
sete %al
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcd83
movq %rdi, %r15
movq (%rdi), %r12
movq 0x10(%rdi), %r14
movq 0x18(%rdi), %rbx
callq 0xcbac
xorl %r13d, %r13d
movq %rbx, %rbp
cmpq %r13, %r12
je 0xcd39
movq (%r14,%r13,8), %rsi
testq %rsi, %rsi
je 0xcd30
movq 0x10(%rbp), %rax
movq %rax, 0x10(%rsp)
movups (%rbp), %xmm0
movups %xmm0, (%rsp)
movq %r15, %rdi
callq 0xcc7c
incq %r13
addq $0x18, %rbp
jmp 0xcd09
leaq (,%r12,8), %rcx
movq 0x7e28(%rip), %rdi      # 0x14b70
pushq $0x2
popq %rbp
movl %ebp, %esi
movq %r14, %rdx
xorl %r8d, %r8d
callq *0x7e0f(%rip)           # 0x14b68
imulq $0x18, %r12, %rcx
movq 0x7e04(%rip), %rax      # 0x14b68
movq 0x7e05(%rip), %rdi      # 0x14b70
movl %ebp, %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 0x34d2(%rip), %rdi      # 0x1025c
leaq 0x342c(%rip), %rsi      # 0x101bd
leaq 0x34da(%rip), %rcx      # 0x10272
movl $0x91, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O2/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rdx, (%rsp)
movq %rsi, %r15
movq %rdi, %r12
cmpq $0x1, %rcx
adcq $0x0, %rbx
movq (%rdi), %rbp
decq %rbp
pushq $0x1
popq %r14
movq %rbx, %r13
andq %rbp, %r13
movq 0x10(%r12), %rax
movq (%rax,%r13,8), %rax
testq %rax, %rax
je 0xcee3
cmpq %rbx, %rax
jne 0xcedb
movq 0x18(%r12), %rax
movq (%rax,%r13,8), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movq %r15, %rdx
movq (%rsp), %rcx
callq 0xcae2
testb %al, %al
jne 0xcee3
addq %r14, %r13
incq %r14
jmp 0xcea5
movq %r13, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcf36
shlq $0x2, %rsi
jmp 0xd6a2
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0xcfd5
imulq $0x18, 0x10(%rbx), %r9
testq %r14, %r14
je 0xcff9
imulq $0x18, %r14, %r8
pushq $0x1
popq %rsi
movq %rcx, %rdi
movq %r9, %rcx
callq *%rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xd01a
movq %r14, 0x10(%rbx)
cmpq %r14, (%rbx)
jbe 0xd012
movq %r14, (%rbx)
jmp 0xd012
cmpq $0x0, (%rbx)
jne 0xd039
imulq $0x18, %r14, %r8
movq %rcx, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
callq *%rax
movq %rax, 0x8(%rbx)
testq %rax, %rax
je 0xd058
movq %r14, 0x10(%rbx)
jmp 0xd012
pushq $0x2
popq %rsi
movq %rcx, %rdi
movq %r9, %rcx
xorl %r8d, %r8d
callq *%rax
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x25b7(%rip), %rdi      # 0xf5d8
leaq 0x25ba(%rip), %rsi      # 0xf5e2
leaq 0x25bf(%rip), %rcx      # 0xf5ee
movl $0x129, %edx            # imm = 0x129
callq 0x3080
leaq 0x25ee(%rip), %rdi      # 0xf62e
leaq 0x259b(%rip), %rsi      # 0xf5e2
leaq 0x25a0(%rip), %rcx      # 0xf5ee
movl $0x133, %edx            # imm = 0x133
callq 0x3080
leaq 0x2579(%rip), %rdi      # 0xf5d8
leaq 0x257c(%rip), %rsi      # 0xf5e2
leaq 0x2581(%rip), %rcx      # 0xf5ee
movl $0x136, %edx            # imm = 0x136
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
leaq 0x10(%rdi), %rbx
xorl %eax, %eax
movb %al, 0x20(%rdi)
leaq 0x40(%rdi), %rcx
movq %rcx, 0x30(%rdi)
andq $0x0, 0x38(%rdi)
leaq 0x30(%rdi), %r14
movb %al, 0x40(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
leaq 0xdcfb(%rip), %rsi      # 0x12f4c
movq %rbx, %rdi
callq 0x4600
leaq 0xdcec(%rip), %rsi      # 0x12f4c
movq %r14, %rdi
callq 0x4600
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r15
movq %r14, %rdi
callq 0x4160
movq %rbx, %rdi
callq 0x4160
movq %r15, %rdi
callq 0x4590