// File: wrighteagle2d[P]wrighteaglebase/Debug/../src/Client.cpp
// Function: Client::Client()
Client::Client() {
  srand(time(0)); // global srand once
  srand48(time(0));

  /** Observer and World Model */
  mpAgent = 0;
  mpObserver = new Observer;
  mpWorldModel = new WorldModel;

  // instance放在这里创建以节省后面的运行效率，部分instance不能放在这里，需要时创建

  /** Assistant instance */

  TimeTest::instance();
  NetworkTest::instance();
  DynamicDebug::instance();
  Logger::instance().Initial(mpObserver, &(mpWorldModel->World(false)));
  Plotter::instance();

  /** Param */
  ServerParam::instance();
  PlayerParam::instance();

  /** Base Model */
  InterceptModel::instance();

  /** Smart Action */
  Dasher::instance();
  Tackler::instance();
  Kicker::instance();

  /** Other Useful instance */
  BehaviorFactory::instance();
  UDPSocket::instance();
  VisualSystem::instance();
  CommunicateSystem::instance();

  /** Parser thread and CommandSend thread */
  mpCommandSender = new CommandSender(mpObserver);

  // ServerPlayModeMap::instance();

  mpParser = new Parser(mpObserver);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
leaq 0xd55d5(%rip), %rcx     # 0xfd590
movq %rcx, (%rax)
xorl %eax, %eax
movl %eax, %edi
movq %rdi, -0x30(%rbp)
callq 0xa530
movl %eax, %edi
callq 0xa570
movq -0x30(%rbp), %rdi
callq 0xa530
movq %rax, %rdi
callq 0xa9d0
movq -0x28(%rbp), %rax
movq $0x0, 0x18(%rax)
movl $0x56d0, %edi           # imm = 0x56D0
callq 0xa5c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x20(%rbp)
callq 0x68490
jmp 0x2800a
movq -0x28(%rbp), %rax
movq -0x20(%rbp), %rcx
movq %rcx, 0x8(%rax)
movl $0x28, %edi
callq 0xa5c0
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x38(%rbp)
callq 0xaac00
jmp 0x28031
movq -0x28(%rbp), %rax
movq -0x38(%rbp), %rcx
movq %rcx, 0x10(%rax)
callq 0x8f5b0
callq 0x63700
callq 0x33ef0
callq 0x5add0
movq %rax, %rcx
movq -0x28(%rbp), %rax
movq %rcx, -0x50(%rbp)
movq 0x8(%rax), %rcx
movq %rcx, -0x48(%rbp)
movq 0x10(%rax), %rdi
xorl %esi, %esi
callq 0xaaed0
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq %rax, %rdx
callq 0x5ae60
callq 0x7dc60
callq 0x855e0
callq 0x798a0
callq 0x4cc20
callq 0x2ec90
callq 0x8b3f0
callq 0x4ff20
callq 0x1a020
callq 0x9e170
callq 0xa47b0
callq 0x2c310
movl $0x20, %edi
callq 0xa5c0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x40(%rbp)
movq 0x8(%rax), %rsi
callq 0x2bc60
jmp 0x280d9
movq -0x28(%rbp), %rax
movq -0x40(%rbp), %rcx
movq %rcx, 0x28(%rax)
movl $0x60, %edi
callq 0xa5c0
movq %rax, %rdi
movq -0x28(%rbp), %rax
movq %rdi, %rcx
movq %rcx, -0x58(%rbp)
movq 0x8(%rax), %rsi
callq 0x711f0
jmp 0x28108
movq -0x28(%rbp), %rax
movq -0x58(%rbp), %rcx
movq %rcx, 0x20(%rax)
addq $0x60, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x56d0, %esi           # imm = 0x56D0
callq 0xa5e0
jmp 0x28188
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x28, %esi
callq 0xa5e0
jmp 0x28188
movq -0x40(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x20, %esi
callq 0xa5e0
jmp 0x28188
movq -0x58(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x10(%rbp)
movl %eax, -0x14(%rbp)
movl $0x60, %esi
callq 0xa5e0
movq -0x10(%rbp), %rdi
callq 0xaa60
nopw %cs:(%rax,%rax)