// File: /workspace/github_cpp_makefile_star2_O3/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:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
leaq 0xe6bd(%rip), %rax      # 0x29610
movq (%rax), %r14
leaq 0x18(%rsp), %rdi
xorpd %xmm0, %xmm0
xorpd %xmm1, %xmm1
callq 0xcf30
xorl %eax, %eax
movq %rax, 0x1c6af(%rip)     # 0x37620
movq %rax, 0x1c6b0(%rip)     # 0x37628
movq %rax, 0x1c6b1(%rip)     # 0x37630
movl $0x0, 0x1c6af(%rip)     # 0x37638
testq %r14, %r14
je 0x1b11e
leaq 0x18(%rsp), %rbx
leaq 0xe8c2(%rip), %r15      # 0x29860
leaq 0xe8cb(%rip), %r12      # 0x29870
leaq 0xe8d4(%rip), %r13      # 0x29880
movq 0x8(%r14), %rbp
cmpw $0x0, 0x1b0(%rbp)
jne 0x1b0f8
cmpw $0x0, (%r14)
jne 0x1b0f8
movsd 0x278(%rbp), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
xorl %esi, %esi
callq 0xd1c0
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movsd 0x280(%rbp), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movl $0x1, %esi
callq 0xd1c0
movsd (%rsp), %xmm0
movsd %xmm0, (%rax)
movq %rbx, %rdi
leaq 0xe83a(%rip), %rsi      # 0x29850
callq 0xd15a
callq 0xcf51
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r15, %rsi
callq 0xd15a
callq 0xcf51
movsd %xmm0, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0xd15a
callq 0xcf51
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0xd15a
callq 0xcf51
movsd 0x2c97(%rip), %xmm1     # 0x1dd00
movsd (%rsp), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x1b0f8
movsd 0x10(%rsp), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x1b0f8
movsd 0x8(%rsp), %xmm2
ucomisd %xmm1, %xmm2
jbe 0x1b0f8
ucomisd %xmm1, %xmm0
jbe 0x1b0f8
movq %rbp, %rdi
callq 0x1ae81
movsd 0x238(%rbp), %xmm0
mulsd %xmm0, %xmm0
addsd 0x1c56e(%rip), %xmm0    # 0x37620
movsd %xmm0, 0x1c566(%rip)    # 0x37620
movsd 0x240(%rbp), %xmm0
mulsd %xmm0, %xmm0
addsd 0x1c55a(%rip), %xmm0    # 0x37628
movsd %xmm0, 0x1c552(%rip)    # 0x37628
movsd 0x248(%rbp), %xmm0
mulsd %xmm0, %xmm0
addsd 0x1c546(%rip), %xmm0    # 0x37630
movsd %xmm0, 0x1c53e(%rip)    # 0x37630
incl 0x1c540(%rip)           # 0x37638
movq 0x10(%r14), %r14
testq %r14, %r14
jne 0x1afac
movsd 0x1c513(%rip), %xmm0    # 0x37620
xorps %xmm1, %xmm1
cvtsi2sdl 0x1c520(%rip), %xmm1 # 0x37638
divsd %xmm1, %xmm0
jmp 0x1b126
movsd 0x2be2(%rip), %xmm0     # 0x1dd08
ucomisd 0x208a(%rip), %xmm0     # 0x1d1b8
jb 0x1b136
sqrtsd %xmm0, %xmm0
jmp 0x1b13b
callq 0x31b0
movsd %xmm0, 0x1c4dd(%rip)    # 0x37620
movsd 0x1c4dd(%rip), %xmm0    # 0x37628
xorps %xmm1, %xmm1
cvtsi2sdl 0x1c4e2(%rip), %xmm1 # 0x37638
divsd %xmm1, %xmm0
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jb 0x1b16a
sqrtsd %xmm0, %xmm0
jmp 0x1b173
callq 0x31b0
xorpd %xmm2, %xmm2
movsd %xmm0, 0x1c4ad(%rip)    # 0x37628
xorps %xmm1, %xmm1
cvtsi2sdl 0x1c4b2(%rip), %xmm1 # 0x37638
movsd 0x1c4a2(%rip), %xmm0    # 0x37630
divsd %xmm1, %xmm0
ucomisd %xmm2, %xmm0
jb 0x1b19e
sqrtsd %xmm0, %xmm0
jmp 0x1b1a3
callq 0x31b0
movsd %xmm0, 0x1c485(%rip)    # 0x37630
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq