// File: ujjwal-ism[P]Jumping_game/run.cpp
// Function: main
int main(){
  std::vector<Square*> game_board;

  game_board.push_back(new Square(15,15));
  game_board.push_back(new Square(17,13));
  game_board.push_back(new Square(19,11));
  game_board.push_back(new Square(24,11));
  game_board.push_back(new Square(24,30));
  game_board.push_back(new Square(25,7));
  game_board.push_back(new Square(18,12));
  game_board.push_back(new Square(20,4));
  game_board.push_back(new Square(20,3));

  Game* game1 = new Game(game_board);
  Player* player1 = new Player(11, 3);

  std::vector<Square*> board = game1->getBoard();

  GameUtil* util = new GameUtil();

  //int maxTravelDistance = util->compute(game_board.at(0), player1);
  //std::cout << "max distance: " << maxTravelDistance << std::endl;

  //int length = util->shortestPathDistance(game1, player1);
  //std::cout << "Length of shortest path: " << length << std::endl;

  std::vector<int> path;
  path.push_back(0);
  path.push_back(3);
  path.push_back(6);
  path.push_back(8); 

  bool valid = util->isValidPath(path, player1, game1);
  std::cout << "Example path is valid (0/1): " << valid << std::endl;

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x180, %rsp            # imm = 0x180
movl $0x0, -0x4(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x23d0
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x100(%rbp)
jmp 0x3b7e
movq -0x100(%rbp), %rdi
movsd 0x14c3(%rip), %xmm1     # 0x5050
movaps %xmm1, %xmm0
callq 0x4860
jmp 0x3b97
movq -0x100(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x4220
jmp 0x3bb1
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x108(%rbp)
jmp 0x3bc4
movq -0x108(%rbp), %rdi
movsd 0x1485(%rip), %xmm0     # 0x5058
movsd 0x1485(%rip), %xmm1     # 0x5060
callq 0x4860
jmp 0x3be2
movq -0x108(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x4220
jmp 0x3bfc
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x110(%rbp)
jmp 0x3c0f
movq -0x110(%rbp), %rdi
movsd 0x144a(%rip), %xmm0     # 0x5068
movsd 0x144a(%rip), %xmm1     # 0x5070
callq 0x4860
jmp 0x3c2d
movq -0x110(%rbp), %rax
movq %rax, -0x48(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x4220
jmp 0x3c47
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x118(%rbp)
jmp 0x3c5a
movq -0x118(%rbp), %rdi
movsd 0x140f(%rip), %xmm0     # 0x5078
movsd 0x13ff(%rip), %xmm1     # 0x5070
callq 0x4860
jmp 0x3c78
movq -0x118(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x4220
jmp 0x3c92
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x120(%rbp)
jmp 0x3ca5
movq -0x120(%rbp), %rdi
movsd 0x13c4(%rip), %xmm0     # 0x5078
movsd 0x13c4(%rip), %xmm1     # 0x5080
callq 0x4860
jmp 0x3cc3
movq -0x120(%rbp), %rax
movq %rax, -0x58(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x4220
jmp 0x3cdd
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x128(%rbp)
jmp 0x3cf0
movq -0x128(%rbp), %rdi
movsd 0x1389(%rip), %xmm0     # 0x5088
movsd 0x1389(%rip), %xmm1     # 0x5090
callq 0x4860
jmp 0x3d0e
movq -0x128(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x4220
jmp 0x3d28
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x130(%rbp)
jmp 0x3d3b
movq -0x130(%rbp), %rdi
movsd 0x134e(%rip), %xmm0     # 0x5098
movsd 0x134e(%rip), %xmm1     # 0x50a0
callq 0x4860
jmp 0x3d59
movq -0x130(%rbp), %rax
movq %rax, -0x68(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x4220
jmp 0x3d73
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x138(%rbp)
jmp 0x3d86
movq -0x138(%rbp), %rdi
movsd 0x1313(%rip), %xmm0     # 0x50a8
movsd 0x1313(%rip), %xmm1     # 0x50b0
callq 0x4860
jmp 0x3da4
movq -0x138(%rbp), %rax
movq %rax, -0x70(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x4220
jmp 0x3dbe
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x140(%rbp)
jmp 0x3dd1
movq -0x140(%rbp), %rdi
movsd 0x12c8(%rip), %xmm0     # 0x50a8
movsd 0x12d0(%rip), %xmm1     # 0x50b8
callq 0x4860
jmp 0x3def
movq -0x140(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x78(%rbp), %rsi
callq 0x4220
jmp 0x3e09
movl $0x18, %edi
callq 0x10c0
movq %rax, -0x148(%rbp)
jmp 0x3e1c
movb $0x1, -0x99(%rbp)
leaq -0x98(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x1320
jmp 0x3e35
movq -0x148(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x12f0
jmp 0x3e4a
movb $0x0, -0x99(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x26a0
movq -0x148(%rbp), %rax
movq %rax, -0x80(%rbp)
movl $0x10, %edi
callq 0x10c0
movq %rax, -0x150(%rbp)
jmp 0x3e7b
movq -0x150(%rbp), %rdi
movsd 0x11e6(%rip), %xmm0     # 0x5070
movsd 0x1226(%rip), %xmm1     # 0x50b8
callq 0x3ae0
jmp 0x3e99
movq -0x150(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x80(%rbp), %rdi
callq 0x1310
movq %rax, -0x158(%rbp)
jmp 0x3eb9
movq -0x158(%rbp), %rsi
leaq -0xc0(%rbp), %rdi
callq 0x1320
jmp 0x3ece
movl $0x1, %edi
callq 0x10c0
movq %rax, -0x160(%rbp)
jmp 0x3ee1
movq -0x160(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x168(%rbp)
callq 0x2700
movq -0x168(%rbp), %rdi
movl $0x0, -0xe4(%rbp)
leaq -0xe4(%rbp), %rsi
callq 0x2720
jmp 0x3f21
movl $0x3, -0xe8(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x2720
jmp 0x3f40
movl $0x6, -0xec(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xec(%rbp), %rsi
callq 0x2720
jmp 0x3f5f
movl $0x8, -0xf0(%rbp)
leaq -0xe0(%rbp), %rdi
leaq -0xf0(%rbp), %rsi
callq 0x2720
jmp 0x3f7e
movq -0xc8(%rbp), %rdi
movq -0xa8(%rbp), %rdx
movq -0x80(%rbp), %rcx
leaq -0xe0(%rbp), %rsi
callq 0x1d00
movb %al, -0x169(%rbp)
jmp 0x3fa4
movb -0x169(%rbp), %al
andb $0x1, %al
movb %al, -0xf1(%rbp)
movq 0x401f(%rip), %rdi      # 0x7fd8
leaq 0x1100(%rip), %rsi      # 0x50c0
callq 0x10b0
movq %rax, -0x178(%rbp)
jmp 0x3fce
movq -0x178(%rbp), %rdi
movzbl -0xf1(%rbp), %esi
andl $0x1, %esi
callq 0x1160
movq %rax, -0x180(%rbp)
jmp 0x3fed
movq -0x180(%rbp), %rdi
movq 0x3fcd(%rip), %rsi      # 0x7fc8
callq 0x10e0
jmp 0x4002
movl $0x0, -0x4(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x27c0
leaq -0xc0(%rbp), %rdi
callq 0x26a0
leaq -0x20(%rbp), %rdi
callq 0x26a0
movl -0x4(%rbp), %eax
addq $0x180, %rsp            # imm = 0x180
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x420e
movq -0x100(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x108(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x110(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x118(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x120(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x128(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x130(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x138(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq -0x140(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x419f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x26a0
testb $0x1, -0x99(%rbp)
jne 0x41aa
jmp 0x41bb
movq -0x148(%rbp), %rdi
movl $0x18, %esi
callq 0x10d0
jmp 0x420e
movq -0x150(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
movl $0x10, %esi
callq 0x10d0
jmp 0x420e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
jmp 0x4202
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0xe0(%rbp), %rdi
callq 0x27c0
leaq -0xc0(%rbp), %rdi
callq 0x26a0
leaq -0x20(%rbp), %rdi
callq 0x26a0
movq -0x30(%rbp), %rdi
callq 0x1150