// File: kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::make_string_rule(xbytes::rule&)
void xbytes::make_string_rule(rule& r)
{
	r.str_rule.clear();

	r.str_rule = r.left->name;
	if(r.left_alias.size() > 0)
	{
		r.str_rule += "(" + r.left_alias + ")";
	}
	r.str_rule += " ->";
	
	assert(r.rights.size() == r.right_alias.size());

	for(int j = 0; j < r.rights.size(); ++j)
	{
		r.str_rule += " " + r.rights[j]->name;
		if(r.right_alias[j].size() > 0)
		{
			r.str_rule += "(" + r.right_alias[j] + ")";
		}
	}
	r.str_rule += ".";
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xf0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0x33e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
addq $0x8, %rsi
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
callq 0x3030
movq -0x10(%rbp), %rdi
addq $0x10, %rdi
callq 0x3200
cmpq $0x0, %rax
jbe 0x9cf6
movq -0x10(%rbp), %rdx
addq $0x10, %rdx
leaq 0xf8aa(%rip), %rsi      # 0x1951f
leaq -0x50(%rbp), %rdi
movq %rdi, -0xc8(%rbp)
callq 0xd430
movq -0xc8(%rbp), %rsi
leaq 0xf7df(%rip), %rdx      # 0x19472
leaq -0x30(%rbp), %rdi
callq 0xd3e0
jmp 0x9c9e
movq -0x10(%rbp), %rdi
subq $-0x80, %rdi
leaq -0x30(%rbp), %rsi
callq 0x33c0
jmp 0x9cb1
leaq -0x30(%rbp), %rdi
callq 0x31b0
leaq -0x50(%rbp), %rdi
callq 0x31b0
jmp 0x9cf6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x9ce8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x31b0
leaq -0x50(%rbp), %rdi
callq 0x31b0
jmp 0x9ef6
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0xf819(%rip), %rsi      # 0x19521
callq 0x32c0
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0xc4d0
movq %rax, -0xd0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
callq 0xd540
movq %rax, %rcx
movq -0xd0(%rbp), %rax
cmpq %rcx, %rax
jne 0x9d3f
jmp 0x9d5e
leaq 0xf7df(%rip), %rdi      # 0x19525
leaq 0xf44b(%rip), %rsi      # 0x19198
movl $0x4a0, %edx            # imm = 0x4A0
leaq 0xf7f4(%rip), %rcx      # 0x1954d
callq 0x31d0
movl $0x0, -0x60(%rbp)
movslq -0x60(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
callq 0xc4d0
movq %rax, %rcx
movq -0xd8(%rbp), %rax
cmpq %rcx, %rax
jae 0x9ed6
movq -0x10(%rbp), %rdi
addq $0x30, %rdi
movslq -0x60(%rbp), %rsi
callq 0xc4f0
movq (%rax), %rdx
addq $0x8, %rdx
leaq 0xf816(%rip), %rsi      # 0x195c5
leaq -0x80(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0xd430
movq -0xe0(%rbp), %rsi
movq -0x10(%rbp), %rdi
subq $-0x80, %rdi
callq 0x33c0
jmp 0x9dd5
leaq -0x80(%rbp), %rdi
callq 0x31b0
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
movslq -0x60(%rbp), %rsi
callq 0xd560
movq %rax, %rdi
callq 0x3200
cmpq $0x0, %rax
jbe 0x9ec6
movq -0x10(%rbp), %rdi
addq $0x48, %rdi
movslq -0x60(%rbp), %rsi
callq 0xd560
movq %rax, %rdx
leaq 0xf703(%rip), %rsi      # 0x1951f
leaq -0xc0(%rbp), %rdi
movq %rdi, -0xe8(%rbp)
callq 0xd430
movq -0xe8(%rbp), %rsi
leaq 0xf635(%rip), %rdx      # 0x19472
leaq -0xa0(%rbp), %rdi
callq 0xd3e0
jmp 0x9e4b
movq -0x10(%rbp), %rdi
subq $-0x80, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x33c0
jmp 0x9e61
leaq -0xa0(%rbp), %rdi
callq 0x31b0
leaq -0xc0(%rbp), %rdi
callq 0x31b0
jmp 0x9ec6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x31b0
jmp 0x9ef6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x9eb8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x31b0
leaq -0xc0(%rbp), %rdi
callq 0x31b0
jmp 0x9ef6
jmp 0x9ec8
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x9d65
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
leaq 0xf209(%rip), %rsi      # 0x190f1
callq 0x32c0
addq $0xf0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x34e0
nop