// File: /workspace/github_cpp_makefile_star2_O1/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 0x3d00
movq %rax, %rbx
leaq -0x60(%rbp), %r15
movq %r15, %rdi
movq %rax, %rsi
callq 0x3d54
leaq 0x1b6f(%rip), %rsi      # 0x890f
movq %r15, %rdi
callq 0x2090
testl %eax, %eax
jne 0x7017
movq %rbx, %rdi
callq 0x3e36
movl $0x20, %edi
callq 0x2190
movq %rax, %r15
movq %rax, %rdi
callq 0x7170
movq %r15, (%r14)
movq %r15, %rdi
callq 0x735c
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %r15
movq %r15, %rsi
callq 0x2200
movq (%r15), %rdi
leaq -0x30(%rbp), %r12
cmpq %r12, %rdi
je 0x6e0c
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1af7(%rip), %rsi      # 0x890a
leaq -0x60(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x7017
movq %rbx, %rdi
callq 0x3e36
movl $0x18, %edi
callq 0x2190
movq %rax, %r15
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x4c40
movq %r15, 0x8(%r14)
movq %r15, %rdi
callq 0x4c96
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %r15
movq %r15, %rsi
callq 0x2200
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x6e81
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1220(%rip), %rsi      # 0x80a8
leaq -0x60(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x6fbf
leaq 0x1590(%rip), %rsi      # 0x8430
leaq -0x60(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x703d
movq %rbx, %rdi
callq 0x3e36
movl $0x18, %edi
callq 0x2190
movq %rax, %r15
movq 0x18(%r14), %rsi
movq %rax, %rdi
callq 0x4c40
movq %r15, 0x10(%r14)
movq %r15, %rdi
callq 0x4c96
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %r14
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x6f0e
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x1193(%rip), %rsi      # 0x80a8
leaq -0x60(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x708a
movq %rbx, %rdi
callq 0x3e36
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x60(%rbp), %rdi
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x6f5a
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x180b(%rip), %rsi      # 0x876c
leaq -0x60(%rbp), %rdi
callq 0x2090
testl %eax, %eax
je 0x700f
movq 0x505f(%rip), %rdi      # 0xbfd8
leaq 0x1992(%rip), %rsi      # 0x8912
movl $0x40, %edx
callq 0x21d0
movq 0x5047(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x503b(%rip), %rdi      # 0xbfd8
leaq 0x1176(%rip), %rsi      # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x5023(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x711c
movq %rbx, %rdi
callq 0x3e36
leaq -0x40(%rbp), %rdi
movq %rbx, %rsi
callq 0x3d54
leaq -0x60(%rbp), %rdi
leaq -0x40(%rbp), %r14
movq %r14, %rsi
callq 0x2200
movq (%r14), %rdi
cmpq %r12, %rdi
je 0x6ff7
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x21a0
leaq 0x176e(%rip), %rsi      # 0x876c
leaq -0x60(%rbp), %rdi
callq 0x2090
testl %eax, %eax
jne 0x70d4
movq %rbx, %rdi
callq 0x3e36
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7030
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21a0
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq 0x4f94(%rip), %rdi      # 0xbfd8
leaq 0x1908(%rip), %rsi      # 0x8953
movl $0x33, %edx
callq 0x21d0
movq 0x4f7c(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x4f70(%rip), %rdi      # 0xbfd8
leaq 0x10ab(%rip), %rsi      # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4f58(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x711c
movq 0x4f47(%rip), %rdi      # 0xbfd8
leaq 0x187a(%rip), %rsi      # 0x8912
movl $0x40, %edx
callq 0x21d0
movq 0x4f2f(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x4f23(%rip), %rdi      # 0xbfd8
leaq 0x105e(%rip), %rsi      # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4f0b(%rip), %rdi      # 0xbfd8
callq 0x20c0
jmp 0x711c
movq 0x4efd(%rip), %rdi      # 0xbfd8
leaq 0x1830(%rip), %rsi      # 0x8912
movl $0x40, %edx
callq 0x21d0
movq 0x4ee5(%rip), %rdi      # 0xbfd8
callq 0x20c0
movq 0x4ed9(%rip), %rdi      # 0xbfd8
leaq 0x1014(%rip), %rsi      # 0x811a
movl $0x10, %edx
callq 0x21d0
movq 0x4ec1(%rip), %rdi      # 0xbfd8
callq 0x20c0
xorl %edi, %edi
callq 0x21f0
jmp 0x714b
jmp 0x714b
jmp 0x714b
jmp 0x712d
jmp 0x714b
movq %rax, %rbx
movl $0x18, %esi
jmp 0x7141
jmp 0x714b
movq %rax, %rbx
movl $0x20, %esi
movq %r15, %rdi
callq 0x21a0
jmp 0x714e
movq %rax, %rbx
leaq -0x50(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7167
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x22b0
nop