// File: XxAdi101xX[P]ChamberCrawler/Floor/Floor.cc
// Function: Floor::dfsSearch(std::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<std::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, bool>>>&, std::vector<int, std::allocator<int>>, std::vector<int, std::allocator<int>>) const
bool Floor::dfsSearch(std::map<std::string, bool>& travelled, const std::vector<int> curr, const std::vector<int> dest) const {
    std::vector<std::shared_ptr<Cell>> neighbourCells = theFloor[curr[0]][curr[1]]->getNeighbours();

    if (curr.size() != 2 && dest.size() != 2) return false;

    if (curr[0] == dest[0] && curr[1] == dest[1]) return true;

    for (auto &c: neighbourCells) {
        if (c->getCellType() == CellType::FloorTile && travelled.count(coordsToString(c->getCoords())) == 0) {
            travelled[coordsToString(c->getCoords())] = true;
            if (dfsSearch(travelled, c->getCoords(), dest)) return true;
        }
    }
    return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x190, %rsp            # imm = 0x190
movq %rdx, -0x148(%rbp)
movq %rdi, %rax
movq -0x148(%rbp), %rdi
movq %rdi, -0x128(%rbp)
movq %rcx, -0x140(%rbp)
movq %rax, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdi, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x138(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x40800
movq -0x138(%rbp), %rdi
movslq (%rax), %rsi
callq 0x407e0
movq -0x128(%rbp), %rdi
movq %rax, -0x130(%rbp)
movl $0x1, %esi
callq 0x40800
movq -0x130(%rbp), %rdi
movslq (%rax), %rsi
callq 0x40820
movq %rax, %rdi
callq 0x19df0
movq %rax, %rsi
leaq -0x40(%rbp), %rdi
callq 0x2cf00
movq -0x128(%rbp), %rdi
callq 0x1c0d0
cmpq $0x2, %rax
je 0x3fa8c
movq -0x140(%rbp), %rdi
callq 0x1c0d0
cmpq $0x2, %rax
je 0x3fa8c
movb $0x0, -0x1(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x3fe4d
movq -0x128(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x40800
movq -0x140(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x14c(%rbp)
xorl %eax, %eax
movl %eax, %esi
callq 0x40800
movq %rax, %rcx
movl -0x14c(%rbp), %eax
cmpl (%rcx), %eax
jne 0x3fb08
movq -0x128(%rbp), %rdi
movl $0x1, %esi
callq 0x40800
movq -0x140(%rbp), %rdi
movl (%rax), %eax
movl %eax, -0x150(%rbp)
movl $0x1, %esi
callq 0x40800
movq %rax, %rcx
movl -0x150(%rbp), %eax
cmpl (%rcx), %eax
jne 0x3fb08
movb $0x1, -0x1(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x3fe4d
leaq -0x40(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1a400
movq %rax, -0x58(%rbp)
movq -0x50(%rbp), %rdi
callq 0x1a430
movq %rax, -0x60(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x1a460
testb $0x1, %al
jne 0x3fb40
jmp 0x3fe42
leaq -0x58(%rbp), %rdi
callq 0x1a4a0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
callq 0x19df0
movq %rax, %rdi
movb $0x0, -0xb1(%rbp)
movb $0x0, -0xb2(%rbp)
callq 0x2cc40
movl %eax, -0x154(%rbp)
jmp 0x3fb74
movl -0x154(%rbp), %ecx
xorl %eax, %eax
cmpl $0x1, %ecx
movb %al, -0x155(%rbp)
jne 0x3fc06
movq -0x18(%rbp), %rax
movq %rax, -0x160(%rbp)
movq -0x68(%rbp), %rdi
callq 0x19df0
movq %rax, %rsi
leaq -0xb0(%rbp), %rdi
callq 0x2cbb0
jmp 0x3fbac
movq -0x138(%rbp), %rsi
movb $0x1, -0xb1(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0xb0(%rbp), %rdx
callq 0x3fe80
jmp 0x3fbcf
movq -0x160(%rbp), %rdi
movb $0x1, -0xb2(%rbp)
leaq -0x98(%rbp), %rsi
callq 0x40840
movq %rax, -0x168(%rbp)
jmp 0x3fbf2
movq -0x168(%rbp), %rax
cmpq $0x0, %rax
sete %al
movb %al, -0x155(%rbp)
movb -0x155(%rbp), %al
movb %al, -0x169(%rbp)
testb $0x1, -0xb2(%rbp)
jne 0x3fc1d
jmp 0x3fc29
leaq -0x98(%rbp), %rdi
callq 0x65e8
testb $0x1, -0xb1(%rbp)
jne 0x3fc34
jmp 0x3fc40
leaq -0xb0(%rbp), %rdi
callq 0x19640
movb -0x169(%rbp), %al
testb $0x1, %al
jne 0x3fc4f
jmp 0x3fe32
movq -0x18(%rbp), %rax
movq %rax, -0x178(%rbp)
movq -0x68(%rbp), %rdi
callq 0x19df0
movq %rax, %rsi
leaq -0xf0(%rbp), %rdi
callq 0x2cbb0
jmp 0x3fc74
movq -0x138(%rbp), %rsi
leaq -0xd8(%rbp), %rdi
leaq -0xf0(%rbp), %rdx
callq 0x3fe80
jmp 0x3fc90
movq -0x178(%rbp), %rdi
leaq -0xd8(%rbp), %rsi
callq 0x408a0
movq %rax, -0x180(%rbp)
jmp 0x3fcac
movq -0x180(%rbp), %rax
movb $0x1, (%rax)
leaq -0xd8(%rbp), %rdi
callq 0x65e8
leaq -0xf0(%rbp), %rdi
callq 0x19640
movq -0x18(%rbp), %rax
movq %rax, -0x188(%rbp)
movq -0x68(%rbp), %rdi
callq 0x19df0
movq %rax, %rsi
leaq -0x108(%rbp), %rdi
callq 0x2cbb0
jmp 0x3fcf3
movq -0x140(%rbp), %rsi
leaq -0x120(%rbp), %rdi
callq 0x19880
jmp 0x3fd08
movq -0x188(%rbp), %rsi
movq -0x138(%rbp), %rdi
leaq -0x108(%rbp), %rdx
leaq -0x120(%rbp), %rcx
callq 0x3f9c0
movb %al, -0x189(%rbp)
jmp 0x3fd31
leaq -0x120(%rbp), %rdi
callq 0x19640
leaq -0x108(%rbp), %rdi
callq 0x19640
movb -0x189(%rbp), %al
testb $0x1, %al
jne 0x3fd58
jmp 0x3fe30
movb $0x1, -0x1(%rbp)
movl $0x1, -0x44(%rbp)
jmp 0x3fe4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x3fe64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x3fdac
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
testb $0x1, -0xb2(%rbp)
jne 0x3fd9e
jmp 0x3fdaa
leaq -0x98(%rbp), %rdi
callq 0x65e8
jmp 0x3fdac
testb $0x1, -0xb1(%rbp)
jne 0x3fdb7
jmp 0x3fdc3
leaq -0xb0(%rbp), %rdi
callq 0x19640
jmp 0x3fe64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x3fdee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0xd8(%rbp), %rdi
callq 0x65e8
leaq -0xf0(%rbp), %rdi
callq 0x19640
jmp 0x3fe64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
jmp 0x3fe22
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x70(%rbp)
movl %eax, -0x74(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x19640
leaq -0x108(%rbp), %rdi
callq 0x19640
jmp 0x3fe64
jmp 0x3fe32
jmp 0x3fe34
leaq -0x58(%rbp), %rdi
callq 0x1a4e0
jmp 0x3fb2a
movb $0x0, -0x1(%rbp)
movl $0x1, -0x44(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1a2f0
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x190, %rsp            # imm = 0x190
popq %rbp
retq
leaq -0x40(%rbp), %rdi
callq 0x1a2f0
movq -0x70(%rbp), %rdi
callq 0x6550
nopw %cs:(%rax,%rax)