// File: jamesliu516[P]amrdg2d/solveAMR.cpp
// Function: getAllAdpParametersList()
void getAllAdpParametersList()
{
    Node *current;
    current = HeadListAllGrid;  
    OctCell *lsbl;

    Vec2D tpvec;
    double jl0,jl1,jl2,jl3;
    double maxhxy;
    Sigma_curl=0.0;
    Sigma_div=0.0;
    Sigma_pio=0.0;
    N_total_adpcell=0;
    maxhxy=max2(hx,hy);

    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
                getAdaptiveParameters(lsbl);

                Sigma_curl += lsbl->tcur * lsbl->tcur;
                Sigma_div += lsbl->tdiv *lsbl->tdiv;			
                Sigma_pio+=lsbl->pio* lsbl->pio;

                ++N_total_adpcell;
#if IS_TUBE==1
            }
#endif
        }        
        current = current->next;
    }
    Sigma_curl = sqrt(Sigma_curl/N_total_adpcell);
    Sigma_div = sqrt(Sigma_div/N_total_adpcell);
    Sigma_pio = sqrt(Sigma_pio/N_total_adpcell);
}

// Assembly:
subq $0x98, %rsp
leaq 0x15c12(%rip), %rax     # 0x506a0
movq (%rax), %rax
movq %rax, 0x90(%rsp)
leaq 0x78(%rsp), %rdi
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
callq 0x1e1a0
xorps %xmm0, %xmm0
movsd %xmm0, 0x23bfc(%rip)    # 0x5e6b0
xorps %xmm0, %xmm0
movsd %xmm0, 0x23bf9(%rip)    # 0x5e6b8
xorps %xmm0, %xmm0
movsd %xmm0, 0x23bf6(%rip)    # 0x5e6c0
movl $0x0, 0x23bf4(%rip)     # 0x5e6c8
movsd 0x454c(%rip), %xmm0     # 0x3f028
movsd %xmm0, 0x50(%rsp)
cmpq $0x0, 0x90(%rsp)
je 0x3adb1
movq 0x90(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x88(%rsp)
movq 0x88(%rsp), %rax
movswl 0x1b0(%rax), %eax
cmpl $0x0, %eax
jne 0x3ad98
movq 0x90(%rsp), %rax
movswl (%rax), %eax
cmpl $0x0, %eax
jne 0x3ad98
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 0x15d4a(%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 0x15d26(%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 0x15d02(%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 0x15cde(%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 0x43e8(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3ad96
movsd 0x68(%rsp), %xmm0
movsd 0x43ca(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3ad96
movsd 0x60(%rsp), %xmm0
movsd 0x43ac(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3ad96
movsd 0x58(%rsp), %xmm0
movsd 0x438e(%rip), %xmm1     # 0x3f050
mulsd 0x50(%rsp), %xmm1
ucomisd %xmm1, %xmm0
jbe 0x3ad96
movq 0x88(%rsp), %rdi
callq 0x3a930
movq 0x88(%rsp), %rax
movsd 0x238(%rax), %xmm0
movq 0x88(%rsp), %rax
movsd 0x238(%rax), %xmm2
movsd 0x239a9(%rip), %xmm1    # 0x5e6b0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x23999(%rip)    # 0x5e6b0
movq 0x88(%rsp), %rax
movsd 0x240(%rax), %xmm0
movq 0x88(%rsp), %rax
movsd 0x240(%rax), %xmm2
movsd 0x23979(%rip), %xmm1    # 0x5e6b8
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x23969(%rip)    # 0x5e6b8
movq 0x88(%rsp), %rax
movsd 0x248(%rax), %xmm0
movq 0x88(%rsp), %rax
movsd 0x248(%rax), %xmm2
movsd 0x23949(%rip), %xmm1    # 0x5e6c0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, 0x23939(%rip)    # 0x5e6c0
movl 0x2393b(%rip), %eax     # 0x5e6c8
addl $0x1, %eax
movl %eax, 0x23932(%rip)     # 0x5e6c8
jmp 0x3ad98
movq 0x90(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x90(%rsp)
jmp 0x3aae2
movsd 0x238f7(%rip), %xmm0    # 0x5e6b0
cvtsi2sdl 0x23907(%rip), %xmm1 # 0x5e6c8
divsd %xmm1, %xmm0
callq 0x31c0
movsd %xmm0, 0x238de(%rip)    # 0x5e6b0
movsd 0x238de(%rip), %xmm0    # 0x5e6b8
cvtsi2sdl 0x238e6(%rip), %xmm1 # 0x5e6c8
divsd %xmm1, %xmm0
callq 0x31c0
movsd %xmm0, 0x238c5(%rip)    # 0x5e6b8
movsd 0x238c5(%rip), %xmm0    # 0x5e6c0
cvtsi2sdl 0x238c5(%rip), %xmm1 # 0x5e6c8
divsd %xmm1, %xmm0
callq 0x31c0
movsd %xmm0, 0x238ac(%rip)    # 0x5e6c0
addq $0x98, %rsp
retq
nopl (%rax)