// File: arisKoutsou[P]oopproj/./src/livings/Hero.cpp
// Function: Hero::moveUp()
void Hero :: moveUp() {
  int heroY = this->getPosition().getY();
  int heroX = this->getPosition().getX();

  if (heroY == this->grid->getMaxY() - 1) {
    throw HeroMoveException("You can't move up any further");
  } else if (this->grid->getTile(heroY + 1, heroX).isNonAccessible()) {
    throw HeroMoveException("You can't move in a non accessible tile");
  } else {
    this->grid->removeLiving(heroY, heroX, this);
    this->getPosition().setY(heroY + 1);
    this->grid->addLiving(heroY + 1, heroX, this);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x29a80
movq %rax, %rdi
callq 0x29ae0
movq -0x78(%rbp), %rdi
movl %eax, -0xc(%rbp)
callq 0x29a80
movq %rax, %rdi
callq 0x29ad0
movl %eax, %ecx
movq -0x78(%rbp), %rax
movl %ecx, -0x10(%rbp)
movl -0xc(%rbp), %ecx
movl %ecx, -0x70(%rbp)
movq 0x8(%rax), %rdi
callq 0x9230
movl %eax, %ecx
movl -0x70(%rbp), %eax
subl $0x1, %ecx
cmpl %ecx, %eax
jne 0x235c2
movb $0x1, -0x45(%rbp)
movl $0x28, %edi
callq 0x5150
movq %rax, -0x88(%rbp)
leaq -0x31(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x5560
movq -0x80(%rbp), %rdx
leaq 0xb88c(%rip), %rsi      # 0x2edc9
leaq -0x30(%rbp), %rdi
callq 0x7d20
jmp 0x23548
movq -0x88(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x5e70
jmp 0x2355a
movq -0x88(%rbp), %rdi
movb $0x0, -0x45(%rbp)
leaq 0x1c0cc(%rip), %rsi     # 0x3f638
leaq -0x1d6a3(%rip), %rdx    # 0x5ed0
callq 0x5530
jmp 0x236f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x235a0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x55d0
leaq -0x31(%rbp), %rdi
callq 0x5350
testb $0x1, -0x45(%rbp)
jne 0x235b1
jmp 0x235bd
movq -0x88(%rbp), %rdi
callq 0x5220
jmp 0x236e9
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
callq 0x9340
movq %rax, %rdi
callq 0x8f30
testb $0x1, %al
jne 0x235e9
jmp 0x2369e
movb $0x1, -0x6a(%rbp)
movl $0x28, %edi
callq 0x5150
movq %rax, -0x98(%rbp)
leaq -0x69(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x5560
movq -0x90(%rbp), %rdx
leaq 0xb7cb(%rip), %rsi      # 0x2ede7
leaq -0x68(%rbp), %rdi
callq 0x7d20
jmp 0x23627
movq -0x98(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0x5e70
jmp 0x23639
movq -0x98(%rbp), %rdi
movb $0x0, -0x6a(%rbp)
leaq 0x1bfed(%rip), %rsi     # 0x3f638
leaq -0x1d782(%rip), %rdx    # 0x5ed0
callq 0x5530
jmp 0x236f2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
jmp 0x2367f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x40(%rbp)
movl %eax, -0x44(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x55d0
leaq -0x69(%rbp), %rdi
callq 0x5350
testb $0x1, -0x6a(%rbp)
jne 0x23690
jmp 0x2369c
movq -0x98(%rbp), %rdi
callq 0x5220
jmp 0x236e9
movq -0x78(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0xc(%rbp), %esi
movl -0x10(%rbp), %edx
callq 0x94d0
movq -0x78(%rbp), %rdi
callq 0x29a80
movq %rax, %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
callq 0x29b20
movq -0x78(%rbp), %rcx
movq 0x8(%rcx), %rdi
movl -0xc(%rbp), %esi
addl $0x1, %esi
movl -0x10(%rbp), %edx
callq 0x9380
jmp 0x236e0
addq $0xa0, %rsp
popq %rbp
retq
movq -0x40(%rbp), %rdi
callq 0x5550
nopw %cs:(%rax,%rax)