LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/env.c
// Function: env_extend
struct value*
env_extend(struct vm* vm, struct value* vars, struct value* vals, struct value* env)
{
    long vars_len = list_length(vars);
    long vals_len = list_length(vals);
    assert(vars_len == vals_len && "mismatched number of vars/vals supplied to env_extend");

    return vm_make_pair(vm, make_frame(vm, vars, vals), env);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rcx, %rbx
movq %rdx, %r15
movq %rsi, %r12
movq %rdi, %r14
movq %rsi, %rdi
callq 0x502c
movq %rax, %r13
movq %r15, %rdi
callq 0x502c
cmpq %rax, %r13
jne 0x4c4b
movq %r14, %rdi
movq %r12, %rsi
movq %r15, %rdx
callq 0x68d9
movq %r14, %rdi
movq %rax, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x68d9
leaq 0x27bb(%rip), %rdi      # 0x740d
leaq 0x2804(%rip), %rsi      # 0x745d
leaq 0x2807(%rip), %rcx      # 0x7467
pushq $0x43
popq %rdx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/env.c
// Function: env_lookup
struct value*
env_lookup(struct vm* vm, struct value* var, struct value* env)
{
    assert(value_is_symbol(var) && "non-symbol key passed to env_lookup");

    if (value_is_empty_list(env)) {
        fprintf(stderr, "unbound variable: %s\n", var->as.symbol);
        exit(EXIT_FAILURE);
    }

    struct value* frame = first_frame(env);
    struct value* val = frame_lookup(vm, var, frame_vars(frame), frame_vals(frame));
    if (val != NULL) return val;
    return env_lookup(vm, var, rest_frames(env));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %rbx
cmpl $0x6, (%rbx)
jne 0x4cef
cmpl $0x1, (%r14)
je 0x4ccb
movq %r14, %rdi
callq 0x50ce
movq %rax, %r15
movq %rax, %rdi
callq 0x50ce
movq %rax, %r12
movq %r15, %rdi
callq 0x5046
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x4d0c
testq %rax, %rax
jne 0x4cbf
movq %r14, %rdi
callq 0x5046
movq %rax, %r14
jmp 0x4c76
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x730e(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movq 0x10(%rbx), %rdx
leaq 0x2861(%rip), %rsi      # 0x7541
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0
leaq 0x27c7(%rip), %rdi      # 0x74bd
leaq 0x2760(%rip), %rsi      # 0x745d
leaq 0x27f7(%rip), %rcx      # 0x74fb
pushq $0x4b
popq %rdx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/env.c
// Function: frame_lookup
static struct value*
frame_lookup(struct vm* vm, struct value* var, struct value* vars, struct value* vals)
{
    if (value_is_empty_list(vars) && value_is_empty_list(vals)) return NULL;
    assert(!value_is_empty_list(vars) && "env frame has mismatched vars and vals");
    assert(!value_is_empty_list(vals) && "env frame has mismatched vars and vals");

    if (value_is_equal(var, CAR(vars))) return CAR(vals);
    return frame_lookup(vm, var, CDR(vars), CDR(vals));
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
cmpl $0x1, (%r15)
movl (%rbx), %eax
je 0x4d56
cmpl $0x1, %eax
je 0x4d70
movq %r15, %rdi
callq 0x50ce
movq %r14, %rdi
movq %rax, %rsi
callq 0x6433
testb %al, %al
jne 0x4d63
movq %r15, %rdi
callq 0x5046
movq %rax, %r15
movq %rbx, %rdi
callq 0x5046
movq %rax, %rbx
jmp 0x4d1a
cmpl $0x1, %eax
jne 0x4d8d
xorl %eax, %eax
popq %rbx
popq %r14
popq %r15
retq
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x50ce
leaq 0x29a7(%rip), %rdi      # 0x771e
leaq 0x26df(%rip), %rsi      # 0x745d
leaq 0x2941(%rip), %rcx      # 0x76c6
pushq $0x13
popq %rdx
callq 0x10f0
leaq 0x28eb(%rip), %rdi      # 0x767f
leaq 0x26c2(%rip), %rsi      # 0x745d
leaq 0x2924(%rip), %rcx      # 0x76c6
pushq $0x12
jmp 0x4d87
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/env.c
// Function: env_update
struct value*
env_update(struct vm* vm, struct value* var, struct value* val, struct value* env)
{
    assert(value_is_symbol(var) && "non-symbol key passed to env_update");

    if (value_is_empty_list(env)) {
        fprintf(stderr, "unbound variable: %s\n", var->as.symbol);
        exit(EXIT_FAILURE);
    }

    struct value* frame = first_frame(env);
    struct value* existing_val = frame_lookup(vm, var, frame_vars(frame), frame_vals(frame));
    if (existing_val != NULL) return frame_update(vm, var, val, frame_vars(frame), frame_vals(frame));
    return env_update(vm, var, val, rest_frames(env));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
cmpl $0x6, (%rbx)
jne 0x4e61
cmpl $0x1, (%r12)
je 0x4e3d
movq %r12, %rdi
callq 0x50ce
movq %rax, %r13
movq %rax, %rdi
callq 0x50ce
movq %rax, %rbp
movq %r13, %rdi
callq 0x5046
movq %rbx, %rdi
movq %rbp, %rsi
movq %rax, %rdx
callq 0x4d0c
testq %rax, %rax
jne 0x4e0b
movq %r12, %rdi
callq 0x5046
movq %rax, %r12
jmp 0x4dbd
movq %r13, %rdi
callq 0x50ce
movq %rax, %r12
movq %r13, %rdi
callq 0x5046
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
movq %r12, %rcx
movq %rax, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4e7e
movq 0x719c(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
movq 0x10(%rbx), %rdx
leaq 0x26ef(%rip), %rsi      # 0x7541
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0
leaq 0x26ef(%rip), %rdi      # 0x7557
leaq 0x25ee(%rip), %rsi      # 0x745d
leaq 0x271f(%rip), %rcx      # 0x7595
pushq $0x5b
popq %rdx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/env.c
// Function: frame_update
static struct value*
frame_update(struct vm* vm, struct value* var, struct value* val, struct value* vars, struct value* vals)
{
    if (value_is_empty_list(vars) && value_is_empty_list(vals)) return NULL;
    assert(!value_is_empty_list(vars) && "env frame has mismatched vars and vals");
    assert(!value_is_empty_list(vals) && "env frame has mismatched vars and vals");

    if (value_is_equal(var, CAR(vars))) {
        vals->as.pair.car = val;
        return vm_make_empty_list(vm);
    }

    return frame_update(vm, var, val, CDR(vars), CDR(vals));
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %r8, %r14
movq %rcx, %r13
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
cmpl $0x1, (%r13)
movl (%r14), %eax
je 0x4ed4
cmpl $0x1, %eax
je 0x4efa
movq %r13, %rdi
callq 0x50ce
movq %r12, %rdi
movq %rax, %rsi
callq 0x6433
testb %al, %al
jne 0x4ee5
movq %r13, %rdi
callq 0x5046
movq %rax, %r13
movq %r14, %rdi
callq 0x5046
movq %rax, %r14
jmp 0x4e96
cmpl $0x1, %eax
jne 0x4f17
xorl %eax, %eax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, 0x10(%r14)
movq %r15, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x66fc
leaq 0x281d(%rip), %rdi      # 0x771e
leaq 0x2555(%rip), %rsi      # 0x745d
leaq 0x2856(%rip), %rcx      # 0x7765
pushq $0x1e
popq %rdx
callq 0x10f0
leaq 0x2761(%rip), %rdi      # 0x767f
leaq 0x2538(%rip), %rsi      # 0x745d
leaq 0x2839(%rip), %rcx      # 0x7765
pushq $0x1d
jmp 0x4f11
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/env.c
// Function: env_define
struct value*
env_define(struct vm* vm, struct value* var, struct value* val, struct value* env)
{
    assert(value_is_symbol(var) && "non-symbol key passed to env_define");

    struct value* frame = first_frame(env);
    struct value* existing_val = frame_lookup(vm, var, frame_vars(frame), frame_vals(frame));
    if (existing_val != NULL) return frame_update(vm, var, val, frame_vars(frame), frame_vals(frame));
    return frame_add_binding(vm, var, val, frame);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
cmpl $0x6, (%rsi)
jne 0x4ff6
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %rbx
movq %rcx, %rdi
callq 0x50ce
movq %rax, %r15
movq %rax, %rdi
callq 0x50ce
movq %rax, %r13
movq %r15, %rdi
callq 0x5046
movq %r12, %rdi
movq %r13, %rsi
movq %rax, %rdx
callq 0x4d0c
testq %rax, %rax
je 0x4fac
movq %r15, %rdi
callq 0x50ce
movq %rax, %r13
movq %r15, %rdi
callq 0x5046
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
movq %rax, %r8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x4e7e
testq %r15, %r15
je 0x500f
movq %r15, %rdi
callq 0x50ce
movq %rbx, %rdi
movq %r12, %rsi
movq %rax, %rdx
callq 0x68d9
movq %rax, 0x10(%r15)
movq %r15, %rdi
callq 0x5046
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x68d9
movq %rax, 0x18(%r15)
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
jmp 0x66fc
leaq 0x25ee(%rip), %rdi      # 0x75eb
leaq 0x2459(%rip), %rsi      # 0x745d
leaq 0x261e(%rip), %rcx      # 0x7629
pushq $0x6b
jmp 0x5026
leaq 0x27b7(%rip), %rdi      # 0x77cd
leaq 0x2440(%rip), %rsi      # 0x745d
leaq 0x27b7(%rip), %rcx      # 0x77db
pushq $0x2b
popq %rdx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/list.c
// Function: list_cdr
struct value*
list_cdr(const struct value* list)
{
    if (value_is_empty_list(list)) {
        fprintf(stderr, "the primitive 'cdr' is defined only for non-empty lists\n");
        exit(EXIT_FAILURE);
    }

    return list->as.pair.cdr;
}

// Assembly:
cmpl $0x1, (%rdi)
je 0x5050
movq 0x18(%rdi), %rax
retq
pushq %rax
movq 0x6f88(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x2829(%rip), %rdi      # 0x788b
pushq $0x38
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/list.c
// Function: list_nth
struct value*
list_nth(const struct value* list, long n)
{
    if (n < 0 || n >= list_length(list)) {
        fprintf(stderr, "list: invalid index: %ld\n", n);
        exit(EXIT_FAILURE);
    }

    const struct value* iter = list;
    for (long i = 0; i < n; i++) {
        iter = CDR(iter);
    }

    return CAR(iter);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
testq %rsi, %rsi
js 0x508e
movq %rdi, %r14
callq 0x502c
cmpq %rbx, %rax
jg 0x50b9
movq 0x6f4b(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
leaq 0x2799(%rip), %rsi      # 0x7838
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0
callq 0x5046
movq %rax, %r14
movq %r14, %rdi
subq $0x1, %rbx
jae 0x50b1
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x50ce
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/list.c
// Function: list_car
struct value*
list_car(const struct value* list)
{
    if (value_is_empty_list(list)) {
        fprintf(stderr, "the primitive 'car' is defined only for non-empty lists\n");
        exit(EXIT_FAILURE);
    }

    return list->as.pair.car;
}

// Assembly:
cmpl $0x1, (%rdi)
je 0x50d8
movq 0x10(%rdi), %rax
retq
pushq %rax
movq 0x6f00(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x2768(%rip), %rdi      # 0x7852
pushq $0x38
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/mce.c
// Function: mce_apply
struct value*
mce_apply(struct vm* vm, struct value* proc, struct value* args)
{
    if (is_primitive_proc(proc)) {
        return proc->as.builtin(vm, args);
    } else if (is_compound_proc(proc)) {
        return eval_sequence(vm,
            proc->as.lambda.body,
            env_extend(vm, proc->as.lambda.params, args, proc->as.lambda.env));
    } else {
        fprintf(stderr, "runtime error (invalid proc) at: TODO\n");
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl (%rsi), %eax
cmpl $0x9, %eax
je 0x58bb
cmpl $0x8, %eax
jne 0x5912
movq 0x10(%rsi), %rax
movq %rbx, %rdi
movq %rdx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmpq *%rax
movq 0x10(%rsi), %rax
movq 0x18(%rsi), %r14
movq 0x20(%rsi), %rcx
movq %rbx, %rdi
movq %rax, %rsi
callq 0x4bf9
movq %rax, %r15
movq %r14, %rdi
callq 0x5046
movl (%rax), %ebp
movq %r14, %rdi
callq 0x50ce
movq %rbx, %rdi
movq %rax, %rsi
movq %r15, %rdx
callq 0x5100
cmpl $0x1, %ebp
je 0x5907
movq %r14, %rdi
callq 0x5046
movq %rax, %r14
jmp 0x58d5
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x66c7(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x1ffd(%rip), %rdi      # 0x7920
pushq $0x26
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
nop
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: read_character
struct value*
read_character(struct vm* vm, FILE* fp)
{
    int c = advance(fp);
    switch (c) {
        case EOF:
            fprintf(stderr, "reader: incomplete character literal\n");
            exit(EXIT_FAILURE);
        case 's':
            if (peek(fp) == 'p') {
                eat_string(fp, "pace");
                peek_expect_delimiter(fp);
                return vm_make_character(vm, ' ');
            }
            break;
        case 'n':
            if (peek(fp) == 'e') {
                eat_string(fp, "ewline");
                peek_expect_delimiter(fp);
                return vm_make_character(vm, '\n');
            }
            break;
    }

    if (c < '!' || c > '~') {
        fprintf(stderr, "reader: non-printable character literal\n");
        exit(EXIT_FAILURE);
    }

    peek_expect_delimiter(fp);
    return vm_make_character(vm, c);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x1240
movl %eax, %ebp
cmpl $0x6e, %eax
je 0x5993
cmpl $0x73, %ebp
je 0x597a
cmpl $-0x1, %ebp
je 0x59c8
movl %ebp, %eax
addl $-0x7f, %eax
cmpl $-0x5f, %eax
ja 0x59b2
movq 0x6674(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x20a0(%rip), %rdi      # 0x7a16
pushq $0x28
jmp 0x59db
movq %r14, %rdi
callq 0x59ec
cmpl $0x70, %eax
jne 0x59b2
pushq $0x20
popq %rbp
leaq 0x23fe(%rip), %rsi      # 0x7d8f
jmp 0x59aa
movq %r14, %rdi
callq 0x59ec
cmpl $0x65, %eax
jne 0x59b2
pushq $0xa
popq %rbp
leaq 0x23ed(%rip), %rsi      # 0x7d97
movq %r14, %rdi
callq 0x5a0c
movq %r14, %rdi
callq 0x5a59
movq %rbx, %rdi
movl %ebp, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x67a1
movq 0x6611(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x2017(%rip), %rdi      # 0x79f0
pushq $0x25
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: eat_string
static void
eat_string(FILE* fp, const char* s)
{
    // ensure that an expected string comes next in the file
    while (*s != '\0') {
        int c = advance(fp);
        if (c != *s) {
            fprintf(stderr, "reader: incomplete character literal\n");
            exit(EXIT_FAILURE);
        }
        s++;
    }
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, (%rbx)
je 0x5a51
movq %r14, %rdi
callq 0x1240
movsbl (%rbx), %ecx
incq %rbx
cmpl %ecx, %eax
je 0x5a16
movq 0x65ac(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x1fb2(%rip), %rdi      # 0x79f0
pushq $0x25
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: peek_expect_delimiter
static void
peek_expect_delimiter(FILE* fp)
{
    // expect a delimiter to follow some token otherwise raise an error
    if (!is_delimiter(peek(fp))) {
        fprintf(stderr, "reader: token not followed by delimiter\n");
        exit(EXIT_FAILURE);
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
callq 0x59ec
movl %eax, %ebx
movsbl %bl, %ebp
movl %ebp, %edi
callq 0x613b
cmpb $-0x1, %bpl
sete %cl
orb %al, %cl
jne 0x5a8f
movsbl %bl, %esi
leaq 0x219e(%rip), %rdi      # 0x7c20
pushq $0x5
popq %rdx
callq 0x1170
testq %rax, %rax
je 0x5a96
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq 0x6543(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x2150(%rip), %rdi      # 0x7bf7
pushq $0x28
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: read_number
struct value*
read_number(struct vm* vm, FILE* fp)
{
    // temp buffer to hold the number's contents
    char buf[MAX_NUMBER_SIZE] = { 0 };
    long i = 0;

    // read characters into the buffer until:
    // EOF is reached, non-numeric char is read, or buffer is filled
    int c;
    while ((c = advance(fp)) != EOF) {
        if (!is_digit(c)) break;

        // "- 2" here to account for terminator
        if (i >= MAX_NUMBER_SIZE - 2) {
            fprintf(stderr, "reader: numeric literal larger than %d characters\n", MAX_NUMBER_SIZE);
            exit(EXIT_FAILURE);
        }

        buf[i++] = c;
    }

    // put the last non-numeric char back
    rollback(fp, c);
    peek_expect_delimiter(fp);

    long number = strtol(buf, NULL, 10);
    return vm_make_number(vm, number);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movq %rsi, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x70(%rsp)
movaps %xmm0, 0x60(%rsp)
movaps %xmm0, 0x50(%rsp)
movaps %xmm0, 0x40(%rsp)
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movaps %xmm0, (%rsp)
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x1240
cmpl $-0x1, %eax
je 0x5b1d
leal -0x30(%rax), %ecx
cmpb $0x9, %cl
ja 0x5b1d
cmpq $0x7e, %r15
je 0x5b53
movb %al, (%rsp,%r15)
incq %r15
jmp 0x5af9
movl %eax, %edi
movq %r14, %rsi
callq 0x1090
movq %r14, %rdi
callq 0x5a59
movq %rsp, %rdi
pushq $0xa
popq %rdx
xorl %esi, %esi
callq 0x1200
movq %rbx, %rdi
movq %rax, %rsi
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
jmp 0x67d8
movq 0x6486(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
leaq 0x1edb(%rip), %rsi      # 0x7a3f
movl $0x80, %edx
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: read_string
struct value*
read_string(struct vm* vm, FILE* fp)
{
    // temp buffer to hold the string's contents
    char buf[MAX_STRING_SIZE] = { 0 };
    long i = 0;

    // skip leading quote
    advance(fp);

    // read characters into the buffer until:
    // EOF is reached, closing quote, or buffer is filled
    int c;
    while ((c = advance(fp)) != EOF) {
        if (c == '"') break;

        // "- 2" here to account for terminator
        if (i >= MAX_STRING_SIZE - 2) {
            fprintf(stderr, "reader: string literal larger than %d characters\n", MAX_STRING_SIZE);
            exit(EXIT_FAILURE);
        }

        buf[i++] = c;
    }

    // unterminated string literal is an error
    if (c == EOF) {
        fprintf(stderr, "reader: incomplete string literal\n");
        exit(EXIT_FAILURE);
    }

    peek_expect_delimiter(fp);
    return vm_make_string(vm, buf);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x100, %rsp            # imm = 0x100
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
xorl %r15d, %r15d
movl $0x100, %edx            # imm = 0x100
xorl %esi, %esi
callq 0x10d0
movq %r14, %rdi
callq 0x1240
movq %r14, %rdi
callq 0x1240
cmpl $0x22, %eax
je 0x5bc8
cmpl $-0x1, %eax
je 0x5be8
cmpq $0xfe, %r15
je 0x5c06
movb %al, (%rsp,%r15)
incq %r15
jmp 0x5ba4
movq %r14, %rdi
callq 0x5a59
movq %rsp, %rsi
movq %rbx, %rdi
callq 0x6811
addq $0x100, %rsp            # imm = 0x100
popq %rbx
popq %r14
popq %r15
retq
movq 0x63f1(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x1eab(%rip), %rdi      # 0x7aa4
pushq $0x22
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
jmp 0x5c23
movq 0x63d3(%rip), %rax      # 0xbfe0
movq (%rax), %rdi
leaq 0x1e5b(%rip), %rsi      # 0x7a72
movl $0x100, %edx            # imm = 0x100
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: read_pair
struct value*
read_pair(struct vm* vm, FILE* fp)
{
    eat_whitespace(fp);

    // return the empty list upon finding a closing paren
    if (peek(fp) == ')') {
        advance(fp);
        return vm_make_empty_list(vm);
    }

    // read the first half of the pair
    struct value* car = reader_read(vm, fp);
    eat_whitespace(fp);

    // check for an "improper" list
    if (peek(fp) == '.') {
        advance(fp);
        peek_expect_delimiter(fp);

        // read the last expr
        struct value* cdr = reader_read(vm, fp);
        eat_whitespace(fp);

        // ensure a closing paren comes next
        if (peek(fp) != ')') {
            fprintf(stderr, "reader: expected closing paren after last expr in improper list\n");
            exit(EXIT_FAILURE);
        }

        // consume the closing paren
        advance(fp);
        return vm_make_pair(vm, car, cdr);
    }

    // read the next expr in a "normal" list
    struct value* cdr = read_pair(vm, fp);
    return vm_make_pair(vm, car, cdr);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq %rsi, %rdi
callq 0x5e80
movq %r14, %rdi
callq 0x59ec
cmpl $0x29, %eax
jne 0x5dcf
movq %r14, %rdi
callq 0x1240
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x66fc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5ed2
movq %rax, %r15
movq %r14, %rdi
callq 0x5e80
movq %r14, %rdi
callq 0x59ec
cmpl $0x2e, %eax
jne 0x5e38
movq %r14, %rdi
callq 0x1240
movq %r14, %rdi
callq 0x5a59
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5ed2
movq %rax, %r12
movq %r14, %rdi
callq 0x5e80
movq %r14, %rdi
callq 0x59ec
cmpl $0x29, %eax
jne 0x5e5c
movq %r14, %rdi
callq 0x1240
movq %rbx, %rdi
movq %r15, %rsi
movq %r12, %rdx
jmp 0x5e4c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5d91
movq %rbx, %rdi
movq %r15, %rsi
movq %rax, %rdx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x68d9
movq 0x617d(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x1ca0(%rip), %rdi      # 0x7b0d
pushq $0x40
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/reader.c
// Function: eat_whitespace
static void
eat_whitespace(FILE* fp)
{
    int c;
    while ((c = advance(fp)) != EOF) {
        // if whitespace, eat and advance
        if (is_whitespace(c)) continue;

        // if comment found, eat til end of line
        if (c == ';') {
            while (((c = advance(fp)) != EOF) && (c != '\n'));
            continue;
        }

        // found a non-whitespace char at this point (put it back and break)
        rollback(fp, c);
        break;
    }
}

// Assembly:
pushq %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rbx, %rdi
callq 0x1240
cmpl $-0x1, %eax
je 0x5ebb
movl %eax, %ebp
movsbl %bpl, %edi
callq 0x613b
testb %al, %al
jne 0x5e86
cmpl $0x3b, %ebp
jne 0x5ec2
movq %rbx, %rdi
callq 0x1240
cmpl $-0x1, %eax
je 0x5e86
cmpl $0xa, %eax
jne 0x5ea7
jmp 0x5e86
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl %ebp, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x1090
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/value.c
// Function: value_is_equal
bool
value_is_equal(const struct value* a, const struct value* b)
{
    if (a->type != b->type) return false;

    switch (a->type) {
        case VALUE_EMPTY_LIST:
            // all instances of the empty list are the same
            return true;
        case VALUE_BOOLEAN:
            return a->as.boolean == b->as.boolean;
        case VALUE_CHARACTER:
            return a->as.character == b->as.character;
        case VALUE_NUMBER:
            return a->as.number == b->as.number;
        case VALUE_STRING:
            return strcmp(a->as.string, b->as.string) == 0;
        case VALUE_SYMBOL:
            return strcmp(a->as.symbol, b->as.symbol) == 0;
        case VALUE_PAIR:
            return value_is_equal(a->as.pair.car, b->as.pair.car) &&
                   value_is_equal(a->as.pair.cdr, b->as.pair.cdr);
        case VALUE_BUILTIN:
            // direct pointer compare
            return a->as.builtin == b->as.builtin;
        case VALUE_LAMBDA:
            return value_is_equal(a->as.lambda.params, b->as.lambda.params) &&
                   value_is_equal(a->as.lambda.body, b->as.lambda.body) &&
                   value_is_equal(a->as.lambda.env, b->as.lambda.env);
        case VALUE_INPUT_PORT:
        case VALUE_OUTPUT_PORT:
            // direct pointer compare
            return a->as.port == b->as.port;
        case VALUE_WINDOW:
            // direct pointer compare
            return a->as.window.window == b->as.window.window &&
                   a->as.window.renderer == b->as.window.renderer;
        case VALUE_EVENT:
            // two events are never equal?
            return false;
        case VALUE_EOF:
            // all instances of EOF are the same
            return true;
    }

    return false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x182f(%rip), %r15      # 0x7c78
pushq $0x18
popq %r12
pushq $0x20
popq %r13
movl (%r14), %ecx
cmpl (%rbx), %ecx
jne 0x64e5
xorl %eax, %eax
decl %ecx
cmpl $0xd, %ecx
ja 0x64fd
movslq (%r15,%rcx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x6433
movq %r12, %rcx
jmp 0x64a5
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x6433
testb %al, %al
je 0x64e5
movq 0x18(%r14), %rdi
movq 0x18(%rbx), %rsi
callq 0x6433
movq %r13, %rcx
testb %al, %al
je 0x64e5
movq (%rbx,%rcx), %rbx
movq (%r14,%rcx), %r14
jmp 0x6451
movq 0x10(%r14), %rax
cmpq 0x10(%rbx), %rax
jmp 0x64fa
movb $0x1, %al
jmp 0x64fd
movq 0x10(%r14), %rdi
movq 0x10(%rbx), %rsi
callq 0x11f0
testl %eax, %eax
jmp 0x64fa
movl 0x10(%r14), %eax
cmpl 0x10(%rbx), %eax
jmp 0x64fa
movq 0x10(%r14), %rax
cmpq 0x10(%rbx), %rax
je 0x64f2
xorl %eax, %eax
jmp 0x64fd
movb 0x10(%r14), %al
cmpb 0x10(%rbx), %al
jmp 0x64fa
movq 0x18(%r14), %rax
cmpq 0x18(%rbx), %rax
sete %al
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
nop
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_init
void
vm_init(struct vm* vm)
{
    assert(vm != NULL);

    vm->capacity = 1024 * 1024;
    vm->heap = calloc(vm->capacity, sizeof(struct value));

    // init the allocation free list
    vm->free = &vm->heap[0];
    for (long i = 0; i < vm->capacity - 1; i++) {
        vm->heap[i].next = &vm->heap[i + 1];
    }
    vm->heap[vm->capacity - 1].next = NULL;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x6553
movq %rdi, %rbx
movq $0x100000, (%rdi)       # imm = 0x100000
pushq $0x28
popq %rsi
movl $0x100000, %edi         # imm = 0x100000
callq 0x1100
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
movq %rax, %rcx
addq $0x28, %rcx
movl $0xfffff, %edx          # imm = 0xFFFFF
subq $0x1, %rdx
jb 0x6549
movq %rcx, -0x20(%rcx)
addq $0x28, %rcx
jmp 0x6539
andq $0x0, 0x27fffe0(%rax)
popq %rbx
retq
leaq 0x1962(%rip), %rdi      # 0x7ebc
leaq 0x1966(%rip), %rsi      # 0x7ec7
leaq 0x1968(%rip), %rcx      # 0x7ed0
pushq $0x30
popq %rdx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_free
void
vm_free(struct vm* vm)
{
    assert(vm != NULL);

    vm_gc(vm, NULL);
    free(vm->heap);

    vm->capacity = 0;
    vm->heap = NULL;
    vm->free = NULL;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x6596
movq %rdi, %rbx
xorl %esi, %esi
callq 0x65b3
movq 0x8(%rbx), %rdi
callq 0x11a0
xorps %xmm0, %xmm0
movups %xmm0, (%rbx)
andq $0x0, 0x10(%rbx)
popq %rbx
retq
leaq 0x191f(%rip), %rdi      # 0x7ebc
leaq 0x1923(%rip), %rsi      # 0x7ec7
leaq 0x193f(%rip), %rcx      # 0x7eea
pushq $0x40
popq %rdx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: gc_mark
static void
gc_mark(struct vm* vm, struct value* root)
{
    if (root == NULL) return;
    if (root->gc_mark == GC_MARKED) return;

    // mark everything reachable from a given root node
    root->gc_mark = GC_MARKED;

    // recursively mark the contents of a lambda
    if (value_is_lambda(root)) {
        gc_mark(vm, root->as.lambda.params);
        gc_mark(vm, root->as.lambda.body);
        gc_mark(vm, root->as.lambda.env);
    }

    // recursively mark pairs / lists
    if (value_is_pair(root)) {
        gc_mark(vm, root->as.pair.car);
        gc_mark(vm, root->as.pair.cdr);
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
testq %rbx, %rbx
je 0x66fa
cmpl $0x1, 0x4(%rbx)
je 0x66fa
movl $0x1, 0x4(%rbx)
movl (%rbx), %eax
cmpl $0x9, %eax
jne 0x66e6
movq 0x10(%rbx), %rdi
callq 0x66ac
movq 0x18(%rbx), %rdi
callq 0x66ac
movq 0x20(%rbx), %rdi
callq 0x66ac
movl (%rbx), %eax
cmpl $0x7, %eax
jne 0x66fa
movq 0x10(%rbx), %rdi
callq 0x66ac
movq 0x18(%rbx), %rbx
jmp 0x66b0
popq %rbx
retq
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_empty_list
struct value*
vm_make_empty_list(struct vm* vm)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_EMPTY_LIST;
    return value;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x670f
callq 0x672e
movl $0x1, (%rax)
popq %rcx
retq
leaq 0x17a6(%rip), %rdi      # 0x7ebc
leaq 0x17aa(%rip), %rsi      # 0x7ec7
leaq 0x1808(%rip), %rcx      # 0x7f2c
movl $0x90, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: next_available_value
static struct value*
next_available_value(struct vm* vm)
{
    struct value* value = vm->free;
    if (value == NULL) {
        fprintf(stderr, "vm: out of memory\n");
        exit(EXIT_FAILURE);
    }

    // pull the free value out of the free list
    vm->free = value->next;
    value->next = NULL;
    return value;
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x6745
movq 0x8(%rax), %rcx
movq %rcx, 0x10(%rdi)
andq $0x0, 0x8(%rax)
retq
pushq %rax
movq 0x5893(%rip), %rax      # 0xbfe0
movq (%rax), %rcx
leaq 0x1b36(%rip), %rdi      # 0x828d
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x1260
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_boolean
struct value*
vm_make_boolean(struct vm* vm, bool boolean)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_BOOLEAN;
    value->as.boolean = boolean;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x6782
movl %esi, %ebx
callq 0x672e
movl $0x2, (%rax)
movb %bl, 0x10(%rax)
popq %rbx
retq
leaq 0x1733(%rip), %rdi      # 0x7ebc
leaq 0x1737(%rip), %rsi      # 0x7ec7
leaq 0x17c3(%rip), %rcx      # 0x7f5a
movl $0x9a, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_character
struct value*
vm_make_character(struct vm* vm, int character)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_CHARACTER;
    value->as.character = character;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x67b9
movl %esi, %ebx
callq 0x672e
movl $0x3, (%rax)
movl %ebx, 0x10(%rax)
popq %rbx
retq
leaq 0x16fc(%rip), %rdi      # 0x7ebc
leaq 0x1700(%rip), %rsi      # 0x7ec7
leaq 0x17be(%rip), %rcx      # 0x7f8c
movl $0xa5, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_number
struct value*
vm_make_number(struct vm* vm, long number)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_NUMBER;
    value->as.number = number;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x67f2
movq %rsi, %rbx
callq 0x672e
movl $0x4, (%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
leaq 0x16c3(%rip), %rdi      # 0x7ebc
leaq 0x16c7(%rip), %rsi      # 0x7ec7
leaq 0x17b7(%rip), %rcx      # 0x7fbe
movl $0xb0, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_string
struct value*
vm_make_string(struct vm* vm, const char* string)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_STRING;
    value->as.string = malloc(strlen(string) + 1);
    strcpy(value->as.string, string);
    return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6856
movq %rsi, %rbx
callq 0x672e
movq %rax, %r14
movl $0x5, (%rax)
movq %rbx, %rdi
callq 0x10c0
leaq 0x1(%rax), %rdi
callq 0x11d0
movq %rax, 0x10(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1140
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x165f(%rip), %rdi      # 0x7ebc
leaq 0x1663(%rip), %rsi      # 0x7ec7
leaq 0x1783(%rip), %rcx      # 0x7fee
movl $0xbb, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_symbol
struct value*
vm_make_symbol(struct vm* vm, const char* symbol)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_SYMBOL;
    value->as.symbol = malloc(strlen(symbol) + 1);
    strcpy(value->as.symbol, symbol);
    return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x68ba
movq %rsi, %rbx
callq 0x672e
movq %rax, %r14
movl $0x6, (%rax)
movq %rbx, %rdi
callq 0x10c0
leaq 0x1(%rax), %rdi
callq 0x11d0
movq %rax, 0x10(%r14)
movq %rax, %rdi
movq %rbx, %rsi
callq 0x1140
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x15fb(%rip), %rdi      # 0x7ebc
leaq 0x15ff(%rip), %rsi      # 0x7ec7
leaq 0x1757(%rip), %rcx      # 0x8026
movl $0xc7, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_pair
struct value*
vm_make_pair(struct vm* vm, struct value* car, struct value* cdr)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_PAIR;
    value->as.pair.car = car;
    value->as.pair.cdr = cdr;
    return value;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x6903
movq %rdx, %rbx
movq %rsi, %r14
callq 0x672e
movl $0x7, (%rax)
movq %r14, 0x10(%rax)
movq %rbx, 0x18(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
leaq 0x15b2(%rip), %rdi      # 0x7ebc
leaq 0x15b6(%rip), %rsi      # 0x7ec7
leaq 0x1746(%rip), %rcx      # 0x805e
movl $0xd3, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_builtin
struct value*
vm_make_builtin(struct vm* vm, builtin_func builtin)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_BUILTIN;
    value->as.builtin = builtin;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x693c
movq %rsi, %rbx
callq 0x672e
movl $0x8, (%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
leaq 0x1579(%rip), %rdi      # 0x7ebc
leaq 0x157d(%rip), %rsi      # 0x7ec7
leaq 0x1755(%rip), %rcx      # 0x80a6
movl $0xdf, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_lambda
struct value*
vm_make_lambda(struct vm* vm, struct value* params, struct value* body, struct value* env)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_LAMBDA;
    value->as.lambda.params = params;
    value->as.lambda.body = body;
    value->as.lambda.env = env;
    return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x698b
movq %rcx, %rbx
movq %rdx, %r14
movq %rsi, %r15
callq 0x672e
movl $0x9, (%rax)
movq %r15, 0x10(%rax)
movq %r14, 0x18(%rax)
movq %rbx, 0x20(%rax)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x152a(%rip), %rdi      # 0x7ebc
leaq 0x152e(%rip), %rsi      # 0x7ec7
leaq 0x173f(%rip), %rcx      # 0x80df
movl $0xea, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_input_port
struct value*
vm_make_input_port(struct vm* vm, FILE* port)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_INPUT_PORT;
    value->as.port = port;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x69c4
movq %rsi, %rbx
callq 0x672e
movl $0xa, (%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
leaq 0x14f1(%rip), %rdi      # 0x7ebc
leaq 0x14f5(%rip), %rsi      # 0x7ec7
leaq 0x1760(%rip), %rcx      # 0x8139
movl $0xf7, %edx
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_output_port
struct value*
vm_make_output_port(struct vm* vm, FILE* port)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_OUTPUT_PORT;
    value->as.port = port;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x69fd
movq %rsi, %rbx
callq 0x672e
movl $0xb, (%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
leaq 0x14b8(%rip), %rdi      # 0x7ebc
leaq 0x14bc(%rip), %rsi      # 0x7ec7
leaq 0x175d(%rip), %rcx      # 0x816f
movl $0x102, %edx            # imm = 0x102
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_window
struct value*
vm_make_window(struct vm* vm, const char* title, long width, long height)
{
    assert(vm != NULL);

    SDL_Window* window = SDL_CreateWindow(
        title,
        SDL_WINDOWPOS_UNDEFINED,
        SDL_WINDOWPOS_UNDEFINED,
        width,
        height,
        0);
    if (window == NULL) {
        fprintf(stderr, "failed to create SDL2 window: %s\n", SDL_GetError());
        exit(EXIT_FAILURE);
    }

    SDL_Renderer* renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);
    if (renderer == NULL) {
        fprintf(stderr, "failed to create SDL2 renderer: %s\n", SDL_GetError());
        exit(EXIT_FAILURE);
    }

    struct value* value = next_available_value(vm);
    value->type = VALUE_WINDOW;
    value->as.window.window = window;
    value->as.window.renderer = renderer;
    return value;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
testq %rdi, %rdi
je 0x6a7e
movq %rcx, %r8
movq %rdx, %rcx
movq %rdi, %rbx
movq %rsi, %rdi
movl $0x1fff0000, %esi       # imm = 0x1FFF0000
movl $0x1fff0000, %edx       # imm = 0x1FFF0000
xorl %r9d, %r9d
callq 0x1060
testq %rax, %rax
je 0x6a9d
movq %rax, %r14
pushq $-0x1
popq %rsi
pushq $0x2
popq %rdx
movq %rax, %rdi
callq 0x1040
testq %rax, %rax
je 0x6ab5
movq %rax, %r15
movq %rbx, %rdi
callq 0x672e
movl $0xc, (%rax)
movq %r14, 0x10(%rax)
movq %r15, 0x18(%rax)
popq %rbx
popq %r14
popq %r15
retq
leaq 0x1437(%rip), %rdi      # 0x7ebc
leaq 0x143b(%rip), %rsi      # 0x7ec7
leaq 0x1713(%rip), %rcx      # 0x81a6
movl $0x10d, %edx            # imm = 0x10D
callq 0x10f0
movq 0x553c(%rip), %rax      # 0xbfe0
movq (%rax), %rbx
callq 0x1110
leaq 0x1737(%rip), %rsi      # 0x81ea
jmp 0x6acb
movq 0x5524(%rip), %rax      # 0xbfe0
movq (%rax), %rbx
callq 0x1110
leaq 0x1741(%rip), %rsi      # 0x820c
movq %rbx, %rdi
movq %rax, %rdx
xorl %eax, %eax
callq 0x1220
pushq $0x1
popq %rdi
callq 0x11b0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_event
struct value*
vm_make_event(struct vm* vm, SDL_Event* event)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_EVENT;
    value->as.event = event;
    return value;
}

// Assembly:
pushq %rbx
testq %rdi, %rdi
je 0x6afa
movq %rsi, %rbx
callq 0x672e
movl $0xd, (%rax)
movq %rbx, 0x10(%rax)
popq %rbx
retq
leaq 0x13bb(%rip), %rdi      # 0x7ebc
leaq 0x13bf(%rip), %rsi      # 0x7ec7
leaq 0x1721(%rip), %rcx      # 0x8230
movl $0x12b, %edx            # imm = 0x12B
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/theandrew168[P]squeaky/src/vm.c
// Function: vm_make_eof
struct value*
vm_make_eof(struct vm* vm)
{
    assert(vm != NULL);

    struct value* value = next_available_value(vm);
    value->type = VALUE_EOF;
    return value;
}

// Assembly:
pushq %rax
testq %rdi, %rdi
je 0x6b2c
callq 0x672e
movl $0xe, (%rax)
popq %rcx
retq
leaq 0x1389(%rip), %rdi      # 0x7ebc
leaq 0x138d(%rip), %rsi      # 0x7ec7
leaq 0x1725(%rip), %rcx      # 0x8266
movl $0x136, %edx            # imm = 0x136
callq 0x10f0
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/test_threads.c
// Function: testThread
void *
testThread(void * args)
{
  int j ;
  int id = *(int*)args ;
  vl_tic() ;
  for (j = 0 ; j < 10 ; ++j) {
    printf("Thread %5d: %d\n",
      id, vl_rand_int31(vl_get_rand())) ;
    fflush(stdout) ;
  }
  printf("Thread %5d: elapsed time: %.2f s\n", id, vl_toc()) ;
  return NULL ;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl (%rdi), %ebx
callq 0x1030
pushq $0xa
popq %rbp
leaq 0xe20(%rip), %r14       # 0x2004
movq 0x2df5(%rip), %r15      # 0x3fe0
subl $0x1, %ebp
jb 0x1217
callq 0x10b0
movq %rax, %rdi
callq 0x1060
shrl %eax
movq %r14, %rdi
movl %ebx, %esi
movl %eax, %edx
xorl %eax, %eax
callq 0x1070
movq (%r15), %rdi
callq 0x1090
jmp 0x11eb
callq 0x1050
leaq 0xdf1(%rip), %rdi       # 0x2014
movl %ebx, %esi
movb $0x1, %al
callq 0x1070
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O2/zpole[P]IICV/src/test_threads.c
// Function: main
int
main(int argc VL_UNUSED, char** argv VL_UNUSED)
{
#ifndef VL_DISABLE_THREADS
#if defined(VL_THREADS_POSIX)
  vl_uindex i ;
  pthread_t threads [5] ;
  int threadIds [5] ;
  for (i = 0 ; i < sizeof(threads) / sizeof(threads[0]) ; ++i) {
    threadIds [i] = i ;
    pthread_create (threads + i, NULL, testThread, threadIds + i) ;
  }
  for (i = 0 ; i < sizeof(threads) / sizeof(threads[0]) ; ++i) {
    pthread_join (threads[i], NULL) ;
  }
#elif defined(VL_THREADS_WIN)
  int i ;
  DWORD threadIds [5] ;
  HANDLE threadHandles [5] ;
  for (i = 0 ; i < sizeof(threadHandles) / sizeof(threadHandles[0]) ; ++i) {
    threadHandles [i] = CreateThread (
      NULL, 0,
      testThread, threadIds + i,
      0, threadIds + i) ;
  }
  for (i = 0 ; i < sizeof(threadHandles) / sizeof(threadHandles[0]) ; ++i) {
    WaitForSingleObject (threadHandles[i], INFINITE);
  }
#endif
/* VL_DISABLE_THREADS */
#else
  printf("VLFeat was compiled without threading support\n") ;
#endif
  {
    char * string = vl_configuration_to_string_copy() ;
    printf("%s", string) ;
    vl_free(string) ;
  }
  return 0 ;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsp, %rbx
leaq 0x20(%rsp), %r14
xorl %r12d, %r12d
leaq -0x8a(%rip), %r15       # 0x11cc
cmpq $0x5, %r12
je 0x127c
movl %r12d, (%rbx)
movq %r14, %rdi
xorl %esi, %esi
movq %r15, %rdx
movq %rbx, %rcx
callq 0x10a0
incq %r12
addq $0x4, %rbx
addq $0x8, %r14
jmp 0x1256
xorl %ebx, %ebx
cmpq $0x5, %rbx
je 0x1295
movq 0x20(%rsp,%rbx,8), %rdi
xorl %esi, %esi
callq 0x10c0
incq %rbx
jmp 0x127e
callq 0x1040
movq %rax, %rbx
leaq 0xd92(%rip), %rdi       # 0x2036
movq %rax, %rsi
xorl %eax, %eax
callq 0x1070
movq %rbx, %rdi
callq 0x1080
xorl %eax, %eax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/Keith-S-Thompson[P]kst-time-utils/jd.c
// Function: main
int main(int argc, char **argv) {
    int modified = 0; /* use Modified Julian Date */
    for (int i = 1; i < argc; i ++) {
        if (strcmp(argv[i], "-m") == 0) {
            modified = 1;
        }
        else {
            usage_error(argv[0]);
        }
    }
    struct timeval tp;
    if (gettimeofday(&tp, NULL) != 0) {
        perror("gettimeofday");
        exit(EXIT_FAILURE);
    }
    const long double unix_time = tp.tv_sec + tp.tv_usec/1000000.0;
    const long double jd = unix_time / 86400.0 + (modified ? 40587.0 : 2440587.5);
    printf("%.9Lf\n", jd);
    return 0;
}

// Assembly:
subq $0x38, %rsp
movslq %edi, %rax
flds 0xe7b(%rip)             # 0x2004
pushq $0x1
popq %rcx
flds 0xe7a(%rip)             # 0x200c
cmpq %rax, %rcx
jge 0x1202
fstp %st(1)
movq (%rsi,%rcx,8), %rdx
cmpb $0x2d, (%rdx)
fldz
fxch %st(1)
jne 0x11c1
fstp %st(1)
cmpb $0x6d, 0x1(%rdx)
fldz
fxch %st(1)
jne 0x11c1
fstp %st(1)
incq %rcx
cmpb $0x0, 0x2(%rdx)
fld %st(0)
fxch %st(1)
je 0x1192
fstp %st(0)
fstp %st(0)
movq (%rsi), %rsi
leaq 0xe5d(%rip), %rdi       # 0x202c
xorl %eax, %eax
callq 0x1040
leaq 0xe5f(%rip), %rdi       # 0x203c
callq 0x1030
leaq 0xe76(%rip), %rdi       # 0x205f
callq 0x1030
leaq 0xe90(%rip), %rdi       # 0x2085
callq 0x1030
pushq $0x1
popq %rdi
callq 0x1070
fstp %st(0)
fstpt 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
callq 0x1050
testl %eax, %eax
jne 0x1260
cvtsi2sdq 0x28(%rsp), %xmm0
cvtsi2sdq 0x30(%rsp), %xmm1
divsd 0xde2(%rip), %xmm1      # 0x2010
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rsp)
fldl 0x10(%rsp)
fdivs 0xdc6(%rip)             # 0x2008
fldt 0x1c(%rsp)
faddp %st, %st(1)
fstpt (%rsp)
leaq 0xdd3(%rip), %rdi       # 0x2025
xorl %eax, %eax
callq 0x1040
xorl %eax, %eax
addq $0x38, %rsp
retq
leaq 0xdb1(%rip), %rdi       # 0x2018
callq 0x1060
jmp 0x11fa
// File: /workspace/github_c_makefile_star2_O2/openshmem-org[P]openshmem-examples/c/collect64.c
// Function: main
int
main(void)
{
    int i;

    shmem_init();
    npes = shmem_n_pes();
    me = shmem_my_pe();

    for (i = 0; i < DST_SIZE; i++) {
        dst[i] = -1;
    }

    for (i = 0; i < SHMEM_COLLECT_SYNC_SIZE; i += 1) {
        pSync[i] = SHMEM_SYNC_VALUE;
    }

    shmem_barrier_all();

    shmem_collect64(dst, src, me + 1, 0, 0, npes, pSync);

    shmem_barrier_all();

    show_dst("AFTER");

    shmem_finalize();

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
callq 0x10a0
callq 0x1050
movl %eax, 0x2edb(%rip)      # 0x40a0
callq 0x1080
movl %eax, 0x2ed4(%rip)      # 0x40a4
xorl %eax, %eax
leaq 0x2ed7(%rip), %rbx      # 0x40b0
cmpq $0xa0, %rax
je 0x11ec
orq $-0x1, (%rax,%rbx)
addq $0x8, %rax
jmp 0x11d9
xorl %eax, %eax
leaq 0x2f5b(%rip), %r14      # 0x4150
cmpq $0x18, %rax
je 0x1206
orq $-0x1, (%rax,%r14)
addq $0x8, %rax
jmp 0x11f5
callq 0x1090
movslq 0x2e92(%rip), %rdx      # 0x40a4
incq %rdx
movl 0x2e84(%rip), %r9d      # 0x40a0
movq %r14, (%rsp)
leaq 0x2e49(%rip), %rsi      # 0x4070
movq %rbx, %rdi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x1060
callq 0x1090
movl 0x2e65(%rip), %edx      # 0x40a4
movl 0x2e5b(%rip), %ecx      # 0x40a0
leaq 0xdbe(%rip), %rdi       # 0x200a
leaq 0xdb1(%rip), %rsi       # 0x2004
xorl %eax, %eax
callq 0x1030
leaq 0xdbb(%rip), %r14       # 0x201c
xorl %r15d, %r15d
cmpq $0xa0, %r15
je 0x1281
movq (%r15,%rbx), %rsi
movq %r14, %rdi
xorl %eax, %eax
callq 0x1030
addq $0x8, %r15
jmp 0x1264
pushq $0xa
popq %rdi
callq 0x1040
callq 0x1070
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_c_makefile_star2_O2/salextpuru[P]speccy-toochain/src/zmakebas/zmakebas.c
// Function: getopt
int getopt(int argc,char *argv[],char *optstring)
{
char *ptr;

/* check for end of arg list */
if(optind==argc || *(argv[optind])!='-' || strlen(argv[optind])<=1)
  return(-1);

if((ptr=strchr(optstring,argv[optind][optpos]))==NULL)
  return('?');		/* error: unknown option */
else
  {
  optopt=*ptr;
  if(ptr[1]==':')
    {
    if(optind==argc-1) return(':');	/* error: missing option */
    optarg=argv[optind+1];
    optpos=1;
    optind+=2;
    return(optopt);	/* return early, avoiding the normal increment */
    }
  }

/* now increment position ready for next time.
 * no checking is done for the end of args yet - this is done on
 * the next call.
 */
optpos++;
if(optpos>=strlen(argv[optind]))
  {
  optpos=1;
  optind++;
  }

return(optopt);		/* return the found option */
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movslq 0x53fa(%rip), %r13      # 0x86e8
pushq $-0x1
popq %rbx
cmpl %edi, %r13d
je 0x339a
movq %rsi, %r14
movq (%rsi,%r13,8), %r15
cmpb $0x2d, (%r15)
jne 0x339a
movq %rdx, %r12
movl %edi, %ebp
movq %r15, %rdi
callq 0x3080
cmpq $0x2, %rax
jb 0x339a
movslq 0x53c7(%rip), %rbx      # 0x86ec
movsbl (%r15,%rbx), %esi
movq %r12, %rdi
callq 0x3070
testq %rax, %rax
je 0x3354
movq %rbx, %rcx
movsbl (%rax), %ebx
movl %ebx, 0x53c5(%rip)      # 0x8708
cmpb $0x3a, 0x1(%rax)
jne 0x3359
decl %ebp
cmpl %ebp, %r13d
jne 0x3377
pushq $0x3a
jmp 0x3356
pushq $0x3f
popq %rbx
jmp 0x339a
movq %rcx, %r14
incq %r14
movl %r14d, 0x5386(%rip)     # 0x86ec
movq %r15, %rdi
callq 0x3080
cmpq %r14, %rax
ja 0x339a
pushq $0x1
jmp 0x3385
movq 0x8(%r14,%r13,8), %rax
movq %rax, 0x538d(%rip)      # 0x8710
pushq $0x2
popq %rax
movl $0x1, 0x535c(%rip)      # 0x86ec
addl %eax, %r13d
movl %r13d, 0x534e(%rip)     # 0x86e8
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq