// File: yupyub[P]PathFinding_Visual/visual.cpp
// Function: Visual::draw()
void Visual::draw(){
    system("clear");
    for(int i = 0;i<M+2;i++) printf("#");
    printf("\n");
    for(int i = 0;i<N;i++){
        printf("#");
        for(int j = 0;j<M;j++){
            if(map[i][j] == 1) printf("#");
            else if(map[i][j] == 2) printf("S");
            else if(map[i][j] == 3) printf("E");
            else if(state[i][j] == 1)printf("O");
            else if(state[i][j] == 3)printf("O");
            else if(state[i][j] == 2)printf(".");
            else if(state[i][j] == 0)printf(" ");
        }
        printf("#\n");
    }
    for(int i = 0;i<M+2;i++) printf("#");
    printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq 0x1649(%rip), %rdi      # 0xa004
callq 0x2140
movl $0x0, -0xc(%rbp)
movq -0x20(%rbp), %rcx
movl -0xc(%rbp), %eax
movl 0x4e204(%rcx), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x89f4
leaq 0x1892(%rip), %rdi      # 0xa274
movb $0x0, %al
callq 0x2030
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x89c7
leaq 0x1884(%rip), %rdi      # 0xa27f
movb $0x0, %al
callq 0x2030
movl $0x0, -0x10(%rbp)
movq -0x20(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl 0x4e200(%rcx), %eax
jge 0x8bd2
leaq 0x1851(%rip), %rdi      # 0xa274
movb $0x0, %al
callq 0x2030
movl $0x0, -0x14(%rbp)
movq -0x20(%rbp), %rcx
movl -0x14(%rbp), %eax
cmpl 0x4e204(%rcx), %eax
jge 0x8bb6
movq -0x20(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x8a73
leaq 0x180d(%rip), %rdi      # 0xa274
movb $0x0, %al
callq 0x2030
jmp 0x8ba6
movq -0x20(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x8aa2
leaq 0x17e0(%rip), %rdi      # 0xa276
movb $0x0, %al
callq 0x2030
jmp 0x8ba4
movq -0x20(%rbp), %rax
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0x8ad1
leaq 0x17b3(%rip), %rdi      # 0xa278
movb $0x0, %al
callq 0x2030
jmp 0x8ba2
movq -0x20(%rbp), %rax
addq $0x27100, %rax          # imm = 0x27100
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x1, (%rax,%rcx,4)
jne 0x8b06
leaq 0x1780(%rip), %rdi      # 0xa27a
movb $0x0, %al
callq 0x2030
jmp 0x8ba0
movq -0x20(%rbp), %rax
addq $0x27100, %rax          # imm = 0x27100
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x3, (%rax,%rcx,4)
jne 0x8b38
leaq 0x174b(%rip), %rdi      # 0xa27a
movb $0x0, %al
callq 0x2030
jmp 0x8b9e
movq -0x20(%rbp), %rax
addq $0x27100, %rax          # imm = 0x27100
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x2, (%rax,%rcx,4)
jne 0x8b6a
leaq 0x171b(%rip), %rdi      # 0xa27c
movb $0x0, %al
callq 0x2030
jmp 0x8b9c
movq -0x20(%rbp), %rax
addq $0x27100, %rax          # imm = 0x27100
movslq -0x10(%rbp), %rcx
imulq $0x320, %rcx, %rcx      # imm = 0x320
addq %rcx, %rax
movslq -0x14(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x8b9a
leaq 0x151d(%rip), %rdi      # 0xa0b0
movb $0x0, %al
callq 0x2030
jmp 0x8b9c
jmp 0x8b9e
jmp 0x8ba0
jmp 0x8ba2
jmp 0x8ba4
jmp 0x8ba6
jmp 0x8ba8
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8a31
leaq 0x16c1(%rip), %rdi      # 0xa27e
movb $0x0, %al
callq 0x2030
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x8a09
movl $0x0, -0x18(%rbp)
movq -0x20(%rbp), %rcx
movl -0x18(%rbp), %eax
movl 0x4e204(%rcx), %ecx
addl $0x2, %ecx
cmpl %ecx, %eax
jge 0x8c06
leaq 0x1680(%rip), %rdi      # 0xa274
movb $0x0, %al
callq 0x2030
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8bd9
leaq 0x1672(%rip), %rdi      # 0xa27f
movb $0x0, %al
callq 0x2030
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)