// File: /workspace/github_cpp_makefile_star2_O2/wrighteagle2d[P]wrighteaglebase/Debug/../src/WorldState.cpp
// Function: WorldStateUpdater::UpdateFromAudio()
void WorldStateUpdater::UpdateFromAudio() {
  // update by our coach say
  if (mpObserver->Audio().IsOurCoachSayValid()) {
    mpObserver->ResetOurCoachSayValid(); // 恢复
    if (mpObserver->IsNewOppType()) {
      for (int i = 1; i <= TEAMSIZE; ++i) {
        if (mpObserver->Audio().GetOpponentType(i) > 0) {
          Opponent(i).UpdatePlayerType(mpObserver->Audio().GetOpponentType(i));
        }
      }
      mpObserver->SetNewOppType(false);
    }
  }

  if (mpObserver->Ball_Fullstate().GetPosDelay() == 0) {
    mpObserver->Ball_Fullstate().AutoUpdate(
        1, PlayerParam::instance().ballConfDecay());

    Ball().UpdatePos(mpObserver->Ball_Fullstate().GetPos(), 1,
                     PlayerParam::instance().ballConfDecay());
    Ball().UpdateGuessedTimes(0);
    Ball().UpdateVel(mpObserver->Ball_Fullstate().GetVel(), 1,
                     PlayerParam::instance().ballConfDecay());
    Ball().UpdatePosEps(0);
    Ball().UpdateVelEps(0);

    for (Unum i = 1; i <= TEAMSIZE; i++) {
      Teammate(i).SetIsAlive(mpObserver->Teammate_Fullstate(i).IsAlive());
      Teammate(i).UpdatePos(mpObserver->Teammate_Fullstate(i).GetPos(), 1,
                            PlayerParam::instance().playerConfDecay());
      Teammate(i).UpdateGuessedTimes(0);
      Teammate(i).UpdateVel(mpObserver->Teammate_Fullstate(i).GetVel(), 1,
                            PlayerParam::instance().playerConfDecay());
      Teammate(i).UpdatePosEps(0);
      Teammate(i).UpdateVelEps(0);
      Teammate(i).UpdateBodyDir(mpObserver->Teammate_Fullstate(i).GetBodyDir(),
                                1, PlayerParam::instance().playerConfDecay());
      Teammate(i).UpdateNeckDir(mpObserver->Teammate_Fullstate(i).GetNeckDir(),
                                1, PlayerParam::instance().playerConfDecay());
      if (i != mSelfUnum) {
        Teammate(i).UpdateStamina(
            mpObserver->Teammate_Fullstate(i).GetStamina());
        Teammate(i).UpdateCapacity(
            mpObserver->Teammate_Fullstate(i).GetCapacity());
      }

      Opponent(i).SetIsAlive(mpObserver->Opponent_Fullstate(i).IsAlive());
      Opponent(i).UpdatePlayerType(
          mpObserver->Opponent_Fullstate(i).GetPlayerType());
      Opponent(i).UpdatePos(mpObserver->Opponent_Fullstate(i).GetPos(), 1,
                            PlayerParam::instance().playerConfDecay());
      Opponent(i).UpdateGuessedTimes(0);
      Opponent(i).UpdateVel(mpObserver->Opponent_Fullstate(i).GetVel(), 1,
                            PlayerParam::instance().playerConfDecay());
      Opponent(i).UpdatePosEps(0);
      Opponent(i).UpdateVelEps(0);
      Opponent(i).UpdateBodyDir(mpObserver->Opponent_Fullstate(i).GetBodyDir());
      Opponent(i).UpdateNeckDir(mpObserver->Opponent_Fullstate(i).GetNeckDir());
      Opponent(i).UpdateStamina(mpObserver->Opponent_Fullstate(i).GetStamina());
      Opponent(i).UpdateCapacity(
          mpObserver->Opponent_Fullstate(i).GetCapacity());
    }
  } else if (mpObserver->Audio().IsTeammateSayValid()) {
    // update by teammate say
    mpObserver->ResetTeammateSayValid();

    int type = mpObserver->Audio().GetHearInfoType();
    Unum sender = mpObserver->Audio().GetHearUnum();

    //更新听到球的信息
    int cmp = type & AudioObserver::HearInfo_Ball;
    if (cmp != 0) {
      if (Ball().GetGuessedTimes() > 0 ||
          Ball().GetPosConf() <
              PlayerParam::instance().minValidConf() - FLOAT_EPS ||
          (Teammate(sender).IsAlive() &&
           Teammate(sender).GetPos().Dist2(Ball().GetPos()) <
               SelfState().GetPos().Dist2(Ball().GetPos()))) {
        if (mpObserver->Audio().GetBallPos().time() ==
            mpObserver->CurrentTime()) {
          Ball().UpdatePos(mpObserver->Audio().GetBallPos().value(), 1,
                           PlayerParam::instance().ballConfDecay() - FLOAT_EPS);
          Ball().UpdateGuessedTimes(0);
          // 0.3为经验值 0.75 * 4
          double eps =
              1.5 + PlayerParam::instance().GetEpsInSight(
                        (Ball().GetPos() - Teammate(sender).GetPos()).Mod());
          Ball().UpdatePosEps(eps);
        }

        if (mpObserver->Audio().GetBallVel().time() ==
            mpObserver->CurrentTime()) {
          Ball().UpdateVel(mpObserver->Audio().GetBallVel().value(), 1,
                           PlayerParam::instance().ballConfDecay() - FLOAT_EPS);

          //统计得到看见的速度一般误差不大于1
          Ball().UpdateVelEps(3);
        }
      }
    }

    //更新听到队友的信息
    cmp = type & AudioObserver::HearInfo_Teammate;
    if (cmp != 0) {
      int teammate_count = mpObserver->Audio().GetTeammateCount();
      for (int i = 0; i < teammate_count; i++) {
        if (mpObserver->Audio().GetTeammate(i).time() ==
            mpObserver->CurrentTime()) {
          int unum = mpObserver->Audio().GetTeammate(i).value().mUnum;
          if (Teammate(unum).GetGuessedTimes() > 0 ||
              Teammate(unum).GetPosConf() <
                  PlayerParam::instance().playerConfDecay() - FLOAT_EPS ||
              (Teammate(sender).IsAlive() &&
               Teammate(sender).GetPos().Dist2(Teammate(unum).GetPos()) <
                   SelfState().GetPos().Dist2(Teammate(unum).GetPos()))) {
            Teammate(unum).UpdateGuessedTimes(0);
            Teammate(unum).SetIsAlive(true);
            const Vector &pos = mpObserver->Audio().GetTeammate(i).value().mPos;

            Teammate(unum).UpdatePos(
                pos, 1, PlayerParam::instance().playerConfDecay() - FLOAT_EPS);

            double eps = 0.1 + PlayerParam::instance().GetEpsInSight(
                                   (pos - Teammate(sender).GetPos()).Mod());
            Teammate(unum).UpdatePosEps(eps);
          }
        }
      }
    }

    //更新听到的对手的信息
    cmp = type & AudioObserver::HearInfo_Opponent;
    if (cmp != 0) {
      int Opponent_count = mpObserver->Audio().GetOpponentCount();
      for (int i = 0; i < Opponent_count; i++) {
        if (mpObserver->Audio().GetOpponent(i).time() ==
            mpObserver->CurrentTime()) {
          int unum = mpObserver->Audio().GetOpponent(i).value().mUnum;
          if (Opponent(unum).GetGuessedTimes() > 0 ||
              Opponent(unum).GetPosConf() <
                  PlayerParam::instance().playerConfDecay() - FLOAT_EPS ||
              (Teammate(sender).IsAlive() &&
               Teammate(sender).GetPos().Dist2(Opponent(unum).GetPos()) <
                   SelfState().GetPos().Dist2(Opponent(unum).GetPos()))) {
            Opponent(unum).UpdateGuessedTimes(0);
            Opponent(unum).SetIsAlive(true);
            const Vector &pos = mpObserver->Audio().GetOpponent(i).value().mPos;

            Opponent(unum).UpdatePos(
                pos, 1, PlayerParam::instance().playerConfDecay() - FLOAT_EPS);
            double eps = 0.1 + PlayerParam::instance().GetEpsInSight(
                                   (pos - Teammate(sender).GetPos()).Mod());
            Opponent(unum).UpdatePosEps(eps);
          }
        }
      }
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, -0x30(%rbp)
movq (%rdi), %r15
cmpb $0x1, 0x1c0(%r15)
jne 0x4dcd5
movq %r15, %rdi
callq 0x55708
movq -0x30(%rbp), %rax
movq (%rax), %r15
cmpb $0x1, 0x119(%r15)
jne 0x4dcd5
movl $0x82, %r14d
movl $0x10d0, %r12d          # imm = 0x10D0
movq -0x30(%rbp), %rax
movq (%rax), %r15
cmpq $0x8d, %r14
je 0x4dccd
movl (%r15,%r14,4), %esi
testl %esi, %esi
jle 0x4dcc1
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rdi
addq %r12, %rdi
callq 0x38238
incq %r14
addq $0x178, %r12            # imm = 0x178
jmp 0x4dc99
movb $0x0, 0x119(%r15)
cmpl $0x0, 0x3588(%r15)
je 0x4de9d
cmpb $0x1, 0x1e0(%r15)
jne 0x4de8e
movb $0x0, 0x1e0(%r15)
movl 0x540(%r15), %ecx
movslq 0x240(%r15), %rax
movq %rax, -0x50(%rbp)
movl %ecx, -0x44(%rbp)
testb $0x1, %cl
je 0x4de7a
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
cmpl $0x0, 0xa0(%rax)
jg 0x4dd52
movsd 0x50(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x38d94
movsd 0x31e8(%rax), %xmm0
addsd 0x9309(%rip), %xmm0     # 0x57050
ucomisd -0x38(%rbp), %xmm0
jbe 0x4e64d
movq -0x30(%rbp), %rax
movq (%rax), %r14
movl 0xc(%r14), %eax
movl 0x10(%r14), %ecx
cmpl %ecx, 0x25c(%r14)
jne 0x4de1d
cmpl %eax, 0x258(%r14)
jne 0x4de1d
addq $0x248, %r14            # imm = 0x248
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %r15
addq $0x30, %r15
callq 0x38d94
movsd 0x3200(%rax), %xmm0
addsd 0x92ad(%rip), %xmm0     # 0x57050
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xde1c
movq 0x8(%rbx), %rax
andl $0x0, 0xa0(%rax)
callq 0x38d94
movq 0x8(%rbx), %rcx
movsd 0x38(%rcx), %xmm0
movsd 0x40(%rcx), %xmm1
imulq $0x178, -0x50(%rbp), %rdx # imm = 0x178
subsd -0xc8(%rdx,%rcx), %xmm0
subsd -0xc0(%rdx,%rcx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movq %rax, %rdi
callq 0x55720
addsd 0x9f7f(%rip), %xmm0     # 0x57d88
movq 0x8(%rbx), %rax
movsd %xmm0, 0x58(%rax)
movq (%rbx), %r14
movl 0xc(%r14), %eax
movl 0x10(%r14), %ecx
cmpl %ecx, 0x274(%r14)
jne 0x4de7a
cmpl %eax, 0x270(%r14)
jne 0x4de7a
addq $0x260, %r14            # imm = 0x260
movq -0x30(%rbp), %rbx
movq 0x8(%rbx), %r15
addq $0x30, %r15
callq 0x38d94
movsd 0x3200(%rax), %xmm0
addsd 0x91f9(%rip), %xmm0     # 0x57050
pushq $0x1
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0xdde8
movq 0x8(%rbx), %rax
movabsq $0x4008000000000000, %rcx # imm = 0x4008000000000000
movq %rcx, 0x80(%rax)
testb $0x2, -0x44(%rbp)
jne 0x4e21f
testb $0x4, -0x44(%rbp)
jne 0x4e432
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
addq $0x3570, %r15           # imm = 0x3570
callq 0x38d94
movsd 0x3200(%rax), %xmm0
pushq $0x1
popq %rbx
movq %r15, %rdi
movl %ebx, %esi
callq 0xde4c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r15
addq $0x30, %r15
movl $0x3578, %r12d          # imm = 0x3578
movq -0x30(%rbp), %rax
addq (%rax), %r12
callq 0x38d94
movsd 0x3200(%rax), %xmm0
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0xde1c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r15
andl $0x0, 0xa0(%r15)
addq $0x30, %r15
movl $0x35a0, %r12d          # imm = 0x35A0
movq -0x30(%rbp), %rax
addq (%rax), %r12
callq 0x38d94
movsd 0x3200(%rax), %xmm0
movq %r15, %rdi
movq %r12, %rsi
movl %ebx, %edx
movq -0x30(%rbp), %rbx
callq 0xdde8
movq 0x8(%rbx), %rdi
andq $0x0, 0x58(%rdi)
andq $0x0, 0x80(%rdi)
pushq $0x1
popq %rax
movq %rax, -0x38(%rbp)
xorl %r14d, %r14d
cmpq $0x1028, %r14           # imm = 0x1028
je 0x4de8e
addq %r14, %rdi
movl $0xa8, %eax
addq %rax, %rdi
movl $0xa8, %r12d
movq (%rbx), %rax
movzbl 0x36fa(%rax,%r14), %esi
callq 0x381ec
movq 0x8(%rbx), %r15
addq %r14, %r15
addq %r12, %r15
movl $0xa8, %r13d
movq (%rbx), %rax
leaq (%rax,%r14), %r12
addq $0x35f0, %r12           # imm = 0x35F0
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movq %r15, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
callq 0xde1c
movq 0x8(%rbx), %r12
andl $0x0, 0x118(%r12,%r14)
leaq (%r14,%r13), %r15
addq %r15, %r12
movq (%rbx), %rax
leaq (%rax,%r14), %r13
addq $0x3618, %r13           # imm = 0x3618
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movq %r12, %rdi
movq %r13, %rsi
pushq $0x1
popq %r12
movl %r12d, %edx
callq 0xdde8
movq 0x8(%rbx), %rax
andq $0x0, 0xd0(%rax,%r14)
andq $0x0, 0xf8(%rax,%r14)
addq %rax, %r15
movq (%rbx), %rax
movsd 0x3698(%rax,%r14), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x38d94
movsd 0x31f8(%rax), %xmm1
movq %r15, %rdi
movsd -0x40(%rbp), %xmm0
movl %r12d, %esi
callq 0x382a6
movq 0x8(%rbx), %r15
addq %r14, %r15
movl $0xa8, %eax
addq %rax, %r15
movq (%rbx), %rax
leaq (%rax,%r14), %rdi
addq $0x3680, %rdi           # imm = 0x3680
callq 0xd40e
movsd %xmm0, -0x40(%rbp)
callq 0x38d94
movsd 0x31f8(%rax), %xmm1
movq %r15, %rdi
movsd -0x40(%rbp), %xmm0
movl %r12d, %esi
callq 0x382f8
movl 0x14(%rbx), %ecx
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
cmpq %rcx, -0x38(%rbp)
je 0x4e0b8
movsd 0x3660(%rax,%r14), %xmm0
movsd %xmm0, 0x120(%rdi,%r14)
movsd 0x3670(%rax,%r14), %xmm0
movsd %xmm0, 0x130(%rdi,%r14)
addq %r14, %rdi
movl $0x10d0, %ecx           # imm = 0x10D0
addq %rcx, %rdi
movl $0x10d0, %r12d          # imm = 0x10D0
movzbl 0x4722(%rax,%r14), %esi
callq 0x381ec
movq 0x8(%rbx), %rdi
addq %r14, %rdi
addq %r12, %rdi
movq (%rbx), %rax
movl 0x4724(%rax,%r14), %esi
callq 0x38238
movq 0x8(%rbx), %r15
addq %r14, %r15
addq %r12, %r15
movl $0x10d0, %r13d          # imm = 0x10D0
movq (%rbx), %rax
leaq (%rax,%r14), %r12
addq $0x4618, %r12           # imm = 0x4618
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movq %r15, %rdi
movq %r12, %rsi
pushq $0x1
popq %rbx
movl %ebx, %edx
callq 0xde1c
movq -0x30(%rbp), %rax
movq 0x8(%rax), %r15
andl $0x0, 0x1140(%r15,%r14)
leaq (%r14,%r13), %r12
addq %r12, %r15
movq -0x30(%rbp), %rax
movq (%rax), %rax
leaq (%rax,%r14), %r13
addq $0x4640, %r13           # imm = 0x4640
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
movq %r15, %rdi
movq %r13, %rsi
movl %ebx, %edx
movq -0x30(%rbp), %rbx
callq 0xdde8
movq 0x8(%rbx), %rax
andq $0x0, 0x10f8(%rax,%r14)
andq $0x0, 0x1120(%rax,%r14)
addq %rax, %r12
movq (%rbx), %rax
movsd 0x46c0(%rax,%r14), %xmm0
movq %r12, %rdi
xorl %esi, %esi
movsd 0x8ea1(%rip), %xmm1     # 0x57048
callq 0x382a6
movq 0x8(%rbx), %r15
addq %r14, %r15
movl $0x10d0, %eax           # imm = 0x10D0
addq %rax, %r15
movq (%rbx), %rax
leaq (%rax,%r14), %rdi
addq $0x46a8, %rdi           # imm = 0x46A8
callq 0xd40e
movq %r15, %rdi
xorl %esi, %esi
movsd 0x8e6d(%rip), %xmm1     # 0x57048
callq 0x382f8
movq (%rbx), %rax
movq 0x8(%rbx), %rdi
movsd 0x4688(%rax,%r14), %xmm0
movsd %xmm0, 0x1148(%rdi,%r14)
movsd 0x4698(%rax,%r14), %xmm0
movsd %xmm0, 0x1158(%rdi,%r14)
incq -0x38(%rbp)
addq $0x178, %r14            # imm = 0x178
jmp 0x4df4b
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x538(%rax), %r13d
movq -0x50(%rbp), %rax
decl %eax
cltq
xorl %r14d, %r14d
testl %r13d, %r13d
cmovlel %r14d, %r13d
shlq $0x5, %r13
imulq $0x178, %rax, %rax      # imm = 0x178
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %rbx
cmpq %r14, %r13
je 0x4de84
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x294(%rax,%r14), %ecx
cmpl 0x10(%rax), %ecx
jne 0x4e391
movl 0xc(%rax), %ecx
cmpl %ecx, 0x290(%rax,%r14)
jne 0x4e391
movslq 0x288(%rax,%r14), %r15
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
imulq $0x178, %r15, %rcx      # imm = 0x178
decq %r15
cmpl $0x0, -0x60(%rcx,%rax)
jg 0x4e2e0
addq %rcx, %rax
addq $-0xd0, %rax
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
addsd 0x8d83(%rip), %xmm0     # 0x57050
ucomisd -0x38(%rbp), %xmm0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
jbe 0x4e39a
imulq $0x178, %r15, %rcx      # imm = 0x178
movq %rcx, -0x38(%rbp)
leaq (%rax,%rcx), %r15
addq $0xa8, %r15
andl $0x0, 0x70(%r15)
movb $0x1, 0x112(%r15)
movq (%rbx), %rax
leaq (%rax,%r14), %r12
addq $0x278, %r12            # imm = 0x278
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
addsd 0x8d2a(%rip), %xmm0     # 0x57050
movq %r15, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
callq 0xde1c
callq 0x38d94
movq 0x8(%rbx), %rcx
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movq -0x40(%rbp), %rdx
subsd 0xb0(%rcx,%rdx), %xmm0
subsd 0xb8(%rcx,%rdx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movq %rax, %rdi
callq 0x55720
addsd 0xa210(%rip), %xmm0     # 0x58590
movq 0x8(%rbx), %rax
movq -0x38(%rbp), %rcx
movsd %xmm0, 0xd0(%rax,%rcx)
addq $0x20, %r14
jmp 0x4e252
movq -0x40(%rbp), %rcx
cmpb $0x1, 0x1ba(%rax,%rcx)
jne 0x4e391
leaq 0xa8(%rax), %rcx
movq -0x40(%rbp), %rdx
addq %rax, %rdx
addq $0xa8, %rdx
imulq $0x178, %r15, %rsi      # imm = 0x178
movsd 0x8(%rdx), %xmm0
movsd 0x10(%rdx), %xmm1
movsd 0x8(%rcx,%rsi), %xmm2
movsd 0x10(%rcx,%rsi), %xmm3
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq -0x30(%rbp), %rdx
movslq 0x14(%rdx), %rdx
imulq $0x178, %rdx, %rdx      # imm = 0x178
movsd -0x170(%rdx,%rcx), %xmm1
movsd -0x168(%rdx,%rcx), %xmm4
subsd %xmm2, %xmm1
subsd %xmm3, %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm1, %xmm1
addsd %xmm4, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4e2e0
jmp 0x4e391
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x53c(%rax), %ebx
movq -0x50(%rbp), %rax
decl %eax
cltq
xorl %r14d, %r14d
testl %ebx, %ebx
cmovlel %r14d, %ebx
shlq $0x5, %rbx
imulq $0x178, %rax, %rax      # imm = 0x178
movq %rax, -0x40(%rbp)
movq -0x30(%rbp), %r13
cmpq %r14, %rbx
je 0x4de8e
movq -0x30(%rbp), %rax
movq (%rax), %rax
movl 0x3f4(%rax,%r14), %ecx
cmpl 0x10(%rax), %ecx
jne 0x4e5a6
movl 0xc(%rax), %ecx
cmpl %ecx, 0x3f0(%rax,%r14)
jne 0x4e5a6
movslq 0x3e8(%rax,%r14), %r15
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
imulq $0x178, %r15, %rcx      # imm = 0x178
decq %r15
cmpl $0x0, 0xfc8(%rcx,%rax)
jg 0x4e4f4
addq %rcx, %rax
addq $0xf58, %rax            # imm = 0xF58
movsd 0x20(%rax), %xmm0
movsd %xmm0, -0x38(%rbp)
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
addsd 0x8b6f(%rip), %xmm0     # 0x57050
ucomisd -0x38(%rbp), %xmm0
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
jbe 0x4e5af
imulq $0x178, %r15, %rcx      # imm = 0x178
movq %rcx, -0x38(%rbp)
leaq (%rax,%rcx), %r15
addq $0x10d0, %r15           # imm = 0x10D0
andl $0x0, 0x70(%r15)
movb $0x1, 0x112(%r15)
movq (%r13), %rax
leaq (%rax,%r14), %r12
addq $0x3d8, %r12            # imm = 0x3D8
callq 0x38d94
movsd 0x31f8(%rax), %xmm0
addsd 0x8b15(%rip), %xmm0     # 0x57050
movq %r15, %rdi
movq %r12, %rsi
pushq $0x1
popq %rdx
callq 0xde1c
callq 0x38d94
movq 0x8(%r13), %rcx
movsd (%r12), %xmm0
movsd 0x8(%r12), %xmm1
movq -0x40(%rbp), %rdx
subsd 0xb0(%rcx,%rdx), %xmm0
subsd 0xb8(%rcx,%rdx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movq %rax, %rdi
callq 0x55720
addsd 0x9ffb(%rip), %xmm0     # 0x58590
movq 0x8(%r13), %rax
movq -0x38(%rbp), %rcx
movsd %xmm0, 0x10f8(%rax,%rcx)
addq $0x20, %r14
jmp 0x4e463
movq -0x40(%rbp), %rcx
cmpb $0x1, 0x1ba(%rax,%rcx)
jne 0x4e5a6
leaq 0xa8(%rax), %rcx
movq -0x40(%rbp), %rdx
addq %rax, %rdx
addq $0xa8, %rdx
imulq $0x178, %r15, %rsi      # imm = 0x178
movsd 0x8(%rdx), %xmm0
movsd 0x10(%rdx), %xmm1
movsd 0x10d8(%rax,%rsi), %xmm2
movsd 0x10e0(%rax,%rsi), %xmm3
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq -0x30(%rbp), %rdx
movslq 0x14(%rdx), %rdx
imulq $0x178, %rdx, %rdx      # imm = 0x178
movsd -0x170(%rdx,%rcx), %xmm1
movsd -0x168(%rdx,%rcx), %xmm4
subsd %xmm2, %xmm1
subsd %xmm3, %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm1, %xmm1
addsd %xmm4, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4e4f4
jmp 0x4e5a6
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
imulq $0x178, -0x50(%rbp), %rcx # imm = 0x178
cmpb $0x1, 0x42(%rcx,%rax)
jne 0x4de7a
leaq 0xa8(%rax), %rdx
addq %rax, %rcx
addq $-0xd0, %rcx
movsd 0x8(%rcx), %xmm0
movsd 0x10(%rcx), %xmm1
movsd 0x38(%rax), %xmm2
movsd 0x40(%rax), %xmm3
subsd %xmm2, %xmm0
subsd %xmm3, %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq -0x30(%rbp), %rax
movslq 0x14(%rax), %rax
imulq $0x178, %rax, %rax      # imm = 0x178
movsd -0x170(%rax,%rdx), %xmm1
movsd -0x168(%rax,%rdx), %xmm4
subsd %xmm2, %xmm1
subsd %xmm3, %xmm4
mulsd %xmm4, %xmm4
mulsd %xmm1, %xmm1
addsd %xmm4, %xmm1
ucomisd %xmm0, %xmm1
ja 0x4dd52
jmp 0x4de7a
nop