// File: /workspace/github_cpp_makefile_star2_O3/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 0x3ce6d
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 0x3ce6d
movl $0x3, %ecx
movq %r15, %rdi
leaq 0x4131(%rip), %rsi      # 0x40eb7
xorl %edx, %edx
callq 0x3510
cmpq $-0x1, %rax
je 0x3ce56
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 0x3c8f2
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x6afc
movq %r13, %rdi
leaq 0x88(%rsp), %rsi
movq %rbp, %rdx
movl $0x2, %ecx
movq %rbx, %r8
callq 0x16a76
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce1e
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce3a
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce56
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 0x3cd4c
movq %rbx, %rdi
callq 0x3cf26
leaq 0x88(%rsp), %rdi
callq 0x2c694
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3ce9e
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 0x3cee1
movq %rax, %r14
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x3ced5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x3ced5
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x17662
jmp 0x3cee4
movq %rax, %r14
leaq 0x88(%rsp), %rdi
callq 0x2c694
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x3cf0d
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x30(%rbx), %rdi
callq 0x1988e
movq %rbx, %rdi
callq 0x34cd4
movq %r14, %rdi
callq 0x3530