// File: /workspace/github_cpp_makefile_star2_O3/wrighteagle2d[P]wrighteaglebase/Debug/../src/Trainer.cpp
// Function: Trainer::AddCondition(Trainer::Condition*, char const*, char const*)
void Trainer::AddCondition(Trainer::Condition *superCondition, const char *name,
                           const char *buffer) {
  if (!strcmp(buffer, "false") || !strcmp(buffer, "off"))
    return;

  Trainer::ConditionType type = ET_Null;
  double arg; //初始化而已
  static int keyPlayer = 0;
  if (!strcmp(name, "Time")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_Time;
  } else if (!strcmp(name, "BallX>")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_BallXbt;
  } else if (!strcmp(name, "BallX<")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_BallXlt;
  } else if (!strcmp(name, "BallY>")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_BallYbt;
  } else if (!strcmp(name, "BallY<")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_BallYlt;
  } else if (!strcmp(name, "KeyPlayer")) {
    sscanf(buffer, "%d", &keyPlayer);
  } else if (!strcmp(name, "Ball2Player>")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_Ball2Playerbt;
  } else if (!strcmp(name, "Ball2Player<")) {
    sscanf(buffer, "%lf", &arg);
    type = ET_Ball2Playerlt;
  } else if (!strcmp(name, "NonPlayOn")) {
    type = ET_NonPlayOn;
  }

  if (type != ET_Null) {
    if (type == ET_Ball2Playerbt || type == ET_Ball2Playerlt)
      superCondition->AddSubCondition(Trainer::Condition(
          this, type, arg, keyPlayer, superCondition, mConverse));
    else
      superCondition->AddSubCondition(
          Trainer::Condition(this, type, arg, 0, superCondition, mConverse));
  } else if (strcmp(name, "KeyPlayer")) {
    PRINT_ERROR("error end condition: " << name);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rcx, %r12
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
leaq 0x16df9(%rip), %rsi     # 0x692ce
movq %rcx, %rdi
callq 0x9670
testl %eax, %eax
je 0x52672
leaq 0x1adb8(%rip), %rsi     # 0x6d2a4
movq %r12, %rdi
callq 0x9670
testl %eax, %eax
je 0x52672
leaq 0x1ab29(%rip), %rsi     # 0x6d02c
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x525d3
leaq 0x1ab61(%rip), %rsi     # 0x6d07b
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x525db
leaq 0x1ab51(%rip), %rsi     # 0x6d082
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x525e3
leaq 0x1ab41(%rip), %rsi     # 0x6d089
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x525eb
leaq 0x1ab31(%rip), %rsi     # 0x6d090
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x525f3
leaq 0x1ab21(%rip), %rsi     # 0x6d097
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x52684
leaq 0x1ab14(%rip), %rsi     # 0x6d0a1
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x5273a
leaq 0x1ab0a(%rip), %rsi     # 0x6d0ae
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x52742
leaq 0x1a936(%rip), %rsi     # 0x6cef1
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
jne 0x5269c
movl $0x8, %r13d
jmp 0x5260e
movl $0x1, %r13d
jmp 0x525f9
movl $0x2, %r13d
jmp 0x525f9
movl $0x3, %r13d
jmp 0x525f9
movl $0x4, %r13d
jmp 0x525f9
movl $0x5, %r13d
leaq 0x1aa5d(%rip), %rsi     # 0x6d05d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movsd -0x30(%rbp), %xmm0
movb 0x33(%r15), %al
leaq -0x70(%rbp), %r14
xorps %xmm1, %xmm1
movups %xmm1, (%r14)
xorl %ecx, %ecx
movq %rcx, 0x10(%r14)
movq %r15, 0x20(%r14)
movl %r13d, -0x18(%r14)
movsd %xmm0, -0x10(%r14)
movq %rcx, -0x8(%r14)
movsd 0x1a62e(%rip), %xmm0    # 0x6cc70
movups %xmm0, 0x28(%r14)
movl $0x0, 0x38(%r14)
movb %al, 0x3c(%r14)
movq %rbx, 0x18(%r14)
addq $0x18, %rbx
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0x53070
movq %r14, %rdi
callq 0x53018
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x184f8(%rip), %rsi     # 0x6ab83
leaq 0x314a5a(%rip), %rdx    # 0x3670ec
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
leaq 0x1a9f4(%rip), %rsi     # 0x6d097
movq %r14, %rdi
callq 0x9670
testl %eax, %eax
je 0x52672
movq 0x3193a(%rip), %rbx     # 0x83ff0
leaq 0x1a71d(%rip), %rsi     # 0x6cdda
movl $0x12, %edx
movq %rbx, %rdi
callq 0x9560
leaq 0x1aac1(%rip), %rsi     # 0x6d192
movl $0x1, %edx
movq %rbx, %rdi
callq 0x9560
movq %rbx, %rdi
movl $0x343, %esi            # imm = 0x343
callq 0x9880
movq %rax, %rbx
leaq 0x18d62(%rip), %rsi     # 0x6b457
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x1a9b2(%rip), %rsi     # 0x6d0bb
movl $0x15, %edx
movq %rbx, %rdi
callq 0x9560
testq %r14, %r14
je 0x527d0
movq %r14, %rdi
callq 0x9200
movq %rbx, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x9560
jmp 0x527e9
movl $0x6, %r13d
jmp 0x52748
movl $0x7, %r13d
leaq 0x1a90e(%rip), %rsi     # 0x6d05d
leaq -0x30(%rbp), %r14
movq %r12, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x9490
cvtsi2sdl 0x314984(%rip), %xmm0 # 0x3670ec
movsd (%r14), %xmm1
movb 0x33(%r15), %al
leaq -0xc8(%rbp), %r14
xorps %xmm2, %xmm2
movups %xmm2, (%r14)
movq $0x0, 0x10(%r14)
movq %r15, 0x20(%r14)
movl %r13d, -0x18(%r14)
movsd %xmm1, -0x10(%r14)
movsd %xmm0, -0x8(%r14)
movsd 0x1a4cd(%rip), %xmm0    # 0x6cc70
movups %xmm0, 0x28(%r14)
movl $0x0, 0x38(%r14)
movb %al, 0x3c(%r14)
movq %rbx, 0x18(%r14)
addq $0x18, %rbx
leaq -0xe0(%rbp), %rsi
movq %rbx, %rdi
callq 0x53070
jmp 0x5266a
movq (%rbx), %rax
movq -0x18(%rax), %rax
movq %rbx, %rdi
addq %rax, %rdi
movl 0x20(%rbx,%rax), %esi
orl $0x1, %esi
callq 0x9860
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
jmp 0x52672
jmp 0x52817
movq %rax, %rbx
movq %r14, %rdi
callq 0x53018
movq %rbx, %rdi
callq 0x98b0