// File: /workspace/github_cpp_makefile_star2_O2/gabryatfendor[P]SocietySimulator/src/map.cpp
// Function: printMap()
void printMap()
{
	for(int j=0;j<HEIGHT;j++)
	{
		for(int i=0;i<WIDTH;i++)
		{
			if (map[i][j].villagerHere)
			{
				if(map[i][j].kind == '-')//on a boat!!
				{
					cout << "\033[1;35mB\033[0m";
				}
				else
				{
					cout << "\033[1;35m@\033[0m";
				}
			}
			else
			{
				if(map[i][j].kind=='-')
				{
					cout << "\033[1;36m-\033[0m";
				}
				else if (map[i][j].kind=='^')
				{
					cout << "\033[1;31m^\033[0m";
				}
				else if (map[i][j].kind=='|')
				{
					cout << "\033[1;32m|\033[0m";
				}
				else if (map[i][j].kind=='c')
				{
					cout << "\033[1m@\033[0m";
				}
				else if (map[i][j].kind=='x')
				{
					map[i][j].usable++;
					if(map[i][j].usable>=100)
					{
						map[i][j].kind=map[i][j].origin;
					}
					cout << "x";
				}
				else
				{
					cout << "\033[1m"<<map[i][j].kind<<"\033[0m";
				}

			}
		}
		cout << "\n";
	}
	cout << "Fish: " << fish << "    Wood: " << wood << "    Food: " << food << "    Stone: " << stone << "\n";

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x52d1(%rip), %r14      # 0x8200
xorl %eax, %eax
movq 0x5090(%rip), %rbx      # 0x7fc8
leaq 0x210b(%rip), %r15      # 0x504a
leaq 0x2111(%rip), %r12      # 0x5057
cmpq $0x14, %rax
je 0x304f
movq %rax, -0x30(%rbp)
xorl %r13d, %r13d
cmpq $0x4b00, %r13           # imm = 0x4B00
je 0x3030
movzbl 0x1(%r14,%r13), %eax
cmpb $0x1, 0xa(%r14,%r13)
jne 0x2f82
movq %rbx, %rdi
cmpl $0x2d, %eax
jne 0x2fab
movq %r15, %rsi
jmp 0x301f
cmpl $0x7c, %eax
je 0x3015
cmpl $0x5e, %eax
je 0x2fb0
cmpl $0x63, %eax
je 0x2fe3
cmpl $0x78, %eax
je 0x2fbc
movq %rbx, %rdi
cmpl $0x2d, %eax
jne 0x2fef
leaq 0x20bb(%rip), %rsi      # 0x5064
jmp 0x301f
movq %r12, %rsi
jmp 0x301f
movq %rbx, %rdi
leaq 0x20b7(%rip), %rsi      # 0x5071
jmp 0x301f
movl 0x4(%r14,%r13), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x4(%r14,%r13)
cmpl $0x63, %eax
jl 0x2fd7
movb (%r14,%r13), %al
movb %al, 0x1(%r14,%r13)
movq %rbx, %rdi
leaq 0x20b4(%rip), %rsi      # 0x5095
jmp 0x301f
movq %rbx, %rdi
leaq 0x209e(%rip), %rsi      # 0x508b
jmp 0x301f
leaq 0x20a1(%rip), %rsi      # 0x5097
callq 0x21b0
movsbl 0x1(%r14,%r13), %esi
movq %rax, %rdi
callq 0x21f0
movq %rax, %rdi
leaq 0x2059(%rip), %rsi      # 0x506c
jmp 0x301f
movq %rbx, %rdi
leaq 0x205f(%rip), %rsi      # 0x507e
callq 0x21b0
addq $0xf0, %r13
jmp 0x2f57
movq %rbx, %rdi
leaq 0x1fe7(%rip), %rsi      # 0x5021
callq 0x21b0
movq -0x30(%rbp), %rax
incq %rax
addq $0xc, %r14
jmp 0x2f46
movq 0x4f72(%rip), %rdi      # 0x7fc8
leaq 0x203f(%rip), %rsi      # 0x509c
callq 0x21b0
leaq 0xa14f(%rip), %rcx      # 0xd1b8
movl (%rcx), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x2029(%rip), %rsi      # 0x50a3
movq %rax, %rdi
callq 0x21b0
leaq 0xa12b(%rip), %rcx      # 0xd1b4
movl (%rcx), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x2014(%rip), %rsi      # 0x50ae
movq %rax, %rdi
callq 0x21b0
leaq 0xa113(%rip), %rcx      # 0xd1bc
movl (%rcx), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x1fff(%rip), %rsi      # 0x50b9
movq %rax, %rdi
callq 0x21b0
leaq 0xa0f7(%rip), %rcx      # 0xd1c0
movl (%rcx), %esi
movq %rax, %rdi
callq 0x22c0
leaq 0x1f47(%rip), %rsi      # 0x5021
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x21b0