// File: /workspace/github_cpp_makefile_star2_O2/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 $0x218, %rsp            # imm = 0x218
movq %rsi, %rbx
movq %rdi, %r15
xorps %xmm0, %xmm0
leaq 0x20(%rsp), %r14
movaps %xmm0, (%r14)
andq $0x0, 0x10(%r14)
movq %r14, %rdi
callq 0x515e
movq %rbx, %rdi
movq %r15, 0x38(%rsp)
movq %r15, %rsi
movq %r14, %rdx
callq 0x29d4a
movq %rbx, 0x10(%rsp)
leaq 0x8(%rbx), %rax
movq %rax, 0x48(%rsp)
xorl %ecx, %ecx
leaq 0xa0(%rsp), %r15
leaq 0x80(%rsp), %r12
leaq 0xe0(%rsp), %r13
xorl %r14d, %r14d
movq 0x20(%rsp), %rsi
movq 0x28(%rsp), %rax
subq %rsi, %rax
sarq $0x5, %rax
cmpq %rcx, %rax
jbe 0x201c5
movq %rcx, 0x40(%rsp)
movq %rcx, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %r15, %rdi
callq 0x33c0
movq 0x10(%rsp), %rdi
movq %r15, %rsi
callq 0x19b24
movq %rax, 0x18(%rsp)
movq %r12, %rdi
movq %r15, %rsi
callq 0x33c0
movq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x2f88a
movq %rdx, 0x50(%rsp)
movq %rax, %rbp
movq %r12, %rdi
callq 0x3578
cmpq 0x50(%rsp), %rbp
je 0x201a0
leaq 0x40(%rbp), %rsi
movq %r13, %rdi
callq 0x33c0
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x1b8b0
cmpq 0x48(%rsp), %rax
leaq 0x60(%rsp), %r14
jne 0x20155
leaq 0x20(%rsp), %rdi
movq %r13, %rsi
callq 0x129cc
leaq 0x100(%rsp), %rdi
callq 0x19b8a
movq %r14, %rdi
movq %r13, %rsi
callq 0x33c0
movq 0x18(%rsp), %rax
movl 0x48(%rax), %r14d
movl 0x4c(%rax), %r12d
leaq 0xc0(%rsp), %r15
movq %r15, %rdi
leaq 0x12dc3(%rip), %rsi     # 0x32eb6
leaq 0xf(%rsp), %rdx
callq 0x9f86
leaq 0x100(%rsp), %rdi
leaq 0x60(%rsp), %rbx
movq %rbx, %rsi
movl %r14d, %edx
movl %r12d, %ecx
movq %r15, %r8
callq 0x21310
movq %r15, %rdi
callq 0x3578
movq %rbx, %rdi
callq 0x3578
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x19b24
movq %rax, %rdi
leaq 0x100(%rsp), %rsi
callq 0x19d82
leaq 0x100(%rsp), %rdi
callq 0x17b24
movsd 0x80(%rbp), %xmm0
movsd %xmm0, 0x58(%rsp)
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0x19b24
movq %rax, %rdi
movq 0x18(%rsp), %rsi
movsd 0x58(%rsp), %xmm0
xorl %edx, %edx
callq 0x23e4e
movq %r13, %rdi
callq 0x3578
movq %rbp, %rdi
callq 0x3210
movq %rax, %rbp
movb $0x1, %r14b
jmp 0x2007b
leaq 0xa0(%rsp), %r15
movq %r15, %rdi
callq 0x3578
movq 0x40(%rsp), %rcx
incq %rcx
leaq 0x80(%rsp), %r12
jmp 0x20010
leaq 0x20(%rsp), %rdi
callq 0x5166
andb $0x1, %r14b
movl %r14d, %eax
addq $0x218, %rsp            # imm = 0x218
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x201f9
jmp 0x20227
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0x20249
movq %rax, %rbx
jmp 0x2025b
jmp 0x20227
movq %rax, %rbx
jmp 0x20219
jmp 0x2023e
jmp 0x2023e
movq %rax, %rbx
leaq 0xc0(%rsp), %rdi
callq 0x3578
leaq 0x60(%rsp), %rdi
callq 0x3578
jmp 0x2022f
jmp 0x2023e
movq %rax, %rbx
jmp 0x2024e
movq %rax, %rbx
leaq 0x100(%rsp), %rdi
callq 0x17b24
jmp 0x20241
movq %rax, %rbx
leaq 0xe0(%rsp), %rdi
callq 0x3578
leaq 0xa0(%rsp), %rdi
callq 0x3578
leaq 0x20(%rsp), %rdi
callq 0x5166
movq %rbx, %rdi
callq 0x34f0
nop