// File: /workspace/github_c_makefile_star2_O1/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 0x42f1
movq %rax, %r14
movq %rax, %rdi
callq 0xbab6
leal -0x2(%rax), %ecx
cmpl $0x5, %ecx
ja 0x5117
leaq 0x9235(%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 0x9508(%rip), %rsi      # 0xe5f7
movq %r15, %rdi
xorl %eax, %eax
callq 0x32f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6c86
movq %rbx, %rdi
callq 0x699a
movq %rax, %rdi
movq %r14, %rsi
jmp 0x51c8
cmpl $0x12, %eax
je 0x51d2
cmpl $0x13, %eax
jne 0x513c
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
leaq 0x94d7(%rip), %rsi      # 0xe60e
jmp 0x51e4
leaq 0x118(%rbx), %r15
movzbl 0xb(%r14), %edx
movq 0x10(%r14), %rcx
leaq 0x9523(%rip), %rsi      # 0xe676
movq %r15, %rdi
xorl %eax, %eax
callq 0x32f0
jmp 0x51f1
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
leaq 0x94cb(%rip), %rsi      # 0xe63f
jmp 0x51e4
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
movq 0x30(%r14), %rdx
leaq 0x94ca(%rip), %rsi      # 0xe656
movq %r15, %rdi
movq %rdx, %r8
movq %rcx, %r9
xorl %eax, %eax
callq 0x32f0
jmp 0x51f1
leaq 0x9461(%rip), %rsi      # 0xe606
movq %rbx, %rdi
jmp 0x51f7
leaq 0x944e(%rip), %rsi      # 0xe5ff
movq %rbx, %rdi
callq 0x6c86
movq %rbx, %rdi
callq 0x699a
movq 0x28(%r14), %rsi
movq %rax, %rdi
movq %rbx, %rdx
callq 0xc860
jmp 0x51fc
leaq 0x118(%rbx), %r15
movq 0x28(%r14), %rcx
leaq 0x9441(%rip), %rsi      # 0xe625
movq %r15, %rdi
movq %rcx, %rdx
xorl %eax, %eax
callq 0x32f0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x6c86
testb $0x1, 0xa(%r14)
je 0x5212
leaq 0x9481(%rip), %rsi      # 0xe68b
movq %rbx, %rdi
callq 0x6c86
testb $0x2, 0xa(%r14)
jne 0x521f
popq %rbx
popq %r14
popq %r15
retq
leaq 0x9470(%rip), %rsi      # 0xe696
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x6c86