// File: /workspace/github_cpp_makefile_star2_O1/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 $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movq %rdi, 0x48(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0x10(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x18(%rsp), %r14
testq %r14, %r14
je 0x29002
movl $0x10, %r15d
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x28fe9
movq (%r15), %rsi
incq %rsi
callq 0x32e0
leaq 0x20(%r15), %rax
addq $0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x28fd5
movq $0x0, 0x18(%rsp)
leaq 0x10(%rsp), %rdx
movq %rbx, %rdi
movq 0x48(%rsp), %rsi
callq 0x362f8
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
je 0x2947d
leaq 0x8(%rbx), %rcx
movq %rcx, 0xe8(%rsp)
leaq 0xf8(%rsp), %r14
leaq 0x148(%rsp), %r13
xorl %edx, %edx
leaq 0x60(%rsp), %r15
leaq 0xc0(%rsp), %r12
leaq 0x28(%rsp), %rbp
movq $0x0, 0x8(%rsp)
movq %rdx, 0xe0(%rsp)
movq %rdx, %rcx
shlq $0x5, %rcx
leaq 0x70(%rsp), %rdx
movq %rdx, 0x60(%rsp)
movq (%rax,%rcx), %rsi
movq 0x8(%rax,%rcx), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x6a88
movq %rbx, %rdi
movq %r15, %rsi
callq 0x20440
movq %rax, 0x58(%rsp)
leaq 0xd0(%rsp), %rax
movq %rax, 0xc0(%rsp)
movq 0x60(%rsp), %rsi
movq 0x68(%rsp), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x6a88
movq 0x48(%rsp), %rdi
movq %r12, %rsi
callq 0x3dd56
movq %rdx, 0x50(%rsp)
movq %rax, %r12
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x290f9
movq 0xd0(%rsp), %rsi
incq %rsi
callq 0x32e0
cmpq 0x50(%rsp), %r12
je 0x29428
leaq 0x38(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x40(%r12), %rsi
movq 0x48(%r12), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0x6a88
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x223b8
cmpq 0xe8(%rsp), %rax
jne 0x293bf
leaq 0x10(%rsp), %rdi
movq %rbp, %rsi
callq 0x17a82
leaq 0xf0(%rsp), %rdi
callq 0x204bc
movq %rbx, %rbp
leaq 0xb0(%rsp), %rax
movq %rax, 0xa0(%rsp)
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
addq %rsi, %rdx
leaq 0xa0(%rsp), %rdi
callq 0x6a88
movq %r13, %rbx
movq %r14, %r13
movq 0x58(%rsp), %rax
movl 0x48(%rax), %r15d
movl 0x4c(%rax), %r14d
leaq 0x90(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x80(%rsp), %rdi
leaq 0x18ce1(%rip), %rdx     # 0x41e96
movq %rdx, %rsi
callq 0xb8a2
movq %r13, %rdi
leaq 0xa0(%rsp), %rsi
callq 0x3150
movl %r15d, 0x138(%rsp)
movl %r14d, 0x13c(%rsp)
leaq 0x118(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x3150
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x29217
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
movq %r13, %r14
je 0x2923f
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x32e0
movq %rbp, %rdi
leaq 0x28(%rsp), %rsi
callq 0x20440
movq %rax, %r15
movq %rbx, %r13
movb 0xf0(%rsp), %al
movb %al, (%r15)
leaq 0x8(%r15), %rdi
movq %r14, %rsi
callq 0x3150
leaq 0x28(%r15), %rdi
leaq 0x118(%rsp), %rsi
callq 0x3150
movb 0x48(%r14), %al
movb %al, 0x50(%r15)
movq 0x40(%r14), %rax
movq %rax, 0x48(%r15)
leaq 0x58(%r15), %rdi
movq %r13, %rsi
callq 0x20b88
leaq 0x70(%r15), %rdi
leaq 0x160(%rsp), %rsi
callq 0x20b88
leaq 0x88(%r15), %rdi
leaq 0x178(%rsp), %rsi
callq 0x21a40
movups 0xb0(%r14), %xmm0
movups %xmm0, 0xb8(%r15)
leaq 0xc8(%r15), %rdi
leaq 0x1b8(%rsp), %rsi
callq 0x20ef0
movups 0xd8(%r14), %xmm0
movups %xmm0, 0xe0(%r15)
movq %r15, %rdi
addq $0xf0, %rdi
leaq 0x1e0(%rsp), %rsi
callq 0x218ca
movl 0x108(%r14), %eax
movl %eax, 0x110(%r15)
movq 0x100(%r14), %rax
movq %rax, 0x108(%r15)
leaq 0x1e0(%rsp), %rdi
callq 0x1d4e6
movq 0x1b8(%rsp), %rdi
testq %rdi, %rdi
je 0x2934b
movq 0x1c8(%rsp), %rsi
subq %rdi, %rsi
callq 0x32e0
leaq 0x178(%rsp), %rdi
callq 0x1d582
leaq 0x160(%rsp), %rdi
callq 0x1d534
movq %r13, %rdi
callq 0x1d534
movq 0x118(%rsp), %rdi
leaq 0x128(%rsp), %rax
cmpq %rax, %rdi
movq %rbp, %rbx
je 0x29395
movq 0x128(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xf8(%rsp), %rdi
leaq 0x108(%rsp), %rax
cmpq %rax, %rdi
leaq 0x28(%rsp), %rbp
je 0x293bf
movq 0x108(%rsp), %rsi
incq %rsi
callq 0x32e0
movsd 0x80(%r12), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x20440
movq %rax, %rdi
movq 0x58(%rsp), %rsi
movsd 0x8(%rsp), %xmm0
xorl %edx, %edx
callq 0x2dd7c
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2940b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32e0
movq %r12, %rdi
callq 0x31f0
movq %rax, %r12
cmpq 0x50(%rsp), %rax
jne 0x29104
movb $0x1, %al
movq %rax, 0x8(%rsp)
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x29444
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xe0(%rsp), %rdx
incq %rdx
movq 0x10(%rsp), %rax
movq 0x18(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %rdx, %rcx
leaq 0x60(%rsp), %r15
leaq 0xc0(%rsp), %r12
ja 0x2905d
movq 0x8(%rsp), %rbx
jmp 0x2947f
xorl %ebx, %ebx
leaq 0x10(%rsp), %rdi
callq 0x611e
andb $0x1, %bl
movl %ebx, %eax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x294a2
movq %rax, %rbx
jmp 0x29589
jmp 0x29535
jmp 0x29535
movq %rax, %rbx
movq 0xc0(%rsp), %rdi
leaq 0xd0(%rsp), %rax
cmpq %rax, %rdi
je 0x2956d
movq 0xd0(%rsp), %rsi
jmp 0x29565
movq %rax, %rbx
jmp 0x2950e
jmp 0x2953c
jmp 0x2953c
movq %rax, %rbx
movq 0x80(%rsp), %rdi
leaq 0x90(%rsp), %rax
cmpq %rax, %rdi
je 0x2950e
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0xa0(%rsp), %rdi
leaq 0xb0(%rsp), %rax
cmpq %rax, %rdi
je 0x29544
movq 0xb0(%rsp), %rsi
incq %rsi
callq 0x32e0
jmp 0x29544
movq %rax, %rbx
jmp 0x2956d
jmp 0x2953c
movq %rax, %rbx
jmp 0x29551
movq %rax, %rbx
leaq 0xf0(%rsp), %rdi
callq 0x208b0
movq 0x28(%rsp), %rdi
leaq 0x38(%rsp), %rax
cmpq %rax, %rdi
je 0x2956d
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x60(%rsp), %rdi
leaq 0x70(%rsp), %rax
cmpq %rax, %rdi
je 0x29589
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x10(%rsp), %rdi
callq 0x611e
movq %rbx, %rdi
callq 0x3530
nop