// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/ciclib.c
// Function: cclib_compile
void cclib_compile()
{
    window *textStringWindow, *varNamesWindow;
    member *varNamesStringMember;
    linkedlist *textString;
    ccInt numArgs = numBIF_args(), nextVarName, rtrn;
    char *scriptCopy;
    
    if ((numArgs < 1) || (numArgs > 4))  {  setError(wrong_argument_count_err, pcCodePtr-1);  return;  }
    
    
        // make sure the script ends with a 0 (which we will later take out) and lies in one contiguous block of memory
    
    textStringWindow = getBIFstringArg(1);
    if (errCode != passed)  return;
    textString = &(textStringWindow->variable_ptr->mem.data);
    
    
        // add the trailing null character at the end of (our own copy of) the script
    
    scriptCopy = (char *) malloc(textStringWindow->width+1);
    if (scriptCopy == NULL)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
    getElements(textString, textStringWindow->offset+1, textStringWindow->offset+textStringWindow->width, (void *) scriptCopy);
    scriptCopy[textStringWindow->width] = 0;
    
    
        // Run the compiler.  Store the error code/index (which may be zero -- no error).
    
    rtrn = compile(currentCompiler, scriptCopy);
    
    if (((rtrn != passed) || (compilerWarning != passed)) && (doPrintError))  {
        
        char *fileString = NULL;
        ccInt fileStringLength = -1;
        
        if (numArgs >= 2)  {
        if (getBIFmember(2) != NULL)  {
            window *fileStringWindow = getBIFstringArg(2);
            if (errCode != passed)  {  free((void *) scriptCopy);  return;  }
            if (fileStringWindow->width > 0)  {
                if (defragmentLinkedList(&(fileStringWindow->variable_ptr->mem.data)) != passed)  rtrn = out_of_memory_err;
                else  {
                    fileString = (char *) element(&(fileStringWindow->variable_ptr->mem.data), fileStringWindow->offset+1);
                    fileStringLength = fileStringWindow->width;
        }}  }   }
        
        if (rtrn != passed)  setError(rtrn, pcCodePtr-1);
        else  setWarning(compilerWarning, pcCodePtr-1);
        
        printError(fileString, fileStringLength, scriptCopy, errPosition-1, ccFalse);
        doPrintError = ccFalse;             }
    
    else if (rtrn != passed)  setError(rtrn, pcCodePtr-1);
    
    
        // delete the null character we put in at the end of the string
    
    free((void *) scriptCopy);
    
    if (errCode != passed)  return;
    
    
        // store the bytecode string
    
    rtrn = resizeLinkedList(&stringRegister, currentCompiler->bytecode.elementNum * sizeof(ccInt), ccFalse);
    if (rtrn != passed)  {  setError(out_of_memory_err, pcCodePtr-1);  return;  }
    defragmentLinkedList(&stringRegister);
    
    if (currentCompiler->bytecode.elementNum > 0)
        getElements(&(currentCompiler->bytecode), 1, currentCompiler->bytecode.elementNum, element(&stringRegister, 1));
    
    
        // store the bytecode word -> text position mapping in the provided variable, if it was given
    
    if (numArgs >= 3)  {
        window *opCharNumWindow = NULL, *arg3Window = getBIFmember(3);
        linkedlist *opCharNumLL;
        if (errCode != passed)  return;
        
        if (arg3Window != NULL)  {
            resizeMember(LL_member(arg3Window->variable_ptr, arg3Window->offset+1), 1, currentCompiler->opCharNum.elementNum*sizeof(ccInt));
            if (errCode == passed)  opCharNumWindow = getBIFstringArg(3);
            if (errCode != passed)  return;
            
            opCharNumLL = &(opCharNumWindow->variable_ptr->mem.data);
            rtrn = defragmentLinkedList(opCharNumLL);
            if (rtrn != passed)  {  setError(rtrn, pcCodePtr-1);  return;  }
            
            if (currentCompiler->opCharNum.elementNum > 0)  {
                getElements(&(currentCompiler->opCharNum), 1, currentCompiler->opCharNum.elementNum,
                        (void *) element(opCharNumLL, opCharNumWindow->offset+1));
    }   }   }
    
    
        // store the bytecode word -> text position mapping in the provided variable, if it was given
    
    if (numArgs >= 4)  {
        varNamesWindow = getBIFmember(4);
        if (errCode != passed)  return;
        
        if (varNamesWindow != NULL)  {
            variable *varNamesVar = varNamesWindow->variable_ptr;
            member *varNamesMember;
            
            if ((varNamesVar->eventualType != string_type) || (varNamesVar->arrayDepth != 1))
                {  setError(library_argument_err, pcCodePtr-1);  return;  }
            varNamesStringMember = LL_member(varNamesWindow->variable_ptr, varNamesWindow->offset+1);
            
            varNamesMember = LL_member(varNamesWindow->variable_ptr, 1);
            nextVarName = varNamesMember->indices+1;
            resizeMember(varNamesMember, 1, currentCompiler->varNames.elementNum);
            if (errCode != passed)  return;
            
            if (varNamesMember->memberWindow != NULL)  {
                variable *varNamesStringVar = varNamesMember->memberWindow->variable_ptr;
                
                while (currentCompiler->varNames.elementNum >= nextVarName)  {
                    
                    member *stringCharsMember = LL_member(varNamesStringVar, varNamesMember->memberWindow->offset+nextVarName);
                    varNameType *oneVarName = (varNameType *) element(&(currentCompiler->varNames), nextVarName);
                    
                    resizeMember(stringCharsMember, 1, oneVarName->nameLength);
                    setElements(&(stringCharsMember->memberWindow->variable_ptr->mem.data), stringCharsMember->memberWindow->offset+1,
                                stringCharsMember->memberWindow->offset+oneVarName->nameLength, (void *) oneVarName->theName);
                    
                    nextVarName++;
    }   }   }   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
callq 0x1fa40
movl %eax, -0x24(%rbp)
cmpl $0x1, -0x24(%rbp)
jl 0x1c81f
cmpl $0x4, -0x24(%rbp)
jle 0x1c840
leaq 0xff2a(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2d, %edi
callq 0xf740
jmp 0x1ce8b
movl $0x1, %edi
callq 0x1fd70
movq %rax, -0x8(%rbp)
leaq 0xfefb(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1c860
jmp 0x1ce8b
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x10, %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %eax
addl $0x1, %eax
movslq %eax, %rdi
callq 0x81d0
movq %rax, -0x38(%rbp)
cmpq $0x0, -0x38(%rbp)
jne 0x1c8ae
leaq 0xfebc(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x1ce8b
movq -0x20(%rbp), %rdi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
movq -0x8(%rbp), %rax
addl 0x1c(%rax), %edx
movq -0x38(%rbp), %rcx
callq 0x9540
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movslq 0x1c(%rcx), %rcx
movb $0x0, (%rax,%rcx)
leaq 0xf9a6(%rip), %rax      # 0x2c290
movq (%rax), %rdi
movq -0x38(%rbp), %rsi
callq 0xd490
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
jne 0x1c910
leaq 0xf98a(%rip), %rax      # 0x2c290
cmpl $0x0, 0xc(%rax)
je 0x1ca41
leaq 0xfe39(%rip), %rax      # 0x2c750
cmpb $0x0, 0x2a9(%rax)
je 0x1ca41
movq $0x0, -0x40(%rbp)
movl $0xffffffff, -0x44(%rbp) # imm = 0xFFFFFFFF
cmpl $0x2, -0x24(%rbp)
jl 0x1c9ce
movl $0x2, %edi
callq 0x1fab0
cmpq $0x0, %rax
je 0x1c9cc
movl $0x2, %edi
callq 0x1fd70
movq %rax, -0x50(%rbp)
leaq 0xfdee(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1c976
movq -0x38(%rbp), %rdi
callq 0x81c0
jmp 0x1ce8b
movq -0x50(%rbp), %rax
cmpl $0x0, 0x1c(%rax)
jle 0x1c9ca
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
callq 0x8f70
cmpl $0x0, %eax
je 0x1c99f
movl $0x1, -0x2c(%rbp)
jmp 0x1c9c8
movq -0x50(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movq -0x50(%rbp), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
callq 0x9700
movq %rax, -0x40(%rbp)
movq -0x50(%rbp), %rax
movl 0x1c(%rax), %eax
movl %eax, -0x44(%rbp)
jmp 0x1c9ca
jmp 0x1c9cc
jmp 0x1c9ce
cmpl $0x0, -0x2c(%rbp)
je 0x1c9f0
movl -0x2c(%rbp), %edi
leaq 0xfd72(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
callq 0xf740
jmp 0x1ca11
leaq 0xf899(%rip), %rax      # 0x2c290
movl 0xc(%rax), %edi
leaq 0xfd4f(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
callq 0xf940
movq -0x40(%rbp), %rdi
movl -0x44(%rbp), %esi
movq -0x38(%rbp), %rdx
leaq 0xf86d(%rip), %rax      # 0x2c290
movl 0x8(%rax), %ecx
subl $0x1, %ecx
xorl %r8d, %r8d
callq 0x21350
leaq 0xfd18(%rip), %rax      # 0x2c750
movb $0x0, 0x2a9(%rax)
jmp 0x1ca63
cmpl $0x0, -0x2c(%rbp)
je 0x1ca61
movl -0x2c(%rbp), %edi
leaq 0xfcff(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
callq 0xf740
jmp 0x1ca63
movq -0x38(%rbp), %rdi
callq 0x81c0
leaq 0xfcdd(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1ca7e
jmp 0x1ce8b
leaq 0xf80b(%rip), %rax      # 0x2c290
movq (%rax), %rax
movslq 0x1460(%rax), %rax
shlq $0x2, %rax
movl %eax, %esi
leaq 0xfcb4(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
xorl %edx, %edx
callq 0x8ee0
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1cad1
leaq 0xfc99(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x1, %edi
callq 0xf740
jmp 0x1ce8b
leaq 0xfc78(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
callq 0x8f70
leaq 0xf7a8(%rip), %rax      # 0x2c290
movq (%rax), %rax
cmpl $0x0, 0x1460(%rax)
jle 0x1cb50
leaq 0xf795(%rip), %rax      # 0x2c290
movq (%rax), %rax
addq $0x1460, %rax           # imm = 0x1460
movq %rax, -0xa0(%rbp)
leaq 0xf77e(%rip), %rax      # 0x2c290
movq (%rax), %rax
movl 0x1460(%rax), %eax
movl %eax, -0x94(%rbp)
leaq 0xfc28(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
movl $0x1, %esi
callq 0x9700
movq -0xa0(%rbp), %rdi
movl -0x94(%rbp), %edx
movq %rax, %rcx
movl $0x1, %esi
callq 0x9540
cmpl $0x3, -0x24(%rbp)
jl 0x1ccab
movq $0x0, -0x58(%rbp)
movl $0x3, %edi
callq 0x1fab0
movq %rax, -0x60(%rbp)
leaq 0xfbd9(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1cb82
jmp 0x1ce8b
cmpq $0x0, -0x60(%rbp)
je 0x1cca9
movq -0x60(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movq -0x60(%rbp), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
callq 0x9700
movq %rax, %rdi
leaq 0xf6de(%rip), %rax      # 0x2c290
movq (%rax), %rax
movslq 0x1480(%rax), %rax
shlq $0x2, %rax
movl %eax, %edx
movl $0x1, %esi
callq 0x16ca0
leaq 0xfb7d(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
jne 0x1cbe7
movl $0x3, %edi
callq 0x1fd70
movq %rax, -0x58(%rbp)
leaq 0xfb62(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1cbf9
jmp 0x1ce8b
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
addq $0x10, %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x8f70
movl %eax, -0x2c(%rbp)
cmpl $0x0, -0x2c(%rbp)
je 0x1cc3a
movl -0x2c(%rbp), %edi
leaq 0xfb2b(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
callq 0xf740
jmp 0x1ce8b
leaq 0xf64f(%rip), %rax      # 0x2c290
movq (%rax), %rax
cmpl $0x0, 0x1480(%rax)
jle 0x1cca7
leaq 0xf63c(%rip), %rax      # 0x2c290
movq (%rax), %rax
addq $0x1480, %rax           # imm = 0x1480
movq %rax, -0xb0(%rbp)
leaq 0xf625(%rip), %rax      # 0x2c290
movq (%rax), %rax
movl 0x1480(%rax), %eax
movl %eax, -0xa4(%rbp)
movq -0x68(%rbp), %rdi
movq -0x58(%rbp), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
callq 0x9700
movq -0xb0(%rbp), %rdi
movl -0xa4(%rbp), %edx
movq %rax, %rcx
movl $0x1, %esi
callq 0x9540
jmp 0x1cca9
jmp 0x1ccab
cmpl $0x4, -0x24(%rbp)
jl 0x1ce8b
movl $0x4, %edi
callq 0x1fab0
movq %rax, -0x10(%rbp)
leaq 0xfa86(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1ccd5
jmp 0x1ce8b
cmpq $0x0, -0x10(%rbp)
je 0x1ce89
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
cmpl $0x4, 0xc4(%rax)
jne 0x1cd06
movq -0x70(%rbp), %rax
cmpl $0x1, 0xc8(%rax)
je 0x1cd27
leaq 0xfa43(%rip), %rax      # 0x2c750
movq 0xb8(%rax), %rsi
addq $-0x4, %rsi
movl $0x2e, %edi
callq 0xf740
jmp 0x1ce8b
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movq -0x10(%rbp), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
callq 0x9700
movq %rax, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movl $0x1, %esi
callq 0x9700
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movl 0xc(%rax), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
movq -0x78(%rbp), %rdi
leaq 0xf518(%rip), %rax      # 0x2c290
movq (%rax), %rax
movl 0x14a0(%rax), %edx
movl $0x1, %esi
callq 0x16ca0
leaq 0xf9be(%rip), %rax      # 0x2c750
cmpl $0x0, 0x18(%rax)
je 0x1cd9d
jmp 0x1ce8b
movq -0x78(%rbp), %rax
cmpq $0x0, (%rax)
je 0x1ce87
movq -0x78(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rax
movq %rax, -0x80(%rbp)
leaq 0xf4cf(%rip), %rax      # 0x2c290
movq (%rax), %rax
movl 0x14a0(%rax), %eax
cmpl -0x28(%rbp), %eax
jl 0x1ce85
movq -0x80(%rbp), %rdi
addq $0x10, %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %esi
addl -0x28(%rbp), %esi
callq 0x9700
movq %rax, -0x88(%rbp)
leaq 0xf495(%rip), %rax      # 0x2c290
movq (%rax), %rdi
addq $0x14a0, %rdi           # imm = 0x14A0
movl -0x28(%rbp), %esi
callq 0x9700
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rax
movl 0x8(%rax), %edx
movl $0x1, %esi
callq 0x16ca0
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rdi
addq $0x10, %rdi
movq -0x88(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %esi
addl $0x1, %esi
movq -0x88(%rbp), %rax
movq (%rax), %rax
movl 0x18(%rax), %edx
movq -0x90(%rbp), %rax
addl 0x8(%rax), %edx
movq -0x90(%rbp), %rax
movq (%rax), %rcx
callq 0x93d0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x1cdba
jmp 0x1ce87
jmp 0x1ce89
jmp 0x1ce8b
addq $0xb0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)