// File: /workspace/github_cpp_makefile_star2_O2/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, %rbx
movq %rdi, %r14
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x3bdf(%rip), %rsi      # 0x32eb4
xorl %edx, %edx
callq 0x3190
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3090
leaq 0x3bc4(%rip), %rsi      # 0x32eb4
movq %r14, %rdi
xorl %edx, %edx
callq 0x3140
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3300
leaq 0x10(%rsp), %r15
leaq 0x50(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq %r12, %rdi
callq 0x3578
movq (%r15), %rdi
callq 0x3370
xorpd %xmm1, %xmm1
movapd %xmm0, %xmm2
cmpnlesd %xmm1, %xmm2
andpd %xmm2, %xmm0
movsd 0x3b5e(%rip), %xmm1     # 0x32ea8
andnpd %xmm1, %xmm2
orpd %xmm0, %xmm2
movlpd %xmm2, 0x40(%rbx)
leaq 0x3b56(%rip), %rsi      # 0x32eb4
movq %r14, %rdi
xorl %edx, %edx
callq 0x3140
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3090
leaq 0x3b38(%rip), %rsi      # 0x32eb4
movq %r14, %rdi
xorl %edx, %edx
callq 0x3190
movq %r14, %rdi
xorl %esi, %esi
movq %rax, %rdx
callq 0x3090
leaq 0x31e7(%rip), %rsi      # 0x32581
movq %r14, %rdi
xorl %edx, %edx
callq 0x3550
leaq 0x50(%rsp), %rdi
movq %r14, %rsi
xorl %edx, %edx
movq %rax, %rcx
callq 0x3300
leaq 0x10(%rsp), %r15
leaq 0x50(%rsp), %r12
movq %r15, %rdi
movq %r12, %rsi
callq 0x3360
movq %r12, %rdi
callq 0x3578
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3170
leaq 0x319c(%rip), %rsi      # 0x32581
movq %r14, %rdi
xorl %edx, %edx
callq 0x3550
leaq 0x5(%rax), %rdx
movq %r14, %rdi
xorl %esi, %esi
callq 0x3090
leaq 0x20(%rbx), %r15
leaq 0x3aae(%rip), %rsi      # 0x32eb6
movq %r15, %rdi
callq 0x3530
leaq 0x50(%rsp), %rdi
pushq $0x18
popq %rdx
movq %r14, %rsi
callq 0x3460
leaq 0x3a8f(%rip), %r14      # 0x32eb6
leaq 0x30(%rsp), %r12
leaq 0xf(%rsp), %r13
leaq 0x50(%rsp), %rbp
movq 0x50(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x70(%rsp,%rax)
jne 0x2f4a3
movq %r12, %rdi
movq %r14, %rsi
movq %r13, %rdx
callq 0x9f86
movq %rbp, %rdi
movq %r12, %rsi
callq 0x3380
movq %r12, %rdi
movq %r14, %rsi
callq 0x57b9
testb %al, %al
jne 0x2f499
cmpq $0x0, 0x28(%rbx)
je 0x2f484
movq %r15, %rdi
leaq 0x3a33(%rip), %rsi      # 0x32eb2
callq 0x3520
movq %r15, %rdi
movq %r12, %rsi
callq 0x3540
movq %r12, %rdi
callq 0x3578
jmp 0x2f436
leaq 0x30(%rsp), %rdi
callq 0x3578
leaq 0x50(%rsp), %rdi
callq 0x3260
leaq 0x10(%rsp), %rdi
callq 0x3578
movb $0x1, %al
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f4d1
jmp 0x2f4d1
jmp 0x2f4d1
movq %rax, %rbx
jmp 0x2f4f2
movq %rax, %rbx
jmp 0x2f4e8
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x3578
leaq 0x50(%rsp), %rdi
callq 0x3260
leaq 0x10(%rsp), %rdi
callq 0x3578
movq %rbx, %rdi
callq 0x34f0