LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::on_tick()
void on_tick() override {
        auto inbox = take_inbox();
        for(auto &mm : inbox) {
            auto const s = mm.first;
            auto &m = mm.second;
            switch(m.type) {
            case Message::Type::Write:
                process(s, std::move(m.data.write));
                break;
            case Message::Type::Read:
                process(s, std::move(m.data.read));
                break;
            case Message::Type::PrePrepare:
                process(s, std::move(m.data.preprepare));
                break;
            case Message::Type::Prepare:
                process(s, std::move(m.data.prepare));
                break;
            case Message::Type::Commit:
                process(s, std::move(m.data.commit));
                break;
            case Message::Type::WriteAck:
            case Message::Type::ReadAck:
            case Message::Type::Response:
                assert(not("Unreachable"));
            }
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq -0x38(%rbp), %rbx
movq %rbx, 0x8(%rbx)
movq %rbx, (%rbx)
movq $0x0, 0x10(%rbx)
leaq 0x48(%rdi), %rsi
movq %rbx, %rdi
callq 0x2200
movq 0x58(%r14), %rax
movq 0x10(%rbx), %rcx
movq %rcx, 0x58(%r14)
movq %rax, 0x10(%rbx)
movq (%rbx), %r15
cmpq %rbx, %r15
je 0x494f
leaq 0x19c8(%rip), %r12      # 0x62b4
movl 0x18(%r15), %eax
cmpq $0x7, %rax
ja 0x4947
movq 0x10(%r15), %rsi
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
leaq 0x20(%r15), %rdx
movq %r14, %rdi
callq 0x49c2
jmp 0x4947
leaq 0x20(%r15), %rdx
movq %r14, %rdi
callq 0x4a66
jmp 0x4947
leaq 0x20(%r15), %rdx
movq %r14, %rdi
callq 0x4c3e
jmp 0x4947
leaq 0x20(%r15), %rdx
movq %r14, %rdi
callq 0x4bb6
jmp 0x4947
leaq 0x20(%r15), %rdx
movq %r14, %rdi
callq 0x4b24
movq (%r15), %r15
cmpq %rbx, %r15
jne 0x48ec
movq -0x38(%rbp), %rdi
cmpq %rbx, %rdi
je 0x496d
movq (%rdi), %r14
movl $0x50, %esi
callq 0x2140
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x4958
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1790(%rip), %rdi      # 0x6111
leaq 0x1c2a(%rip), %rsi      # 0x65b2
leaq 0x1c4a(%rip), %rcx      # 0x65d9
movl $0xa1, %edx
callq 0x20c0
movq %rax, %r14
movq -0x38(%rbp), %rdi
cmpq %rbx, %rdi
je 0x49ba
movq (%rdi), %r15
movl $0x50, %esi
callq 0x2140
movq %r15, %rdi
cmpq %rbx, %r15
jne 0x49a5
movq %r14, %rdi
callq 0x21f0
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::WriteOpRequest&&)
void process(uintptr_t sender, Message::WriteOpRequest &&msg) {
        if(_role != Role::Primary)
            return; // only primary reacts on client requests. Change-view in TODO
        auto p = prepreare(sender, std::move(msg));
        if(_state.preprepare(p.view, p.req_id))
            broadcast(std::move(p));
    }

// Assembly:
cmpl $0x0, 0x74(%rdi)
je 0x49c9
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movslq (%rdx), %rax
movq %rax, -0x38(%rbp)
callq 0x23dc
movq %rax, %r13
movl (%r15), %eax
movl %eax, -0x2c(%rbp)
movl 0x78(%rbx), %r15d
movl 0x5721(%rip), %r12d     # 0xa124
incl %r12d
movl %r12d, 0x5717(%rip)     # 0xa124
leaq 0x60(%rbx), %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4c8a
testb %al, %al
je 0x4a57
shrq %r13
addq -0x38(%rbp), %r13
leaq -0x70(%rbp), %rsi
movl $0x5, (%rsi)
xorl %eax, %eax
movl %eax, 0x8(%rsi)
movl -0x2c(%rbp), %ecx
movl %ecx, 0x10(%rsi)
movq %r13, 0x18(%rsi)
movq %r14, 0x20(%rsi)
movl %r15d, 0x28(%rsi)
movl %r12d, 0x2c(%rsi)
movl %eax, 0x30(%rsi)
movq %rbx, %rdi
callq 0x27cc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::ReadOpRequest&&)
void process(uintptr_t sender, Message::ReadOpRequest &&msg) {
        if(_role != Role::Primary)
            return; // only primary reacts on client requests. Change-view in TODO
        auto p = prepreare(sender, std::move(msg));
        if(_state.preprepare(p.view, p.req_id))
            broadcast(std::move(p));
    }

// Assembly:
cmpl $0x0, 0x74(%rdi)
je 0x4a6d
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
movq (%rdx), %rax
movq %rax, -0x38(%rbp)
callq 0x23dc
movq %rax, %r13
movq (%r15), %rax
movq %rax, -0x30(%rbp)
movl 0x78(%rbx), %r15d
movl 0x567c(%rip), %r12d     # 0xa124
incl %r12d
movl %r12d, 0x5672(%rip)     # 0xa124
leaq 0x60(%rbx), %rdi
movl %r15d, %esi
movl %r12d, %edx
callq 0x4c8a
testb %al, %al
je 0x4b14
shrq %r13
movabsq $0x2000000000000000, %rax # imm = 0x2000000000000000
addq %r13, %rax
movq -0x38(%rbp), %rcx
addq %rax, %rcx
leaq -0x70(%rbp), %rsi
movl $0x5, (%rsi)
movl $0x2, 0x8(%rsi)
movq -0x30(%rbp), %rax
movq %rax, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r14, 0x20(%rsi)
movl %r15d, 0x28(%rsi)
movl %r12d, 0x2c(%rsi)
movl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x27cc
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::PrePrepare&&)
void process(uintptr_t sender[[gnu::unused]], Message::PrePrepare &&msg) {
        if(_role == Role::Primary)
            return; // only replicas react on preprepare
        if(!verify_message(msg))
            return;
        if(_state.preprepare(msg.view, msg.req_id) && _state.prepare(msg.view, msg.req_id))
            broadcast(prepare(std::move(msg)));
    }

// Assembly:
cmpl $0x0, 0x74(%rdi)
je 0x4bb5
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x4cc4
testb %al, %al
je 0x4bab
leaq 0x60(%rbx), %r15
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4c8a
testb %al, %al
je 0x4bab
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4e3a
testb %al, %al
je 0x4bab
movq 0x20(%r14), %rax
leaq -0x50(%rbp), %rsi
movq %rax, 0x28(%rsi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movl $0x6, (%rsi)
movl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x27cc
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::Prepare&&)
void process(uintptr_t sender[[gnu::unused]], Message::Prepare &&msg) {
        if(!verify_message(msg))
            return;
        if(_state.prepare(msg.view, msg.req_id) && _state.commit(msg.view, msg.req_id))
            broadcast(commit(std::move(msg)));
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x38, %rsp
movq %rdx, %r14
movq %rdi, %rbx
movq %rdx, %rsi
callq 0x4e84
testb %al, %al
je 0x4c33
leaq 0x60(%rbx), %r15
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4e3a
testb %al, %al
je 0x4c33
movl 0x20(%r14), %esi
movl 0x24(%r14), %edx
movq %r15, %rdi
callq 0x4ffa
testb %al, %al
je 0x4c33
movq 0x20(%r14), %rax
leaq -0x50(%rbp), %rsi
movq %rax, 0x28(%rsi)
movups (%r14), %xmm0
movups 0x10(%r14), %xmm1
movups %xmm1, 0x18(%rsi)
movups %xmm0, 0x8(%rsi)
movl $0x7, (%rsi)
movl $0x0, 0x30(%rsi)
movq %rbx, %rdi
callq 0x27cc
addq $0x38, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::process(unsigned long, Message::Commit&&)
void process(uintptr_t sender[[gnu::unused]], Message::Commit &&msg) {
        if(!verify_message(msg))
            return;
        if(_state.commit(msg.view, msg.req_id) && _state.state() == State::Type::Committed)
            success(msg.client, msg.msg);
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r14
movq %rdx, %rsi
callq 0x5044
testb %al, %al
je 0x4c84
leaq 0x60(%r14), %rdi
movl 0x20(%rbx), %esi
movl 0x24(%rbx), %edx
callq 0x4ffa
testb %al, %al
je 0x4c84
cmpl $0x5, 0x60(%r14)
jne 0x4c84
movq 0x18(%rbx), %rsi
movq %r14, %rdi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %rbp
jmp 0x51ba
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: State::prepare(unsigned int, unsigned int)
bool prepare(uint32_t view, uint32_t req_id) {
        if(_view != view || _req_id != req_id)
            return false;
        switch(_state) {
        case Type::Init:
            return false;
        case Type::PrePrepare:
            _state = Type::Prepare;
            _approves = 0;
            FALLTHROUGH;
        case Type::Prepare:
            ++_approves;
            if(_approves >= _f * 2) {
                _state = Type::Prepared;
                _approves = 1;
            }
            return true;
        case Type::Prepared:
        case Type::Commit:
        case Type::Committed:
            return false;
        }
        return false; // happy gcc
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpl %esi, 0x8(%rdi)
jne 0x4e81
cmpl %edx, 0xc(%rdi)
jne 0x4e81
movl (%rdi), %eax
cmpl $0x2, %eax
je 0x4e5d
cmpl $0x1, %eax
jne 0x4e7f
movq $0x2, (%rdi)
movl 0x4(%rdi), %ecx
movl 0x10(%rdi), %edx
incl %ecx
movl %ecx, 0x4(%rdi)
addl %edx, %edx
movb $0x1, %al
cmpl %edx, %ecx
jl 0x4e81
movabsq $0x100000003, %rcx      # imm = 0x100000003
movq %rcx, (%rdi)
jmp 0x4e81
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/./pbft.h
// Function: PBFTNode::success(unsigned long, Message::OpRequestMessage const&)
void success(uintptr_t client, Message::OpRequestMessage const &msg) {
        if(_success_strategy == nullptr)
            return;
        auto answer = _success_strategy->accept(msg);
        auto sig = signature(digest(answer), id());
        send_to(client, Message::Response{std::move(answer), sig});
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq 0x90(%rdi), %rsi
testq %rsi, %rsi
je 0x52b0
movq %rdi, %r14
movq (%rsi), %rax
leaq -0x30(%rbp), %r15
movq %r15, %rdi
callq *0x10(%rax)
movl (%r15), %eax
movl %eax, -0x68(%rbp)
cmpl $0x7, %eax
ja 0x5219
movq -0x28(%rbp), %rcx
cmpl $0x1, %eax
je 0x520d
cmpl $0x3, %eax
jne 0x52bb
movq %rcx, -0x60(%rbp)
jmp 0x5219
movq -0x20(%rbp), %rdx
movq %rcx, -0x60(%rbp)
movq %rdx, -0x58(%rbp)
movl $0x0, -0x38(%rbp)
cmpl $0x3, %eax
ja 0x52da
movl %eax, %eax
leaq 0x1132(%rip), %rcx      # 0x6364
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movslq -0x60(%rbp), %r15
jmp 0x5272
movabsq $0x2000000000000000, %r15 # imm = 0x2000000000000000
addq -0x60(%rbp), %r15
jmp 0x5272
movslq -0x5c(%rbp), %rax
movabsq $0x3000000000000000, %r15 # imm = 0x3000000000000000
addq %rax, %r15
jmp 0x5272
movabsq $0x1000000000000000, %r15 # imm = 0x1000000000000000
addq -0x58(%rbp), %r15
movq %r14, %rdi
callq 0x23dc
shrq %rax
addq %r15, %rax
movq -0x20(%rbp), %rcx
leaq -0x68(%rbp), %rdx
movq %rcx, 0x18(%rdx)
movups -0x30(%rbp), %xmm0
movups %xmm0, 0x8(%rdx)
movl $0x4, (%rdx)
movq %rax, 0x20(%rdx)
movl $0x0, 0x30(%rdx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2644
addq $0x58, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe4f(%rip), %rdi       # 0x6111
leaq 0x1202(%rip), %rsi      # 0x64cb
leaq 0x120a(%rip), %rcx      # 0x64da
movl $0x77, %edx
callq 0x20c0
movq 0x4cf7(%rip), %rdi      # 0x9fd8
leaq -0x68(%rbp), %rsi
callq 0x407f
movq %rax, %rdi
callq 0x2090
leaq 0xe18(%rip), %rdi       # 0x6111
leaq 0x11a1(%rip), %rsi      # 0x64a1
leaq 0x11a5(%rip), %rcx      # 0x64ac
movl $0x26, %edx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/frolosofsky[P]pbft/main.cpp
// Function: PBFT_DB::accept(Message::OpRequestMessage const&)
Message::OpResponseMessage accept(Message::OpRequestMessage const &msg) override {
        switch(msg.type) {
        case Message::Type::Write:
            return accept(msg.data.write);
        case Message::Type::Read:
            return accept(msg.data.read);
        case Message::Type::WriteAck:
        case Message::Type::ReadAck:
        case Message::Type::Response:
        case Message::Type::PrePrepare:
        case Message::Type::Prepare:
        case Message::Type::Commit:
            assert(not("Unreachable"));
        }
        return Message::ReadOpResponse{false, 0}; // happy gcc
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rdx), %eax
cmpq $0x7, %rax
ja 0x53d9
leaq 0xfe4(%rip), %rcx       # 0x6374
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
addq $0x8, %rdx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x542e
movl $0x1, (%rbx)
movb %al, 0x8(%rbx)
movl $0x10, %eax
jmp 0x5400
movq 0x8(%rdx), %rax
movq 0x8(%rsi), %rdx
movq 0x10(%rsi), %rcx
subq %rdx, %rcx
sarq $0x2, %rcx
cmpq %rcx, %rax
jae 0x53e8
movl (%rdx,%rax,4), %esi
shlq $0x20, %rsi
jmp 0x53ea
movl $0x3, (%rbx)
movl $0x8, %eax
xorl %edx, %edx
jmp 0x5400
xorl %esi, %esi
xorl %edx, %edx
cmpq %rcx, %rax
setb %dl
orq %rsi, %rdx
movl $0x3, (%rbx)
movl $0x8, %eax
movq %rdx, (%rbx,%rax)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0xcfc(%rip), %rdi       # 0x6111
leaq 0x1059(%rip), %rsi      # 0x6475
leaq 0x11d7(%rip), %rcx      # 0x65fa
movl $0x14, %edx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
pushq %rax
movq %rdi, %rbx
movq 0x28(%rdi), %r14
movq 0x30(%rdi), %r15
cmpq %r15, %r14
je 0x5808
movq (%r14), %rdi
callq 0x2ca8
addq $0x10, %r14
jmp 0x57f5
movq 0x10(%rbx), %r14
movq 0x18(%rbx), %r15
cmpq %r15, %r14
je 0x5829
movq (%r14), %rdi
testq %rdi, %rdi
je 0x5823
movq (%rdi), %rax
callq *0x10(%rax)
addq $0x10, %r14
jmp 0x5810
movq (%rbx), %rdi
movl 0x60(%rdi), %eax
cmpl 0x64(%rdi), %eax
jne 0x5881
cmpq $0x0, 0x50(%rbx)
je 0x5881
movq 0x40(%rbx), %rsi
addq $0x10, %rsi
movq 0x10(%rbx), %rax
movq 0x18(%rbx), %rcx
xorl %edx, %edx
cmpq %rcx, %rax
je 0x585f
cmpq $0x1, (%rax)
sbbl $-0x1, %edx
addq $0x10, %rax
jmp 0x584d
callq 0x5894
movq 0x40(%rbx), %r14
decq 0x50(%rbx)
movq %r14, %rdi
callq 0x21b0
movl $0x20, %esi
movq %r14, %rdi
callq 0x2140
movq (%rbx), %rdi
movq (%rdi), %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *0x10(%rax)
// File: /workspace/github_cpp_makefile_star2_O1/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 0x4724(%rip), %rdi      # 0x9fd8
leaq 0xdb2(%rip), %rsi       # 0x666d
movl $0x5, %edx
callq 0x2160
movl (%r15), %eax
movl %eax, -0x60(%rbp)
cmpq $0x7, %rax
ja 0x58ee
movq 0x8(%r15), %rcx
leaq 0xab8(%rip), %rdx       # 0x6394
movslq (%rdx,%rax,4), %rax
addq %rdx, %rax
jmpq *%rax
movl %ecx, -0x58(%rbp)
jmp 0x58ee
movq %rcx, -0x58(%rbp)
leaq -0x60(%rbp), %r12
movl $0x0, 0x30(%r12)
movq 0x46d6(%rip), %rdi      # 0x9fd8
movq %r12, %rsi
callq 0x407f
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20e0
movl (%r15), %eax
movl %eax, (%r12)
cmpq $0x7, %rax
ja 0x5962
leaq 0xa6c(%rip), %rcx       # 0x63b4
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl 0x8(%r15), %eax
movl %eax, -0x58(%rbp)
jmp 0x5962
movq 0x8(%r15), %rax
movq %rax, -0x58(%rbp)
xorl %r15d, %r15d
leaq -0x60(%rbp), %rsi
movl %r15d, 0x30(%rsi)
movq %r14, %rdi
callq 0x27cc
movl %r15d, 0x64(%r14)
movl %ebx, 0x60(%r14)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x77e(%rip), %rdi       # 0x6111
leaq 0xb31(%rip), %rsi       # 0x64cb
leaq 0xbc8(%rip), %rcx       # 0x6569
movl $0x66, %edx
callq 0x20c0
nop
// File: /workspace/github_cpp_makefile_star2_O1/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)
movw $0x0, 0x2(%rdi)
movl 0x1224a(%rip), %esi     # 0x15b78
leal 0x1(%rsi), %edi
movl %edi, 0x12241(%rip)     # 0x15b78
movl %esi, 0x4(%rax)
movl %edx, 0x8(%rax)
movl %ecx, 0xc(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0xd3ad(%rip), %rsi      # 0x10d06
xorl %eax, %eax
callq 0x39a0
testq %r15, %r15
je 0x397c
xorl %r12d, %r12d
movq (%r14,%r12,8), %rsi
movq %rbx, %rdi
callq 0x3a67
incq %r12
cmpq %r12, %r15
jne 0x3968
leaq 0xd394(%rip), %rsi      # 0x10d17
movq %rbx, %rdi
xorl %eax, %eax
callq 0x39a0
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x41df
// File: /workspace/github_cpp_makefile_star2_O1/cphinton42[P]hinton-language/src/io.cpp
// Function: print_buf(Print_Buffer*, char const*, ...)
void print_buf(Print_Buffer *pb, const byte *fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    vprint_buf(pb, fmt, args);
    va_end(args);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x20(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x3a00
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
movl $0x200, %eax            # imm = 0x200
addq 0x8(%rdi), %rax
cmpq %rax, 0x18(%rdi)
jae 0x3a37
movq %rbx, %rdi
callq 0x41df
movq 0x10(%rbx), %rdx
addq 0x8(%rbx), %rdx
leaq 0x3b2e(%rip), %rdi      # 0x7574
movq %rsp, %r8
movq %rbx, %rsi
movq %r14, %rcx
callq 0xa1c9
movq %rbx, %rdi
callq 0x41df
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x420a
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0x4229
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x4208
callq 0x3040
movq $0x0, 0x8(%rbx)
popq %rbx
retq
leaq 0xcf61(%rip), %rdi      # 0x11172
leaq 0xcf26(%rip), %rsi      # 0x1113e
leaq 0xcf5f(%rip), %rcx      # 0x1117e
movl $0x91, %edx
callq 0x3080
leaq 0xcf70(%rip), %rdi      # 0x111a0
leaq 0xcf07(%rip), %rsi      # 0x1113e
leaq 0xcf40(%rip), %rcx      # 0x1117e
movl $0x92, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O1/cphinton42[P]hinton-language/src/io.cpp
// Function: print_err(char const*, ...)
void print_err(const byte *fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    vprint_buf(&stderr_buf, fmt, args);
    va_end(args);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x42c2
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movl $0x200, %eax            # imm = 0x200
addq 0x11c3a(%rip), %rax     # 0x15f28
cmpq %rax, 0x11c43(%rip)     # 0x15f38
jae 0x4303
leaq 0x11c22(%rip), %rdi     # 0x15f20
callq 0x41df
leaq 0x11c16(%rip), %r14     # 0x15f20
movq 0x11c1f(%rip), %rdx     # 0x15f30
addq 0x11c10(%rip), %rdx     # 0x15f28
leaq 0x3255(%rip), %rdi      # 0x7574
movq %rsp, %r8
movq %r14, %rsi
movq %rbx, %rcx
callq 0xa1c9
movq %r14, %rdi
callq 0x41df
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
testq %rdi, %rdi
je 0x71e4
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
addq $0x10, %rbx
leaq 0xdf1d(%rip), %r13      # 0x150c0
leaq 0x9ee3(%rip), %r15      # 0x1108d
xorl %r12d, %r12d
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 0x4261
incq %r12
addq $0x18, %rbx
cmpq %r12, %r14
jne 0x71ad
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x7403
leaq 0x4(%rsp), %rcx
movq %rcx, 0x8(%rsp)
leaq 0x10(%rsp), %rsi
movl %eax, %edi
callq 0x30f0
testl %eax, %eax
js 0x73fc
movq 0x40(%rsp), %r15
leaq 0x1(%r15), %r14
movq 0xe7c1(%rip), %rdi      # 0x15b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq *0xe7aa(%rip)           # 0x15b68
movq %rax, %rbx
testq %rax, %rax
je 0x73fc
movl 0x4(%rsp), %edi
movq %rbx, %rsi
movq %r15, %rdx
callq 0x30d0
cmpq %r15, %rax
jae 0x7408
movq 0xe78f(%rip), %rdi      # 0x15b70
movl $0x2, %esi
movq %rbx, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq *0xe773(%rip)           # 0x15b68
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x740d
xorl %ebx, %ebx
xorl %r14d, %r14d
jmp 0x740d
xorl %r14d, %r14d
jmp 0x7419
movb $0x0, (%rbx,%r15)
movq 0x8(%rsp), %rax
movl (%rax), %edi
callq 0x3120
movq %r14, %rax
movq %rbx, %rdx
addq $0xa0, %rsp
popq %rbx
popq %r14
popq %r15
retq
jmp 0x742e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x744c
movq %rbx, %rdi
callq 0x3100
movq %rax, %rdi
callq 0xf249
nop
// File: /workspace/github_cpp_makefile_star2_O1/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)
movq $0x0, 0x8(%rdi)
movq 0xe6f4(%rip), %rdi      # 0x15b70
xorl %esi, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movq %r14, %r8
callq *0xe6dd(%rip)           # 0x15b68
movq %rax, 0x10(%rbx)
movq %r14, 0x18(%rbx)
testq %rax, %rax
je 0x74a3
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x9c81(%rip), %rdi      # 0x1112b
leaq 0x9c8d(%rip), %rsi      # 0x1113e
leaq 0x9c91(%rip), %rcx      # 0x11149
movl $0x3e, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O1/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 0x74f3
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
callq 0x7461
jmp 0x74ff
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_O1/cphinton42[P]hinton-language/src/io.cpp
// Function: print(char const*, ...)
void print(const byte *fmt, ...)
{
    va_list args;
    va_start(args, fmt);
    vprint_buf(&stdout_buf, fmt, args);
    va_end(args);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0xd8, %rsp
movq %rdi, %rbx
leaq 0x20(%rsp), %rdi
movq %rsi, 0x8(%rdi)
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0x760c
movaps %xmm0, 0x50(%rsp)
movaps %xmm1, 0x60(%rsp)
movaps %xmm2, 0x70(%rsp)
movaps %xmm3, 0x80(%rsp)
movaps %xmm4, 0x90(%rsp)
movaps %xmm5, 0xa0(%rsp)
movaps %xmm6, 0xb0(%rsp)
movaps %xmm7, 0xc0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0xf0(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000008, %rax     # imm = 0x3000000008
movq %rax, (%rsp)
movl $0x200, %eax            # imm = 0x200
addq 0xe8d0(%rip), %rax      # 0x15f08
cmpq %rax, 0xe8d9(%rip)      # 0x15f18
jae 0x764d
leaq 0xe8b8(%rip), %rdi      # 0x15f00
callq 0x41df
leaq 0xe8ac(%rip), %r14      # 0x15f00
movq 0xe8b5(%rip), %rdx      # 0x15f10
addq 0xe8a6(%rip), %rdx      # 0x15f08
leaq -0xf5(%rip), %rdi       # 0x7574
movq %rsp, %r8
movq %r14, %rsi
movq %rbx, %rcx
callq 0xa1c9
movq %r14, %rdi
callq 0x41df
addq $0xd8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x76a3
movl (%rbx), %edi
testl %edi, %edi
js 0x76a3
callq 0x3120
movl $0xffffffff, (%rbx)     # imm = 0xFFFFFFFF
movq 0x10(%rbx), %rdx
testq %rdx, %rdx
je 0x76d4
movq 0x18(%rbx), %rcx
movq 0xe4b9(%rip), %rdi      # 0x15b70
movl $0x2, %esi
xorl %r8d, %r8d
callq *0xe4a3(%rip)           # 0x15b68
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r12
movl %ebx, %eax
xorb $0x1, %al
cmpq %rsi, %rdi
setne %cl
orb %al, %cl
jne 0x7705
leaq 0x9ab2(%rip), %rdi      # 0x111b0
xorl %eax, %eax
callq 0x4261
cmpq %r14, %r12
jae 0x7782
leaq 0x9aa8(%rip), %r13      # 0x111b9
movl $0x1, %ebp
movq %r12, %rax
cmpq %r14, %rax
jae 0x7750
movzbl (%rax), %ecx
leaq 0x1(%rax), %r15
cmpl $0xa, %ecx
je 0x7741
cmpl $0xd, %ecx
jne 0x7745
cmpq %r14, %r15
jae 0x7741
cmpb $0xa, 0x1(%rax)
jne 0x7741
addq $0x2, %rax
movq %rax, %r15
xorl %ecx, %ecx
jmp 0x7747
movb $0x1, %cl
movq %r15, %rax
testb %cl, %cl
jne 0x7719
jmp 0x7753
movq %rax, %r15
movl %r15d, %esi
subl %r12d, %esi
testb $0x1, %bl
movq %r13, %rdi
leaq 0x9a4f(%rip), %rax      # 0x111b5
cmovneq %rax, %rdi
movzbl %bl, %ebx
cmovel %ebp, %ebx
movq %r12, %rdx
xorl %eax, %eax
callq 0x4261
movq %r15, %r12
cmpq %r14, %r15
jb 0x7716
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rdx, %r15
cmpq %rsi, %rdx
jbe 0x8a51
movq %r14, %r15
movzbl (%r15), %eax
cmpl $0xd, %eax
je 0x8a4e
cmpl $0xa, %eax
je 0x8a4e
decq %r15
cmpq %rsi, %r15
ja 0x8a33
movq %rsi, %r15
jmp 0x8a51
incq %r15
movq 0x30(%rsp), %rcx
addq %rdi, %rsi
movq %rbx, %rax
cmpq %rsi, %rax
jae 0x8a93
movzbl (%rax), %edx
leaq 0x1(%rax), %r12
cmpl $0xa, %edx
je 0x8a84
cmpl $0xd, %edx
jne 0x8a88
cmpq %rsi, %r12
jae 0x8a84
cmpb $0xa, 0x1(%rax)
jne 0x8a84
addq $0x2, %rax
movq %rax, %r12
xorl %edx, %edx
jmp 0x8a8a
movb $0x1, %dl
movq %r12, %rax
testb %dl, %dl
jne 0x8a5c
jmp 0x8a96
movq %rax, %r12
leaq 0x87b5(%rip), %rdi      # 0x11252
movl %r8d, %esi
movl %r9d, %edx
xorl %eax, %eax
callq 0x4261
movq %r15, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x76d6
movl %ebx, %esi
subl %r14d, %esi
movsbl (%rbx), %ecx
leaq 0x919b(%rip), %rdi      # 0x11c64
movq %r14, %rdx
xorl %eax, %eax
callq 0x4261
cmpq %rbx, %r12
je 0x8af3
incq %rbx
movq %rbx, %rdi
movq %r12, %rsi
xorl %edx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x76d6
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
movq $0x0, 0x10(%rdi)
movq 0x18(%rsi), %rax
movq %rax, 0x8(%rsp)
cmpq $0x41, (%rax)
je 0x90d4
movq %rsi, %r14
leaq 0x8(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x9318
testq %rax, %rax
je 0x90ac
movq 0xcad0(%rip), %rdx      # 0x15b68
movq 0xcad1(%rip), %rcx      # 0x15b70
movq %rbx, %rdi
movq %rax, %rsi
callq 0xeb70
jmp 0x90c9
movq 0x8(%rsp), %rax
movq (%rax), %rcx
cmpq $0x41, %rcx
je 0x90c4
addq $0x20, %rax
cmpq $0x21, %rcx
jne 0x90b1
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq $0x41, (%rax)
jne 0x907f
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movabsq $-0x340d631b7bdddcdb, %r8 # imm = 0xCBF29CE484222325
testq %rdi, %rdi
je 0x9114
xorl %ecx, %ecx
movabsq $0x100000001b3, %rdx    # imm = 0x100000001B3
movsbq (%rsi,%rcx), %rax
xorq %r8, %rax
imulq %rdx, %rax
incq %rcx
movq %rax, %r8
cmpq %rcx, %rdi
jne 0x90fc
retq
movq %r8, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movb $0x1, 0x10(%rdi)
movq 0x8(%rdi), %rdi
movl $0x30, %esi
callq 0x95e6
movq %rax, %r12
leaq 0x10(%rax), %rdi
xorps %xmm0, %xmm0
movups %xmm0, (%rax)
movl $0x10, %esi
callq 0xebb1
testq %r15, %r15
je 0x91a9
xorl %r13d, %r13d
movq (%rbx,%r13,8), %r9
movl $0x2, %edx
movq %r14, %rdi
xorl %esi, %esi
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x9b4b
incq %r13
cmpq %r13, %r15
jne 0x9188
movb 0x10(%r14), %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x95a1
cmpl $0x1, %esi
jne 0x95aa
xorl %eax, %eax
popq %rcx
retq
movq %r8, %rsi
popq %rax
jmp 0x95e6
leaq 0x771f(%rip), %rdi      # 0x10cd0
cmpl $0x2, %esi
jne 0x95ce
leaq 0x7cd6(%rip), %rsi      # 0x11293
leaq 0x7ce6(%rip), %rcx      # 0x112aa
movl $0x19, %edx
callq 0x3080
leaq 0x7cbe(%rip), %rsi      # 0x11293
leaq 0x7cce(%rip), %rcx      # 0x112aa
movl $0x1d, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O1/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
cmpq $0x0, (%rdi)
jne 0x961e
cmpq $0x0, 0x30(%rbx)
je 0x96e9
movq %rbx, %rdi
xorl %esi, %esi
callq 0x9708
movq %rax, (%rbx)
leaq 0x10(%rax), %rcx
movq %rcx, 0x8(%rbx)
addq 0x8(%rax), %rax
movq %rax, 0x10(%rbx)
movq (%rbx), %rax
testq %rax, %rax
je 0x96ab
movq 0x8(%rbx), %rdx
testq %rdx, %rdx
je 0x96ab
movq 0x10(%rbx), %rcx
testq %rcx, %rcx
je 0x96ab
subq %rdx, %rcx
cmpq %r14, %rcx
jae 0x967c
movq 0x20(%rbx), %rdx
movq %rdx, (%rax)
movq (%rbx), %rax
movq %rax, 0x20(%rbx)
addq %rcx, 0x18(%rbx)
leaq 0x10(%r14), %rsi
movq %rbx, %rdi
callq 0x9708
movq %rax, (%rbx)
leaq 0x10(%rax), %rcx
movq %rcx, 0x8(%rbx)
movq 0x8(%rax), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rbx)
addq $-0x10, %rcx
cmpq %r14, %rcx
jb 0x96ca
movq 0x8(%rbx), %rax
movq 0x18(%rbx), %rcx
leaq (%rax,%r14), %rdx
addq $0x7, %rdx
andq $-0x8, %rdx
movq %rdx, 0x8(%rbx)
subq %rax, %rcx
addq %rdx, %rcx
movq %rcx, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x7c7a(%rip), %rdi      # 0x1132c
leaq 0x7bda(%rip), %rsi      # 0x11293
leaq 0x7c43(%rip), %rcx      # 0x11303
movl $0x74, %edx
callq 0x3080
leaq 0x7c9b(%rip), %rdi      # 0x1136c
leaq 0x7bbb(%rip), %rsi      # 0x11293
leaq 0x7c24(%rip), %rcx      # 0x11303
movl $0x8a, %edx
callq 0x3080
leaq 0x7bfa(%rip), %rdi      # 0x112ea
leaq 0x7b9c(%rip), %rsi      # 0x11293
leaq 0x7c05(%rip), %rcx      # 0x11303
movl $0x6c, %edx
callq 0x3080
// File: /workspace/github_cpp_makefile_star2_O1/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 0x9754
cmpq %rbx, 0x8(%r14)
jae 0x9734
movq %r14, %rcx
movq (%r14), %r14
testq %r14, %r14
sete %al
je 0x9754
cmpq %rbx, 0x8(%r14)
jb 0x971e
jmp 0x9738
xorl %eax, %eax
xorl %ecx, %ecx
leaq 0x28(%rdi), %rdx
testq %rcx, %rcx
cmovneq %rcx, %rdx
movq (%r14), %rcx
movq %rcx, (%rdx)
movq $0x0, (%r14)
testb %al, %al
je 0x97a1
movq 0x30(%rdi), %rax
cmpq %rbx, %rax
cmovaq %rax, %rbx
leaq 0x89aa(%rip), %rdi      # 0x12110
xorl %r14d, %r14d
xorl %eax, %eax
callq 0x4261
xorl %edi, %edi
movq %rbx, %rsi
movl $0x3, %edx
movl $0x22, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x3110
cmpq $-0x1, %rax
je 0x97a1
movq $0x0, (%rax)
movq %rbx, 0x8(%rax)
movq %rax, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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 0x97d7
testq %rcx, %rcx
je 0x9807
movq %rcx, %rsi
callq 0x95e6
jmp 0x97f2
movq %r14, %rdx
subq %rax, %rdx
movq %r14, 0x8(%rdi)
addq %rdx, 0x18(%rdi)
movq %rcx, %rsi
callq 0x95e6
cmpq %r14, %rax
je 0x9809
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_O1/cphinton42[P]hinton-language/src/pool_allocator.cpp
// Function: pool_release(Pool_Allocator*)
void pool_release(Pool_Allocator *pool)
{
    if(pool->current_block)
    {
        deallocate_blocks(pool->current_block);
        pool->current_block = nullptr;
    }
    if(pool->used_blocks)
    {
        deallocate_blocks(pool->used_blocks);
        pool->used_blocks = nullptr;
    }
    if(pool->free_blocks)
    {
        deallocate_blocks(pool->free_blocks);
        pool->free_blocks = nullptr;
    }
    
    pool->current_point = nullptr;
    pool->current_end = nullptr;
    pool->mark = 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rdi), %rdi
testq %rdi, %rdi
je 0x987f
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
callq 0x3070
movq %r14, %rdi
testq %r14, %r14
jne 0x9864
movq $0x0, (%rbx)
movq 0x20(%rbx), %rdi
testq %rdi, %rdi
je 0x98a4
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
callq 0x3070
movq %r14, %rdi
testq %r14, %r14
jne 0x9888
movq $0x0, 0x20(%rbx)
movq 0x28(%rbx), %rdi
testq %rdi, %rdi
je 0x98c9
movq (%rdi), %r14
movq 0x8(%rdi), %rsi
callq 0x3070
movq %r14, %rdi
testq %r14, %r14
jne 0x98ad
movq $0x0, 0x28(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movq $0x0, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O1/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:
movq %rdi, %rax
shrq $0x1e, %rax
xorq %rdi, %rax
movabsq $-0x40a7b892e31b1a47, %rcx # imm = 0xBF58476D1CE4E5B9
imulq %rax, %rcx
movq %rcx, %rax
shrq $0x1b, %rax
xorq %rcx, %rax
movabsq $-0x6b2fb644ecceee15, %rcx # imm = 0x94D049BB133111EB
imulq %rax, %rcx
movq %rcx, %rax
shrq $0x1f, %rax
xorq %rcx, %rax
retq
// File: /workspace/github_cpp_makefile_star2_O1/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, %r12
movq %rsi, %r15
movq %rdi, %r13
movq $0x0, (%rsp)
leaq 0x10(%r13), %rdi
movq %r15, %rsi
movq %r14, %rdx
callq 0xf63a
movq 0x20(%r13), %rcx
cmpq $0x0, (%rcx,%rax,8)
je 0x9a14
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x28(%r13), %rax
jmp 0x9a16
xorl %eax, %eax
testq %rax, %rax
je 0x9a21
cmpq 0x8(%rax), %r12
jae 0x9a2d
movq 0x8(%r13), %r12
movq (%r13), %r13
movb $0x1, %al
jmp 0x9a33
movq 0x10(%rax), %rbx
xorl %eax, %eax
testb %al, %al
je 0x9a43
testq %r13, %r13
je 0x9a47
testb %bpl, %bpl
jne 0x99ec
jmp 0x9a47
movq %rbx, (%rsp)
movq (%rsp), %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq