// File: /workspace/github_cpp_makefile_star2_O1/neubig[P]egret/Egret/src/Rule.cpp
// Function: string2rule(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&, Rule&)
bool string2rule(string& str, Rule& rule)
{
	string temp;
	str.erase(0,str.find_first_not_of(" \t"));
	temp=str.substr(0,str.find_first_of(" \t"));
	//jout<<temp<<endl;
	rule.prob=atof(temp.c_str());
	if(rule.prob<=0)rule.prob=0.000001;
	str.erase(0,str.find_first_of(" \t"));
	str.erase(0,str.find_first_not_of(" \t"));
	temp=str.substr(0,str.find(" --> "));
	rule.left=temp;
	//jout<<rule.left<<endl;
	str.erase(0,str.find(" --> ")+5);
	rule.right="";
	stringstream ss(str);
	while(!ss.eof())
	{
		string wrd="";
		ss>>wrd;
		if(wrd=="")break;
		if(rule.right.length()>0)
			rule.right+=" ";
		rule.right+=wrd;
	}

	return true;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, 0x8(%rsp)
movq %rdi, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x48ae(%rip), %rsi      # 0x41e94
movl $0x2, %ecx
xorl %edx, %edx
callq 0x34e0
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3090
leaq 0x488e(%rip), %rsi      # 0x41e94
movl $0x2, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3420
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3300
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %r15
movq %r15, %rsi
callq 0x3380
movq (%r15), %rdi
leaq 0x60(%rsp), %r12
cmpq %r12, %rdi
je 0x3d653
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x10(%rsp), %rdi
callq 0x3390
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpnlesd %xmm1, %xmm2
andpd %xmm2, %xmm0
movsd 0x4812(%rip), %xmm1     # 0x41e88
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movq 0x8(%rsp), %rax
movlpd %xmm2, 0x40(%rax)
leaq 0x4805(%rip), %rsi      # 0x41e94
movl $0x2, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3420
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3090
leaq 0x47e2(%rip), %rsi      # 0x41e94
movl $0x2, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x34e0
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3090
leaq 0x3ea3(%rip), %rsi      # 0x41578
movl $0x5, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3510
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3300
leaq 0x10(%rsp), %rdi
leaq 0x50(%rsp), %r15
movq %r15, %rsi
callq 0x3380
movq (%r15), %rdi
cmpq %r12, %rdi
je 0x3d71d
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x32e0
leaq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdi
callq 0x3150
leaq 0x3e45(%rip), %rsi      # 0x41578
movl $0x5, %ecx
movq %r14, %rdi
xorl %edx, %edx
callq 0x3510
leaq 0x5(%rax), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3090
movq 0x8(%rsp), %rax
leaq 0x20(%rax), %r15
movq 0x28(%rax), %rdx
leaq 0x4732(%rip), %rcx      # 0x41e96
movq %r15, %rdi
xorl %esi, %esi
xorl %r8d, %r8d
callq 0x3440
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
movl $0x18, %edx
callq 0x3480
leaq 0x40(%rsp), %rbx
leaq 0x4707(%rip), %r14      # 0x41e96
leaq 0x30(%rsp), %r12
leaq 0x50(%rsp), %r13
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x70(%rsp,%rax)
jne 0x3d824
movq %rbx, 0x30(%rsp)
movq %r12, %rdi
movq %r14, %rsi
movq %r14, %rdx
callq 0xb8a2
movq %r13, %rdi
movq %r12, %rsi
callq 0x33a0
movq %r12, %rdi
movq %r14, %rsi
callq 0x30c0
movl %eax, %ebp
testl %eax, %eax
je 0x3d805
movq 0x8(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x3d7f3
movq %r15, %rdi
leaq 0x46a4(%rip), %rsi      # 0x41e92
callq 0x3570
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq %r15, %rdi
callq 0x30d0
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3d81c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32e0
testl %ebp, %ebp
jne 0x3d799
movq 0x1877d(%rip), %rsi     # 0x55fa8
leaq 0x50(%rsp), %rdi
callq 0x3230
leaq 0xd0(%rsp), %rdi
callq 0x30e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3d85e
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32e0
movb $0x1, %al
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3d878
jmp 0x3d878
jmp 0x3d878
movq %rax, %r14
jmp 0x3d8ba
movq %rax, %r14
jmp 0x3d89c
movq %rax, %r14
movq 0x30(%rsp), %rdi
cmpq %rbx, %rdi
je 0x3d89c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x32e0
movq 0x18705(%rip), %rsi     # 0x55fa8
leaq 0x50(%rsp), %rdi
callq 0x3230
leaq 0xd0(%rsp), %rdi
callq 0x30e0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x3d8d6
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x32e0
movq %r14, %rdi
callq 0x3530
nop