// File: /workspace/github_cpp_makefile_star2_O2/smallsimple[P]CoreInterpreter-CSE5341/Ifc.cpp
// Function: Ifc::ParseIfc()
void Ifc::ParseIfc(){
  Tokenizer *tokensIfc;
  tokensIfc = Tokenizer::getInstance();
  string tokenTemp = tokensIfc->getToken();
  if (tokenTemp.compare("if") == 0){
    tokensIfc->skipToken();
    cond = new Cond();
    cond->ParseCond();
    tokenTemp = tokensIfc->getToken();
    if (tokenTemp.compare("then") == 0){
      tokensIfc->skipToken();
      stmtSeq1 = new StmtSeq(infile);
      stmtSeq1->ParseStmtSeq();
      tokenTemp = tokensIfc->getToken();
      if (tokenTemp.compare("end") == 0){
	tokensIfc->skipToken();
	tokenTemp = tokensIfc->getToken();
	if (tokenTemp.compare(";") == 0){
	  tokensIfc->skipToken();
	  return;
	}
	else{
	  cout << "Syntax Error: ParseIfc: \";\" not found or not in the right place." << endl;
	  cout << "program stopped." << endl;
	  exit(0);
	}
      }
      else if (tokenTemp.compare("else") == 0){
	tokensIfc->skipToken();
	stmtSeq2 = new StmtSeq(infile);
	stmtSeq2->ParseStmtSeq();
	tokenTemp = tokensIfc->getToken();
	if (tokenTemp.compare("end") == 0){
	  tokensIfc->skipToken();
	  tokenTemp = tokensIfc->getToken();
	  if (tokenTemp.compare(";") == 0){
	    tokensIfc->skipToken();
	    return;
	  }
	  else {
	    cout << "Syntax Error: ParseIfc: \";\" not found or not in the right place." << endl;
	    cout << "program stopped." << endl;
	    exit(0);
	  }
	}
	else{
	    cout << "Syntax Error: ParseIfc: \";\" not found or not in the right place." << endl;
	    cout << "program stopped." << endl;
	    exit(0);
	}
      }
      else {
	cout << "Syntax Error: ParseIfc: no \"end\" or \"else\" is found" << 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 -0x60(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x36e6
leaq 0x1000(%rip), %rsi      # 0x70b0
movq %r15, %rdi
callq 0x2080
testl %eax, %eax
jne 0x62d1
movq %rbx, %rdi
callq 0x3746
pushq $0x20
popq %rdi
callq 0x2180
movq %rax, %r15
movq %rax, %rdi
callq 0x63cc
movq %r15, (%r14)
movq %r15, %rdi
callq 0x65ac
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x60(%rbp), %r15
leaq -0x40(%rbp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x21e0
movq %r12, %rdi
callq 0x20c0
leaq 0x17c9(%rip), %rsi      # 0x78dd
movq %r15, %rdi
callq 0x2080
testl %eax, %eax
jne 0x62d1
movq %rbx, %rdi
callq 0x3746
pushq $0x18
popq %rdi
callq 0x2180
movq %rax, %r15
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x449c
movq %r15, 0x8(%r14)
movq %r15, %rdi
callq 0x44f2
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %r12, %rsi
callq 0x21e0
movq %r12, %rdi
callq 0x20c0
leaq 0xf2f(%rip), %rsi       # 0x70a8
movq %r15, %rdi
callq 0x2080
testl %eax, %eax
je 0x6283
leaq 0xf23(%rip), %rsi       # 0x70b3
leaq -0x60(%rbp), %rdi
callq 0x2080
testl %eax, %eax
jne 0x62e7
movq %rbx, %rdi
callq 0x3746
pushq $0x18
popq %rdi
callq 0x2180
movq %rax, %r15
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x449c
movq %r15, 0x10(%r14)
movq %r15, %rdi
callq 0x44f2
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x60(%rbp), %r14
leaq -0x40(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq %r15, %rdi
callq 0x20c0
leaq 0xeae(%rip), %rsi       # 0x70a8
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x631f
movq %rbx, %rdi
callq 0x3746
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq %r15, %rdi
callq 0x20c0
leaq 0x150c(%rip), %rsi      # 0x7744
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
je 0x62c9
movq 0x4d89(%rip), %rdi      # 0xafd8
leaq 0x168c(%rip), %rsi      # 0x78e2
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x4d6e(%rip), %rdi      # 0xafd8
leaq 0xed5(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
jmp 0x638d
movq %rbx, %rdi
callq 0x3746
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x36e6
leaq -0x60(%rbp), %r14
leaq -0x40(%rbp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x21e0
movq %r15, %rdi
callq 0x20c0
leaq 0x148b(%rip), %rsi      # 0x7744
movq %r14, %rdi
callq 0x2080
testl %eax, %eax
jne 0x6357
movq %rbx, %rdi
callq 0x3746
leaq -0x60(%rbp), %rdi
callq 0x20c0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x4cea(%rip), %rdi      # 0xafd8
leaq 0x162e(%rip), %rsi      # 0x7923
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x4ccf(%rip), %rdi      # 0xafd8
leaq 0xe36(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
jmp 0x638d
movq 0x4cb2(%rip), %rdi      # 0xafd8
leaq 0x15b5(%rip), %rsi      # 0x78e2
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x4c97(%rip), %rdi      # 0xafd8
leaq 0xdfe(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
jmp 0x638d
movq 0x4c7a(%rip), %rdi      # 0xafd8
leaq 0x157d(%rip), %rsi      # 0x78e2
callq 0x2170
movq %rax, %rdi
callq 0x20d0
movq 0x4c5f(%rip), %rdi      # 0xafd8
leaq 0xdc6(%rip), %rsi       # 0x7146
callq 0x2170
movq %rax, %rdi
callq 0x20d0
xorl %edi, %edi
callq 0x21d0
jmp 0x63b7
jmp 0x63b7
jmp 0x63b7
jmp 0x639e
jmp 0x63b7
movq %rax, %rbx
pushq $0x18
jmp 0x63ac
jmp 0x63b7
movq %rax, %rbx
pushq $0x20
popq %rsi
movq %r15, %rdi
callq 0x2190
jmp 0x63ba
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2290
nop