// File: isimplyexcel[P]text-based-game/map.cpp
// Function: displayMap(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void displayMap(std::string carName){
	char map[7][66]; // row col

    std::cout << "\t\t\t Map" << std::endl;
    for(int i = 0; i < 7; i++){
        for(int j = 0; j < 66; j++){
            //  top row
            if(i == 0){
                map[i][j] = '-';
                std::cout << map[i][j];
            }
            //  bottom row
            if(i == 6){
                map[i][j] = '-';
                std::cout << map[i][j];
            }
            // column |
            if(j < 100 && (j % 10 == 0) && (i > 0 && i < 6)){
                map[i][j] = '|';
                std::cout << map[i][j];
            }

            if(j > 0 && j < 60 && i > 0 && i < 6){
                map[i][j] = ' ';

                //  engine car
                map[3][52] = 'e';
                map[3][53] = 'n';
                map[3][54] = 'g';
                map[3][55] = 'i';
                map[3][56] = 'n';
                map[3][57] = 'e';

                //  dining car
                map[3][42] = 'd';
                map[3][43] = 'i';
                map[3][44] = 'n';
                map[3][45] = 'i';
                map[3][46] = 'n';
                map[3][47] = 'g';

                //  baggage car
                map[3][32] = 'b';
                map[3][33] = 'a';
                map[3][34] = 'g';
                map[3][35] = 'g';
                map[3][36] = 'a';
                map[3][37] = 'g';
                map[3][38] = 'e';

                //  shopping car
                map[3][21] = 's';
                map[3][22] = 'h';
                map[3][23] = 'o';
                map[3][24] = 'p';
                map[3][25] = 'p';
                map[3][26] = 'i';
                map[3][27] = 'n';
                map[3][28] = 'g';

                //  bar car
                map[3][14] = 'b';
                map[3][15] = 'a';
                map[3][16] = 'r';

                //  caboose
                map[3][2] = 'c';
                map[3][3] = 'a';
                map[3][4] = 'b';
                map[3][5] = 'o';
                map[3][6] = 'o';
                map[3][7] = 's';
                map[3][8] = 'e';

                if(carName == "Caboose car"){
                	map[5][5] = '*';
                }
                else if(carName == "Bar car"){
                	map[5][14] = '*';
                }
                else if(carName == "Shopping car"){
                	map[5][25] = '*';
                }
                else if(carName == "Baggage car"){
                	map[5][34] = '*';
                }
                else if(carName == "Dining car"){
                	map[5][44] = '*';
                }
                else if(carName == "Engine car"){
                	map[5][55] = '*';
                }

                std::cout << map[i][j];
            }
        }
        std::cout << std::endl;
    }

    std::cout << "Key: * Current Location" << std::endl;
    //  empty line
    std::cout << std::endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x1f0(%rbp)
movq %rdi, -0x8(%rbp)
movq 0x5723(%rip), %rdi      # 0xcfd0
leaq 0x20f7(%rip), %rsi      # 0x99ab
callq 0x21a0
movq %rax, %rdi
movq 0x56fd(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl $0x0, -0x1e4(%rbp)
cmpl $0x7, -0x1e4(%rbp)
jge 0x7ca8
movl $0x0, -0x1e8(%rbp)
cmpl $0x42, -0x1e8(%rbp)
jge 0x7c81
cmpl $0x0, -0x1e4(%rbp)
jne 0x794b
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movb $0x2d, (%rax,%rcx)
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movq 0x568e(%rip), %rdi      # 0xcfd0
movsbl (%rax,%rcx), %esi
callq 0x2220
cmpl $0x6, -0x1e4(%rbp)
jne 0x79a0
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movb $0x2d, (%rax,%rcx)
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movq 0x5639(%rip), %rdi      # 0xcfd0
movsbl (%rax,%rcx), %esi
callq 0x2220
cmpl $0x64, -0x1e8(%rbp)
jge 0x7a1a
movl -0x1e8(%rbp), %eax
movl $0xa, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x7a1a
cmpl $0x0, -0x1e4(%rbp)
jle 0x7a1a
cmpl $0x6, -0x1e4(%rbp)
jge 0x7a1a
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movb $0x7c, (%rax,%rcx)
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movq 0x55bf(%rip), %rdi      # 0xcfd0
movsbl (%rax,%rcx), %esi
callq 0x2220
cmpl $0x0, -0x1e8(%rbp)
jle 0x7c6b
cmpl $0x3c, -0x1e8(%rbp)
jge 0x7c6b
cmpl $0x0, -0x1e4(%rbp)
jle 0x7c6b
cmpl $0x6, -0x1e4(%rbp)
jge 0x7c6b
movq -0x1f0(%rbp), %rdi
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movb $0x20, (%rax,%rcx)
movb $0x65, -0xe6(%rbp)
movb $0x6e, -0xe5(%rbp)
movb $0x67, -0xe4(%rbp)
movb $0x69, -0xe3(%rbp)
movb $0x6e, -0xe2(%rbp)
movb $0x65, -0xe1(%rbp)
movb $0x64, -0xf0(%rbp)
movb $0x69, -0xef(%rbp)
movb $0x6e, -0xee(%rbp)
movb $0x69, -0xed(%rbp)
movb $0x6e, -0xec(%rbp)
movb $0x67, -0xeb(%rbp)
movb $0x62, -0xfa(%rbp)
movb $0x61, -0xf9(%rbp)
movb $0x67, -0xf8(%rbp)
movb $0x67, -0xf7(%rbp)
movb $0x61, -0xf6(%rbp)
movb $0x67, -0xf5(%rbp)
movb $0x65, -0xf4(%rbp)
movb $0x73, -0x105(%rbp)
movb $0x68, -0x104(%rbp)
movb $0x6f, -0x103(%rbp)
movb $0x70, -0x102(%rbp)
movb $0x70, -0x101(%rbp)
movb $0x69, -0x100(%rbp)
movb $0x6e, -0xff(%rbp)
movb $0x67, -0xfe(%rbp)
movb $0x62, -0x10c(%rbp)
movb $0x61, -0x10b(%rbp)
movb $0x72, -0x10a(%rbp)
movb $0x63, -0x118(%rbp)
movb $0x61, -0x117(%rbp)
movb $0x62, -0x116(%rbp)
movb $0x6f, -0x115(%rbp)
movb $0x6f, -0x114(%rbp)
movb $0x73, -0x113(%rbp)
movb $0x65, -0x112(%rbp)
leaq 0x18f9(%rip), %rsi      # 0x9478
callq 0x7cf0
testb $0x1, %al
jne 0x7b8a
jmp 0x7b96
movb $0x2a, -0x91(%rbp)
jmp 0x7c3f
movq -0x1f0(%rbp), %rdi
leaq 0x18f4(%rip), %rsi      # 0x9498
callq 0x7cf0
testb $0x1, %al
jne 0x7baf
jmp 0x7bbb
movb $0x2a, -0x88(%rbp)
jmp 0x7c3d
movq -0x1f0(%rbp), %rdi
leaq 0x190a(%rip), %rsi      # 0x94d3
callq 0x7cf0
testb $0x1, %al
jne 0x7bd4
jmp 0x7bda
movb $0x2a, -0x7d(%rbp)
jmp 0x7c3b
movq -0x1f0(%rbp), %rdi
leaq 0x1921(%rip), %rsi      # 0x9509
callq 0x7cf0
testb $0x1, %al
jne 0x7bf3
jmp 0x7bf9
movb $0x2a, -0x74(%rbp)
jmp 0x7c39
movq -0x1f0(%rbp), %rdi
leaq 0x1933(%rip), %rsi      # 0x953a
callq 0x7cf0
testb $0x1, %al
jne 0x7c12
jmp 0x7c18
movb $0x2a, -0x6a(%rbp)
jmp 0x7c37
movq -0x1f0(%rbp), %rdi
leaq 0x193b(%rip), %rsi      # 0x9561
callq 0x7cf0
testb $0x1, %al
jne 0x7c31
jmp 0x7c35
movb $0x2a, -0x5f(%rbp)
jmp 0x7c37
jmp 0x7c39
jmp 0x7c3b
jmp 0x7c3d
jmp 0x7c3f
movslq -0x1e4(%rbp), %rcx
leaq -0x1e0(%rbp), %rax
imulq $0x42, %rcx, %rcx
addq %rcx, %rax
movslq -0x1e8(%rbp), %rcx
movq 0x536e(%rip), %rdi      # 0xcfd0
movsbl (%rax,%rcx), %esi
callq 0x2220
jmp 0x7c6d
movl -0x1e8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e8(%rbp)
jmp 0x78e9
movq 0x5348(%rip), %rdi      # 0xcfd0
movq 0x5331(%rip), %rsi      # 0xcfc0
callq 0x21d0
movl -0x1e4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1e4(%rbp)
jmp 0x78d2
movq 0x5321(%rip), %rdi      # 0xcfd0
leaq 0x1cfd(%rip), %rsi      # 0x99b3
callq 0x21a0
movq %rax, %rdi
movq 0x52fb(%rip), %rsi      # 0xcfc0
callq 0x21d0
movq 0x52ff(%rip), %rdi      # 0xcfd0
movq 0x52e8(%rip), %rsi      # 0xcfc0
callq 0x21d0
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
nopw %cs:(%rax,%rax)