// File: /workspace/github_c_makefile_star2_O0/janet-lang[P]janet/src/core/debug.c
// Function: doframe
static Janet doframe(JanetStackFrame *frame) {
    int32_t off;
    JanetTable *t = janet_table(3);
    JanetFuncDef *def = NULL;
    if (frame->func) {
        janet_table_put(t, janet_ckeywordv("function"), janet_wrap_function(frame->func));
        def = frame->func->def;
        if (def->name) {
            janet_table_put(t, janet_ckeywordv("name"), janet_wrap_string(def->name));
        }
    } else {
        JanetCFunction cfun = (JanetCFunction)(frame->pc);
        if (cfun) {
            JanetCFunRegistry *reg = janet_registry_get(cfun);
            if (NULL != reg->name) {
                if (NULL != reg->name_prefix) {
                    janet_table_put(t, janet_ckeywordv("name"), janet_wrap_string(janet_formatc("%s/%s", reg->name_prefix, reg->name)));
                } else {
                    janet_table_put(t, janet_ckeywordv("name"), janet_cstringv(reg->name));
                }
                if (NULL != reg->source_file) {
                    janet_table_put(t, janet_ckeywordv("source"), janet_cstringv(reg->source_file));
                }
                if (reg->source_line > 0) {
                    janet_table_put(t, janet_ckeywordv("source-line"), janet_wrap_integer(reg->source_line));
                    janet_table_put(t, janet_ckeywordv("source-column"), janet_wrap_integer(1));
                }
            }
        }
        janet_table_put(t, janet_ckeywordv("c"), janet_wrap_true());
    }
    if (frame->flags & JANET_STACKFRAME_TAILCALL) {
        janet_table_put(t, janet_ckeywordv("tail"), janet_wrap_true());
    }
    if (frame->func && frame->pc) {
        Janet *stack = (Janet *)frame + JANET_FRAME_SIZE;
        JanetArray *slots;
        janet_assert(def != NULL, "def != NULL");
        off = (int32_t)(frame->pc - def->bytecode);
        janet_table_put(t, janet_ckeywordv("pc"), janet_wrap_integer(off));
        if (def->sourcemap) {
            JanetSourceMapping mapping = def->sourcemap[off];
            janet_table_put(t, janet_ckeywordv("source-line"), janet_wrap_integer(mapping.line));
            janet_table_put(t, janet_ckeywordv("source-column"), janet_wrap_integer(mapping.column));
        }
        if (def->source) {
            janet_table_put(t, janet_ckeywordv("source"), janet_wrap_string(def->source));
        }
        /* Add stack arguments */
        slots = janet_array(def->slotcount);
        safe_memcpy(slots->data, stack, sizeof(Janet) * def->slotcount);
        slots->count = def->slotcount;
        janet_table_put(t, janet_ckeywordv("slots"), janet_wrap_array(slots));
        /* Add local bindings */
        if (def->symbolmap) {
            JanetTable *local_bindings = janet_table(0);
            for (int32_t i = def->symbolmap_length - 1; i >= 0; i--) {
                JanetSymbolMap jsm = def->symbolmap[i];
                Janet value = janet_wrap_nil();
                uint32_t pc = (uint32_t)(frame->pc - def->bytecode);
                if (jsm.birth_pc == UINT32_MAX) {
                    JanetFuncEnv *env = frame->func->envs[jsm.death_pc];
                    if (env->offset > 0) {
                        value = env->as.fiber->data[env->offset + jsm.slot_index];
                    } else {
                        value = env->as.values[jsm.slot_index];
                    }
                } else if (pc >= jsm.birth_pc && pc < jsm.death_pc) {
                    value = stack[jsm.slot_index];
                }
                janet_table_put(local_bindings, janet_wrap_symbol(jsm.symbol), value);
            }
            janet_table_put(t, janet_ckeywordv("locals"), janet_wrap_table(local_bindings));
        }
    }
    return janet_wrap_table(t);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x210, %rsp            # imm = 0x210
movq %rdi, -0x10(%rbp)
movl $0x3, %edi
callq 0x692f0
movq %rax, -0x20(%rbp)
movq $0x0, -0x28(%rbp)
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x28909
movq -0x20(%rbp), %rax
movq %rax, -0x190(%rbp)
leaq 0x60955(%rip), %rdi     # 0x8919a
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movabsq $-0x2000000000000, %rsi # imm = 0xFFFE000000000000
callq 0x7b610
movq -0x190(%rbp), %rdi
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rsi
movq -0x38(%rbp), %rdx
callq 0x697e0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x28904
movq -0x20(%rbp), %rax
movq %rax, -0x198(%rbp)
leaq 0x623e9(%rip), %rdi     # 0x8aca3
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq 0x48(%rax), %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x198(%rbp), %rdi
movq %rax, -0x48(%rbp)
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x697e0
jmp 0x28bc9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x28b69
movq -0x50(%rbp), %rdi
callq 0x6b9c0
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
xorl %eax, %eax
cmpq 0x8(%rcx), %rax
je 0x28b67
movq -0x58(%rbp), %rcx
xorl %eax, %eax
cmpq 0x10(%rcx), %rax
je 0x289c0
movq -0x20(%rbp), %rax
movq %rax, -0x1a0(%rbp)
leaq 0x62348(%rip), %rdi     # 0x8aca3
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x5ca4b(%rip), %rdi     # 0x853d8
movb $0x0, %al
callq 0x5bdd0
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x1a0(%rbp), %rdi
movq %rax, -0x68(%rbp)
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x697e0
jmp 0x28a24
movq -0x20(%rbp), %rax
movq %rax, -0x1a8(%rbp)
leaq 0x622d1(%rip), %rdi     # 0x8aca3
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x70(%rbp)
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x1a8(%rbp), %rdi
movq %rax, -0x78(%rbp)
movq -0x70(%rbp), %rsi
movq -0x78(%rbp), %rdx
callq 0x697e0
movq -0x58(%rbp), %rcx
xorl %eax, %eax
cmpq 0x18(%rcx), %rax
je 0x28a9a
movq -0x20(%rbp), %rax
movq %rax, -0x1b0(%rbp)
leaq 0x641bc(%rip), %rdi     # 0x8cbfe
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x80(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x64a70
movq %rax, %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x1b0(%rbp), %rdi
movq %rax, -0x88(%rbp)
movq -0x80(%rbp), %rsi
movq -0x88(%rbp), %rdx
callq 0x697e0
movq -0x58(%rbp), %rax
cmpl $0x0, 0x20(%rax)
jle 0x28b65
movq -0x20(%rbp), %rax
movq %rax, -0x1c0(%rbp)
leaq 0x5c9fa(%rip), %rdi     # 0x854b4
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x90(%rbp)
movq -0x58(%rbp), %rax
cvtsi2sdl 0x20(%rax), %xmm0
callq 0x7b820
movq -0x1c0(%rbp), %rdi
movq %rax, -0x98(%rbp)
movq -0x90(%rbp), %rsi
movq -0x98(%rbp), %rdx
callq 0x697e0
movq -0x20(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq 0x5c9a7(%rip), %rdi     # 0x854c0
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xa0(%rbp)
movsd 0x587e1(%rip), %xmm0    # 0x81320
callq 0x7b820
movq -0x1b8(%rbp), %rdi
movq %rax, -0xa8(%rbp)
movq -0xa0(%rbp), %rsi
movq -0xa8(%rbp), %rdx
callq 0x697e0
jmp 0x28b67
jmp 0x28b69
movq -0x20(%rbp), %rax
movq %rax, -0x1c8(%rbp)
leaq 0x58e83(%rip), %rdi     # 0x819fe
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xb0(%rbp)
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x7b460
movq -0x1c8(%rbp), %rdi
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rsi
movq -0xb8(%rbp), %rdx
callq 0x697e0
movq -0x10(%rbp), %rax
movl 0x1c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x28c38
movq -0x20(%rbp), %rax
movq %rax, -0x1d0(%rbp)
leaq 0x5c8e4(%rip), %rdi     # 0x854ce
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xc0(%rbp)
movabsq $-0x6ffffffffffff, %rdi # imm = 0xFFF9000000000001
callq 0x7b460
movq -0x1d0(%rbp), %rdi
movq %rax, -0xc8(%rbp)
movq -0xc0(%rbp), %rsi
movq -0xc8(%rbp), %rdx
callq 0x697e0
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
je 0x2912d
movq -0x10(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x2912d
movq -0x10(%rbp), %rax
addq $0x20, %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x28c9d
jmp 0x28c6d
movq 0x8737c(%rip), %rax     # 0xafff0
movq (%rax), %rdi
leaq 0x58396(%rip), %rsi     # 0x81014
movl $0x142, %edx            # imm = 0x142
leaq 0x5c7a9(%rip), %rcx     # 0x85433
leaq 0x5c842(%rip), %r8      # 0x854d3
movb $0x0, %al
callq 0x125f0
callq 0x12100
jmp 0x28c9f
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movl %eax, -0x14(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1d8(%rbp)
leaq 0x6423d(%rip), %rdi     # 0x8cf08
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xe0(%rbp)
cvtsi2sdl -0x14(%rbp), %xmm0
callq 0x7b820
movq -0x1d8(%rbp), %rdi
movq %rax, -0xe8(%rbp)
movq -0xe0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
callq 0x697e0
movq -0x28(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x28df6
movq -0x28(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xf0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x1e8(%rbp)
leaq 0x5c768(%rip), %rdi     # 0x854b4
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0xf8(%rbp)
cvtsi2sdl -0xf0(%rbp), %xmm0
callq 0x7b820
movq -0x1e8(%rbp), %rdi
movq %rax, -0x100(%rbp)
movq -0xf8(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0x697e0
movq -0x20(%rbp), %rax
movq %rax, -0x1e0(%rbp)
leaq 0x5c716(%rip), %rdi     # 0x854c0
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x108(%rbp)
cvtsi2sdl -0xec(%rbp), %xmm0
callq 0x7b820
movq -0x1e0(%rbp), %rdi
movq %rax, -0x110(%rbp)
movq -0x108(%rbp), %rsi
movq -0x110(%rbp), %rdx
callq 0x697e0
movq -0x28(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x28e69
movq -0x20(%rbp), %rax
movq %rax, -0x1f0(%rbp)
leaq 0x63deb(%rip), %rdi     # 0x8cbfe
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x118(%rbp)
movq -0x28(%rbp), %rax
movq 0x40(%rax), %rdi
movabsq $-0x6000000000000, %rsi # imm = 0xFFFA000000000000
callq 0x7b550
movq -0x1f0(%rbp), %rdi
movq %rax, -0x120(%rbp)
movq -0x118(%rbp), %rsi
movq -0x120(%rbp), %rdx
callq 0x697e0
movq -0x28(%rbp), %rax
movl 0x5c(%rax), %edi
callq 0x13180
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0xd0(%rbp), %rsi
movq -0x28(%rbp), %rax
movslq 0x5c(%rax), %rdx
shlq $0x3, %rdx
callq 0x6ae40
movq -0x28(%rbp), %rax
movl 0x5c(%rax), %ecx
movq -0xd8(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x20(%rbp), %rax
movq %rax, -0x1f8(%rbp)
leaq 0x566f5(%rip), %rdi     # 0x7f5b7
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x128(%rbp)
movq -0xd8(%rbp), %rdi
movabsq $-0x4800000000000, %rsi # imm = 0xFFFB800000000000
callq 0x7b610
movq -0x1f8(%rbp), %rdi
movq %rax, -0x130(%rbp)
movq -0x128(%rbp), %rsi
movq -0x130(%rbp), %rdx
callq 0x697e0
movq -0x28(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x2912b
xorl %edi, %edi
callq 0x692f0
movq %rax, -0x138(%rbp)
movq -0x28(%rbp), %rax
movl 0x7c(%rax), %eax
subl $0x1, %eax
movl %eax, -0x13c(%rbp)
cmpl $0x0, -0x13c(%rbp)
jl 0x290c4
movq -0x28(%rbp), %rax
movq 0x50(%rax), %rax
movslq -0x13c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq %rcx, -0x158(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x150(%rbp)
movq 0x10(%rax), %rax
movq %rax, -0x148(%rbp)
movabsq $-0x77fffffffffff, %rdi # imm = 0xFFF8800000000001
callq 0x7b460
movq %rax, -0x160(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movq 0x28(%rcx), %rcx
subq %rcx, %rax
sarq $0x2, %rax
movl %eax, -0x164(%rbp)
cmpl $-0x1, -0x158(%rbp)
jne 0x29035
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl -0x154(%rbp), %ecx
movq 0x18(%rax,%rcx,8), %rax
movq %rax, -0x170(%rbp)
movq -0x170(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jle 0x29017
movq -0x170(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x30(%rax), %rax
movq -0x170(%rbp), %rcx
movl 0x1c(%rcx), %ecx
addl -0x150(%rbp), %ecx
movl %ecx, %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x160(%rbp)
jmp 0x29033
movq -0x170(%rbp), %rax
movq 0x10(%rax), %rax
movl -0x150(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x160(%rbp)
jmp 0x2906b
movl -0x164(%rbp), %eax
cmpl -0x158(%rbp), %eax
jb 0x29069
movl -0x164(%rbp), %eax
cmpl -0x154(%rbp), %eax
jae 0x29069
movq -0xd0(%rbp), %rax
movl -0x150(%rbp), %ecx
movq (%rax,%rcx,8), %rax
movq %rax, -0x160(%rbp)
jmp 0x2906b
movq -0x138(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x148(%rbp), %rdi
movabsq $-0x5800000000000, %rsi # imm = 0xFFFA800000000000
callq 0x7b550
movq -0x200(%rbp), %rdi
movq %rax, -0x178(%rbp)
movq -0x178(%rbp), %rsi
movq -0x160(%rbp), %rdx
callq 0x697e0
movl -0x13c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x13c(%rbp)
jmp 0x28f44
movq -0x20(%rbp), %rax
movq %rax, -0x208(%rbp)
leaq 0x5c409(%rip), %rdi     # 0x854df
callq 0x68d90
movq %rax, %rdi
movabsq $-0x5000000000000, %rsi # imm = 0xFFFB000000000000
callq 0x7b550
movq %rax, -0x180(%rbp)
movq -0x138(%rbp), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq -0x208(%rbp), %rdi
movq %rax, -0x188(%rbp)
movq -0x180(%rbp), %rsi
movq -0x188(%rbp), %rdx
callq 0x697e0
jmp 0x2912d
movq -0x20(%rbp), %rdi
movabsq $-0x3800000000000, %rsi # imm = 0xFFFC800000000000
callq 0x7b610
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbp
retq
nopw %cs:(%rax,%rax)