// File: /workspace/github_cpp_makefile_star2_O1/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 $0xc8, %rsp
movq %rcx, %r12
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
leaq 0x176a1(%rip), %rsi     # 0x6b2ce
movq %rcx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53f8e
leaq 0x1b690(%rip), %rsi     # 0x6f2d4
movq %r12, %rdi
callq 0x9670
testl %eax, %eax
je 0x53f8e
leaq 0x1b401(%rip), %rsi     # 0x6f05c
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
movq %r15, -0x38(%rbp)
je 0x53d32
leaq 0x1b435(%rip), %rsi     # 0x6f0ab
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53d51
leaq 0x1b425(%rip), %rsi     # 0x6f0b2
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53d70
leaq 0x1b415(%rip), %rsi     # 0x6f0b9
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53d8f
leaq 0x1b405(%rip), %rsi     # 0x6f0c0
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53dae
leaq 0x1b3f5(%rip), %rsi     # 0x6f0c7
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53fa0
leaq 0x1b3e8(%rip), %rsi     # 0x6f0d1
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53fc7
leaq 0x1b3de(%rip), %rsi     # 0x6f0de
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53fec
leaq 0x1b20a(%rip), %rsi     # 0x6ef21
movq %rbx, %rdi
callq 0x9670
xorl %ecx, %ecx
testl %eax, %eax
sete %cl
setne %r13b
shll $0x3, %ecx
jmp 0x53dcb
leaq 0x1b354(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x1, %ecx
jmp 0x53dcb
leaq 0x1b335(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x2, %ecx
jmp 0x53dcb
leaq 0x1b316(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x3, %ecx
jmp 0x53dcb
leaq 0x1b2f7(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x4, %ecx
jmp 0x53dcb
leaq 0x1b2d8(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x5, %ecx
xorl %r15d, %r15d
xorl %eax, %eax
testb %r13b, %r13b
je 0x53e7b
leaq 0x1b2e7(%rip), %rsi     # 0x6f0c7
movq %rbx, %rdi
callq 0x9670
testl %eax, %eax
je 0x53f8e
movq 0x331f9(%rip), %r14     # 0x86ff0
leaq 0x1b00c(%rip), %rsi     # 0x6ee0a
movl $0x12, %edx
movq %r14, %rdi
callq 0x9560
leaq 0x1b3b0(%rip), %rsi     # 0x6f1c2
movl $0x1, %edx
movq %r14, %rdi
callq 0x9560
movq %r14, %rdi
movl $0x343, %esi            # imm = 0x343
callq 0x9880
movq %rax, %r14
leaq 0x19649(%rip), %rsi     # 0x6d47f
movl $0x3, %edx
movq %rax, %rdi
callq 0x9560
leaq 0x1b2a1(%rip), %rsi     # 0x6f0eb
movl $0x15, %edx
movq %r14, %rdi
callq 0x9560
testq %rbx, %rbx
je 0x53f4d
movq %rbx, %rdi
callq 0x9200
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x9560
jmp 0x53f67
orb %al, %r15b
movsd -0x30(%rbp), %xmm0
cmpb $0x1, %r15b
jne 0x53eed
cvtsi2sdl 0x31625b(%rip), %xmm1 # 0x36a0ec
movq -0x38(%rbp), %rdx
movb 0x33(%rdx), %al
leaq -0xd0(%rbp), %rbx
xorps %xmm2, %xmm2
movups %xmm2, (%rbx)
movq $0x0, 0x10(%rbx)
movq %rdx, 0x20(%rbx)
movl %ecx, -0x18(%rbx)
movsd %xmm0, -0x10(%rbx)
movsd %xmm1, -0x8(%rbx)
movq %r14, 0x18(%rbx)
movsd 0x1add6(%rip), %xmm0    # 0x6eca0
movups %xmm0, 0x28(%rbx)
movl $0x0, 0x38(%rbx)
movb %al, 0x3c(%rbx)
addq $0x18, %r14
leaq -0xe8(%rbp), %rsi
movq %r14, %rdi
callq 0x5485c
jmp 0x53f43
movq -0x38(%rbp), %rsi
movb 0x33(%rsi), %al
leaq -0x78(%rbp), %rbx
xorl %edx, %edx
movq %rdx, 0x10(%rbx)
xorpd %xmm1, %xmm1
movupd %xmm1, (%rbx)
movq %rsi, 0x20(%rbx)
movl %ecx, -0x18(%rbx)
movsd %xmm0, -0x10(%rbx)
movq %rdx, -0x8(%rbx)
movq %r14, 0x18(%rbx)
movsd 0x1ad7e(%rip), %xmm0    # 0x6eca0
movups %xmm0, 0x28(%rbx)
movl $0x0, 0x38(%rbx)
movb %al, 0x3c(%rbx)
addq $0x18, %r14
leaq -0x90(%rbp), %rsi
movq %r14, %rdi
callq 0x5485c
movq %rbx, %rdi
callq 0x5480a
jmp 0x53f8e
movq (%r14), %rax
movq -0x18(%rax), %rax
movq %r14, %rdi
addq %rax, %rdi
movl 0x20(%r14,%rax), %esi
orl $0x1, %esi
callq 0x9860
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
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x18bec(%rip), %rsi     # 0x6cb93
leaq 0x31613e(%rip), %rdx    # 0x36a0ec
xorl %r15d, %r15d
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movb $0x1, %r13b
xorl %eax, %eax
xorl %ecx, %ecx
jmp 0x53dd0
leaq 0x1b0bf(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x6, %ecx
movb $0x1, %r15b
jmp 0x53dce
leaq 0x1b09a(%rip), %rsi     # 0x6f08d
xorl %r13d, %r13d
leaq -0x30(%rbp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x9490
movl $0x7, %ecx
movb $0x1, %al
xorl %r15d, %r15d
jmp 0x53dd0
jmp 0x54015
movq %rax, %r14
movq %rbx, %rdi
callq 0x5480a
movq %r14, %rdi
callq 0x98b0