// File: jamesliu516[P]amrdg2d/outputgrid.cpp
// Function: outputcell_new(int)
void outputcell_new(int ij)//output mesh
{
//
	ofstream fpxx;

	string proxfile1(FILE_PROX);
		
	string  str1=str0+proxfile1;
	
	ostringstream omess1;
	
	omess1 << str1<<"mesh_tn" << ij<<".plt";
	
	fpxx.open(omess1.str().c_str());

        fpxx<<"TITLE =\"EULER SOLVER\"\n"
        <<"VARIABLES = \"X\", \"Y\"\n"
        <<"ZONE N=   "<<points4out.size() << ", E=    "<< cellPoints.size()<< ", F=FEPOINT, ET=QUADRILATERAL\n";  
        
	for(vector<pointInCell>::size_type j=0;j!=points4out.size();++j)
	{
	  fpxx<<points4out[j].pt[0]<<"      "<<points4out[j].pt[1]<<"\n";
	}
	for(map<OctCell *, cellPointIndex> ::iterator ik=cellPoints.begin();ik!=cellPoints.end(); ++ik)
	{
		for(int i=0;i<4;i++)
		{
		    fpxx<<ik->second.iPoint[i]<<"   ";

		}
		fpxx<<"\n";
	}
	
/*    fpxx<<"\n\n";	
    fpxx<<"TITLE =\"Wall Points\"\n"
        <<"VARIABLES = \"X\", \"Y\"\n"
        <<"ZONE I=   "<<NPOINTCIRCLE<< ", F=POINT\n";  

    for(int ii=0; ii< NPOINTCIRCLE; ++ii) {
        fpxx<<Circle[ii].x<<"  "<<Circle[ii].y<<endl;
    }	
*/	
	
	fpxx.close();
}

// Assembly:
subq $0x4a8, %rsp            # imm = 0x4A8
movl %edi, 0x4a4(%rsp)
leaq 0x2a0(%rsp), %rdi
callq 0x3410
leaq 0x27f(%rsp), %rdi
movq %rdi, 0x88(%rsp)
callq 0x3450
movq 0x88(%rsp), %rdx
leaq 0x2fba1(%rip), %rsi     # 0x3f220
leaq 0x280(%rsp), %rdi
callq 0x6330
jmp 0xf68e
leaq 0x27f(%rsp), %rdi
callq 0x32b0
leaq 0x4128e(%rip), %rsi     # 0x50930
leaq 0x248(%rsp), %rdi
leaq 0x280(%rsp), %rdx
callq 0x113d0
jmp 0xf6b9
leaq 0xd0(%rsp), %rdi
callq 0x3360
jmp 0xf6c8
leaq 0xd0(%rsp), %rdi
leaq 0x248(%rsp), %rsi
callq 0x3220
movq %rax, 0x80(%rsp)
jmp 0xf6e7
movq 0x80(%rsp), %rdi
leaq 0x2fb9d(%rip), %rsi     # 0x3f293
callq 0x3240
movq %rax, 0x78(%rsp)
jmp 0xf702
movq 0x78(%rsp), %rdi
movl 0x4a4(%rsp), %esi
callq 0x3420
movq %rax, 0x70(%rsp)
jmp 0xf71a
movq 0x70(%rsp), %rdi
leaq 0x2fafd(%rip), %rsi     # 0x3f223
callq 0x3240
jmp 0xf72d
leaq 0xb0(%rsp), %rdi
leaq 0xd0(%rsp), %rsi
callq 0x3270
jmp 0xf744
leaq 0xb0(%rsp), %rdi
callq 0x3110
movq %rax, %rsi
leaq 0x2a0(%rsp), %rdi
movl $0x10, %edx
callq 0x3050
jmp 0xf768
leaq 0xb0(%rsp), %rdi
callq 0x34d8
leaq 0x2faac(%rip), %rsi     # 0x3f228
leaq 0x2a0(%rsp), %rdi
callq 0x3240
movq %rax, 0x68(%rsp)
jmp 0xf790
movq 0x68(%rsp), %rdi
leaq 0x2faa3(%rip), %rsi     # 0x3f23f
callq 0x3240
movq %rax, 0x60(%rsp)
jmp 0xf7a8
movq 0x60(%rsp), %rdi
leaq 0x2faa1(%rip), %rsi     # 0x3f255
callq 0x3240
movq %rax, 0x58(%rsp)
jmp 0xf7c0
leaq 0x40fc1(%rip), %rdi     # 0x50788
callq 0xe810
movq 0x58(%rsp), %rdi
movq %rax, %rsi
callq 0x30a0
movq %rax, 0x50(%rsp)
jmp 0xf7e0
movq 0x50(%rsp), %rdi
leaq 0x2faaf(%rip), %rsi     # 0x3f29b
callq 0x3240
movq %rax, 0x48(%rsp)
jmp 0xf7f8
leaq 0x40f59(%rip), %rdi     # 0x50758
callq 0xb5a0
movq 0x48(%rsp), %rdi
movq %rax, %rsi
callq 0x30a0
movq %rax, 0x40(%rsp)
jmp 0xf818
movq 0x40(%rsp), %rdi
leaq 0x2fa44(%rip), %rsi     # 0x3f268
callq 0x3240
jmp 0xf82b
movq $0x0, 0xa8(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x38(%rsp)
leaq 0x40f3d(%rip), %rdi     # 0x50788
callq 0xe810
movq %rax, %rcx
movq 0x38(%rsp), %rax
cmpq %rcx, %rax
je 0xf9c2
movq 0xa8(%rsp), %rsi
leaq 0x40f18(%rip), %rdi     # 0x50788
callq 0xbaf0
movq %rax, %rdi
xorl %esi, %esi
callq 0x1e9b0
movq %rax, 0x30(%rsp)
jmp 0xf886
movq 0x30(%rsp), %rax
movsd (%rax), %xmm0
leaq 0x2a0(%rsp), %rdi
callq 0x3480
movq %rax, 0x28(%rsp)
jmp 0xf8a3
movq 0x28(%rsp), %rdi
leaq 0x303da(%rip), %rsi     # 0x3fc89
callq 0x3240
movq %rax, 0x20(%rsp)
jmp 0xf8bb
movq 0xa8(%rsp), %rsi
leaq 0x40ebe(%rip), %rdi     # 0x50788
callq 0xbaf0
movq %rax, %rdi
movl $0x1, %esi
callq 0x1e9b0
movq %rax, 0x18(%rsp)
jmp 0xf8e3
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rax
movsd (%rax), %xmm0
callq 0x3480
movq %rax, 0x10(%rsp)
jmp 0xf8fd
movq 0x10(%rsp), %rdi
leaq 0x2f9e1(%rip), %rsi     # 0x3f2ea
callq 0x3240
jmp 0xf910
jmp 0xf912
movq 0xa8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0xa8(%rsp)
jmp 0xf837
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0x27f(%rsp), %rdi
callq 0x32b0
jmp 0xfb0e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xfb01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xfaf4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
jmp 0xfae7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x270(%rsp)
movl %eax, 0x26c(%rsp)
leaq 0xb0(%rsp), %rdi
callq 0x34d8
jmp 0xfae7
leaq 0x40d8f(%rip), %rdi     # 0x50758
callq 0xb5d0
movq %rax, 0xa0(%rsp)
leaq 0x40d7b(%rip), %rdi     # 0x50758
callq 0xb620
movq %rax, 0x98(%rsp)
leaq 0xa0(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0xb600
testb $0x1, %al
jne 0xfa08
jmp 0xfa9c
movl $0x0, 0x94(%rsp)
cmpl $0x4, 0x94(%rsp)
jge 0xfa72
leaq 0xa0(%rsp), %rdi
callq 0xb650
movslq 0x94(%rsp), %rcx
movl 0x8(%rax,%rcx,4), %esi
leaq 0x2a0(%rsp), %rdi
callq 0x3420
movq %rax, 0x8(%rsp)
jmp 0xfa4a
movq 0x8(%rsp), %rdi
leaq 0x30236(%rip), %rsi     # 0x3fc8c
callq 0x3240
jmp 0xfa5d
jmp 0xfa5f
movl 0x94(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x94(%rsp)
jmp 0xfa13
leaq 0x2f871(%rip), %rsi     # 0x3f2ea
leaq 0x2a0(%rsp), %rdi
callq 0x3240
jmp 0xfa88
jmp 0xfa8a
leaq 0xa0(%rsp), %rdi
callq 0xbac0
jmp 0xf9d6
leaq 0x2a0(%rsp), %rdi
callq 0x3390
jmp 0xfaab
leaq 0xd0(%rsp), %rdi
callq 0x30b0
leaq 0x248(%rsp), %rdi
callq 0x34d8
leaq 0x280(%rsp), %rdi
callq 0x34d8
leaq 0x2a0(%rsp), %rdi
callq 0x33b0
addq $0x4a8, %rsp            # imm = 0x4A8
retq
leaq 0xd0(%rsp), %rdi
callq 0x30b0
leaq 0x248(%rsp), %rdi
callq 0x34d8
leaq 0x280(%rsp), %rdi
callq 0x34d8
leaq 0x2a0(%rsp), %rdi
callq 0x33b0
movq 0x270(%rsp), %rdi
callq 0x3440
nopl (%rax,%rax)