// File: /workspace/github_c_makefile_star2_O2/hoobaa[P]ficl/tools.c
// Function: ficlPrimitiveSeeXT
static void ficlPrimitiveSeeXT(ficlVm *vm)
{
    ficlWord *word;
    ficlWordKind kind;

    word = (ficlWord *)ficlStackPopPointer(vm->dataStack);
    kind = ficlWordClassify(word);

    switch (kind)
    {
    case FICL_WORDKIND_COLON:
        sprintf(vm->pad, ": %.*s\n", word->length, word->name);
        ficlVmTextOut(vm, vm->pad);
        ficlDictionarySee(ficlVmGetDictionary(vm), word, &(vm->callback));
        break;

    case FICL_WORDKIND_DOES:
        ficlVmTextOut(vm, "does>\n");
        ficlDictionarySee(ficlVmGetDictionary(vm), (ficlWord *)word->param->p, &(vm->callback));
        break;

    case FICL_WORDKIND_CREATE:
        ficlVmTextOut(vm, "create\n");
        break;

    case FICL_WORDKIND_VARIABLE:
        sprintf(vm->pad, "variable = %ld (%#lx)\n", word->param->i, word->param->u);
        ficlVmTextOut(vm, vm->pad);
        break;

#if FICL_WANT_USER
    case FICL_WORDKIND_USER:
        sprintf(vm->pad, "user variable %ld (%#lx)\n", word->param->i, word->param->u);
        ficlVmTextOut(vm, vm->pad);
        break;
#endif

    case FICL_WORDKIND_CONSTANT:
        sprintf(vm->pad, "constant = %ld (%#lx)\n", word->param->i, word->param->u);
        ficlVmTextOut(vm, vm->pad);
		break;

    case FICL_WORDKIND_2CONSTANT:
        sprintf(vm->pad, "constant = %ld %ld (%#lx %#lx)\n", word->param[1].i, word->param->i, word->param[1].u, word->param->u);
        ficlVmTextOut(vm, vm->pad);
		break;

    default:
        sprintf(vm->pad, "%.*s is a primitive\n", word->length, word->name);
        ficlVmTextOut(vm, vm->pad);
        break;
    }

    if (word->flags & FICL_WORD_IMMEDIATE)
    {
        ficlVmTextOut(vm, "immediate\n");
    }

    if (word->flags & FICL_WORD_COMPILE_ONLY)
    {
        ficlVmTextOut(vm, "compile-only\n");
    }

    return;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x60(%rdi), %rdi
callq 0x420e
movq %rax, %r14
movq %rax, %rdi
callq 0xb28e
leal -0x2(%rax), %ecx
cmpl $0x5, %ecx
ja 0x4fad
leaq 0x939f(%rip), %rax      # 0xe304
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
leaq 0x118(%rbx), %r15
movzbl 0xb(%r14), %edx
movq 0x10(%r14), %rcx
leaq 0x9672(%rip), %rsi      # 0xe5f7
movq %r15, %rdi
xorl %eax, %eax
callq 0x32f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x68f1
movq %rbx, %rdi
callq 0x6643
movq %rax, %rdi
movq %r14, %rsi
jmp 0x505e
cmpl $0x12, %eax
je 0x5068
cmpl $0x13, %eax
jne 0x4fd2
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
leaq 0x9641(%rip), %rsi      # 0xe60e
jmp 0x507a
leaq 0x118(%rbx), %r15
movzbl 0xb(%r14), %edx
movq 0x10(%r14), %rcx
leaq 0x968d(%rip), %rsi      # 0xe676
movq %r15, %rdi
xorl %eax, %eax
callq 0x32f0
jmp 0x5087
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
leaq 0x9635(%rip), %rsi      # 0xe63f
jmp 0x507a
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
movq 0x30(%r14), %rdx
leaq 0x9634(%rip), %rsi      # 0xe656
movq %r15, %rdi
movq %rdx, %r8
movq %rcx, %r9
xorl %eax, %eax
callq 0x32f0
jmp 0x5087
leaq 0x95cb(%rip), %rsi      # 0xe606
movq %rbx, %rdi
jmp 0x508d
leaq 0x95b8(%rip), %rsi      # 0xe5ff
movq %rbx, %rdi
callq 0x68f1
movq %rbx, %rdi
callq 0x6643
movq 0x28(%r14), %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xbe88
jmp 0x5092
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
leaq 0x95ab(%rip), %rsi      # 0xe625
movq %r15, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x32f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x68f1
movb 0xa(%r14), %al
testb $0x1, %al
je 0x50ad
leaq 0x95ea(%rip), %rsi      # 0xe68b
movq %rbx, %rdi
callq 0x68f1
movb 0xa(%r14), %al
testb $0x2, %al
jne 0x50b7
popq %rbx
popq %r14
popq %r15
retq
leaq 0x95d8(%rip), %rsi      # 0xe696
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x68f1