// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movsd 0x3038(%rdi), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x3db2c
movsd -0x10(%rbp), %xmm0
addsd 0x30d8(%rax), %xmm0
addsd 0x3040(%rbx), %xmm0
movsd %xmm0, 0x3080(%rbx)
callq 0x3db2c
movsd 0x3030(%rbx), %xmm0
movsd 0x3058(%rbx), %xmm3
movsd 0x33c0(%rax), %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
movsd 0x1e716(%rip), %xmm2    # 0x57048
subsd 0x3020(%rbx), %xmm2
divsd %xmm2, %xmm1
movsd %xmm1, 0x3098(%rbx)
mulsd %xmm0, %xmm3
movsd %xmm3, -0x10(%rbp)
movsd %xmm3, 0x30a0(%rbx)
callq 0x3db2c
movsd -0x10(%rbp), %xmm3
mulsd 0x33b0(%rax), %xmm3
movsd %xmm3, 0x30a8(%rbx)
movsd 0x30a0(%rbx), %xmm0
xorl %eax, %eax
cmpq $0x65, %rax
je 0x389a8
cvtsi2sd %eax, %xmm1
movapd %xmm0, %xmm2
mulsd %xmm1, %xmm2
movsd %xmm2, 0x30b0(%rbx,%rax,8)
mulsd %xmm3, %xmm1
movsd %xmm1, 0x33d8(%rbx,%rax,8)
incq %rax
jmp 0x3897b
callq 0x3db2c
movsd 0x1eda3(%rip), %xmm0    # 0x57758
subsd 0x3070(%rbx), %xmm0
mulsd 0x31b0(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x3db2c
movsd -0x10(%rbp), %xmm1
mulsd 0x31b0(%rax), %xmm1
movsd 0x1ed74(%rip), %xmm0    # 0x57758
subsd 0x3070(%rbx), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x3db2c
movsd 0x31b8(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x3db2c
movsd -0x18(%rbp), %xmm1
mulsd 0x31b8(%rax), %xmm1
mulsd 0x1e657(%rip), %xmm1    # 0x57078
addsd -0x10(%rbp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movapd %xmm1, %xmm0
jb 0x38a3a
sqrtsd %xmm0, %xmm0
jmp 0x38a3f
callq 0x93e0
movsd %xmm0, 0x3088(%rbx)
callq 0x3db2c
movsd 0x31b0(%rax), %xmm0
mulsd 0x3070(%rbx), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x3db2c
movsd -0x10(%rbp), %xmm0
mulsd 0x31b0(%rax), %xmm0
mulsd 0x3070(%rbx), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x3db2c
movsd 0x31b8(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x3db2c
movsd -0x18(%rbp), %xmm0
mulsd 0x31b8(%rax), %xmm0
mulsd 0x1e5cc(%rip), %xmm0    # 0x57078
addsd -0x10(%rbp), %xmm0
ucomisd 0x1f827(%rip), %xmm0    # 0x582e0
jb 0x38ac1
sqrtsd %xmm0, %xmm0
jmp 0x38ac6
callq 0x93e0
movsd %xmm0, 0x3090(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq
nop