// File: jamesliu516[P]amrdg2d/solveAMR.cpp
// Function: getAllVorM()
void getAllVorM()
{
    solveGradient();

    Node *current;
    current = HeadListAllGrid;  
    OctCell *lsbl;

    Vec2D tpvec;
    double jl0,jl1,jl2,jl3;
    double maxhxy;
    maxhxy=max2(hx,hy);
    sumVorM=0.0;

    while(current != NULL)
    {		
        lsbl = current->cell;
        if(lsbl->flag == 0 && current->flg==0
            //   && lsbl->xc1<xOutlet-1.0*hx
            //    && lsbl->xc1>xInlet+1.0*hx
            //   && lsbl->yc1>ExtPnt1[1]+1.0*hy
            //   && lsbl->yc1<ExtPnt3[1]-1.0*hy
          ) {
#if IS_TUBE==1
            tpvec[0]=lsbl->xc1;
            tpvec[1]=lsbl->yc1;
            jl0=fabs(tpvec-ExtPnt0);
            jl1=fabs(tpvec-ExtPnt1);
            jl2=fabs(tpvec-ExtPnt2);
            jl3=fabs(tpvec-ExtPnt3);

            if(jl0>3.0*maxhxy && jl1>3.0*maxhxy
                && jl2 > 3.0*maxhxy && jl3>3.0*maxhxy){
#endif
                getCellVorM(lsbl);

                sumVorM+=lsbl->vorM;

#if IS_TUBE==1
            }
#endif
        }        
        current = current->next;
    }
}

// Assembly:
subq $0x98, %rsp
callq 0x3a5d0
leaq 0x1634d(%rip), %rax     # 0x506a0
movq (%rax), %rax
movq %rax, 0x90(%rsp)
leaq 0x78(%rsp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x1e1a0
movsd 0x4cb2(%rip), %xmm0     # 0x3f028
movsd %xmm0, 0x50(%rsp)
leaq 0x1663d(%rip), %rax     # 0x509c0
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
cmpq $0x0, 0x90(%rsp)
je 0x3a5bc
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movswl 0x1b0(%rax), %eax
cmpl $0x0, %eax
jne 0x3a5a3
movq 0x90(%rsp), %rax
movswl (%rax), %eax
cmpl $0x0, %eax
jne 0x3a5a3
movq 0x88(%rsp), %rax
movsd 0x278(%rax), %xmm0
movsd %xmm0, (%rsp)
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
callq 0x1e9b0
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq 0x88(%rsp), %rax
movsd 0x280(%rax), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x78(%rsp), %rdi
movl $0x1, %esi
callq 0x1e9b0
movsd 0x8(%rsp), %xmm0
movsd %xmm0, (%rax)
leaq 0x78(%rsp), %rdi
leaq 0x164a2(%rip), %rsi     # 0x508e0
callq 0x1e880
movsd %xmm0, 0x40(%rsp)
movsd %xmm1, 0x48(%rsp)
movsd 0x40(%rsp), %xmm0
movsd 0x48(%rsp), %xmm1
callq 0x1e210
movsd %xmm0, 0x70(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x1647e(%rip), %rsi     # 0x508f0
callq 0x1e880
movsd %xmm0, 0x30(%rsp)
movsd %xmm1, 0x38(%rsp)
movsd 0x30(%rsp), %xmm0
movsd 0x38(%rsp), %xmm1
callq 0x1e210
movsd %xmm0, 0x68(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x1645a(%rip), %rsi     # 0x50900
callq 0x1e880
movsd %xmm0, 0x20(%rsp)
movsd %xmm1, 0x28(%rsp)
movsd 0x20(%rsp), %xmm0
movsd 0x28(%rsp), %xmm1
callq 0x1e210
movsd %xmm0, 0x60(%rsp)
leaq 0x78(%rsp), %rdi
leaq 0x16436(%rip), %rsi     # 0x50910
callq 0x1e880
movsd %xmm0, 0x10(%rsp)
movsd %xmm1, 0x18(%rsp)
movsd 0x10(%rsp), %xmm0
movsd 0x18(%rsp), %xmm1
callq 0x1e210
movsd %xmm0, 0x58(%rsp)
movsd 0x70(%rsp), %xmm0
movsd 0x4b40(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3a5a1
movsd 0x68(%rsp), %xmm0
movsd 0x4b22(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3a5a1
movsd 0x60(%rsp), %xmm0
movsd 0x4b08(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3a5a1
movsd 0x58(%rsp), %xmm0
movsd 0x4aee(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3a5a1
movq 0x88(%rsp), %rdi
callq 0x3a2f0
movq 0x88(%rsp), %rax
movsd 0x208(%rax), %xmm0
leaq 0x1642e(%rip), %rax     # 0x509c0
addsd (%rax), %xmm0
leaq 0x16423(%rip), %rax     # 0x509c0
movsd %xmm0, (%rax)
jmp 0x3a5a3
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x3a38a
addq $0x98, %rsp
retq
nopw %cs:(%rax,%rax)