// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/PlayerParam.cpp
// Function: HeteroParam::MaintainConsistency()
void HeteroParam::MaintainConsistency() {
  kickable_area =
      player_size + ServerParam::instance().ballSize() + kickable_margin;

  effective_speed_max =
      ServerParam::instance().maxDashPower() * effort_max * dash_power_rate /
      (1 - player_decay); // 实际可能达到的最大速度 -- 对dash模型求解可得
  acceleration_front_rate = effort_max * dash_power_rate;
  acceleration_side_rate =
      acceleration_front_rate * ServerParam::instance().sideDashRate();
  for (int i = 0; i <= DASH_POWER_NUM; ++i) {
    acceleration_front[i] = (double)i * acceleration_front_rate;
    acceleration_side[i] = (double)i * acceleration_side_rate;
  }
  min_catch_area = Sqrt(ServerParam::instance().catchAreaLength() *
                            (2.0 - catchable_area_l_stretch) *
                            ServerParam::instance().catchAreaLength() *
                            (2.0 - catchable_area_l_stretch) +
                        ServerParam::instance().catchAreaWidth() *
                            ServerParam::instance().catchAreaWidth() / 4);
  max_catch_area = Sqrt(
      ServerParam::instance().catchAreaLength() * catchable_area_l_stretch *
          ServerParam::instance().catchAreaLength() * catchable_area_l_stretch +
      ServerParam::instance().catchAreaWidth() *
          ServerParam::instance().catchAreaWidth() / 4);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movsd 0x3038(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12f10
movsd -0x48(%rbp), %xmm0
movq %rax, %rcx
movq -0x38(%rbp), %rax
addsd (%rcx), %xmm0
addsd 0x3040(%rax), %xmm0
movsd %xmm0, 0x3080(%rax)
callq 0x855e0
movq %rax, %rdi
callq 0x12b60
movq %rax, %rcx
movq -0x38(%rbp), %rax
movsd (%rcx), %xmm0
mulsd 0x3058(%rax), %xmm0
mulsd 0x3030(%rax), %xmm0
movsd 0x47dff(%rip), %xmm1    # 0xc1010
subsd 0x3020(%rax), %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, 0x3098(%rax)
movsd 0x3058(%rax), %xmm0
mulsd 0x3030(%rax), %xmm0
movsd %xmm0, 0x30a0(%rax)
movsd 0x30a0(%rax), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x12fa0
movsd -0x40(%rbp), %xmm0
movq %rax, %rcx
movq -0x38(%rbp), %rax
mulsd (%rcx), %xmm0
movsd %xmm0, 0x30a8(%rax)
movl $0x0, -0xc(%rbp)
cmpl $0x64, -0xc(%rbp)
jg 0x792f5
movq -0x38(%rbp), %rdi
cvtsi2sdl -0xc(%rbp), %xmm0
mulsd 0x30a0(%rdi), %xmm0
movsd %xmm0, -0x58(%rbp)
addq $0x30b0, %rdi           # imm = 0x30B0
movslq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x7b4c0
movsd -0x58(%rbp), %xmm0
movq -0x38(%rbp), %rdi
movsd %xmm0, (%rax)
cvtsi2sdl -0xc(%rbp), %xmm0
mulsd 0x30a8(%rdi), %xmm0
movsd %xmm0, -0x50(%rbp)
addq $0x33d8, %rdi           # imm = 0x33D8
movslq -0xc(%rbp), %rax
movq %rax, -0x20(%rbp)
leaq -0x20(%rbp), %rsi
callq 0x7b4c0
movsd -0x50(%rbp), %xmm0
movsd %xmm0, (%rax)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x79276
callq 0x855e0
movq %rax, %rdi
callq 0x328f0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movsd (%rcx), %xmm0
movsd 0x4819b(%rip), %xmm1    # 0xc14b0
subsd 0x3070(%rax), %xmm1
mulsd %xmm1, %xmm0
movsd %xmm0, -0x98(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x328f0
movsd -0x98(%rbp), %xmm0
movq %rax, %rcx
movq -0x38(%rbp), %rax
mulsd (%rcx), %xmm0
movsd %xmm0, -0x88(%rbp)
movsd 0x48157(%rip), %xmm0    # 0xc14b0
subsd 0x3070(%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x7b4e0
movsd (%rax), %xmm0
movsd %xmm0, -0x90(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x7b4e0
movsd -0x90(%rbp), %xmm1
movsd -0x88(%rbp), %xmm0
movsd -0x80(%rbp), %xmm2
mulsd (%rax), %xmm1
movsd 0x48eeb(%rip), %xmm3    # 0xc2298
divsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x28(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x12420
movq -0x38(%rbp), %rax
movsd %xmm0, 0x3088(%rax)
callq 0x855e0
movq %rax, %rdi
callq 0x328f0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movsd (%rcx), %xmm0
mulsd 0x3070(%rax), %xmm0
movsd %xmm0, -0x78(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x328f0
movsd -0x78(%rbp), %xmm0
movq %rax, %rcx
movq -0x38(%rbp), %rax
mulsd (%rcx), %xmm0
movsd %xmm0, -0x68(%rbp)
movsd 0x3070(%rax), %xmm0
movsd %xmm0, -0x60(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x7b4e0
movsd (%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
callq 0x855e0
movq %rax, %rdi
callq 0x7b4e0
movsd -0x70(%rbp), %xmm1
movsd -0x68(%rbp), %xmm0
movsd -0x60(%rbp), %xmm2
mulsd (%rax), %xmm1
movsd 0x48e33(%rip), %xmm3    # 0xc2298
divsd %xmm3, %xmm1
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0x30(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x12420
movq -0x38(%rbp), %rax
movsd %xmm0, 0x3090(%rax)
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)