// File: /workspace/github_cpp_makefile_star2_O2/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
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
movaps %xmm0, 0x50(%rsp)
andq $0x0, 0x8(%rsp)
movaps %xmm0, 0x40(%rsp)
andq $0x0, 0x20(%rsp)
movaps %xmm0, 0x10(%rsp)
movupd 0x278(%rdi), %xmm0
movapd %xmm0, 0x60(%rsp)
testl %esi, %esi
je 0x14114
movsd 0x7969(%rip), %xmm1     # 0x1b9a0
subsd %xmm0, %xmm1
leaq 0x30(%rsp), %rsi
movsd %xmm1, (%rsi)
movhpd %xmm0, 0x8(%rsi)
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
callq 0x11446
movq 0x8(%rsp), %rdi
leaq 0x60(%rsp), %rsi
leaq 0x30(%rsp), %rdx
leaq 0x10(%rsp), %rcx
callq 0x1171f
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x40(%rsp), %rdx
callq 0x11f43
movsd 0x40(%rsp), %xmm1
movsd 0x48(%rsp), %xmm0
movsd 0x50(%rsp), %xmm2
movapd %xmm1, %xmm3
movsd 0x58(%rsp), %xmm4
movsd 0x70d1(%rip), %xmm5     # 0x1b178
mulsd %xmm1, %xmm5
movsd %xmm1, 0x30(%rbx)
mulsd %xmm0, %xmm1
mulsd %xmm2, %xmm3
divsd 0x7168(%rip), %xmm4     # 0x1b228
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)
addq $0x38, %rbx
xorl %eax, %eax
cmpq $0x4, %rax
je 0x141a3
xorl %ecx, %ecx
cmpq $0x5, %rcx
je 0x1410b
andq $0x0, (%rbx,%rcx,8)
incq %rcx
jmp 0x140fb
incq %rax
addq $0x30, %rbx
jmp 0x140ef
leaq 0x147a5(%rip), %rax     # 0x288c0
movsd (%rax), %xmm1
movsd 0x8(%rax), %xmm0
movsd 0x10(%rax), %xmm2
movsd 0x18(%rax), %xmm3
movapd %xmm1, %xmm4
movsd 0x703e(%rip), %xmm5     # 0x1b178
mulsd %xmm1, %xmm5
movsd %xmm1, 0x30(%rbx)
mulsd %xmm0, %xmm1
mulsd %xmm2, %xmm4
divsd 0x70d5(%rip), %xmm3     # 0x1b228
mulsd %xmm2, %xmm2
mulsd %xmm0, %xmm0
addsd %xmm2, %xmm0
mulsd %xmm5, %xmm0
addsd %xmm3, %xmm0
movsd %xmm1, 0x60(%rbx)
movsd %xmm4, 0x90(%rbx)
movsd %xmm0, 0xc0(%rbx)
addq $0x38, %rbx
xorl %eax, %eax
cmpq $0x4, %rax
je 0x141a3
xorl %ecx, %ecx
cmpq $0x5, %rcx
je 0x1419a
andq $0x0, (%rbx,%rcx,8)
incq %rcx
jmp 0x1418a
incq %rax
addq $0x30, %rbx
jmp 0x14182
leaq 0x10(%rsp), %rdi
callq 0x4cba
addq $0x70, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4cba
movq %rbx, %rdi
callq 0x3350