// File: /workspace/github_cpp_makefile_star2_O2/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, %r15
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x11c33(%rip), %rsi     # 0x57296
movq %rcx, %rdi
callq 0x9690
testl %eax, %eax
je 0x457e3
leaq 0x15c0a(%rip), %rsi     # 0x5b284
movq %r12, %rdi
callq 0x9690
testl %eax, %eax
je 0x457e3
leaq 0x1597b(%rip), %rsi     # 0x5b00c
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x4575b
leaq 0x159b3(%rip), %rsi     # 0x5b05b
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x4575f
leaq 0x159a3(%rip), %rsi     # 0x5b062
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x45763
leaq 0x15993(%rip), %rsi     # 0x5b069
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x45767
leaq 0x15983(%rip), %rsi     # 0x5b070
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x4576b
leaq 0x15977(%rip), %rsi     # 0x5b077
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x457f5
leaq 0x1596a(%rip), %rsi     # 0x5b081
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x45885
leaq 0x15960(%rip), %rsi     # 0x5b08e
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x45889
leaq 0x1578c(%rip), %rsi     # 0x5aed1
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
jne 0x4580d
pushq $0x8
popq %r13
jmp 0x45784
pushq $0x1
jmp 0x4576d
pushq $0x2
jmp 0x4576d
pushq $0x3
jmp 0x4576d
pushq $0x4
jmp 0x4576d
pushq $0x5
popq %r13
leaq 0x158c7(%rip), %rsi     # 0x5b03d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x94a0
movsd -0x30(%rbp), %xmm0
movb 0x33(%r14), %al
leaq -0x70(%rbp), %r15
andq $0x0, 0x10(%r15)
xorpd %xmm1, %xmm1
movupd %xmm1, (%r15)
movq %r14, 0x20(%r15)
movl %r13d, -0x18(%r15)
movsd %xmm0, -0x10(%r15)
andq $0x0, -0x8(%r15)
movq %rbx, 0x18(%r15)
movsd 0x15492(%rip), %xmm0    # 0x5ac50
movups %xmm0, 0x28(%r15)
andl $0x0, 0x38(%r15)
movb %al, 0x3c(%r15)
leaq -0x88(%rbp), %rsi
movq %rbx, %rdi
callq 0x46008
movq %r15, %rdi
callq 0x4602e
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x13353(%rip), %rsi     # 0x58b4f
leaq 0x3148e9(%rip), %rdx    # 0x35a0ec
movq %r12, %rdi
xorl %eax, %eax
callq 0x94a0
leaq 0x15863(%rip), %rsi     # 0x5b077
movq %r15, %rdi
callq 0x9690
testl %eax, %eax
je 0x457e3
movq 0x317c9(%rip), %rdi     # 0x76ff0
leaq 0x1558c(%rip), %rsi     # 0x5adba
callq 0x94b0
leaq 0x15938(%rip), %rsi     # 0x5b172
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movl $0x343, %esi            # imm = 0x343
callq 0x9890
leaq 0x13bc9(%rip), %rsi     # 0x5941f
movq %rax, %rdi
callq 0x94b0
leaq 0x15836(%rip), %rsi     # 0x5b09b
movq %rax, %rdi
callq 0x94b0
movq %rax, %rdi
movq %r15, %rsi
callq 0x94b0
movq %rax, %rdi
callq 0x99e8
jmp 0x457e3
pushq $0x6
jmp 0x4588b
pushq $0x7
popq %r13
leaq 0x157a9(%rip), %rsi     # 0x5b03d
leaq -0x30(%rbp), %r15
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x94a0
movsd (%r15), %xmm0
cvtsi2sdl 0x31483a(%rip), %xmm1 # 0x35a0ec
movb 0x33(%r14), %al
leaq -0xc8(%rbp), %r15
xorps %xmm2, %xmm2
andq $0x0, 0x10(%r15)
movups %xmm2, (%r15)
movq %r14, 0x20(%r15)
movl %r13d, -0x18(%r15)
movsd %xmm0, -0x10(%r15)
movsd %xmm1, -0x8(%r15)
movq %rbx, 0x18(%r15)
movsd 0x15367(%rip), %xmm0    # 0x5ac50
movups %xmm0, 0x28(%r15)
andl $0x0, 0x38(%r15)
movb %al, 0x3c(%r15)
leaq -0xe0(%rbp), %rsi
movq %rbx, %rdi
callq 0x46008
jmp 0x457db
jmp 0x4590d
movq %rax, %rbx
movq %r15, %rdi
callq 0x4602e
movq %rbx, %rdi
callq 0x98b0