// File: /workspace/github_cpp_makefile_star2_O3/Caproner[P]Naive_Compiler/Grammar/Grammar.cpp
// Function: Grammar::init()
void Grammar::init()
{
	this->ACTION.clear();
	this->GOTO.clear();
	this->Grammars.clear();
	
	this->Number_to_Symbol.clear();
	this->Number_to_Symbol[1]='v';
	this->Number_to_Symbol[2]='p';
	this->Number_to_Symbol[3]='x';
	this->Number_to_Symbol[4]='c';
	this->Number_to_Symbol[5]='+';
	this->Number_to_Symbol[6]='-';
	this->Number_to_Symbol[7]='*';
	this->Number_to_Symbol[8]='/';
	this->Number_to_Symbol[9]='=';
	this->Number_to_Symbol[10]='(';
	this->Number_to_Symbol[11]=')'; 
	this->Number_to_Symbol[14]='#';
	
	FILE *fp=fopen("Analysis_Table.txt","r");
	char Grammar_String[105];
	int Cnt;
	fscanf(fp,"%d",&Cnt);
	while(Cnt--)
	{
		fscanf(fp,"%s",Grammar_String);
		std::string s=Grammar_String;
		this->Grammars.push_back(s);
	}
	char Tag[3],Symbol[3];
	int Status,Target;
	while(~fscanf(fp,"%s",Tag))
	{
		fscanf(fp,"%s",Symbol);
		fscanf(fp,"%d",&Status);
		fscanf(fp,"%d",&Target);
		if(Tag[0]=='G')this->GOTO[std::make_pair(Symbol[0],Status)]=Target;
		else this->ACTION[std::make_pair(Symbol[0],Status)]=Target;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r12
addq $0x48, %rdi
movq %rdi, 0x48(%rsp)
callq 0x5a52
leaq 0x78(%r12), %rdi
movq %rdi, 0x40(%rsp)
callq 0x5a52
leaq 0x30(%r12), %r15
movq 0x30(%r12), %rsi
movq %r15, %rdi
callq 0x5a80
addq $0x148, %r12            # imm = 0x148
movq %r12, %rdi
callq 0x5ad2
leaq 0x50(%rsp), %rbx
movl $0x1, (%rbx)
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x76, (%rax)
movl $0x2, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x70, (%rax)
movl $0x3, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x78, (%rax)
movl $0x4, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x63, (%rax)
movl $0x5, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x2b, (%rax)
movl $0x6, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x2d, (%rax)
movl $0x7, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x2a, (%rax)
movl $0x8, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x2f, (%rax)
movl $0x9, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x3d, (%rax)
movl $0xa, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x28, (%rax)
movl $0xb, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x4c2e
movb $0x29, (%rax)
movl $0xe, (%rbx)
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0x4c2e
movb $0x23, (%rax)
leaq 0x2920(%rip), %rdi      # 0x7160
leaq 0x28db(%rip), %rsi      # 0x7122
callq 0x21d0
movq %rax, %r12
leaq 0x291d(%rip), %rsi      # 0x7173
leaq 0x1c(%rsp), %rbx
movq %rax, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2290
subl $0x1, (%rbx)
jb 0x48dc
leaq 0x30(%rsp), %rbp
leaq 0x28fd(%rip), %rbx      # 0x7176
leaq 0x50(%rsp), %r14
leaq 0x20(%rsp), %r13
movq %r12, %rdi
movq %rbx, %rsi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2290
movq %rbp, 0x20(%rsp)
movq %r14, %rdi
callq 0x20b0
leaq (%rsp,%rax), %rdx
addq $0x50, %rdx
movq %r13, %rdi
movq %r14, %rsi
callq 0x5ba2
movq %r15, %rdi
movq %r13, %rsi
callq 0x4c94
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x48d5
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21a0
subl $0x1, 0x1c(%rsp)
jae 0x4883
leaq 0x2893(%rip), %rsi      # 0x7176
leaq 0x11(%rsp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x2290
cmpl $-0x1, %eax
je 0x49af
leaq 0x2874(%rip), %r15      # 0x7176
leaq 0x286a(%rip), %rbp      # 0x7173
leaq 0x20(%rsp), %r13
leaq 0x11(%rsp), %rbx
movq %r12, %rdi
movq %r15, %rsi
leaq 0xe(%rsp), %rdx
xorl %eax, %eax
callq 0x2290
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x14(%rsp), %rdx
xorl %eax, %eax
callq 0x2290
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x18(%rsp), %rdx
xorl %eax, %eax
callq 0x2290
cmpb $0x47, 0x11(%rsp)
movl 0x18(%rsp), %r14d
jne 0x4971
movzbl 0xe(%rsp), %eax
movl 0x14(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x20(%rsp)
movq 0x40(%rsp), %rdi
jmp 0x498b
movzbl 0xe(%rsp), %eax
movl 0x14(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x20(%rsp)
movq 0x48(%rsp), %rdi
movq %r13, %rsi
callq 0x4ba4
movl %r14d, (%rax)
movq %r12, %rdi
movq %r15, %rsi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2290
cmpl $-0x1, %eax
jne 0x4913
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %rbp, %rdi
je 0x49db
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21a0
movq %rbx, %rdi
callq 0x2270
nop