LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Client.cpp
// Function: Client::RunDynamicDebug()
void Client::RunDynamicDebug() {
  static char msg[MAX_MESSAGE];
  DynamicDebug::instance().Initial(
      mpObserver); // 动态调试的初始化，注意位置不能移动

  DynamicDebug::instance().Run(msg); // 初始化信息
  mpParser->ParseInitializeMsg(msg);

  ConstructAgent();

  MessageType msg_type;

  bool first_parse = true;

  while (true) {
    msg_type = DynamicDebug::instance().Run(msg);

    switch (msg_type) {
    case MT_Parse:
      if (first_parse) {
        mpObserver->Reset();
        first_parse = false;
      }
      mpParser->Parse(msg);
      break;
    case MT_Run:
      Run();
      Logger::instance().Flush(); // flush log
      mpObserver->SetPlanned();
      break;
    case MT_Send:
      mpCommandSender->Run();
      first_parse = true;
      break;
    default:
      return;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22cde
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x22d58
callq 0x22cde
leaq 0x6af78(%rip), %r14     # 0x86af0
movq %rax, %rdi
movq %r14, %rsi
callq 0x232ec
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x3e28a
movq %rbx, %rdi
callq 0x1bc14
movb $0x1, %r15b
callq 0x22cde
movq %rax, %rdi
movq %r14, %rsi
callq 0x232ec
cmpl $0x2, %eax
jne 0x1bbd2
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
callq 0x34c60
movq %rax, %rdi
callq 0x34ddc
movq 0x8(%rbx), %rax
movb $0x1, 0x3385(%rax)
jmp 0x1bb9a
cmpl $0x3, %eax
je 0x1bbfc
cmpl $0x1, %eax
jne 0x1bc09
testb $0x1, %r15b
je 0x1bbeb
movq 0x8(%rbx), %rdi
callq 0x3a888
movq 0x20(%rbx), %rdi
movq %r14, %rsi
callq 0x3dc22
xorl %r15d, %r15d
jmp 0x1bb9a
movq 0x28(%rbx), %rdi
xorl %esi, %esi
callq 0x1cce2
jmp 0x1bb97
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Client.cpp
// Function: Client::ConstructAgent()
void Client::ConstructAgent() {
  Assert(mpAgent == 0);
  if (mpObserver->SelfUnum() > 0 && mpObserver->SelfUnum() < TRAINER_UNUM) {
    mpWorldModel->World(false)
        .Teammate(mpObserver->SelfUnum())
        .SetIsAlive(true);
    std::cout << "WrightEagle 2012: constructing agent for player "
              << mpObserver->SelfUnum() << "..." << std::endl;
  } else if (mpObserver->SelfUnum() == TRAINER_UNUM) {
    std::cout << "WrightEagle 2012: constructing agent for trainer... "
              << std::endl;
  } else {
    std::cout << "WrightEagle 2012: constructing agent for coach..."
              << std::endl;
  }
  mpAgent = new Agent(mpObserver->SelfUnum(), mpWorldModel,
                      false); //要知道号码才能初始化

  Formation::instance.AssignWith(mpAgent);
  mpCommandSender->RegisterAgent(mpAgent);
  CommunicateSystem::instance().Initial(mpObserver,
                                        mpAgent); // init communicate system
  VisualSystem::instance().Initial(mpAgent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movl 0x2c(%rax), %eax
testl %eax, %eax
jle 0x1bca5
cmpl $0xb, %eax
ja 0x1bc8b
movq 0x10(%rbx), %rdi
xorl %esi, %esi
callq 0x5a176
movq 0x8(%rbx), %rcx
movslq 0x2c(%rcx), %rcx
imulq $0x178, %rcx, %rcx      # imm = 0x178
movb $0x1, 0x42(%rax,%rcx)
movq 0x6836c(%rip), %r14     # 0x83fc0
leaq 0x4e3bb(%rip), %rsi     # 0x6a016
movl $0x30, %edx
movq %r14, %rdi
callq 0x9560
movq 0x8(%rbx), %rax
movl 0x2c(%rax), %esi
movq %r14, %rdi
callq 0x9880
movq %rax, %r14
leaq 0x4e7b2(%rip), %rsi     # 0x6a433
movl $0x3, %edx
movq %rax, %rdi
jmp 0x1bcbb
cmpl $0xc, %eax
jne 0x1bca5
movq 0x68329(%rip), %r14     # 0x83fc0
leaq 0x4e3a9(%rip), %rsi     # 0x6a047
movl $0x34, %edx
jmp 0x1bcb8
movq 0x68314(%rip), %r14     # 0x83fc0
leaq 0x4e3c9(%rip), %rsi     # 0x6a07c
movl $0x31, %edx
movq %r14, %rdi
callq 0x9560
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0x128, %edi            # imm = 0x128
callq 0x94c0
movq %rax, %r14
movq 0x8(%rbx), %rax
movq 0x10(%rbx), %rdx
movl 0x2c(%rax), %esi
movq %r14, %rdi
xorl %ecx, %ecx
callq 0xf0e0
movq %r14, 0x18(%rbx)
leaq 0x6f35c(%rip), %rdi     # 0x8b070
movq %r14, %rsi
callq 0x27466
movq 0x18(%rbx), %rax
movq 0x28(%rbx), %rcx
movq %rax, 0x18(%rcx)
callq 0x1d004
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
movq %rax, %rdi
callq 0x1d064
callq 0x565ee
movq 0x18(%rbx), %rsi
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x5660c
movq %rax, %rbx
movl $0x128, %esi            # imm = 0x128
movq %r14, %rdi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Client.cpp
// Function: Client::RunNormal()
void Client::RunNormal() {

  mpCommandSender->Start();   //发送命令线程，向server发送信息
  Logger::instance().Start(); // log线程
  mpParser->Start();          //分析线程，接受server发来的信息

  int past_cycle = 0;
  do {
    WaitFor(100); // wait for the parser thread to connect the server
    if (++past_cycle > 20) {
      std::cout << PlayerParam::instance().teamName()
                << ": Connect Server Error ..." << std::endl;
      return;
    }
  } while (mpParser->IsConnectServerOk() == false);

  ConstructAgent();

  SendOptionToServer();

  MainLoop();

  WaitFor(mpObserver->SelfUnum() * 100);
  if (mpObserver->SelfUnum() == 0) {
    std::cout << PlayerParam::instance().teamName() << " Coach: Bye ..."
              << std::endl;
  } else {
    std::cout << PlayerParam::instance().teamName() << " "
              << mpObserver->SelfUnum() << ": Bye ..." << std::endl;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rdi
callq 0x4e060
callq 0x34c60
movq %rax, %rdi
callq 0x4e060
movq 0x20(%rbx), %rdi
callq 0x4e060
movl $0x15, %r15d
movl $0x186a0, %edi          # imm = 0x186A0
callq 0x9690
decl %r15d
je 0x1be64
movq 0x20(%rbx), %r12
leaq 0x20(%r12), %r14
movq %r14, %rdi
callq 0x4e01a
movb 0x4c(%r12), %r12b
movq %r14, %rdi
callq 0x4e036
cmpb $0x1, %r12b
jne 0x1bd9d
movq %rbx, %rdi
callq 0x1bc14
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x18(%rax)
movq %rbx, %rdi
callq 0x1beda
movq 0x8(%rbx), %rax
imull $0x186a0, 0x2c(%rax), %edi # imm = 0x186A0
callq 0x9690
movq 0x8(%rbx), %rax
movl 0x2c(%rax), %r15d
callq 0x43dce
movq 0x3138(%rax), %rsi
movq 0x3140(%rax), %rdx
movq 0x681a1(%rip), %rdi     # 0x83fc0
callq 0x9560
movq %rax, %r14
testl %r15d, %r15d
je 0x1bec9
leaq 0x50d8d(%rip), %rsi     # 0x6cbc4
movl $0x1, %edx
movq %r14, %rdi
callq 0x9560
movq 0x8(%rbx), %rax
movl 0x2c(%rax), %esi
movq %r14, %rdi
callq 0x9880
movq %rax, %r14
leaq 0x4e1af(%rip), %rsi     # 0x6a00c
movl $0x9, %edx
jmp 0x1be92
callq 0x43dce
movq 0x3138(%rax), %rsi
movq 0x3140(%rax), %rdx
movq 0x68142(%rip), %rdi     # 0x83fc0
callq 0x9560
movq %rax, %r14
leaq 0x4e15e(%rip), %rsi     # 0x69feb
movl $0x1a, %edx
movq %rax, %rdi
callq 0x9560
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9330
leaq 0x4e136(%rip), %rsi     # 0x6a006
movl $0xf, %edx
movq %r14, %rdi
jmp 0x1be95
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Client.cpp
// Function: Client::MainLoop()
void Client::MainLoop() {
  while (mpObserver->WaitForNewInfo()) // 等待新视觉
  {
    NetworkTest::instance().AddDecisionBegin();

    // 比赛结束，bye ...
    if (mpObserver->GetPlayMode() == PM_Time_Over) {
      mpAgent->CheckCommands(mpObserver);
      mpAgent->Bye();

      mpObserver->SetPlanned();
      mpObserver->SetCommandSend();
      Logger::instance().SetFlushCond();

      break;
    }

    DynamicDebug::instance().AddMessage("\0", MT_Run); // 动态调试记录Run信息
    Run();

    mpObserver->SetPlanned();
    mpObserver->SetCommandSend();      //唤醒发送命令的线程
    Logger::instance().SetFlushCond(); // set flush cond and let the logger
                                       // thread flush the logs to file.

    NetworkTest::instance().AddDecisionEnd(mpObserver->CurrentTime());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
callq 0x3bf8a
testb %al, %al
je 0x1bf70
leaq 0x4e1b3(%rip), %r14     # 0x6a0ae
callq 0x38882
movq %rax, %rdi
callq 0x39360
movq 0x8(%rbx), %r15
cmpl $0x1d, 0x1c(%r15)
je 0x1bf7b
callq 0x22cde
movq %rax, %rdi
movq %r14, %rsi
movl $0x2, %edx
callq 0x23068
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x10(%rax)
movq 0x8(%rbx), %rdi
movb $0x1, 0x3385(%rdi)
callq 0x3c2e6
callq 0x34c60
movq %rax, %rdi
callq 0x34f60
callq 0x38882
movq 0x8(%rbx), %rcx
movq 0xc(%rcx), %rsi
movq %rax, %rdi
callq 0x39392
movq 0x8(%rbx), %rdi
callq 0x3bf8a
testb %al, %al
jne 0x1befb
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x18(%rbx), %rdi
movb 0x3382(%r15), %al
movb %al, 0x28(%rdi)
movq 0x1838(%r15), %rax
movq %rax, 0x2c(%rdi)
callq 0xee28
movq %rax, %rdi
movq %r15, %rsi
callq 0xd632
movq 0x18(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
callq 0xc7e6
movq 0x8(%rbx), %rdi
movb $0x1, 0x3385(%rdi)
callq 0x3c2e6
callq 0x34c60
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x34f60
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Coach.cpp
// Function: Coach::Run()
void Coach::Run() {
  mpObserver->Lock();

  /** 下面几个更新顺序不能变 */
  Formation::instance.SetTeammateFormations();
  mpAgent->CheckCommands(mpObserver); // 检查上周期发送命令情况
  mpWorldModel->Update(mpObserver);

  mpObserver->UnLock();

  // do planning...

  if (ServerParam::instance().synchMode()) {
    mpAgent->Done();
  }

  Logger::instance().LogSight();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0x3548, %r14d          # imm = 0x3548
movq 0x8(%rdi), %rdi
addq %r14, %rdi
callq 0x4e01a
leaq 0x6eb02(%rip), %rdi     # 0x8b070
callq 0x27402
movq 0x8(%rbx), %r15
movq 0x18(%rbx), %rdi
movb 0x3382(%r15), %al
movb %al, 0x28(%rdi)
movq 0x1838(%r15), %rax
movq %rax, 0x2c(%rdi)
callq 0xee28
movq %rax, %rdi
movq %r15, %rsi
callq 0xd632
movq 0x8(%rbx), %rsi
movq 0x10(%rbx), %rdi
callq 0x5a124
addq 0x8(%rbx), %r14
movq %r14, %rdi
callq 0x4e036
callq 0x49360
cmpb $0x1, 0x32c9(%rax)
jne 0x1c5d8
movq 0x18(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
callq 0xc838
callq 0x34c60
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x35042
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommandSender.cpp
// Function: CommandSender::StartRoutine()
void CommandSender::StartRoutine() {
  static char msg[MAX_MESSAGE];

  while (mpObserver->WaitForCommandSend()) {
    NetworkTest::instance().AddCommandSendBegin();

    strcpy(msg, "record_cmd: ");
    Run(msg);
    DynamicDebug::instance().AddMessage(msg, MT_Send);

    NetworkTest::instance().AddCommandSendEnd(mpObserver->CurrentTime());
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
callq 0x3c208
testb %al, %al
je 0x1ccd9
movabsq $0x203a646d635f64, %r15 # imm = 0x203A646D635F64
movabsq $0x635f64726f636572, %r12 # imm = 0x635F64726F636572
leaq 0x6be94(%rip), %r14     # 0x88b10
callq 0x38882
movq %rax, %rdi
callq 0x3943e
movq %r15, 0x6be85(%rip)     # 0x88b15
movq %r12, 0x6be79(%rip)     # 0x88b10
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cce2
callq 0x22cde
movq %rax, %rdi
movq %r14, %rsi
movl $0x3, %edx
callq 0x23068
callq 0x38882
movq 0x10(%rbx), %rcx
movq 0xc(%rcx), %rsi
movq %rax, %rdi
callq 0x39470
movq 0x10(%rbx), %rdi
callq 0x3c208
testb %al, %al
jne 0x1cc7c
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommandSender.cpp
// Function: CommandSender::Run(char*)
void CommandSender::Run(char *msg) {
  if (mpAgent != 0) {
    mpAgent->SendCommands(msg);
  } else {
    PRINT_ERROR("null agent");
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x18(%rdi), %rdi
testq %rdi, %rdi
je 0x1cd0a
movq %rsi, %rbx
callq 0xee28
movq %rax, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xe326
movq 0x672df(%rip), %rbx     # 0x83ff0
leaq 0x4d3d7(%rip), %rsi     # 0x6a0ef
movl $0x18, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x50466(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x3e, %esi
callq 0x9880
movq %rax, %rbx
leaq 0x4e707(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4d3a4(%rip), %rsi     # 0x6a108
movl $0xa, %edx
movq %rbx, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9330
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::BitCountOfEps(double, CommunicateSystem::CodecType)
int CommunicateSystem::BitCountOfEps(double eps, CodecType type) {
  double min = 0.0, max = 1.0;
  GetCodecRange(type, min, max);

  double range = (max - min) / eps;
  return static_cast<int>(ceil(log(range) / log(2.0)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, -0x18(%rbp)
leaq -0x28(%rbp), %rbx
movq $0x0, (%rbx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq -0x20(%rbp), %r14
movq %rax, (%r14)
movq %rbx, %rdx
movq %r14, %rcx
callq 0x1d072
movsd (%r14), %xmm0
subsd (%rbx), %xmm0
divsd -0x18(%rbp), %xmm0
callq 0x93d0
divsd 0x4d154(%rip), %xmm0    # 0x6a130
callq 0x9100
cvttsd2si %xmm0, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::GetCodecRange(CommunicateSystem::CodecType, double&, double&)
void CommunicateSystem::GetCodecRange(CodecType type, double &min,
                                      double &max) {
  switch (type) {
  case POS_X:
    min = -ServerParam::instance().PITCH_LENGTH * 0.5;
    max = ServerParam::instance().PITCH_LENGTH * 0.5;
    break;
  case POS_Y:
    min = -ServerParam::instance().PITCH_WIDTH * 0.5;
    max = ServerParam::instance().PITCH_WIDTH * 0.5;
    break;
  case BALL_SPEED:
    min = 0.0;
    max = ServerParam::instance().ballSpeedMax();
    break;
  case PLAYER_SPEED:
    min = 0.0;
    max = ServerParam::instance().playerSpeedMax();
    break;
  case DIR:
    min = -180.0;
    max = 180.0;
    break;
  default:
    PRINT_ERROR("unknown codec type");
    break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
cmpl $0x4, %esi
ja 0x1d139
movq %rcx, %rbx
movq %rdx, %r14
movl %esi, %eax
leaq 0x4d0b3(%rip), %rcx     # 0x6a148
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
callq 0x49360
leaq 0x4ee3e(%rip), %rax     # 0x6bee8
jmp 0x1d100
movabsq $-0x3f99800000000000, %rax # imm = 0xC066800000000000
movq %rax, (%r14)
movabsq $0x4066800000000000, %rax # imm = 0x4066800000000000
movq %rax, (%rbx)
jmp 0x1d130
movq $0x0, (%r14)
callq 0x49360
movsd 0x30f8(%rax), %xmm0
jmp 0x1d12c
movq $0x0, (%r14)
callq 0x49360
movsd 0x3038(%rax), %xmm0
jmp 0x1d12c
callq 0x49360
leaq 0x4edf0(%rip), %rax     # 0x6bef0
movsd (%rax), %xmm1
movsd %xmm1, -0x18(%rbp)
movsd 0x4bf77(%rip), %xmm0    # 0x69088
mulsd %xmm1, %xmm0
movsd %xmm0, (%r14)
callq 0x49360
movsd -0x18(%rbp), %xmm0
mulsd 0x4c74c(%rip), %xmm0    # 0x69878
movsd %xmm0, (%rbx)
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x66eb0(%rip), %rbx     # 0x83ff0
leaq 0x4d08f(%rip), %rsi     # 0x6a1d6
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x50037(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0xa0, %esi
callq 0x9880
movq %rax, %rbx
leaq 0x4e2d8(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4d060(%rip), %rsi     # 0x6a1f3
movl $0x12, %edx
movq %rbx, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x9330
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::DoubleToBit(double, CommunicateSystem::CodecType)
CommunicateSystem::DWORD64
CommunicateSystem::DoubleToBit(double value,
                               CommunicateSystem::CodecType type) {
  int range = static_cast<int>((*mpCodecMask)[type]); // [0, range]

  double min = 0.0, max = 1.0;
  GetCodecRange(type, min, max);

  if (value > max) {
    value = max - 0.001 * max;
  } else if (value < min) {
    value = min + 0.001 * min;
  }

  return static_cast<DWORD64>(
      ((value - min) / (max - min) * static_cast<double>(range)));
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movsd %xmm0, -0x20(%rbp)
movq 0xc8(%rdi), %rax
movl %esi, %ecx
movq (%rax,%rcx,8), %r14
leaq -0x18(%rbp), %rdx
movq $0x0, (%rdx)
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
leaq -0x28(%rbp), %rbx
movq %rax, (%rbx)
movq %rbx, %rcx
callq 0x1d072
movsd -0x20(%rbp), %xmm2
movsd (%rbx), %xmm0
ucomisd %xmm0, %xmm2
jbe 0x1d237
movsd 0x4cf18(%rip), %xmm2    # 0x6a140
mulsd %xmm0, %xmm2
addsd %xmm0, %xmm2
movsd -0x18(%rbp), %xmm1
jmp 0x1d252
movsd -0x18(%rbp), %xmm1
ucomisd %xmm2, %xmm1
jbe 0x1d252
movsd 0x4ceee(%rip), %xmm2    # 0x6a138
mulsd %xmm1, %xmm2
addsd %xmm1, %xmm2
subsd %xmm1, %xmm2
subsd %xmm1, %xmm0
divsd %xmm0, %xmm2
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd %xmm2, %xmm0
cvttsd2si %xmm0, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::Encode(long, unsigned char*, bool)
void CommunicateSystem::Encode(DWORD64 bits, unsigned char *msg,
                               bool is_coach) {
  int i = 0, rem;

  while (bits != 0 || (is_coach && i < MAX_MSG_SIZE)) {
    rem = bits % CODE_SIZE;
    bits = (bits - rem) / CODE_SIZE;
    if (i >= MAX_MSG_SIZE) {
      PRINT_ERROR("codec msg size greater than " << MAX_MSG_SIZE);
      break;
    }
    msg[i++] = CODE[rem];
  }
  msg[i] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %ecx, %eax
xorb $0x1, %al
testq %rsi, %rsi
sete %dl
testb %al, %dl
jne 0x1d37e
xorl %r8d, %r8d
movabsq $0x70381c0e070381c1, %rdi # imm = 0x70381C0E070381C1
cmpq $0xa, %r8
je 0x1d385
movq %rsi, %rax
imulq %rdi
movq %rdx, %rax
shrq $0x3f, %rax
sarq $0x5, %rdx
addq %rax, %rdx
leaq (%rdx,%rdx,8), %rax
leaq (%rdx,%rax,8), %rax
movq %rsi, %r9
subq %rax, %r9
movq 0x671c0(%rip), %rax     # 0x84508
movb (%rax,%r9), %r9b
leaq 0x1(%r8), %rax
movb %r9b, (%rbx,%r8)
addq $-0x49, %rsi
cmpq $-0x91, %rsi
setb %sil
cmpq $0x9, %r8
setne %r8b
andb %cl, %r8b
orb %sil, %r8b
movq %rax, %r8
movq %rdx, %rsi
jne 0x1d319
jmp 0x1d428
xorl %eax, %eax
jmp 0x1d428
movq 0x66c64(%rip), %r14     # 0x83ff0
leaq 0x4ce43(%rip), %rsi     # 0x6a1d6
movl $0x1c, %edx
movq %r14, %rdi
callq 0x9560
leaq 0x4fdeb(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %r14, %rdi
callq 0x9560
movq %r14, %rdi
movl $0xcc, %esi
callq 0x9880
movq %rax, %r14
leaq 0x4e08c(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4ce27(%rip), %rsi     # 0x6a206
movl $0x1c, %edx
movq %r14, %rdi
callq 0x9560
movq %r14, %rdi
movl $0xa, %esi
callq 0x9880
movq %rax, %r14
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %r14, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
movl $0xa, %eax
movb $0x0, (%rbx,%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::Decode(unsigned char const*, long&, bool)
void CommunicateSystem::Decode(const unsigned char *msg, DWORD64 &bits,
                               bool is_coach) {
  int n = is_coach ? MAX_MSG_SIZE : strlen((const char *)msg);
  bits = 0;
  DWORD64 plus = 1;
  for (int i = 0; i < n; ++i) {
    bits += CODE_TO_INT[msg[i]] * plus;
    plus *= CODE_SIZE;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r14
testl %ecx, %ecx
je 0x1d451
movq $0x0, (%rbx)
movl $0xa, %eax
jmp 0x1d464
movq %r14, %rdi
callq 0x9200
movq $0x0, (%rbx)
testl %eax, %eax
jle 0x1d499
movl %eax, %eax
movl $0x1, %ecx
xorl %edx, %edx
leaq 0x6d6ac(%rip), %rsi     # 0x8ab20
xorl %edi, %edi
movzbl (%r14,%rdx), %r8d
movslq (%rsi,%r8,4), %r8
imulq %rcx, %r8
addq %r8, %rdi
movq %rdi, (%rbx)
leaq (%rcx,%rcx,8), %r8
leaq (%rcx,%r8,8), %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x1d476
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::PrintBits(long)
void CommunicateSystem::PrintBits(DWORD64 bits) {
  UDWORD64 mask = 1;
  mask <<= 63;

  while (mask != 0) {
    if (bits & mask)
      cerr << '1';
    else
      cerr << '0';
    mask >>= 1;
  }
  cerr << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movabsq $-0x8000000000000000, %r13 # imm = 0x8000000000000000
movq 0x66b30(%rip), %rbx     # 0x83ff0
leaq -0x2a(%rbp), %r15
leaq -0x29(%rbp), %r12
testq %r14, %r13
je 0x1d4de
movb $0x31, -0x29(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r12, %rsi
jmp 0x1d4ed
movb $0x30, -0x2a(%rbp)
movl $0x1, %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9560
movq %r13, %rax
shrq %rax
cmpq $0x1, %r13
movq %rax, %r13
ja 0x1d4c8
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::AddDataToCommuBits(double, CommunicateSystem::CodecType)
bool CommunicateSystem::AddDataToCommuBits(double value, CodecType type) {
  if (mBitsUsed + (*mpCodecBitCount)[type] > MAX_BITS_USED) {
    PRINT_ERROR("bits used greater then " << MAX_BITS_USED);
    return false;
  } else {
    mCommuBits <<= (*mpCodecBitCount)[type];
    mCommuBits += DoubleToBit(value, type);
    mBitsUsed += (*mpCodecBitCount)[type];

    return true;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq 0xc0(%rdi), %rax
movl %esi, %r12d
movl (%rax,%r12,4), %ecx
movl 0x20(%rdi), %r14d
addl %ecx, %r14d
movl 0x66d3d(%rip), %r15d    # 0x84510
cmpl %r15d, %r14d
jg 0x1d7fb
movq %rdi, %rbx
shlq %cl, 0x18(%rdi)
callq 0x1d1d0
addq %rax, 0x18(%rbx)
movq 0xc0(%rbx), %rax
movl (%rax,%r12,4), %eax
addl %eax, 0x20(%rbx)
jmp 0x1d89a
movq 0x667ee(%rip), %rbx     # 0x83ff0
leaq 0x4c9cd(%rip), %rsi     # 0x6a1d6
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x4f975(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x107, %esi            # imm = 0x107
callq 0x9880
movq %rax, %rbx
leaq 0x4dc16(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4c9ce(%rip), %rsi     # 0x6a223
movl $0x17, %edx
movq %rbx, %rdi
callq 0x9560
movl 0x66ca8(%rip), %esi     # 0x84510
movq %rbx, %rdi
callq 0x9880
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
cmpl %r15d, %r14d
setle %al
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::AddFreeFormFlagToCommuBits(CommunicateSystem::FreeFormType)
bool CommunicateSystem::AddFreeFormFlagToCommuBits(FreeFormType type) {
  if (mBitsUsed + mFreeFormFlagBitCount > MAX_BITS_USED) {
    PRINT_ERROR("bits used greater then " << MAX_BITS_USED);
    return false;
  } else {
    mCommuBits <<= mFreeFormFlagBitCount;
    mCommuBits += static_cast<DWORD64>(type);
    mBitsUsed += mFreeFormFlagBitCount;

    return true;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x50(%rdi), %ecx
movl 0x20(%rdi), %r14d
addl %ecx, %r14d
movl 0x66c4b(%rip), %r15d    # 0x84510
cmpl %r15d, %r14d
jg 0x1d8e3
movq 0x18(%rdi), %rax
shlq %cl, %rax
movl %esi, %ecx
addq %rax, %rcx
movq %rcx, 0x18(%rdi)
movl %r14d, 0x20(%rdi)
jmp 0x1d982
movq 0x66706(%rip), %rbx     # 0x83ff0
leaq 0x4c8e5(%rip), %rsi     # 0x6a1d6
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x4f88d(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x114, %esi            # imm = 0x114
callq 0x9880
movq %rax, %rbx
leaq 0x4db2e(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4c8e6(%rip), %rsi     # 0x6a223
movl $0x17, %edx
movq %rbx, %rdi
callq 0x9560
movl 0x66bc0(%rip), %esi     # 0x84510
movq %rbx, %rdi
callq 0x9880
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
cmpl %r15d, %r14d
setle %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::AddUnumToCommuBits(int)
bool CommunicateSystem::AddUnumToCommuBits(Unum num) {
  if (mBitsUsed + mUnumBitCount > MAX_BITS_USED) {
    PRINT_ERROR("bits used greater then " << MAX_BITS_USED);
    return false;
  } else {
    mCommuBits <<= mUnumBitCount;
    mCommuBits += static_cast<DWORD64>(num);
    mBitsUsed += mUnumBitCount;

    return true;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl 0x70(%rdi), %ecx
movl 0x20(%rdi), %r14d
addl %ecx, %r14d
movl 0x66b43(%rip), %r15d    # 0x84510
cmpl %r15d, %r14d
jg 0x1d9ec
movq 0x18(%rdi), %rax
shlq %cl, %rax
movslq %esi, %rcx
addq %rax, %rcx
movq %rcx, 0x18(%rdi)
movl %r14d, 0x20(%rdi)
jmp 0x1da8b
movq 0x665fd(%rip), %rbx     # 0x83ff0
leaq 0x4c7dc(%rip), %rsi     # 0x6a1d6
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x4f784(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x129, %esi            # imm = 0x129
callq 0x9880
movq %rax, %rbx
leaq 0x4da25(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4c7dd(%rip), %rsi     # 0x6a223
movl $0x17, %edx
movq %rbx, %rdi
callq 0x9560
movl 0x66ab7(%rip), %esi     # 0x84510
movq %rbx, %rdi
callq 0x9880
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
cmpl %r15d, %r14d
setle %al
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::Decision()
void CommunicateSystem::Decision() {
  DoCommunication();

  if (mBitsUsed != 0) {
    unsigned char msg[11]; // MAX_MSG_SIZE == 10

    AddCommuFlagToCommuBits(mCommuType);

    DWORD64 mask = 1;
    mask <<= mBitsUsed;
    mask -= 1;
    mCommuBits += ~mask; //左边补1
    mask = 1;
    mask <<= (MAX_BITS_USED + mCommuFlagBitCount);
    mask -= 1;
    mCommuBits &= mask; //去掉高三位

    Encode(mCommuBits, msg);

    if (strlen((const char *)msg) > 0) {
      mpAgent->Say(string((const char *)msg));
    } else {
      PRINT_ERROR("bug here?");
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x1e412
movl 0x20(%rbx), %eax
testl %eax, %eax
je 0x1e3e5
movl 0x40(%rbx), %edx
movq 0x18(%rbx), %rdi
movl %edx, %ecx
shlq %cl, %rdi
movl 0x3c(%rbx), %ecx
addq %rcx, %rdi
addl %edx, %eax
movq $-0x1, %r8
movl %eax, %ecx
shlq %cl, %r8
movl %eax, 0x20(%rbx)
movq $-0x1, %rsi
addl 0x66234(%rip), %edx     # 0x84510
movl %edx, %ecx
shlq %cl, %rsi
addq %rdi, %r8
notq %rsi
andq %r8, %rsi
movq %rsi, 0x18(%rbx)
leaq -0x2b(%rbp), %r14
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x1d2f4
cmpb $0x0, (%r14)
je 0x1e357
movq 0x10(%rbx), %rbx
leaq -0x40(%rbp), %r12
movq %r12, -0x10(%r12)
movq %r14, %rdi
callq 0x9200
leaq (%rax,%rbp), %rdx
addq $-0x2b, %rdx
leaq -0x50(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1362e
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1eee6
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x1e3e5
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x94e0
jmp 0x1e3e5
movq 0x65c92(%rip), %rbx     # 0x83ff0
leaq 0x4be71(%rip), %rsi     # 0x6a1d6
movl $0x1c, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x4ee19(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x1eb, %esi            # imm = 0x1EB
callq 0x9880
movq %rax, %rbx
leaq 0x4d0ba(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x4beb7(%rip), %rsi     # 0x6a268
movl $0x9, %edx
movq %rbx, %rdi
callq 0x9560
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x9480
movsbl %al, %esi
movq %rbx, %rdi
callq 0x9070
movq %rax, %rdi
callq 0x9330
addq $0x30, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x50(%rbp), %rdi
cmpq %r12, %rdi
je 0x1e40a
movq -0x40(%rbp), %rsi
incq %rsi
callq 0x94e0
movq %rbx, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/CommunicateSystem.cpp
// Function: CommunicateSystem::DoCommunication()
void CommunicateSystem::DoCommunication() {
  if (!mpAgent)
    return;

  PositionInfo &position_info = mpAgent->GetInfoState().GetPositionInfo();
  const Unum closest_tm = position_info.GetClosestTeammateToBall();

  if (closest_tm == mpAgent->GetSelfUnum()) {
    mpAgent->AttentiontoOff();
  } else if (closest_tm) {
    if (closest_tm != mpAgent->GetSelf().GetFocusOnUnum()) {
      mpAgent->Attentionto(closest_tm);
    }
  }

  SendBallStatus(mpAgent->GetWorldState().GetBall());
  SendTeammateStatus(&mpAgent->GetWorldState(), mpAgent->GetSelfUnum());

  const vector<Unum> &o2b =
      mpAgent->GetInfoState().GetPositionInfo().GetCloseOpponentToTeammate(
          mpAgent->GetSelfUnum());
  const vector<Unum> &t2b =
      mpAgent->GetInfoState().GetPositionInfo().GetCloseTeammateToTeammate(
          mpAgent->GetSelfUnum());

  for (uint i = 0; i < TEAMSIZE; ++i) {
    if (i < o2b.size()) {
      SendOpponentStatus(&mpAgent->GetWorldState(), o2b[i]);
    }
    if (i < t2b.size()) {
      SendTeammateStatus(&mpAgent->GetWorldState(), t2b[i]);
    }
  }
}

// Assembly:
movq 0x10(%rdi), %rax
testq %rax, %rax
je 0x1e54e
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
movq 0x20(%rax), %rdi
callq 0x2a4b4
movq %rax, %rdi
callq 0x13ab2
movq 0x10(%rbx), %rdi
cmpl 0x8(%rdi), %eax
jne 0x1e456
callq 0xee28
movq %rax, %rdi
callq 0xc218
jmp 0x1e47f
movl %eax, %r14d
testl %eax, %eax
je 0x1e47f
callq 0xe75a
cmpl 0xfc(%rax), %r14d
je 0x1e47f
movq 0x10(%rbx), %rdi
callq 0xee28
movq %rax, %rdi
movl %r14d, %esi
callq 0xc192
movq 0x10(%rbx), %rax
movq 0x18(%rax), %rsi
addq $0x30, %rsi
xorl %r12d, %r12d
movq %rbx, %rdi
xorl %edx, %edx
callq 0x1da9c
movq 0x10(%rbx), %rax
movq 0x18(%rax), %rsi
movl 0x8(%rax), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1deb2
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x2a4b4
movq 0x10(%rbx), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x47d92
movq %rax, %r14
movq 0x10(%rbx), %rax
movq 0x20(%rax), %rdi
callq 0x2a4b4
movq 0x10(%rbx), %rcx
movl 0x8(%rcx), %esi
movq %rax, %rdi
callq 0x47d10
movq %rax, %r15
movq (%r14), %rax
movq 0x8(%r14), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x1e514
movq 0x10(%rbx), %rcx
movq 0x18(%rcx), %rsi
movl (%rax,%r12,4), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1e09c
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x2, %rcx
cmpq %r12, %rcx
jbe 0x1e53d
movq 0x10(%rbx), %rcx
movq 0x18(%rcx), %rsi
movl (%rax,%r12,4), %edx
movq %rbx, %rdi
xorl %ecx, %ecx
callq 0x1deb2
incq %r12
cmpq $0xb, %r12
jne 0x1e4eb
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::Dasher()
Dasher::Dasher() {
  Assert(std::fabs(ServerParam::instance().dashAngleStep() - 45.0) < FLOAT_EPS);

  for (int i = 0; i < 8; ++i) {
    DASH_DIR[i] =
        GetNormalizeAngleDeg(ServerParam::instance().dashAngleStep() * i);
    DIR_RATE[i] = GetDashDirRate(DASH_DIR[i]);
  }

  for (int i = 0; i < 8; ++i) {
    ANTI_DIR_IDX[i] = GetDashDirIdx(DASH_DIR[i] + 180.0);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
xorl %ebx, %ebx
leaq 0x6bd94(%rip), %r14     # 0x8ae18
leaq 0x6bded(%rip), %r15     # 0x8ae78
callq 0x49360
xorps %xmm0, %xmm0
cvtsi2sd %ebx, %xmm0
mulsd 0x33a8(%rax), %xmm0
movsd 0x49fb9(%rip), %xmm1    # 0x69060
ucomisd %xmm0, %xmm1
jbe 0x1f0c1
movsd 0x49fbb(%rip), %xmm2    # 0x69070
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x1f0b5
jmp 0x1f0e1
movsd 0x49f7f(%rip), %xmm1    # 0x69048
ucomisd %xmm1, %xmm0
jb 0x1f0e1
movsd 0x49f91(%rip), %xmm2    # 0x69068
addsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jae 0x1f0d7
movsd %xmm0, (%r14,%rbx,8)
callq 0xe7f9
movsd %xmm0, (%r15,%rbx,8)
incq %rbx
cmpq $0x8, %rbx
jne 0x1f08b
xorl %r15d, %r15d
leaq -0x28(%rbp), %rbx
leaq 0x6bd4f(%rip), %r12     # 0x8ae58
movsd (%r14), %xmm0
addsd 0x49f32(%rip), %xmm0    # 0x69048
movsd %xmm0, -0x28(%rbp)
movq %rbx, %rdi
callq 0x22022
movl %eax, (%r15,%r12)
addq $0x4, %r15
addq $0x8, %r14
cmpq $0x20, %r15
jne 0x1f109
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::GoToPoint(Agent&, Vector, double, double, bool, bool)
bool Dasher::GoToPoint(Agent &agent, Vector pos, double buffer, double power,
                       bool can_inverse, bool turn_first) {
  AtomicAction act;

  GoToPoint(agent, act, agent.GetStrategy().AdjustTargetForSetplay(pos), buffer,
            power, can_inverse, turn_first);
  return act.Execute(agent);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %ecx, %ebx
movl %edx, %r15d
movsd %xmm3, -0x48(%rbp)
movsd %xmm2, -0x40(%rbp)
movsd %xmm1, -0x38(%rbp)
movsd %xmm0, -0x30(%rbp)
movq %rsi, %r14
movq %rdi, %r13
leaq -0x78(%rbp), %r12
movb $0x0, (%r12)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%r12)
movups %xmm0, 0x14(%r12)
movups %xmm0, 0x20(%r12)
addq $0x38, %rsi
movq %r14, %rdi
callq 0xf4b0
movq %rax, %rdi
movsd -0x30(%rbp), %xmm0
movsd -0x38(%rbp), %xmm1
callq 0x4c62e
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
movsd -0x40(%rbp), %xmm2
movsd -0x48(%rbp), %xmm3
movl %r15d, %ecx
movl %ebx, %r8d
callq 0x1f1a0
movq %r12, %rdi
movq %r14, %rsi
callq 0xb2fc
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::GetTurnBodyToAngleAction(Agent const&, double)
AtomicAction Dasher::GetTurnBodyToAngleAction(const Agent &agent,
                                              AngleDeg ang) {
  AtomicAction action;
  action.mType = CT_Turn;

  double angle_turn = GetNormalizeAngleDeg(ang - agent.GetSelf().GetBodyDir());
  if (fabs(angle_turn) < agent.GetSelf().GetMaxTurnAngle()) {
    action.mSucceed = true;
    action.mTurnAngle = angle_turn;
  } else {
    action.mSucceed = false;
    action.mTurnAngle = Sign(angle_turn) * agent.GetSelf().GetMaxTurnAngle();
  }
  return action;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
movaps %xmm0, -0x20(%rbp)
movq %rdx, %r14
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movups %xmm0, 0x8(%rdi)
movq $0x0, 0x28(%rdi)
movl $0x1, 0x4(%rdi)
movq %rdx, %rdi
callq 0xe75a
movapd -0x20(%rbp), %xmm2
subsd 0xb0(%rax), %xmm2
movsd 0x47e14(%rip), %xmm0    # 0x69060
ucomisd %xmm2, %xmm0
jbe 0x21266
movsd 0x47e16(%rip), %xmm1    # 0x69070
addsd %xmm1, %xmm2
ucomisd %xmm2, %xmm0
ja 0x2125a
jmp 0x2128a
ucomisd 0x47dda(%rip), %xmm2    # 0x69048
jb 0x2128a
movsd 0x47df0(%rip), %xmm0    # 0x69068
movsd 0x47dc8(%rip), %xmm1    # 0x69048
addsd %xmm0, %xmm2
ucomisd %xmm1, %xmm2
jae 0x21280
movapd %xmm2, -0x20(%rbp)
movapd 0x47d79(%rip), %xmm0    # 0x69010
andpd %xmm2, %xmm0
movapd %xmm0, -0x30(%rbp)
movq %r14, %rdi
callq 0xe75a
movsd 0x158(%rax), %xmm0
ucomisd -0x30(%rbp), %xmm0
jbe 0x212c1
movb $0x1, (%rbx)
movapd -0x20(%rbp), %xmm2
jmp 0x212f6
movb $0x0, (%rbx)
movq %r14, %rdi
callq 0xe75a
movsd 0x158(%rax), %xmm0
movapd 0x47d44(%rip), %xmm1    # 0x69020
xorpd %xmm0, %xmm1
xorpd %xmm2, %xmm2
cmplesd -0x20(%rbp), %xmm2
andpd %xmm2, %xmm0
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movsd %xmm2, 0x18(%rbx)
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::GetBall(Agent&, int, bool, bool)
bool Dasher::GetBall(Agent &agent, int int_cycle, bool can_inverse,
                     bool turn_first) {
  AtomicAction act;
  GetBall(agent, act, int_cycle, can_inverse, turn_first);
  if (act.mSucceed) {
    return act.Execute(agent);
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movl %r8d, %r9d
movl %ecx, %r8d
movl %edx, %ecx
movq %rsi, %rbx
leaq -0x40(%rbp), %r14
movb $0x0, (%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x4(%r14)
movups %xmm0, 0x14(%r14)
movups %xmm0, 0x20(%r14)
movq %r14, %rdx
callq 0x214ec
cmpb $0x1, (%r14)
jne 0x21742
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0xb2fc
jmp 0x21744
xorl %eax, %eax
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.cpp
// Function: Dasher::CorrectTurnForDash(PlayerState const&, Vector const&, double)
Vector Dasher::CorrectTurnForDash(const PlayerState &player,
                                  const Vector &target, double fix) {
  if (player.GetPosConf() > 0.99 - FLOAT_EPS &&
      player.GetBodyDirConf() > 0.99 - FLOAT_EPS) {
    Ray body_ray(player.GetPos(), player.GetBodyDir());
    Line body_line(body_ray);
    Vector closest_pt = body_line.GetProjectPoint(target);

    double buffer = 0.05 + ServerParam::instance().ballSize();
    if (closest_pt.Dist(player.GetPos()) >
        player.GetKickableArea() + buffer - fix) {
      if (closest_pt.Dist(target) < player.GetKickableArea() - buffer + fix) {
        return closest_pt;
      }
    }
  }
  return target;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x68, %rsp
movq %rdx, %rbx
movsd 0x20(%rsi), %xmm1
ucomisd 0x48ba5(%rip), %xmm1    # 0x6a310
jbe 0x21887
movq %rsi, %r14
movsd 0xc0(%rsi), %xmm1
ucomisd 0x48b8c(%rip), %xmm1    # 0x6a310
jbe 0x21887
movups 0x8(%r14), %xmm1
leaq -0x60(%rbp), %rsi
movaps %xmm1, (%rsi)
movsd 0xb0(%r14), %xmm1
movsd %xmm1, 0x10(%rsi)
leaq -0x78(%rbp), %r15
movq %r15, %rdi
movsd %xmm0, -0x40(%rbp)
callq 0x220f2
movq %r15, %rdi
movq %rbx, %rsi
callq 0x221b4
movsd %xmm0, -0x30(%rbp)
movsd %xmm1, -0x28(%rbp)
callq 0x49360
movsd 0x30d8(%rax), %xmm0
addsd 0x48b09(%rip), %xmm0    # 0x6a2e8
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
subsd 0x8(%r14), %xmm0
movsd -0x28(%rbp), %xmm1
subsd 0x10(%r14), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movsd -0x40(%rbp), %xmm1
movsd (%rax), %xmm0
addsd -0x38(%rbp), %xmm0
subsd %xmm1, %xmm0
movsd -0x20(%rbp), %xmm2
ucomisd %xmm0, %xmm2
jbe 0x21887
movsd -0x30(%rbp), %xmm0
subsd (%rbx), %xmm0
movsd -0x28(%rbp), %xmm1
subsd 0x8(%rbx), %xmm1
mulsd %xmm1, %xmm1
mulsd %xmm0, %xmm0
addsd %xmm1, %xmm0
sqrtsd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq (%r14), %rax
movq %r14, %rdi
callq *0x10(%rax)
movsd (%rax), %xmm0
subsd -0x38(%rbp), %xmm0
addsd -0x40(%rbp), %xmm0
ucomisd -0x20(%rbp), %xmm0
jbe 0x21887
movsd -0x30(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
jmp 0x21890
movsd (%rbx), %xmm0
movsd 0x8(%rbx), %xmm1
addq $0x68, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Dasher.h
// Function: Dasher::GetDashDirIdx(double const&)
static int GetDashDirIdx(const AngleDeg &dir) {
    for (int i = 0; i < 8; ++i) {
      if (GetAngleDegDiffer(dir, DASH_DIR[i]) < FLOAT_EPS)
        return i;
    }
    Assert(0);
    return -1;
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
movsd (%rdi), %xmm0
xorl %eax, %eax
leaq 0x68de5(%rip), %rcx     # 0x8ae18
movsd 0x47025(%rip), %xmm1    # 0x69060
movsd 0x4702d(%rip), %xmm2    # 0x69070
movapd 0x46fc5(%rip), %xmm3    # 0x69010
movsd 0x46fed(%rip), %xmm4    # 0x69040
movsd 0x46fed(%rip), %xmm5    # 0x69048
movsd 0x47005(%rip), %xmm6    # 0x69068
movapd %xmm0, %xmm7
subsd (%rcx,%rax,8), %xmm7
ucomisd %xmm7, %xmm1
jbe 0x22091
addsd %xmm2, %xmm7
ucomisd %xmm7, %xmm1
ja 0x22072
andpd %xmm3, %xmm7
ucomisd %xmm7, %xmm4
ja 0x220a2
incq %rax
cmpq $0x8, %rax
jne 0x22063
jmp 0x2209d
ucomisd %xmm5, %xmm7
jb 0x2207c
addsd %xmm6, %xmm7
jmp 0x22091
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/DecisionTree.cpp
// Function: DecisionTree::Decision(Agent&)
bool DecisionTree::Decision(Agent &agent) {
  Assert(agent.GetSelf().IsAlive());

  ActiveBehavior beh = Search(agent, 1);

  if (beh.GetType() != BT_None) {
    agent.SetActiveBehaviorInAct(beh.GetType());
    Assert(&beh.GetAgent() == &agent);
    return beh.Execute();
  }
  return false;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xb0, %rsp
movq %rsi, %rbx
movq %rdi, %rsi
leaq -0xb8(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rdx
movl $0x1, %ecx
callq 0x22302
movl (%r14), %esi
testl %esi, %esi
je 0x222f4
movq %rbx, %rdi
callq 0xf39e
leaq -0xb8(%rbp), %rdi
callq 0x12f88
jmp 0x222f6
xorl %eax, %eax
addq $0xb0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/DecisionTree.cpp
// Function: DecisionTree::GetBestActiveBehavior(Agent&, std::__cxx11::list<ActiveBehavior, std::allocator<ActiveBehavior>>&)
ActiveBehavior
DecisionTree::GetBestActiveBehavior(Agent &agent,
                                    std::list<ActiveBehavior> &behavior_list) {
  agent.SaveActiveBehaviorList(
      behavior_list); // behavior_list里面存储了本周期所有behavior决策出的最优activebehavior，这里统一保存一下，供特定behavior下周期plan时用

  behavior_list.sort(std::greater<ActiveBehavior>());

  return behavior_list.front();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rcx, %rbx
movq %rdi, %r14
movq %rdx, %rdi
movq %rcx, %rsi
callq 0xf3b0
movq %rbx, %rdi
callq 0x12934
movq (%rbx), %rsi
addq $0x10, %rsi
movl $0xa8, %edx
movq %r14, %rdi
callq 0x93e0
movq %r14, %rax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::DynamicDebug()
DynamicDebug::DynamicDebug() {
  mpObserver = 0;
  mInitialOK = false;

  mpIndex = 0;
  mpParserTime = 0;
  mpDecisionTime = 0;
  mpCommandSendTime = 0;
  mpCurrentIndex = 0;

  mpFile = 0;
  mpFileStream = 0;
  mpStreamBuffer = std::cin.rdbuf(); // 保存std::cin的流，后面要重定向

  mRunning = false;
  mShowMessage = false;
  mRuntoCycle = Time(-3, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movl $0xfffffff6, %eax       # imm = 0xFFFFFFF6
movq %rax, 0x10(%rdi)
leaq 0x58(%rdi), %r14
leaq 0x70(%rdi), %r15
leaq 0x88(%rdi), %r12
leaq 0xf8(%rdi), %rdi
xorps %xmm0, %xmm0
movups %xmm0, 0x58(%rbx)
movups %xmm0, 0x68(%rbx)
movups %xmm0, 0x78(%rbx)
movups %xmm0, 0x88(%rbx)
movups %xmm0, 0x98(%rbx)
movups %xmm0, 0xa8(%rbx)
movups %xmm0, 0xb8(%rbx)
movq $0x0, 0xc8(%rbx)
callq 0x4e004
movl $0xfffffffd, %eax       # imm = 0xFFFFFFFD
movq %rax, 0x13c(%rbx)
xorl %ecx, %ecx
movq %rcx, (%rbx)
movb $0x0, 0x8(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xd0(%rbx)
movups %xmm0, 0xe0(%rbx)
movq %rcx, 0xf0(%rbx)
movups %xmm0, 0x120(%rbx)
movq 0x6180e(%rip), %rcx     # 0x83fd8
movq (%rcx), %rdx
movq -0x18(%rdx), %rdx
movq 0xe8(%rcx,%rdx), %rcx
movq %rcx, 0x130(%rbx)
movw $0x0, 0x138(%rbx)
movq %rax, 0x13c(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r13
leaq 0xb8(%rbx), %rdi
callq 0x23fa0
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x22829
movq 0xb0(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq %r12, %rdi
movq %r15, %rsi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x9d07
movq %r13, %rdi
callq 0x98b0
// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/DynamicDebug.cpp
// Function: DynamicDebug::~DynamicDebug()
DynamicDebug::~DynamicDebug() {
  Flush();

  if (mpIndex != 0) {
    delete[] mpIndex;
  }

  if (mpParserTime != 0) {
    delete[] mpParserTime;
  }

  if (mpDecisionTime != 0) {
    delete[] mpDecisionTime;
  }

  if (mpCommandSendTime != 0) {
    delete[] mpCommandSendTime;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x22924
movq 0xd0(%rbx), %rdi
testq %rdi, %rdi
je 0x22861
callq 0x9630
movq 0xd8(%rbx), %rdi
testq %rdi, %rdi
je 0x22872
callq 0x9630
movq 0xe0(%rbx), %rdi
testq %rdi, %rdi
je 0x22883
callq 0x9630
movq 0xe8(%rbx), %rdi
testq %rdi, %rdi
je 0x22894
callq 0x9630
leaq 0xf8(%rbx), %rdi
callq 0x4e010
leaq 0xb8(%rbx), %rdi
callq 0x23fa0
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x228c7
movq 0xb0(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq 0x88(%rbx), %rdi
testq %rdi, %rdi
je 0x228e2
movq 0x98(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq 0x70(%rbx), %rdi
testq %rdi, %rdi
je 0x228fa
movq 0x80(%rbx), %rsi
subq %rdi, %rsi
callq 0x94e0
movq 0x58(%rbx), %rdi
testq %rdi, %rdi
je 0x22915
movq 0x68(%rbx), %rsi
subq %rdi, %rsi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x94e0
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rdi
callq 0x12c1b