// File: /workspace/github_cpp_makefile_star2_O1/kiven-li[P]xbytes/xbytes.cpp
// Function: xbytes::xbytes::dump_lr_state()
void xbytes::dump_lr_state()
{
	std::cout << "==============LR STATE============" << std::endl;
	for(int i = 0; i < states.size(); ++i)
	{
		lr_state* ls = states[i];
		std::cout << "STATE " << i << ":" << std::endl;
		for(int j = 0; j < ls->terms.size(); ++j)
		{
			rule* r = ls->terms[j]->r;
			int dot = ls->terms[j]->dot;
			string forwards = "";
			for(int m = 0; m < ls->terms[j]->forwards.size(); ++m)
			{
				forwards += ls->terms[j]->forwards[m]->name + ",";
			}
			std::cout << "	" << r->left->name << " -> ";
			int m = 0;
			for(m = 0; m < r->rights.size(); ++m)
			{
				if(m == dot) std::cout << "*";
				std::cout << " " << r->rights[m]->name; 
			}
			if(m == dot) std::cout << "*";
			std::cout << "	[" << forwards << "]" << std::endl;
		}
		std::cout << std::endl;
		for(goto_map::iterator it = ls->gotomap.begin(); it != ls->gotomap.end(); ++it)
		{
			std::cout << "	" << it->first->name << " GOTO " << it->second << std::endl;
		}
		std::cout << std::endl;		
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdi, %rbx
movq 0x86e3(%rip), %r14      # 0x10fd8
leaq 0x4dc3(%rip), %rsi      # 0xd6bf
movl $0x22, %edx
movq %r14, %rdi
callq 0x32b0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x38(%rbx), %rax
movq %rbx, -0x80(%rbp)
cmpq %rax, 0x40(%rbx)
je 0x8d0b
xorl %ebx, %ebx
movq (%rax,%rbx,8), %r15
movl $0x6, %edx
movq %r14, %rdi
leaq 0x4d8b(%rip), %rsi      # 0xd6e2
callq 0x32b0
movq %r14, %rdi
movq %rbx, -0x88(%rbp)
movl %ebx, %esi
callq 0x33b0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4818(%rip), %rsi      # 0xd197
callq 0x32b0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x8(%r15), %rax
cmpq %rax, 0x10(%r15)
je 0x8bf8
xorl %r13d, %r13d
movq %r15, -0x50(%rbp)
movq %r14, %r12
movq (%rax,%r13,8), %rax
movq (%rax), %rbx
movl 0x8(%rax), %eax
movq %rax, -0x58(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rdi
leaq 0x4c6b(%rip), %rdx      # 0xd650
movq %rdx, %rsi
callq 0x376a
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x18(%rax), %rcx
cmpq 0x10(%rax), %rcx
je 0x8a92
xorl %r14d, %r14d
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x10(%rax), %rax
movq (%rax,%r14,8), %rax
leaq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
addq %rsi, %rdx
leaq -0x48(%rbp), %r15
movq %r15, %rdi
callq 0xaf8a
movq %r15, %rdi
leaq 0x4dd8(%rip), %rsi      # 0xd817
callq 0x3400
movq -0x48(%rbp), %rsi
movq -0x40(%rbp), %rdx
leaq -0x78(%rbp), %rdi
callq 0x30b0
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8a6e
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3260
incq %r14
movq -0x50(%rbp), %r15
movq 0x8(%r15), %rax
movq (%rax,%r13,8), %rax
movq 0x18(%rax), %rcx
subq 0x10(%rax), %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x8a06
movl $0x1, %edx
movq %r12, %r14
movq %r12, %rdi
leaq 0x4bab(%rip), %rsi      # 0xd64f
callq 0x32b0
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r14, %rdi
callq 0x32b0
movl $0x4, %edx
movq %rax, %rdi
leaq 0x4c1d(%rip), %rsi      # 0xd6e9
callq 0x32b0
movq 0x38(%rbx), %rax
cmpq 0x30(%rbx), %rax
je 0x8b3d
xorl %r14d, %r14d
cmpq %r14, -0x58(%rbp)
movq %r12, %r15
jne 0x8afb
movl $0x1, %edx
movq %r15, %rdi
leaq 0x4d1e(%rip), %rsi      # 0xd814
callq 0x32b0
movl $0x1, %edx
movq %r15, %rdi
leaq 0x4acb(%rip), %rsi      # 0xd5d5
callq 0x32b0
movq 0x30(%rbx), %rax
movq (%rax,%r14,8), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r15, %rdi
callq 0x32b0
incq %r14
movq 0x38(%rbx), %rax
subq 0x30(%rbx), %rax
sarq $0x3, %rax
cmpq %r14, %rax
ja 0x8ade
jmp 0x8b40
xorl %r14d, %r14d
cmpl -0x58(%rbp), %r14d
movq %r12, %r14
jne 0x8b5d
movl $0x1, %edx
movq %r14, %rdi
leaq 0x4cbc(%rip), %rsi      # 0xd814
callq 0x32b0
movl $0x2, %edx
movq %r14, %rdi
leaq 0x4b04(%rip), %rsi      # 0xd670
callq 0x32b0
movq -0x78(%rbp), %rsi
movq -0x70(%rbp), %rdx
movq %r14, %rdi
callq 0x32b0
movq %rax, %r12
movl $0x1, %edx
movq %rax, %rdi
leaq 0x4a45(%rip), %rsi      # 0xd5d8
callq 0x32b0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r12, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x8bd9
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3260
incq %r13
movq -0x50(%rbp), %r15
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r13, %rcx
ja 0x89c1
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq 0x38(%r15), %r12
addq $0x28, %r15
cmpq %r15, %r12
leaq 0x4abd(%rip), %rbx      # 0xd6ee
je 0x8cbe
movl $0x1, %edx
movq %r14, %rdi
leaq 0x4a09(%rip), %rsi      # 0xd64f
callq 0x32b0
movq 0x20(%r12), %rax
movq 0x8(%rax), %rsi
movq 0x10(%rax), %rdx
movq %r14, %rdi
callq 0x32b0
movq %rax, %r13
movl $0x6, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0x32b0
movl 0x28(%r12), %esi
movq %r13, %rdi
callq 0x33b0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r13, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq %r12, %rdi
callq 0x3180
movq %rax, %r12
cmpq %r15, %rax
jne 0x8c37
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x3230
movsbl %al, %esi
movq %r14, %rdi
callq 0x3030
movq %rax, %rdi
callq 0x3170
movq -0x88(%rbp), %rbx
incq %rbx
movq -0x80(%rbp), %rcx
movq 0x38(%rcx), %rax
movq 0x40(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
ja 0x8944
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8d40
jmp 0x8d40
jmp 0x8d20
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8d43
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3260
jmp 0x8d43
jmp 0x8d40
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x8d5c
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x33d0