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

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


    /*
    ** optional SEARCH-ORDER word set 
    */
    ficlDictionarySetPrimitive(dictionary, ">search",   ficlPrimitiveSearchPush,     FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "search>",   ficlPrimitiveSearchPop,      FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "definitions",
                                    ficlPrimitiveDefinitions,    FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "forth-wordlist",  
                                    ficlPrimitiveForthWordlist,  FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "get-current",  
                                    ficlPrimitiveGetCurrent,     FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "get-order", ficlPrimitiveGetOrder,       FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "search-wordlist",  
                                    ficlPrimitiveSearchWordlist, FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "set-current",  
                                    ficlPrimitiveSetCurrent,     FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "set-order", ficlPrimitiveSetOrder,       FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "ficl-wordlist", 
                                    ficlPrimitiveFiclWordlist,   FICL_WORD_DEFAULT);

    /*
    ** Set SEARCH environment query values
    */
    ficlDictionarySetConstant(environment, "search-order",      FICL_TRUE);
    ficlDictionarySetConstant(environment, "search-order-ext",  FICL_TRUE);
    ficlDictionarySetConstant(environment, "wordlists",         FICL_MAX_WORDLISTS);

    ficlDictionarySetPrimitive(dictionary, "wid-get-name", ficlPrimitiveWidGetName,  FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "wid-set-name", ficlPrimitiveWidSetName,  FICL_WORD_DEFAULT);
    ficlDictionarySetPrimitive(dictionary, "wid-set-super", 
                                    ficlPrimitiveSetParentWid,   FICL_WORD_DEFAULT);
    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 0x1fdb(%rip), %rsi      # 0xf87c
leaq 0x171(%rip), %rdx       # 0xda19
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1fcb(%rip), %rsi      # 0xf884
leaq 0x1a8(%rip), %rdx       # 0xda68
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1fbb(%rip), %rsi      # 0xf88c
leaq 0x1e0(%rip), %rdx       # 0xdab8
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x75d(%rip), %rsi       # 0xe046
leaq 0x20b(%rip), %rdx       # 0xdafb
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f97(%rip), %rsi      # 0xf898
leaq 0x20a(%rip), %rdx       # 0xdb12
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f8b(%rip), %rsi      # 0xf8a4
leaq 0x209(%rip), %rdx       # 0xdb29
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f7d(%rip), %rsi      # 0xf8ae
leaq 0x240(%rip), %rdx       # 0xdb78
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f75(%rip), %rsi      # 0xf8be
leaq 0x2c5(%rip), %rdx       # 0xdc15
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f69(%rip), %rsi      # 0xf8ca
leaq 0x2d4(%rip), %rdx       # 0xdc3c
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f5b(%rip), %rsi      # 0xf8d4
leaq 0x34d(%rip), %rdx       # 0xdccd
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f51(%rip), %rsi      # 0xf8e2
movq %r14, %rdi
movq $-0x1, %rdx
callq 0xc217
leaq 0x1f48(%rip), %rsi      # 0xf8ef
movq %r14, %rdi
movq $-0x1, %rdx
callq 0xc217
leaq 0x1f43(%rip), %rsi      # 0xf900
movl $0x10, %edx
movq %r14, %rdi
callq 0xc217
leaq 0x1f39(%rip), %rsi      # 0xf90a
leaq 0x32a(%rip), %rdx       # 0xdd02
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f2e(%rip), %rsi      # 0xf917
leaq 0x353(%rip), %rdx       # 0xdd43
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xc3c8
leaq 0x1f23(%rip), %rsi      # 0xf924
leaq 0x35e(%rip), %rdx       # 0xdd66
movq %rbx, %rdi
xorl %ecx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0xc3c8