LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: compiler_add_local
static void compiler_add_local(Parser* parser, const Token* name) {
    Compiler* const compiler = parser->compiler;

    if (compiler->locals_len == LOCALS_MAX - 1) {
        error_str_nul(parser, name,
                      "Reached the maximum number of locals: 256");
        return;
    }

    Local* const local = &compiler->locals[compiler->locals_len++];
    local->name = *name;
    local->depth = -1;
    LOG("added local name=`%.*s` i=%d scope_depth=%jd locals_len=%d\n",
        (int)local->name.source_len, local->name.source,
        compiler->locals_len - 1, compiler->scope_depth, compiler->locals_len);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpl $0xff, 0x3000(%rax)
jne 0x3c58
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
leaq 0x7bd0(%rip), %rdx      # 0xb821
callq 0x3bb0
jmp 0x3ca5
movq 0x10(%rsp), %rax
movq 0x10(%rsp), %rdx
movl 0x3000(%rdx), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, 0x3000(%rdx)
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x28, %edx
callq 0x1160
movq 0x8(%rsp), %rax
movq $-0x1, 0x28(%rax)
jmp 0x3ca5
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: make_constant
static uint8_t make_constant(Parser* parser, Value v) {
    buf_push(parser->compiler->fn->chunk.constants, v);
    const size_t constant_i =
        buf_size(parser->compiler->fn->chunk.constants) - 1;

    return (uint8_t)constant_i;
}

// Assembly:
subq $0x58, %rsp
movl %esi, 0x48(%rsp)
movq %rdx, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3cfe
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rax), %rax
movq %rax, 0x30(%rsp)
jmp 0x3d07
xorl %eax, %eax
movq %rax, 0x30(%rsp)
jmp 0x3d07
movq 0x30(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3d4d
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, 0x20(%rsp)
jmp 0x3d56
xorl %eax, %eax
movq %rax, 0x20(%rsp)
jmp 0x3d56
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq %rcx, %rax
jne 0x3e50
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3dbf
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
cmpq $0x0, -0x10(%rax)
jne 0x3dd3
jmp 0x3dc7
xorl %eax, %eax
testb $0x1, %al
jne 0x3dd3
jmp 0x3dc7
movl $0x8, %eax
movq %rax, 0x10(%rsp)
jmp 0x3e22
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3e0f
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq -0x10(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x3e18
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x3e18
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl $0x10, %esi
callq 0x3f00
movq %rax, %rcx
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq %rcx, 0x28(%rax)
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq 0x40(%rsp), %rcx
movq 0x80(%rcx), %rcx
movq 0x3010(%rcx), %rcx
movq 0x28(%rcx), %rdx
movq -0x8(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x8(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x48(%rsp), %rcx
movq %rcx, (%rax)
movq 0x50(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x3ee0
movq 0x40(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x3ee8
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x3ee8
movq (%rsp), %rax
subq $0x1, %rax
movq %rax, 0x38(%rsp)
movq 0x38(%rsp), %rax
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/./buf.h
// Function: buf_grow1
static void *buf_grow1(void *v, size_t esize, ptrdiff_t n) {
    struct buf *p;
    size_t max = (size_t)-1 - sizeof(struct buf);
    if (v) {
        p = buf_ptr(v);
        if (n > 0 && p->capacity + (size_t)n > max / esize)
            goto fail; /* overflow */
        p = realloc(p, sizeof(struct buf) + esize * (p->capacity + (size_t)n));
        if (!p) goto fail;
        p->capacity += (size_t)n;
        if (p->size > p->capacity) p->size = p->capacity;
    } else {
        if ((size_t)n > max / esize) goto fail; /* overflow */
        p = malloc(sizeof(struct buf) + esize * (size_t)n);
        if (!p) goto fail;
        p->capacity = (size_t)n;
        p->size = 0;
    }
    return p->buffer;
fail:
    BUF_ABORT;
    return 0;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq $-0x11, 0x10(%rsp)
cmpq $0x0, 0x30(%rsp)
je 0x3fdc
movq 0x30(%rsp), %rax
addq $-0x10, %rax
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x20(%rsp)
jle 0x3f70
movq 0x18(%rsp), %rax
movq (%rax), %rax
addq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x28(%rsp)
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jbe 0x3f70
jmp 0x404c
movq 0x18(%rsp), %rdi
movq 0x28(%rsp), %rsi
movq 0x18(%rsp), %rax
movq (%rax), %rax
addq 0x20(%rsp), %rax
imulq %rax, %rsi
addq $0x10, %rsi
callq 0x1190
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x3fa6
jmp 0x404c
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq (%rcx), %rax
jbe 0x3fda
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x18(%rsp), %rax
movq %rcx, 0x8(%rax)
jmp 0x403e
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
xorl %ecx, %ecx
movl %ecx, %edx
divq 0x28(%rsp)
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jbe 0x4001
jmp 0x404c
movq 0x28(%rsp), %rdi
imulq 0x20(%rsp), %rdi
addq $0x10, %rdi
callq 0x1170
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x4024
jmp 0x404c
movq 0x20(%rsp), %rcx
movq 0x18(%rsp), %rax
movq %rcx, (%rax)
movq 0x18(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x18(%rsp), %rax
addq $0x10, %rax
addq $0x38, %rsp
retq
callq 0x1040
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: unary
static void unary(Parser* parser, Vm* vm, bool canAssign) {
    (void)canAssign;
    const TokenType previousType = parser->previous.type;

    precedence(parser, PREC_UNARY, vm);

    switch (previousType) {
        case TOKEN_MINUS:
            emit_byte(parser, OP_NEGATE);
            break;
        case TOKEN_BANG:
            emit_byte(parser, OP_NOT);
            break;
        default:
            UNREACHABLE();
    }
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rax
movl 0x78(%rax), %eax
movl %eax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl $0x8, %esi
callq 0x4060
movl 0x10(%rsp), %eax
movl %eax, 0xc(%rsp)
subl $0x7, %eax
je 0x42b0
jmp 0x42a5
movl 0xc(%rsp), %eax
subl $0xc, %eax
je 0x42c1
jmp 0x42d2
movq 0x20(%rsp), %rdi
movl $0x2, %esi
callq 0x3530
jmp 0x4304
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x3530
jmp 0x4304
jmp 0x42d4
movq 0xbd15(%rip), %rax      # 0xfff0
movq (%rax), %rdi
leaq 0x761f(%rip), %rsi      # 0xb904
leaq 0x7667(%rip), %rdx      # 0xb953
movl $0x169, %ecx            # imm = 0x169
leaq 0x7663(%rip), %r8       # 0xb95b
movb $0x0, %al
callq 0x1140
callq 0x1040
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: binary
static void binary(Parser* parser, Vm* vm, bool canAssign) {
    (void)canAssign;
    const TokenType previousType = parser->previous.type;

    const ParseRule* const rule = &rules[previousType];
    precedence(parser, rule->precedence + 1, vm);

    switch (previousType) {
        case TOKEN_PLUS:
            emit_byte(parser, OP_ADD);
            break;
        case TOKEN_MINUS:
            emit_byte(parser, OP_SUBTRACT);
            break;
        case TOKEN_STAR:
            emit_byte(parser, OP_MULTIPLY);
            break;
        case TOKEN_SLASH:
            emit_byte(parser, OP_DIVIDE);
            break;
        case TOKEN_EQUAL_EQUAL:
            emit_byte(parser, OP_EQUAL);
            break;
        case TOKEN_BANG_EQUAL:
            emit_byte(parser, OP_EQUAL);
            emit_byte(parser, OP_NOT);
            break;
        case TOKEN_GREATER:
            emit_byte(parser, OP_GREATER);
            break;
        case TOKEN_GREATER_EQUAL:
            emit_byte(parser, OP_LESS);
            emit_byte(parser, OP_NOT);
            break;
        case TOKEN_LESS:
            emit_byte(parser, OP_LESS);
            break;
        case TOKEN_LESS_EQUAL:
            emit_byte(parser, OP_GREATER);
            emit_byte(parser, OP_NOT);
            break;
        default:
            UNREACHABLE();
    }
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rax
movl 0x78(%rax), %eax
movl %eax, 0x10(%rsp)
movl 0x10(%rsp), %eax
leaq (%rax,%rax,2), %rcx
leaq 0xb6bf(%rip), %rax      # 0xfa00
leaq (%rax,%rcx,8), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rax
movl 0x10(%rax), %esi
incl %esi
movq 0x18(%rsp), %rdx
callq 0x4060
movl 0x10(%rsp), %eax
addl $-0x7, %eax
movl %eax, %ecx
movq %rcx, (%rsp)
subl $0xc, %eax
ja 0x4479
movq (%rsp), %rax
leaq 0x730c(%rip), %rcx      # 0xb690
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x20(%rsp), %rdi
movl $0x3, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0x4, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0x5, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0x6, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0xb, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0xb, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0xc, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0xd, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0xd, %esi
callq 0x3530
jmp 0x44ab
movq 0x20(%rsp), %rdi
movl $0xc, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movl $0xa, %esi
callq 0x3530
jmp 0x44ab
jmp 0x447b
movq 0xbb6e(%rip), %rax      # 0xfff0
movq (%rax), %rdi
leaq 0x7478(%rip), %rsi      # 0xb904
leaq 0x74c0(%rip), %rdx      # 0xb953
movl $0x197, %ecx            # imm = 0x197
leaq 0x74c2(%rip), %r8       # 0xb961
movb $0x0, %al
callq 0x1140
callq 0x1040
addq $0x28, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: number
static void number(Parser* parser, Vm* vm, bool canAssign) {
    (void)canAssign;
    (void)vm;
    assert(parser->previous.type == TOKEN_NUMBER);

    const double number = strtod(parser->previous.source, NULL);
    const Value v = NUMBER_VAL(number);

    emit_byte2(parser, OP_CONSTANT, make_constant(parser, v));
}

// Assembly:
subq $0x38, %rsp
movb %dl, %al
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
andb $0x1, %al
movb %al, 0x27(%rsp)
movq 0x30(%rsp), %rax
cmpl $0x16, 0x78(%rax)
jne 0x4803
jmp 0x4822
leaq 0x71d9(%rip), %rdi      # 0xb9e3
leaq 0x7142(%rip), %rsi      # 0xb953
movl $0xf7, %edx
leaq 0x71ec(%rip), %rcx      # 0xba09
callq 0x10e0
movq 0x30(%rsp), %rax
movq 0x68(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x1070
movsd %xmm0, 0x18(%rsp)
movl $0x2, 0x8(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movq 0x30(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rdi
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
callq 0x3cb0
movq (%rsp), %rdi
movl $0x1, %esi
movzbl %al, %edx
callq 0x4ae0
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: and
static void and (Parser * parser, Vm* vm, bool canAssign) {
    (void)canAssign;

    const intmax_t end_jump = jump_emit(parser, OP_JUMP_IF_FALSE);
    emit_byte(parser, OP_POP);

    precedence(parser, PREC_AND, vm);

    jump_patch(parser, end_jump);
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rdi
movl $0x15, %esi
callq 0x5560
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl $0x3, %esi
callq 0x4060
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x55f0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: literal
static void literal(Parser* parser, Vm* vm, bool canAssign) {
    (void)canAssign;
    (void)vm;

    switch (parser->previous.type) {
        case TOKEN_NIL:
            emit_byte(parser, OP_NIL);
            break;
        case TOKEN_TRUE:
            emit_byte(parser, OP_TRUE);
            break;
        case TOKEN_FALSE:
            emit_byte(parser, OP_FALSE);
            break;
        default:
            UNREACHABLE();
    }
}

// Assembly:
subq $0x18, %rsp
movb %dl, %al
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
andb $0x1, %al
movb %al, 0x7(%rsp)
movq 0x10(%rsp), %rax
movl 0x78(%rax), %eax
movl %eax, (%rsp)
subl $0x1a, %eax
je 0x494e
jmp 0x4918
movl (%rsp), %eax
subl $0x1e, %eax
je 0x492c
jmp 0x4922
movl (%rsp), %eax
subl $0x24, %eax
je 0x493d
jmp 0x495f
movq 0x10(%rsp), %rdi
movl $0x7, %esi
callq 0x3530
jmp 0x4991
movq 0x10(%rsp), %rdi
movl $0x8, %esi
callq 0x3530
jmp 0x4991
movq 0x10(%rsp), %rdi
movl $0x9, %esi
callq 0x3530
jmp 0x4991
jmp 0x4961
movq 0xb688(%rip), %rax      # 0xfff0
movq (%rax), %rdi
leaq 0x6f92(%rip), %rsi      # 0xb904
leaq 0x6fda(%rip), %rdx      # 0xb953
movl $0x151, %ecx            # imm = 0x151
leaq 0x70fa(%rip), %r8       # 0xba7f
movb $0x0, %al
callq 0x1140
callq 0x1040
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: or
static void or (Parser * parser, Vm* vm, bool canAssign) {
    (void)canAssign;

    const intmax_t else_jump = jump_emit(parser, OP_JUMP_IF_FALSE);
    const intmax_t end_jump = jump_emit(parser, OP_JUMP);
    jump_patch(parser, else_jump);

    emit_byte(parser, OP_POP);

    precedence(parser, PREC_OR, vm);
    jump_patch(parser, end_jump);
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rdi
movl $0x15, %esi
callq 0x5560
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0x16, %esi
callq 0x5560
movq %rax, (%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x55f0
movq 0x20(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rdx
movl $0x2, %esi
callq 0x4060
movq 0x20(%rsp), %rdi
movq (%rsp), %rsi
callq 0x55f0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: fn_argument_list
static uint8_t fn_argument_list(Parser* parser, Vm* vm) {
    uint8_t arg_count = 0;
    if (match(parser, TOKEN_RIGHT_PAREN)) {
        return arg_count;
    }

    do {
        expression(parser, vm);

        if (arg_count == UINT8_MAX) {
            error_str_nul(parser, &parser->previous,
                          "Reached maximum number of arguments for a function "
                          "call: UINT8_MAX");
        }

        arg_count += 1;
    } while (match(parser, TOKEN_COMMA));

    expect(parser, TOKEN_RIGHT_PAREN, "Missing `)` after function parameters");

    return arg_count;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x18(%rsp), %rdi
movl $0x2, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x4a58
jmp 0x4a62
movb 0xf(%rsp), %al
movb %al, 0x27(%rsp)
jmp 0x4ad6
jmp 0x4a64
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x3500
movzbl 0xf(%rsp), %eax
cmpl $0xff, %eax
jne 0x4a99
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x58, %rsi
leaq 0x6e07(%rip), %rdx      # 0xb89b
callq 0x3bb0
movzbl 0xf(%rsp), %eax
addl $0x1, %eax
movb %al, 0xf(%rsp)
movq 0x18(%rsp), %rdi
movl $0x5, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x4a64
movq 0x18(%rsp), %rdi
movl $0x2, %esi
leaq 0x6e15(%rip), %rdx      # 0xb8de
callq 0x3980
movb 0xf(%rsp), %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: named_variable
static void named_variable(Parser* parser, Vm* vm, bool canAssign) {
    const Token* const name = &parser->previous;

    int arg = resolve_local(parser, name);
    const bool is_local = arg >= 0;
    LOG("arg=%d is_local=%d name=`%.*s`\n", arg, is_local,
        (int)name->source_len, name->source);

    if (!is_local) {
        arg = make_identifier_constant(parser, vm);
    }

    if (canAssign && match(parser, TOKEN_EQUAL)) {
        expression(parser, vm);
        emit_byte2(parser, is_local ? OP_SET_LOCAL : OP_SET_GLOBAL,
                   (uint8_t)arg);
    } else {
        emit_byte2(parser, is_local ? OP_GET_LOCAL : OP_GET_GLOBAL,
                   (uint8_t)arg);
    }
}

// Assembly:
subq $0x28, %rsp
movb %dl, %al
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
andb $0x1, %al
movb %al, 0x17(%rsp)
movq 0x20(%rsp), %rax
addq $0x58, %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x5480
movl %eax, 0x4(%rsp)
cmpl $0x0, 0x4(%rsp)
setge %al
andb $0x1, %al
movb %al, 0x3(%rsp)
jmp 0x53d7
testb $0x1, 0x3(%rsp)
jne 0x53f4
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3b30
movzbl %al, %eax
movl %eax, 0x4(%rsp)
testb $0x1, 0x17(%rsp)
je 0x544b
movq 0x20(%rsp), %rdi
movl $0xe, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x5410
jmp 0x544b
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3500
movq 0x20(%rsp), %rdi
movb 0x3(%rsp), %dl
movl $0x12, %eax
movl $0x14, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movb %al, %cl
movl 0x4(%rsp), %eax
movzbl %cl, %esi
movzbl %al, %edx
callq 0x4ae0
jmp 0x5475
movq 0x20(%rsp), %rdi
movb 0x3(%rsp), %dl
movl $0x11, %eax
movl $0x13, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movb %al, %cl
movl 0x4(%rsp), %eax
movzbl %cl, %esi
movzbl %al, %edx
callq 0x4ae0
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: resolve_local
static int resolve_local(Parser* parser, const Token* name) {
    for (int i = parser->compiler->locals_len - 1; i >= 0; i--) {
        const Local* const l = &parser->compiler->locals[i];
        LOG("cmp `%.*s` `%.*s` i=%d locals=%d\n", (int)name->source_len,
            name->source, (int)l->name.source_len, l->name.source, i,
            parser->compiler->locals_len);

        if (str_eq(name->source, name->source_len, l->name.source,
                   l->name.source_len)) {
            if (l->depth == -1) {
                error_str_nul(
                    parser, &parser->previous,
                    "Cannot read local variable in its own initializer");
            }

            LOG("resolved variable=%.*s as local depth=%d\n",
                (int)name->source_len, name->source, i);
            return i;
        }
    }
    LOG("resolved variable=%.*s as global\n", (int)name->source_len,
        name->source);
    return -1;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rax
movq 0x80(%rax), %rax
movl 0x3000(%rax), %eax
subl $0x1, %eax
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
jl 0x5542
movq 0x18(%rsp), %rax
movq 0x80(%rax), %rax
movslq 0xc(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, (%rsp)
jmp 0x54d0
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rdi
movq 0x10(%rsp), %rax
movq 0x18(%rax), %rsi
movq (%rsp), %rax
movq 0x10(%rax), %rdx
movq (%rsp), %rax
movq 0x18(%rax), %rcx
callq 0x6500
testb $0x1, %al
jne 0x54fd
jmp 0x5530
movq (%rsp), %rax
cmpq $-0x1, 0x28(%rax)
jne 0x5522
movq 0x18(%rsp), %rdi
movq 0x18(%rsp), %rsi
addq $0x58, %rsi
leaq 0x644b(%rip), %rdx      # 0xb968
callq 0x3bb0
jmp 0x5524
jmp 0x5526
movl 0xc(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x554e
jmp 0x5532
movl 0xc(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0xc(%rsp)
jmp 0x54a7
jmp 0x5544
jmp 0x5546
movl $0xffffffff, 0x24(%rsp) # imm = 0xFFFFFFFF
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: jump_emit
static intmax_t jump_emit(Parser* parser, uint8_t op) {
    emit_byte(parser, op);
    emit_byte(parser, UINT8_MAX);
    emit_byte(parser, UINT8_MAX);

    return (intmax_t)(buf_size(parser->compiler->fn->chunk.opcodes) - 2);
}

// Assembly:
subq $0x18, %rsp
movb %sil, %al
movq %rdi, 0x10(%rsp)
movb %al, 0xf(%rsp)
movq 0x10(%rsp), %rdi
movzbl 0xf(%rsp), %esi
callq 0x3530
movq 0x10(%rsp), %rdi
movl $0xff, %esi
callq 0x3530
movq 0x10(%rsp), %rdi
movl $0xff, %esi
callq 0x3530
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x55d8
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x55e0
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x55e0
movq (%rsp), %rax
subq $0x2, %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: jump_patch
static void jump_patch(Parser* parser, intmax_t offset) {
    const intmax_t jump =
        (intmax_t)buf_size(parser->compiler->fn->chunk.opcodes) - offset - 2;
    assert(jump >= 0);

    if (jump > UINT16_MAX) {
        error_str_nul(parser, &parser->previous,
                      "Reached jump limit for the `if` body");
    }

    const uint16_t u16_jump = (uint16_t)jump;
    LOG("patch jump=%hu\n", u16_jump);
    const uint8_t b1 = (u16_jump >> (uint8_t)8);
    const uint8_t b2 = (uint8_t)u16_jump;

    parser->compiler->fn->chunk.opcodes[offset] = b1;
    parser->compiler->fn->chunk.opcodes[offset + 1] = b2;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x5639
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x5641
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x5641
movq (%rsp), %rax
subq 0x18(%rsp), %rax
subq $0x2, %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jl 0x565d
jmp 0x567c
leaq 0x63c8(%rip), %rdi      # 0xba2c
leaq 0x62e8(%rip), %rsi      # 0xb953
movl $0x1cf, %edx            # imm = 0x1CF
leaq 0x63bf(%rip), %rcx      # 0xba36
callq 0x10e0
cmpq $0xffff, 0x10(%rsp)     # imm = 0xFFFF
jle 0x56a1
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x58, %rsi
leaq 0x63be(%rip), %rdx      # 0xba5a
callq 0x3bb0
movq 0x10(%rsp), %rax
movw %ax, 0xe(%rsp)
jmp 0x56ad
movzwl 0xe(%rsp), %eax
sarl $0x8, %eax
movb %al, 0xd(%rsp)
movw 0xe(%rsp), %ax
movb %al, 0xc(%rsp)
movb 0xd(%rsp), %dl
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movb %dl, (%rax,%rcx)
movb 0xc(%rsp), %dl
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq 0x18(%rsp), %rcx
movb %dl, 0x1(%rax,%rcx)
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: compiler_local_mark_initialized
static void compiler_local_mark_initialized(Parser* parser) {
    if (parser->compiler->scope_depth == 0) {
        return;
    }
    parser->compiler->locals[parser->compiler->locals_len - 1].depth =
        parser->compiler->scope_depth;
}

// Assembly:
movq %rdi, -0x8(%rsp)
movq -0x8(%rsp), %rax
movq 0x80(%rax), %rax
cmpq $0x0, 0x3008(%rax)
jne 0x572d
jmp 0x576f
movq -0x8(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3008(%rax), %rcx
movq -0x8(%rsp), %rax
movq 0x80(%rax), %rax
movq -0x8(%rsp), %rdx
movq 0x80(%rdx), %rdx
movl 0x3000(%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x28(%rax)
retq
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: function
static void function(Parser* parser, Vm* vm, FunctionType type) {
    Compiler compiler;
    memset(&compiler, 0, sizeof(compiler));

    compiler_init(&compiler, type, parser);
    begin_scope(parser);

    expect(parser, TOKEN_LEFT_PAREN, "Missing `(` after function name");
    function_args(parser, vm);

    expect(parser, TOKEN_LEFT_BRACE, "Missing `{` after function parameters");
    block(parser, vm);

    ObjFunction* const fn = compiler_end(parser);
    emit_byte2(parser, OP_CONSTANT, make_constant(parser, OBJ_VAL(fn)));
}

// Assembly:
subq $0x3068, %rsp           # imm = 0x3068
movq %rdi, 0x3060(%rsp)
movq %rsi, 0x3058(%rsp)
movl %edx, 0x3054(%rsp)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movl $0x3028, %edx           # imm = 0x3028
callq 0x10f0
movl 0x3054(%rsp), %esi
movq 0x3060(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x2e00
movq 0x3060(%rsp), %rdi
callq 0x5890
movq 0x3060(%rsp), %rdi
movl $0x1, %esi
leaq 0x62c5(%rip), %rdx      # 0xba9e
callq 0x3980
movq 0x3060(%rsp), %rdi
movq 0x3058(%rsp), %rsi
callq 0x58c0
movq 0x3060(%rsp), %rdi
movl $0x3, %esi
leaq 0x62b7(%rip), %rdx      # 0xbabe
callq 0x3980
movq 0x3060(%rsp), %rdi
movq 0x3058(%rsp), %rsi
callq 0x59a0
movq 0x3060(%rsp), %rdi
callq 0x3090
movq %rax, 0x20(%rsp)
movq 0x3060(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x3060(%rsp), %rdi
movl $0x3, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %esi
movq 0x18(%rsp), %rdx
callq 0x3cb0
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movzbl %al, %edx
callq 0x4ae0
addq $0x3068, %rsp           # imm = 0x3068
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: function_args
static void function_args(Parser* parser, Vm* vm) {
    if (match(parser, TOKEN_RIGHT_PAREN)) {
        return;
    }

    do {
        const uint8_t var_i =
            variable_name(parser, vm, "Expected variable name");
        define_variable(parser, var_i);

        if (parser->compiler->fn->arity == UINT8_MAX) {
            error_str_nul(parser, &parser->previous,
                          "Reached maximum number of arguments for a function: "
                          "UINT8_MAX");
        }

        parser->compiler->fn->arity += 1;
    } while (match(parser, TOKEN_COMMA));

    expect(parser, TOKEN_RIGHT_PAREN, "Missing `)` after function parameters");
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movl $0x2, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x58e3
jmp 0x58e8
jmp 0x5995
jmp 0x58ea
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
leaq 0x5ea9(%rip), %rdx      # 0xb7a4
callq 0x3490
movb %al, 0x7(%rsp)
movq 0x10(%rsp), %rdi
movzbl 0x7(%rsp), %esi
callq 0x39d0
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movzbl 0x10(%rax), %eax
cmpl $0xff, %eax
jne 0x594b
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x58, %rsi
leaq 0x619e(%rip), %rdx      # 0xbae4
callq 0x3bb0
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movzbl 0x10(%rax), %ecx
addl $0x1, %ecx
movb %cl, 0x10(%rax)
movq 0x10(%rsp), %rdi
movl $0x5, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x58ea
movq 0x10(%rsp), %rdi
movl $0x2, %esi
leaq 0x5f4e(%rip), %rdx      # 0xb8de
callq 0x3980
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: print_stmt
static void print_stmt(Parser* parser, Vm* vm) {
    LOG("scope_depth=%zu locals_len=%d\n", parser->compiler->scope_depth,
        parser->compiler->locals_len);
    expression(parser, vm);
    expect(parser, TOKEN_SEMICOLON,
           "Expected terminating semicolon after print value");
    emit_byte(parser, OP_PRINT);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
jmp 0x5a30
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3500
movq 0x10(%rsp), %rdi
movl $0x9, %esi
leaq 0x60ed(%rip), %rdx      # 0xbb3d
callq 0x3980
movq 0x10(%rsp), %rdi
movl $0xe, %esi
callq 0x3530
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: end_scope
static void end_scope(Parser* parser) {
    parser->compiler->scope_depth -= 1;

    while (parser->compiler->locals_len > 0 &&
           parser->compiler->locals[parser->compiler->locals_len - 1].depth >
               parser->compiler->scope_depth) {
        emit_byte(parser, OP_POP);
        parser->compiler->locals_len -= 1;
    }
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3008(%rax), %rcx
subq $0x1, %rcx
movq %rcx, 0x3008(%rax)
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rcx
xorl %eax, %eax
cmpl $0x0, 0x3000(%rcx)
movb %al, 0xf(%rsp)
jle 0x5afb
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x80(%rcx), %rcx
movl 0x3000(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq 0x28(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x80(%rcx), %rcx
cmpq 0x3008(%rcx), %rax
setg %al
movb %al, 0xf(%rsp)
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x5b05
jmp 0x5b34
movq 0x10(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
movl 0x3000(%rax), %ecx
subl $0x1, %ecx
movl %ecx, 0x3000(%rax)
jmp 0x5a97
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: if_stmt
static void if_stmt(Parser* parser, Vm* vm) {
    expect(parser, TOKEN_LEFT_PAREN, "Expect `(` after `if`");
    expression(parser, vm);
    expect(parser, TOKEN_RIGHT_PAREN, "Expect `)` after `if`");

    const intmax_t then_jump = jump_emit(parser, OP_JUMP_IF_FALSE);
    emit_byte(parser, OP_POP);

    statement(parser, vm);
    const intmax_t else_jump = jump_emit(parser, OP_JUMP);

    jump_patch(parser, then_jump);

    emit_byte(parser, OP_POP);
    if (match(parser, TOKEN_ELSE)) {
        statement(parser, vm);
    }

    jump_patch(parser, else_jump);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
leaq 0x600f(%rip), %rdx      # 0xbb6e
callq 0x3980
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3500
movq 0x20(%rsp), %rdi
movl $0x2, %esi
leaq 0x6000(%rip), %rdx      # 0xbb84
callq 0x3980
movq 0x20(%rsp), %rdi
movl $0x15, %esi
callq 0x5560
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x32e0
movq 0x20(%rsp), %rdi
movl $0x16, %esi
callq 0x5560
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x55f0
movq 0x20(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movl $0x19, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x5c02
jmp 0x5c11
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x32e0
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x55f0
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: while_stmt
static void while_stmt(Parser* parser, Vm* vm) {
    const size_t loop_start = buf_size(parser->compiler->fn->chunk.opcodes);

    expect(parser, TOKEN_LEFT_PAREN, "Expect `(` after `while`");
    expression(parser, vm);
    expect(parser, TOKEN_RIGHT_PAREN, "Expect `)` after `while`");

    const intmax_t exit_jump = jump_emit(parser, OP_JUMP_IF_FALSE);
    emit_byte(parser, OP_POP);

    statement(parser, vm);

    emit_loop(parser, loop_start);

    jump_patch(parser, exit_jump);
    emit_byte(parser, OP_POP);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x5c79
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x5c81
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x5c81
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movl $0x1, %esi
leaq 0x5eff(%rip), %rdx      # 0xbb9a
callq 0x3980
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x3500
movq 0x20(%rsp), %rdi
movl $0x2, %esi
leaq 0x5ef3(%rip), %rdx      # 0xbbb3
callq 0x3980
movq 0x20(%rsp), %rdi
movl $0x15, %esi
callq 0x5560
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x32e0
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x6080
movq 0x20(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x55f0
movq 0x20(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
addq $0x28, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: return_stmt
static void return_stmt(Parser* parser, Vm* vm) {
    if (parser->compiler->fn_type == TYPE_SCRIPT) {
        error_str_nul(parser, &parser->current,
                      "Cannot return from top-level code");
    }

    if (match(parser, TOKEN_SEMICOLON)) {
        emit_byte(parser, OP_NIL);
    } else {
        expression(parser, vm);
        expect(parser, TOKEN_SEMICOLON, "Expect `;` after return value");
    }
    emit_byte(parser, OP_RETURN);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rax
cmpl $0x1, 0x3018(%rax)
jne 0x5fcd
movq 0x10(%rsp), %rdi
movq 0x10(%rsp), %rsi
addq $0x30, %rsi
leaq 0x5cb7(%rip), %rdx      # 0xbc7f
callq 0x3bb0
movq 0x10(%rsp), %rdi
movl $0x9, %esi
callq 0x2fc0
testb $0x1, %al
jne 0x5fe2
jmp 0x5ff3
movq 0x10(%rsp), %rdi
movl $0x7, %esi
callq 0x3530
jmp 0x6018
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3500
movq 0x10(%rsp), %rdi
movl $0x9, %esi
leaq 0x5c8e(%rip), %rdx      # 0xbca1
callq 0x3980
movq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x3530
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: expr_stmt
static void expr_stmt(Parser* parser, Vm* vm) {
    expression(parser, vm);
    expect(parser, TOKEN_SEMICOLON,
           "Expected terminating semicolon after expression");
    emit_byte(parser, OP_POP);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
callq 0x3500
movq 0x10(%rsp), %rdi
movl $0x9, %esi
leaq 0x5c61(%rip), %rdx      # 0xbcbf
callq 0x3980
movq 0x10(%rsp), %rdi
movl $0xf, %esi
callq 0x3530
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/parse.c
// Function: emit_loop
static void emit_loop(Parser* parser, size_t loop_start) {
    emit_byte(parser, OP_LOOP);

    const intmax_t jump = (intmax_t)(
        buf_size(parser->compiler->fn->chunk.opcodes) - loop_start + 2);
    assert(jump >= 0);

    if (jump > UINT16_MAX) {
        error_str_nul(parser, &parser->previous,
                      "Reached jump limit for the for-loop body");
    }

    const uint16_t u16_jump = (uint16_t)jump;
    const uint8_t b1 = (u16_jump >> (uint8_t)8);
    const uint8_t b2 = (uint8_t)u16_jump;

    emit_byte(parser, b1);
    emit_byte(parser, b2);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq 0x20(%rsp), %rdi
movl $0x17, %esi
callq 0x3530
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x60d8
movq 0x20(%rsp), %rax
movq 0x80(%rax), %rax
movq 0x3010(%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x60e0
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x60e0
movq (%rsp), %rax
subq 0x18(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jl 0x60fc
jmp 0x611b
leaq 0x5929(%rip), %rdi      # 0xba2c
leaq 0x5849(%rip), %rsi      # 0xb953
movl $0x22e, %edx            # imm = 0x22E
leaq 0x5ab6(%rip), %rcx      # 0xbbcc
callq 0x10e0
cmpq $0xffff, 0x10(%rsp)     # imm = 0xFFFF
jle 0x6140
movq 0x20(%rsp), %rdi
movq 0x20(%rsp), %rsi
addq $0x58, %rsi
leaq 0x5ab2(%rip), %rdx      # 0xbbed
callq 0x3bb0
movq 0x10(%rsp), %rax
movw %ax, 0xe(%rsp)
movzwl 0xe(%rsp), %eax
sarl $0x8, %eax
movb %al, 0xd(%rsp)
movw 0xe(%rsp), %ax
movb %al, 0xc(%rsp)
movq 0x20(%rsp), %rdi
movzbl 0xd(%rsp), %esi
callq 0x3530
movq 0x20(%rsp), %rdi
movzbl 0xc(%rsp), %esi
callq 0x3530
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/utils.c
// Function: realloc_safe
void* realloc_safe(void** ptr, size_t new_size, const char* func, int line) {
    if ((*ptr = realloc(*ptr, new_size)) == NULL) {
        fprintf(stderr, "%s:%d: Could not allocate %zu bytes of memory\n", func,
                line, new_size);
        exit(ENOMEM);
    }
    LOG("func=%s line=%d allocated=%zu\n", func, line, new_size);

    return *ptr;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rdi
movq 0x18(%rsp), %rsi
callq 0x1190
movq 0x20(%rsp), %rcx
movq %rax, (%rcx)
cmpq $0x0, %rax
jne 0x61f7
movq 0x9e22(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movq 0x10(%rsp), %rdx
movl 0xc(%rsp), %ecx
movq 0x18(%rsp), %r8
leaq 0x5b09(%rip), %rsi      # 0xbcef
movb $0x0, %al
callq 0x1140
movl $0xc, %edi
callq 0x11d0
jmp 0x61f9
jmp 0x61fb
movq 0x20(%rsp), %rax
movq (%rax), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/utils.c
// Function: read_stdin
void read_stdin(char** content, size_t* content_len) {
    char buf[BUF_LEN] = "";

    ssize_t effectivily_read = 0;
    while ((effectivily_read = read(0, buf, BUF_LEN)) > 0) {
        *content_len += (size_t)effectivily_read;
        REALLOC_SAFE(content, *content_len);

        memcpy(*content + *content_len - effectivily_read, buf,
               (size_t)effectivily_read);
    }
    if (effectivily_read == -1) {
        fprintf(stderr, "Error reading from stdin: errno=%s error=%d\n",
                strerror(errno), errno);
        exit(errno);
    }
    LOG("content_len=%zu\n", *content_len);
}

// Assembly:
subq $0x98, %rsp
movq %rdi, 0x90(%rsp)
movq %rsi, 0x88(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
movl $0x64, %edx
callq 0x10f0
movq $0x0, 0x18(%rsp)
leaq 0x20(%rsp), %rsi
xorl %edi, %edi
movl $0x64, %edx
callq 0x1100
movq %rax, 0x18(%rsp)
cmpq $0x0, %rax
jle 0x62c8
movq 0x18(%rsp), %rcx
movq 0x88(%rsp), %rax
addq (%rax), %rcx
movq %rcx, (%rax)
movq 0x90(%rsp), %rdi
movq 0x88(%rsp), %rax
movq (%rax), %rsi
leaq 0x5a94(%rip), %rdx      # 0xbd1e
movl $0x1a, %ecx
callq 0x6190
movq 0x90(%rsp), %rax
movq (%rax), %rdi
movq 0x88(%rsp), %rax
addq (%rax), %rdi
xorl %eax, %eax
subq 0x18(%rsp), %rax
addq %rax, %rdi
leaq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1160
jmp 0x6241
cmpq $-0x1, 0x18(%rsp)
jne 0x631b
movq 0x9d19(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
callq 0x1050
movl (%rax), %edi
callq 0x11e0
movq %rax, 0x10(%rsp)
callq 0x1050
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rdx
movl (%rax), %ecx
leaq 0x5a21(%rip), %rsi      # 0xbd29
movb $0x0, %al
callq 0x1140
callq 0x1050
movl (%rax), %edi
callq 0x11d0
jmp 0x631d
jmp 0x631f
addq $0x98, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/utils.c
// Function: read_file
void read_file(const char path[], char** content, size_t* content_len) {
    FILE* file = NULL;

    if ((file = fopen(path, "r")) == NULL) {
        fprintf(stderr, "Could not open the file `%s`: errno=%d error=%s\n",
                path, errno, strerror(errno));
        exit(errno);
    }

    int ret = 0;
    if ((ret = fseek(file, 0, SEEK_END)) != 0) {
        fprintf(stderr,
                "Could not move the file cursor to the end of the file `%s`: "
                "errno=%d error=%s\n",
                path, errno, strerror(errno));
        exit(errno);
    }
    const size_t file_size = (size_t)ftell(file);

    rewind(file);

    REALLOC_SAFE(content, file_size + 1);
    (*content)[file_size] = '\0';

    const size_t bytes_read = fread(*content, 1, file_size, file);
    if (bytes_read != file_size) {
        fprintf(stderr,
                "Could not read whole file: bytes_read=%zu file_size=%zu\n",
                bytes_read, file_size);
        exit(EIO);
    }
    *content_len = bytes_read;

    fclose(file);
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq %rsi, 0x58(%rsp)
movq %rdx, 0x50(%rsp)
movq $0x0, 0x48(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x52e6(%rip), %rsi      # 0xb63e
callq 0x11b0
movq %rax, 0x48(%rsp)
cmpq $0x0, %rax
jne 0x63c3
movq 0x9c81(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x20(%rsp)
callq 0x1050
movl (%rax), %eax
movl %eax, 0x2c(%rsp)
callq 0x1050
movl (%rax), %edi
callq 0x11e0
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rdx
movl 0x2c(%rsp), %ecx
movq %rax, %r8
leaq 0x59a6(%rip), %rsi      # 0xbd56
movb $0x0, %al
callq 0x1140
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movl $0x0, 0x44(%rsp)
movq 0x48(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x1180
movl %eax, 0x44(%rsp)
cmpl $0x0, %eax
je 0x6440
movq 0x9c02(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x1050
movl (%rax), %eax
movl %eax, 0x14(%rsp)
callq 0x1050
movl (%rax), %edi
callq 0x11e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movl 0x14(%rsp), %ecx
movq %rax, %r8
leaq 0x595a(%rip), %rsi      # 0xbd87
movb $0x0, %al
callq 0x1140
callq 0x1050
movl (%rax), %edi
callq 0x11d0
movq 0x48(%rsp), %rdi
callq 0x1150
movq %rax, 0x38(%rsp)
movq 0x48(%rsp), %rdi
callq 0x10b0
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rsi
addq $0x1, %rsi
leaq 0x5968(%rip), %rdx      # 0xbdd6
movl $0x3c, %ecx
callq 0x6190
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movb $0x0, (%rax,%rcx)
movq 0x58(%rsp), %rax
movq (%rax), %rdi
movq 0x38(%rsp), %rdx
movq 0x48(%rsp), %rcx
movl $0x1, %esi
callq 0x1060
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
je 0x64e2
movq 0x9b33(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movq 0x30(%rsp), %rdx
movq 0x38(%rsp), %rcx
leaq 0x590f(%rip), %rsi      # 0xbde0
movb $0x0, %al
callq 0x1140
movl $0x5, %edi
callq 0x11d0
movq 0x30(%rsp), %rcx
movq 0x50(%rsp), %rax
movq %rcx, (%rax)
movq 0x48(%rsp), %rdi
callq 0x1080
addq $0x68, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/utils.c
// Function: str_eq
bool str_eq(const char* restrict a, size_t a_len, const char* restrict b,
            size_t b_len) {
    if (!a || !b) {
        return false;
    }
    if (a_len != b_len) {
        return false;
    }

    return memcmp(a, b, a_len) == 0;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq %rdx, 0x8(%rsp)
movq %rcx, (%rsp)
cmpq $0x0, 0x18(%rsp)
je 0x6527
cmpq $0x0, 0x8(%rsp)
jne 0x652e
movb $0x0, 0x27(%rsp)
jmp 0x6560
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
je 0x6540
movb $0x0, 0x27(%rsp)
jmp 0x6560
movq 0x18(%rsp), %rdi
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
callq 0x1110
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, 0x27(%rsp)
movb 0x27(%rsp), %al
andb $0x1, %al
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/value.c
// Function: value_eq
bool value_eq(Value lhs, Value rhs) {
    if (lhs.type != rhs.type) {
        return false;
    }

    switch (lhs.type) {
        case VAL_BOOL:
            return AS_BOOL(lhs) == AS_BOOL(rhs);
        case VAL_NIL:
            return true;
        case VAL_NUMBER:
            return fabs(AS_NUMBER(lhs) - AS_NUMBER(rhs)) < DBL_EPSILON;
        case VAL_OBJ:
            if (!IS_STRING(lhs) || !IS_STRING(rhs)) {
                return false;
            }

            if (AS_STRING(lhs)->len != AS_STRING(rhs)->len) {
                return false;
            }
            return memcmp(AS_STRING(lhs)->s, AS_STRING(rhs)->s,
                          AS_STRING(lhs)->len) == 0;
    }
}

// Assembly:
subq $0x38, %rsp
movl %edi, 0x20(%rsp)
movq %rsi, 0x28(%rsp)
movl %edx, 0x10(%rsp)
movq %rcx, 0x18(%rsp)
movl 0x20(%rsp), %eax
cmpl 0x10(%rsp), %eax
je 0x65ea
movb $0x0, 0x37(%rsp)
jmp 0x66e5
movl 0x20(%rsp), %eax
movq %rax, 0x8(%rsp)
subq $0x3, %rax
ja 0x66e5
movq 0x8(%rsp), %rax
leaq 0x5837(%rip), %rcx      # 0xbe40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movb 0x28(%rsp), %al
andb $0x1, %al
movzbl %al, %eax
movb 0x18(%rsp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
sete %al
andb $0x1, %al
movb %al, 0x37(%rsp)
jmp 0x66e5
movb $0x1, 0x37(%rsp)
jmp 0x66e5
movsd 0x28(%rsp), %xmm1
subsd 0x18(%rsp), %xmm1
movaps 0x57de(%rip), %xmm0     # 0xbe30
pand %xmm0, %xmm1
movsd 0x57c2(%rip), %xmm0     # 0xbe20
ucomisd %xmm1, %xmm0
seta %al
andb $0x1, %al
movb %al, 0x37(%rsp)
jmp 0x66e5
movl 0x20(%rsp), %edi
movq 0x28(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x6683
jmp 0x6697
movl 0x10(%rsp), %edi
movq 0x18(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x669e
movb $0x0, 0x37(%rsp)
jmp 0x66e5
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x18(%rsp), %rcx
cmpq 0x10(%rcx), %rax
je 0x66b9
movb $0x0, 0x37(%rsp)
jmp 0x66e5
movq 0x28(%rsp), %rdi
addq $0x18, %rdi
movq 0x18(%rsp), %rsi
addq $0x18, %rsi
movq 0x28(%rsp), %rax
movq 0x10(%rax), %rdx
callq 0x1110
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movb %al, 0x37(%rsp)
movb 0x37(%rsp), %al
andb $0x1, %al
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/value.c
// Function: value_make_string
ObjString* value_make_string(Obj** objects, size_t s_len) {
    ObjString* os = value_obj_str_allocate(objects, sizeof(ObjString) + s_len);
    os->len = s_len;
    LOG("allocated string size=%zu\n", os->len);
    os->obj.type = OBJ_STRING;

    return os;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
movq 0x8(%rsp), %rsi
addq $0x18, %rsi
callq 0x6780
movq %rax, (%rsp)
movq 0x8(%rsp), %rcx
movq (%rsp), %rax
movq %rcx, 0x10(%rax)
jmp 0x6764
movq (%rsp), %rax
movl $0x0, (%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/value.c
// Function: value_obj_str_allocate
static ObjString* value_obj_str_allocate(Obj** objects, size_t size) {
    ObjString* obj = NULL;
    REALLOC_SAFE(&obj, size);
    obj->obj.next = *objects;

    *objects = &obj->obj;

    return obj;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq $0x0, (%rsp)
movq 0x8(%rsp), %rsi
movq %rsp, %rdi
leaq 0x5753(%rip), %rdx      # 0xbef8
movl $0x2a, %ecx
callq 0x6190
movq 0x10(%rsp), %rax
movq (%rax), %rcx
movq (%rsp), %rax
movq %rcx, 0x8(%rax)
movq (%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
movq (%rsp), %rax
addq $0x18, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/value.c
// Function: value_make_fn
ObjFunction* value_make_fn(const char* name, size_t name_len) {
    ObjFunction* fn = NULL;
    REALLOC_SAFE(&fn, sizeof(ObjFunction) + name_len);
    fn->obj.type = OBJ_FUNCTION;
    fn->arity = 0;
    fn->chunk = (Chunk){0};
    memcpy(fn->name, name, name_len);
    fn->name_len = name_len;
    return fn;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x28(%rsp), %rsi
addq $0x38, %rsi
leaq 0x20(%rsp), %rdi
leaq 0x5664(%rip), %rdx      # 0xbe70
movl $0x41, %ecx
callq 0x6190
movq 0x20(%rsp), %rax
movl $0x1, (%rax)
movq 0x20(%rsp), %rax
movb $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
leaq 0x8(%rsp), %rdi
xorl %esi, %esi
movl $0x18, %edx
callq 0x10f0
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
movq %rcx, 0x18(%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x20(%rax)
movq 0x18(%rsp), %rcx
movq %rcx, 0x28(%rax)
movq 0x20(%rsp), %rdi
addq $0x38, %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1160
movq 0x28(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x30(%rax)
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/value.c
// Function: value_make_fn_native
ObjNative* value_make_fn_native(NativeFn fn) {
    ObjNative* n = NULL;
    REALLOC_SAFE(&n, sizeof(ObjNative));
    n->obj.type = OBJ_NATIVE;
    n->fn = fn;

    return n;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
leaq 0x8(%rsp), %rdi
movl $0x18, %esi
leaq 0x55bb(%rip), %rdx      # 0xbe7e
movl $0x4c, %ecx
callq 0x6190
movq 0x8(%rsp), %rax
movl $0x2, (%rax)
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq