// File: /workspace/github_c_makefile_star2_O2/heltilda[P]cicada/intrpt.c
// Function: combVariables
void combVariables()
{
    ccInt variableCounter, memberCounter, windowCounter, fibrilCounter, codeCounter, codeTop, membersTop;
    variable *loopVariable;
    member *loopMember;
    
    
        // First flag all accessible regions of memory
    
    combBranch(baseView.windowPtr->variable_ptr, ccTrue);
    for (windowCounter = 1; windowCounter <= PCStack.top; windowCounter++)
        combBranch(((view *) element(&(PCStack.data), windowCounter))->windowPtr->variable_ptr, ccTrue);
        
        
        // Now scan for variables that have their flags cleared
    
    for (variableCounter = VariableList.data.elementNum; variableCounter >= 1; variableCounter--)   {
    if (*LL_int(&(VariableList.references), variableCounter) != 0)   {
        loopVariable = (variable *) element(&(VariableList.data), variableCounter);
        
        if (!isBusy(loopVariable, busy_comb_flag))  {
        
            refVariable(loopVariable);            // make sure the variable won't be deleted while we're still dismembering it
            
            codeTop = loopVariable->codeList.elementNum;     // remove its code, since the anchor references the variable indirectly
            for (codeCounter = 1; codeCounter <= codeTop; codeCounter++)   {
                derefCodeRef((code_ref *) element(&(loopVariable->codeList), codeCounter));   }
            deleteElements(&(loopVariable->codeList), 1, codeTop);
            
            if (loopVariable->type >= composite_type)  {      // composite?  then remove its members' code lists and window *s
                membersTop = loopVariable->mem.members.elementNum;      // have it stored separately for deleteElements()
                for (memberCounter = 1; memberCounter <= membersTop; memberCounter++)  {
                    loopMember = LL_member(loopVariable, memberCounter);
                    for (codeCounter = 1; codeCounter <= loopMember->codeList.elementNum; codeCounter++)  {
                        derefCodeRef((code_ref *) element(&(loopMember->codeList), codeCounter));   }
                    if (loopMember->memberWindow != NULL)  unlinkWindow(loopVariable, &(loopMember->memberWindow), memberCounter);
                    deleteLinkedList(&(loopMember->codeList));
                }
                deleteElements(&(loopVariable->mem.members), 1, membersTop);      // ?
            }
            
            for (fibrilCounter = 1; fibrilCounter <= loopVariable->pathList.data.elementNum; fibrilCounter++)  {
            if (*LL_int(&(loopVariable->pathList.references), fibrilCounter) != 0)  {
                derefPath(&(((searchPath *) element(&(loopVariable->pathList.data), fibrilCounter))->stem));
            }}
            derefVariable(loopVariable);      // the mortal blow
        }
    }}
    
    
        // remove the accessibility flags
    
    combBranch(baseView.windowPtr->variable_ptr, ccFalse);
    for (windowCounter = 1; windowCounter <= PCStack.top; windowCounter++)
        combBranch(((view *) element(&(PCStack.data), windowCounter))->windowPtr->variable_ptr, ccFalse);
    
    return;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0x15f99(%rip), %rax     # 0x24760
movq 0x140(%rax), %rax
movq 0x10(%rax), %rdi
pushq $0x1
popq %rbx
movl %ebx, %esi
callq 0xea11
leaq 0x15f5d(%rip), %r14     # 0x24740
movl %ebx, %ebp
cmpl 0x15f4d(%rip), %ebp     # 0x24738
jg 0xe809
movq %r14, %rdi
movl %ebp, %esi
callq 0x9088
movq (%rax), %rax
movq 0x10(%rax), %rdi
movl %ebx, %esi
callq 0xea11
incl %ebp
jmp 0xe7e5
movl 0x15ee1(%rip), %ebx     # 0x246f0
leaq 0x15efa(%rip), %r14     # 0x24710
leaq 0x15ed3(%rip), %r15     # 0x246f0
pushq $0x1
popq %r13
testl %ebx, %ebx
jle 0xe9bb
movq %r14, %rdi
movl %ebx, %esi
callq 0x9088
cmpl $0x0, (%rax)
je 0xe9b4
movq %r15, %rdi
movl %ebx, %esi
callq 0x9088
testb $0x8, 0xf4(%rax)
jne 0xe9b4
movq %rax, %r12
movl %ebx, 0x18(%rsp)
movq 0x8(%r12), %rax
incl (%rax)
leaq 0xd0(%r12), %r14
movq %r12, 0x8(%rsp)
movl 0xd0(%r12), %ebp
testl %ebp, %ebp
movl $0x0, %r15d
cmovgl %ebp, %r15d
negl %r15d
movl %r13d, %ebx
leal (%r15,%rbx), %eax
cmpl $0x1, %eax
je 0xe8a7
movq %r14, %rdi
movl %ebx, %esi
callq 0x9088
movq %rax, %rdi
callq 0xe533
incl %ebx
jmp 0xe888
movq %r14, %rdi
movl %r13d, %esi
movl %ebp, %edx
callq 0x864f
movq 0x8(%rsp), %rax
cmpl $0x5, 0xc0(%rax)
jl 0xe95e
leaq 0x10(%r12), %rax
movq %rax, 0x20(%rsp)
movq 0x8(%rsp), %rax
movl 0x10(%rax), %eax
testl %eax, %eax
movl $0x0, %ecx
movl %eax, 0x14(%rsp)
cmovgl %eax, %ecx
incl %ecx
movl %ecx, 0x1c(%rsp)
movl %r13d, %ebp
cmpl 0x1c(%rsp), %ebp
je 0xe94d
movq 0x20(%rsp), %rdi
movl %ebp, %esi
callq 0x9088
movq %rax, %rbx
movq %rax, %r15
addq $0x20, %r15
movl %r13d, %r14d
cmpl (%r15), %r13d
jg 0xe92b
movq %r15, %rdi
movl %r13d, %esi
callq 0x9088
movq %rax, %rdi
callq 0xe533
incl %r13d
jmp 0xe90e
cmpq $0x0, (%rbx)
je 0xe93e
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0xeb21
movq %r15, %rdi
callq 0x846b
incl %ebp
movl %r14d, %r13d
jmp 0xe8ef
movq 0x20(%rsp), %rdi
movl %r13d, %esi
movl 0x14(%rsp), %edx
callq 0x864f
leaq 0x78(%r12), %r14
addq $0x98, %r12
movl %r13d, %ebp
cmpl (%r14), %ebp
jg 0xe998
movq %r12, %rdi
movl %ebp, %esi
callq 0x9088
cmpl $0x0, (%rax)
je 0xe994
movq %r14, %rdi
movl %ebp, %esi
callq 0x9088
leaq 0x20(%rax), %rdi
callq 0xebb6
incl %ebp
jmp 0xe96d
movq 0x8(%rsp), %rdi
callq 0xe68d
movl 0x18(%rsp), %ebx
leaq 0x15d63(%rip), %r14     # 0x24710
leaq 0x15d3c(%rip), %r15     # 0x246f0
decl %ebx
jmp 0xe821
leaq 0x15d9e(%rip), %rax     # 0x24760
movq 0x140(%rax), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0xea11
pushq $0x1
popq %rbx
leaq 0x15d62(%rip), %r14     # 0x24740
cmpl 0x15d54(%rip), %ebx     # 0x24738
jg 0xea02
movq %r14, %rdi
movl %ebx, %esi
callq 0x9088
movq (%rax), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0xea11
incl %ebx
jmp 0xe9de
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq