// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/ccmain.c
// Function: initCicada
ccInt initCicada(ccInt *zeroCode, ccInt zeroCodeLength,
        char *fileName, ccInt fileNameLength, char *sourceCode, ccInt *opCharNum, ccInt sourceCodeLength)
{
    variable *varZero;
    ccInt zeroCodeIndex, *zeroCodeEntryPtr, rtrn;
    
    baseView.windowPtr = NULL;              // these can confuse addMemory if not initialized to NULL first
    searchView.windowPtr = NULL;            // to prevent an error on startup when addMemory checks baseView.windowPtr->variable_ptr
    topView.windowPtr = NULL;
    
    rtrn = newPLL(&VariableList, 0, sizeof(variable), LLFreeSpace);        // make space for variables & codes
    if (rtrn != passed)  return rtrn;
    rtrn = newPLL(&MasterCodeList, 0, sizeof(storedCodeType), LLFreeSpace);
    if (rtrn != passed)  return rtrn;
    rtrn = newStack(&PCStack, sizeof(view), 100, LLFreeSpace);
    if (rtrn != passed)  return rtrn;
    
    rtrn = addVariable(&varZero, composite_type, composite_type, 0, ccTrue);
    if (rtrn != passed)  return rtrn;
    rtrn = addWindow(varZero, 0, 1, &Zero, ccTrue);
    if (rtrn != passed)  return rtrn;
    rtrn = drawPath(&ZeroSuspensor, Zero, NULL, 1, 1);
    if (rtrn != passed)  return rtrn;
    
    rtrn = addCode(zeroCode, &zeroCodeEntryPtr, &zeroCodeIndex, zeroCodeLength,
                fileName, fileNameLength, sourceCode, opCharNum, sourceCodeLength);
    if (rtrn != passed)  return rtrn;
    rtrn = addCodeRef(&(varZero->codeList), ZeroSuspensor, zeroCodeEntryPtr, zeroCodeIndex);
    if (rtrn != passed)  return rtrn;
    PCCodeRef = *(code_ref *) element(&(varZero->codeList), 1);
    
    refWindow(Zero);
    refPath(ZeroSuspensor);
    
    pcCodePtr = zeroCodeEntryPtr;        // should immediately call checkBytecode()
    
    rtrn = newLinkedList(&(GL_Object.arrayDimList), 0, sizeof(ccInt), 2., ccFalse);
    if (rtrn != passed)  return rtrn;
    rtrn = newLinkedList(&codeRegister, 0, sizeof(code_ref), 0., ccFalse);      // used in bytecd.c to pass codes from code blocks
    if (rtrn != passed)  return rtrn;
    
    rtrn = newLinkedList(&stringRegister, 0, sizeof(char), 0., ccFalse);     // set up the string register
    if (rtrn != passed)  return rtrn;
    
    errCode = warningCode = passed;
    errIndex = 1;              // for now
    errScript.code_ptr = NULL;
    warningScript.code_ptr = NULL;
    
    recursionCounter = 0;
    pcSearchPath = NULL;
    BIF_argsView.windowPtr = NULL;
    argsView.windowPtr = NULL;
    returnView.windowPtr = NULL;
    thatView.windowPtr = NULL;
    
    extCallMode = ccFalse;
    doPrintError = ccFalse;
    
    return passed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movl 0x10(%rbp), %eax
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
leaq 0xaf78(%rip), %rax      # 0x2c750
movq $0x0, 0x140(%rax)
leaq 0xaf66(%rip), %rax      # 0x2c750
movq $0x0, 0x158(%rax)
leaq 0xaf54(%rip), %rax      # 0x2c750
movq $0x0, 0x1d8(%rax)
leaq 0x1482(%rip), %rax      # 0x22c90
movsd (%rax), %xmm0
leaq 0xae7f(%rip), %rdi      # 0x2c698
addq $0x48, %rdi
xorl %esi, %esi
movl $0xf8, %edx
callq 0x97d0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x2183d
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq 0x144c(%rip), %rax      # 0x22c90
movsd (%rax), %xmm0
leaq 0xae49(%rip), %rdi      # 0x2c698
xorl %esi, %esi
movl $0x20, %edx
callq 0x97d0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x2186f
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq 0x141a(%rip), %rax      # 0x22c90
movsd (%rax), %xmm0
leaq 0xae17(%rip), %rdi      # 0x2c698
addq $0x90, %rdi
movl $0x18, %esi
movl $0x64, %edx
callq 0x9b00
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x218ab
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq -0x40(%rbp), %rdi
movl $0x5, %edx
xorl %ecx, %ecx
movl $0x1, %r8d
movl %edx, %esi
callq 0x12cb0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x218d7
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
movq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x1, %r8d
leaq 0xae66(%rip), %rcx      # 0x2c750
movl %r8d, %edx
callq 0xf600
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x21906
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq 0xae43(%rip), %rax      # 0x2c750
movq (%rax), %rsi
leaq 0xae39(%rip), %rdi      # 0x2c750
addq $0x10, %rdi
xorl %eax, %eax
movl %eax, %edx
movl $0x1, %r8d
movl %r8d, %ecx
callq 0x137e0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x21941
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
movq -0x10(%rbp), %rdi
movl -0x14(%rbp), %ecx
movq -0x20(%rbp), %r8
movl -0x24(%rbp), %r9d
movq -0x30(%rbp), %r11
movq -0x38(%rbp), %r10
movl 0x10(%rbp), %eax
leaq -0x50(%rbp), %rsi
leaq -0x44(%rbp), %rdx
movq %r11, (%rsp)
movq %r10, 0x8(%rsp)
movl %eax, 0x10(%rsp)
callq 0x138d0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x21989
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
movq -0x40(%rbp), %rdi
addq $0xd0, %rdi
leaq 0xadb5(%rip), %rax      # 0x2c750
movq 0x10(%rax), %rsi
movq -0x50(%rbp), %rdx
movl -0x44(%rbp), %ecx
callq 0x13bd0
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x219bf
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
movq -0x40(%rbp), %rdi
addq $0xd0, %rdi
movl $0x1, %esi
callq 0x9700
movq %rax, %rcx
leaq 0xad72(%rip), %rax      # 0x2c750
movq (%rcx), %rdx
movq %rdx, 0x208(%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x210(%rax)
movq 0x10(%rcx), %rdx
movq %rdx, 0x218(%rax)
movq 0x18(%rcx), %rcx
movq %rcx, 0x220(%rax)
leaq 0xad40(%rip), %rax      # 0x2c750
movq (%rax), %rdi
callq 0xf780
leaq 0xad31(%rip), %rax      # 0x2c750
movq 0x10(%rax), %rdi
callq 0x13770
movq -0x50(%rbp), %rcx
leaq 0xad1d(%rip), %rax      # 0x2c750
movq %rcx, 0xb8(%rax)
leaq 0xad0f(%rip), %rdi      # 0x2c750
addq $0xd8, %rdi
addq $0x8, %rdi
xorl %ecx, %ecx
movl $0x4, %edx
movsd 0x5c5(%rip), %xmm0      # 0x22020
movl %ecx, %esi
callq 0x8460
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x21a76
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq 0xacd3(%rip), %rdi      # 0x2c750
addq $0x98, %rdi
xorl %ecx, %ecx
movl $0x20, %edx
xorps %xmm0, %xmm0
movl %ecx, %esi
callq 0x8460
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x21aa9
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq 0xaca0(%rip), %rdi      # 0x2c750
addq $0x78, %rdi
xorl %ecx, %ecx
movl $0x1, %edx
xorps %xmm0, %xmm0
movl %ecx, %esi
callq 0x8460
movl %eax, -0x54(%rbp)
cmpl $0x0, -0x54(%rbp)
je 0x21ad9
movl -0x54(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x21baf
leaq 0xac70(%rip), %rax      # 0x2c750
movl $0x0, 0x20(%rax)
leaq 0xac62(%rip), %rax      # 0x2c750
movl $0x0, 0x18(%rax)
leaq 0xac54(%rip), %rax      # 0x2c750
movl $0x1, 0x1c(%rax)
leaq 0xac46(%rip), %rax      # 0x2c750
movq $0x0, 0x38(%rax)
leaq 0xac37(%rip), %rax      # 0x2c750
movq $0x0, 0x58(%rax)
leaq 0xac28(%rip), %rax      # 0x2c750
movl $0x0, 0x200(%rax)
leaq 0xac17(%rip), %rax      # 0x2c750
movq $0x0, 0x170(%rax)
leaq 0xac05(%rip), %rax      # 0x2c750
movq $0x0, 0x178(%rax)
leaq 0xabf3(%rip), %rax      # 0x2c750
movq $0x0, 0x190(%rax)
leaq 0xabe1(%rip), %rax      # 0x2c750
movq $0x0, 0x1a8(%rax)
leaq 0xabcf(%rip), %rax      # 0x2c750
movq $0x0, 0x1c0(%rax)
leaq 0xabbd(%rip), %rax      # 0x2c750
movb $0x0, 0x2a8(%rax)
leaq 0xabaf(%rip), %rax      # 0x2c750
movb $0x0, 0x2a9(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)