// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x48, %rsp
movq %rdi, %r14
callq 0x3d00
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x3d54
leaq 0x1655(%rip), %rsi      # 0x89df
movq %r15, %rdi
callq 0x2090
testl %eax, %eax
je 0x751f
leaq 0xd22(%rip), %rsi       # 0x80c3
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x754c
leaq 0x1628(%rip), %rsi      # 0x89e1
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x75e3
movq %rbx, %rdi
callq 0x3e36
movl $0x20, %edi
callq 0x2190
movq %rax, %r15
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x8(%r14)
movl $0x20, %edi
callq 0x2190
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x10(%r14)
movq %r15, %rdi
callq 0x735c
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r15
movq %r15, %rsi
callq 0x2200
movq (%r15), %rdi
leaq -0x48(%rbp), %r15
cmpq %r15, %rdi
je 0x7441
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x159b(%rip), %rsi      # 0x89e3
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x757e
leaq 0x15a7(%rip), %rsi      # 0x8a07
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x7607
movl $0x4, 0x18(%r14)
movq %rbx, %rdi
callq 0x3e36
movq 0x10(%r14), %rdi
callq 0x735c
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r14
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x74ba
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x14cf(%rip), %rsi      # 0x8990
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x75db
movq 0x4aff(%rip), %rdi      # 0xbfd8
leaq 0x1506(%rip), %rsi      # 0x89e6
movl $0x20, %edx
callq 0x21d0
movq 0x4ae7(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x4adb(%rip), %rdi      # 0xbfd8
leaq 0xc16(%rip), %rsi       # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4ac3(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x7699
movl $0x1, 0x18(%r14)
movl $0x18, %edi
callq 0x2190
movq %rax, %r15
movq %rax, %rdi
callq 0x76dc
movq %r15, (%r14)
movq %r15, %rdi
callq 0x791a
jmp 0x75e3
movl $0x2, 0x18(%r14)
movq %rbx, %rdi
callq 0x3e36
movl $0x20, %edi
callq 0x2190
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x8(%r14)
movq %rax, %rdi
callq 0x735c
jmp 0x75e3
movl $0x3, 0x18(%r14)
movq %rbx, %rdi
callq 0x3e36
movq 0x10(%r14), %rdi
callq 0x735c
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r14
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x75c7
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x13c2(%rip), %rsi      # 0x8990
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x7651
movq %rbx, %rdi
callq 0x3e36
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x75fc
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21a0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x49ca(%rip), %rdi      # 0xbfd8
leaq 0x13f5(%rip), %rsi      # 0x8a0a
movl $0x22, %edx
callq 0x21d0
movq 0x49b2(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x49a6(%rip), %rdi      # 0xbfd8
leaq 0xae1(%rip), %rsi       # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x498e(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x7699
movq 0x4980(%rip), %rdi      # 0xbfd8
leaq 0x1387(%rip), %rsi      # 0x89e6
movl $0x20, %edx
callq 0x21d0
movq 0x4968(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x495c(%rip), %rdi      # 0xbfd8
leaq 0xa97(%rip), %rsi       # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4944(%rip), %rdi      # 0xbfd8
callq 0x20c0
xorl %edi, %edi
callq 0x21f0
jmp 0x76b8
jmp 0x76b8
jmp 0x76b8
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0x21a0
jmp 0x76bb
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x76d4
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22b0