// File: /workspace/github_cpp_makefile_star2_O1/neubig[P]egret/Egret/src/RuleSet.cpp
// Function: ListRuleSet::ListRuleSet(std::istream&)
ListRuleSet::ListRuleSet(istream &is)
{
	string curline;
	InterNodes interNodes;
	while(!is.eof())
	{
		getline(is,curline);
		if(is.eof())break;
		if(curline.find("-->")==string::npos)continue;
		Rule rule;
		string2rule(curline,rule);
		//rule.print(jout);
		//add(rule);
		binarize(rule, interNodes, rule.left, PERMUTE , *this);
	}
	normalize();
	//cerr<<"finished loading!"<<endl;
	//print(cout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xb8, %rsp
movq %rdi, %rbx
leaq 0x8(%rdi), %rax
xorl %ecx, %ecx
movl %ecx, 0x8(%rdi)
movq %rcx, 0x10(%rdi)
movq %rax, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movq %rcx, 0x28(%rdi)
leaq 0x38(%rdi), %rax
movl %ecx, 0x38(%rdi)
movq %rcx, 0x40(%rdi)
movq %rax, 0x48(%rdi)
movq %rax, 0x50(%rdi)
movq %rcx, 0x58(%rdi)
leaq 0x78(%rsp), %rax
movq %rax, -0x10(%rax)
movq %rcx, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x90(%rsp), %rax
movl %ecx, (%rax)
movq %rcx, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %rcx, 0x20(%rax)
movq (%rsi), %rax
movq -0x18(%rax), %rdi
testb $0x2, 0x20(%rsi,%rdi)
jne 0x3db2d
movq %rsi, %r14
addq %rsi, %rdi
leaq 0x68(%rsp), %r15
xorl %r12d, %r12d
leaq 0x20(%rsp), %r13
movq %rsp, %rbp
movl $0xa, %esi
callq 0x32b0
movsbl %al, %edx
movq %r14, %rdi
movq %r15, %rsi
callq 0x3560
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%r14,%rax)
jne 0x3db2d
movl $0x3, %ecx
movq %r15, %rdi
leaq 0x4451(%rip), %rsi      # 0x41e97
xorl %edx, %edx
callq 0x3510
cmpq $-0x1, %rax
je 0x3db16
leaq 0x30(%rsp), %rax
movq %rax, 0x20(%rsp)
movq %r12, 0x28(%rsp)
movb %r12b, 0x30(%rsp)
leaq 0x50(%rsp), %rax
movq %rax, 0x40(%rsp)
movq %r12, 0x48(%rsp)
movb %r12b, 0x50(%rsp)
movq %r15, %rdi
movq %r13, %rsi
callq 0x3d5b2
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x6a88
movq %r13, %rdi
leaq 0x88(%rsp), %rsi
movq %rbp, %rdx
movl $0x2, %ecx
movq %rbx, %r8
callq 0x16f54
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3dade
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3dafa
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3db16
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32e0
movq (%r14), %rax
movq -0x18(%rax), %rax
leaq (%r14,%rax), %rdi
testb $0x2, 0x20(%r14,%rax)
je 0x3da0c
movq %rbx, %rdi
callq 0x3dbe6
leaq 0x88(%rsp), %rdi
callq 0x2ce5c
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3db5e
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
addq $0xb8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3dba1
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3db95
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x3db95
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x17b9e
jmp 0x3dba4
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x2ce5c
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3dbcd
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x30(%rbx), %rdi
callq 0x19f1e
movq %rbx, %rdi
callq 0x357e0
movq %r14, %rdi
callq 0x3530