// File: /workspace/github_c_makefile_star2_O0/heltilda[P]cicada/intrpt.c
// Function: addVariable
ccInt addVariable(variable **theNewVar, ccInt variableType, ccInt eventualVariableType, ccInt arrayDepth, ccBool makeSpareRoom)
{
    ccInt newVarIndex, rtrn;
    ccFloat freeSpace;
    
    rtrn = addPLLElement(&VariableList, (void **) theNewVar, &newVarIndex);
    if (rtrn != passed)  return rtrn;
    
    (*theNewVar)->PLL_index = newVarIndex;
    (*theNewVar)->references = LL_int(&(VariableList.references), newVarIndex);
    (*(*theNewVar)->references) = 0;         // the windows are all the references we want
    
    rtrn = newLinkedList(&((*theNewVar)->codeList), 0, sizeof(code_ref), 0., ccFalse);
    if (rtrn != passed)  return out_of_memory_err;
    
    rtrn = newPLL(&((*theNewVar)->windows), 0, sizeof(window), LLFreeSpace);
    if (rtrn != passed)  return rtrn;
    rtrn = newPLL(&((*theNewVar)->pathList), 3, sizeof(searchPath), LLFreeSpace);        // why 3?
    if (rtrn != passed)  return rtrn;
    
    if (makeSpareRoom)  freeSpace = LLFreeSpace;
    else  freeSpace = 0.;
    rtrn = newLinkedList(&((*theNewVar)->mem.data), 0, typeSizes[variableType], freeSpace, ccFalse);
    if (rtrn != passed)  return out_of_memory_err;
    
    (*theNewVar)->type = variableType;
    (*theNewVar)->eventualType = eventualVariableType;
    (*theNewVar)->arrayDepth = arrayDepth;
    (*theNewVar)->instances = 0;
    (*theNewVar)->business = 0;
    
    return passed;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movb %r8b, %al
movq %rdi, -0x10(%rbp)
movl %esi, -0x14(%rbp)
movl %edx, -0x18(%rbp)
movl %ecx, -0x1c(%rbp)
movb %al, -0x1d(%rbp)
movq -0x10(%rbp), %rsi
leaq 0x199c2(%rip), %rdi     # 0x2c698
addq $0x48, %rdi
leaq -0x24(%rbp), %rdx
callq 0x98a0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x12cf7
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x12e85
movl -0x24(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, (%rax)
movl -0x24(%rbp), %esi
leaq 0x1998b(%rip), %rdi     # 0x2c698
addq $0x48, %rdi
addq $0x20, %rdi
callq 0x9700
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movl $0x0, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0xd0, %rdi
xorl %ecx, %ecx
movl $0x20, %edx
xorps %xmm0, %xmm0
movl %ecx, %esi
callq 0x8460
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x12d6d
movl $0x1, -0x4(%rbp)
jmp 0x12e85
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x30, %rdi
xorl %esi, %esi
movl $0x28, %edx
movsd 0xf281(%rip), %xmm0     # 0x22008
callq 0x97d0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x12da0
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x12e85
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x78, %rdi
movl $0x3, %esi
movl $0x30, %edx
movsd 0xf24b(%rip), %xmm0     # 0x22008
callq 0x97d0
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x12dd6
movl -0x28(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x12e85
cmpb $0x0, -0x1d(%rbp)
je 0x12deb
movsd 0xf224(%rip), %xmm0     # 0x22008
movsd %xmm0, -0x30(%rbp)
jmp 0x12df3
xorps %xmm0, %xmm0
movsd %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
addq $0x10, %rdi
movslq -0x14(%rbp), %rcx
leaq 0xfe97(%rip), %rax      # 0x22ca0
movl (%rax,%rcx,4), %edx
movsd -0x30(%rbp), %xmm0
xorl %ecx, %ecx
movl %ecx, %esi
callq 0x8460
movl %eax, -0x28(%rbp)
cmpl $0x0, -0x28(%rbp)
je 0x12e2c
movl $0x1, -0x4(%rbp)
jmp 0x12e85
movl -0x14(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0xc0(%rax)
movl -0x18(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0xc4(%rax)
movl -0x1c(%rbp), %ecx
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl %ecx, 0xc8(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0xf0(%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movl $0x0, 0xf4(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop