// File: 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
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0x20(%rbp), %rdi
leaq 0x2a1f5(%rip), %rsi     # 0xc1256
callq 0xa830
cmpl $0x0, %eax
je 0x97080
movq -0x20(%rbp), %rdi
leaq 0x2e2ee(%rip), %rsi     # 0xc5364
callq 0xa830
cmpl $0x0, %eax
jne 0x97085
jmp 0x9740e
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rdi
leaq 0x2e054(%rip), %rsi     # 0xc50eb
callq 0xa830
cmpl $0x0, %eax
jne 0x970c3
movq -0x20(%rbp), %rdi
leaq 0x2e070(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x1, -0x24(%rbp)
jmp 0x97266
movq -0x18(%rbp), %rdi
leaq 0x2e06c(%rip), %rsi     # 0xc513a
callq 0xa830
cmpl $0x0, %eax
jne 0x970fa
movq -0x20(%rbp), %rdi
leaq 0x2e039(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x2, -0x24(%rbp)
jmp 0x97264
movq -0x18(%rbp), %rdi
leaq 0x2e03c(%rip), %rsi     # 0xc5141
callq 0xa830
cmpl $0x0, %eax
jne 0x97131
movq -0x20(%rbp), %rdi
leaq 0x2e002(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x3, -0x24(%rbp)
jmp 0x97262
movq -0x18(%rbp), %rdi
leaq 0x2e00c(%rip), %rsi     # 0xc5148
callq 0xa830
cmpl $0x0, %eax
jne 0x97168
movq -0x20(%rbp), %rdi
leaq 0x2dfcb(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x4, -0x24(%rbp)
jmp 0x97260
movq -0x18(%rbp), %rdi
leaq 0x2dfdc(%rip), %rsi     # 0xc514f
callq 0xa830
cmpl $0x0, %eax
jne 0x9719f
movq -0x20(%rbp), %rdi
leaq 0x2df94(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x5, -0x24(%rbp)
jmp 0x9725e
movq -0x18(%rbp), %rdi
leaq 0x2dfac(%rip), %rsi     # 0xc5156
callq 0xa830
cmpl $0x0, %eax
jne 0x971d2
movq -0x20(%rbp), %rdi
leaq 0x2b928(%rip), %rsi     # 0xc2ae7
leaq 0x34a086(%rip), %rdx    # 0x3e124c
movb $0x0, %al
callq 0xa580
jmp 0x9725c
movq -0x18(%rbp), %rdi
leaq 0x2df83(%rip), %rsi     # 0xc5160
callq 0xa830
cmpl $0x0, %eax
jne 0x97206
movq -0x20(%rbp), %rdi
leaq 0x2df2a(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x6, -0x24(%rbp)
jmp 0x9725a
movq -0x18(%rbp), %rdi
leaq 0x2df5c(%rip), %rsi     # 0xc516d
callq 0xa830
cmpl $0x0, %eax
jne 0x9723a
movq -0x20(%rbp), %rdi
leaq 0x2def6(%rip), %rsi     # 0xc511c
leaq -0x30(%rbp), %rdx
movb $0x0, %al
callq 0xa580
movl $0x7, -0x24(%rbp)
jmp 0x97258
movq -0x18(%rbp), %rdi
leaq 0x2dd6b(%rip), %rsi     # 0xc4fb0
callq 0xa830
cmpl $0x0, %eax
jne 0x97256
movl $0x8, -0x24(%rbp)
jmp 0x97258
jmp 0x9725a
jmp 0x9725c
jmp 0x9725e
jmp 0x97260
jmp 0x97262
jmp 0x97264
jmp 0x97266
cmpl $0x0, -0x24(%rbp)
je 0x9738b
cmpl $0x6, -0x24(%rbp)
je 0x97280
cmpl $0x7, -0x24(%rbp)
jne 0x97307
movq -0xf8(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq %rcx, -0x108(%rbp)
movl -0x24(%rbp), %edx
movsd -0x30(%rbp), %xmm0
cvtsi2sdl 0x349faa(%rip), %xmm1 # 0x3e124c
movzbl 0x33(%rsi), %r8d
andl $0x1, %r8d
leaq -0x88(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x97a10
movq -0x108(%rbp), %rdi
movq -0x100(%rbp), %rsi
callq 0x98a40
jmp 0x972d3
leaq -0x88(%rbp), %rdi
callq 0x97c30
jmp 0x97386
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x97c30
jmp 0x97417
movq -0xf8(%rbp), %rsi
movq -0x10(%rbp), %rcx
movq %rcx, -0x118(%rbp)
movl -0x24(%rbp), %edx
movsd -0x30(%rbp), %xmm0
movzbl 0x33(%rsi), %r8d
andl $0x1, %r8d
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x110(%rbp)
xorps %xmm1, %xmm1
callq 0x97a10
movq -0x118(%rbp), %rdi
movq -0x110(%rbp), %rsi
callq 0x98a40
jmp 0x97355
leaq -0xf0(%rbp), %rdi
callq 0x97c30
jmp 0x97386
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x90(%rbp)
movl %eax, -0x94(%rbp)
leaq -0xf0(%rbp), %rdi
callq 0x97c30
jmp 0x97417
jmp 0x9740e
movq -0x18(%rbp), %rdi
leaq 0x2ddc0(%rip), %rsi     # 0xc5156
callq 0xa830
cmpl $0x0, %eax
je 0x9740c
jmp 0x973a2
movq 0x66c47(%rip), %rdi     # 0xfdff0
leaq 0x2dae9(%rip), %rsi     # 0xc4e99
callq 0xa5a0
movq %rax, %rdi
leaq 0x2de92(%rip), %rsi     # 0xc5251
callq 0xa5a0
movq %rax, %rdi
movl $0x343, %esi            # imm = 0x343
callq 0xaa40
movq %rax, %rdi
leaq 0x2c184(%rip), %rsi     # 0xc355f
callq 0xa5a0
movq %rax, %rdi
leaq 0x2dd90(%rip), %rsi     # 0xc517a
callq 0xa5a0
movq %rax, %rdi
movq -0x18(%rbp), %rsi
callq 0xa5a0
movq %rax, %rdi
movq 0x66bab(%rip), %rsi     # 0xfdfb0
callq 0xa630
jmp 0x9740c
jmp 0x9740e
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
movq -0x90(%rbp), %rdi
callq 0xaa60
nopw %cs:(%rax,%rax)