// File: arisKoutsou[P]oopproj/./src/game_utils.cpp
// Function: regenerateStats()
void regenerateStats(void) {
  for (size_t i = 0U; i != heroes.size(); ++i) {
    if (heroes[i]->getHealthPower() != 0) {
      int health = heroes[i]->getHealthPower();
      int mana = heroes[i]->getMagicPower();
      heroes[i]->setHealthPower(health + health*0.01);
      if (heroes[i]->getHealthPower() > heroes[i]->getMaxHealthPower()) {
	heroes[i]->setHealthPower(heroes[i]->getMaxHealthPower());
      }
      if (mana == 0) {
	heroes[i]->setMagicPower(100);
      } else {
	heroes[i]->setMagicPower(mana + mana*0.1);
	if (heroes[i]->getMagicPower() > heroes[i]->getMaxMagicPower()) {
	  heroes[i]->setMagicPower(heroes[i]->getMaxMagicPower());
	}
      }
    }
  }
  list<Monster*> :: const_iterator it = monsters.begin();
  for ( ; it != monsters.end(); ++it) {
    int health = (*it)->getHealthPower();
    (*it)->setHealthPower(health + health*0.01);
    if ((*it)->getHealthPower() > (*it)->getMaxHealthPower()) {
      (*it)->setHealthPower((*it)->getMaxHealthPower());
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq $0x0, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x310b1(%rip), %rdi     # 0x40330
callq 0x133f0
movq %rax, %rcx
movq -0x40(%rbp), %rax
cmpq %rcx, %rax
je 0xf484
movq -0x8(%rbp), %rsi
leaq 0x31091(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x298a0
cmpl $0x0, %eax
je 0xf471
movq -0x8(%rbp), %rsi
leaq 0x31070(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x298a0
movl %eax, -0xc(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x31055(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x21f60
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x3103a(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
cvtsi2sdl -0xc(%rbp), %xmm1
cvtsi2sdl -0xc(%rbp), %xmm0
movsd 0x1f108(%rip), %xmm2    # 0x2e418
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x8(%rbp), %rsi
leaq 0x31003(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x298a0
movl %eax, -0x44(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x30fe8(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x298c0
movl %eax, %ecx
movl -0x44(%rbp), %eax
cmpl %ecx, %eax
jle 0xf399
movq -0x8(%rbp), %rsi
leaq 0x30fc7(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x30fb0(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x298c0
movq -0x50(%rbp), %rdi
movl %eax, %esi
movq (%rdi), %rax
callq *0x18(%rax)
cmpl $0x0, -0x10(%rbp)
jne 0xf3c1
movq -0x8(%rbp), %rsi
leaq 0x30f86(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
movl $0x64, %esi
callq 0x220f0
jmp 0xf46f
movq -0x8(%rbp), %rsi
leaq 0x30f64(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
cvtsi2sdl -0x10(%rbp), %xmm1
cvtsi2sdl -0x10(%rbp), %xmm0
movsd 0x1f00a(%rip), %xmm2    # 0x2e3f0
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
callq 0x220f0
movq -0x8(%rbp), %rsi
leaq 0x30f2e(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x21f60
movl %eax, -0x54(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x30f13(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x21fc0
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl %ecx, %eax
jle 0xf46d
movq -0x8(%rbp), %rsi
leaq 0x30ef2(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x8(%rbp), %rsi
leaq 0x30edb(%rip), %rdi     # 0x40330
callq 0x133d0
movq (%rax), %rdi
callq 0x21fc0
movq -0x60(%rbp), %rdi
movl %eax, %esi
callq 0x220f0
jmp 0xf46f
jmp 0xf471
jmp 0xf473
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0xf270
leaq 0x30f35(%rip), %rdi     # 0x403c0
callq 0x13410
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x13440
leaq 0x30f18(%rip), %rdi     # 0x403c0
callq 0x135a0
movq %rax, -0x30(%rbp)
leaq -0x28(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x13440
leaq -0x18(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x13570
testb $0x1, %al
jne 0xf4d4
jmp 0xf583
leaq -0x18(%rbp), %rdi
callq 0x13480
movq (%rax), %rdi
callq 0x298a0
movl %eax, -0x34(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x13480
movq (%rax), %rdi
cvtsi2sdl -0x34(%rbp), %xmm1
cvtsi2sdl -0x34(%rbp), %xmm0
movsd 0x1ef12(%rip), %xmm2    # 0x2e418
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %esi
movq (%rdi), %rax
callq *0x18(%rax)
leaq -0x18(%rbp), %rdi
callq 0x13480
movq (%rax), %rdi
callq 0x298a0
movl %eax, -0x64(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x13480
movq (%rax), %rdi
callq 0x298c0
movl %eax, %ecx
movl -0x64(%rbp), %eax
cmpl %ecx, %eax
jle 0xf573
leaq -0x18(%rbp), %rdi
callq 0x13480
movq (%rax), %rax
movq %rax, -0x70(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x13480
movq (%rax), %rdi
callq 0x298c0
movq -0x70(%rbp), %rdi
movl %eax, %esi
movq (%rdi), %rax
callq *0x18(%rax)
jmp 0xf575
leaq -0x18(%rbp), %rdi
callq 0x13460
jmp 0xf4a1
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax)