LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: read_u8
static Result read_u8(Vm* vm, uint8_t* byte) {
    assert(vm->frame_len > 0);
    CallFrame* const frame = &vm->frames[vm->frame_len - 1];
    assert(frame->ip <=
           frame->fn->chunk.opcodes + buf_size(frame->fn->chunk.opcodes));

    *byte = *frame->ip++;

    return RES_OK;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rsp), %rax
movsbl 0x40618(%rax), %eax
cmpl $0x0, %eax
jle 0x70c1
jmp 0x70e0
leaq 0x6018(%rip), %rdi      # 0xd0e0
leaq 0x6023(%rip), %rsi      # 0xd0f2
movl $0x90, %edx
leaq 0x62aa(%rip), %rcx      # 0xd385
callq 0x10e0
movq 0x30(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x30(%rsp), %rcx
movsbl 0x40618(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x20(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, 0x18(%rax)
je 0x714e
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq 0x18(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, 0x8(%rsp)
jmp 0x7157
xorl %eax, %eax
movq %rax, 0x8(%rsp)
jmp 0x7157
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
movq 0x8(%rsp), %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x7170
jmp 0x718f
leaq 0x622e(%rip), %rdi      # 0xd3a5
leaq 0x5f74(%rip), %rsi      # 0xd0f2
movl $0x93, %edx
leaq 0x61fb(%rip), %rcx      # 0xd385
callq 0x10e0
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, 0x8(%rcx)
movb (%rax), %cl
movq 0x28(%rsp), %rax
movb %cl, (%rax)
xorl %eax, %eax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: get_location
static const Location* get_location(const Vm* vm) {
    assert(vm->frame_len > 0);
    const CallFrame* const frame = &vm->frames[vm->frame_len - 1];

    return &frame->fn->chunk
                .locations[frame->ip - frame->fn->chunk.opcodes - 1];
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rax
movsbl 0x40618(%rax), %eax
cmpl $0x0, %eax
jle 0x71dc
jmp 0x71fb
leaq 0x5efd(%rip), %rdi      # 0xd0e0
leaq 0x5f08(%rip), %rsi      # 0xd0f2
movl $0x36, %edx
leaq 0x61fa(%rip), %rcx      # 0xd3f0
callq 0x10e0
movq 0x10(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x10(%rsp), %rcx
movsbl 0x40618(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq 0x8(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq 0x18(%rdx), %rdx
subq %rdx, %rcx
subq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
addq $0x18, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: read_constant
static Result read_constant(Vm* vm, Value* v) {
    assert(vm->frame_len > 0);
    const CallFrame* const frame = &vm->frames[vm->frame_len - 1];

    uint8_t value_index = 0;
    RETURN_IF_ERR(read_u8(vm, &value_index));
    LOG("constant index=%d constants size=%zu\n", value_index,
        buf_size(frame->fn->chunk.constants));
    assert(value_index < buf_size(frame->fn->chunk.constants));
    *v = frame->fn->chunk.constants[value_index];

    return RES_OK;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x28(%rsp)
movq %rsi, 0x20(%rsp)
movq 0x28(%rsp), %rax
movsbl 0x40618(%rax), %eax
cmpl $0x0, %eax
jle 0x7281
jmp 0x72a0
leaq 0x5e58(%rip), %rdi      # 0xd0e0
leaq 0x5e63(%rip), %rsi      # 0xd0f2
movl $0x9b, %edx
leaq 0x617e(%rip), %rcx      # 0xd419
callq 0x10e0
movq 0x28(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x28(%rsp), %rcx
movsbl 0x40618(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x18(%rsp)
movb $0x0, 0x17(%rsp)
movq 0x28(%rsp), %rdi
leaq 0x17(%rsp), %rsi
callq 0x70a0
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
je 0x72f5
movl 0x10(%rsp), %eax
movl %eax, 0x34(%rsp)
jmp 0x7394
jmp 0x72f7
jmp 0x72f9
jmp 0x72fb
movzbl 0x17(%rsp), %eax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq (%rax), %rax
cmpq $0x0, 0x28(%rax)
je 0x732a
movq 0x18(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rax), %rax
movq -0x8(%rax), %rax
movq %rax, (%rsp)
jmp 0x7332
xorl %eax, %eax
movq %rax, (%rsp)
jmp 0x7332
movq 0x8(%rsp), %rax
movq (%rsp), %rcx
cmpq %rcx, %rax
jae 0x7342
jmp 0x7361
leaq 0x60f4(%rip), %rdi      # 0xd43d
leaq 0x5da2(%rip), %rsi      # 0xd0f2
movl $0xa2, %edx
leaq 0x60bd(%rip), %rcx      # 0xd419
callq 0x10e0
movq 0x20(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movq 0x28(%rcx), %rcx
movzbl 0x17(%rsp), %edx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: read_u16
static Result read_u16(Vm* vm, uint16_t* u16) {
    uint8_t b1 = 0;
    RETURN_IF_ERR(read_u8(vm, &b1));

    uint8_t b2 = 0;
    RETURN_IF_ERR(read_u8(vm, &b2));

    *u16 = (uint16_t)(b1 << (uint8_t)8) | b2;
    return RES_OK;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movb $0x0, 0xf(%rsp)
movq 0x18(%rsp), %rdi
leaq 0xf(%rsp), %rsi
callq 0x70a0
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
je 0x73d7
movl 0x8(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x7426
jmp 0x73d9
movb $0x0, 0x7(%rsp)
movq 0x18(%rsp), %rdi
leaq 0x7(%rsp), %rsi
callq 0x70a0
movl %eax, (%rsp)
cmpl $0x0, (%rsp)
je 0x73ff
movl (%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x7426
jmp 0x7401
movzbl 0xf(%rsp), %eax
shll $0x8, %eax
movzwl %ax, %eax
movzbl 0x7(%rsp), %ecx
orl %ecx, %eax
movw %ax, %cx
movq 0x10(%rsp), %rax
movw %cx, (%rax)
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: stack_pop
static Result stack_pop(Vm* vm, Value* v) {
    assert(stack_len(vm) > 0);

    vm->stack_top--;
    *v = *vm->stack_top;
    LOG("popped %s%s\n", "", value_to_str_debug(*v));

    return RES_OK;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq %rsi, 0x8(%rsp)
movq 0x10(%rsp), %rdi
callq 0xa7e0
cmpq $0x0, %rax
jbe 0x9500
jmp 0x951f
leaq 0x3f69(%rip), %rdi      # 0xd470
leaq 0x3be4(%rip), %rsi      # 0xd0f2
movl $0x86, %edx
leaq 0x3f68(%rip), %rcx      # 0xd482
callq 0x10e0
movq 0x10(%rsp), %rax
movq 0x40000(%rax), %rcx
addq $-0x10, %rcx
movq %rcx, 0x40000(%rax)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
movq 0x40000(%rcx), %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x9557
xorl %eax, %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: stack_push
static Result stack_push(Vm* vm, Value v) {
    assert(stack_len(vm) < STACK_MAX - 1);

    *vm->stack_top = v;
    vm->stack_top++;

    LOG("push stack=%s\n", value_to_str_debug(v));

    return RES_OK;
}

// Assembly:
subq $0x18, %rsp
movl %esi, 0x8(%rsp)
movq %rdx, 0x10(%rsp)
movq %rdi, (%rsp)
movq (%rsp), %rdi
callq 0xa7e0
cmpq $0x3fff, %rax           # imm = 0x3FFF
jae 0x9584
jmp 0x95a3
leaq 0x3f17(%rip), %rdi      # 0xd4a2
leaq 0x3b60(%rip), %rsi      # 0xd0f2
movl $0x6f, %edx
leaq 0x3f22(%rip), %rcx      # 0xd4c0
callq 0x10e0
movq (%rsp), %rax
movq 0x40000(%rax), %rax
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rax)
movq (%rsp), %rax
movq 0x40000(%rax), %rcx
addq $0x10, %rcx
movq %rcx, 0x40000(%rax)
jmp 0x95d7
xorl %eax, %eax
addq $0x18, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: stack_trace_print
static void stack_trace_print(const Vm* vm) {
    assert(vm->frame_len > 0);

    for (int i = vm->frame_len - 1; i > 0; i--) {
        const CallFrame* const frame = &vm->frames[i];

        const Location* const loc =
            &frame->fn->chunk
                 .locations[frame->ip - frame->fn->chunk.opcodes - 1];
        fprintf(stderr, "%zu:%zu: in %.*s()\n", loc->line, loc->column,
                (int)frame->fn->name_len, frame->fn->name);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movsbl 0x40618(%rax), %eax
cmpl $0x0, %eax
jle 0x95fc
jmp 0x961b
leaq 0x3add(%rip), %rdi      # 0xd0e0
leaq 0x3ae8(%rip), %rsi      # 0xd0f2
movl $0x4f, %edx
leaq 0x3ec9(%rip), %rcx      # 0xd4df
callq 0x10e0
movq 0x20(%rsp), %rax
movsbl 0x40618(%rax), %eax
subl $0x1, %eax
movl %eax, 0x1c(%rsp)
cmpl $0x0, 0x1c(%rsp)
jle 0x96dd
movq 0x20(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movslq 0x1c(%rsp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x20(%rax), %rax
movq 0x10(%rsp), %rcx
movq 0x8(%rcx), %rcx
movq 0x10(%rsp), %rdx
movq (%rdx), %rdx
movq 0x18(%rdx), %rdx
subq %rdx, %rcx
subq $0x1, %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, 0x8(%rsp)
movq 0x6960(%rip), %rax      # 0xfff0
movq (%rax), %rdi
movq 0x8(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rsp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movl %eax, %r8d
movq 0x10(%rsp), %rax
movq (%rax), %r9
addq $0x38, %r9
leaq 0x3e3c(%rip), %rsi      # 0xd502
movb $0x0, %al
callq 0x1140
movl 0x1c(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x962e
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: str_cat
static void str_cat(Vm* vm, Value lhs, Value rhs, Value* res) {
    assert(IS_STRING(lhs));
    assert(IS_STRING(rhs));

    const char* const lhs_s = AS_CSTRING(lhs);
    const size_t lhs_len = AS_STRING(lhs)->len;
    const char* const rhs_s = AS_CSTRING(rhs);
    const size_t rhs_len = AS_STRING(rhs)->len;

    ObjString* const os = value_make_string(&vm->objects, lhs_len + rhs_len);

    memcpy(os->s, lhs_s, lhs_len);
    memcpy(os->s + lhs_len, rhs_s, rhs_len);

    *res = OBJ_VAL(os);
}

// Assembly:
subq $0x68, %rsp
movl %esi, 0x58(%rsp)
movq %rdx, 0x60(%rsp)
movl %ecx, 0x48(%rsp)
movq %r8, 0x50(%rsp)
movq %rdi, 0x40(%rsp)
movq %r9, 0x38(%rsp)
movl 0x58(%rsp), %edi
movq 0x60(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x9726
jmp 0x9728
jmp 0x9747
leaq 0x3de7(%rip), %rdi      # 0xd516
leaq 0x39bc(%rip), %rsi      # 0xd0f2
movl $0x3e, %edx
leaq 0x3de3(%rip), %rcx      # 0xd525
callq 0x10e0
movl 0x48(%rsp), %edi
movq 0x50(%rsp), %rsi
xorl %edx, %edx
callq 0x66f0
testb $0x1, %al
jne 0x975d
jmp 0x975f
jmp 0x977e
leaq 0x3de9(%rip), %rdi      # 0xd54f
leaq 0x3985(%rip), %rsi      # 0xd0f2
movl $0x3f, %edx
leaq 0x3dac(%rip), %rcx      # 0xd525
callq 0x10e0
movq 0x60(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x30(%rsp)
movq 0x60(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x50(%rsp), %rax
addq $0x18, %rax
movq %rax, 0x20(%rsp)
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rdi
addq $0x40008, %rdi          # imm = 0x40008
movq 0x28(%rsp), %rsi
addq 0x18(%rsp), %rsi
callq 0x6730
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x1160
movq 0x10(%rsp), %rdi
addq $0x18, %rdi
addq 0x28(%rsp), %rdi
movq 0x20(%rsp), %rsi
movq 0x18(%rsp), %rdx
callq 0x1160
movq 0x38(%rsp), %rax
movl $0x3, (%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, 0x8(%rsp)
movq (%rsp), %rcx
movq %rcx, (%rax)
movq 0x8(%rsp), %rcx
movq %rcx, 0x8(%rax)
addq $0x68, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: stack_peek_from_top_at
static Result stack_peek_from_top_at(const Vm* vm, Value* v,
                                     intmax_t distance) {
    assert(stack_len(vm) < STACK_MAX - 1);
    assert((size_t)distance < stack_len(vm));

    *v = vm->stack_top[-1 - distance];

    LOG("peek stack distance=%jd v=%s\n", distance, value_to_str_debug(*v));

    return RES_OK;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq 0x20(%rsp), %rdi
callq 0xa7e0
cmpq $0x3fff, %rax           # imm = 0x3FFF
jae 0x9867
jmp 0x9886
leaq 0x3c34(%rip), %rdi      # 0xd4a2
leaq 0x387d(%rip), %rsi      # 0xd0f2
movl $0x7b, %edx
leaq 0x3cdd(%rip), %rcx      # 0xd55e
callq 0x10e0
movq 0x10(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x20(%rsp), %rdi
callq 0xa7e0
movq %rax, %rcx
movq 0x8(%rsp), %rax
cmpq %rcx, %rax
jae 0x98a9
jmp 0x98c8
leaq 0x3ceb(%rip), %rdi      # 0xd59b
leaq 0x383b(%rip), %rsi      # 0xd0f2
movl $0x7c, %edx
leaq 0x3c9b(%rip), %rcx      # 0xd55e
callq 0x10e0
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
movq 0x40000(%rcx), %rcx
movq $-0x1, %rdx
subq 0x10(%rsp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rcx
movq %rcx, 0x8(%rax)
jmp 0x98fc
xorl %eax, %eax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: vm_interpret
Result vm_interpret(char* source, size_t source_len,
                    Result (*bytecode_fn)(Vm*)) {
    Vm vm = {.globals = ht_init(UINT8_MAX, NULL)};
    vm.stack_top = vm.stack;

    fn_define_native(&vm, "clock", fn_native_clock);
    fn_define_native(&vm, "readLine", fn_native_read_line);
    fn_define_native(&vm, "parseNumber", fn_native_parse_number);

    Result result = RES_OK;

    ObjFunction* fn = NULL;
    if ((result = parser_compile(source, source_len, &fn, &vm)) != RES_OK) {
        return result;
    }

    LOG("parsing successful%s\n", "");

    stack_push(&vm, OBJ_VAL(fn));

    fn_call(&vm, fn, 0);
    result = bytecode_fn(&vm);

    return result;
}

// Assembly:
subq $0x40668, %rsp          # imm = 0x40668
movq %rdi, 0x40658(%rsp)
movq %rsi, 0x40650(%rsp)
movq %rdx, 0x40648(%rsp)
leaq 0x28(%rsp), %rdi
xorl %esi, %esi
movl $0x40620, %edx          # imm = 0x40620
callq 0x10f0
movl $0xff, %edi
xorl %eax, %eax
movl %eax, %esi
callq 0x1300
movq %rax, 0x40038(%rsp)
leaq 0x28(%rsp), %rax
movq %rax, 0x40028(%rsp)
leaq 0x28(%rsp), %rdi
leaq 0x377a(%rip), %rsi      # 0xd339
leaq 0x28a(%rip), %rdx       # 0x9e50
callq 0x9cb0
leaq 0x28(%rsp), %rdi
leaq 0x3768(%rip), %rsi      # 0xd33f
leaq 0x382(%rip), %rdx       # 0x9f60
callq 0x9cb0
leaq 0x28(%rsp), %rdi
leaq 0x3759(%rip), %rsi      # 0xd348
leaq 0x54a(%rip), %rdx       # 0xa140
callq 0x9cb0
movl $0x0, 0x24(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x40658(%rsp), %rdi
movq 0x40650(%rsp), %rsi
leaq 0x18(%rsp), %rdx
leaq 0x28(%rsp), %rcx
callq 0x2cd0
movl %eax, 0x24(%rsp)
cmpl $0x0, %eax
je 0x9c41
movl 0x24(%rsp), %eax
movl %eax, 0x40664(%rsp)
jmp 0x9c96
jmp 0x9c43
jmp 0x9c45
movl $0x3, 0x8(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x10(%rsp)
movl 0x8(%rsp), %esi
movq 0x10(%rsp), %rdx
leaq 0x28(%rsp), %rdi
callq 0x9560
movq 0x18(%rsp), %rsi
leaq 0x28(%rsp), %rdi
xorl %edx, %edx
callq 0xa420
leaq 0x28(%rsp), %rdi
callq *0x40648(%rsp)
movl %eax, 0x24(%rsp)
movl 0x24(%rsp), %eax
movl %eax, 0x40664(%rsp)
movl 0x40664(%rsp), %eax
addq $0x40668, %rsp          # imm = 0x40668
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: fn_define_native
static Result fn_define_native(Vm* vm, char name[], NativeFn fn) {
    const size_t name_len = strlen(name);
    ObjString* const os = value_make_string(&vm->objects, name_len);
    memcpy(os->s, name, name_len);
    RETURN_IF_ERR(stack_push(vm, OBJ_VAL(os)));

    RETURN_IF_ERR(stack_push(vm, OBJ_VAL(value_make_fn_native(fn))));
    Value* v = vm->stack_top - 1;

    ht_insert(vm->globals, name, name_len, v, sizeof(*v));

    Value dummy;
    RETURN_IF_ERR(stack_pop(vm, &dummy));
    RETURN_IF_ERR(stack_pop(vm, &dummy));

    return RES_OK;
}

// Assembly:
subq $0x88, %rsp
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movq %rdx, 0x68(%rsp)
movq 0x70(%rsp), %rdi
callq 0x1090
movq %rax, 0x60(%rsp)
movq 0x78(%rsp), %rdi
addq $0x40008, %rdi          # imm = 0x40008
movq 0x60(%rsp), %rsi
callq 0x6730
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
addq $0x18, %rdi
movq 0x70(%rsp), %rsi
movq 0x60(%rsp), %rdx
callq 0x1160
movq 0x78(%rsp), %rdi
movl $0x3, 0x40(%rsp)
movq 0x58(%rsp), %rax
movq %rax, 0x48(%rsp)
movl 0x40(%rsp), %esi
movq 0x48(%rsp), %rdx
callq 0x9560
movl %eax, 0x54(%rsp)
cmpl $0x0, 0x54(%rsp)
je 0x9d48
movl 0x54(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x9e35
jmp 0x9d4a
jmp 0x9d4c
movq 0x78(%rsp), %rax
movq %rax, (%rsp)
movl $0x3, 0x28(%rsp)
movq 0x68(%rsp), %rdi
callq 0x68a0
movq (%rsp), %rdi
movq %rax, 0x30(%rsp)
movl 0x28(%rsp), %esi
movq 0x30(%rsp), %rdx
callq 0x9560
movl %eax, 0x3c(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x9d99
movl 0x3c(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x9e35
jmp 0x9d9b
movq 0x78(%rsp), %rax
movq 0x40000(%rax), %rax
addq $-0x10, %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rax
movq 0x40010(%rax), %rdi
movq 0x70(%rsp), %rsi
movq 0x60(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl $0x10, %r8d
callq 0x1510
movq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x94e0
movl %eax, 0xc(%rsp)
cmpl $0x0, 0xc(%rsp)
je 0x9dfd
movl 0xc(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x9e35
jmp 0x9dff
jmp 0x9e01
movq 0x78(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x94e0
movl %eax, 0x8(%rsp)
cmpl $0x0, 0x8(%rsp)
je 0x9e28
movl 0x8(%rsp), %eax
movl %eax, 0x84(%rsp)
jmp 0x9e35
jmp 0x9e2a
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: fn_native_clock
static Result fn_native_clock(Vm* vm, Value* args, uint8_t args_len,
                              Value* ret) {
    (void)args;
    if (args_len > 0) {
        VM_ERROR(vm, get_location(vm),
                 "Wrong arity in function call: expected 0, got: %d", args_len);
    }

    struct timeval tp = {0};
    gettimeofday(&tp, NULL);

    *ret = NUMBER_VAL(tp.tv_sec * 1000 + tp.tv_usec / 1000);

    return RES_OK;
}

// Assembly:
subq $0x68, %rsp
movb %dl, %al
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movb %al, 0x4f(%rsp)
movq %rcx, 0x40(%rsp)
movzbl 0x4f(%rsp), %eax
cmpl $0x0, %eax
jle 0x9ed6
jmp 0x9e75
movq 0x6174(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x58(%rsp), %rdi
callq 0x71c0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rdi
callq 0x71c0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x8(%rax), %rcx
movzbl 0x4f(%rsp), %r8d
leaq 0x3737(%rip), %rsi      # 0xd5f2
movb $0x0, %al
callq 0x1140
movq 0x58(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x64(%rsp)
jmp 0x9f4e
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x10f0
leaq 0x30(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x10d0
movq 0x40(%rsp), %rax
movq %rax, 0x8(%rsp)
movl $0x2, 0x20(%rsp)
imulq $0x3e8, 0x30(%rsp), %rcx # imm = 0x3E8
movq 0x38(%rsp), %rax
movl $0x3e8, %esi            # imm = 0x3E8
cqto
idivq %rsi
movq %rax, %rdx
movq 0x8(%rsp), %rax
addq %rdx, %rcx
cvtsi2sd %rcx, %xmm0
movsd %xmm0, 0x28(%rsp)
movq 0x20(%rsp), %rcx
movq %rcx, (%rax)
movq 0x28(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: fn_native_read_line
static Result fn_native_read_line(Vm* vm, Value* args, uint8_t args_len,
                                  Value* ret) {
    (void)args;
    if (args_len > 0) {
        VM_ERROR(vm, get_location(vm),
                 "Wrong arity in function call: expected 0, got: %d", args_len);
    }

    char* source = NULL;
    ssize_t source_len = 0;
    size_t line_cap = UINT32_MAX;

    if ((source_len = getline(&source, &line_cap, stdin)) <= 0) {
        VM_ERROR(vm, get_location(vm),
                 "Could not read from stdin: errno=%s error=%d\n",
                 strerror(errno), errno);
    }

    ObjString* const os =
        value_make_string(&vm->objects, (size_t)source_len - 1);
    memcpy(os->s, source, (size_t)(source_len - 1));  // Trim trailing newline
    *ret = OBJ_VAL(os);

    return RES_OK;
}

// Assembly:
subq $0x88, %rsp
movb %dl, %al
movq %rdi, 0x78(%rsp)
movq %rsi, 0x70(%rsp)
movb %al, 0x6f(%rsp)
movq %rcx, 0x60(%rsp)
movzbl 0x6f(%rsp), %eax
cmpl $0x0, %eax
jle 0x9fef
jmp 0x9f88
movq 0x6061(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x20(%rsp)
movq 0x78(%rsp), %rdi
callq 0x71c0
movq (%rax), %rax
movq %rax, 0x28(%rsp)
movq 0x78(%rsp), %rdi
callq 0x71c0
movq 0x20(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x8(%rax), %rcx
movzbl 0x6f(%rsp), %r8d
leaq 0x3624(%rip), %rsi      # 0xd5f2
movb $0x0, %al
callq 0x1140
movq 0x78(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x84(%rsp)
jmp 0xa127
movq $0x0, 0x58(%rsp)
movq $0x0, 0x50(%rsp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x48(%rsp)
movq 0x5fbe(%rip), %rax      # 0xffd0
movq (%rax), %rdx
leaq 0x58(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0x11c0
movq %rax, 0x50(%rsp)
cmpq $0x0, %rax
jg 0xa0b9
jmp 0xa035
movq 0x5fb4(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x78(%rsp), %rdi
callq 0x71c0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x78(%rsp), %rdi
callq 0x71c0
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
callq 0x1050
movl (%rax), %edi
callq 0x11e0
movq %rax, 0x18(%rsp)
callq 0x1050
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq 0x10(%rsp), %rcx
movq 0x18(%rsp), %r8
movl (%rax), %r9d
leaq 0x3592(%rip), %rsi      # 0xd62d
movb $0x0, %al
callq 0x1140
movq 0x78(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x84(%rsp)
jmp 0xa127
movq 0x78(%rsp), %rdi
addq $0x40008, %rdi          # imm = 0x40008
movq 0x50(%rsp), %rsi
subq $0x1, %rsi
callq 0x6730
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rdi
addq $0x18, %rdi
movq 0x58(%rsp), %rsi
movq 0x50(%rsp), %rdx
subq $0x1, %rdx
callq 0x1160
movq 0x60(%rsp), %rax
movl $0x3, 0x30(%rsp)
movq 0x40(%rsp), %rcx
movq %rcx, 0x38(%rsp)
movq 0x30(%rsp), %rcx
movq %rcx, (%rax)
movq 0x38(%rsp), %rcx
movq %rcx, 0x8(%rax)
movl $0x0, 0x84(%rsp)
movl 0x84(%rsp), %eax
addq $0x88, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/gaultier[P]lox-c/vm.c
// Function: fn_call
static Result fn_call(Vm* vm, ObjFunction* fn, uint8_t arg_count) {
    if (fn->arity != arg_count) {
        VM_ERROR(vm, get_location(vm),
                 "Wrong arity in function call: expected %d, got: %d",
                 fn->arity, arg_count);
    }

    if ((vm->frame_len + 1) == FRAMES_MAX) {
        VM_ERROR(vm, get_location(vm), "Reached maximum number of frames: %d",
                 FRAMES_MAX);
    }

    CallFrame* frame = &vm->frames[vm->frame_len++];

    LOG("frames=%d\n", vm->frame_len);
    frame->fn = fn;

    frame->ip = fn->chunk.opcodes;
    frame->slots = vm->stack_top - arg_count - 1;

    return RES_OK;
}

// Assembly:
subq $0x48, %rsp
movb %dl, %al
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movb %al, 0x2f(%rsp)
movq 0x30(%rsp), %rax
movzbl 0x10(%rax), %eax
movzbl 0x2f(%rsp), %ecx
cmpl %ecx, %eax
je 0xa4b6
jmp 0xa448
movq 0x5ba1(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
callq 0x71c0
movq (%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x71c0
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x8(%rax), %rcx
movq 0x30(%rsp), %rax
movzbl 0x10(%rax), %r8d
movzbl 0x2f(%rsp), %r9d
leaq 0x326b(%rip), %rsi      # 0xd703
movb $0x0, %al
callq 0x1140
movq 0x38(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x44(%rsp)
jmp 0xa5b8
movq 0x38(%rsp), %rax
movsbl 0x40618(%rax), %eax
addl $0x1, %eax
cmpl $0x40, %eax
jne 0xa52e
jmp 0xa4cc
movq 0x5b1d(%rip), %rax      # 0xfff0
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x38(%rsp), %rdi
callq 0x71c0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rdi
callq 0x71c0
movq (%rsp), %rdi
movq 0x8(%rsp), %rdx
movq 0x8(%rax), %rcx
leaq 0x3235(%rip), %rsi      # 0xd73f
movl $0x40, %r8d
movb $0x0, %al
callq 0x1140
movq 0x38(%rsp), %rdi
callq 0x95e0
movl $0x2, 0x44(%rsp)
jmp 0xa5b8
movq 0x38(%rsp), %rax
addq $0x40018, %rax          # imm = 0x40018
movq 0x38(%rsp), %rdx
movb 0x40618(%rdx), %cl
movb %cl, %sil
addb $0x1, %sil
movb %sil, 0x40618(%rdx)
movsbq %cl, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, 0x20(%rsp)
jmp 0xa564
movq 0x30(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x30(%rsp), %rax
movq 0x18(%rax), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x38(%rsp), %rax
movq 0x40000(%rax), %rcx
movzbl 0x2f(%rsp), %eax
movslq %eax, %rdx
xorl %eax, %eax
subq %rdx, %rax
shlq $0x4, %rax
addq %rax, %rcx
addq $-0x10, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movl $0x0, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/main.c
// Function: args_next_fname
char *args_next_fname(bool pop)
{
	char *fname = remaining_fnames ? *remaining_fnames : NULL;
	if(pop && fname)
		remaining_fnames++;
	return fname;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
cmpq $0x0, 0x17d5c(%rip)     # 0x1c3c0
je 0x4676
movq 0x17d53(%rip), %rax     # 0x1c3c0
movq (%rax), %rax
movq %rax, -0x18(%rbp)
jmp 0x467e
xorl %eax, %eax
movq %rax, -0x18(%rbp)
jmp 0x467e
movq -0x18(%rbp), %rax
movq %rax, -0x10(%rbp)
testb $0x1, -0x1(%rbp)
je 0x46a5
cmpq $0x0, -0x10(%rbp)
je 0x46a5
movq 0x17d26(%rip), %rax     # 0x1c3c0
addq $0x8, %rax
movq %rax, 0x17d1b(%rip)     # 0x1c3c0
movq -0x10(%rbp), %rax
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/main.c
// Function: main
int main(int argc, char **argv)
{
	int i;
	unsigned offset = 0;
	enum init_args initargs = INIT_NONE;

	for(i = 1; i < argc; i++){
		if(!strcmp(argv[i], "-O")){
			initargs = INIT_VALL;
		}else if(!strcmp(argv[i], "-o")){
			initargs = INIT_HALL;
		}else if(*argv[i] == '+'){
			char *p = argv[i] + 1;

			while(isdigit(*p))
				p++;

			if(*p == '\0' && sscanf(argv[i]+1, "%u", &offset) == 1){
				/* continue */
				if(offset > 0)
					offset--; /* 1-base -> 0-base */
			}else{
				break;
			}
		}else{
			break;
		}
	}
	remaining_fnames = argv + i;

	ui_init(); /* must be before buffers_init() */

	tabs_init(initargs, offset);

	int r = ui_main();
	ui_term();

	tabs_term();

	return r;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x47f1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1090a(%rip), %rsi     # 0x15004
callq 0x42d0
cmpl $0x0, %eax
jne 0x4710
movl $0x1, -0x1c(%rbp)
jmp 0x47e1
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x108e4(%rip), %rsi     # 0x15007
callq 0x42d0
cmpl $0x0, %eax
jne 0x4739
movl $0x2, -0x1c(%rbp)
jmp 0x47df
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movsbl (%rax), %eax
cmpl $0x2b, %eax
jne 0x47db
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
callq 0x4530
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4793
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x4765
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0x47d7
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
addq $0x1, %rdi
leaq 0x10854(%rip), %rsi     # 0x1500a
leaq -0x18(%rbp), %rdx
movb $0x0, %al
callq 0x43d0
cmpl $0x1, %eax
jne 0x47d7
cmpl $0x0, -0x18(%rbp)
jbe 0x47d5
movl -0x18(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x47d9
jmp 0x47f1
jmp 0x47dd
jmp 0x47f1
jmp 0x47df
jmp 0x47e1
jmp 0x47e3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x46db
movq -0x10(%rbp), %rax
movslq -0x14(%rbp), %rcx
shlq $0x3, %rcx
addq %rcx, %rax
movq %rax, 0x17bb9(%rip)     # 0x1c3c0
callq 0x52d0
movl -0x1c(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0x13f90
callq 0x5670
movl %eax, -0x2c(%rbp)
callq 0x5890
callq 0x14210
movl -0x2c(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ncurses.c
// Function: nc_status
void nc_status(const char *fmt, int right)
{
	scrollok(stdscr, 0);

	int x = 0;
	if(right)
		x = COLS / 2;

	move(LINES - 1, x);
	clrtoeol();
	addstr(fmt);

	scrollok(stdscr, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq 0x17522(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
xorl %esi, %esi
callq 0x40b0
movl $0x0, -0x10(%rbp)
cmpl $0x0, -0xc(%rbp)
je 0x4ab1
movq 0x1752c(%rip), %rax     # 0x1bfd0
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x10(%rbp)
movq 0x174f0(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movq 0x17516(%rip), %rax     # 0x1bfd8
movl (%rax), %esi
subl $0x1, %esi
movl -0x10(%rbp), %edx
callq 0x4460
movq 0x174d2(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
callq 0x4470
movq 0x174c3(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movq -0x8(%rbp), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x44f0
movq 0x174ab(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movl $0x1, %esi
callq 0x40b0
addq $0x10, %rsp
popq %rbp
retq
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ncurses.c
// Function: nc_charlen
int nc_charlen(int ch)
{
	int l = 1;
	switch(ch){
		case '\r':
			l++; /* ^M */
			break;
		case '\t':
			break;
		default:
			if(!isprint(ch))
				l++; /* ^X */
	}
	return l;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x1, -0x8(%rbp)
movl -0x4(%rbp), %eax
movl %eax, -0xc(%rbp)
subl $0x9, %eax
je 0x4bf4
jmp 0x4bdf
movl -0xc(%rbp), %eax
subl $0xd, %eax
jne 0x4bf6
jmp 0x4be9
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x4c1b
jmp 0x4c1b
callq 0x4530
movq (%rax), %rax
movslq -0x4(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
jne 0x4c19
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x4c1b
movl -0x8(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ncurses.c
// Function: nc_getch
int nc_getch(bool mapraw, bool *wasraw)
{
	/* TODO: interrupts, winch */
	bool ctrl_v = false;
	int ch;
restart:
	errno = 0;
	ch = getch();
	if(ch < 0 && errno == EINTR)
		goto restart;

	if(ctrl_v)
		return ch;

	if(ch == CTRL_AND('z')){
		raise(SIGTSTP);
		goto restart;
	}
	if(mapraw){
		if(ch == '\r'){
			ch = '\n';
		}else if(ch == CTRL_AND('v')){
			if(wasraw)
				*wasraw = true;
			ctrl_v = true;
			goto restart;
		}
		if(wasraw)
			*wasraw = false;
	}
	return ch;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x5(%rbp)
movq %rsi, -0x10(%rbp)
movb $0x0, -0x11(%rbp)
callq 0x40a0
movl $0x0, (%rax)
movq 0x1734e(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
callq 0x4120
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jge 0x4c77
callq 0x40a0
cmpl $0x4, (%rax)
jne 0x4c77
jmp 0x4c48
testb $0x1, -0x11(%rbp)
je 0x4c85
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x4cde
cmpl $0x1a, -0x18(%rbp)
jne 0x4c97
movl $0x14, %edi
callq 0x4070
jmp 0x4c48
testb $0x1, -0x5(%rbp)
je 0x4cd8
cmpl $0xd, -0x18(%rbp)
jne 0x4cac
movl $0xa, -0x18(%rbp)
jmp 0x4cc8
cmpl $0x16, -0x18(%rbp)
jne 0x4cc6
cmpq $0x0, -0x10(%rbp)
je 0x4cc0
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movb $0x1, -0x11(%rbp)
jmp 0x4c48
jmp 0x4cc8
cmpq $0x0, -0x10(%rbp)
je 0x4cd6
movq -0x10(%rbp), %rax
movb $0x0, (%rax)
jmp 0x4cd8
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ncurses.c
// Function: nc_addch
void nc_addch(char c)
{
	if(c == '\t'){
		c = ' ';
	}else if(c == '\r'){
		/* TODO: all non-printables */
		addch('^');
		addch('M');
		return;
	}

	addch(c & 0xff);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %dil, %al
movb %al, -0x1(%rbp)
movsbl -0x1(%rbp), %eax
cmpl $0x9, %eax
jne 0x4d0d
movb $0x20, -0x1(%rbp)
jmp 0x4d42
movsbl -0x1(%rbp), %eax
cmpl $0xd, %eax
jne 0x4d40
movq 0x1728b(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movl $0x5e, %esi
callq 0x4480
movq 0x17277(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movl $0x4d, %esi
callq 0x4480
jmp 0x4d5b
jmp 0x4d42
movq 0x1725f(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movsbl -0x1(%rbp), %esi
andl $0xff, %esi
callq 0x4480
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ncurses.c
// Function: nc_style
void nc_style(enum nc_style s)
{
	int to_set = A_NORMAL;
	int col = -1;

	if(s & COL_BLUE)
		col = COLOR_BLUE;
	else if(s & COL_BROWN)
		col = COLOR_YELLOW;

	if(col != -1)
		to_set |= COLOR_PAIR(1 + col);

	if(s & COL_BG_RED)
		to_set |= COLOR_PAIR(9 + COLOR_RED);

	if(s & ATTR_BOLD)
		to_set |= A_BOLD;

	attrset(to_set);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
movl $0xffffffff, -0xc(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4d9d
movl $0x4, -0xc(%rbp)
jmp 0x4db1
movl -0x4(%rbp), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x4daf
movl $0x3, -0xc(%rbp)
jmp 0x4db1
cmpl $-0x1, -0xc(%rbp)
je 0x4dcb
movl -0xc(%rbp), %eax
addl $0x1, %eax
shll $0x8, %eax
andl $0xff00, %eax           # imm = 0xFF00
orl -0x8(%rbp), %eax
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x4de1
movl -0x8(%rbp), %eax
orl $0xa00, %eax            # imm = 0xA00
movl %eax, -0x8(%rbp)
movl -0x4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4df7
movl -0x8(%rbp), %eax
orl $0x200000, %eax         # imm = 0x200000
movl %eax, -0x8(%rbp)
movq 0x171aa(%rip), %rax     # 0x1bfa8
movq (%rax), %rdi
movl -0x8(%rbp), %esi
callq 0x4060
addq $0x10, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_set_bufmode
void ui_set_bufmode(enum buf_mode m)
{
	window *win = windows_cur();

	if(window_setmode(win, m)){
		ui_err("bad mode 0x%x", m);
	}else{
		ui_redraw();
		ui_cur_changed();
		nc_style(COL_BROWN);
		ui_status("%s", ui_bufmode_str(win->ui_mode));
		nc_style(0);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
callq 0x13c60
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x13930
cmpl $0x0, %eax
je 0x4ee8
movl -0x4(%rbp), %esi
leaq 0x10231(%rip), %rdi     # 0x15110
movb $0x0, %al
callq 0x4f30
jmp 0x4f20
callq 0x4fd0
callq 0x5050
movl $0x4, %edi
callq 0x4d70
movq -0x10(%rbp), %rax
movl 0x40(%rax), %edi
callq 0x5240
movq %rax, %rsi
leaq 0x10c5f(%rip), %rdi     # 0x15b71
movb $0x0, %al
callq 0x51a0
xorl %edi, %edi
callq 0x4d70
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_redraw
void ui_redraw()
{
	int save_y, save_x;
	nc_get_yx(&save_y, &save_x);

	int tabspace = tabs_single() ? 0 : 1;
	ui_draw_windows(windows_cur(), tabspace, nc_LINES() - (1 + tabspace), nc_COLS());

	if(tabspace)
		ui_draw_tabs();

	nc_set_yx(save_y, save_x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq -0x4(%rbp), %rdi
leaq -0x8(%rbp), %rsi
callq 0x4b10
callq 0x13f20
movb %al, %dl
movl $0x1, %eax
xorl %ecx, %ecx
testb $0x1, %dl
cmovnel %ecx, %eax
movl %eax, -0xc(%rbp)
callq 0x13c60
movq %rax, -0x20(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x14(%rbp)
callq 0x4e70
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
subl %ecx, %eax
movl %eax, -0x10(%rbp)
callq 0x4e80
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %esi
movl -0x10(%rbp), %edx
movl %eax, %ecx
callq 0x58a0
cmpl $0x0, -0xc(%rbp)
je 0x503c
callq 0x5940
movl -0x4(%rbp), %edi
movl -0x8(%rbp), %esi
callq 0x4b90
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_cur_changed
void ui_cur_changed()
{
	int need_redraw = 0;
	window *win = windows_cur();
	const int nl = win->screen_coord.h;

	if(win->ui_start.y < 0)
		win->ui_start.y = 0;
	if(win->ui_start.x < 0)
		win->ui_start.x = 0;

	if(win->ui_pos->x < 0)
		win->ui_pos->x = 0;

	if(win->ui_pos->y < 0)
		win->ui_pos->y = 0;

	if(win->ui_pos->y > win->ui_start.y + nl - 1){
		win->ui_start.y = win->ui_pos->y - nl + 1;
		need_redraw = 1;
	}else if(win->ui_pos->y < win->ui_start.y){
		win->ui_start.y = win->ui_pos->y;
		need_redraw = 1;
	}

	if(win->ui_mode & UI_VISUAL_ANY)
		need_redraw = 1;

	if(ui_match_paren(win))
		need_redraw = 1;

	if(need_redraw)
		ui_redraw();

	point_t cursor = window_toscreen(win, win->ui_pos);
	nc_set_yx(cursor.y, cursor.x);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl $0x0, -0x4(%rbp)
callq 0x13c60
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x14(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0xc(%rax)
jge 0x5087
movq -0x10(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jge 0x509c
movq -0x10(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x0, (%rax)
jge 0x50b7
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
cmpl $0x0, 0x4(%rax)
jge 0x50d4
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl $0x0, 0x4(%rax)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
movl 0xc(%rcx), %ecx
addl -0x14(%rbp), %ecx
subl $0x1, %ecx
cmpl %ecx, %eax
jle 0x5111
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %ecx
subl -0x14(%rbp), %ecx
addl $0x1, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5140
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x513e
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movl 0x4(%rax), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0xc(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x5140
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x38, %eax
cmpl $0x0, %eax
je 0x5156
movl $0x1, -0x4(%rbp)
movq -0x10(%rbp), %rdi
callq 0x5480
testb $0x1, %al
jne 0x5165
jmp 0x516c
movl $0x1, -0x4(%rbp)
cmpl $0x0, -0x4(%rbp)
je 0x5177
callq 0x4fd0
movq -0x10(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rsi
callq 0x13830
movq %rax, -0x1c(%rbp)
movl -0x18(%rbp), %edi
movl -0x1c(%rbp), %esi
callq 0x4b90
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_bufmode_str
static const char *ui_bufmode_str(enum buf_mode m)
{
	switch(m){
		case UI_NORMAL: return "NORMAL";
		case UI_INSERT_COL: return "INSERT BLOCK";
		case UI_INSERT: return "INSERT";
		case UI_VISUAL_CHAR: return "VISUAL";
		case UI_VISUAL_LN: return "VISUAL LINE";
		case UI_VISUAL_COL: return "VISUAL BLOCK";
	}
	return "?";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl %edi, -0xc(%rbp)
movl -0xc(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x18(%rbp)
subl $0x1f, %eax
ja 0x52b9
movq -0x18(%rbp), %rax
leaq 0xfdae(%rip), %rcx      # 0x15010
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq 0xfec0(%rip), %rax      # 0x15132
movq %rax, -0x8(%rbp)
jmp 0x52c4
leaq 0xfeba(%rip), %rax      # 0x15139
movq %rax, -0x8(%rbp)
jmp 0x52c4
leaq 0xfeba(%rip), %rax      # 0x15146
movq %rax, -0x8(%rbp)
jmp 0x52c4
leaq 0xfeb4(%rip), %rax      # 0x1514d
movq %rax, -0x8(%rbp)
jmp 0x52c4
leaq 0xfeae(%rip), %rax      # 0x15154
movq %rax, -0x8(%rbp)
jmp 0x52c4
leaq 0xfead(%rip), %rax      # 0x15160
movq %rax, -0x8(%rbp)
jmp 0x52c4
leaq 0xfead(%rip), %rax      # 0x1516d
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_vstatus
static
void ui_vstatus(bool err, const char *fmt, va_list l, int right)
{
	int y, x;

	nc_get_yx(&y, &x);

	if(err)
		nc_style(COL_BG_RED);

	char *message = ustrvprintf(fmt, l);
	/* just truncate in the middle if too long */
	const size_t msglen = strlen(message);
	const int cols = nc_COLS();

	if(msglen >= (unsigned)cols){
		const int dotslen = 3;
		int half = (cols - dotslen) / 2;
		char *replace = umalloc(msglen + 1);

		snprintf(replace, msglen + 1, "%.*s...%s",
				half, message, message + msglen - half);

		free(message);
		message = replace;
	}

	nc_status(message, right);
	if(err)
		nc_style(0);

	nc_set_yx(y, x);

	free(message);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x1(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x24(%rbp), %rsi
callq 0x4b10
testb $0x1, -0x1(%rbp)
je 0x5318
movl $0x8, %edi
callq 0x4d70
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x6120
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x4170
movq %rax, -0x38(%rbp)
callq 0x4e80
movl %eax, -0x3c(%rbp)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %ecx
cmpq %rcx, %rax
jb 0x53b9
movl $0x3, -0x40(%rbp)
movl -0x3c(%rbp), %eax
subl $0x3, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
callq 0x5f20
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
movq -0x38(%rbp), %rsi
addq $0x1, %rsi
movl -0x44(%rbp), %ecx
movq -0x30(%rbp), %r8
movq -0x30(%rbp), %r9
addq -0x38(%rbp), %r9
movslq -0x44(%rbp), %rdx
xorl %eax, %eax
subq %rdx, %rax
addq %rax, %r9
leaq 0xfdce(%rip), %rdx      # 0x1516f
movb $0x0, %al
callq 0x41e0
movq -0x30(%rbp), %rdi
callq 0x4080
movq -0x50(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
movl -0x1c(%rbp), %esi
callq 0x4a70
testb $0x1, -0x1(%rbp)
je 0x53d2
xorl %edi, %edi
callq 0x4d70
movl -0x20(%rbp), %edi
movl -0x24(%rbp), %esi
callq 0x4b90
movq -0x30(%rbp), %rdi
callq 0x4080
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_normal_1
void ui_normal_1(unsigned *repeat, enum io io_mode)
{
	window *win = windows_cur();
	const bool ins = win->ui_mode & UI_INSERT_ANY;

	if(!ins){
		const motion *m = motion_read(repeat, /*map:*/true);
		if(m){
			motion_apply_win(m, *repeat, win);

			/* check if we're now on a paren */
			if(ui_match_paren(win))
				ui_redraw();

			return;
		} /* else no motion */
	} /* else insert */

	ui_handle_next_ch(io_mode, *repeat);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
callq 0x13c60
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x6, %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movb %al, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0x5467
movq -0x8(%rbp), %rdi
movl $0x1, %esi
callq 0x8050
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x5465
movq -0x28(%rbp), %rdi
movq -0x8(%rbp), %rax
movl (%rax), %esi
movq -0x18(%rbp), %rdx
callq 0x10310
movq -0x18(%rbp), %rdi
callq 0x5480
testb $0x1, %al
jne 0x545e
jmp 0x5463
callq 0x4fd0
jmp 0x5475
jmp 0x5467
movl -0xc(%rbp), %edi
movq -0x8(%rbp), %rax
movl (%rax), %esi
callq 0x5560
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_match_paren
static bool ui_match_paren(window *win)
{
	list_t *l = window_current_line(win, false);
	int x = win->ui_pos->x;
	bool redraw = false;

	if(win->ui_paren.x != -1)
		redraw = true;

	win->ui_paren = (point_t){ -1, -1 };

	if(!l || (size_t)x >= l->len_line)
		goto out;

	char ch = l->line[x];
	char other;
	if(!paren_match(ch, &other))
		goto out;

	motion opposite = {
		.func = m_paren,
		.arg.i = other,
		.how = M_EXCLUSIVE
	};
	point_t loc;
	if(!motion_apply_win_dry(&opposite, 0, win, &loc))
		goto out;

	win->ui_paren = loc;
	redraw = true;

out:
	return redraw;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
xorl %esi, %esi
callq 0x13790
movq %rax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x30(%rax), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movb $0x0, -0x15(%rbp)
movq -0x8(%rbp), %rax
cmpl $-0x1, 0x38(%rax)
je 0x54ba
movb $0x1, -0x15(%rbp)
movq -0x8(%rbp), %rax
movl $0xffffffff, -0x20(%rbp) # imm = 0xFFFFFFFF
movl $0xffffffff, -0x1c(%rbp) # imm = 0xFFFFFFFF
movq -0x20(%rbp), %rcx
movq %rcx, 0x38(%rax)
cmpq $0x0, -0x10(%rbp)
je 0x54e9
movslq -0x14(%rbp), %rax
movq -0x10(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jb 0x54eb
jmp 0x5552
movq -0x10(%rbp), %rax
movq (%rax), %rax
movslq -0x14(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x21(%rbp)
leaq -0x22(%rbp), %rsi
movsbl -0x21(%rbp), %edi
callq 0x10a70
testb $0x1, %al
jne 0x550f
jmp 0x5552
leaq 0xa92a(%rip), %rax      # 0xfe40
movq %rax, -0x40(%rbp)
movsbl -0x22(%rbp), %eax
movl %eax, -0x38(%rbp)
movl $0x2, -0x30(%rbp)
movq -0x8(%rbp), %rdx
leaq -0x40(%rbp), %rdi
xorl %esi, %esi
leaq -0x48(%rbp), %rcx
callq 0x10290
cmpl $0x0, %eax
jne 0x5542
jmp 0x5552
movq -0x8(%rbp), %rax
movq -0x48(%rbp), %rcx
movq %rcx, 0x38(%rax)
movb $0x1, -0x15(%rbp)
movb -0x15(%rbp), %al
andb $0x1, %al
addq $0x50, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/bobrippling[P]tim/ui.c
// Function: ui_handle_next_ch
static void ui_handle_next_ch(enum io io_mode, unsigned repeat)
{
	extern nkey_t nkeys[];
	extern const size_t nkeys_cnt;

	int i = keys_filter(
			io_mode, (char *)nkeys, nkeys_cnt,
			offsetof(nkey_t, str), sizeof(nkey_t),
			offsetof(nkey_t, mode));

	if(i != -1){
		nkeys[i].func(&nkeys[i].arg, repeat, nkeys[i].str[0]);
		/* found and handled */
	}else{
		/* not found/handled */
		bool raw;
		int ch = io_getch(0, &raw, true); /* pop it back */
		(void)raw; /* straight out inserted */

		if(ch == 0 || (char)ch == -1) /* eof */
			ui_run = UI_EXIT_1;

		window *const win = windows_cur();

		if(win->ui_mode & UI_INSERT_ANY){
			window_inschar(win, ch);
			ui_redraw(); // TODO: queue these
			ui_cur_changed();
		}else if(ch != K_ESC){
			ui_err("unknown key %c", ch); // TODO: queue?
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl -0x4(%rbp), %edi
leaq 0xfc38(%rip), %rax      # 0x151b0
movq (%rax), %rax
movl %eax, %edx
leaq 0x151dc(%rip), %rsi     # 0x1a760
xorl %ecx, %ecx
movl $0x40, %r8d
movl $0x38, %r9d
callq 0x7d70
movl %eax, -0xc(%rbp)
cmpl $-0x1, -0xc(%rbp)
je 0x55eb
movslq -0xc(%rbp), %rcx
leaq 0x151b5(%rip), %rax     # 0x1a760
shlq $0x6, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movslq -0xc(%rbp), %rcx
leaq 0x1519f(%rip), %rdi     # 0x1a760
shlq $0x6, %rcx
addq %rcx, %rdi
addq $0x10, %rdi
movl -0x8(%rbp), %esi
movslq -0xc(%rbp), %rdx
leaq 0x15186(%rip), %rcx     # 0x1a760
shlq $0x6, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movsbl (%rcx), %edx
callq *%rax
jmp 0x5667
xorl %edi, %edi
leaq -0xd(%rbp), %rsi
movl $0x1, %edx
callq 0x11310
movl %eax, -0x14(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x560f
movl -0x14(%rbp), %eax
movsbl %al, %eax
cmpl $-0x1, %eax
jne 0x5619
movl $0x2, 0x16db3(%rip)     # 0x1c3cc
callq 0x13c60
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x6, %eax
cmpl $0x0, %eax
je 0x564c
movq -0x20(%rbp), %rdi
movl -0x14(%rbp), %eax
movsbl %al, %esi
callq 0x13a20
callq 0x4fd0
callq 0x5050
jmp 0x5665
cmpl $0x1b, -0x14(%rbp)
je 0x5663
movl -0x14(%rbp), %esi
leaq 0xfb1d(%rip), %rdi      # 0x15179
movb $0x0, %al
callq 0x4f30
jmp 0x5665
jmp 0x5667
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)