// File: Unreality3D[P]Unreality3D/indie-studio/source/MapGenerator/MapGenerator.cpp
// Function: Map::draw_hallways()
void	Map::draw_hallways()
{
  Size	r1;
  Size	r2;
  int	w = 0;
  int	h = 0;

  for (size_t i = 0;i < _rooms.size() - 1;i++)
    {
      r1.y = (_rooms[i]._size.y / 2) + _rooms[i]._pos.y + 2;
      r1.x = (_rooms[i]._size.x / 2) + _rooms[i]._pos.x + 2;
      r2.y = (_rooms[i + 1]._size.y / 2) + _rooms[i + 1]._pos.y + 2;
      r2.x = (_rooms[i + 1]._size.x / 2) + _rooms[i + 1]._pos.x + 2;

      w = r2.x - r1.x;
      h = r2.y - r1.y;
      if (w > 0 && h > 0)
	{
	  for (int x = 0; x < w; x++)
	    _map[r1.y][r1.x + x] = ' ';
	  for (int y = h; y > 0; y--)
	    _map[r2.y - y][r2.x] = ' ';
	}
      else if (w > 0 && h < 0)
	{
	  for (int x = 0; x < w; x++)
	    _map[r1.y][r1.x + x] = ' ';
	  for (int y = (h * -1); y > 0; y--)
	    _map[r2.y + y][r2.x] = ' ';
	}
      else if (w < 0 && h > 0)
	{
	  for (int x = 0; x < (w * -1); x++)
	    _map[r1.y][r1.x - x] = ' ';
	  for (int y = h; y > 0; y--)
	    _map[r2.y - y][r2.x] = ' ';
	}
      else
	{
	  for (int x = 0; x < (w * -1); x++)
	    _map[r1.y][r1.x - x] = ' ';
	  for (int y = (h * -1); y > 0; y--)
	    _map[r2.y + y][r2.x] = ' ';
	}
    }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x18(%rsp)
leaq 0x58(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6990
leaq 0x50(%rsp), %rdi
xorl %edx, %edx
movl %edx, %esi
callq 0x6990
movl $0x0, 0x4c(%rsp)
movl $0x0, 0x48(%rsp)
movq $0x0, 0x40(%rsp)
movq 0x18(%rsp), %rdi
movq 0x40(%rsp), %rax
movq %rax, 0x10(%rsp)
addq $0x40, %rdi
callq 0x6360
movq %rax, %rcx
movq 0x10(%rsp), %rax
subq $0x1, %rcx
cmpq %rcx, %rax
jae 0x8019
movq 0x18(%rsp), %rdi
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movl 0xc(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, (%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl (%rsp), %eax
addl 0x4(%rcx), %eax
addl $0x2, %eax
movl %eax, 0x5c(%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movl 0x8(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x4(%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl 0x4(%rsp), %eax
addl (%rcx), %eax
addl $0x2, %eax
movl %eax, 0x58(%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movl 0xc(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0x8(%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movq %rax, %rcx
movl 0x8(%rsp), %eax
addl 0x4(%rcx), %eax
addl $0x2, %eax
movl %eax, 0x54(%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0x6a30
movq 0x18(%rsp), %rdi
movl 0x8(%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, 0xc(%rsp)
addq $0x40, %rdi
movq 0x40(%rsp), %rsi
addq $0x1, %rsi
callq 0x6a30
movq %rax, %rcx
movl 0xc(%rsp), %eax
addl (%rcx), %eax
addl $0x2, %eax
movl %eax, 0x50(%rsp)
movl 0x50(%rsp), %eax
subl 0x58(%rsp), %eax
movl %eax, 0x4c(%rsp)
movl 0x54(%rsp), %eax
subl 0x5c(%rsp), %eax
movl %eax, 0x48(%rsp)
cmpl $0x0, 0x4c(%rsp)
jle 0x7e19
cmpl $0x0, 0x48(%rsp)
jle 0x7e19
movl $0x0, 0x3c(%rsp)
movl 0x3c(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x7dcf
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movslq 0x5c(%rsp), %rsi
callq 0x6a90
movq %rax, %rdi
movl 0x58(%rsp), %eax
addl 0x3c(%rsp), %eax
movslq %eax, %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x3c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x3c(%rsp)
jmp 0x7d8f
movl 0x48(%rsp), %eax
movl %eax, 0x38(%rsp)
cmpl $0x0, 0x38(%rsp)
jle 0x7e14
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movl 0x54(%rsp), %eax
subl 0x38(%rsp), %eax
movslq %eax, %rsi
callq 0x6a90
movq %rax, %rdi
movslq 0x50(%rsp), %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x38(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x38(%rsp)
jmp 0x7dd7
jmp 0x8004
cmpl $0x0, 0x4c(%rsp)
jle 0x7ec2
cmpl $0x0, 0x48(%rsp)
jge 0x7ec2
movl $0x0, 0x34(%rsp)
movl 0x34(%rsp), %eax
cmpl 0x4c(%rsp), %eax
jge 0x7e77
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movslq 0x5c(%rsp), %rsi
callq 0x6a90
movq %rax, %rdi
movl 0x58(%rsp), %eax
addl 0x34(%rsp), %eax
movslq %eax, %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x34(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x34(%rsp)
jmp 0x7e37
imull $-0x1, 0x48(%rsp), %eax
movl %eax, 0x30(%rsp)
cmpl $0x0, 0x30(%rsp)
jle 0x7ebd
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movl 0x54(%rsp), %eax
addl 0x30(%rsp), %eax
movslq %eax, %rsi
callq 0x6a90
movq %rax, %rdi
movslq 0x50(%rsp), %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x30(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x30(%rsp)
jmp 0x7e80
jmp 0x8002
cmpl $0x0, 0x4c(%rsp)
jge 0x7f6d
cmpl $0x0, 0x48(%rsp)
jle 0x7f6d
movl $0x0, 0x2c(%rsp)
movl 0x2c(%rsp), %eax
imull $-0x1, 0x4c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x7f23
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movslq 0x5c(%rsp), %rsi
callq 0x6a90
movq %rax, %rdi
movl 0x58(%rsp), %eax
subl 0x2c(%rsp), %eax
movslq %eax, %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x2c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x2c(%rsp)
jmp 0x7ee0
movl 0x48(%rsp), %eax
movl %eax, 0x28(%rsp)
cmpl $0x0, 0x28(%rsp)
jle 0x7f68
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movl 0x54(%rsp), %eax
subl 0x28(%rsp), %eax
movslq %eax, %rsi
callq 0x6a90
movq %rax, %rdi
movslq 0x50(%rsp), %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x28(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x28(%rsp)
jmp 0x7f2b
jmp 0x8000
movl $0x0, 0x24(%rsp)
movl 0x24(%rsp), %eax
imull $-0x1, 0x4c(%rsp), %ecx
cmpl %ecx, %eax
jge 0x7fb8
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movslq 0x5c(%rsp), %rsi
callq 0x6a90
movq %rax, %rdi
movl 0x58(%rsp), %eax
subl 0x24(%rsp), %eax
movslq %eax, %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x24(%rsp)
jmp 0x7f75
imull $-0x1, 0x48(%rsp), %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x20(%rsp)
jle 0x7ffe
movq 0x18(%rsp), %rdi
addq $0x58, %rdi
movl 0x54(%rsp), %eax
addl 0x20(%rsp), %eax
movslq %eax, %rsi
callq 0x6a90
movq %rax, %rdi
movslq 0x50(%rsp), %rsi
callq 0x6b10
movb $0x20, (%rax)
movl 0x20(%rsp), %eax
addl $-0x1, %eax
movl %eax, 0x20(%rsp)
jmp 0x7fc1
jmp 0x8000
jmp 0x8002
jmp 0x8004
jmp 0x8006
movq 0x40(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x40(%rsp)
jmp 0x7c08
addq $0x68, %rsp
retq
nop