// File: Teris45[P]Maze-Game/Moving.cpp
// Function: MyMoving::get_possible_moveset(Point const&, std::vector<std::vector<int, std::allocator<int>>, std::allocator<std::vector<int, std::allocator<int>>>> const&)
vector<Point> MyMoving :: get_possible_moveset(const Point &p, const vector<vector<int>> &maze){
    vector<Point> possibleMoveSet;

    int y = p.getY();
    int x = p.getX();

    if(maze[y+1][x] == DIADROMOS || maze[y+1][x] == POTERAKOS ) {

        Point p1(x,y+1);
        possibleMoveSet.push_back(p1);
    }

    if(maze[y-1][x] == DIADROMOS || maze[y-1][x] == POTERAKOS) {
        Point p1(x,y-1);
        possibleMoveSet.push_back(p1);
    }

    if(maze[y][x+1] == DIADROMOS || maze[y][x+1] == POTERAKOS) {
        Point p1(x+1,y);
        possibleMoveSet.push_back(p1);
    }

    if(maze[y][x-1] == DIADROMOS || maze[y][x-1] == POTERAKOS) {
        Point p1(x-1,y);
        possibleMoveSet.push_back(p1);
    }


    return possibleMoveSet;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x88(%rbp)
movq %rdi, %rax
movq %rax, -0x80(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x0, -0x19(%rbp)
callq 0x5910
movq -0x10(%rbp), %rdi
callq 0xa5b0
movl %eax, -0x74(%rbp)
jmp 0xb3bc
movl -0x74(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x10(%rbp), %rdi
callq 0xa570
movl %eax, -0x8c(%rbp)
jmp 0xb3d3
movl -0x8c(%rbp), %eax
movl %eax, -0x30(%rbp)
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbff0
movq %rax, %rdi
movslq -0x30(%rbp), %rsi
callq 0xc010
cmpl $0x2, (%rax)
je 0xb422
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xbff0
movq %rax, %rdi
movslq -0x30(%rbp), %rsi
callq 0xc010
cmpl $0x3, (%rax)
jne 0xb47d
movl -0x30(%rbp), %esi
movl -0x20(%rbp), %edx
incl %edx
leaq -0x40(%rbp), %rdi
callq 0xa8d0
jmp 0xb435
movq -0x88(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5a80
jmp 0xb447
leaq -0x40(%rbp), %rdi
callq 0xa900
jmp 0xb47d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
jmp 0xb64d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0xa900
jmp 0xb64d
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbff0
movq %rax, %rdi
movslq -0x30(%rbp), %rsi
callq 0xc010
cmpl $0x2, (%rax)
je 0xb4c3
movq -0x18(%rbp), %rdi
movl -0x20(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xbff0
movq %rax, %rdi
movslq -0x30(%rbp), %rsi
callq 0xc010
cmpl $0x3, (%rax)
jne 0xb50d
movl -0x30(%rbp), %esi
movl -0x20(%rbp), %edx
decl %edx
leaq -0x50(%rbp), %rdi
callq 0xa8d0
jmp 0xb4d6
movq -0x88(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x5a80
jmp 0xb4e8
leaq -0x50(%rbp), %rdi
callq 0xa900
jmp 0xb50d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xa900
jmp 0xb64d
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0xbff0
movq %rax, %rdi
movl -0x30(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc010
cmpl $0x2, (%rax)
je 0xb553
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0xbff0
movq %rax, %rdi
movl -0x30(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rsi
callq 0xc010
cmpl $0x3, (%rax)
jne 0xb59d
movl -0x30(%rbp), %esi
incl %esi
movl -0x20(%rbp), %edx
leaq -0x60(%rbp), %rdi
callq 0xa8d0
jmp 0xb566
movq -0x88(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5a80
jmp 0xb578
leaq -0x60(%rbp), %rdi
callq 0xa900
jmp 0xb59d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xa900
jmp 0xb64d
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0xbff0
movq %rax, %rdi
movl -0x30(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xc010
cmpl $0x2, (%rax)
je 0xb5e3
movq -0x18(%rbp), %rdi
movslq -0x20(%rbp), %rsi
callq 0xbff0
movq %rax, %rdi
movl -0x30(%rbp), %eax
subl $0x1, %eax
movslq %eax, %rsi
callq 0xc010
cmpl $0x3, (%rax)
jne 0xb62a
movl -0x30(%rbp), %esi
decl %esi
movl -0x20(%rbp), %edx
leaq -0x70(%rbp), %rdi
callq 0xa8d0
jmp 0xb5f6
movq -0x88(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x5a80
jmp 0xb608
leaq -0x70(%rbp), %rdi
callq 0xa900
jmp 0xb62a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x28(%rbp)
movl %eax, -0x2c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0xa900
jmp 0xb64d
movb $0x1, -0x19(%rbp)
testb $0x1, -0x19(%rbp)
jne 0xb640
movq -0x88(%rbp), %rdi
callq 0x5da0
movq -0x80(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
movq -0x88(%rbp), %rdi
callq 0x5da0
movq -0x28(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)