// File: /workspace/github_cpp_makefile_star2_O3/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 0x8725(%rip), %r14      # 0x10fd8
leaq 0x4e05(%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 0x8cc4
xorl %ebx, %ebx
movq (%rax,%rbx,8), %r15
movl $0x6, %edx
movq %r14, %rdi
leaq 0x4dcd(%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 0x485a(%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 0x8bb1
xorl %ebx, %ebx
movq %r15, -0x50(%rbp)
movq %r14, %r13
movq (%rax,%rbx,8), %rax
movq %rbx, %r14
movq (%rax), %rbx
movl 0x8(%rax), %eax
movq %rax, -0x58(%rbp)
leaq -0x68(%rbp), %rax
movq %rax, -0x78(%rbp)
leaq -0x78(%rbp), %rdi
leaq 0x4cab(%rip), %rdx      # 0xd650
movq %rdx, %rsi
callq 0x375a
movq 0x8(%r15), %rax
movq %r14, %r12
movq (%rax,%r14,8), %rcx
movq 0x10(%rcx), %rax
cmpq %rax, 0x18(%rcx)
je 0x8a48
xorl %r14d, %r14d
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 0xafea
movq %r15, %rdi
leaq 0x4e21(%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 0x8a25
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3260
incq %r14
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax,%r12,8), %rcx
movq 0x10(%rcx), %rax
movq 0x18(%rcx), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %r14, %rcx
ja 0x89c9
movl $0x1, %edx
movq %r13, %r14
movq %r13, %rdi
leaq 0x4bf5(%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 0x4c67(%rip), %rsi      # 0xd6e9
callq 0x32b0
movq 0x38(%rbx), %rax
cmpq 0x30(%rbx), %rax
je 0x8af3
xorl %r14d, %r14d
cmpq %r14, -0x58(%rbp)
movq %r13, %r15
jne 0x8ab1
movl $0x1, %edx
movq %r15, %rdi
leaq 0x4d68(%rip), %rsi      # 0xd814
callq 0x32b0
movl $0x1, %edx
movq %r15, %rdi
leaq 0x4b15(%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 0x8a94
jmp 0x8af6
xorl %r14d, %r14d
cmpl -0x58(%rbp), %r14d
movq %r13, %r14
movq %r12, %rbx
jne 0x8b16
movl $0x1, %edx
movq %r14, %rdi
leaq 0x4d03(%rip), %rsi      # 0xd814
callq 0x32b0
movl $0x2, %edx
movq %r14, %rdi
leaq 0x4b4b(%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 0x4a8c(%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 0x8b92
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3260
incq %rbx
movq -0x50(%rbp), %r15
movq 0x8(%r15), %rax
movq 0x10(%r15), %rcx
subq %rax, %rcx
sarq $0x3, %rcx
cmpq %rbx, %rcx
ja 0x897e
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 0x4b04(%rip), %rbx      # 0xd6ee
je 0x8c77
movl $0x1, %edx
movq %r14, %rdi
leaq 0x4a50(%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 0x8bf0
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 0x8902
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x8cf9
jmp 0x8cf9
jmp 0x8cd9
movq %rax, %rbx
movq -0x48(%rbp), %rdi
leaq -0x38(%rbp), %rax
cmpq %rax, %rdi
je 0x8cfc
movq -0x38(%rbp), %rsi
incq %rsi
callq 0x3260
jmp 0x8cfc
jmp 0x8cf9
movq %rax, %rbx
movq -0x78(%rbp), %rdi
leaq -0x68(%rbp), %rax
cmpq %rax, %rdi
je 0x8d15
movq -0x68(%rbp), %rsi
incq %rsi
callq 0x3260
movq %rbx, %rdi
callq 0x33d0
nop