LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: cphinton42[P]hinton-language/src/check.cpp
// Function: typecheck_return(Context*, Return_AST*)
internal
bool typecheck_return(Context *ctx, Return_AST *return_ast)
{
    // Note: return types will be checked from the function prototype
    auto return_types = return_ast->function->prototype->return_types;
    bool all_resolved = true;
    for(u64 i = 0; i < return_types.count; ++i)
    {
        if(!type_resolved(return_types[i]))
        {
            all_resolved = false;
            break;
        }
    }
    
    if(all_resolved)
    {
        // TODO: support multi-return values
        if(return_types.count == 1)
        {
            auto job = make_typecheck_job(return_types[0], return_ast->expr);
            do_typecheck_job(ctx, job);
        }
        else
        {
            // TODO: better error reporting
            print_err("Expected only one return type\n");
            ctx->success = false;
        }
        return true;
    }
    else
    {
        auto job = make_typecheck_job(nullptr, return_ast);
        array_add(ctx->waiting_jobs, job);
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x20(%rax), %rax
movq 0x30(%rax), %rcx
movq %rcx, -0x28(%rbp)
movq 0x38(%rax), %rax
movq %rax, -0x20(%rbp)
movb $0x1, -0x29(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jae 0x5c84
movq -0x38(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x17050
movq (%rax), %rdi
callq 0x5600
testb $0x1, %al
jne 0x5c74
movb $0x0, -0x29(%rbp)
jmp 0x5c84
jmp 0x5c76
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x5c4b
testb $0x1, -0x29(%rbp)
je 0x5d17
cmpq $0x1, -0x28(%rbp)
jne 0x5cf8
leaq -0x28(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x17050
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0x50(%rbp), %rdi
xorl %ecx, %ecx
callq 0x4a80
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x68(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x4b40
jmp 0x5d0e
leaq 0x14bff(%rip), %rdi     # 0x1a8fe
movb $0x0, %al
callq 0x4990
movq -0x10(%rbp), %rax
movb $0x0, 0x10(%rax)
movb $0x1, -0x1(%rbp)
jmp 0x5da6
movq -0x18(%rbp), %rdx
leaq -0x80(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %ecx, %ecx
callq 0x4a80
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x80(%rbp), %rax
movq %rax, -0x98(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x90(%rbp)
movq -0x70(%rbp), %rax
movq %rax, -0x88(%rbp)
movq 0x19f26(%rip), %rax     # 0x1fc80
movq %rax, -0xa8(%rbp)
movq 0x19f20(%rip), %rax     # 0x1fc88
movq %rax, -0xa0(%rbp)
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdx
leaq -0x98(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x17c30
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: cphinton42[P]hinton-language/src/check.cpp
// Function: typecheck_primitive(Context*, Expr_AST*, Primitive_AST*)
internal
bool typecheck_primitive(Context *ctx, Expr_AST *type, Primitive_AST *prim_ast)
{
    if(type)
    {
        Status status = types_match(ctx, type, &type_t_ast);
        if(status == Status::good)
        {
            set_resolved_type(prim_ast, &type_t_ast);
            return true;
        }
    }
    else
    {
        set_resolved_type(prim_ast, &type_t_ast);
        return true;
    }
    
    auto job = make_typecheck_job(type, prim_ast);
    array_add(ctx->waiting_jobs, job);
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x80, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x8d5b
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
leaq 0x171c3(%rip), %rdx     # 0x1fef0
movl $0x1, %ecx
callq 0x9240
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
jne 0x8d59
movq -0x20(%rbp), %rdi
leaq 0x171a5(%rip), %rsi     # 0x1fef0
callq 0x3be0
movb $0x1, -0x1(%rbp)
jmp 0x8de8
jmp 0x8d71
movq -0x20(%rbp), %rdi
leaq 0x1718a(%rip), %rsi     # 0x1fef0
callq 0x3be0
movb $0x1, -0x1(%rbp)
jmp 0x8de8
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
leaq -0x40(%rbp), %rdi
xorl %ecx, %ecx
callq 0x4a80
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x40(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq 0x16ed5(%rip), %rax     # 0x1fc80
movq %rax, -0x68(%rbp)
movq 0x16ed2(%rip), %rax     # 0x1fc88
movq %rax, -0x60(%rbp)
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
leaq -0x58(%rbp), %rax
movq (%rax), %rcx
movq %rcx, (%rsp)
movq 0x8(%rax), %rcx
movq %rcx, 0x8(%rsp)
movq 0x10(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x17c30
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x80, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movq $0x0, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0x9969
movq -0x18(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x17080
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rax
movl 0x4(%rax), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x28(%rbp), %rax
movl 0xc(%rax), %r8d
movq -0x28(%rbp), %rax
movzwl (%rax), %eax
movl %eax, %edi
leaq 0x15777(%rip), %rax     # 0x1f0c0
movq (%rax,%rdi,8), %r9
leaq 0x1088b(%rip), %rdi     # 0x1a1df
movb $0x0, %al
callq 0x4990
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x98f8
addq $0x30, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x18(%rbp)
leaq -0x10(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x3060
movq -0x18(%rbp), %rdi
movl $0x80000, %esi          # imm = 0x80000
xorl %edx, %edx
movb $0x0, %al
callq 0x3090
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
jge 0x9c1f
jmp 0x9db8
leaq -0x1c(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
xorl %esi, %esi
leaq -0x30(%rbp), %rdx
callq 0x9de0
movl -0x1c(%rbp), %edi
leaq -0xc0(%rbp), %rsi
callq 0x30f0
movl %eax, -0xc4(%rbp)
cmpl $0x0, -0xc4(%rbp)
jge 0x9c63
movl $0x1, -0xc8(%rbp)
jmp 0x9daf
movq -0x90(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rdi
incq %rdi
movups 0x15ffe(%rip), %xmm0    # 0x1fc80
movaps %xmm0, -0xf0(%rbp)
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x170c0
movq %rax, -0x128(%rbp)
jmp 0x9ca5
movq -0x128(%rbp), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xd8(%rbp)
jne 0x9cec
movl $0x1, -0xc8(%rbp)
jmp 0x9daf
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xf8(%rbp)
movl %eax, -0xfc(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9e10
jmp 0x9dc9
movl -0x1c(%rbp), %edi
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
callq 0x30d0
movq %rax, -0x130(%rbp)
jmp 0x9d0b
movq -0x130(%rbp), %rax
movq %rax, -0x108(%rbp)
movq -0x108(%rbp), %rax
cmpq -0xd0(%rbp), %rax
jae 0x9d69
movq -0xd8(%rbp), %rdi
movq -0xd0(%rbp), %rsi
incq %rsi
movups 0x15f3f(%rip), %xmm0    # 0x1fc80
movaps %xmm0, -0x120(%rbp)
movq -0x120(%rbp), %rdx
movq -0x118(%rbp), %rcx
callq 0x170f0
jmp 0x9d5d
movl $0x1, -0xc8(%rbp)
jmp 0x9daf
movq -0xd0(%rbp), %rax
incq %rax
movq %rax, -0x10(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0xd0(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x17130
movq %rax, -0x138(%rbp)
jmp 0x9d9b
movq -0x138(%rbp), %rax
movb $0x0, (%rax)
movl $0x1, -0xc8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x9e10
movq -0x10(%rbp), %rax
movq -0x8(%rbp), %rdx
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
movq -0xf8(%rbp), %rdi
callq 0x3100
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, %rax
movq %rax, -0x30(%rbp)
movl %esi, -0x4(%rbp)
movq %rdx, -0x10(%rbp)
movl -0x4(%rbp), %eax
movl %eax, (%rdi)
movq $0x0, 0x8(%rdi)
movq -0x10(%rbp), %rdi
shlq $0x0, %rdi
movq 0x15e0a(%rip), %rax     # 0x1fc80
movq %rax, -0x20(%rbp)
movq 0x15e07(%rip), %rax     # 0x1fc88
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x170c0
movq -0x28(%rbp), %rdi
movq %rax, 0x10(%rdi)
movq -0x10(%rbp), %rax
movq %rax, 0x18(%rdi)
cmpq $0x0, 0x10(%rdi)
je 0x9eab
jmp 0x9eca
leaq 0x103cb(%rip), %rdi     # 0x1a27d
leaq 0x103d7(%rip), %rsi     # 0x1a290
movl $0x3e, %edx
leaq 0x103d6(%rip), %rcx     # 0x1a29b
callq 0x3080
movq -0x30(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x28(%rbp)
movq %rdi, -0x20(%rbp)
movq %rsi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movl $0x80441, %esi          # imm = 0x80441
movl $0x1b6, %edx            # imm = 0x1B6
movb $0x0, %al
callq 0x3090
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
jge 0x9f31
movq -0x28(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x3060
movq -0x28(%rbp), %rax
movl -0x14(%rbp), %ecx
movl %ecx, (%rax)
jmp 0x9f41
movq -0x28(%rbp), %rdi
movl -0x14(%rbp), %esi
movq -0x10(%rbp), %rdx
callq 0x9e40
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %sil, %al
movq %rdi, -0x8(%rbp)
andb $0x1, %al
movb %al, -0x9(%rbp)
testb $0x1, -0x9(%rbp)
je 0xa1a8
movq -0x8(%rbp), %rax
cmpl $0x0, (%rax)
jl 0xa1a8
movq -0x8(%rbp), %rax
movl (%rax), %edi
callq 0x3120
movq -0x8(%rbp), %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa1fc
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
shlq $0x0, %rsi
movq 0x15ab2(%rip), %rax     # 0x1fc80
movq %rax, -0x20(%rbp)
movq 0x15aaf(%rip), %rax     # 0x1fc88
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x170f0
movq -0x8(%rbp), %rdi
addq $0x8, %rdi
movl $0x18, %esi
callq 0x16f80
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x30, %rsp
movb %dl, %al
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
andb $0x1, %al
movb %al, -0x12(%rbp)
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jne 0xa24d
testb $0x1, -0x12(%rbp)
je 0xa24d
leaq 0x100bc(%rip), %rdi     # 0x1a302
movb $0x0, %al
callq 0x4990
jmp 0xa24f
movq -0x8(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0xa317
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0xa2c0
movq -0x20(%rbp), %rax
movb (%rax), %al
movb %al, -0x21(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
movsbl -0x21(%rbp), %eax
cmpl $0xd, %eax
jne 0xa2b1
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0xa2af
movq -0x20(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0xa2af
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0xa2c0
movsbl -0x21(%rbp), %eax
cmpl $0xa, %eax
jne 0xa2bc
jmp 0xa2c0
jmp 0xa2be
jmp 0xa265
testb $0x1, -0x12(%rbp)
je 0xa2e7
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
leaq 0x10029(%rip), %rdi     # 0x1a307
movb $0x0, %al
callq 0x4990
jmp 0xa30a
movq -0x20(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %esi
movq -0x8(%rbp), %rdx
leaq 0x1000c(%rip), %rdi     # 0x1a30b
movb $0x0, %al
callq 0x4990
movb $0x1, -0x12(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa24f
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x40(%rbp)
movq %rdi, %rax
movq %rax, -0x38(%rbp)
movq %rsi, -0x8(%rbp)
xorl %esi, %esi
movl $0x18, %edx
callq 0x3060
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x41, (%rax)
je 0xc4c1
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rdi
leaq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0xc870
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xc484
movq -0x40(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq 0x1381a(%rip), %rax     # 0x1fc80
movq %rax, -0x30(%rbp)
movq 0x13817(%rip), %rax     # 0x1fc88
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x173d0
jmp 0xc4bc
jmp 0xc486
movq -0x10(%rbp), %rax
cmpq $0x41, (%rax)
jne 0xc492
jmp 0xc4ba
movq -0x10(%rbp), %rax
cmpq $0x21, (%rax)
jne 0xc4aa
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
jmp 0xc4ba
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x10(%rbp)
jmp 0xc4b8
jmp 0xc486
jmp 0xc4bc
jmp 0xc427
movq -0x38(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: cphinton42[P]hinton-language/src/scope.cpp
// Function: fnv1a_64(Array<char>)
u64 fnv1a_64(String s)
{
    const u64 offset_basis = 14695981039346656037UL;
    const u64 FNV_prime = 1099511628211UL;
    
    u64 hash = offset_basis;
    
    for(u64 i = 0; i < s.count; ++i)
    {
        hash ^= s.data[i];
        hash *= FNV_prime;
    }
    return hash;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movabsq $-0x340d631b7bdddcdb, %rax # imm = 0xCBF29CE484222325
movq %rax, -0x18(%rbp)
movabsq $0x100000001b3, %rax    # imm = 0x100000001B3
movq %rax, -0x20(%rbp)
movabsq $-0x340d631b7bdddcdb, %rax # imm = 0xCBF29CE484222325
movq %rax, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0xc54e
movq -0x8(%rbp), %rax
movq -0x30(%rbp), %rcx
movsbq (%rax,%rcx), %rax
xorq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movabsq $0x100000001b3, %rax    # imm = 0x100000001B3
imulq -0x28(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0xc50e
movq -0x28(%rbp), %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x40, %rsp
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movb $0x1, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x30, %esi
callq 0xcd80
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x10, %ecx
movq %rdx, %rsi
callq 0xd380
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq -0x10(%rbp), %rax
jae 0xc641
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rsi
leaq -0x10(%rbp), %rdi
callq 0x16fb0
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rcx
movq (%rax), %r9
xorl %eax, %eax
movl %eax, %r8d
movl $0x2, %edx
movq %r8, %rsi
callq 0xd730
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xc5ef
movq -0x18(%rbp), %rax
movb 0x10(%rax), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0xcd1c
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xcd80
movq %rax, -0x8(%rbp)
jmp 0xcd74
cmpl $0x1, -0x14(%rbp)
jne 0xcd2c
movq $0x0, -0x8(%rbp)
jmp 0xcd74
cmpl $0x2, -0x14(%rbp)
jne 0xcd51
leaq 0xd0e9(%rip), %rdi      # 0x19e22
leaq 0xd6a5(%rip), %rsi      # 0x1a3e5
movl $0x19, %edx
leaq 0xd6b0(%rip), %rcx      # 0x1a3fc
callq 0x3080
jmp 0xcd53
jmp 0xcd55
leaq 0xd0c6(%rip), %rdi      # 0x19e22
leaq 0xd682(%rip), %rsi      # 0x1a3e5
movl $0x1d, %edx
leaq 0xd68d(%rip), %rcx      # 0x1a3fc
callq 0x3080
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xd063
movq $0x0, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
xorl %eax, %eax
cmpq $0x0, -0x28(%rbp)
movb %al, -0x31(%rbp)
je 0xd001
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
cmpq -0x18(%rbp), %rax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0xd00a
jmp 0xd01f
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
jmp 0xcfe3
cmpq $0x0, -0x28(%rbp)
je 0xd061
cmpq $0x0, -0x20(%rbp)
je 0xd03d
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
jmp 0xd04c
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd092
jmp 0xd063
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jae 0xd085
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x15f40
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
addq -0x20(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
addq $0x7, %rax
andq $-0x8, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0xd152
movq -0x40(%rbp), %rax
movq -0x30(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0x48(%rbp)
movq -0x30(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x48(%rbp), %rdx
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rcx
subq %rdx, %rcx
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xcd80
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rax
cmpq -0x30(%rbp), %rax
je 0xd148
movq -0x50(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
shlq $0x0, %rdx
callq 0x17470
movq -0x50(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd191
cmpq $0x0, -0x28(%rbp)
jne 0xd163
movq $0x0, -0x8(%rbp)
jmp 0xd191
movq -0x10(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xcd80
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
shlq $0x0, %rdx
callq 0x17470
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_reset(Pool_Allocator*)
void pool_reset(Pool_Allocator *pool)
{
    if(pool->current_block)
    {
        pool->current_point = pool->current_block->memory;
#ifdef USE_DEBUG_MEMORY_PATTERN
        u64 size = pool->current_end - pool->current_point;
        fill_memory(pool->current_point, MEMORY_PATTERN, size);
#endif
    }
    if(pool->used_blocks)
    {
        Block_Header *block = pool->used_blocks;
        
        while(block->next)
        {
#ifdef USE_DEBUG_MEMORY_PATTERN
            u64 size = block->size - sizeof(Block_Header);
            fill_memory(block->memory, MEMORY_PATTERN, size);
#endif
            block = block->next;
        }
#ifdef USE_DEBUG_MEMORY_PATTERN
        u64 size = block->size - sizeof(Block_Header);
        fill_memory(block->memory, MEMORY_PATTERN, size);
#endif
        block->next = pool->free_blocks;
        pool->free_blocks = pool->used_blocks;
        pool->used_blocks = nullptr;
    }
    pool->mark = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xd1c5
movq -0x8(%rbp), %rax
movq (%rax), %rcx
addq $0x10, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xd21e
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0xd1f3
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0xd1dc
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xd25d
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xd2d0
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0xd281
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0xd2d0
movq -0x8(%rbp), %rax
movq $0x0, 0x20(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0xd2a5
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xd2d0
movq -0x8(%rbp), %rax
movq $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
addq $0x10, %rsp
popq %rbp
retq
nop
// File: 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 %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xd309
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3070
movq -0x10(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xd2dc
addq $0x10, %rsp
popq %rbp
retq
nop
// File: cphinton42[P]hinton-language/src/scope.cpp
// Function: compute_hash64(Atom)
u64 compute_hash64(Atom a) {
    u64 x = (u64)a.str;
    x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9UL;
    x = (x ^ (x >> 27)) * 0x94d049bb133111ebUL;
    x = x ^ (x >> 31);
    return x;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
shrq $0x1e, %rcx
xorq %rcx, %rax
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
imulq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
shrq $0x1b, %rcx
xorq %rcx, %rax
movabsq $-0x6b2fb644ecceee15, %rcx # imm = 0x94D049BB133111EB
imulq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq -0x10(%rbp), %rcx
shrq $0x1f, %rcx
xorq %rcx, %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x50, %rsp
movb %r8b, %al
movq %rsi, -0x10(%rbp)
movq %rdi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
andb $0x1, %al
movb %al, -0x29(%rbp)
movq -0x18(%rbp), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rdx
movq -0x40(%rbp), %rsi
callq 0x178b0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
je 0xd5a4
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0xd5a4
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x8(%rbp)
jmp 0xd5de
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0xd5bd
xorl %eax, %eax
cmpq $0x0, -0x18(%rbp)
movb %al, -0x41(%rbp)
je 0xd5cf
movb -0x29(%rbp), %al
movb %al, -0x41(%rbp)
movb -0x41(%rbp), %al
testb $0x1, %al
jne 0xd560
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: 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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rsi, -0x18(%rbp)
movq %rdx, -0x10(%rbp)
movq %rdi, -0x20(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0xc4d0
movq %rax, -0x28(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x28(%rbp), %rcx
movq -0x50(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x17a50
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x40(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
jne 0xd70e
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movl $0x10, %esi
callq 0xcd80
movq %rax, -0x58(%rbp)
cmpq $0x0, -0x58(%rbp)
je 0xd684
jmp 0xd6a3
leaq 0xce4b(%rip), %rdi      # 0x1a4d6
leaq 0xce4c(%rip), %rsi      # 0x1a4de
movl $0x52, %edx
leaq 0xce4e(%rip), %rcx      # 0x1a4ec
callq 0x3080
movq -0x18(%rbp), %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rdi
addq $0x20, %rdi
movq -0x18(%rbp), %rsi
shlq $0x0, %rsi
callq 0xcd80
movq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
shlq $0x0, %rdx
callq 0x17470
movq -0x58(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x20(%rbp), %rdi
movq -0x40(%rbp), %rsi
movq -0x28(%rbp), %rdx
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rcx
callq 0x17b60
jmp 0xd722
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)
// File: cphinton42[P]hinton-language/src/stb/stb_sprintf.h
// Function: stbsp__real_to_parts(long long*, int*, double)
static stbsp__int32 stbsp__real_to_parts( stbsp__int64 * bits, stbsp__int32 * expo, double value )
{
  double d;
  stbsp__int64 b = 0;

  // load value and round at the frac_digits
  d = value;

  STBSP__COPYFP( b, d );

  *bits = b & ((((stbsp__uint64)1)<<52)-1);
  *expo = (stbsp__int32) (((b >> 52) & 2047)-1023);
    
  return (stbsp__int32)(b >> 63);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movsd %xmm0, -0x18(%rbp)
movq $0x0, -0x28(%rbp)
movsd -0x18(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x2c(%rbp)
cmpl $0x8, -0x2c(%rbp)
jge 0x1162b
movslq -0x2c(%rbp), %rax
movb -0x20(%rbp,%rax), %cl
movslq -0x2c(%rbp), %rax
movb %cl, -0x28(%rbp,%rax)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x1160a
movabsq $0xfffffffffffff, %rcx  # imm = 0xFFFFFFFFFFFFF
andq -0x28(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x28(%rbp), %rax
sarq $0x34, %rax
andq $0x7ff, %rax            # imm = 0x7FF
subq $0x3ff, %rax            # imm = 0x3FF
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
sarq $0x3f, %rax
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0x4(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
movl -0x4(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x116a0
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movb $0x2d, 0x1(%rax)
jmp 0x116da
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x116bc
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movb $0x20, 0x1(%rax)
jmp 0x116d8
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x116d6
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movq -0x10(%rbp), %rax
movb $0x2b, 0x1(%rax)
jmp 0x116d8
jmp 0x116da
popq %rbp
retq
nopl (%rax)
// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x240, %rsp            # imm = 0x240
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
cmpl $0x0, -0x14(%rbp)
jne 0x11d4c
movl $0x0, -0x4(%rbp)
jmp 0x11dd3
movq -0x10(%rbp), %rax
movq %rax, -0x238(%rbp)
movl -0x14(%rbp), %eax
movl %eax, -0x230(%rbp)
xorl %eax, %eax
movl %eax, %edi
leaq -0x238(%rbp), %rsi
xorl %edx, %edx
callq 0x11de0
movq %rax, %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq 0x5c(%rip), %rdi        # 0x11de0
leaq -0x238(%rbp), %rsi
callq 0xe550
movq -0x238(%rbp), %rax
movq -0x10(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x23c(%rbp)
movl -0x23c(%rbp), %eax
cmpl -0x14(%rbp), %eax
jl 0x11dbb
movl -0x14(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x23c(%rbp)
movq -0x10(%rbp), %rax
movslq -0x23c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movl -0x23c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x240, %rsp            # imm = 0x240
popq %rbp
retq
nop
// File: 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:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x1c(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jle 0x11e0d
movq -0x28(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x1c(%rbp)
cmpl $0x0, -0x1c(%rbp)
je 0x11e92
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
cmpq (%rcx), %rax
je 0x11e70
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movslq -0x1c(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %cl
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x38(%rbp)
movb %cl, (%rax)
movq -0x30(%rbp), %rax
cmpq -0x40(%rbp), %rax
jb 0x11e42
jmp 0x11e70
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rax
movq (%rax), %rcx
movslq %edx, %rdx
addq %rdx, %rcx
movq %rcx, (%rax)
movl -0x1c(%rbp), %edx
movq -0x28(%rbp), %rax
movl 0x8(%rax), %ecx
subl %edx, %ecx
movl %ecx, 0x8(%rax)
movq -0x28(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jg 0x11ea6
movq $0x0, -0x8(%rbp)
jmp 0x11ed4
movq -0x28(%rbp), %rax
cmpl $0x200, 0x8(%rax)       # imm = 0x200
jl 0x11ec0
movq -0x28(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x11ecc
movq -0x28(%rbp), %rax
addq $0xc, %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: cphinton42[P]hinton-language/src/parse.cpp
// Function: make_ident_ast(Token)
internal Ident_AST make_ident_ast(Token ident)
{
    Ident_AST result;
    result.type = AST_Type::ident_ast;
    result.flags = 0;
    result.s = next_serial++;
    result.line_number = ident.line_number;
    result.line_offset = ident.line_offset;
    result.types_count = 0;
    result.resolved_type = nullptr;
    result.ident = ident.contents;
    result.scope_index = 0;
    result.scope = nullptr;
    return result;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
leaq 0x10(%rbp), %rcx
movw $0x7, (%rdi)
movw $0x0, 0x2(%rdi)
movl 0xcf64(%rip), %edx      # 0x1fc90
movl %edx, %esi
addl $0x1, %esi
movl %esi, 0xcf59(%rip)      # 0x1fc90
movl %edx, 0x4(%rdi)
movl 0x8(%rcx), %edx
movl %edx, 0x8(%rdi)
movl 0xc(%rcx), %edx
movl %edx, 0xc(%rdi)
movq $0x0, 0x10(%rdi)
movq $0x0, 0x18(%rdi)
movq 0x10(%rcx), %rdx
movq %rdx, 0x20(%rdi)
movq 0x18(%rcx), %rcx
movq %rcx, 0x28(%rdi)
movq $0x0, 0x30(%rdi)
movq $0x0, 0x38(%rdi)
popq %rbp
retq
nopl (%rax,%rax)
// File: cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: allocate_block(unsigned long)
internal
Block_Header* allocate_block(u64 block_size)
{
    // TODO: try out allocating large pages?
    print_err("INFO: allocating block\n");
    void *memory = mmap(nullptr, block_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
    if(memory == MAP_FAILED)
    {
        return nullptr;
    }
    else
    {
        Block_Header *result = static_cast<Block_Header*>(memory);
        result->next = nullptr;
        result->size = block_size;
#ifdef USE_DEBUG_MEMORY_PATTERN
        byte *start = result->memory;
        u64 size = block_size - sizeof(Block_Header);
        fill_memory(start, MEMORY_PATTERN, size);
#endif
        return result;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
leaq 0x534d(%rip), %rdi      # 0x1b2a0
movb $0x0, %al
callq 0x4990
movq -0x10(%rbp), %rsi
xorl %eax, %eax
movl %eax, %r9d
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
movq %r9, %rdi
callq 0x3110
movq %rax, -0x18(%rbp)
movq $-0x1, %rax
cmpq %rax, -0x18(%rbp)
jne 0x15f96
movq $0x0, -0x8(%rbp)
jmp 0x15fbd
movq -0x18(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movq -0x10(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: cphinton42[P]hinton-language/src/basic.h
// Function: bool operator==<char>(Array<char>, Array<char>)
bool operator==(Array<T> a1, Array<T> a2)
{
    if(a1.count == a2.count)
    {
        for(u64 i = 0; i < a1.count; ++i)
        {
            if(a1[i] != a2[i])
            {
                return false;
            }
        }
        return true;
    }
    else
    {
        return false;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x18(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x28(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x171fd
movq $0x0, -0x30(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x18(%rbp), %rax
jae 0x171f7
movq -0x30(%rbp), %rsi
leaq -0x18(%rbp), %rdi
callq 0x17130
movsbl (%rax), %eax
movl %eax, -0x34(%rbp)
movq -0x30(%rbp), %rsi
leaq -0x28(%rbp), %rdi
callq 0x17130
movq %rax, %rcx
movl -0x34(%rbp), %eax
movsbl (%rcx), %ecx
cmpl %ecx, %eax
je 0x171e7
movb $0x0, -0x1(%rbp)
jmp 0x17201
jmp 0x171e9
movq -0x30(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x30(%rbp)
jmp 0x171aa
movb $0x1, -0x1(%rbp)
jmp 0x17201
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x40, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x8(%rbp)
movq %rdi, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x17281
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
shlq $0x2, %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x1725c
movq $0x4, -0x20(%rbp)
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
callq 0x186d0
movq -0x18(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
callq 0x18890
movq -0x38(%rbp), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x10(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
addq $0x40, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: 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 %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8(%rax)
cmpq $0x0, -0x10(%rbp)
jbe 0x175ea
movq -0x10(%rbp), %rdi
shlq $0x3, %rdi
movq 0x875f(%rip), %rax      # 0x1fc80
movq %rax, -0x20(%rbp)
movq 0x875c(%rip), %rax      # 0x1fc88
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x170c0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x10(%rax)
imulq $0x18, -0x10(%rbp), %rdi
movq 0x872c(%rip), %rax      # 0x1fc80
movq %rax, -0x30(%rbp)
movq 0x8729(%rip), %rax      # 0x1fc88
movq %rax, -0x28(%rbp)
movq -0x30(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x170c0
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x17588
jmp 0x175a7
leaq 0x3e68(%rip), %rdi      # 0x1b3f7
leaq 0x3e6c(%rip), %rsi      # 0x1b402
movl $0x6d, %edx
leaq 0x3e6c(%rip), %rcx      # 0x1b40e
callq 0x3080
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x175b4
jmp 0x175d3
leaq 0x3eda(%rip), %rdi      # 0x1b495
leaq 0x3e40(%rip), %rsi      # 0x1b402
movl $0x6e, %edx
leaq 0x3e40(%rip), %rcx      # 0x1b40e
callq 0x3080
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rsi
shlq $0x3, %rsi
callq 0x16f80
jmp 0x17602
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x18(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)