// File: /workspace/github_c_makefile_star2_O1/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 $0x18, %rsp
leaq 0x1622b(%rip), %rax     # 0x25760
movq 0x140(%rax), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
callq 0xf7af
cmpl $0x0, 0x161e7(%rip)     # 0x25738
jle 0xf581
xorl %ebx, %ebx
leaq 0x161e4(%rip), %r14     # 0x25740
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x911c
movq (%rax), %rax
movq 0x10(%rax), %rdi
movl $0x1, %esi
callq 0xf7af
cmpl 0x161b9(%rip), %ebx     # 0x25738
jl 0xf55c
movl 0x16168(%rip), %r13d    # 0x256f0
testl %r13d, %r13d
jle 0xf753
leaq 0x16178(%rip), %rbx     # 0x25710
leaq 0x16151(%rip), %r14     # 0x256f0
movq %rbx, %rdi
movl %r13d, %esi
callq 0x911c
cmpl $0x0, (%rax)
je 0xf742
movq %r14, %rdi
movl %r13d, %esi
callq 0x911c
testb $0x8, 0xf4(%rax)
jne 0xf742
movq 0x8(%rax), %rcx
incl (%rcx)
leaq 0xd0(%rax), %r14
movq %rax, (%rsp)
movl 0xd0(%rax), %ebp
testl %ebp, %ebp
jle 0xf626
movl %ebp, %r12d
negl %r12d
movl $0x1, %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x911c
movq %rax, %r15
movq 0x8(%rax), %rdi
movl (%rax), %esi
callq 0xfc9a
addq $0x18, %r15
movq %r15, %rdi
callq 0xf972
leal (%r12,%rbx), %eax
incl %eax
movl %ebx, %ecx
incl %ecx
movl %ecx, %ebx
cmpl $0x1, %eax
jne 0xf5f1
movq %r14, %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x868b
movq (%rsp), %r15
cmpl $0x5, 0xc0(%r15)
jl 0xf6ed
movq %r13, 0x10(%rsp)
leaq 0x10(%r15), %rax
movq %rax, 0x8(%rsp)
movl 0x10(%r15), %ebp
testl %ebp, %ebp
jle 0xf6d3
movl $0x1, %r15d
movq 0x8(%rsp), %rdi
movl %r15d, %esi
callq 0x911c
movq %rax, %rbx
leaq 0x20(%rax), %r14
cmpl $0x0, 0x20(%rax)
jle 0xf6ad
xorl %r12d, %r12d
incl %r12d
movq %r14, %rdi
movl %r12d, %esi
callq 0x911c
movq %rax, %r13
movq 0x8(%rax), %rdi
movl (%rax), %esi
callq 0xfc9a
addq $0x18, %r13
movq %r13, %rdi
callq 0xf972
cmpl (%r14), %r12d
jl 0xf680
cmpq $0x0, (%rbx)
je 0xf6bf
movq (%rsp), %rdi
movq %rbx, %rsi
callq 0xf8d3
movq %r14, %rdi
callq 0x847e
leal 0x1(%r15), %eax
cmpl %ebp, %r15d
movl %eax, %r15d
jne 0xf663
movq 0x8(%rsp), %rdi
movl $0x1, %esi
movl %ebp, %edx
callq 0x868b
movq 0x10(%rsp), %r13
movq (%rsp), %r15
cmpl $0x0, 0x78(%r15)
jle 0xf72c
leaq 0x78(%r15), %rbx
movq %r15, %r14
addq $0x98, %r14
xorl %ebp, %ebp
incl %ebp
movq %r14, %rdi
movl %ebp, %esi
callq 0x911c
cmpl $0x0, (%rax)
je 0xf728
movq %rbx, %rdi
movl %ebp, %esi
callq 0x911c
leaq 0x20(%rax), %rdi
callq 0xf972
cmpl (%rbx), %ebp
jl 0xf704
movq %r15, %rdi
callq 0xf3be
leaq 0x15fd5(%rip), %rbx     # 0x25710
leaq 0x15fae(%rip), %r14     # 0x256f0
leal -0x1(%r13), %eax
cmpl $0x1, %r13d
movl %eax, %r13d
jg 0xf59f
leaq 0x16006(%rip), %rax     # 0x25760
movq 0x140(%rax), %rax
movq 0x10(%rax), %rdi
xorl %ebx, %ebx
xorl %esi, %esi
callq 0xf7af
cmpl $0x0, 0x15fc3(%rip)     # 0x25738
jle 0xf7a0
leaq 0x15fc2(%rip), %r14     # 0x25740
incl %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x911c
movq (%rax), %rax
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0xf7af
cmpl 0x15f9a(%rip), %ebx     # 0x25738
jl 0xf77e
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq