// File: /workspace/github_cpp_makefile_star2_O3/neubig[P]egret/Egret/src/Forest.cpp
// Function: genUnaryNode_io(ListRuleSet&, Node&)
bool genUnaryNode_io(RuleSet& ruleSet,Node& node)
{
	bool mark=false;
	vector<string> ntPool;
	ntPool.clear();
	node.setUnaryInOrder(ruleSet,ntPool);
	
	for(int i=0;(size_t)i<ntPool.size();i++)
	{
		string rightPart=ntPool[i];
		Label& oldLb=node[rightPart];
		pair<RuleSet::RSIter,RuleSet::RSIter> iterPair=ruleSet.query(rightPart);
		for(RuleSet::RSIter iter=iterPair.first;iter!=iterPair.second;iter++)
		{
			string leftPart=iter->second.left;
			if(node.find(leftPart)==node.end())
			{
				ntPool.push_back(leftPart);
				Label newLabel;
				newLabel.init(leftPart,oldLb.start(),oldLb.stop());
				node[leftPart]=newLabel;
			}
			double ruleScore=iter->second.prob;
			//cerr<<"\n"<<leftPart<<"--->add Child: "<<rightPart<<endl;
			node[leftPart].addChild_io(&oldLb,ruleScore);
			mark=true;
		}
	}
	return mark;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1f8, %rsp            # imm = 0x1F8
movq %rsi, %rbx
movq %rdi, %rsi
xorps %xmm0, %xmm0
leaq 0x50(%rsp), %rdx
movaps %xmm0, (%rdx)
movq $0x0, 0x10(%rdx)
movq %rbx, %rdi
movq %rsi, 0xc8(%rsp)
callq 0x357e4
movq 0x50(%rsp), %rax
cmpq %rax, 0x58(%rsp)
je 0x28cf4
leaq 0x8(%rbx), %rcx
movq %rcx, 0xd8(%rsp)
xorl %edx, %edx
leaq 0x10(%rsp), %r14
leaq 0xa8(%rsp), %r15
leaq 0x30(%rsp), %r13
movl $0x0, (%rsp)
movq %rdx, 0xd0(%rsp)
movq %rdx, %rcx
shlq $0x5, %rcx
leaq 0x20(%rsp), %rdx
movq %rdx, 0x10(%rsp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0x6afc
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1fdec
movq %rax, %rbp
leaq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6afc
movq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x3d098
movq %rax, %r12
movq %rdx, %r14
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x28985
movq 0xb8(%rsp), %rsi
incq %rsi
callq 0x32e0
cmpq %r14, %r12
je 0x28ca4
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x40(%r12), %rsi
movq 0x48(%r12), %rdx
addq %rsi, %rdx
movq %r13, %rdi
callq 0x6afc
movq %rbx, %rdi
movq %r13, %rsi
callq 0x21d54
cmpq 0xd8(%rsp), %rax
jne 0x28c43
leaq 0x50(%rsp), %rdi
movq %r13, %rsi
callq 0x17546
leaq 0xe0(%rsp), %rdi
callq 0x1fe68
leaq 0x98(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
leaq 0x88(%rsp), %rdi
callq 0x6afc
movsd 0x48(%rbp), %xmm0
movaps %xmm0, (%rsp)
leaq 0x78(%rsp), %rax
movq %rax, 0x68(%rsp)
leaq 0x68(%rsp), %rdi
leaq 0x1848d(%rip), %rdx     # 0x40eb6
movq %rdx, %rsi
callq 0xb7d0
leaq 0xe8(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x3150
movaps (%rsp), %xmm0
movlps %xmm0, 0x128(%rsp)
leaq 0x108(%rsp), %rdi
leaq 0x68(%rsp), %rsi
callq 0x3150
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x28a80
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x28aa5
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32e0
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1fdec
movq %rax, %r15
movb 0xe0(%rsp), %al
movb %al, (%r15)
leaq 0x8(%r15), %rdi
leaq 0xe8(%rsp), %rsi
callq 0x3150
leaq 0x28(%r15), %rdi
leaq 0x108(%rsp), %rsi
callq 0x3150
leaq 0xe8(%rsp), %rcx
movb 0x48(%rcx), %al
movb %al, 0x50(%r15)
movq 0x40(%rcx), %rax
movq %rax, 0x48(%r15)
leaq 0x58(%r15), %rdi
leaq 0x138(%rsp), %rsi
callq 0x20524
leaq 0x70(%r15), %rdi
leaq 0x150(%rsp), %rsi
callq 0x20524
leaq 0x88(%r15), %rdi
leaq 0x168(%rsp), %rsi
callq 0x213d0
leaq 0xe8(%rsp), %rax
movups 0xb0(%rax), %xmm0
movups %xmm0, 0xb8(%r15)
leaq 0xc8(%r15), %rdi
leaq 0x1a8(%rsp), %rsi
callq 0x208ac
leaq 0xe8(%rsp), %rax
movups 0xd8(%rax), %xmm0
movups %xmm0, 0xe0(%r15)
movq %r15, %rdi
addq $0xf0, %rdi
leaq 0x1d0(%rsp), %rsi
callq 0x2123a
leaq 0xe8(%rsp), %rcx
movl 0x108(%rcx), %eax
movl %eax, 0x110(%r15)
movq 0x100(%rcx), %rax
movq %rax, 0x108(%r15)
leaq 0x1d0(%rsp), %rdi
callq 0x1cee0
movq 0x1a8(%rsp), %rdi
testq %rdi, %rdi
je 0x28bd2
movq 0x1b8(%rsp), %rsi
subq %rdi, %rsi
callq 0x32e0
leaq 0x168(%rsp), %rdi
callq 0x1cf88
leaq 0x150(%rsp), %rdi
callq 0x1cf34
leaq 0x138(%rsp), %rdi
callq 0x1cf34
movq 0x108(%rsp), %rdi
leaq 0x118(%rsp), %rax
cmpq %rax, %rdi
je 0x28c1e
movq 0x118(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xe8(%rsp), %rdi
leaq 0xf8(%rsp), %rax
cmpq %rax, %rdi
je 0x28c43
movq 0xf8(%rsp), %rsi
incq %rsi
callq 0x32e0
movsd 0x80(%r12), %xmm0
movsd %xmm0, (%rsp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x1fdec
movq %rax, %rdi
movq %rbp, %rsi
movsd (%rsp), %xmm0
xorl %edx, %edx
callq 0x2d51a
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x28c8b
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32e0
movq %r12, %rdi
callq 0x31f0
movq %rax, %r12
cmpq %r14, %rax
jne 0x2898e
movb $0x1, %al
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x28cc0
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xd0(%rsp), %rdx
incq %rdx
movq 0x50(%rsp), %rax
movq 0x58(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rdx, %rcx
leaq 0x10(%rsp), %r14
leaq 0xa8(%rsp), %r15
ja 0x288ea
jmp 0x28cfb
movl $0x0, (%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6186
movl (%rsp), %eax
andb $0x1, %al
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x28d1e
movq %rax, %rbx
jmp 0x28df3
jmp 0x28d9f
jmp 0x28d9f
movq %rax, %rbx
movq 0xa8(%rsp), %rdi
leaq 0xb8(%rsp), %rax
cmpq %rax, %rdi
je 0x28dd7
movq 0xb8(%rsp), %rsi
jmp 0x28dcf
movq %rax, %rbx
jmp 0x28d78
jmp 0x28da6
jmp 0x28da6
movq %rax, %rbx
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x28d78
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x88(%rsp), %rdi
leaq 0x98(%rsp), %rax
cmpq %rax, %rdi
je 0x28dae
movq 0x98(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x28dae
movq %rax, %rbx
jmp 0x28dd7
jmp 0x28da6
movq %rax, %rbx
jmp 0x28dbb
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x2025c
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x28dd7
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x28df3
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x50(%rsp), %rdi
callq 0x6186
movq %rbx, %rdi
callq 0x3530
nop