// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
movq %rdi, %r14
callq 0x399f
movq %rax, %rbx
movq %r14, %rdi
callq 0x39a4
movq %rax, %r14
leaq 0x28de(%rip), %rsi      # 0xf87c
leaq 0x169(%rip), %rdx       # 0xd10e
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x28ce(%rip), %rsi      # 0xf884
leaq 0x1a0(%rip), %rdx       # 0xd15d
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x28be(%rip), %rsi      # 0xf88c
leaq 0x1d8(%rip), %rdx       # 0xd1ad
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x1060(%rip), %rsi      # 0xe046
leaq 0x203(%rip), %rdx       # 0xd1f0
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x289a(%rip), %rsi      # 0xf898
leaq 0x202(%rip), %rdx       # 0xd207
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x288e(%rip), %rsi      # 0xf8a4
leaq 0x201(%rip), %rdx       # 0xd21e
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x2880(%rip), %rsi      # 0xf8ae
leaq 0x23d(%rip), %rdx       # 0xd272
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x2878(%rip), %rsi      # 0xf8be
leaq 0x2c2(%rip), %rdx       # 0xd30f
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x286c(%rip), %rsi      # 0xf8ca
leaq 0x2d1(%rip), %rdx       # 0xd336
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x285e(%rip), %rsi      # 0xf8d4
leaq 0x33e(%rip), %rdx       # 0xd3bb
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x2854(%rip), %rsi      # 0xf8e2
pushq $-0x1
popq %r15
movq %r14, %rdi
movq %r15, %rdx
callq 0xba61
leaq 0x284b(%rip), %rsi      # 0xf8ef
movq %r14, %rdi
movq %r15, %rdx
callq 0xba61
leaq 0x284a(%rip), %rsi      # 0xf900
pushq $0x10
popq %rdx
movq %r14, %rdi
callq 0xba61
leaq 0x2842(%rip), %rsi      # 0xf90a
leaq 0x321(%rip), %rdx       # 0xd3f0
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x2837(%rip), %rsi      # 0xf917
leaq 0x34a(%rip), %rdx       # 0xd431
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0xbbe5
leaq 0x282c(%rip), %rsi      # 0xf924
leaq 0x355(%rip), %rdx       # 0xd454
movq %rbx, %rdi
xorl %ecx, %ecx
popq %rbx
popq %r14
popq %r15
jmp 0xbbe5