// File: /workspace/github_cpp_makefile_star2_O2/jamesliu516[P]amrdg2d/outputgrid.cpp
// Function: outputcell(int)
void outputcell(int ij)
{
//
	ofstream fpxx;

	string proxfile1(FILE_PROX);
		
	string  str1=str0+proxfile1;
	
	ostringstream omess1;
	
	omess1 << str1 << ij<<".plt";
	
	//fpxx.open(filename1[ljm]);
	fpxx.open(omess1.str().c_str());
	
//
	long i;
	long k,j;
	
	Node *current;
	OctCell *lsbl;
	current = HeadListAllGrid;
	
	pointOutput=new PointJBoutput[NpointForOutput];
	cellOutput=new ControlCellOutput[NpointForOutput];

	while(current != NULL)
	{
		
		lsbl = current->cell;
		if(lsbl->flag % 2 == 0 && current->flg<=2 ) 
			PrintNode_bk(lsbl);
		current = current->next;
	}

//	for(i=1;i<=Nx*Ny;i++)
//	{
//		PrintNode(&bodygrid[i]);
//	}

        fpxx<<"TITLE =\"EULER SOLVER\"\n"
        <<"VARIABLES = \"X\", \"Y\"\n"
        <<"ZONE N=   "<<Np-1 << ",E=    "<<   NU-1<< ", F=FEPOINT, ET=QUADRILATERAL\n";  
        
         cout<<"Np= "<<Np-1<<", NU= "<<NU-1<<endl;
         
//	fprintf(fp,"TITLE = \" Bodygrid \"\n");
//	fprintf(fp,"VARIABLES = \"X\", \"Y\"\n");
//	fprintf(fp,"ZONE N=\t%d ,E=\t%d , F=FEPOINT, ET=QUADRILATERAL\n",Np-1,NU-1);
//	printf("Np=%d,NU=%d\n",Np,NU);

//	getch();
	for(j=1;j<Np;j++)
	{
	  fpxx<<pointOutput[j].x<<"      "<<pointOutput[j].y<<"\n";
     //   fprintf(fp,"%15.8e\t%15.8e\n",point[j].x,point[j].y);
	}
	for(k=1;k<NU;k++)
	{
		for(i=0;i<4;i++)
		{
		   //fprintf(fp,"%d\t",cell[k].cpoint[i]);
		    fpxx<<cellOutput[k].cpoint[i]<<"   ";

		}
		//fprintf(fp,"\n");
		fpxx<<"\n";
	}
	fpxx.close();
	
	delete[] pointOutput;
	delete[] cellOutput;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x3d8, %rsp            # imm = 0x3D8
movl %edi, %ebx
leaq 0x1d8(%rsp), %rdi
callq 0x3320
leaq 0x13f14(%rip), %rsi     # 0x1b250
leaq 0x40(%rsp), %rdi
leaq 0x60(%rsp), %rdx
callq 0x4b4e
leaq 0x2154e(%rip), %rsi     # 0x288a0
leaq 0x20(%rsp), %rdi
leaq 0x40(%rsp), %rdx
callq 0x8415
leaq 0x60(%rsp), %rdi
callq 0x3260
leaq 0x60(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x31b0
movq %rax, %rdi
movl %ebx, %esi
callq 0x3330
leaq 0x13ec8(%rip), %rsi     # 0x1b253
movq %rax, %rdi
callq 0x31d0
leaq 0x68(%rsp), %rsi
movq %rsp, %rdi
callq 0x32d0
movq (%rsp), %rsi
leaq 0x1d8(%rsp), %rdi
pushq $0x10
popq %rdx
callq 0x3040
movq %rsp, %rdi
callq 0x33b8
leaq 0x2124d(%rip), %rax     # 0x28610
movq (%rax), %rbx
movl $0xc35000, %edi         # imm = 0xC35000
callq 0x3030
movq %rax, 0x215a9(%rip)     # 0x28980
movl $0xc35000, %edi         # imm = 0xC35000
callq 0x3030
movq %rax, 0x215a0(%rip)     # 0x28988
testq %rbx, %rbx
je 0x740b
movq 0x8(%rbx), %rdi
testb $0x1, 0x1b0(%rdi)
jne 0x7405
cmpw $0x2, (%rbx)
jg 0x7405
callq 0x7170
movq 0x10(%rbx), %rbx
jmp 0x73e8
leaq 0x13e46(%rip), %rsi     # 0x1b258
leaq 0x1d8(%rsp), %rdi
callq 0x31d0
leaq 0x13e49(%rip), %rsi     # 0x1b26f
movq %rax, %rdi
callq 0x31d0
leaq 0x13e50(%rip), %rsi     # 0x1b285
movq %rax, %rdi
callq 0x31d0
movl 0x1bde5(%rip), %esi     # 0x23228
decl %esi
movq %rax, %rdi
callq 0x3330
leaq 0x13e3c(%rip), %rsi     # 0x1b290
movq %rax, %rdi
callq 0x31d0
movl 0x1bdca(%rip), %esi     # 0x2322c
decl %esi
movq %rax, %rdi
callq 0x3330
leaq 0x13e25(%rip), %rsi     # 0x1b298
movq %rax, %rdi
callq 0x31d0
movq 0x1bb3e(%rip), %rdi     # 0x22fc0
leaq 0x13e2e(%rip), %rsi     # 0x1b2b7
callq 0x31d0
movl 0x1bd94(%rip), %esi     # 0x23228
decl %esi
movq %rax, %rdi
callq 0x3330
leaq 0x13e17(%rip), %rsi     # 0x1b2bc
movq %rax, %rdi
callq 0x31d0
movl 0x1bd79(%rip), %esi     # 0x2322c
decl %esi
movq %rax, %rdi
callq 0x3330
movq %rax, %rdi
callq 0x30d0
pushq $0x1
popq %r12
xorl %r13d, %r13d
leaq 0x1d8(%rsp), %rbx
leaq 0x1489e(%rip), %r14     # 0x1bd79
leaq 0x13e38(%rip), %r15     # 0x1b31a
movslq 0x1bd3f(%rip), %rax     # 0x23228
cmpq %rax, %r12
jge 0x7539
movq 0x2148b(%rip), %rax     # 0x28980
movsd 0x10(%rax,%r13), %xmm0
movq %rbx, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r14, %rsi
callq 0x31d0
movq 0x2146a(%rip), %rcx     # 0x28980
movsd 0x18(%rcx,%r13), %xmm0
movq %rax, %rdi
callq 0x32e0
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
incq %r12
addq $0x10, %r13
jmp 0x74e2
pushq $0x1
popq %r12
pushq $0x10
popq %r13
leaq 0x13dd2(%rip), %rbx     # 0x1b31a
leaq 0x1d8(%rsp), %r14
leaq 0x14825(%rip), %r15     # 0x1bd7c
movslq 0x1bcce(%rip), %rax     # 0x2322c
cmpq %rax, %r12
jge 0x75a4
xorl %ebp, %ebp
cmpq $0x4, %rbp
je 0x7590
movq 0x21416(%rip), %rax     # 0x28988
addq %r13, %rax
movl (%rax,%rbp,4), %esi
movq %r14, %rdi
callq 0x3330
movq %rax, %rdi
movq %r15, %rsi
callq 0x31d0
incq %rbp
jmp 0x7565
movq %r14, %rdi
movq %rbx, %rsi
callq 0x31d0
incq %r12
addq $0x10, %r13
jmp 0x7557
leaq 0x1d8(%rsp), %rdi
callq 0x3280
movq 0x213c8(%rip), %rdi     # 0x28980
testq %rdi, %rdi
je 0x75c2
callq 0x3250
movq 0x213bf(%rip), %rdi     # 0x28988
testq %rdi, %rdi
je 0x75d3
callq 0x3250
leaq 0x60(%rsp), %rdi
callq 0x3070
leaq 0x20(%rsp), %rdi
callq 0x33b8
leaq 0x40(%rsp), %rdi
callq 0x33b8
leaq 0x1d8(%rsp), %rdi
callq 0x32a0
addq $0x3d8, %rsp            # imm = 0x3D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x33b8
jmp 0x7639
jmp 0x7636
movq %rax, %rbx
jmp 0x7643
movq %rax, %rbx
jmp 0x764d
movq %rax, %rbx
jmp 0x7657
jmp 0x7636
jmp 0x7636
jmp 0x7636
jmp 0x7636
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x3070
leaq 0x20(%rsp), %rdi
callq 0x33b8
leaq 0x40(%rsp), %rdi
callq 0x33b8
leaq 0x1d8(%rsp), %rdi
callq 0x32a0
movq %rbx, %rdi
callq 0x3350