// File: /workspace/github_cpp_makefile_star2_O3/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 0x3c70
movq %rax, %rbx
leaq -0x38(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x3cc4
leaq 0x16f3(%rip), %rsi      # 0x89dd
movq %r15, %rdi
callq 0x2090
testl %eax, %eax
je 0x747f
leaq 0xdc2(%rip), %rsi       # 0x80c3
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x74ac
leaq 0x16c6(%rip), %rsi      # 0x89df
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x7543
movq %rbx, %rdi
callq 0x3da6
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 0x72bc
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3cc4
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r15
movq %r15, %rsi
callq 0x2200
movq (%r15), %rdi
leaq -0x48(%rbp), %r15
cmpq %r15, %rdi
je 0x73a1
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1639(%rip), %rsi      # 0x89e1
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x74de
leaq 0x1645(%rip), %rsi      # 0x8a05
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x7567
movl $0x4, 0x18(%r14)
movq %rbx, %rdi
callq 0x3da6
movq 0x10(%r14), %rdi
callq 0x72bc
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3cc4
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r14
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x741a
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x156d(%rip), %rsi      # 0x898e
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x753b
movq 0x4b9f(%rip), %rdi      # 0xbfd8
leaq 0x15a4(%rip), %rsi      # 0x89e4
movl $0x20, %edx
callq 0x21d0
movq 0x4b87(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x4b7b(%rip), %rdi      # 0xbfd8
leaq 0xcb6(%rip), %rsi       # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4b63(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x75f9
movl $0x1, 0x18(%r14)
movl $0x18, %edi
callq 0x2190
movq %rax, %r15
movq %rax, %rdi
callq 0x763c
movq %r15, (%r14)
movq %r15, %rdi
callq 0x787a
jmp 0x7543
movl $0x2, 0x18(%r14)
movq %rbx, %rdi
callq 0x3da6
movl $0x20, %edi
callq 0x2190
xorps %xmm0, %xmm0
movups %xmm0, 0xc(%rax)
movups %xmm0, (%rax)
movq %rax, 0x8(%r14)
movq %rax, %rdi
callq 0x72bc
jmp 0x7543
movl $0x3, 0x18(%r14)
movq %rbx, %rdi
callq 0x3da6
movq 0x10(%r14), %rdi
callq 0x72bc
leaq -0x58(%rbp), %rdi
movq %rbx, %rsi
callq 0x3cc4
leaq -0x38(%rbp), %rdi
leaq -0x58(%rbp), %r14
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r15, %rdi
je 0x7527
movq -0x48(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1460(%rip), %rsi      # 0x898e
leaq -0x38(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x75b1
movq %rbx, %rdi
callq 0x3da6
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x755c
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21a0
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4a6a(%rip), %rdi      # 0xbfd8
leaq 0x1493(%rip), %rsi      # 0x8a08
movl $0x22, %edx
callq 0x21d0
movq 0x4a52(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x4a46(%rip), %rdi      # 0xbfd8
leaq 0xb81(%rip), %rsi       # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4a2e(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x75f9
movq 0x4a20(%rip), %rdi      # 0xbfd8
leaq 0x1425(%rip), %rsi      # 0x89e4
movl $0x20, %edx
callq 0x21d0
movq 0x4a08(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x49fc(%rip), %rdi      # 0xbfd8
leaq 0xb37(%rip), %rsi       # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x49e4(%rip), %rdi      # 0xbfd8
callq 0x20c0
xorl %edi, %edi
callq 0x21f0
jmp 0x7618
jmp 0x7618
jmp 0x7618
movq %rax, %rbx
movl $0x18, %esi
movq %r15, %rdi
callq 0x21a0
jmp 0x761b
movq %rax, %rbx
leaq -0x28(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7634
movq -0x28(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22a0