// File: /workspace/github_cpp_makefile_star2_O3/jamesliu516[P]amrdg2d/farfield_boundary.cpp
// Function: getInletOutletBndry(bodygridclass*, int)
void getInletOutletBndry(OctCell *ghostcell, int in2out)
{
    double nx,ny;
    double speed, a, vbn=0.0;
    PXYZ symtrcpt; 
    PXYZ ghostpt, plsA, plsB;
    int i1,j1;

    //Rieman problem������
    //    double dil,dir,ui,prei;
    JBBL jb1,jb2; 

    SHBL sh;

    //	OctCell *leafp;
    OctCell *pincell=NULL;
    vector< OctCell * > grid;


    ghostpt.x = ghostcell->xc1;
    ghostpt.y = ghostcell->yc1;	
    if(in2out==0){
        jb2=State_l;

        jbblToShbl(&jb2, &sh);

        ghostcell->dof[0][0] = sh.q;
        ghostcell->dof[1][0]= sh.qu;
        ghostcell->dof[2][0]= sh.qv;
        ghostcell->dof[3][0]= sh.te;
        for( i1=0; i1<4; ++i1) 
            for(j1=1; j1<nDOF; ++j1)
                ghostcell->dof[i1][j1]=0.0;

    }
    else {
        symtrcpt.x=2.0*xOutlet-ghostpt.x;
        symtrcpt.y=ghostpt.y;
        nx=-1.0;
        ny=0.0;
        getGridIndex2(ghostcell, &symtrcpt, pincell);
        findIntpltCell(pincell, ghostpt, symtrcpt, grid);
        chazhi4smtrictPshbl(grid, symtrcpt, jb1); 
        jbblToShbl(&jb1, &sh);

        ghostcell->dof[0][0] = sh.q;
        ghostcell->dof[1][0]= sh.qu;
        ghostcell->dof[2][0]= sh.qv;
        ghostcell->dof[3][0]= sh.te;
        for( i1=0; i1<4; ++i1) 
            for(j1=1; j1<nDOF; ++j1)
                ghostcell->dof[i1][j1]=0.0;
    }
}

// Assembly:
pushq %rbx
subq $0x70, %rsp
movq %rdi, %rbx
xorpd %xmm0, %xmm0
movapd %xmm0, 0x40(%rsp)
movapd %xmm0, 0x30(%rsp)
xorl %eax, %eax
movq %rax, 0x8(%rsp)
movq %rax, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
movupd 0x278(%rdi), %xmm1
movapd %xmm1, 0x60(%rsp)
testl %esi, %esi
je 0x15bca
movsd 0x7ecb(%rip), %xmm0     # 0x1d970
subsd %xmm1, %xmm0
leaq 0x50(%rsp), %rsi
movsd %xmm0, (%rsi)
movhpd %xmm1, 0x8(%rsi)
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x1298d
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x50(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x12cbd
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %rsi
leaq 0x30(%rsp), %rdx
callq 0x13746
movsd 0x30(%rsp), %xmm1
movsd 0x38(%rsp), %xmm0
movsd 0x40(%rsp), %xmm2
movapd %xmm1, %xmm3
movsd 0x48(%rsp), %xmm4
movsd 0x7633(%rip), %xmm5     # 0x1d148
mulsd %xmm1, %xmm5
movsd %xmm1, 0x30(%rbx)
mulsd %xmm0, %xmm1
mulsd %xmm2, %xmm3
divsd 0x767a(%rip), %xmm4     # 0x1d1a8
mulsd %xmm2, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm4, %xmm0
movsd %xmm1, 0x60(%rbx)
movsd %xmm3, 0x90(%rbx)
movsd %xmm0, 0xc0(%rbx)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x38(%rbx)
movupd %xmm0, 0x48(%rbx)
xorl %eax, %eax
movq %rax, 0x58(%rbx)
movupd %xmm0, 0x68(%rbx)
movupd %xmm0, 0x78(%rbx)
movq %rax, 0x88(%rbx)
movupd %xmm0, 0x98(%rbx)
movupd %xmm0, 0xa8(%rbx)
movq %rax, 0xb8(%rbx)
movupd %xmm0, 0xc8(%rbx)
movupd %xmm0, 0xd8(%rbx)
movq %rax, 0xe8(%rbx)
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15c81
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
jmp 0x15c81
leaq 0x13cef(%rip), %rax     # 0x298c0
movsd (%rax), %xmm2
movsd 0x8(%rax), %xmm1
movsd 0x10(%rax), %xmm3
movsd 0x18(%rax), %xmm4
movapd %xmm2, %xmm5
movsd 0x7558(%rip), %xmm6     # 0x1d148
mulsd %xmm2, %xmm6
movsd %xmm2, 0x30(%rbx)
mulsd %xmm1, %xmm2
mulsd %xmm3, %xmm5
divsd 0x759f(%rip), %xmm4     # 0x1d1a8
mulsd %xmm3, %xmm3
mulsd %xmm1, %xmm1
addsd %xmm3, %xmm1
mulsd %xmm6, %xmm1
addsd %xmm4, %xmm1
movsd %xmm2, 0x60(%rbx)
movsd %xmm5, 0x90(%rbx)
movsd %xmm1, 0xc0(%rbx)
movupd %xmm0, 0x38(%rbx)
movupd %xmm0, 0x48(%rbx)
xorl %eax, %eax
movq %rax, 0x58(%rbx)
movupd %xmm0, 0x68(%rbx)
movupd %xmm0, 0x78(%rbx)
movq %rax, 0x88(%rbx)
movupd %xmm0, 0x98(%rbx)
movupd %xmm0, 0xa8(%rbx)
movq %rax, 0xb8(%rbx)
movupd %xmm0, 0xc8(%rbx)
movupd %xmm0, 0xd8(%rbx)
movq %rax, 0xe8(%rbx)
addq $0x70, %rsp
popq %rbx
retq
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x15ca1
movq 0x20(%rsp), %rsi
subq %rdi, %rsi
callq 0x3220
movq %rbx, %rdi
callq 0x3370