// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Parser.cpp
// Function: Parser::ParseFullstateMsg(char*)
void Parser::ParseFullstateMsg(char *msg) {
  //(fullstate 336 (pmode goal_l) (vmode high narrow) (count 0 0 313 0 1 290 8
  //743) (arm (movable 0) (expires 0) (target 0 0) (count 0)) (score 1 0)
  //((b) 52.6578 -4.41664 0 0)
  //((p l 1 g 8) -47.5 0 0 0 -66.8915 -80 (stamina 8000 0.829636 1 130600))
  //((p l 2 4) -25 -13 7.7863e-25 4.77769e-24 151.664 34 (stamina 8000 0.974746
  //1 123249))
  //((p l 3 12) -5.00073 -8.01793 -1.54512e-19 -8.12881e-18 -25.8413 -66
  //(stamina 7621.08 0.985774 1 111028))
  //...
  //((p r 11 14) 0.385 -7.01275e-12 -1.15337e-23 -8.33192e-24 46.129 0 (stamina
  //8000 0.933173 1 124249)))

  int time = parser::get_int(&msg);

  if (time != mpObserver->CurrentTime().T()) {
    mpObserver->SetCurrentTime(Time(time, mpObserver->CurrentTime().S()));
  }

  parser::get_word(&msg);
  parser::get_next_word(&msg); // skip 'pmode'

  parser::get_word(&msg);

  {
    static char buffer[MAX_MESSAGE];
    char *end = msg;

    while (*end != ')')
      end++;
    int n = end - msg;
    strncpy(buffer, msg, n * sizeof(char));
    buffer[n] = '\0';

    ParsePlayMode(buffer);

    msg = end;
  }

  parser::get_next_word(&msg); // skip 'vmode'
  parser::get_next_word(&msg); // skip not used view quality

  ViewWidth view_width = VW_None;
  switch (msg[1]) {
  case 'o':
    view_width = VW_Normal;
    break; /* normal */
  case 'a':
    view_width = VW_Narrow;
    break; /* narrow */
  case 'i':
    view_width = VW_Wide;
    break; /* wide   */
  default:
    PARSE_ERROR("Unknown view quality");
    break;
  }

  int kicks = parser::get_int(&msg);
  int dashes = parser::get_int(&msg);
  int turns = parser::get_int(&msg);
  int catchs = parser::get_int(&msg);
  int moves = parser::get_int(&msg);
  int turn_necks = parser::get_int(&msg);
  int change_views = parser::get_int(&msg);
  int says = parser::get_int(&msg);

  int arm_movable_ban = parser::get_int(&msg); // 直到下次手臂能动的剩余周期数
  int arm_expires = parser::get_int(&msg); // 直到手臂动作失效剩余的周期数
  double arm_target_dist = parser::get_double(&msg); // 指向的目标的距离
  AngleDeg arm_target_dir = parser::get_double(&msg); // 指向的目标的方向
  int arm_count = parser::get_int(&msg);              // point count

  mpObserver->SetSensePartialBody(
      view_width,

      kicks, dashes, turns, says, turn_necks, catchs, moves, change_views,

      arm_movable_ban, arm_expires, arm_target_dist, arm_target_dir, arm_count,

      mpObserver->CurrentTime());

  for (int i = 1; i <= TEAMSIZE; ++i) {
    mpObserver->Teammate_Fullstate(i).SetIsAlive(false);
    mpObserver->Opponent_Fullstate(i).SetIsAlive(false);
  }

  msg = strstr(msg, "((");

  while (msg != 0) {                           // 直到没有object为止
    msg += 2;                                  // 跳过 ((
    ObjType obj = ParseObjType_Fullstate(msg); // 获得object的类型
    msg = strchr(msg, ')');
    ObjProperty_Fullstate prop =
        ParseObjProperty_Fullstate(msg + 1); // 获得object的属性

    switch (obj.type) {
    case OBJ_Ball:
      mpObserver->Ball_Fullstate().UpdatePos(Vector(prop.x, prop.y), 0, 1.0);
      mpObserver->Ball_Fullstate().UpdateVel(Vector(prop.vx, prop.vy), 0, 1.0);
      break;
    case OBJ_Player:
      if (obj.side == mpObserver->OurSide()) {
        mpObserver->Teammate_Fullstate(obj.num).UpdatePlayerType(
            obj.player_type);
        mpObserver->Teammate_Fullstate(obj.num).SetIsAlive(true);
        mpObserver->Teammate_Fullstate(obj.num).UpdatePos(
            Vector(prop.x, prop.y), 0, 1.0);
        mpObserver->Teammate_Fullstate(obj.num).UpdateVel(
            Vector(prop.vx, prop.vy), 0, 1.0);
        mpObserver->Teammate_Fullstate(obj.num).UpdateBodyDir(prop.body_dir, 0,
                                                              1.0);
        mpObserver->Teammate_Fullstate(obj.num).UpdateNeckDir(prop.head_dir, 0,
                                                              1.0);
        mpObserver->Teammate_Fullstate(obj.num).UpdateStamina(prop.stamina);
        mpObserver->Teammate_Fullstate(obj.num).UpdateEffort(prop.effort);
        mpObserver->Teammate_Fullstate(obj.num).UpdateRecovery(prop.recovery);
        mpObserver->Teammate_Fullstate(obj.num).UpdateCapacity(prop.capacity);
        mpObserver->Teammate_Fullstate(obj.num).UpdateCardType(prop.card_type);

        if (prop.pointing) {
          mpObserver->Teammate_Fullstate(obj.num).UpdateArmPoint(
              prop.point_dir, 0, 1.0, 0.0, 0, 0);
          // TODO:
          // 这个接口不好，因为是看不到dist，ban等信息的，这些要自己算然后维护
        }
        if (prop.tackling) {
          if (mpObserver->Teammate_Fullstate(obj.num).GetTackleBan() == 0) {
            mpObserver->Teammate_Fullstate(obj.num).UpdateTackleBan(
                ServerParam::instance().tackleCycles() - 1);
          }
        } else {
          mpObserver->Teammate_Fullstate(obj.num).UpdateTackleBan(0);
        }
        if (prop.lying) {
          if (mpObserver->Teammate_Fullstate(obj.num).GetFoulChargedCycle() ==
              0) {
            mpObserver->Teammate_Fullstate(obj.num).UpdateFoulChargedCycle(
                ServerParam::instance().foulCycles() - 1);
          }
        } else {
          mpObserver->Teammate_Fullstate(obj.num).UpdateFoulChargedCycle(0);
        }
      } else {
        mpObserver->Opponent_Fullstate(obj.num).UpdatePlayerType(
            obj.player_type);
        mpObserver->Opponent_Fullstate(obj.num).SetIsAlive(true);
        mpObserver->Opponent_Fullstate(obj.num).UpdatePos(
            Vector(prop.x, prop.y), 0, 1.0);
        mpObserver->Opponent_Fullstate(obj.num).UpdateVel(
            Vector(prop.vx, prop.vy), 0, 1.0);
        mpObserver->Opponent_Fullstate(obj.num).UpdateBodyDir(prop.body_dir, 0,
                                                              1.0);
        mpObserver->Opponent_Fullstate(obj.num).UpdateNeckDir(prop.head_dir, 0,
                                                              1.0);
        mpObserver->Opponent_Fullstate(obj.num).UpdateStamina(prop.stamina);
        mpObserver->Opponent_Fullstate(obj.num).UpdateEffort(prop.effort);
        mpObserver->Opponent_Fullstate(obj.num).UpdateRecovery(prop.recovery);
        mpObserver->Opponent_Fullstate(obj.num).UpdateCapacity(prop.capacity);
        mpObserver->Opponent_Fullstate(obj.num).UpdateCardType(prop.card_type);

        if (prop.pointing) {
          mpObserver->Opponent_Fullstate(obj.num).UpdateArmPoint(
              prop.point_dir, 0, 1.0, 0.0, 0, 0);
          // TODO:
          // 这个接口不好，因为是看不到dist，ban等信息的，这些要自己算然后维护
        }
        if (prop.tackling) {
          if (mpObserver->Opponent_Fullstate(obj.num).GetTackleBan() == 0) {
            mpObserver->Opponent_Fullstate(obj.num).UpdateTackleBan(
                ServerParam::instance().tackleCycles() - 1);
          }
        } else {
          mpObserver->Opponent_Fullstate(obj.num).UpdateTackleBan(0);
        }
        if (prop.lying) {
          if (mpObserver->Opponent_Fullstate(obj.num).GetFoulChargedCycle() ==
              0) {
            mpObserver->Opponent_Fullstate(obj.num).UpdateFoulChargedCycle(
                ServerParam::instance().foulCycles() - 1);
          }
        } else {
          mpObserver->Opponent_Fullstate(obj.num).UpdateFoulChargedCycle(0);
        }
      }
      break;
    default:
      break;
    }
    msg = strstr(msg, "(("); // 下一个object
  }

  mpObserver->mReceiveFullstateMsg = true;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rsi, %rax
movq %rdi, %rbx
movq %rsi, -0x30(%rbp)
movb (%rsi), %cl
movsbl %cl, %edx
addl $-0x30, %edx
movabsq $0x680000000001, %rsi   # imm = 0x680000000001
cmpl $0xa, %edx
jb 0x40260
cmpb $0x2e, %cl
ja 0x4024b
movzbl %cl, %ecx
btq %rcx, %rsi
jb 0x4025c
movb 0x1(%rax), %cl
incq %rax
movsbl %cl, %edx
addl $-0x30, %edx
cmpl $0xa, %edx
jae 0x4023d
movq %rax, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
movq %rax, %rdi
movl $0xa, %edx
callq 0x9680
movq 0x10(%rbx), %rcx
cmpl %eax, 0xc(%rcx)
je 0x4028a
movl 0x10(%rcx), %edx
shlq $0x20, %rdx
movl %eax, %eax
orq %rdx, %rax
movq %rax, 0xc(%rcx)
movq -0x30(%rbp), %r15
movsbl (%r15), %r14d
movl %r14d, %edi
callq 0x97c0
testl %r14d, %r14d
je 0x402c0
testl %eax, %eax
jne 0x402c0
movsbl 0x1(%r15), %r14d
incq %r15
movl %r14d, %edi
callq 0x97c0
testl %r14d, %r14d
je 0x402bc
testl %eax, %eax
je 0x402a3
movq %r15, -0x30(%rbp)
movl %r14d, %edi
callq 0x97c0
testl %eax, %eax
je 0x402e4
movb 0x1(%r15), %r14b
incq %r15
movsbl %r14b, %edi
callq 0x97c0
testl %eax, %eax
jne 0x402cc
movq %r15, -0x30(%rbp)
testb %r14b, %r14b
je 0x40310
incq %r15
movq %r15, -0x30(%rbp)
movsbl (%r15), %r14d
movl %r14d, %edi
callq 0x97c0
incq %r15
testl %r14d, %r14d
je 0x40308
testl %eax, %eax
je 0x402ec
decq %r15
movl %r14d, %r12d
jmp 0x40317
movb (%r15), %r12b
movsbl %r12b, %r14d
movl %r14d, %edi
callq 0x97c0
testb %r12b, %r12b
je 0x40345
testl %eax, %eax
jne 0x40345
movsbl 0x1(%r15), %r14d
incq %r15
movl %r14d, %edi
callq 0x97c0
testl %r14d, %r14d
je 0x40341
testl %eax, %eax
je 0x40328
movq %r15, -0x30(%rbp)
leaq -0x1(%r15), %r14
movabsq $-0x100000000, %r12     # imm = 0xFFFFFFFF00000000
movabsq $0x100000000, %rax      # imm = 0x100000000
addq %rax, %r12
cmpb $0x29, 0x1(%r14)
leaq 0x1(%r14), %r14
jne 0x4035d
sarq $0x20, %r12
leaq 0x3153da(%rip), %r13    # 0x355750
movq %r13, %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x9270
movb $0x0, (%r12,%r13)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x4166c
movq %r14, -0x30(%rbp)
movb (%r14), %r15b
movsbl %r15b, %edi
callq 0x97c0
testl %eax, %eax
je 0x403c0
movb 0x1(%r14), %r15b
incq %r14
movsbl %r15b, %edi
callq 0x97c0
testl %eax, %eax
jne 0x403a8
movq %r14, -0x30(%rbp)
movabsq $0x680000000001, %r13   # imm = 0x680000000001
testb %r15b, %r15b
je 0x403f6
incq %r14
movq %r14, -0x30(%rbp)
movsbl (%r14), %r15d
movl %r15d, %edi
callq 0x97c0
incq %r14
testl %r15d, %r15d
je 0x403ee
testl %eax, %eax
je 0x403d2
decq %r14
movl %r15d, %r12d
jmp 0x403fd
movb (%r14), %r12b
movsbl %r12b, %r15d
movl %r15d, %edi
callq 0x97c0
testl %eax, %eax
je 0x40421
movb 0x1(%r14), %r12b
incq %r14
movsbl %r12b, %edi
callq 0x97c0
testl %eax, %eax
jne 0x40409
movq %r14, -0x30(%rbp)
testb %r12b, %r12b
je 0x40448
incq %r14
movq %r14, -0x30(%rbp)
movsbl (%r14), %r15d
movl %r15d, %edi
callq 0x97c0
incq %r14
testl %r15d, %r15d
je 0x40445
testl %eax, %eax
je 0x40429
decq %r14
movzbl 0x1(%r14), %eax
cmpl $0x61, %eax
je 0x4046c
cmpl $0x69, %eax
je 0x40465
xorl %edx, %edx
cmpl $0x6f, %eax
jne 0x40471
movl $0x2, %edx
jmp 0x40471
movl $0x3, %edx
jmp 0x40471
movl $0x1, %edx
movb (%r14), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
movl %edx, -0x34(%rbp)
jb 0x404a5
cmpb $0x2e, %al
ja 0x4048f
movzbl %al, %eax
btq %rax, %r13
jb 0x404a1
movb 0x1(%r14), %al
incq %r14
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x40482
movq %r14, -0x30(%rbp)
leaq -0x30(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0x118(%rbp)
movq (%r15), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x404f2
cmpb $0x2e, %al
ja 0x404dd
movzbl %al, %eax
btq %rax, %r13
jb 0x404ee
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x404d0
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0x110(%rbp)
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x4053c
cmpb $0x2e, %al
ja 0x40527
movzbl %al, %eax
btq %rax, %r13
jb 0x40538
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x4051a
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0x108(%rbp)
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x40586
cmpb $0x2e, %al
ja 0x40571
movzbl %al, %eax
btq %rax, %r13
jb 0x40582
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x40564
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0x100(%rbp)
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x405d0
cmpb $0x2e, %al
ja 0x405bb
movzbl %al, %eax
btq %rax, %r13
jb 0x405cc
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x405ae
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0xf8(%rbp)
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x4061a
cmpb $0x2e, %al
ja 0x40605
movzbl %al, %eax
btq %rax, %r13
jb 0x40616
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x405f8
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0xf0(%rbp)
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x40664
cmpb $0x2e, %al
ja 0x4064f
movzbl %al, %eax
btq %rax, %r13
jb 0x40660
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x40642
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, -0xe8(%rbp)
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x406ae
cmpb $0x2e, %al
ja 0x40699
movzbl %al, %eax
btq %rax, %r13
jb 0x406aa
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x4068c
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r14
movq %r14, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, %r15
movq (%r14), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x406f4
cmpb $0x2e, %al
ja 0x406df
movzbl %al, %eax
btq %rax, %r13
jb 0x406f0
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x406d2
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r12
movq %r12, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, %r14
movq (%r12), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x4073b
cmpb $0x2e, %al
ja 0x40726
movzbl %al, %eax
btq %rax, %r13
jb 0x40737
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x40719
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r13
movq %r13, %rsi
movl $0xa, %edx
callq 0x9680
movq %rax, %r12
movq (%r13), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x4078c
movabsq $0x680000000001, %rdx   # imm = 0x680000000001
cmpb $0x2e, %al
ja 0x40777
movzbl %al, %eax
btq %rax, %rdx
jb 0x40788
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x4076a
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r13
movq %r13, %rsi
callq 0x93a0
movsd %xmm0, -0xe0(%rbp)
movq (%r13), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x407dd
movabsq $0x680000000001, %rdx   # imm = 0x680000000001
cmpb $0x2e, %al
ja 0x407c8
movzbl %al, %eax
btq %rax, %rdx
jb 0x407d9
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x407bb
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %r13
movq %r13, %rsi
callq 0x93a0
movsd %xmm0, -0xd8(%rbp)
movq (%r13), %rdi
movb (%rdi), %al
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jb 0x4082e
movabsq $0x680000000001, %rdx   # imm = 0x680000000001
cmpb $0x2e, %al
ja 0x40819
movzbl %al, %eax
btq %rax, %rdx
jb 0x4082a
movb 0x1(%rdi), %al
incq %rdi
movsbl %al, %ecx
addl $-0x30, %ecx
cmpl $0xa, %ecx
jae 0x4080c
movq %rdi, -0x30(%rbp)
leaq -0x30(%rbp), %rsi
movl $0xa, %edx
callq 0x9680
movq 0x10(%rbx), %rdi
movl -0x34(%rbp), %esi
movq -0x118(%rbp), %rdx
movq -0x110(%rbp), %rcx
movq -0x108(%rbp), %r8
movl %r15d, %r9d
movsd -0xe0(%rbp), %xmm0
movsd -0xd8(%rbp), %xmm1
pushq 0xc(%rdi)
pushq %rax
pushq %r12
pushq %r14
pushq -0xe8(%rbp)
pushq -0xf8(%rbp)
pushq -0x100(%rbp)
pushq -0xf0(%rbp)
callq 0x3bde2
addq $0x40, %rsp
xorl %r12d, %r12d
xorl %r13d, %r13d
movq 0x10(%rbx), %r15
leaq (%r15,%r13), %r14
addq $0x35e8, %r14           # imm = 0x35E8
movb %r12b, 0x112(%r14)
leaq 0x35f0(%r15,%r13), %rsi
movl 0x10(%rsi), %edx
xorpd %xmm0, %xmm0
movq %r14, %rdi
callq 0xf572
addq %r13, %r15
addq $0x3618, %r15           # imm = 0x3618
movl 0x10(%r15), %edx
xorpd %xmm0, %xmm0
movq %r14, %rdi
movq %r15, %rsi
callq 0xf53c
movq %r12, 0x78(%r15)
movq %r12, 0x90(%r15)
movq 0x10(%rbx), %r15
leaq (%r15,%r13), %r14
addq $0x4610, %r14           # imm = 0x4610
movb %r12b, 0x112(%r14)
leaq 0x4618(%r15,%r13), %rsi
movl 0x10(%rsi), %edx
xorpd %xmm0, %xmm0
movq %r14, %rdi
callq 0xf572
addq %r13, %r15
addq $0x4640, %r15           # imm = 0x4640
movl 0x10(%r15), %edx
xorpd %xmm0, %xmm0
movq %r14, %rdi
movq %r15, %rsi
callq 0xf53c
movq %r12, 0x78(%r15)
movq %r12, 0x90(%r15)
addq $0x178, %r13            # imm = 0x178
cmpq $0x1028, %r13           # imm = 0x1028
jne 0x4089a
movq -0x30(%rbp), %rdi
leaq 0x2a088(%rip), %rsi     # 0x6a9eb
callq 0x9140
testq %rax, %rax
je 0x40ff0
movq %rax, %r14
leaq -0x60(%rbp), %r15
leaq -0x48(%rbp), %r12
leaq 0x2a068(%rip), %r13     # 0x6a9eb
addq $0x2, %r14
movq %r14, -0x30(%rbp)
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x41d1a
movq %r14, %rdi
movl $0x29, %esi
callq 0x91e0
movq %rax, -0x30(%rbp)
leaq 0x1(%rax), %rdx
leaq -0xd0(%rbp), %rdi
callq 0x41d92
movl -0x60(%rbp), %eax
cmpl $0x4, %eax
je 0x40a1e
cmpl $0x1, %eax
jne 0x40fd4
movq 0x10(%rbx), %rdi
movl $0x3570, %r14d          # imm = 0x3570
addq %r14, %rdi
movups -0xd0(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
movq %r12, %rsi
xorl %edx, %edx
movsd 0x28668(%rip), %xmm0    # 0x69058
callq 0xf572
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movups -0xc0(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
movq %r12, %rsi
xorl %edx, %edx
movsd 0x28644(%rip), %xmm0    # 0x69058
callq 0xf53c
jmp 0x40fd4
movb -0x54(%rbp), %sil
movq 0x10(%rbx), %rax
movslq -0x50(%rbp), %rdx
decq %rdx
movl -0x4c(%rbp), %ecx
cmpb 0x29(%rax), %sil
jne 0x40b5b
imulq $0x178, %rdx, %r14      # imm = 0x178
cmpl %ecx, 0x36fc(%rax,%r14)
je 0x40ab3
leaq (%rax,%r14), %r15
addq $0x35e8, %r15           # imm = 0x35E8
movl %ecx, 0x114(%r15)
callq 0x43dce
movq 0x5c38(%rax), %rax
movslq 0x114(%r15), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3020(%rax,%rcx), %xmm0
movsd %xmm0, 0x58(%r15)
callq 0x43dce
movq 0x5c38(%rax), %rax
movslq 0x114(%r15), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3098(%rax,%rcx), %xmm0
movsd %xmm0, 0x60(%r15)
movq 0x10(%rbx), %rax
movl $0x35e8, %r15d          # imm = 0x35E8
leaq (%rax,%r15), %rdi
addq %r14, %rdi
movb $0x1, 0x36fa(%rax,%r14)
movups -0xd0(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
movq %r12, %rsi
xorl %edx, %edx
movsd 0x28577(%rip), %xmm0    # 0x69058
callq 0xf572
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movl $0x35e8, %r13d          # imm = 0x35E8
addq %r15, %rdi
movups -0xc0(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
movq %r12, %rsi
xorl %edx, %edx
movsd 0x2854a(%rip), %xmm0    # 0x69058
callq 0xf53c
movq 0x10(%rbx), %r15
addq %r14, %r15
movsd -0xb0(%rbp), %xmm0
movsd 0x28536(%rip), %xmm1    # 0x69060
ucomisd %xmm0, %xmm1
jbe 0x40c86
movsd 0x28534(%rip), %xmm2    # 0x69070
movsd 0x28504(%rip), %xmm3    # 0x69048
movsd 0x2851c(%rip), %xmm4    # 0x69068
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x40b4c
jmp 0x40cae
imulq $0x178, %rdx, %r14      # imm = 0x178
cmpl %ecx, 0x4724(%rax,%r14)
je 0x40bd4
leaq (%rax,%r14), %r15
addq $0x4610, %r15           # imm = 0x4610
movl %ecx, 0x114(%r15)
callq 0x43dce
movq 0x5c38(%rax), %rax
movslq 0x114(%r15), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3020(%rax,%rcx), %xmm0
movsd %xmm0, 0x58(%r15)
callq 0x43dce
movq 0x5c38(%rax), %rax
movslq 0x114(%r15), %rcx
imulq $0x3700, %rcx, %rcx     # imm = 0x3700
movsd 0x3098(%rax,%rcx), %xmm0
movsd %xmm0, 0x60(%r15)
movq 0x10(%rbx), %rax
movl $0x4610, %r15d          # imm = 0x4610
leaq (%rax,%r15), %rdi
addq %r14, %rdi
movb $0x1, 0x4722(%rax,%r14)
movups -0xd0(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
movq %r12, %rsi
xorl %edx, %edx
movsd 0x28456(%rip), %xmm0    # 0x69058
callq 0xf572
movq 0x10(%rbx), %rdi
addq %r14, %rdi
movq %r12, %rsi
movl $0x4610, %r13d          # imm = 0x4610
addq %r15, %rdi
movups -0xc0(%rbp), %xmm0
movups %xmm0, -0x48(%rbp)
xorl %edx, %edx
movsd 0x28429(%rip), %xmm0    # 0x69058
callq 0xf53c
movq 0x10(%rbx), %r15
addq %r14, %r15
movsd -0xb0(%rbp), %xmm0
movsd 0x28415(%rip), %xmm1    # 0x69060
ucomisd %xmm0, %xmm1
jbe 0x40cfe
movsd 0x28413(%rip), %xmm2    # 0x69070
movsd 0x283e3(%rip), %xmm3    # 0x69048
movsd 0x283fb(%rip), %xmm4    # 0x69068
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x40c77
jmp 0x40d30
movsd 0x283ba(%rip), %xmm3    # 0x69048
ucomisd %xmm3, %xmm0
movsd 0x283d6(%rip), %xmm2    # 0x69070
movsd 0x283c6(%rip), %xmm4    # 0x69068
jb 0x40cae
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jae 0x40ca4
addq %r13, %r15
movsd %xmm0, 0xb0(%r15)
movl $0x0, 0xb8(%r15)
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
movq %rdx, 0xc0(%r15)
movsd -0xa8(%rbp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40d76
leaq 0x29cfc(%rip), %r13     # 0x6a9eb
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x40cef
jmp 0x40d8d
movsd 0x28342(%rip), %xmm3    # 0x69048
ucomisd %xmm3, %xmm0
movsd 0x2835e(%rip), %xmm2    # 0x69070
movsd 0x2834e(%rip), %xmm4    # 0x69068
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
jb 0x40d30
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jae 0x40d26
addq %r13, %r15
movsd %xmm0, 0xb0(%r15)
movl $0x0, 0xb8(%r15)
movq %rdx, 0xc0(%r15)
movsd -0xa8(%rbp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40e8d
leaq 0x29c84(%rip), %r13     # 0x6a9eb
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x40d67
jmp 0x40ea4
ucomisd %xmm3, %xmm0
leaq 0x29c6a(%rip), %r13     # 0x6a9eb
jb 0x40d8d
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jae 0x40d83
movsd %xmm0, 0x98(%r15)
movl $0x0, 0xa0(%r15)
movq %rdx, 0xa8(%r15)
movsd -0x88(%rbp), %xmm0
movsd %xmm0, 0x78(%r15)
movsd -0x80(%rbp), %xmm0
movsd %xmm0, 0x80(%r15)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, 0x90(%r15)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, 0x88(%r15)
movl -0x64(%rbp), %eax
movl 0x170(%r15), %ecx
testl %ecx, %ecx
je 0x40df8
cmpl $0x2, %eax
jne 0x40dff
cmpl $0x1, %ecx
jne 0x40dff
movl %eax, 0x170(%r15)
cmpb $0x1, -0xa0(%rbp)
jne 0x40e48
movsd -0x90(%rbp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40e81
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x40e16
xorpd %xmm1, %xmm1
movupd %xmm1, 0xd0(%r15)
movsd %xmm0, 0xe0(%r15)
movl $0x0, 0xe8(%r15)
movq %rdx, 0xf0(%r15)
xorl %eax, %eax
cmpb $0x1, -0x68(%rbp)
jne 0x40e67
cmpl $0x0, 0xc8(%r15)
jne 0x40e6e
callq 0x49360
movl 0x3320(%rax), %eax
decl %eax
movl %eax, 0xc8(%r15)
movq 0x10(%rbx), %rax
addq %rax, %r14
addq $0x370c, %r14           # imm = 0x370C
jmp 0x40f97
ucomisd %xmm3, %xmm0
jb 0x40e20
addsd %xmm4, %xmm0
jmp 0x40e81
ucomisd %xmm3, %xmm0
leaq 0x29b53(%rip), %r13     # 0x6a9eb
jb 0x40ea4
addsd %xmm4, %xmm0
ucomisd %xmm3, %xmm0
jae 0x40e9a
movsd %xmm0, 0x98(%r15)
movl $0x0, 0xa0(%r15)
movq %rdx, 0xa8(%r15)
movsd -0x88(%rbp), %xmm0
movsd %xmm0, 0x78(%r15)
movsd -0x80(%rbp), %xmm0
movsd %xmm0, 0x80(%r15)
movsd -0x78(%rbp), %xmm0
movsd %xmm0, 0x90(%r15)
movsd -0x70(%rbp), %xmm0
movsd %xmm0, 0x88(%r15)
movl -0x64(%rbp), %eax
movl 0x170(%r15), %ecx
testl %ecx, %ecx
je 0x40f0f
cmpl $0x2, %eax
jne 0x40f16
cmpl $0x1, %ecx
jne 0x40f16
movl %eax, 0x170(%r15)
cmpb $0x1, -0xa0(%rbp)
jne 0x40f63
movsd -0x90(%rbp), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x40fb9
addsd %xmm2, %xmm0
ucomisd %xmm0, %xmm1
ja 0x40f31
xorpd %xmm1, %xmm1
movupd %xmm1, 0xd0(%r15)
movsd %xmm0, 0xe0(%r15)
movl $0x0, 0xe8(%r15)
movq %rdx, 0xf0(%r15)
xorl %eax, %eax
cmpb $0x1, -0x68(%rbp)
jne 0x40f82
cmpl $0x0, 0xc8(%r15)
jne 0x40f89
callq 0x49360
movl 0x3320(%rax), %eax
decl %eax
movl %eax, 0xc8(%r15)
movq 0x10(%rbx), %rax
addq %rax, %r14
addq $0x4734, %r14           # imm = 0x4734
cmpb $0x1, -0x67(%rbp)
jne 0x40fc9
cmpl $0x0, (%r14)
leaq -0x60(%rbp), %r15
jne 0x40fd4
callq 0x49360
movl 0x33e8(%rax), %eax
decl %eax
movl %eax, (%r14)
jmp 0x40fd4
ucomisd %xmm3, %xmm0
jb 0x40f3b
addsd %xmm4, %xmm0
jmp 0x40fb9
movl $0x0, (%r14)
leaq -0x60(%rbp), %r15
movq -0x30(%rbp), %rdi
movq %r13, %rsi
callq 0x9140
movq %rax, %r14
movq %rax, -0x30(%rbp)
testq %rax, %rax
jne 0x40983
movq 0x10(%rbx), %rax
movb $0x1, 0x8(%rax)
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq