// File: /workspace/github_cpp_makefile_star2_O2/smallsimple[P]CoreInterpreter-CSE5341/Cond.cpp
// Function: Cond::ParseCond()
void Cond::ParseCond(){
  Tokenizer *tokensCond;
  tokensCond = Tokenizer::getInstance();
  string tokenTemp = tokensCond->getToken();
  if (tokenTemp.compare("(") == 0){
    alterId = 1;
    comp = new Comp();
    comp->ParseComp();
  }
  else if (tokenTemp.compare("!") == 0){
    alterId = 2;
    tokensCond->skipToken();
    cond1 = new Cond();
    cond1->ParseCond();
  }
  else if (tokenTemp.compare("[") == 0){
    tokensCond->skipToken();
    cond1 = new Cond();
    cond2 = new Cond();
    cond1->ParseCond();
    tokenTemp = tokensCond->getToken();
    if (tokenTemp.compare("&&") == 0){
      alterId = 3;
      tokensCond->skipToken();
      cond2->ParseCond();
      tokenTemp = tokensCond->getToken();
      if (tokenTemp.compare("]") == 0){
	tokensCond->skipToken();
	return;
      }
      else {
	cout << "Error: ParseCond: \"]\" not found!" << endl;
	cout << "program stopped." << endl;
	exit(0);
      }
    }
    else if (tokenTemp.compare("||") == 0){
      alterId = 4;
      tokensCond->skipToken();
      cond2->ParseCond();
      tokenTemp = tokensCond->getToken();
      if (tokenTemp.compare("]") == 0){
	tokensCond->skipToken();
	return;
      }
      else {
	cout << "Error: ParseCond: \"]\" not found!" << endl;
	cout << "program stopped." << endl;
	exit(0);
      }
    }
    else {
      cout << "Syntax Error: <cond> is not right!" << endl;
      cout << "program stopped." << endl;
      exit(0);
    }
    
  } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
movq %rdi, %r14
callq 0x3692
movq %rax, %rbx
leaq -0x40(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x36e6
leaq 0xaf7(%rip), %rsi       # 0x70d3
movq %r15, %rdi
callq 0x2080
testl %eax, %eax
je 0x6743
leaq 0xafc(%rip), %rsi       # 0x70ef
leaq -0x40(%rbp), %rdi
callq 0x2080
testl %eax, %eax
je 0x676e
leaq 0xac0(%rip), %rsi       # 0x70cb
leaq -0x40(%rbp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x67f9
movq %rbx, %rdi
callq 0x3746
pushq $0x20
popq %rdi
callq 0x2180
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x8(%r14)
pushq $0x20
popq %rdi
callq 0x2180
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x65ac
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x40(%rbp), %r15
leaq -0x60(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21e0
movq %r12, %rdi
callq 0x20c0
leaq 0xa44(%rip), %rsi       # 0x70cd
movq %r15, %rdi
callq 0x2080
testl %eax, %eax
je 0x679e
leaq 0xa30(%rip), %rsi       # 0x70d0
leaq -0x40(%rbp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x680f
movl $0x4, 0x18(%r14)
movq %rbx, %rdi
callq 0x3746
movq 0x10(%r14), %rdi
callq 0x65ac
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq %r15, %rdi
callq 0x20c0
leaq 0x1289(%rip), %rsi      # 0x7981
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x67f1
movq 0x48c9(%rip), %rdi      # 0xafd8
leaq 0x12ba(%rip), %rsi      # 0x79d0
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x48ae(%rip), %rdi      # 0xafd8
leaq 0xa15(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
jmp 0x687d
movl $0x1, 0x18(%r14)
pushq $0x18
popq %rdi
callq 0x2180
movq %rax, %r15
movq %rax, %rdi
callq 0x68b0
movq %r15, (%r14)
movq %r15, %rdi
callq 0x6a78
jmp 0x67f9
movl $0x2, 0x18(%r14)
movq %rbx, %rdi
callq 0x3746
pushq $0x20
popq %rdi
callq 0x2180
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x8(%r14)
movq %rax, %rdi
callq 0x65ac
jmp 0x67f9
movl $0x3, 0x18(%r14)
movq %rbx, %rdi
callq 0x3746
movq 0x10(%r14), %rdi
callq 0x65ac
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x40(%rbp), %r14
leaq -0x60(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq %r15, %rdi
callq 0x20c0
leaq 0x119c(%rip), %rsi      # 0x7981
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x6847
movq %rbx, %rdi
callq 0x3746
leaq -0x40(%rbp), %rdi
callq 0x20c0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x47c2(%rip), %rdi      # 0xafd8
leaq 0x11d4(%rip), %rsi      # 0x79f1
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x47a7(%rip), %rdi      # 0xafd8
leaq 0x90e(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
jmp 0x687d
movq 0x478a(%rip), %rdi      # 0xafd8
leaq 0x117b(%rip), %rsi      # 0x79d0
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x476f(%rip), %rdi      # 0xafd8
leaq 0x8d6(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
xorl %edi, %edi
callq 0x21d0
jmp 0x689a
jmp 0x689a
jmp 0x689a
movq %rax, %rbx
pushq $0x18
popq %rsi
movq %r15, %rdi
callq 0x2190
jmp 0x689d
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2290
nop