// File: /workspace/github_cpp_makefile_star2_O3/hobbitsyfeet[P]Turn/chart.cc
// Function: Chart::displayRange(int, int, int)
void Chart::displayRange(int centrePosX,int centrePosY, int radius){

  vector<vector<container> >::iterator row;
  vector<container>::iterator col;
  int dist;
  for(row = world.begin(); row < world.end() ; row++){
    for(col = row->begin(); col < row->end(); col++){
      dist = sqrt( ( (col->getPosX() - centrePosX)*(col->getPosX() - centrePosX) )
		   + 	 ( col->getPosY() - centrePosY)*(col->getPosY() - centrePosY) );



      if(getFogOfWar()){
	if(dist <= radius){
	  if(centrePosX == col->getPosX() && centrePosY == col->getPosY()){
	    cout<<"P ";
    }
    else if(col->checkAvailable() == true && canEnter( col->getPosX(),col->getPosY() ) == true){
      cout<<"p ";
    }
	  else{
	    if(col->getGeoType()=='-' || col->getGeoType() =='O')
	      cout<<' ';
	    else
	      col->displayType();
	    cout<<' ';
	  }
	}
	else
	  cout<<"- ";
      }
      else{
	if(centrePosX == col->getPosX() && centrePosY == col->getPosY())
	  cout<<"P ";

	else{
	  if(col->getGeoType()=='-' || col->getGeoType() =='O')
	    cout<<"  ";
	  else{
	    col->displayType();
	    cout<<' ';
	  }
	}
      }
    }
    cout<<endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %ecx, -0x4c(%rbp)
movl %esi, -0x50(%rbp)
movq (%rdi), %r15
cmpq 0x8(%rdi), %r15
jae 0x868d
movl %edx, %r12d
movq %rdi, %r14
movq 0x6b1f(%rip), %r13      # 0xefd0
movl %edx, -0x34(%rbp)
movq %rdi, -0x40(%rbp)
movq (%r15), %rbx
cmpq 0x8(%r15), %rbx
jae 0x8657
movq %r15, -0x48(%rbp)
cmpb $0x1, 0x38(%r14)
movl -0x50(%rbp), %edx
jne 0x8517
movslq 0x4(%rbx), %r14
movl %r14d, %eax
subl %r12d, %eax
imull %eax, %eax
movslq (%rbx), %r15
movl %r15d, %ecx
subl %edx, %ecx
imull %ecx, %ecx
addl %eax, %ecx
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
sqrtsd %xmm0, %xmm0
cvttsd2si %xmm0, %eax
cmpl -0x4c(%rbp), %eax
jle 0x855b
movl $0x2, %edx
movq %r13, %rdi
leaq 0x3229(%rip), %rsi      # 0xb739
callq 0x2230
jmp 0x8582
cmpl %edx, (%rbx)
jne 0x8535
cmpl %r12d, 0x4(%rbx)
jne 0x8535
movl $0x2, %edx
movq %r13, %rdi
leaq 0x3206(%rip), %rsi      # 0xb736
jmp 0x8644
movzbl 0x9(%rbx), %eax
cmpl $0x4f, %eax
je 0x8547
cmpl $0x2d, %eax
jne 0x85ce
movl $0x2, %edx
movq %r13, %rdi
leaq 0x31dd(%rip), %rsi      # 0xb733
jmp 0x8644
movl %r15d, %eax
xorl %edx, %eax
movl %r14d, %ecx
xorl %r12d, %ecx
orl %eax, %ecx
jne 0x858f
movl $0x2, %edx
movq %r13, %rdi
leaq 0x31bd(%rip), %rsi      # 0xb736
callq 0x2230
movl -0x34(%rbp), %r12d
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r15
jmp 0x8649
movq %rbx, %rdi
callq 0x834c
testb %al, %al
je 0x85f4
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
negq %r14
leaq (%r14,%r14,2), %rcx
movq (%rax,%rcx,8), %rax
leaq (%r15,%r15,2), %rcx
shlq $0x4, %rcx
cmpb $0x1, -0x28(%rax,%rcx)
jne 0x85f4
movl $0x2, %edx
movq %r13, %rdi
leaq 0x2d53(%rip), %rsi      # 0xb31f
jmp 0x8579
movb %al, -0x2c(%rbp)
movl $0x1, %edx
movq %r13, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x2230
movb $0x20, -0x2d(%rbp)
movl $0x1, %edx
movq %r13, %rdi
leaq -0x2d(%rbp), %rsi
jmp 0x8644
movzbl 0x9(%rbx), %eax
cmpl $0x4f, %eax
je 0x8602
cmpl $0x2d, %eax
jne 0x8614
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %r13, %rdi
leaq -0x29(%rbp), %rsi
jmp 0x8623
movb %al, -0x2a(%rbp)
movl $0x1, %edx
movq %r13, %rdi
leaq -0x2a(%rbp), %rsi
callq 0x2230
movl -0x34(%rbp), %r12d
movq -0x40(%rbp), %r14
movq -0x48(%rbp), %r15
movb $0x20, -0x2b(%rbp)
movl $0x1, %edx
movq %r13, %rdi
leaq -0x2b(%rbp), %rsi
callq 0x2230
addq $0x30, %rbx
cmpq 0x8(%r15), %rbx
jb 0x84c9
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x21e0
movsbl %al, %esi
movq %r13, %rdi
callq 0x2040
movq %rax, %rdi
callq 0x2170
addq $0x18, %r15
cmpq 0x8(%r14), %r15
jb 0x84b8
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq