LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: runtime_error
static void runtime_error(VM *vm, const char *format, ...) {
    va_list arguments;
    va_start(arguments, format);

    CallFrame *frame = &vm->frames[vm->frame_count - 1];
    RavFunction *function = frame->closure->function;

    // -1 because ip is sitting on the next instruction to be executed.
    size_t offset = frame->ip - function->chunk.opcodes - 1;
    int line = chunk_decode_line(&function->chunk, offset);
    fprintf(stderr, "[%s | line: %d] ", vm->path, line);

    vfprintf(stderr, format, arguments);
    putc('\n', stderr);

    dump_stack_trace(vm, stderr);

    va_end(arguments);
    reset_stack(vm);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
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 0x2343
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 %rsp, %r15
movq %rsi, 0x10(%r15)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%r15)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%r15)
movslq 0x40c68(%rdi), %rax
imulq $0x18, %rax, %rax
movq 0x40050(%rax,%rdi), %rcx
movq 0x10(%rcx), %rdi
movl 0x28(%rdi), %esi
addq $0x20, %rdi
notl %esi
addl 0x40058(%rax,%rbx), %esi
callq 0x4dcf
movq 0xdc5a(%rip), %r12      # 0xfff0
movq (%r12), %rdi
movq 0x48(%rbx), %rdx
leaq 0x8db8(%rip), %rsi      # 0xb15d
movl %eax, %ecx
xorl %eax, %eax
callq 0x2140
movq (%r12), %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x21d0
movq (%r12), %rsi
pushq $0xa
popq %rdi
callq 0x2130
movq (%r12), %r14
leaq 0x8d9a(%rip), %rdi      # 0xb16e
pushq $0x11
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x2200
movslq 0x40c68(%rbx), %r13
testq %r13, %r13
jle 0x247d
imulq $0x18, %r13, %rax
incq %r13
leaq (%rax,%rbx), %rbp
addq $0x40058, %rbp          # imm = 0x40058
leaq 0x8d75(%rip), %r15      # 0xb180
movq -0x8(%rbp), %rax
movq 0x10(%rax), %r12
leaq 0x20(%r12), %rdi
movl 0x28(%r12), %esi
notl %esi
addl (%rbp), %esi
callq 0x4dcf
movq 0x48(%rbx), %rdx
movq %r14, %rdi
movq %r15, %rsi
movl %eax, %ecx
xorl %eax, %eax
callq 0x2140
movq 0x10(%r12), %rax
testq %rax, %rax
jne 0x245b
leaq 0x8d47(%rip), %rdi      # 0xb192
pushq $0xb
popq %rsi
pushq $0x1
popq %rdx
movq %r14, %rcx
callq 0x2200
jmp 0x2470
movq 0x18(%rax), %rdx
movq %r14, %rdi
leaq 0x8be9(%rip), %rsi      # 0xb052
xorl %eax, %eax
callq 0x2140
decq %r13
addq $-0x18, %rbp
cmpq $0x1, %r13
jg 0x240b
leaq 0x58(%rbx), %rax
movq %rax, 0x40058(%rbx)
andl $0x0, 0x40c68(%rbx)
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/compiler.c
// Function: error_header
static void error_header(Parser *parser, Token *where) {
    parser->panic_mode = true;
    parser->had_error = true;

    fprintf(stderr, "[%s: %d] SyntaxError",
            parser->lexer->file, where->line);

    if (where->type == TOKEN_EOF) {
        fprintf(stderr, " at end");
    } else if (where->type != TOKEN_ERROR) {
        fprintf(stderr, " at '%.*s'", where->length, where->lexeme);
    }

    fprintf(stderr, ": ");
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movw $0x101, 0x48(%rdi)      # imm = 0x101
movq 0xdb3b(%rip), %r14      # 0xfff0
movq (%r14), %rax
movq (%rdi), %rcx
movq (%rcx), %rdx
movl 0x14(%rsi), %ecx
leaq 0x92de(%rip), %rsi      # 0xb7a6
movq %rax, %rdi
xorl %eax, %eax
callq 0x2140
movl (%rbx), %eax
cmpl $0x35, %eax
je 0x250d
cmpl $0x36, %eax
jne 0x24f5
movq (%r14), %rcx
leaq 0x92d3(%rip), %rdi      # 0xb7bb
pushq $0x7
popq %rsi
pushq $0x1
popq %rdx
callq 0x2200
jmp 0x250d
movq (%r14), %rdi
movl 0x10(%rbx), %edx
movq 0x8(%rbx), %rcx
leaq 0x92bd(%rip), %rsi      # 0xb7c3
xorl %eax, %eax
callq 0x2140
movq (%r14), %rcx
leaq 0x91d2(%rip), %rdi      # 0xb6e9
pushq $0x2
popq %rsi
pushq $0x1
popq %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2200
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/lexer.c
// Function: error_token
static Token error_token(Lexer *lexer, const char *message) {
    fprintf(stderr, "[%s: %d] SyntaxError at '%.1s': %s\n", lexer->file, lexer->line, lexer->start, message);

    Token token;
    token.type = TOKEN_ERROR;
    token.line = lexer->line;
    token.lexeme = NULL;
    token.length = 0;

    return token;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r9
movq %rsi, %rbx
movq %rdi, %r14
movq 0xdab3(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movl 0x18(%rsi), %ecx
movq (%rsi), %rdx
movq 0x8(%rsi), %r8
leaq 0x98ff(%rip), %rsi      # 0xbe50
xorl %eax, %eax
callq 0x2140
movl $0x35, (%r14)
movl 0x18(%rbx), %eax
movl %eax, 0x14(%r14)
andq $0x0, 0x8(%r14)
andl $0x0, 0x10(%r14)
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/raven.c
// Function: main
int main(int argc, char **argv) {
    if (argc == 1) {
        repl();
    } else if (argc == 2) {
        execute_file(argv[1]);
    } else {
        usage();
    }

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40d88, %rsp          # imm = 0x40D88
cmpl $0x2, %edi
je 0x27f3
cmpl $0x1, %edi
jne 0x28f3
leaq 0x100(%rsp), %rdi
callq 0x2924
movq 0xd885(%rip), %r13      # 0xffc8
movq (%r13), %rsi
leaq 0x88b6(%rip), %rdi      # 0xb004
callq 0x20f0
movq 0xd876(%rip), %rbp      # 0xffd0
movq (%rbp), %rdx
movq %rsp, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2120
testq %rax, %rax
je 0x27e1
leaq 0x8890(%rip), %rbx      # 0xb007
leaq 0x100(%rsp), %r14
movq %rsp, %r15
leaq 0x887b(%rip), %r12      # 0xb004
movq (%rbp), %rdi
callq 0x2160
testl %eax, %eax
jne 0x27e1
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2bf9
testl %eax, %eax
jne 0x27bf
movq 0x150(%rsp), %rdi
callq 0x5cd4
movl $0xa, %edi
callq 0x2040
movq (%r13), %rsi
movq %r12, %rdi
callq 0x20f0
movq (%rbp), %rdx
movq %r15, %rdi
movl $0x100, %esi            # imm = 0x100
callq 0x2120
testq %rax, %rax
jne 0x2789
leaq 0x100(%rsp), %rdi
callq 0x2bd1
jmp 0x28d7
movq 0x8(%rsi), %rbx
leaq 0x100(%rsp), %rdi
callq 0x2924
leaq 0x8802(%rip), %rsi      # 0xb00d
movq %rbx, %rdi
callq 0x21c0
testq %rax, %rax
je 0x2913
movq %rax, %r14
movq %rax, %rdi
xorl %esi, %esi
movl $0x2, %edx
callq 0x21a0
movq %r14, %rdi
callq 0x2150
movq %rax, %r12
movq %r14, %rdi
callq 0x20c0
leaq 0x1(%r12), %rdi
callq 0x2180
testq %rax, %rax
je 0x291b
movq %rax, %r15
movl $0x1, %esi
movq %rax, %rdi
movq %r12, %rdx
movq %r14, %rcx
callq 0x2080
cmpq %r12, %rax
jb 0x28eb
movq %r14, %rdi
callq 0x2070
testl %eax, %eax
jne 0x28eb
movq %r14, %rdi
callq 0x20a0
movb $0x0, (%r15,%r12)
leaq 0x100(%rsp), %rdi
movq %r15, %rsi
movq %rbx, %rdx
callq 0x2bf9
movl %eax, %ebx
testl %eax, %eax
jne 0x28b8
movq 0x150(%rsp), %rdi
callq 0x5cd4
movl $0xa, %edi
callq 0x2040
movq %r15, %rdi
callq 0x2030
leaq 0x100(%rsp), %rdi
callq 0x2bd1
cmpl $0x1, %ebx
je 0x2909
cmpl $0x2, %ebx
je 0x2909
xorl %eax, %eax
addq $0x40d88, %rsp          # imm = 0x40D88
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
callq 0x2240
movq 0xd6ce(%rip), %rax      # 0xffc8
movq (%rax), %rsi
leaq 0x8774(%rip), %rdi      # 0xb078
callq 0x20f0
movl $0x1, %edi
callq 0x21f0
movq %rbx, %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x227c
nop
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: init_vm
void init_vm(VM *vm) {
    vm->open_upvalues = NULL;
    vm->reset_on_exit = true;

    allocator_init(&vm->allocator);
    table_init(&vm->globals);
    reset_stack(vm);
    register_natives(vm);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq $0x0, 0x40c80(%rdi)
movb $0x1, 0x40060(%rdi)
callq 0xa7e0
leaq 0x40c70(%rbx), %rdi
callq 0x4e28
leaq 0x58(%rbx), %rax
movq %rax, 0x40058(%rbx)
movl $0x0, 0x40c68(%rbx)
movq %rbx, %rdi
popq %rbx
jmp 0x2966
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: interpret
InterpretResult interpret(VM *vm, const char *source, const char *path) {
    // Disable the GC while compiling.
    vm->allocator.gc_off = true;
    vm->x = Nil_Value;

    RavFunction *function = compile(vm, source, path);
    if (function == NULL) {
        return INTERPRET_COMPILE_ERROR;
    }

    RavClosure *closure = object_closure(&vm->allocator, function);
    push(vm, Obj_Value(closure));

    // Top-level code is wrapped in a function for convenience,
    // to run the code, we simply call the wrapping function.
    push_frame(vm, closure, 0);

    vm->path = path;
    vm->allocator.gc_off = false;
    return run_vm(vm);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rdi, %rbx
movb $0x1, 0x40(%rdi)
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
movq %rax, 0x50(%rdi)
callq 0x5d70
testq %rax, %rax
je 0x2c9d
movq %rbx, %rdi
movq %rax, %rsi
callq 0x55e4
movabsq $-0x4000000000000, %rdx # imm = 0xFFFC000000000000
orq %rax, %rdx
movq 0x40058(%rbx), %rcx
leaq 0x8(%rcx), %rsi
movq %rsi, 0x40058(%rbx)
movq %rdx, (%rcx)
movslq 0x40c68(%rbx), %rdx
cmpq $0x80, %rdx
je 0x2caa
leal 0x1(%rdx), %esi
movl %esi, 0x40c68(%rbx)
leaq (%rdx,%rdx,2), %rdx
movq %rax, 0x40068(%rbx,%rdx,8)
movq 0x10(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, 0x40070(%rbx,%rdx,8)
movq %rcx, 0x40078(%rbx,%rdx,8)
movq %r14, 0x48(%rbx)
movb $0x0, 0x40(%rbx)
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2cbd
movl $0x1, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x8708(%rip), %rsi      # 0xb3b9
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22dc
jmp 0x2c89
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_assert
static bool native_assert(VM *vm, Value *arguments, size_t count, Value *result) {
    Value expression = arguments[0];
    Value message = Nil_Value;

    // message is optional
    if (count == 2) {
        message = arguments[1];

        if (Is_String(message) == false) {
            runtime_error(vm, "`assert` expected string as second argument, got %s", type_repr(message));
            return false;
        }
    }

    if (is_falsy(expression)) {
        if (count == 2) {
            runtime_error(vm, "assertion failed: %s", As_String(message)->chars);
        } else {
            runtime_error(vm, "assertion failed");
        }
        return false;
    }

    *result = Nil_Value;
    return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
movq (%rsi), %r8
movq %rax, %rdi
cmpq $0x2, %rdx
jne 0x4734
movq 0x8(%rsi), %rdi
movq %rdi, %rsi
shrq $0x32, %rsi
cmpl $0x3fff, %esi           # imm = 0x3FFF
jb 0x4782
movabsq $0x3ffffffffffff, %rsi  # imm = 0x3FFFFFFFFFFFF
andq %rdi, %rsi
cmpl $0x0, (%rsi)
jne 0x4782
cmpq %rax, %r8
je 0x475d
leaq 0x2(%rax), %rsi
cmpq %rsi, %r8
je 0x474e
leaq 0x1(%rax), %rsi
andq %rsi, %r8
cmpq %rsi, %r8
je 0x475d
movq %rax, (%rcx)
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
cmpq $0x2, %rdx
jne 0x479f
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
andq %rax, %rdi
movq 0x18(%rdi), %rdx
leaq 0x6acb(%rip), %rsi      # 0xb246
xorl %ebp, %ebp
movq %rbx, %rdi
jmp 0x4796
callq 0x4bd6
leaq 0x6a84(%rip), %rsi      # 0xb212
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22dc
jmp 0x4754
leaq 0x6ab5(%rip), %rsi      # 0xb25b
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22dc
jmp 0x4754
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_print
static bool native_print(VM *vm, Value *arguments, size_t count, Value *result) {
    MAYBE_UNUSED(vm);

    for (size_t i = 0; i < count; ++i) {
        value_print(arguments[i]);
        putchar(' ');
    }

    *result = Nil_Value;
    return true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %rbx
testq %rdx, %rdx
je 0x47e8
movq %rdx, %r14
movq %rsi, %r15
xorl %r12d, %r12d
movq (%r15,%r12,8), %rdi
callq 0x5cd4
movl $0x20, %edi
callq 0x2040
incq %r12
cmpq %r12, %r14
jne 0x47cd
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
movq %rax, (%rbx)
movb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_len
static bool native_len(VM *vm, Value *arguments, size_t count, Value *result) {
    MAYBE_UNUSED(count);

    Value argument = arguments[0];
    if (Is_String(argument)) {
        *result = Num_Value(As_String(argument)->length);
        return true;
    }
    if (Is_Array(argument)) {
        *result = Num_Value(As_Array(argument)->count);
        return true;
    }
    if (Is_Map(argument)) {
        *result = Num_Value(As_Map(argument)->table.count);
        return true;
    }

    runtime_error(vm, "`len` expected collection, got %s", type_repr(argument));
    return false;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
movq %rdi, %rdx
shrq $0x32, %rdx
cmpl $0x3fff, %edx           # imm = 0x3FFF
jb 0x48e2
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
andq %rdi, %rax
cmpl $0x0, (%rax)
je 0x48b9
cmpl $0x3fff, %edx           # imm = 0x3FFF
jb 0x48e2
cmpl $0x2, (%rax)
jne 0x48c0
movsd 0x18(%rax), %xmm0
unpcklps 0x67f1(%rip), %xmm0     # xmm0 = xmm0[0],mem[0],xmm0[1],mem[1]
subpd 0x67f9(%rip), %xmm0     # 0xb0a0
movapd %xmm0, %xmm1
unpckhpd %xmm0, %xmm1            # xmm1 = xmm1[1],xmm0[1]
addsd %xmm0, %xmm1
movsd %xmm1, (%rcx)
jmp 0x48d6
cvtsi2sdl 0x10(%rax), %xmm0
jmp 0x48d2
cmpl $0x3fff, %edx           # imm = 0x3FFF
jb 0x48e2
cmpl $0x3, (%rax)
jne 0x48e2
cvtsi2sdl 0x18(%rax), %xmm0
movsd %xmm0, (%rcx)
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x4bd6
leaq 0x697e(%rip), %rsi      # 0xb26c
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22dc
jmp 0x48d9
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_push
static bool native_push(VM *vm, Value *arguments, size_t count, Value *result) {
    Value argument = arguments[0];
    if (Is_Array(argument) == false) {
        runtime_error(vm, "`push` expected array as firt argument, got %s", type_repr(argument));
        return false;
    }

    RavArray *array = As_Array(argument);
    for (size_t i = 1; i < count; ++i) {
        // Grow array memory, if needed
        if (array->count == array->capacity) {
            size_t old_cap = array->capacity;
            size_t new_cap = Grow_Capacity(old_cap);
            array->capacity = new_cap;
            array->values = Grow_Array(&vm->allocator, array->values, Value, old_cap, new_cap);
        }
        array->values[array->count++] = arguments[i];
    }

    *result = argument;
    return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %r12
movq %rsi, %r13
movq %rdi, %rbx
movq (%rsi), %rdi
movq %rdi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x493d
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
andq %rdi, %rax
cmpl $0x2, (%rax)
sete %bpl
jmp 0x493f
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x49eb
movq %rdi, 0x8(%rsp)
movq %rcx, 0x10(%rsp)
movl %ebp, 0x4(%rsp)
cmpq $0x2, %r12
jb 0x49c9
movabsq $0x3ffffffffffff, %r14  # imm = 0x3FFFFFFFFFFFF
andq 0x8(%rsp), %r14
movl $0x1, %ebp
movl $0x8, %r15d
movq 0x20(%r14), %rdx
cmpq %rdx, 0x18(%r14)
jne 0x49a8
leaq (%rdx,%rdx), %rcx
cmpq $0x8, %rdx
cmovbq %r15, %rcx
movq %rcx, 0x20(%r14)
movq 0x10(%r14), %rsi
shlq $0x3, %rdx
shlq $0x3, %rcx
movq %rbx, %rdi
callq 0xa91c
movq %rax, 0x10(%r14)
movq (%r13,%rbp,8), %rax
movq 0x10(%r14), %rcx
movq 0x18(%r14), %rdx
leaq 0x1(%rdx), %rsi
movq %rsi, 0x18(%r14)
movq %rax, (%rcx,%rdx,8)
incq %rbp
cmpq %rbp, %r12
jne 0x4976
movq 0x10(%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movl 0x4(%rsp), %ebp
movl %ebp, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x4bd6
leaq 0x6897(%rip), %rsi      # 0xb28e
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22dc
jmp 0x49da
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_pop
static bool native_pop(VM *vm, Value *arguments, size_t count, Value *result) {
    MAYBE_UNUSED(count);

    Value argument = arguments[0];
    if (Is_Array(argument) == false) {
        runtime_error(vm, "`pop` expected array, got %s", type_repr(argument));
        return false;
    }

    RavArray *array = As_Array(argument);
    if (array->count == 0) {
        runtime_error(vm, "`pop` on an empty array");
        return false;
    }

    *result = array->values[--array->count];
    return true;
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq (%rsi), %rdi
movq %rdi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jb 0x4a58
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
andq %rdi, %rax
cmpl $0x2, (%rax)
jne 0x4a58
movq 0x18(%rax), %rdx
testq %rdx, %rdx
je 0x4a75
movq 0x10(%rax), %rsi
leaq -0x1(%rdx), %rdi
movq %rdi, 0x18(%rax)
movq -0x8(%rsi,%rdx,8), %rax
movq %rax, (%rcx)
movb $0x1, %bpl
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
callq 0x4bd6
leaq 0x6859(%rip), %rsi      # 0xb2bd
xorl %ebp, %ebp
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22dc
jmp 0x4a4f
leaq 0x685e(%rip), %rsi      # 0xb2da
xorl %ebp, %ebp
movq %rbx, %rdi
xorl %eax, %eax
callq 0x22dc
jmp 0x4a4f
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_insert
static bool native_insert(VM *vm, Value *arguments, size_t count, Value *result) {
    MAYBE_UNUSED(count);

    Value argument1 = arguments[0];
    if (Is_Map(argument1) == false) {
        runtime_error(vm, "`insert` expected map as first argument, got %s", type_repr(argument1));
        return false;
    }
    RavMap *map = As_Map(argument1);

    Value argument2 = arguments[1];
    if (Is_String(argument2) == false) {
        runtime_error(vm, "`insert` expected string as second argument, got %s", type_repr(argument2));
        return false;
    }
    RavString *key = As_String(argument2);

    Value value = arguments[2];
    table_set(&map->table, key, value);
    *result = value;
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4b04
movabsq $0x3ffffffffffff, %rcx  # imm = 0x3FFFFFFFFFFFF
movq %rax, %rdi
andq %rcx, %rdi
cmpl $0x3, (%rdi)
jne 0x4b04
movabsq $-0x4000000000001, %rdx # imm = 0xFFFBFFFFFFFFFFFF
movq 0x8(%rsi), %rax
cmpq %rdx, %rax
jbe 0x4add
movq %rax, %rdx
andq %rcx, %rdx
cmpl $0x0, (%rdx)
sete %bpl
jmp 0x4adf
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x4b17
andq %rcx, %rax
movq 0x10(%rsi), %rbx
addq $0x10, %rdi
movq %rax, %rsi
movq %rbx, %rdx
callq 0x4ee3
movq %rbx, (%r14)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x4bd6
leaq 0x67df(%rip), %rsi      # 0xb2f2
xorl %ebp, %ebp
jmp 0x4b26
movq %rax, %rdi
callq 0x4bd6
leaq 0x67fc(%rip), %rsi      # 0xb322
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22dc
jmp 0x4afd
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: native_remove
static bool native_remove(VM *vm, Value *arguments, size_t count, Value *result) {
    MAYBE_UNUSED(count);

    Value argument1 = arguments[0];
    if (Is_Map(argument1) == false) {
        runtime_error(vm, "`remove` expected map as firt argument, got %s", type_repr(argument1));
        return false;
    }
    RavMap *map = As_Map(argument1);

    Value argument2 = arguments[1];
    if (Is_String(argument2) == false) {
        runtime_error(vm, "`remove` expected string as second argument, got %s", type_repr(argument2));
        return false;
    }
    RavString *key = As_String(argument2);

    *result = table_remove(&map->table, key);
    return true;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rcx, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4ba5
movabsq $0x3ffffffffffff, %rcx  # imm = 0x3FFFFFFFFFFFF
movq %rax, %rdi
andq %rcx, %rdi
cmpl $0x3, (%rdi)
jne 0x4ba5
movabsq $-0x4000000000001, %rax # imm = 0xFFFBFFFFFFFFFFFF
movq 0x8(%rsi), %rsi
cmpq %rax, %rsi
jbe 0x4b88
movq %rsi, %rax
andq %rcx, %rax
cmpl $0x0, (%rax)
sete %bpl
jmp 0x4b8a
xorl %ebp, %ebp
testb %bpl, %bpl
je 0x4bb8
andq %rcx, %rsi
addq $0x10, %rdi
callq 0x50b4
movq %rax, (%r14)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rdi
callq 0x4bd6
leaq 0x67a2(%rip), %rsi      # 0xb356
xorl %ebp, %ebp
jmp 0x4bc7
movq %rsi, %rdi
callq 0x4bd6
leaq 0x67be(%rip), %rsi      # 0xb385
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x22dc
jmp 0x4b9e
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/vm.c
// Function: type_repr
static const char* type_repr(Value value) {
    if (Is_Nil(value))       return "nil";
    if (Is_Bool(value))      return "boolean";
    if (Is_Num(value))       return "number";
    if (Is_String(value))    return "string";
    if (Is_Pair(value))      return "pair";
    if (Is_Array(value))     return "array";
    if (Is_Map(value))       return "map";
    if (Is_Function(value))  return "function";
    if (Is_Closure(value))   return "function";
    if (Is_CFunction(value)) return "native-function";

    assert(!"unreachable: invalid value tag");
    return NULL;
}

// Assembly:
movabsq $0x7ffc000000000000, %rax # imm = 0x7FFC000000000000
leaq 0x1(%rax), %rcx
cmpq %rcx, %rdi
jne 0x4bf1
leaq 0x65ae(%rip), %rax      # 0xb19e
retq
leaq 0x2(%rax), %rdx
movq %rdi, %rcx
notq %rcx
testq %rcx, %rdx
jne 0x4c08
leaq 0x659b(%rip), %rax      # 0xb1a2
retq
testq %rcx, %rax
jne 0x4c47
movq %rdi, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
movabsq $0x3ffffffffffff, %rax  # imm = 0x3FFFFFFFFFFFF
andq %rax, %rdi
cmpl $0x0, (%rdi)
je 0x4c4f
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
cmpl $0x1, (%rdi)
jne 0x4c57
leaq 0x656b(%rip), %rax      # 0xb1b1
retq
leaq 0x655c(%rip), %rax      # 0xb1aa
retq
leaq 0x70dc(%rip), %rax      # 0xbd32
retq
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
cmpl $0x2, (%rdi)
jne 0x4c6c
leaq 0x6681(%rip), %rax      # 0xb2ec
retq
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
cmpl $0x3, (%rdi)
jne 0x4c81
leaq 0x6536(%rip), %rax      # 0xb1b6
retq
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
leaq 0x6531(%rip), %rax      # 0xb1c1
cmpl $0x4, (%rdi)
je 0x4cb6
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
cmpl $0x6, (%rdi)
je 0x4cb6
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x4cb7
cmpl $0x7, (%rdi)
jne 0x4cb7
leaq 0x6504(%rip), %rax      # 0xb1ba
retq
pushq %rax
leaq 0x650b(%rip), %rdi      # 0xb1ca
leaq 0x6526(%rip), %rsi      # 0xb1ec
leaq 0x6528(%rip), %rcx      # 0xb1f5
movl $0x20, %edx
callq 0x20e0
nop
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/chunk.c
// Function: chunk_write_byte
void chunk_write_byte(Chunk *chunk, uint8_t byte, int line) {
    if (chunk->count == chunk->capacity) {
        chunk->capacity = Grow_Capacity(chunk->capacity);
        chunk->opcodes = realloc(chunk->opcodes, chunk->capacity);
    }

    chunk->opcodes[chunk->count++] = byte;
    write_line(chunk, line);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
movl 0x4(%rdi), %eax
cmpl %eax, (%rdi)
jne 0x4d4a
leal (%rax,%rax), %ecx
cmpl $0x8, %eax
movl $0x8, %esi
cmovgel %ecx, %esi
movl %esi, 0x4(%r14)
movq 0x8(%r14), %rdi
callq 0x21b0
movq %rax, 0x8(%r14)
movq 0x8(%r14), %rax
movslq (%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, (%r14)
movb %bpl, (%rax,%rcx)
movslq 0x10(%r14), %rax
testq %rax, %rax
jle 0x4d6e
movq 0x18(%r14), %rcx
cmpl %ebx, -0x8(%rcx,%rax,8)
je 0x4db4
movl 0x14(%r14), %ecx
cmpl %ecx, %eax
jne 0x4d99
leal (%rcx,%rcx), %eax
cmpl $0x8, %ecx
movl $0x8, %esi
cmovgel %eax, %esi
movl %esi, 0x14(%r14)
movq 0x18(%r14), %rdi
shlq $0x3, %rsi
callq 0x21b0
movq %rax, 0x18(%r14)
movq 0x18(%r14), %rax
movslq 0x10(%r14), %rcx
leal 0x1(%rcx), %edx
movl %edx, 0x10(%r14)
movl %ebx, (%rax,%rcx,8)
movl (%r14), %edx
decl %edx
movl %edx, 0x4(%rax,%rcx,8)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/chunk.c
// Function: chunk_decode_line
int chunk_decode_line(Chunk *chunk, int offset) {
    int start = 0;
    int end = chunk->lines_count - 1;

    for (;;) {
        int mid = (start + end) / 2;
        Line *line = &chunk->lines[mid];

        if (offset < line->offset) {
            end = mid - 1;
        }  else if (mid == chunk->lines_count - 1 || offset < chunk->lines[mid + 1].offset) {
            return line->line;
        } else {
            start = mid + 1;
        }
    }
}

// Assembly:
movl 0x10(%rdi), %ecx
decl %ecx
movq 0x18(%rdi), %rdx
xorl %r8d, %r8d
movl %ecx, %edi
leal (%r8,%rdi), %r10d
movl %r10d, %r9d
shrl $0x1f, %r9d
addl %r10d, %r9d
sarl %r9d
movslq %r9d, %r10
cmpl %esi, 0x4(%rdx,%r10,8)
jle 0x4e03
decl %r9d
movb $0x1, %r10b
movl %r9d, %edi
jmp 0x4e21
cmpl %ecx, %r9d
je 0x4e0f
cmpl %esi, 0xc(%rdx,%r10,8)
jle 0x4e18
movl (%rdx,%r10,8), %eax
xorl %r10d, %r10d
jmp 0x4e21
incl %r9d
movb $0x1, %r10b
movl %r9d, %r8d
testb %r10b, %r10b
jne 0x4ddd
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/table.c
// Function: table_get
bool table_get(Table *table, RavString *key, Value *value) {
    if (table->count == 0) {
        return false;
    }

    Entry *entry = find_entry(table->entries, key, table->hash_mask);
    if (entry->key == NULL) {
        return false;
    }

    *value = entry->value;
    return true;
}

// Assembly:
cmpl $0x0, 0x8(%rdi)
je 0x4ee0
pushq %r14
pushq %rbx
movq (%rdi), %rax
movl 0xc(%rdi), %ecx
movl 0x14(%rsi), %edi
andl %ecx, %edi
xorl %r8d, %r8d
movabsq $0x7ffc000000000001, %r9 # imm = 0x7FFC000000000001
movl %edi, %r11d
shlq $0x4, %r11
leaq (%rax,%r11), %rbx
movq (%rax,%r11), %r11
testq %r11, %r11
je 0x4ea3
cmpq %rsi, %r11
jne 0x4ebe
xorl %r11d, %r11d
movq %rbx, %r10
jmp 0x4ec5
testq %r8, %r8
movq %r8, %r14
cmoveq %rbx, %r14
cmpq %r9, 0x8(%rbx)
jne 0x4ebb
xorl %r11d, %r11d
movq %r14, %r10
jmp 0x4ec5
movq %r14, %r8
incl %edi
andl %ecx, %edi
movb $0x1, %r11b
testb %r11b, %r11b
jne 0x4e82
cmpq $0x0, (%r10)
setne %al
je 0x4edc
movq 0x8(%r10), %rax
movq %rax, (%rdx)
movb $0x1, %al
popq %rbx
popq %r14
retq
xorl %eax, %eax
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/table.c
// Function: table_set
bool table_set(Table *table, RavString *key, Value value) {
    int capacity = table->hash_mask + 1;

    if (table->count >= capacity * TABLE_MAX_LOAD) {
        int new_capacity = Grow_Capacity(capacity);
        adjust_capacity(table, new_capacity - 1);
    }

    Entry *entry = find_entry(table->entries, key, table->hash_mask);

    bool is_new_key = entry->key == NULL;
    if (is_new_key && Is_Nil(entry->value)) {
        table->count++;
    }

    entry->key = key;
    entry->value = value;
    return is_new_key;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r15
movabsq $0x7ffc000000000001, %r13 # imm = 0x7FFC000000000001
movl 0xc(%rdi), %ebx
leal 0x1(%rbx), %r14d
cvtsi2sdl 0x8(%rdi), %xmm0
cvtsi2sd %r14d, %xmm1
mulsd 0x66d9(%rip), %xmm1     # 0xb5f0
ucomisd %xmm1, %xmm0
jb 0x502c
movq %rsi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
cmpl $0x7, %ebx
leal -0x1(%r14,%r14), %eax
movl $0x7, %ebp
cmovgel %eax, %ebp
movslq %ebp, %rdi
shlq $0x4, %rdi
addq $0x10, %rdi
callq 0x2180
movq %rax, %r12
testl %ebp, %ebp
js 0x4f73
leal 0x1(%rbp), %eax
movl %eax, %eax
shlq $0x4, %rax
xorl %ecx, %ecx
movq $0x0, (%r12,%rcx)
movq %r13, 0x8(%r12,%rcx)
addq $0x10, %rcx
cmpq %rcx, %rax
jne 0x4f5d
movl $0x0, 0x8(%r15)
testl %ebx, %ebx
js 0x5013
movq (%r15), %rax
movl %r14d, %ecx
xorl %edx, %edx
movq %rdx, %rsi
shlq $0x4, %rsi
movq (%rax,%rsi), %rdi
testq %rdi, %rdi
je 0x5007
movq %r15, %r14
addq %rax, %rsi
movl 0x14(%rdi), %r8d
andl %ebp, %r8d
xorl %r15d, %r15d
movl %r8d, %r9d
shlq $0x4, %r9
leaq (%r12,%r9), %rbx
movq (%r12,%r9), %r9
testq %r9, %r9
je 0x4fcc
cmpq %rdi, %r9
jne 0x4fe7
xorl %r11d, %r11d
movq %rbx, %r10
jmp 0x4ff0
testq %r15, %r15
movq %r15, %r9
cmoveq %rbx, %r9
cmpq %r13, 0x8(%rbx)
jne 0x4fe4
xorl %r11d, %r11d
movq %r9, %r10
jmp 0x4ff0
movq %r9, %r15
incl %r8d
andl %ebp, %r8d
movb $0x1, %r11b
testb %r11b, %r11b
jne 0x4fab
movq %rdi, (%r10)
movq 0x8(%rsi), %rsi
movq %rsi, 0x8(%r10)
movq %r14, %r15
incl 0x8(%r14)
incq %rdx
cmpq %rcx, %rdx
jne 0x4f8b
movq (%r15), %rdi
callq 0x2030
movq %r12, (%r15)
movl %ebp, 0xc(%r15)
movq 0x10(%rsp), %rdx
movq 0x8(%rsp), %rsi
movq (%r15), %rax
movl 0xc(%r15), %ecx
movl 0x14(%rsi), %r11d
andl %ecx, %r11d
xorl %edi, %edi
movl %r11d, %r8d
shlq $0x4, %r8
leaq (%rax,%r8), %r9
movq (%rax,%r8), %r8
testq %r8, %r8
je 0x505d
cmpq %rsi, %r8
jne 0x5078
xorl %r8d, %r8d
movq %r9, %rbx
jmp 0x5081
testq %rdi, %rdi
movq %rdi, %r10
cmoveq %r9, %r10
cmpq %r13, 0x8(%r9)
jne 0x5075
xorl %r8d, %r8d
movq %r10, %rbx
jmp 0x5081
movq %r10, %rdi
incl %r11d
andl %ecx, %r11d
movb $0x1, %r8b
testb %r8b, %r8b
jne 0x503c
movq (%rbx), %rax
testq %rax, %rax
jne 0x5098
cmpq %r13, 0x8(%rbx)
jne 0x5098
incl 0x8(%r15)
testq %rax, %rax
sete %al
movq %rsi, (%rbx)
movq %rdx, 0x8(%rbx)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/table.c
// Function: table_remove
Value table_remove(Table *table, RavString *key) {
    if (table->count == 0) {
        return Nil_Value;
    }

    Entry *entry = find_entry(table->entries, key, table->hash_mask);
    if (entry->key == NULL) {
        return Nil_Value;
    }

    Value value = entry->value;
    entry->key = NULL;
    entry->value = Bool_Value(false); // Any non-nil value

    return value;
}

// Assembly:
movabsq $0x7ffc000000000001, %rax # imm = 0x7FFC000000000001
cmpl $0x0, 0x8(%rdi)
je 0x5137
pushq %rbx
movq (%rdi), %rcx
movl 0xc(%rdi), %edx
movl 0x14(%rsi), %edi
andl %edx, %edi
xorl %r8d, %r8d
movl %edi, %r10d
shlq $0x4, %r10
leaq (%rcx,%r10), %r11
movq (%rcx,%r10), %r10
testq %r10, %r10
je 0x50f4
cmpq %rsi, %r10
jne 0x510f
xorl %r10d, %r10d
movq %r11, %r9
jmp 0x5116
testq %r8, %r8
movq %r8, %rbx
cmoveq %r11, %rbx
cmpq %rax, 0x8(%r11)
jne 0x510c
xorl %r10d, %r10d
movq %rbx, %r9
jmp 0x5116
movq %rbx, %r8
incl %edi
andl %edx, %edi
movb $0x1, %r10b
testb %r10b, %r10b
jne 0x50d3
cmpq $0x0, (%r9)
je 0x5136
movq 0x8(%r9), %rcx
movq $0x0, (%r9)
incq %rax
movq %rax, 0x8(%r9)
movq %rcx, %rax
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/table.c
// Function: table_copy
void table_copy(Table *from, Table *to) {
    for (int i = 0; i <= from->hash_mask; i++) {
        Entry *entry = &from->entries[i];

        if (entry->key) {
            table_set(to, entry->key, entry->value);
        }
    }
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
js 0x518d
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq $-0x1, %r15
movl $0x8, %r12d
movq (%r14), %rax
movq -0x8(%rax,%r12), %rsi
testq %rsi, %rsi
je 0x5172
movq (%rax,%r12), %rdx
movq %rbx, %rdi
callq 0x4ee3
movslq 0xc(%r14), %rax
incq %r15
addq $0x10, %r12
cmpq %rax, %r15
jl 0x5159
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/table.c
// Function: table_interned
RavString *table_interned(Table *table, const char *chars, uint32_t hash, int length) {
    if (table->count == 0) {
        return NULL;
    }

    uint32_t index = hash & table->hash_mask;
    for (;;) {
        Entry *entry = &table->entries[index];

        if (entry->key == NULL) {
            if (Is_Nil(entry->value)) {
                return NULL;
            }
        } else {
            RavString *key = entry->key;
            if (key->length == length &&
                key->hash == hash &&
                memcmp(key->chars, chars, length) == 0) {
                return key;
            }
        }

        index = (index + 1) & table->hash_mask;
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, 0x18(%rsp)
cmpl $0x0, 0x8(%rdi)
je 0x5244
movl %ecx, %ebx
movl %edx, %r15d
movl 0xc(%rdi), %esi
movl %esi, %r13d
andl %edx, %r13d
movq (%rdi), %r14
movslq %ecx, %rax
movq %rax, 0x10(%rsp)
movabsq $0x7ffc000000000001, %rbp # imm = 0x7FFC000000000001
movl %esi, 0xc(%rsp)
movl %r13d, %eax
shlq $0x4, %rax
movq (%r14,%rax), %r12
testq %r12, %r12
je 0x5220
cmpl %ebx, 0x10(%r12)
jne 0x5216
cmpl %r15d, 0x14(%r12)
jne 0x5216
movq %rdi, 0x20(%rsp)
movq 0x18(%r12), %rdi
movq 0x18(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x2190
movq 0x20(%rsp), %rdi
movl 0xc(%rsp), %esi
testl %eax, %eax
je 0x523d
movb $0x1, %al
testb %al, %al
jne 0x522f
xorl %eax, %eax
jmp 0x5237
addq %r14, %rax
cmpq %rbp, 0x8(%rax)
jne 0x522f
xorl %eax, %eax
xorl %edi, %edi
jmp 0x5237
incl %r13d
andl %esi, %r13d
movb $0x1, %al
testb %al, %al
jne 0x51d2
jmp 0x5246
xorl %eax, %eax
movq %r12, %rdi
jmp 0x5218
xorl %edi, %edi
movq %rdi, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/table.c
// Function: table_remove_weak
void table_remove_weak(Table *table) {
    for (int i = 0; i <= table->hash_mask; i++) {
        Entry *entry = &table->entries[i];

        if (entry->key != NULL && !entry->key->header.marked) {
            table_remove(table, entry->key);
        }
    }
}

// Assembly:
cmpl $0x0, 0xc(%rdi)
js 0x529f
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq $-0x1, %r14
xorl %r15d, %r15d
movq (%rbx), %rax
movq (%rax,%r15), %rsi
testq %rsi, %rsi
je 0x528a
cmpb $0x0, 0x4(%rsi)
jne 0x528a
movq %rbx, %rdi
callq 0x50b4
movslq 0xc(%rbx), %rax
incq %r14
addq $0x10, %r15
cmpq %rax, %r14
jl 0x5270
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_string
RavString *object_string(Allocator *allocator, const char *chars, int length) {
    uint32_t hash = hash_string(chars, length);
    RavString *interned = table_interned(&allocator->strings, chars, hash, length);
    if (interned != NULL) {
        return interned;
    }

    char *copy = Alloc(allocator, char, length + 1);
    memcpy(copy, chars, length);
    copy[length] = '\0';

    return construct_string(allocator, length, hash, copy);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
testl %edx, %edx
jle 0x52d7
movl %ebx, %eax
movl $0x811c9dc5, %ebp       # imm = 0x811C9DC5
xorl %ecx, %ecx
movsbl (%r15,%rcx), %edx
xorl %ebp, %edx
imull $0x1000193, %edx, %ebp  # imm = 0x1000193
incq %rcx
cmpq %rcx, %rax
jne 0x52c0
jmp 0x52dc
movl $0x811c9dc5, %ebp       # imm = 0x811C9DC5
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x518e
testq %rax, %rax
je 0x52ff
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leal 0x1(%rbx), %eax
movslq %eax, %rcx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movq %rax, %r12
movslq %ebx, %r13
movq %rax, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2170
movb $0x0, (%r12,%r13)
movq %r14, %rdi
movl %ebx, %esi
movl %ebp, %edx
movq %r12, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x5344
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: construct_string
static RavString *construct_string(Allocator *allocator, int length, uint32_t hash, char *chars) {
    RavString *string = Alloc_Object(allocator, RavString, OBJ_STRING);
    string->length = length;
    string->hash = hash;
    string->chars = chars;

    table_set(&allocator->strings, string, Nil_Value);
    return string;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rcx, %rbx
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %r15
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movq %rax, %r12
movl $0x0, (%rax)
movb $0x0, 0x4(%rax)
movq 0x10(%r15), %rax
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r15)
movl %r14d, 0x10(%r12)
movl %ebp, 0x14(%r12)
movq %rbx, 0x18(%r12)
movabsq $0x7ffc000000000001, %rdx # imm = 0x7FFC000000000001
movq %r15, %rdi
movq %r12, %rsi
callq 0x4ee3
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_string_box
RavString *object_string_box(Allocator *allocator, char *chars, int length) {
    uint32_t hash = hash_string(chars, length);
    RavString *interned = table_interned(&allocator->strings, chars, hash, length);

    // object_string_box takes ownership of chars memory, so if
    // the string is already interned, it frees this memory,
    // as it's no longer needed.
    if (interned != NULL) {
        Free_Array(allocator, char, chars, length + 1);
        return interned;
    }

    return construct_string(allocator, length, hash, chars);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
testl %edx, %edx
jle 0x53e5
movl %ebp, %eax
movl $0x811c9dc5, %r15d      # imm = 0x811C9DC5
xorl %ecx, %ecx
movsbl (%rbx,%rcx), %edx
xorl %r15d, %edx
imull $0x1000193, %edx, %r15d # imm = 0x1000193
incq %rcx
cmpq %rcx, %rax
jne 0x53cd
jmp 0x53eb
movl $0x811c9dc5, %r15d      # imm = 0x811C9DC5
movq %r14, %rdi
movq %rbx, %rsi
movl %r15d, %edx
movl %ebp, %ecx
callq 0x518e
testq %rax, %rax
je 0x5421
movq %rax, %r12
incl %ebp
movslq %ebp, %rdx
movq %r14, %rdi
movq %rbx, %rsi
xorl %ecx, %ecx
callq 0xa91c
movq %r12, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %r14, %rdi
movl %ebp, %esi
movl %r15d, %edx
movq %rbx, %rcx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5344
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_pair
RavPair *object_pair(Allocator *allocator, Value head, Value tail) {
    RavPair *pair = Alloc_Object(allocator, RavPair, OBJ_PAIR);

    pair->head = head;
    pair->tail = tail;

    return pair;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movl $0x1, (%rax)
movb $0x0, 0x4(%rax)
movq 0x10(%r15), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%r15)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_array
RavArray *object_array(Allocator *allocator, Value *values, size_t count) {
    RavArray *array = Alloc_Object(allocator, RavArray, OBJ_ARRAY);

    array->header.marked = true; // for gc
    array->values = Alloc(allocator, Value, count);
    array->header.marked = false;
    array->count = count;
    array->capacity = count;

    memcpy(array->values, values, count * sizeof (Value));

    return array;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
xorl %ebp, %ebp
movl $0x28, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movq %rax, %r12
movl $0x2, (%rax)
movb %bpl, 0x4(%rax)
movq 0x10(%r15), %rax
movq %rax, 0x8(%r12)
movq %r12, 0x10(%r15)
movb $0x1, 0x4(%r12)
leaq (,%r14,8), %r13
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
movq %r13, %rcx
callq 0xa91c
movq %rax, 0x10(%r12)
movb %bpl, 0x4(%r12)
movq %r14, 0x18(%r12)
movq %r14, 0x20(%r12)
movq %rax, %rdi
movq %rbx, %rsi
movq %r13, %rdx
callq 0x2170
movq %r12, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_function
RavFunction *object_function(Allocator *allocator) {
    RavFunction *function = Alloc_Object(allocator, RavFunction, OBJ_FUNCTION);

    function->name = NULL;
    function->arity = 0;
    function->upvalue_count = 0;

    chunk_init(&function->chunk);
    return function;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x850, %ecx            # imm = 0x850
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movq %rax, %r14
movl $0x4, (%rax)
movb $0x0, 0x4(%rax)
movq 0x10(%rbx), %rax
movq %rax, 0x8(%r14)
movq %r14, 0x10(%rbx)
leaq 0x20(%r14), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
callq 0x4cd8
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_upvalue
RavUpvalue *object_upvalue(Allocator *allocator, Value *location) {
    RavUpvalue *upvalue = Alloc_Object(allocator, RavUpvalue, OBJ_UPVALUE);

    upvalue->location = location;
    upvalue->captured = Nil_Value;
    upvalue->next = NULL;

    return upvalue;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movl $0x28, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movl $0x5, (%rax)
movb $0x0, 0x4(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%r14)
movq %rbx, 0x10(%rax)
movabsq $0x7ffc000000000001, %rcx # imm = 0x7FFC000000000001
movq %rcx, 0x18(%rax)
movq $0x0, 0x20(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_closure
RavClosure *object_closure(Allocator *allocator, RavFunction *function) {
    RavUpvalue **upvalues = Alloc(allocator, RavUpvalue*, function->upvalue_count);

    for (int i = 0; i < function->upvalue_count; i++) {
        upvalues[i] = NULL;
    }

    RavClosure *closure = Alloc_Object(allocator, RavClosure, OBJ_CLOSURE);
    closure->function = function;
    closure->upvalues = upvalues;
    closure->upvalue_count = function->upvalue_count;

    return closure;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movslq 0x1c(%rsi), %rcx
shlq $0x3, %rcx
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movq %rax, %r15
movslq 0x1c(%rbx), %rdx
testq %rdx, %rdx
jle 0x561a
shlq $0x3, %rdx
movq %r15, %rdi
xorl %esi, %esi
callq 0x2100
movl $0x28, %ecx
movq %r14, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movl $0x6, (%rax)
movb $0x0, 0x4(%rax)
movq 0x10(%r14), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%r14)
movq %rbx, 0x10(%rax)
movq %r15, 0x18(%rax)
movl 0x1c(%rbx), %ecx
movl %ecx, 0x20(%rax)
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: object_cfunction
RavCFunction *object_cfunction(Allocator *allocator, CFunc func, int arity_min, int arity_max) {
    RavCFunction *cfunction = Alloc_Object(allocator, RavCFunction, OBJ_CFUNCTION);
    cfunction->func = func;
    cfunction->arity_min = arity_min;
    cfunction->arity_max = arity_max;
    return cfunction;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %r15
movl $0x20, %ecx
xorl %esi, %esi
xorl %edx, %edx
callq 0xa91c
movl $0x7, (%rax)
movb $0x0, 0x4(%rax)
movq 0x10(%r15), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%r15)
movq %r14, 0x10(%rax)
movl %ebp, 0x18(%rax)
movl %ebx, 0x1c(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: print_pair
static void print_pair(RavPair *pair) {
    value_print(pair->head);

    // end of a proper list?
    if (Is_Nil(pair->tail)) {
        return;
    }

    if (Is_Pair(pair->tail)) {
        printf(", ");
        print_pair(As_Pair(pair->tail));
    } else {
        printf(" . ");
        value_print(pair->tail);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movabsq $0x3ffffffffffff, %r15  # imm = 0x3FFFFFFFFFFFF
movabsq $0x7ffc000000000001, %r12 # imm = 0x7FFC000000000001
leaq 0x5e12(%rip), %r14      # 0xb6e2
movq 0x10(%rbx), %rdi
callq 0x5cd4
movq 0x18(%rbx), %rax
cmpq %r12, %rax
je 0x592e
movq %rax, %rcx
shrq $0x32, %rcx
cmpl $0x3fff, %ecx           # imm = 0x3FFF
jb 0x590c
andq %r15, %rax
cmpl $0x1, (%rax)
jne 0x590c
movq %r14, %rdi
xorl %eax, %eax
callq 0x20b0
movq 0x18(%rbx), %rbx
andq %r15, %rbx
jmp 0x58d0
leaq 0x5dd2(%rip), %rdi      # 0xb6e5
xorl %eax, %eax
callq 0x20b0
movq 0x18(%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x5cd4
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/object.c
// Function: string_buf_into
RavString *string_buf_into(StringBuffer *self) {
    // shrink the string buffer into the string needed length
    self->buffer = allocate(self->allocator, self->buffer, self->capacity, self->count + 1);
    self->buffer[self->count] = '\0';

    // allocate a string object pointing to the buffer string
    RavString *result = object_string_box(self->allocator, self->buffer, self->count);

    // reset the buffer state
    *self = (StringBuffer){0};
    return result;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq (%rdi), %rdi
movq 0x10(%rbx), %rsi
movslq 0xc(%rbx), %rdx
movslq 0x8(%rbx), %rcx
incq %rcx
callq 0xa91c
movq %rax, 0x10(%rbx)
movslq 0x8(%rbx), %rcx
movb $0x0, (%rax,%rcx)
movq (%rbx), %rdi
movq 0x10(%rbx), %rsi
movl 0x8(%rbx), %edx
callq 0x53af
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
movq $0x0, 0x10(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_c_makefile_star2_O1/mahrr[P]raven/src/value.c
// Function: value_print
void value_print(Value value) {
#ifdef NAN_TAGGING
    if (Is_Num(value)) {
        printf("%g", As_Num(value));
        return;
    }

    if (Is_Bool(value)) {
        printf(As_Bool(value) ? "true" : "false");
        return;
    }

    if (Is_Nil(value)) {
        printf("nil");
        return;
    }

    if (Is_Obj(value)) {
        object_print(value);
        return;
    }

    assert(!"invalid value type");
#else
    switch (value.type) {
    case VALUE_NUM:  printf("%g", As_Num(value)); break;
    case VALUE_BOOL: printf(As_Bool(value) ? "true" : "false"); break;
    case VALUE_NIL:  printf("nil"); break;
    case VALUE_OBJ:  object_print(value); break;
    default:
        assert(!"invalid value type");
    }
#endif
}

// Assembly:
movabsq $0x7ffc000000000000, %rax # imm = 0x7FFC000000000000
movq %rdi, %rcx
notq %rcx
testq %rax, %rcx
jne 0x5d0d
leaq 0x2(%rax), %rdx
testq %rcx, %rdx
jne 0x5d20
addq $0x3, %rax
cmpq %rax, %rdi
leaq 0x5972(%rip), %rax      # 0xb672
leaq 0x5970(%rip), %rdi      # 0xb677
cmoveq %rax, %rdi
jmp 0x5d2f
movq %rdi, %xmm0
leaq 0x5964(%rip), %rdi      # 0xb67d
movb $0x1, %al
jmp 0x20b0
incq %rax
cmpq %rax, %rdi
jne 0x5d36
leaq 0x546f(%rip), %rdi      # 0xb19e
xorl %eax, %eax
jmp 0x20b0
movq %rdi, %rax
shrq $0x32, %rax
cmpl $0x3fff, %eax           # imm = 0x3FFF
jae 0x569f
pushq %rax
leaq 0x59a8(%rip), %rdi      # 0xb6f8
leaq 0x59b7(%rip), %rsi      # 0xb70e
leaq 0x59bc(%rip), %rcx      # 0xb71a
movl $0x1e, %edx
callq 0x20e0