// File: /workspace/github_cpp_makefile_star2_O1/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 0x4a75c
movsd -0x10(%rbp), %xmm0
addsd 0x30d8(%rax), %xmm0
addsd 0x3040(%rbx), %xmm0
movsd %xmm0, 0x3080(%rbx)
callq 0x4a75c
movsd 0x3030(%rbx), %xmm0
movsd 0x3058(%rbx), %xmm3
movsd 0x33c0(%rax), %xmm1
mulsd %xmm3, %xmm1
mulsd %xmm0, %xmm1
movsd 0x26400(%rip), %xmm2    # 0x6b058
subsd 0x3020(%rbx), %xmm2
divsd %xmm2, %xmm1
movsd %xmm1, 0x3098(%rbx)
mulsd %xmm0, %xmm3
movsd %xmm3, -0x10(%rbp)
movsd %xmm3, 0x30a0(%rbx)
callq 0x4a75c
movsd -0x10(%rbp), %xmm3
mulsd 0x33b0(%rax), %xmm3
movsd %xmm3, 0x30a8(%rbx)
movsd 0x30a0(%rbx), %xmm0
xorl %eax, %eax
xorps %xmm1, %xmm1
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
cmpq $0x65, %rax
jne 0x44ca1
callq 0x4a75c
movsd 0x26aa4(%rip), %xmm0    # 0x6b780
subsd 0x3070(%rbx), %xmm0
mulsd 0x31b0(%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x4a75c
movsd -0x10(%rbp), %xmm1
mulsd 0x31b0(%rax), %xmm1
movsd 0x26a75(%rip), %xmm0    # 0x6b780
subsd 0x3070(%rbx), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x4a75c
movsd 0x31b8(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x4a75c
movsd -0x18(%rbp), %xmm1
mulsd 0x31b8(%rax), %xmm1
mulsd 0x26360(%rip), %xmm1    # 0x6b0a8
addsd -0x10(%rbp), %xmm1
xorpd %xmm0, %xmm0
ucomisd %xmm0, %xmm1
movapd %xmm1, %xmm0
jb 0x44d61
sqrtsd %xmm0, %xmm0
jmp 0x44d66
callq 0x93c0
movsd %xmm0, 0x3088(%rbx)
callq 0x4a75c
movsd 0x31b0(%rax), %xmm0
mulsd 0x3070(%rbx), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x4a75c
movsd -0x10(%rbp), %xmm0
mulsd 0x31b0(%rax), %xmm0
mulsd 0x3070(%rbx), %xmm0
movsd %xmm0, -0x10(%rbp)
callq 0x4a75c
movsd 0x31b8(%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x4a75c
movsd -0x18(%rbp), %xmm0
mulsd 0x31b8(%rax), %xmm0
mulsd 0x262d5(%rip), %xmm0    # 0x6b0a8
addsd -0x10(%rbp), %xmm0
ucomisd 0x262b0(%rip), %xmm0    # 0x6b090
jb 0x44de8
sqrtsd %xmm0, %xmm0
jmp 0x44ded
callq 0x93c0
movsd %xmm0, 0x3090(%rbx)
addq $0x18, %rsp
popq %rbx
popq %rbp
retq