// File: /workspace/github_c_makefile_star2_O3/hoobaa[P]ficl/tools.c
// Function: ficlSystemCompileTools
void ficlSystemCompileTools(ficlSystem *system)
{
    ficlDictionary *dictionary = ficlSystemGetDictionary(system);
    ficlDictionary *environment = ficlSystemGetEnvironment(system);

    FICL_SYSTEM_ASSERT(system, dictionary);
    FICL_SYSTEM_ASSERT(system, environment);


    /*
    ** TOOLS and TOOLS EXT
    */
    ficlDictionarySetPrimitive(dictionary, ".s",        ficlVmDisplayDataStack,  FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, ".s-simple", ficlVmDisplayDataStackSimple,  FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "bye",       ficlPrimitiveBye,            FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "forget",    ficlPrimitiveForget,         FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "see",       ficlPrimitiveSee,            FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "words",     ficlPrimitiveWords,      FICL_WORD_DEFAULT);

    /*
    ** Set TOOLS environment query values
    */
    ficlDictionarySetConstant(environment, "tools",            FICL_TRUE);
    ficlDictionarySetConstant(environment, "tools-ext",        FICL_FALSE);

    /*
    ** Ficl extras
    */
    ficlDictionarySetPrimitive(dictionary, "r.s",       ficlVmDisplayReturnStack,  FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, ".env",      ficlPrimitiveListEnv,        FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "env-constant",
                                    ficlPrimitiveEnvConstant,    FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "env-2constant",
                                    ficlPrimitiveEnv2Constant,   FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "debug-xt",  ficlPrimitiveDebugXT,    FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "parse-order", ficlPrimitiveParseStepList, FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "step-break",ficlPrimitiveStepBreak,      FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "forget-wid",ficlPrimitiveForgetWid,      FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "see-xt",    ficlPrimitiveSeeXT,          FICL_WORD_DEFAULT);

#if FICL_WANT_FLOAT
    ficlDictionarySetPrimitive(dictionary, ".hash",     ficlPrimitiveHashSummary,FICL_WORD_DEFAULT);
#endif

    return;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %r14
callq 0x3a0e
movq %rax, %rbx
movq %r14, %rdi
callq 0x3a13
movq %rax, %r14
leaq 0x9987(%rip), %rsi      # 0xe254
leaq -0x251(%rip), %rdx      # 0x4683
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9ae7(%rip), %rsi      # 0xe3cc
leaq -0x25c(%rip), %rdx      # 0x4690
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9ad9(%rip), %rsi      # 0xe3d6
leaq 0x170(%rip), %rdx       # 0x4a74
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9ac5(%rip), %rsi      # 0xe3da
leaq 0x162(%rip), %rdx       # 0x4a7e
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9ab4(%rip), %rsi      # 0xe3e1
leaq 0x187(%rip), %rdx       # 0x4abb
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9aa0(%rip), %rsi      # 0xe3e5
leaq 0x181(%rip), %rdx       # 0x4acd
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a8e(%rip), %rsi      # 0xe3eb
movq %r14, %rdi
movq $-0x1, %rdx
callq 0xc217
leaq 0x9a7e(%rip), %rsi      # 0xe3f1
movq %r14, %rdi
xorl %edx, %edx
callq 0xc217
leaq 0x9a77(%rip), %rsi      # 0xe3fb
leaq -0x23d(%rip), %rdx      # 0x474e
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a63(%rip), %rsi      # 0xe3ff
leaq 0x28a(%rip), %rdx       # 0x4c2d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a50(%rip), %rsi      # 0xe404
leaq 0x332(%rip), %rdx       # 0x4ced
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a45(%rip), %rsi      # 0xe411
leaq 0x357(%rip), %rdx       # 0x4d2a
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a3b(%rip), %rsi      # 0xe41f
leaq 0x381(%rip), %rdx       # 0x4d6c
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a2c(%rip), %rsi      # 0xe428
leaq -0x1c1(%rip), %rdx      # 0x4842
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a20(%rip), %rsi      # 0xe434
leaq 0x3d6(%rip), %rdx       # 0x4df1
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a13(%rip), %rsi      # 0xe43f
leaq 0x5e4(%rip), %rdx       # 0x5017
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x9a06(%rip), %rsi      # 0xe44a
leaq 0x5f6(%rip), %rdx       # 0x5041
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x99f5(%rip), %rsi      # 0xe451
leaq -0x602(%rip), %rdx      # 0x4461
movq %rbx, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc3c8