// File: /workspace/github_cpp_makefile_star2_O2/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, %r13
addq $0x48, %rdi
movq %rdi, 0x28(%rsp)
callq 0x554e
leaq 0x78(%r13), %rdi
movq %rdi, 0x20(%rsp)
callq 0x554e
leaq 0x30(%r13), %r15
movq %r15, %rdi
callq 0x460a
addq $0x148, %r13            # imm = 0x148
movq %r13, %rdi
callq 0x55ac
leaq 0x50(%rsp), %r12
movl $0x1, (%r12)
movq %r13, %rdi
movq %r12, %rsi
callq 0x4612
movb $0x76, (%rax)
movl $0x2, (%r12)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x70, (%rax)
movl $0x3, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x78, (%rax)
movl $0x4, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x63, (%rax)
movl $0x5, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x2b, (%rax)
movl $0x6, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x2d, (%rax)
movl $0x7, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x2a, (%rax)
movl $0x8, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x2f, (%rax)
movl $0x9, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x3d, (%rax)
movl $0xa, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x28, (%rax)
movl $0xb, (%rbx)
leaq 0x50(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x4612
movb $0x29, (%rax)
movl $0xe, (%rbx)
leaq 0x50(%rsp), %rsi
movq %r13, %rdi
callq 0x4612
movb $0x23, (%rax)
leaq 0x2e59(%rip), %rdi      # 0x7130
leaq 0x2e1c(%rip), %rsi      # 0x70fa
callq 0x21d0
movq %rax, %r13
leaq 0x2e56(%rip), %rsi      # 0x7143
leaq 0x1c(%rsp), %rdx
movq %rax, %rdi
xorl %eax, %eax
callq 0x22a0
leaq 0x2e43(%rip), %rbx      # 0x7146
leaq 0x30(%rsp), %r14
leaq 0xc(%rsp), %rbp
subl $0x1, 0x1c(%rsp)
jb 0x4347
movq %r13, %rdi
movq %rbx, %rsi
movq %r12, %rdx
xorl %eax, %eax
callq 0x22a0
movq %r14, %rdi
movq %r12, %rsi
movq %rbp, %rdx
callq 0x4660
movq %r15, %rdi
movq %r14, %rsi
callq 0x469c
movq %r14, %rdi
callq 0x20c0
jmp 0x430d
leaq 0x2df8(%rip), %r15      # 0x7146
leaq 0x2dee(%rip), %rbx      # 0x7143
leaq 0x18(%rsp), %rbp
leaq 0x30(%rsp), %r14
movq %r13, %rdi
movq %r15, %rsi
leaq 0x15(%rsp), %rdx
xorl %eax, %eax
callq 0x22a0
cmpl $-0x1, %eax
je 0x4400
movq %r13, %rdi
movq %r15, %rsi
leaq 0x12(%rsp), %rdx
xorl %eax, %eax
callq 0x22a0
movq %r13, %rdi
movq %rbx, %rsi
leaq 0xc(%rsp), %rdx
xorl %eax, %eax
callq 0x22a0
movq %r13, %rdi
movq %rbx, %rsi
movq %rbp, %rdx
xorl %eax, %eax
callq 0x22a0
cmpb $0x47, 0x15(%rsp)
movl 0x18(%rsp), %r12d
jne 0x43d6
movzbl 0x12(%rsp), %eax
movl 0xc(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq 0x20(%rsp), %rdi
jmp 0x43f0
movzbl 0x12(%rsp), %eax
movl 0xc(%rsp), %ecx
shlq $0x20, %rcx
orq %rax, %rcx
movq %rcx, 0x30(%rsp)
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x4586
movl %r12d, (%rax)
jmp 0x435f
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20c0
movq %rbx, %rdi
callq 0x2280
nop