// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Simulator.h
// Function: Simulator::Player::UpdateStamina()
void UpdateStamina() {
      if (mStamina <= ServerParam::instance().effortDecThr() *
                          ServerParam::instance().staminaMax()) {
        if (mEffort >
            PlayerParam::instance().HeteroPlayer(mPlayerType).effortMin()) {
          mEffort -= ServerParam::instance().effortDec();
        }

        if (mEffort <
            PlayerParam::instance().HeteroPlayer(mPlayerType).effortMin()) {
          mEffort =
              PlayerParam::instance().HeteroPlayer(mPlayerType).effortMin();
        }
      }

      if (mStamina >= ServerParam::instance().effortIncThr() *
                          ServerParam::instance().staminaMax()) {
        if (mEffort <
            PlayerParam::instance().HeteroPlayer(mPlayerType).effortMax()) {
          mEffort += ServerParam::instance().effortInc();
          if (mEffort >
              PlayerParam::instance().HeteroPlayer(mPlayerType).effortMax()) {
            mEffort =
                PlayerParam::instance().HeteroPlayer(mPlayerType).effortMax();
          }
        }
      }

      double stamina_inc =
          Min(PlayerParam::instance().HeteroPlayer(mPlayerType).staminaIncMax(),
              ServerParam::instance().staminaMax() - mStamina);
      mStamina += stamina_inc;

      if (mStamina > ServerParam::instance().staminaMax()) {
        mStamina = ServerParam::instance().staminaMax();
      }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
cvtsi2sdl 0x28(%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x88aa0
movsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x32930
movsd -0x28(%rbp), %xmm0
movsd -0x20(%rbp), %xmm1
mulsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jb 0x888ce
movq -0x30(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32d00
movsd -0x38(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x88865
callq 0x855e0
movq %rax, %rdi
callq 0x32bf0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movsd (%rcx), %xmm1
movsd 0x30(%rax), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x30(%rax)
movq -0x30(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32d00
movsd -0x40(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x888cc
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32d00
movq %rax, %rcx
movq -0x30(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x30(%rax)
jmp 0x888ce
movq -0x30(%rbp), %rax
cvtsi2sdl 0x28(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x88ac0
movsd (%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x32930
movsd -0x50(%rbp), %xmm1
movsd -0x48(%rbp), %xmm0
mulsd (%rax), %xmm1
ucomisd %xmm1, %xmm0
jb 0x889da
movq -0x30(%rbp), %rax
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32d20
movsd -0x58(%rbp), %xmm1
movsd (%rax), %xmm0
ucomisd %xmm1, %xmm0
jbe 0x889d8
callq 0x855e0
movq %rax, %rdi
callq 0x88ae0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movsd (%rcx), %xmm0
addsd 0x30(%rax), %xmm0
movsd %xmm0, 0x30(%rax)
movsd 0x30(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32d20
movsd -0x60(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x889d6
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32d20
movq %rax, %rcx
movq -0x30(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, 0x30(%rax)
jmp 0x889d8
jmp 0x889da
callq 0x798a0
movq -0x30(%rbp), %rsi
movq %rax, %rdi
addq $0x38, %rsi
callq 0x129d0
movq %rax, %rdi
callq 0x32ce0
movq %rax, -0x70(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x32930
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movq -0x30(%rbp), %rax
movsd (%rcx), %xmm0
cvtsi2sdl 0x28(%rax), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x12a60
movq %rax, %rcx
movq -0x30(%rbp), %rax
movsd (%rcx), %xmm0
movsd %xmm0, -0x10(%rbp)
movsd -0x10(%rbp), %xmm1
cvtsi2sdl 0x28(%rax), %xmm0
addsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
movl %ecx, 0x28(%rax)
cvtsi2sdl 0x28(%rax), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x32930
movsd -0x68(%rbp), %xmm0
ucomisd (%rax), %xmm0
jbe 0x88a90
callq 0x855e0
movq %rax, %rdi
callq 0x32930
movq %rax, %rcx
movq -0x30(%rbp), %rax
cvttsd2si (%rcx), %ecx
movl %ecx, 0x28(%rax)
addq $0x70, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)