LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: define_variable
static void define_variable(Parser *parser, uint8_t name_index) {
    // local scope
    if (parser->context->scope_depth > 0) {
        mark_initialized(parser->context);
        return;
    }

    // global scope
    emit_bytes(parser, OP_DEF_GLOBAL, name_index);
}

// Assembly:
movq 0x8(%rdi), %rax
movl 0x221c(%rax), %ecx
testl %ecx, %ecx
jle 0x614a
movslq 0x2018(%rax), %rdx
shlq $0x5, %rdx
movl %ecx, 0x10(%rdx,%rax)
retq
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movl 0x44(%rdi), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x16, %esi
callq 0x4af1
movq 0x8(%r14), %rax
movl 0x44(%r14), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %bl, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: consume
static inline void consume(Parser *parser, TokenType type, const char *message) {
    if (parser->current.type == type) {
        advance(parser);
    } else {
        error_current(parser, message);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
cmpl %esi, 0x18(%rdi)
jne 0x61de
movq 0x10(%rbx), %rax
movq %rax, 0x40(%r14)
movups (%rbx), %xmm0
movups %xmm0, 0x30(%r14)
leaq 0x8(%rsp), %r15
movq (%r14), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%rbx)
cmpl $0x35, 0x18(%r14)
je 0x61b1
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %r14, %rdi
movq %rbx, %rsi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x61ef
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: parameters
static void parameters(Parser *parser, TokenType closing_token) {
    if (consume_if(parser, closing_token)) return;

    RavFunction *function = parser->context->function;
    do {
        function->arity++;

        if (function->arity > UINT8_MAX) {
            error_limit(parser, "parameters", 255);
        }

        uint8_t index = variable(parser, "expect parameter name");
        define_variable(parser, index);
    } while (consume_if(parser, TOKEN_COMMA));

    consume(parser, closing_token, "expect a closing pararmeters token");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %r14
leaq 0x18(%rdi), %rbx
cmpl %esi, 0x18(%rdi)
jne 0x65c6
movq 0x10(%rbx), %rax
movq %rax, 0x40(%r14)
movups (%rbx), %xmm0
movups %xmm0, 0x30(%r14)
leaq 0x10(%rsp), %r15
movq (%r14), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
cmpl $0x35, 0x18(%r14)
je 0x659e
jmp 0x66ac
movl %esi, 0xc(%rsp)
movq 0x8(%r14), %rax
movq 0x8(%rax), %r15
leaq 0x30(%r14), %rbp
leaq 0x52ab(%rip), %r12      # 0xb888
leaq 0x10(%rsp), %r13
movl 0x18(%r15), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x18(%r15)
cmpl $0xff, %eax
jl 0x6608
movq %r14, %rdi
leaq 0x527f(%rip), %rsi      # 0xb87d
movl $0xff, %edx
callq 0x621b
movq %r14, %rdi
movq %r12, %rsi
callq 0x5f86
movzbl %al, %esi
movq %r14, %rdi
callq 0x612c
movl 0x18(%r14), %eax
cmpl $0x25, %eax
jne 0x665b
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rbp)
movups (%rbx), %xmm0
movups %xmm0, (%rbp)
movq (%r14), %rsi
movq %r13, %rdi
callq 0x941f
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
cmpl $0x35, 0x18(%r14)
je 0x6636
jmp 0x65e2
cmpl 0xc(%rsp), %eax
jne 0x669a
movq 0x10(%rbx), %rax
movq %rax, 0x10(%rbp)
movups (%rbx), %xmm0
movups %xmm0, (%rbp)
leaq 0x10(%rsp), %r15
movq (%r14), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rbx)
movups 0x10(%rsp), %xmm0
movups %xmm0, (%rbx)
cmpl $0x35, 0x18(%r14)
je 0x6675
jmp 0x66ac
leaq 0x51fd(%rip), %rdx      # 0xb89e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x61ef
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: unwind_stack
static void unwind_stack(Parser *parser, int depth) {
    Context *context = parser->context;
    int local_count = 0;
    bool do_closing = false;

    for (int i = context->local_count - 1; i >= 0; i--) {
        if (context->locals[i].depth < depth) {
            break;
        }

        if (context->locals[i].is_captured) {
            emit_byte(parser, OP_CLOSE_UPVALUE);
            do_closing = true;
        } else {
            emit_byte(parser, OP_POP);
        }

        local_count++;
    }
    context->local_count -= local_count;

    // If no closing occurs, optimize the consecutive pop instructions.
    if (!do_closing && local_count != 0) {
        parser_chunk(parser)->count -= local_count;
        emit_bytes(parser, OP_POPN, (uint8_t)local_count);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rcx
movslq 0x2018(%rcx), %r13
testq %r13, %r13
jle 0x678f
movl %esi, %ebp
movq %rdi, %rbx
movq %r13, %rax
shlq $0x5, %rax
movq %rcx, (%rsp)
leaq (%rax,%rcx), %r15
addq $0x14, %r15
xorl %r12d, %r12d
xorl %r14d, %r14d
cmpl %ebp, -0x4(%r15)
jl 0x6736
movb (%r15), %al
movq 0x8(%rbx), %rcx
movl 0x44(%rbx), %edx
movq 0x8(%rcx), %rdi
addq $0x20, %rdi
orb %al, %r12b
testb %al, %al
movl $0x7, %esi
movl $0x23, %eax
cmovnel %eax, %esi
callq 0x4af1
incl %r14d
addq $-0x20, %r15
cmpl %r14d, %r13d
jne 0x66f8
movl %r13d, %r14d
movq (%rsp), %rax
subl %r14d, 0x2018(%rax)
testb $0x1, %r12b
jne 0x678f
testl %r14d, %r14d
je 0x678f
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
subl %r14d, 0x20(%rdi)
addq $0x20, %rdi
movl 0x44(%rbx), %edx
movl $0x8, %esi
callq 0x4af1
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %r14b, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4af1
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: parse_precedence
static void parse_precedence(Parser *parser, Precedence precedence) {
    Debug_Logf(parser, "expression(%s)", precedence_string[precedence]);

    advance(parser);

    ParseFn prefix = token_rule(parser->previous.type)->prefix;
    if (prefix == NULL) {
        error_previous(parser, "Unexpected token, expect expression");
        return;
    }

    prefix(parser);
    while (precedence <= token_rule(parser->current.type)->precedence) {
        advance(parser);
        token_rule(parser->previous.type)->infix(parser);
    }

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %ebp
movq %rdi, %r14
leaq 0x30(%rdi), %rbx
leaq 0x18(%rdi), %r12
movq 0x28(%rdi), %rax
movq %rax, 0x40(%rdi)
movups 0x18(%rdi), %xmm0
movups %xmm0, 0x30(%rdi)
movq %rsp, %r15
movq (%r14), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r12)
movups (%rsp), %xmm0
movups %xmm0, (%r12)
cmpl $0x35, 0x18(%r14)
je 0x67cc
movl (%rbx), %eax
leaq (%rax,%rax,2), %rax
leaq 0x90a2(%rip), %r13      # 0xf8a0
movq (%r13,%rax,8), %rax
testq %rax, %rax
je 0x6876
movq %r14, %rdi
callq *%rax
movl 0x18(%r14), %eax
leaq (%rax,%rax,2), %rax
cmpl %ebp, 0x10(%r13,%rax,8)
jb 0x6888
movq %rsp, %r15
movq 0x10(%r12), %rax
movq %rax, 0x10(%rbx)
movups (%r12), %xmm0
movups %xmm0, (%rbx)
movq (%r14), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x10(%rsp), %rax
movq %rax, 0x10(%r12)
movups (%rsp), %xmm0
movups %xmm0, (%r12)
cmpl $0x35, 0x18(%r14)
je 0x6830
movl 0x30(%r14), %eax
leaq (%rax,%rax,2), %rax
movq %r14, %rdi
callq *0x8(%r13,%rax,8)
movl 0x18(%r14), %eax
leaq (%rax,%rax,2), %rax
cmpl %ebp, 0x10(%r13,%rax,8)
jae 0x681f
jmp 0x6888
leaq 0x50dd(%rip), %rdx      # 0xb95a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x61ef
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: binary
static void binary(Parser *parser) {
    Debug_Log(parser);

    TokenType operator = parser->previous.type;

    ParseRule *rule = token_rule(operator);
    parse_precedence(parser, (Precedence)(rule->precedence + 1));

    switch (operator) {
    case TOKEN_PLUS:          emit_byte(parser, OP_ADD); break;
    case TOKEN_MINUS:         emit_byte(parser, OP_SUB); break;
    case TOKEN_STAR:          emit_byte(parser, OP_MUL); break;
    case TOKEN_SLASH:         emit_byte(parser, OP_DIV); break;
    case TOKEN_PERCENT:       emit_byte(parser, OP_MOD); break;
    case TOKEN_LESS:          emit_byte(parser, OP_LT);  break;
    case TOKEN_LESS_EQUAL:    emit_byte(parser, OP_LTQ); break;
    case TOKEN_GREATER:       emit_byte(parser, OP_GT);  break;
    case TOKEN_GREATER_EQUAL: emit_byte(parser, OP_GTQ); break;
    case TOKEN_EQUAL_EQUAL:   emit_byte(parser, OP_EQ);  break;
    case TOKEN_BANG_EQUAL:    emit_byte(parser, OP_NEQ); break;
    default:
        assert(!"invalid token type");
    }

    Debug_Exit(parser);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x30(%rdi), %r14d
leaq (%r14,%r14,2), %rax
leaq 0x844f(%rip), %rcx      # 0xf8a0
movl 0x10(%rcx,%rax,8), %esi
incl %esi
callq 0x679e
leal -0x10(%r14), %eax
cmpl $0x12, %eax
jae 0x7497
movl $0x3781f, %ecx          # imm = 0x3781F
btl %eax, %ecx
jae 0x7497
movl %eax, %eax
leaq 0x432c(%rip), %rcx      # 0xb7a4
movzbl (%rax,%rcx), %esi
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4af1
leaq 0x4725(%rip), %rdi      # 0xbbc3
leaq 0x43c9(%rip), %rsi      # 0xb86e
leaq 0x472d(%rip), %rcx      # 0xbbd9
movl $0x2c0, %edx            # imm = 0x2C0
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: unary
static void unary(Parser *parser) {
    Debug_Log(parser);

    TokenType operator = parser->previous.type;
    parse_precedence(parser, PREC_UNARY);

    switch (operator) {
    case TOKEN_MINUS: emit_byte(parser, OP_NEG); break;
    case TOKEN_NOT:   emit_byte(parser, OP_NOT); break;
    default:
        assert(!"invalid token type");
    }

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl 0x30(%rdi), %ebp
movl $0xa, %esi
callq 0x679e
movb $0xe, %al
cmpl $0x11, %ebp
je 0x74d7
cmpl $0x16, %ebp
jne 0x74f4
movb $0x15, %al
movq 0x8(%rbx), %rcx
movl 0x44(%rbx), %edx
movq 0x8(%rcx), %rdi
addq $0x20, %rdi
movzbl %al, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4af1
leaq 0x46c8(%rip), %rdi      # 0xbbc3
leaq 0x436c(%rip), %rsi      # 0xb86e
leaq 0x46e6(%rip), %rcx      # 0xbbef
movl $0x5e0, %edx            # imm = 0x5E0
callq 0x20e0
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: and_
static void and_(Parser *parser) {
    // Operator Flow:
    //
    // [Left Operand]
    // OP_JMP_FALSE   ---.
    // OP_POP            |
    // [Right Operand]   |
    // ....    <----------

    Debug_Log(parser);

    int jump = emit_jump(parser, OP_JMP_FALSE);

    emit_byte(parser, OP_POP);
    parse_precedence(parser, PREC_AND + 1);

    patch_jump(parser, jump);

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r15
movq 0x8(%rdi), %rax
movl 0x44(%rdi), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x20, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movq 0x8(%rax), %rdi
movslq 0x20(%rdi), %rbp
addq $0x20, %rdi
addq $-0x2, %rbp
movl 0x44(%r15), %edx
movl $0x7, %esi
callq 0x4af1
movq %r15, %rdi
movl $0x4, %esi
callq 0x679e
movq 0x8(%r15), %rax
movq 0x8(%rax), %r14
movl 0x20(%r14), %ebx
subl %ebp, %ebx
cmpl $0x10002, %ebx          # imm = 0x10002
jl 0x75c2
leaq 0x18(%r15), %rsi
leaq 0x43ff(%rip), %rdx      # 0xb9b9
movq %r15, %rdi
callq 0x61ef
addl $-0x2, %ebx
movq 0x28(%r14), %rax
movb %bh, (%rax,%rbp)
movq 0x28(%r14), %rax
movb %bl, 0x1(%rax,%rbp)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: or_
static void or_(Parser *parser) {
    // Operator Flow:
    //
    // [Left Operand]
    // OP_JMP_FALSE   ---.
    // OP_JMP         ---|--.
    // OP_POP  <----------  |
    // [Right Operand]      |
    // ....    <-------------

    Debug_Log(parser);

    // first operand is falsy
    int false_jump = emit_jump(parser, OP_JMP_FALSE);

    // first operand is not falsy
    int true_jump = emit_jump(parser, OP_JMP);

    patch_jump(parser, false_jump);

    emit_byte(parser, OP_POP);
    parse_precedence(parser, PREC_OR + 1);

    patch_jump(parser, true_jump);

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %r15
movq 0x8(%rdi), %rax
movl 0x44(%rdi), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x20, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movq 0x8(%rax), %rdi
movslq 0x20(%rdi), %rbp
addq $0x20, %rdi
addq $-0x2, %rbp
movl 0x44(%r15), %edx
movl $0x1e, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r15), %rax
movq 0x8(%rax), %r14
movslq 0x20(%r14), %rbx
movq %rbx, %rax
addq $-0x2, %rax
movq %rax, %r12
subl %ebp, %ebx
cmpl $0x10002, %ebx          # imm = 0x10002
jl 0x76c0
leaq 0x18(%r15), %rsi
leaq 0x4301(%rip), %rdx      # 0xb9b9
movq %r15, %rdi
callq 0x61ef
addl $-0x2, %ebx
movq 0x28(%r14), %rax
movb %bh, (%rax,%rbp)
movq 0x28(%r14), %rax
movb %bl, 0x1(%rax,%rbp)
movq 0x8(%r15), %rax
movl 0x44(%r15), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x7, %esi
callq 0x4af1
movq %r15, %rdi
movl $0x3, %esi
callq 0x679e
movq 0x8(%r15), %rax
movq 0x8(%rax), %r14
movl 0x20(%r14), %ebx
movq %r12, %rbp
subl %ebp, %ebx
cmpl $0x10002, %ebx          # imm = 0x10002
jl 0x7725
leaq 0x18(%r15), %rsi
leaq 0x429c(%rip), %rdx      # 0xb9b9
movq %r15, %rdi
callq 0x61ef
addl $-0x2, %ebx
movq 0x28(%r14), %rax
movb %bh, (%rax,%rbp)
movq 0x28(%r14), %rax
movb %bl, 0x1(%rax,%rbp)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: concat
static void concat(Parser *parser) {
    Debug_Log(parser);

    parse_precedence(parser, PREC_CONCAT + 1);
    emit_byte(parser, OP_CONCAT);

    Debug_Exit(parser);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x8, %esi
callq 0x679e
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x24, %esi
popq %rbx
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: cons
static void cons(Parser *parser) {
    Debug_Log(parser);

    // Not PREC_CONS + 1, since cons is right associated operator.
    parse_precedence(parser, PREC_CONS);
    emit_byte(parser, OP_CONS);

    Debug_Exit(parser);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movl $0x6, %esi
callq 0x679e
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x25, %esi
popq %rbx
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: assignment
static void assignment(Parser *parser) {
    Debug_Log(parser);

    Chunk *chunk = parser_chunk(parser);
    if (chunk->count < 2) {
        error_previous(parser, "invalid assignment target");
        return;
    }

    // Special case of indexing
    if (chunk->opcodes[chunk->count - 1] == OP_GET_ELEMENT) {
        chunk->count--;
        parse_precedence(parser, PREC_ASSIGNMENT);
        emit_byte(parser, OP_SET_ELEMENT);
        return;
    }

    // Check if the left hand side was an identifier, it's kind of a hack.
    // If it's an identifier, the last written opcode should be one of
    // these getters opcodes.
    uint8_t opcode = chunk->opcodes[chunk->count - 2];
    if (opcode != OP_GET_GLOBAL &&
        opcode != OP_GET_LOCAL &&
        opcode != OP_GET_UPVALUE) {
        error_previous(parser, "invalid assignment target");
        return;
    }

    // Get slot index of the variable and extract the corresponding
    // set instruction, and then discard the get instruction.
    uint8_t index = chunk->opcodes[chunk->count - 1];
    uint8_t set_op = opcode - 1;
    chunk->count -= 2;

    // Not PREC_ASSIGNMENT + 1, since assignment is right associated.
    parse_precedence(parser, PREC_ASSIGNMENT);
    emit_bytes(parser, set_op, index);

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x8(%rax), %rax
movslq 0x20(%rax), %rcx
cmpq $0x1, %rcx
jg 0x77c0
leaq 0x30(%rbx), %rsi
leaq 0x4450(%rip), %rdx      # 0xbc04
movq %rbx, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x61ef
movq 0x28(%rax), %rdx
movb -0x1(%rdx,%rcx), %bpl
cmpb $0x2b, %bpl
jne 0x77f7
decl %ecx
movl %ecx, 0x20(%rax)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x679e
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x2a, %esi
jmp 0x784e
addl $-0x2, %ecx
movzbl (%rdx,%rcx), %r14d
cmpl $0x1c, %r14d
ja 0x77a9
movl $0x15000000, %edx       # imm = 0x15000000
btl %r14d, %edx
jae 0x77a9
decb %r14b
movl %ecx, 0x20(%rax)
movq %rbx, %rdi
movl $0x1, %esi
callq 0x679e
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %r14b, %esi
callq 0x4af1
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %bpl, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: block
static void block(Parser *parser) {
    Debug_Log(parser);

    begin_scope(parser);

    while (!current_is(parser, TOKEN_END) && !current_is(parser, TOKEN_EOF)) {
        declaration(parser);
    }

    consume(parser, TOKEN_END, "expect closing 'end' after block");

    end_scope(parser, true);

    Debug_Exit(parser);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
incl 0x221c(%rax)
leaq 0x18(%rdi), %r14
movl (%r14), %eax
cmpl $0x23, %eax
je 0x789c
cmpl $0x36, %eax
je 0x7888
movq %rbx, %rdi
callq 0x5bb5
jmp 0x7871
leaq 0x438f(%rip), %rdx      # 0xbc1e
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61ef
jmp 0x78d4
movq 0x10(%r14), %rax
movq %rax, 0x40(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x30(%rbx)
leaq 0x8(%rsp), %r15
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%r14)
cmpl $0x35, 0x18(%rbx)
je 0x78b1
movq %rbx, %rdi
movl $0x1, %esi
callq 0x84e7
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: grouping
static void grouping(Parser *parser) {
    Debug_Log(parser);

    expression(parser);
    consume(parser, TOKEN_RIGHT_PAREN, "Expect closing ')' after group expression");

    Debug_Exit(parser);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x679e
leaq 0x18(%rbx), %r14
cmpl $0x29, 0x18(%rbx)
jne 0x795f
movq 0x10(%r14), %rax
movq %rax, 0x40(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x30(%rbx)
leaq 0x8(%rsp), %r15
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%r14)
cmpl $0x35, 0x18(%rbx)
je 0x7932
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x42d9(%rip), %rdx      # 0xbc3f
movq %rbx, %rdi
movq %r14, %rsi
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x61ef
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: indexing
static void indexing(Parser *parser) {
    Debug_Log(parser);

    expression(parser);
    consume(parser, TOKEN_RIGHT_BRACKET, "expect ']' after index");

    emit_byte(parser, OP_GET_ELEMENT);

    Debug_Exit(parser);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movl $0x1, %esi
callq 0x679e
leaq 0x18(%rbx), %r14
cmpl $0x2d, 0x18(%rbx)
jne 0x8008
movq 0x10(%r14), %rax
movq %rax, 0x40(%rbx)
movups (%r14), %xmm0
movups %xmm0, 0x30(%rbx)
leaq 0x8(%rsp), %r15
movq (%rbx), %rsi
movq %r15, %rdi
callq 0x941f
movq 0x18(%rsp), %rax
movq %rax, 0x10(%r14)
movups 0x8(%rsp), %xmm0
movups %xmm0, (%r14)
cmpl $0x35, 0x18(%rbx)
je 0x7fe3
jmp 0x801a
leaq 0x3d21(%rip), %rdx      # 0xbd30
movq %rbx, %rdi
movq %r14, %rsi
callq 0x61ef
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x2b, %esi
callq 0x4af1
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: identifier
static void identifier(Parser *parser) {
    Debug_Log(parser);

    Token *name = &parser->previous;
    int index = resolve_local(parser->context, name);

    uint8_t get_op;

    // Local?
    if (index != -1) {
        get_op = OP_GET_LOCAL;
    } else {
        index = resolve_upvalue(parser, parser->context, name);

        // Upvalue?
        if (index != -1) {
            get_op = OP_GET_UPVALUE;
        } else {
            index = identifier_constant(parser, &parser->previous);
            get_op = OP_GET_GLOBAL;
        }
    }

    emit_bytes(parser, get_op, index);

    Debug_Exit(parser);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %r15
movslq 0x2018(%r15), %r14
testq %r14, %r14
jle 0x809c
movq %r14, %rax
shlq $0x5, %rax
leaq (%rax,%r15), %r12
addq $0x10, %r12
cmpl $-0x1, (%r12)
je 0x808b
movslq 0x40(%rbx), %rdx
cmpl -0x8(%r12), %edx
jne 0x808b
movq 0x38(%rbx), %rdi
movq -0x10(%r12), %rsi
callq 0x2190
testl %eax, %eax
je 0x80ec
decq %r14
leaq 0x1(%r14), %rax
addq $-0x20, %r12
cmpq $0x2, %rax
jae 0x8067
leaq 0x30(%rbx), %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x92c6
cmpl $-0x1, %eax
je 0x80b7
movl %eax, %r14d
movb $0x1c, %al
jmp 0x80f1
movq 0x10(%rbx), %rdi
movq 0x38(%rbx), %rsi
movl 0x40(%rbx), %edx
callq 0x4fd0
movq 0x8(%rbx), %rcx
movq 0x8(%rcx), %rdi
addq $0x20, %rdi
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
orq %rax, %rsi
callq 0x4b99
movl %eax, %r14d
movb $0x18, %al
jmp 0x80f1
decl %r14d
movb $0x1a, %al
movq 0x8(%rbx), %rcx
movl 0x44(%rbx), %edx
movq 0x8(%rcx), %rdi
addq $0x20, %rdi
movzbl %al, %esi
callq 0x4af1
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %r14b, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: number
static void number(Parser *parser) {
    Debug_Log(parser);

    Value value = Num_Value(strtod(parser->previous.lexeme, NULL));
    emit_constant(parser, value);

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x38(%rdi), %rdi
xorl %esi, %esi
callq 0x2090
movq %xmm0, %rsi
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
addq $0x20, %rdi
callq 0x4b99
cmpl $0x100, %eax            # imm = 0x100
jl 0x8183
leaq 0x378b(%rip), %rsi      # 0xb8eb
movq %rbx, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x621b
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
movl $0x0, 0x848(%rdi)
xorl %ebp, %ebp
jmp 0x818d
movl %eax, %ebp
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x44(%rbx), %edx
addq $0x20, %rdi
movl $0x3, %esi
callq 0x4af1
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %bpl, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: string
static void string(Parser *parser) {
    Debug_Log(parser);

    // +1 and -2 for the literal string quotes
    RavString *string = object_string(
        &parser->vm->allocator,
        parser->previous.lexeme + 1,
        parser->previous.length - 2
    );
    emit_constant(parser, Obj_Value(string));

    Debug_Exit(parser);
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq 0x38(%rbx), %rsi
incq %rsi
movl 0x40(%rbx), %edx
addl $-0x2, %edx
callq 0x4fd0
movabsq $-0x4000000000000, %rsi # imm = 0xFFFC000000000000
orq %rax, %rsi
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
addq $0x20, %rdi
callq 0x4b99
cmpl $0x100, %eax            # imm = 0x100
jl 0x8227
leaq 0x36e7(%rip), %rsi      # 0xb8eb
movq %rbx, %rdi
movl $0x100, %edx            # imm = 0x100
callq 0x621b
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
movl $0x0, 0x848(%rdi)
xorl %ebp, %ebp
jmp 0x8231
movl %eax, %ebp
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rdi
movl 0x44(%rbx), %edx
addq $0x20, %rdi
movl $0x3, %esi
callq 0x4af1
movq 0x8(%rbx), %rax
movl 0x44(%rbx), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %bpl, %esi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x4af1
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: end_scope
static void end_scope(Parser *parser, bool loading) {
    unwind_stack(parser, parser->context->scope_depth);

    // Push the value of the last expression in the block.
    if (loading) {
        Chunk *chunk = parser_chunk(parser);

        // If possible optimize out OP_SAVE_X/OP_PUSH_X pattern.
        if (chunk->opcodes[chunk->count - 1] == OP_POP_X) {
            chunk->count--;
        } else {
            emit_byte(parser, OP_PUSH_X);
        }
    }
    parser->context->scope_depth--;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movl %esi, %ebp
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x221c(%rax), %esi
callq 0x66bb
movq 0x8(%rbx), %rax
testl %ebp, %ebp
je 0x8534
movq 0x8(%rax), %rcx
leaq 0x20(%rcx), %rdi
movq 0x28(%rcx), %rdx
movslq 0x20(%rcx), %rcx
cmpb $0x5, -0x1(%rdx,%rcx)
jne 0x8523
decl %ecx
movl %ecx, (%rdi)
jmp 0x8534
movl 0x44(%rbx), %edx
movl $0x4, %esi
callq 0x4af1
movq 0x8(%rbx), %rax
decl 0x221c(%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: pattern_fail_if_true
static void pattern_fail_if_true(Parser *parser, Pattern_Context *context, bool subvalue) {
    // count of the values that are needed to be poped from the stack if the
    // pattern failed, note that the match value is discarded only if it is
    // subvalue, toplevel `match` value shouldn't be discarded because it could
    // be used in subsequent patterns
    int values_count = context->bindings_count + (int)subvalue;

    // Skip the failure handling, if the pattern matched the value.
    int success_jump = emit_jump(parser, OP_JMP_POP_FALSE);                 // ---- false
                                                                            //    |
    // Unwind the binding introduced by the failed pattern.                 //    |
    emit_bytes(parser, OP_POPN, (uint8_t)(values_count));                   //    |
                                                                            //    |
    // Finally jump to the next case, as the pattern didn't match.          //    |
    context->cases_next[context->cases_count] = emit_jump(parser, OP_JMP);  // -------
    context->cases_count += 1;                                              //    |  |
                                                                            //    |  :
    patch_jump(parser, success_jump);                                       // <---  V
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %r12
addl 0x84(%rsi), %r15d
movq 0x8(%rdi), %rax
movl 0x44(%rdi), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x21, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movl 0x44(%r12), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movl 0x44(%r12), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movq 0x8(%rax), %rdi
movslq 0x20(%rdi), %rbp
addq $0x20, %rdi
addq $-0x2, %rbp
movl 0x44(%r12), %edx
movl $0x8, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movl 0x44(%r12), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movzbl %r15b, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movl 0x44(%r12), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0x1e, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movl 0x44(%r12), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movl 0x44(%r12), %edx
movq 0x8(%rax), %rdi
addq $0x20, %rdi
movl $0xff, %esi
callq 0x4af1
movq 0x8(%r12), %rax
movq 0x8(%rax), %r15
movl 0x20(%r15), %eax
addl $-0x2, %eax
movslq 0x80(%r14), %rcx
movl %eax, (%r14,%rcx,4)
incl 0x80(%r14)
movl 0x20(%r15), %ebx
subl %ebp, %ebx
cmpl $0x10002, %ebx          # imm = 0x10002
jl 0x91d7
leaq 0x18(%r12), %rsi
leaq 0x27ea(%rip), %rdx      # 0xb9b9
movq %r12, %rdi
callq 0x61ef
addl $-0x2, %ebx
movq 0x28(%r15), %rax
movb %bh, (%rax,%rbp)
movq 0x28(%r15), %rax
movb %bl, 0x1(%rax,%rbp)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: add_dummy_local
static void add_dummy_local(Parser* parser) {
    Context *context = parser->context;

    if (context->local_count == LOCALS_LIMIT) {
        error_limit(parser, "function locals", LOCALS_LIMIT);
        return;
    }

    Local *local = &context->locals[context->local_count++];
    local->name = (Token){0};
    local->depth = context->scope_depth;
    local->is_captured = false;
}

// Assembly:
movq 0x8(%rdi), %rax
movslq 0x2018(%rax), %rcx
cmpq $0x100, %rcx            # imm = 0x100
jne 0x9217
leaq 0x2601(%rip), %rsi      # 0xb80e
movl $0x100, %edx            # imm = 0x100
jmp 0x621b
leal 0x1(%rcx), %edx
movl %edx, 0x2018(%rax)
shlq $0x5, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax,%rcx)
movq $0x0, 0x28(%rax,%rcx)
movl 0x221c(%rax), %edx
movl %edx, 0x30(%rax,%rcx)
movb $0x0, 0x34(%rax,%rcx)
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: resolve_upvalue
static int resolve_upvalue(Parser *parser, Context *context, Token *name) {
    if (context->enclosing == NULL) {
        return -1;
    }

    int local = resolve_local(context->enclosing, name);
    if (local != -1) {
        context->enclosing->locals[local].is_captured = true;
        return add_upvalue(parser, context, (uint8_t)local, true);
    }

    int upvalue = resolve_upvalue(parser, context->enclosing, name);
    if (upvalue != -1) {
        return add_upvalue(parser, context, (uint8_t)upvalue, false);
    }

    return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq (%rsi), %r12
testq %r12, %r12
je 0x9355
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x2018(%r12), %rax
testq %rax, %rax
jle 0x9335
leaq 0x18(%r12), %rcx
movq %rcx, (%rsp)
leaq 0x1(%rax), %r13
shlq $0x5, %rax
leaq (%rax,%r12), %rbp
addq $0x10, %rbp
cmpl $-0x1, (%rbp)
je 0x9328
movslq 0x10(%r15), %rdx
cmpl -0x8(%rbp), %edx
jne 0x9328
movq 0x8(%r15), %rdi
movq -0x10(%rbp), %rsi
callq 0x2190
testl %eax, %eax
je 0x9369
decq %r13
addq $-0x20, %rbp
cmpq $0x2, %r13
jae 0x9308
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x92c6
cmpl $-0x1, %eax
je 0x9355
movzbl %al, %edx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
jmp 0x9390
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal -0x2(%r13), %eax
shlq $0x5, %rax
movq (%rsp), %rcx
movb $0x1, 0x1c(%rcx,%rax)
addl $0xfe, %r13d
movzbl %r13b, %edx
movq %r14, %rdi
movq %rbx, %rsi
movl $0x1, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x93a0
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/compiler.c
// Function: add_upvalue
static int add_upvalue(Parser *parser, Context *context, uint8_t index, bool is_local) {
    int upvalue_count = context->function->upvalue_count;

    // Check first if the upvalue is already captured.
    for (int i = 0; i < upvalue_count; i++) {
        Upvalue *upvalue = &context->upvalues[i];

        if (upvalue->index == index && upvalue->is_local == is_local) {
            return i;
        }
    }

    if (upvalue_count == UPVALUES_LIMIT) {
        error_limit(parser, "captured variables", UPVALUES_LIMIT);
        return 0;
    }

    context->upvalues[upvalue_count].is_local = is_local;
    context->upvalues[upvalue_count].index = index;

    return context->function->upvalue_count++;
}

// Assembly:
pushq %rax
movq 0x8(%rsi), %r8
movslq 0x1c(%r8), %rax
testq %rax, %rax
jle 0x93ee
movl %eax, %r9d
xorl %r10d, %r10d
cmpb %dl, 0x201d(%rsi,%r10,2)
jne 0x93c8
cmpb %cl, 0x201c(%rsi,%r10,2)
je 0x9405
incq %r10
cmpq %r10, %r9
jne 0x93b4
cmpl $0x100, %r9d            # imm = 0x100
jne 0x93ee
leaq 0x2967(%rip), %rsi      # 0xbd47
movl $0x100, %edx            # imm = 0x100
callq 0x621b
xorl %eax, %eax
jmp 0x9408
movb %cl, 0x201c(%rsi,%rax,2)
movb %dl, 0x201d(%rsi,%rax,2)
leal 0x1(%rax), %ecx
movl %ecx, 0x1c(%r8)
jmp 0x9408
movl %r10d, %eax
popq %rcx
retq
nop
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/lexer.c
// Function: string_interpolated
static Token string_interpolated(Lexer *lexer) {
    //
    // "interpolated {{exp_1}} string {{exp_2}} example"
    //
    // This is scanned into three string tokens (besides expressions tokens):
    //   1. "interpolated {{ -> STRING_BEGIN
    //   2. }} string {{     -> STRING_PART
    //   3. }} example"      -> STRING_END
    //
    // "double quoted string example"
    //
    // This is scanned into one string token:
    //   1. "double quoted string example" -> STRING
    //

    TokenType token_type;
    char begin = *lexer->start;

    while (!at_end(lexer)) {
        char current = peek(lexer);

        // full string or string-end
        if (current == '"') {
            advance(lexer); // consume double quote

            if (begin == '"')
                token_type = TOKEN_STRING;
            else
                token_type = TOKEN_STRING_END;
            break;
        }

        // string part or string-begin
        if (current == '{' && peek_next(lexer) == '{') {
            advance(lexer);
            advance(lexer); // consume '{{'

            if (begin == '"')
                token_type = TOKEN_STRING_BEGIN;
            else
                token_type = TOKEN_STRING_PART;
            break;
        }

        advance(lexer);
    }

    if (at_end(lexer)) {
        return error_token(lexer, "Unterminated string");
    }
    return new_token(lexer, token_type);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rsi), %r8
movq 0x10(%rsi), %r15
movb (%r8), %al
incq %r15
movzbl -0x1(%r15), %ecx
cmpl $0x7b, %ecx
je 0x97f2
cmpl $0x22, %ecx
je 0x97fe
testl %ecx, %ecx
jne 0x97f8
jmp 0x984f
cmpb $0x7b, (%r15)
je 0x9811
movq %r15, 0x10(%r14)
jmp 0x97da
movq %r15, 0x10(%r14)
xorl %ecx, %ecx
cmpb $0x22, %al
setne %cl
leal (%rcx,%rcx,2), %ecx
addl $0x31, %ecx
jmp 0x982c
movq %r15, 0x10(%r14)
cmpb $0x0, (%r15)
je 0x9822
incq %r15
movq %r15, 0x10(%r14)
xorl %ecx, %ecx
cmpb $0x22, %al
sete %cl
xorl $0x33, %ecx
cmpb $0x0, (%r15)
je 0x984f
addq $0x18, %r14
subl %r8d, %r15d
movl (%r14), %eax
movl %ecx, (%rbx)
movl %eax, 0x14(%rbx)
movq %r8, 0x8(%rbx)
movl %r15d, 0x10(%rbx)
popq %rbx
popq %r14
popq %r15
retq
movq 0x679a(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movq (%r14), %rdx
movl 0x18(%r14), %ecx
addq $0x18, %r14
leaq 0x2625(%rip), %rsi      # 0xbe90
leaq 0x25f0(%rip), %r9       # 0xbe62
xorl %r15d, %r15d
xorl %eax, %eax
callq 0x2140
movl $0x35, %ecx
xorl %r8d, %r8d
jmp 0x9839
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/debug.c
// Function: const_instruction
static int const_instruction(const char *tag, Chunk *chunk, int offset) {
    uint8_t constant_index = chunk->opcodes[offset + 1];
    printf("%-16s %4x = ", tag, constant_index);
    value_print(chunk->constants[constant_index]);
    printf("\n");
    return offset + 2;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
movq 0x8(%rbx), %rax
movslq %edx, %r14
movzbl 0x1(%rax,%r14), %r15d
leaq 0x1e95(%rip), %rdi      # 0xc18c
movl %r15d, %edx
xorl %eax, %eax
callq 0x20b0
movq 0x20(%rbx,%r15,8), %rdi
callq 0x59b8
movl $0xa, %edi
callq 0x2040
addl $0x2, %r14d
movl %r14d, %eax
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/debug.c
// Function: closure_instruction
static int closure_instruction(Chunk *chunk, int offset) {
    offset++;
    uint8_t index = chunk->opcodes[offset++];
    Value value = chunk->constants[index];

    printf("%-16s %4d ", "CLOSURE", index);
    value_print(value);
    putchar('\n');

    RavFunction *function = As_Function(value);
    for (int i = 0; i < function->upvalue_count; i++) {
        uint8_t is_local = chunk->opcodes[offset++];
        uint8_t index = chunk->opcodes[offset++];
        printf("%04d     |                     %s %d\n",
               offset - 2, is_local ? "local" : "upvalue", index);
    }

    return offset;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdi), %rax
movslq %esi, %r15
movzbl 0x1(%rax,%r15), %edx
movq 0x20(%rdi,%rdx,8), %r12
leaq 0x1e6a(%rip), %rdi      # 0xc1b5
leaq 0x1e6e(%rip), %rsi      # 0xc1c0
xorl %eax, %eax
callq 0x20b0
movq %r12, %rdi
callq 0x59b8
movl $0xa, %edi
callq 0x2040
movabsq $0x3ffffffffffff, %r13  # imm = 0x3FFFFFFFFFFFF
andq %r12, %r13
addl $0x2, %r15d
cmpl $0x0, 0x1c(%r13)
jle 0xa3d1
movslq %r15d, %r12
leaq 0x1e3b(%rip), %r15      # 0xc1c8
xorl %ebp, %ebp
movq 0x8(%r14), %rax
leaq (%rax,%r12), %rcx
cmpb $0x0, (%rcx,%rbp,2)
leaq 0x1e52(%rip), %rdx      # 0xc1f4
je 0xa3ab
leaq 0x1e43(%rip), %rdx      # 0xc1ee
movslq %ebx, %rbx
movzbl 0x3(%rax,%rbx), %ecx
addl $0x2, %ebx
movq %r15, %rdi
movl %ebx, %esi
xorl %eax, %eax
callq 0x20b0
incq %rbp
cmpl 0x1c(%r13), %ebp
jl 0xa38f
addl $0x2, %ebx
movl %ebx, %r15d
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/mem.c
// Function: allocator_free
void allocator_free(Allocator *allocator) {
    table_free(&allocator->strings);
    free(allocator->gray_stack);

    Object *objects = allocator->objects;
    while (objects) {
        Object *next = objects->next;
        free_object(allocator, objects);
        objects = next;
    }

    allocator_init(allocator);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
callq 0x4c0e
leaq 0x20(%rbx), %r14
movq 0x20(%rbx), %rdi
callq 0x2030
movq 0x10(%rbx), %rsi
testq %rsi, %rsi
je 0xa471
movq 0x8(%rsi), %r15
movq %rbx, %rdi
callq 0xa49b
movq %r15, %rsi
testq %r15, %r15
jne 0xa45d
xorl %eax, %eax
movq %rax, 0x10(%rbx)
movq %rax, 0x10(%r14)
xorps %xmm0, %xmm0
movups %xmm0, (%r14)
movq $0x100000, 0x38(%rbx)   # imm = 0x100000
movb $0x0, 0x40(%rbx)
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x4bf8
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/mem.c
// Function: allocate
void *allocate(Allocator *allocator, void *previous, size_t old_size, size_t new_size) {
    allocator->bytes_allocated += new_size - old_size;

    if (!allocator->gc_off && new_size > old_size) {
#ifdef DEBUG_STRESS_GC
        allocator_gc(allocator);
#else
        if (allocator->bytes_allocated >= allocator->next_gc) {
            allocator_gc(allocator);
        }
#endif
    }

    if (new_size == 0) {
        free(previous);
        return NULL;
    }

    return realloc(previous, new_size);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rcx, %rbx
movq %rsi, %r14
movq %rcx, %rax
subq %rdx, %rax
addq 0x30(%rdi), %rax
movq %rax, 0x30(%rdi)
cmpq %rdx, %rcx
jbe 0xa584
cmpb $0x0, 0x40(%rdi)
jne 0xa584
cmpq 0x38(%rdi), %rax
jb 0xa589
callq 0xa5ad
jmp 0xa589
testq %rbx, %rbx
je 0xa59b
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x21b0
movq %r14, %rdi
callq 0x2030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/mem.c
// Function: mark_roots
void mark_roots(Allocator *allocator) {
    VM *vm = (VM *)allocator;

    // Locals and Temporaries
    for (Value *slot = vm->stack; slot < vm->stack_top; slot++) {
        mark_value(allocator, *slot);
    }

    // Call Stack
    for (int i = 0; i < vm->frame_count; i++) {
        mark_object(allocator, (Object *)vm->frames[i].closure);
    }

    // Globals
    for (int i = 0; i <= vm->globals.hash_mask; i++) {
        Entry *entry = &vm->globals.entries[i];

        if (entry->key != NULL) {
            mark_object(allocator, (Object *)entry->key);
            mark_value(allocator, entry->value);
        }
    }

    // Upvalues
    for (RavUpvalue *upvalue = vm->open_upvalues; upvalue != NULL; ) {
        mark_object(allocator, (Object *)upvalue);
        upvalue = upvalue->next;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $-0x4000000000001, %r14 # imm = 0xFFFBFFFFFFFFFFFF
movabsq $0x3ffffffffffff, %r15  # imm = 0x3FFFFFFFFFFFF
leaq 0x58(%rdi), %r12
movq 0x40058(%rdi), %rax
cmpq %rax, %r12
jae 0xa82e
movq (%r12), %rsi
cmpq %r14, %rsi
jbe 0xa828
andq %r15, %rsi
movq %rbx, %rdi
callq 0xa8e3
movq 0x40058(%rbx), %rax
addq $0x8, %r12
jmp 0xa808
cmpl $0x0, 0x40c68(%rbx)
jle 0xa860
leaq 0x40068(%rbx), %r12
xorl %r13d, %r13d
movq (%r12), %rsi
movq %rbx, %rdi
callq 0xa8e3
incq %r13
movslq 0x40c68(%rbx), %rax
addq $0x18, %r12
cmpq %rax, %r13
jl 0xa841
cmpl $0x0, 0x40c7c(%rbx)
js 0xa8b7
movq $-0x1, %r12
movl $0x8, %r13d
movq 0x40c70(%rbx), %rbp
movq -0x8(%rbp,%r13), %rsi
testq %rsi, %rsi
je 0xa8a4
movq %rbx, %rdi
callq 0xa8e3
movq (%rbp,%r13), %rsi
cmpq %r14, %rsi
jbe 0xa8a4
andq %r15, %rsi
movq %rbx, %rdi
callq 0xa8e3
movslq 0x40c7c(%rbx), %rax
incq %r12
addq $0x10, %r13
cmpq %rax, %r12
jl 0xa876
movq 0x40c80(%rbx), %r14
testq %r14, %r14
je 0xa8d4
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa8e3
movq 0x20(%r14), %r14
jmp 0xa8be
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O3/mahrr[P]raven/src/mem.c
// Function: mark_object
static void mark_object(Allocator *allocator, Object *object) {
    if (object == NULL) return;
    if (object->marked) return;

#ifdef DEBUG_TRACE_MEMORY
    printf("[Memory] %p get marked: ", object);
    value_print(Obj_Value(object));
    putchar('\n');
#endif

    object->marked = true;

    // Strings and native functions have no nested references, so no need
    // to push them into the gray stack
    if (object->type == OBJ_STRING || object->type == OBJ_CFUNCTION) {
        return;
    }

    // Add the object to the marked stack.
    if (allocator->gray_count == allocator->gray_capacity) {
        int new_capacity = Grow_Capacity(allocator->gray_capacity);
        size_t size = sizeof (Object*) * new_capacity;

        allocator->gray_stack = realloc(allocator->gray_stack, size);
        allocator->gray_capacity = new_capacity;
    }

    allocator->gray_stack[allocator->gray_count++] = object;
}

// Assembly:
testq %rsi, %rsi
je 0xa956
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
cmpb $0x0, 0x4(%rsi)
jne 0xa951
movb $0x1, 0x4(%rbx)
movl (%rbx), %eax
testl %eax, %eax
je 0xa951
cmpl $0x7, %eax
je 0xa951
movq %rdi, %r14
movl 0x2c(%rdi), %ecx
cmpl 0x28(%rdi), %ecx
jne 0xa93f
leal (%rcx,%rcx), %eax
cmpl $0x8, %ecx
movl $0x8, %r15d
cmovgel %eax, %r15d
leaq (,%r15,8), %rsi
movq 0x20(%r14), %rdi
callq 0x21b0
movq %rax, 0x20(%r14)
movl %r15d, 0x28(%r14)
movl 0x2c(%r14), %ecx
jmp 0xa943
movq 0x20(%r14), %rax
leal 0x1(%rcx), %edx
movl %edx, 0x2c(%r14)
movslq %ecx, %rcx
movq %rbx, (%rax,%rcx,8)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O3/USArmyResearchLab[P]ARL_OpenSHMEM/src/shmem_init.c
// Function: shm_alloc
static void* shm_alloc(size_t size, unsigned int gkey, int id, int* ret_fd)
{
	if (gkey == 0) return(0);

	int fd;
	void* p0;

	struct timeval t0,t1;
	int timeout;

	char shmobj0[64];

	snprintf(shmobj0,64,"/" SHM_ALLOC_SHMOBJ_TAG ".%d.%d",gkey,id);

	if (__shmem.my_pe == 0) {

		fd = shm_open( shmobj0,O_RDWR|O_CREAT|O_EXCL,0);

		if (fd < 0) {
			fprintf(stderr,"shmem error: master shm_open failed\n");
			exit(-1);
		}

		ftruncate(fd,size);

		p0 = mmap( 0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);

		if (!p0) {
			close(fd);
			if (ret_fd) *ret_fd = -1;
			return(0);
		}

		fchmod(fd,S_IRUSR|S_IWUSR);

	} else {

		timeout = 0;
		gettimeofday(&t0,0);
		t0.tv_sec += SHM_ALLOC_TIMEOUT;

		do {
			fd = shm_open( shmobj0, O_RDWR,0);
			gettimeofday(&t1,0);
			timeout = (t1.tv_sec > t0.tv_sec && t1.tv_usec > t0.tv_usec)? 1:0;
		} while( (fd < 0) && !timeout );
	
		if (timeout) {
			errno = ENOKEY;
			if(ret_fd) *ret_fd = -1;
			return(0);
		}

		ftruncate(fd,size);

		p0 = mmap( 0,size,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0);

		if (!p0) {
			close(fd);
			if (ret_fd) *ret_fd = -1;
			return(0);
		}

	}

	if (ret_fd) *ret_fd = fd;

	return(p0);	

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
testl %esi, %esi
je 0x1c51
movq %rcx, %rbx
movl %edx, %r8d
movl %esi, %ecx
movq %rdi, %r14
leaq 0x2627(%rip), %rdx      # 0x41be
leaq 0x30(%rsp), %rdi
movl $0x40, %esi
xorl %eax, %eax
callq 0x1100
cmpl $0x0, 0x4645(%rip)      # 0x61f4
je 0x1c59
movq %rbx, 0x8(%rsp)
leaq 0x20(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
callq 0x1120
movq (%r15), %r13
movq 0x8(%r15), %rbx
addq $0xa, %r13
leaq 0x30(%rsp), %r15
leaq 0x10(%rsp), %r12
movq %r15, %rdi
movl $0x2, %esi
xorl %edx, %edx
callq 0x1250
movl %eax, %ebp
movq %r12, %rdi
xorl %esi, %esi
callq 0x1120
cmpq %r13, 0x10(%rsp)
setle %cl
cmpq %rbx, 0x18(%rsp)
setle %al
orb %cl, %al
testl %ebp, %ebp
jns 0x1c13
testb %al, %al
jne 0x1bde
testb %al, %al
je 0x1caa
movl %ebp, %edi
movq %r14, %rsi
callq 0x1110
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x10e0
testq %rax, %rax
movq 0x8(%rsp), %rbx
je 0x1cc4
movq %rax, %r14
jmp 0x1cd3
xorl %r14d, %r14d
jmp 0x1cda
leaq 0x30(%rsp), %rdi
movl $0xc2, %esi
xorl %edx, %edx
callq 0x1250
testl %eax, %eax
js 0x1cec
movl %eax, %ebp
movl %eax, %edi
movq %r14, %rsi
callq 0x1110
xorl %edi, %edi
movq %r14, %rsi
movl $0x3, %edx
movl $0x1, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x10e0
testq %rax, %rax
je 0x1cc4
movq %rax, %r14
movl %ebp, %edi
movl $0x180, %esi            # imm = 0x180
callq 0x11e0
jmp 0x1cd3
callq 0x1060
movl $0x7e, (%rax)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
movq 0x8(%rsp), %rbx
jmp 0x1cd3
movl %ebp, %edi
callq 0x1150
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
xorl %r14d, %r14d
testq %rbx, %rbx
je 0x1cda
movl %ebp, (%rbx)
movq %r14, %rax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x12b6