// File: /workspace/github_cpp_makefile_star2_O1/jamesliu516[P]amrdg2d/amr_grid_treat.cpp
// Function: refineCicleDemain(int)
void refineCicleDemain(int rfN)// 1,2,3,4,5�μ���
{
	int i;
	int jk1,jk2,jk3,jk4,jk5;

	switch(rfN)
	{	
	case 5: 
		for(i=1;i<=Nx*Ny;i++) 
		{			
			if(jk1=(bodygrid[i].xc1 >= Ellipse_x - 2 * hx && bodygrid[i].xc1 <= Ellipse_x1 + 2 * hx		    
				&& bodygrid[i].yc1 >= Ellipse_y - 2 * hy && bodygrid[i].yc1 <= Ellipse_y1 + 2 * hy))		
			{					
				refineOneCell(&bodygrid[i], 5);
			}		
			else if(jk2=((!jk1) && bodygrid[i].xc1 > Ellipse_x - 4*hx && bodygrid[i].xc1 <= Ellipse_x1 + 4*hx 					
				&& bodygrid[i].yc1 >= Ellipse_y-4*hy && bodygrid[i].yc1 <= Ellipse_y1+4*hy))	
			{					
				refineOneCell(&bodygrid[i], 4);						
			}	    
			else if(jk3=((!jk2) && bodygrid[i].xc1 > Ellipse_x-6*hx && bodygrid[i].xc1 <= Ellipse_x1 + 6*hx 		   
				&& bodygrid[i].yc1 >=  Ellipse_y-6*hy && bodygrid[i].yc1 < Ellipse_y1 + 6*hy ) )
			{					
				refineOneCell(&bodygrid[i], 3);		
			}
			else if(jk4=((!jk3) && bodygrid[i].xc1 > Ellipse_x-8*hx && bodygrid[i].xc1 <= Ellipse_x1 + 8*hx 		   
				&& bodygrid[i].yc1 >=  Ellipse_y-8*hy && bodygrid[i].yc1 < Ellipse_y1 + 8*hy) )
			{					
				refineOneCell(&bodygrid[i], 2);		
			}				
			else if(jk5=((!jk4) && bodygrid[i].xc1 > Ellipse_x-10*hx && bodygrid[i].xc1 <= Ellipse_x1 + 10*hx 		   
				&& bodygrid[i].yc1 >=  Ellipse_y-10*hy && bodygrid[i].yc1 < Ellipse_y1 + 10*hy) )
			{					
				refineOneCell(&bodygrid[i], 1);		
			}				
		}
		break;

	case 4:
		for(i=1;i<=Nx*Ny;i++) 
		{			
			if(jk1=(bodygrid[i].xc1 >= Ellipse_x - 2 * hx && bodygrid[i].xc1 <= Ellipse_x1+ 2 * hx		    
				&& bodygrid[i].yc1 >= Ellipse_y - 2 * hy && bodygrid[i].yc1 <= Ellipse_y1 + 2 * hy))		
			{					
				refineOneCell(&bodygrid[i], 4);
			}		
			else if(jk2=((!jk1) && bodygrid[i].xc1 > Ellipse_x - 4*hx && bodygrid[i].xc1 <= Ellipse_x1 + 4*hx 					
				&& bodygrid[i].yc1 >= Ellipse_y-4*hy && bodygrid[i].yc1 <= Ellipse_y1+4*hy))	
			{					
				refineOneCell(&bodygrid[i], 3);						
			}	    
			else if(jk3=((!jk2) && bodygrid[i].xc1 > Ellipse_x-6*hx && bodygrid[i].xc1 <= Ellipse_x1+ 6*hx 		   
				&& bodygrid[i].yc1 >=  Ellipse_y-6*hy && bodygrid[i].yc1 < Ellipse_y1 + 6*hy ) )
			{					
				refineOneCell(&bodygrid[i], 2);		
			}
			else if(jk4=((!jk3) && bodygrid[i].xc1 > Ellipse_x-8*hx && bodygrid[i].xc1 <= Ellipse_x1 + 8*hx 		   
				&& bodygrid[i].yc1 >=  Ellipse_y-8*hy && bodygrid[i].yc1 < Ellipse_y1 + 8*hy) )
			{					
				refineOneCell(&bodygrid[i], 1);		
			}							
		}
		break;
	case 3:
		for(i=1;i<=Nx*Ny;i++) 
		{			
			if(jk1=(bodygrid[i].xc1 >= Ellipse_x - 2 * hx && bodygrid[i].xc1 <= Ellipse_x1 + 2 * hx		    
				&& bodygrid[i].yc1 >= Ellipse_y - 2 * hy && bodygrid[i].yc1 <= Ellipse_y1 + 2 * hy))		
			{					
				refineOneCell(&bodygrid[i], 3);
			}		
			else if(jk2=((!jk1) && bodygrid[i].xc1 > Ellipse_x - 4*hx && bodygrid[i].xc1 <= Ellipse_x1 + 4*hx 					
				&& bodygrid[i].yc1 >= Ellipse_y-4*hy && bodygrid[i].yc1 <= Ellipse_y1+4*hy))	
			{					
				refineOneCell(&bodygrid[i], 2);						
			}	    
			else if(jk3=((!jk2) && bodygrid[i].xc1 > Ellipse_x-6*hx && bodygrid[i].xc1 <= Ellipse_x1 + 6*hx 		   
				&& bodygrid[i].yc1 >=  Ellipse_y-6*hy && bodygrid[i].yc1 < Ellipse_y1 + 6*hy ) )
			{					
				refineOneCell(&bodygrid[i], 1);		
			}						
		}
		break;
	case 2:
		for(i=1;i<=Nx*Ny;i++) 
		{			
			if(jk1=(bodygrid[i].xc1 >= Ellipse_x - 2 * hx && bodygrid[i].xc1 <= Ellipse_x1 + 2 * hx		    
				&& bodygrid[i].yc1 >= Ellipse_y - 2 * hy && bodygrid[i].yc1 <= Ellipse_y1+ 2 * hy))		
			{					
				refineOneCell(&bodygrid[i], 2);
			}		
			else if(jk2=((!jk1) && bodygrid[i].xc1 > Ellipse_x - 4*hx && bodygrid[i].xc1 <= Ellipse_x1+ 4*hx 					
				&& bodygrid[i].yc1 >= Ellipse_y-4*hy && bodygrid[i].yc1 <= Ellipse_y1+4*hy))	
			{					
				refineOneCell(&bodygrid[i], 1);						
			}	    
		}
		break;
	case 1:
		for(i=1;i<=Nx*Ny;i++) 
		{			
			if(jk1=(bodygrid[i].xc1 >= Ellipse_x - 2 * hx && bodygrid[i].xc1 <= Ellipse_x1+ 2 * hx		    
				&& bodygrid[i].yc1 >= Ellipse_y - 2 * hy && bodygrid[i].yc1 <= Ellipse_y1+ 2 * hy))		
			{					
				refineOneCell(&bodygrid[i], 1);
			}		
		}
		break;
	default:
		cout<<"Only refine 1,2,3,4,5 time.\n";
		cout<<"You input: "<<rfN<<". No refine out domain.\n";
		break;
	}
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leal -0x1(%rbx), %eax
cmpl $0x4, %eax
ja 0xd1f9
leaq 0x11a56(%rip), %rcx     # 0x1e5e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x5e0, %ebx            # imm = 0x5E0
leaq 0x18741(%rip), %r14     # 0x252e0
movsd 0x11981(%rip), %xmm1    # 0x1e528
movsd 0x11981(%rip), %xmm2    # 0x1e530
movapd 0x11609(%rip), %xmm3    # 0x1e1c0
movsd 0x11979(%rip), %xmm4    # 0x1e538
movq (%r14), %rax
movsd -0x8(%rax,%rbx), %xmm0
ucomisd %xmm1, %xmm0
jb 0xcc18
ucomisd %xmm0, %xmm2
jb 0xcc18
movsd (%rax,%rbx), %xmm0
andpd %xmm3, %xmm0
ucomisd %xmm0, %xmm4
jb 0xcc18
leaq (%rax,%rbx), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
movl $0x1, %esi
callq 0xcaa9
movsd 0x11938(%rip), %xmm4    # 0x1e538
movapd 0x115b8(%rip), %xmm3    # 0x1e1c0
movsd 0x11920(%rip), %xmm2    # 0x1e530
movsd 0x11910(%rip), %xmm1    # 0x1e528
addq $0x360, %rbx            # imm = 0x360
cmpq $0x696d00, %rbx         # imm = 0x696D00
jne 0xcbbf
jmp 0xd1f1
movl $0x5e0, %ebx            # imm = 0x5E0
leaq 0x186a7(%rip), %r14     # 0x252e0
movsd 0x118e7(%rip), %xmm2    # 0x1e528
movsd 0x118e7(%rip), %xmm4    # 0x1e530
movq (%r14), %rax
movsd -0x8(%rax,%rbx), %xmm0
xorl %edx, %edx
ucomisd %xmm2, %xmm0
movl $0x0, %ecx
jb 0xcc94
ucomisd %xmm0, %xmm4
jb 0xcc94
movsd (%rax,%rbx), %xmm1
ucomisd 0x118ce(%rip), %xmm1    # 0x1e540
jb 0xcc94
xorl %ecx, %ecx
movsd 0x118ba(%rip), %xmm3    # 0x1e538
ucomisd %xmm1, %xmm3
setae %dil
movl $0x5, %esi
jae 0xcdf6
movb %dil, %cl
testl %ecx, %ecx
je 0xcd06
xorl %ecx, %ecx
movl $0x0, %edi
testl %edx, %edx
je 0xcd58
testl %edi, %edi
je 0xcdab
testl %ecx, %ecx
jne 0xce16
ucomisd 0x118e9(%rip), %xmm0    # 0x1e5a8
jbe 0xce16
movsd 0x118e3(%rip), %xmm1    # 0x1e5b0
ucomisd %xmm0, %xmm1
jb 0xce16
movsd (%rax,%rbx), %xmm0
ucomisd 0x118d4(%rip), %xmm0    # 0x1e5b8
jb 0xce16
movl $0x1, %esi
movsd 0x118c9(%rip), %xmm1    # 0x1e5c0
ucomisd %xmm0, %xmm1
ja 0xcdf6
jmp 0xce16
ucomisd 0x1183a(%rip), %xmm0    # 0x1e548
jbe 0xcc98
movsd 0x11838(%rip), %xmm1    # 0x1e550
ucomisd %xmm0, %xmm1
jb 0xcc98
movsd (%rax,%rbx), %xmm1
ucomisd 0x11831(%rip), %xmm1    # 0x1e560
jb 0xcc98
xorl %edx, %edx
movsd 0x11819(%rip), %xmm3    # 0x1e558
ucomisd %xmm1, %xmm3
setae %cl
movl $0x4, %esi
jae 0xcdf6
movb %cl, %dl
jmp 0xcc98
ucomisd 0x11808(%rip), %xmm0    # 0x1e568
jbe 0xcca7
movsd 0x11802(%rip), %xmm1    # 0x1e570
ucomisd %xmm0, %xmm1
jb 0xcca7
movsd (%rax,%rbx), %xmm1
ucomisd 0x117f3(%rip), %xmm1    # 0x1e578
jb 0xcca7
xorl %edi, %edi
movsd 0x117eb(%rip), %xmm3    # 0x1e580
ucomisd %xmm1, %xmm3
seta %dl
movl $0x3, %esi
ja 0xcdf6
movb %dl, %dil
jmp 0xcca7
ucomisd 0x117d5(%rip), %xmm0    # 0x1e588
jbe 0xccaf
movsd 0x117cf(%rip), %xmm1    # 0x1e590
ucomisd %xmm0, %xmm1
jb 0xccaf
movsd (%rax,%rbx), %xmm1
ucomisd 0x117c0(%rip), %xmm1    # 0x1e598
jb 0xccaf
xorl %ecx, %ecx
movsd 0x117b8(%rip), %xmm3    # 0x1e5a0
ucomisd %xmm1, %xmm3
seta %dl
movl $0x2, %esi
jbe 0xce2f
leaq (%rax,%rbx), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0xcaa9
movsd 0x11722(%rip), %xmm4    # 0x1e530
movsd 0x11712(%rip), %xmm2    # 0x1e528
addq $0x360, %rbx            # imm = 0x360
cmpq $0x696d00, %rbx         # imm = 0x696D00
jne 0xcc49
jmp 0xd1f1
movb %dl, %cl
jmp 0xccaf
movl $0x5e0, %ebx            # imm = 0x5E0
leaq 0x1849e(%rip), %r14     # 0x252e0
movsd 0x116de(%rip), %xmm2    # 0x1e528
movsd 0x116de(%rip), %xmm4    # 0x1e530
movsd 0x116e6(%rip), %xmm5    # 0x1e540
movq (%r14), %rax
movsd -0x8(%rax,%rbx), %xmm0
xorl %ecx, %ecx
ucomisd %xmm2, %xmm0
movl $0x0, %edx
jb 0xcea1
ucomisd %xmm0, %xmm4
jb 0xcea1
movsd (%rax,%rbx), %xmm1
ucomisd %xmm5, %xmm1
jb 0xcea1
xorl %edx, %edx
movsd 0x116ad(%rip), %xmm3    # 0x1e538
ucomisd %xmm1, %xmm3
setae %dil
movl $0x3, %esi
jae 0xcf30
movb %dil, %dl
testl %edx, %edx
je 0xcef1
testl %ecx, %ecx
jne 0xcf58
ucomisd 0x116b3(%rip), %xmm0    # 0x1e568
jbe 0xcf58
movsd 0x116ad(%rip), %xmm1    # 0x1e570
ucomisd %xmm0, %xmm1
jb 0xcf58
movsd (%rax,%rbx), %xmm0
ucomisd 0x1169e(%rip), %xmm0    # 0x1e578
jb 0xcf58
movl $0x1, %esi
movsd 0x11697(%rip), %xmm1    # 0x1e580
ucomisd %xmm0, %xmm1
ja 0xcf30
jmp 0xcf58
ucomisd 0x1164f(%rip), %xmm0    # 0x1e548
jbe 0xcea5
movsd 0x1164d(%rip), %xmm1    # 0x1e550
ucomisd %xmm0, %xmm1
jb 0xcea5
movsd (%rax,%rbx), %xmm1
ucomisd 0x1164a(%rip), %xmm1    # 0x1e560
jb 0xcea5
xorl %ecx, %ecx
movsd 0x11636(%rip), %xmm3    # 0x1e558
ucomisd %xmm1, %xmm3
setae %dl
movl $0x2, %esi
jb 0xcf71
leaq (%rax,%rbx), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0xcaa9
movsd 0x115f8(%rip), %xmm5    # 0x1e540
movsd 0x115e0(%rip), %xmm4    # 0x1e530
movsd 0x115d0(%rip), %xmm2    # 0x1e528
addq $0x360, %rbx            # imm = 0x360
cmpq $0x696d00, %rbx         # imm = 0x696D00
jne 0xce5a
jmp 0xd1f1
movb %dl, %cl
jmp 0xcea5
movl $0x5e0, %ebx            # imm = 0x5E0
leaq 0x1835c(%rip), %r14     # 0x252e0
movsd 0x1159c(%rip), %xmm2    # 0x1e528
movsd 0x1159c(%rip), %xmm4    # 0x1e530
movq (%r14), %rax
movsd -0x8(%rax,%rbx), %xmm0
xorl %ecx, %ecx
ucomisd %xmm2, %xmm0
movl $0x0, %edx
jb 0xcfdf
ucomisd %xmm0, %xmm4
jb 0xcfdf
movsd (%rax,%rbx), %xmm1
ucomisd 0x11583(%rip), %xmm1    # 0x1e540
jb 0xcfdf
xorl %edx, %edx
movsd 0x1156f(%rip), %xmm3    # 0x1e538
ucomisd %xmm1, %xmm3
setae %dil
movl $0x4, %esi
jae 0xd0d9
movb %dil, %dl
testl %edx, %edx
je 0xd044
xorl %edx, %edx
testl %ecx, %ecx
je 0xd08e
testl %edx, %edx
jne 0xd0f9
ucomisd 0x1158b(%rip), %xmm0    # 0x1e588
jbe 0xd0f9
movsd 0x11585(%rip), %xmm1    # 0x1e590
ucomisd %xmm0, %xmm1
jb 0xd0f9
movsd (%rax,%rbx), %xmm0
ucomisd 0x11576(%rip), %xmm0    # 0x1e598
jb 0xd0f9
movl $0x1, %esi
movsd 0x1156b(%rip), %xmm1    # 0x1e5a0
ucomisd %xmm0, %xmm1
ja 0xd0d9
jmp 0xd0f9
ucomisd 0x114fc(%rip), %xmm0    # 0x1e548
jbe 0xcfe3
movsd 0x114fa(%rip), %xmm1    # 0x1e550
ucomisd %xmm0, %xmm1
jb 0xcfe3
movsd (%rax,%rbx), %xmm1
ucomisd 0x114f7(%rip), %xmm1    # 0x1e560
jb 0xcfe3
xorl %ecx, %ecx
movsd 0x114df(%rip), %xmm3    # 0x1e558
ucomisd %xmm1, %xmm3
setae %dl
movl $0x3, %esi
jae 0xd0d9
movb %dl, %cl
jmp 0xcfe3
ucomisd 0x114d2(%rip), %xmm0    # 0x1e568
jbe 0xcfed
movsd 0x114cc(%rip), %xmm1    # 0x1e570
ucomisd %xmm0, %xmm1
jb 0xcfed
movsd (%rax,%rbx), %xmm1
ucomisd 0x114bd(%rip), %xmm1    # 0x1e578
jb 0xcfed
xorl %edx, %edx
movsd 0x114b5(%rip), %xmm3    # 0x1e580
ucomisd %xmm1, %xmm3
seta %cl
movl $0x2, %esi
jbe 0xd112
leaq (%rax,%rbx), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0xcaa9
movsd 0x1143f(%rip), %xmm4    # 0x1e530
movsd 0x1142f(%rip), %xmm2    # 0x1e528
addq $0x360, %rbx            # imm = 0x360
cmpq $0x696d00, %rbx         # imm = 0x696D00
jne 0xcf94
jmp 0xd1f1
movb %cl, %dl
jmp 0xcfed
movl $0x5e0, %ebx            # imm = 0x5E0
leaq 0x181bb(%rip), %r14     # 0x252e0
movsd 0x113fb(%rip), %xmm2    # 0x1e528
movsd 0x113fb(%rip), %xmm3    # 0x1e530
movsd 0x11403(%rip), %xmm4    # 0x1e540
movq (%r14), %rax
movsd -0x8(%rax,%rbx), %xmm0
xorl %ecx, %ecx
ucomisd %xmm2, %xmm0
jb 0xd179
ucomisd %xmm0, %xmm3
jb 0xd179
movsd (%rax,%rbx), %xmm1
ucomisd %xmm4, %xmm1
jb 0xd179
xorl %ecx, %ecx
movsd 0x113cf(%rip), %xmm5    # 0x1e538
ucomisd %xmm1, %xmm5
setae %dl
movl $0x2, %esi
jae 0xd1b5
movb %dl, %cl
testl %ecx, %ecx
jne 0xd1dd
ucomisd 0x113c3(%rip), %xmm0    # 0x1e548
jbe 0xd1dd
movsd 0x113c1(%rip), %xmm1    # 0x1e550
ucomisd %xmm0, %xmm1
jb 0xd1dd
movsd (%rax,%rbx), %xmm0
andpd 0x1101e(%rip), %xmm0    # 0x1e1c0
movl $0x1, %esi
movsd 0x113a9(%rip), %xmm1    # 0x1e558
ucomisd %xmm0, %xmm1
jb 0xd1dd
leaq (%rax,%rbx), %rdi
addq $-0x280, %rdi           # imm = 0xFD80
callq 0xcaa9
movsd 0x11373(%rip), %xmm4    # 0x1e540
movsd 0x1135b(%rip), %xmm3    # 0x1e530
movsd 0x1134b(%rip), %xmm2    # 0x1e528
addq $0x360, %rbx            # imm = 0x360
cmpq $0x696d00, %rbx         # imm = 0x696D00
jne 0xd13d
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x17dc8(%rip), %r14     # 0x24fc8
leaq 0x113ed(%rip), %rsi     # 0x1e5f4
movl $0x1c, %edx
movq %r14, %rdi
callq 0x3250
leaq 0x113f6(%rip), %rsi     # 0x1e611
movl $0xb, %edx
movq %r14, %rdi
callq 0x3250
movq %r14, %rdi
movl %ebx, %esi
callq 0x3350
leaq 0x113e4(%rip), %rsi     # 0x1e61d
movl $0x18, %edx
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x3250
nopl (%rax)