// File: matteorr[P]EarleyParser/EarleyParser.cpp
// Function: EarleyParser::returnParsingTrees(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
vector<Node*>* EarleyParser::returnParsingTrees( string mainNonTerminal )
{

	for( vector<State*>::iterator it = this->earleyParserChart[ this->inputVector.size() ].begin();
			it != this->earleyParserChart[ this->inputVector.size() ].end(); it++ )
	{
		if( (*it)->getNonTerminal() == mainNonTerminal && (*it)->getProductionProgress() == (*it)->getProductionPointer()->getProductionContent().size() )
		{
			State* stateBookmark = (*it);
			Node* rootOfParsingTree;

			if( this->probabilityParser == true )
			{
				rootOfParsingTree =
						new Node(
								NULL,
								stateBookmark->getNonTerminal(),
								stateBookmark->getProductionPointer()->getProductionContent(),
								stateBookmark->getProductionPointer(),
								stateBookmark->getProductionPointer()->getProductionProbability()
							);
			}else{

				rootOfParsingTree =
						new Node(
								NULL,
								stateBookmark->getNonTerminal(),
								stateBookmark->getProductionPointer()->getProductionContent(),
								stateBookmark->getProductionPointer(),
								-1
							);
			}

			vector<State*>* test;
			State* test2;
			test2 = rootOfParsingTree->expandNode( stateBookmark, & this->earleyProductions );
			cout << endl << "finished expanding - " << test2->getNonTerminal() << endl;

			this->returnVector.push_back( rootOfParsingTree );
		}
	}

	return & this->returnVector;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1d0, %rsp            # imm = 0x1D0
movq %rsi, -0x150(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x148(%rbp)
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x140(%rbp)
addq $0x98, %rdi
callq 0x6c90
movq -0x140(%rbp), %rdi
movq %rax, %rsi
callq 0x7990
movq %rax, %rdi
callq 0x6d00
movq %rax, -0x18(%rbp)
movq -0x148(%rbp), %rdi
movq %rdi, %rax
addq $0x80, %rax
movq %rax, -0x158(%rbp)
addq $0x98, %rdi
callq 0x6c90
movq -0x158(%rbp), %rdi
movq %rax, %rsi
callq 0x7990
movq %rax, %rdi
callq 0x6d70
movq %rax, -0x20(%rbp)
leaq -0x18(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x6d30
testb $0x1, %al
jne 0x6020
jmp 0x6495
leaq -0x18(%rbp), %rdi
callq 0x6da0
movq (%rax), %rsi
leaq -0x40(%rbp), %rdi
callq 0x116a0
movq -0x150(%rbp), %rsi
leaq -0x40(%rbp), %rdi
callq 0x7a80
movb %al, %cl
movb $0x0, -0x69(%rbp)
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x159(%rbp)
jne 0x605a
jmp 0x60d1
leaq -0x18(%rbp), %rdi
callq 0x6da0
movq (%rax), %rdi
callq 0x11730
movl %eax, -0x160(%rbp)
jmp 0x6073
movl -0x160(%rbp), %eax
cltq
movq %rax, -0x170(%rbp)
leaq -0x18(%rbp), %rdi
callq 0x6da0
movq (%rax), %rdi
callq 0x116d0
movq %rax, -0x168(%rbp)
jmp 0x609c
movq -0x168(%rbp), %rsi
leaq -0x68(%rbp), %rdi
callq 0x114b0
jmp 0x60ae
movb $0x1, -0x69(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x6c90
movq %rax, %rcx
movq -0x170(%rbp), %rax
cmpq %rcx, %rax
sete %al
movb %al, -0x159(%rbp)
movb -0x159(%rbp), %al
movb %al, -0x171(%rbp)
testb $0x1, -0x69(%rbp)
jne 0x60e5
jmp 0x60ee
leaq -0x68(%rbp), %rdi
callq 0x6f60
leaq -0x40(%rbp), %rdi
callq 0x2140
movb -0x171(%rbp), %al
testb $0x1, %al
jne 0x6106
jmp 0x647c
leaq -0x18(%rbp), %rdi
callq 0x6da0
movq %rax, %rcx
movq -0x148(%rbp), %rax
movq (%rcx), %rcx
movq %rcx, -0x78(%rbp)
movb 0x8(%rax), %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x1, %eax
jne 0x6290
movl $0x70, %edi
callq 0x21d0
movq %rax, -0x180(%rbp)
movb $0x1, -0xb9(%rbp)
movq -0x78(%rbp), %rsi
leaq -0xa0(%rbp), %rdi
callq 0x116a0
jmp 0x615b
movq -0x78(%rbp), %rdi
callq 0x116d0
movq %rax, -0x188(%rbp)
jmp 0x616d
movq -0x188(%rbp), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x114b0
jmp 0x6182
movq -0x78(%rbp), %rdi
callq 0x116d0
movq %rax, -0x190(%rbp)
jmp 0x6194
movq -0x78(%rbp), %rdi
callq 0x116d0
movq %rax, -0x198(%rbp)
jmp 0x61a6
movq -0x198(%rbp), %rdi
callq 0x11500
movss %xmm0, -0x19c(%rbp)
jmp 0x61bc
movss -0x19c(%rbp), %xmm0
movq -0x190(%rbp), %r8
movq -0x180(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0xa0(%rbp), %rdx
leaq -0xb8(%rbp), %rcx
callq 0xe870
jmp 0x61eb
movq -0x180(%rbp), %rax
movb $0x0, -0xb9(%rbp)
movq %rax, -0x80(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x6f60
leaq -0xa0(%rbp), %rdi
callq 0x2140
jmp 0x63aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x2140
jmp 0x64ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6274
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6268
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x6f60
leaq -0xa0(%rbp), %rdi
callq 0x2140
testb $0x1, -0xb9(%rbp)
jne 0x627f
jmp 0x628b
movq -0x180(%rbp), %rdi
callq 0x21b0
jmp 0x64ab
movl $0x70, %edi
callq 0x21d0
movq %rax, -0x1a8(%rbp)
movb $0x1, -0xf9(%rbp)
movq -0x78(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
callq 0x116a0
jmp 0x62ba
movq -0x78(%rbp), %rdi
callq 0x116d0
movq %rax, -0x1b0(%rbp)
jmp 0x62cc
movq -0x1b0(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x114b0
jmp 0x62e1
movq -0x78(%rbp), %rdi
callq 0x116d0
movq %rax, -0x1b8(%rbp)
jmp 0x62f3
movq -0x1b8(%rbp), %r8
movq -0x1a8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0xe0(%rbp), %rdx
leaq -0xf8(%rbp), %rcx
movss 0xcced(%rip), %xmm0     # 0x13008
callq 0xe870
jmp 0x6322
movq -0x1a8(%rbp), %rax
movb $0x0, -0xf9(%rbp)
movq %rax, -0x80(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x6f60
leaq -0xe0(%rbp), %rdi
callq 0x2140
jmp 0x63aa
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x638e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x6382
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x6f60
leaq -0xe0(%rbp), %rdi
callq 0x2140
testb $0x1, -0xf9(%rbp)
jne 0x6399
jmp 0x63a5
movq -0x1a8(%rbp), %rdi
callq 0x21b0
jmp 0x64ab
movq -0x148(%rbp), %rdx
movq -0x80(%rbp), %rdi
movq -0x78(%rbp), %rsi
addq $0x10, %rdx
callq 0xea70
movq %rax, -0x110(%rbp)
movq 0x15c08(%rip), %rdi     # 0x1bfd8
movq 0x15bf1(%rip), %rsi     # 0x1bfc8
callq 0x21f0
movq %rax, %rdi
leaq 0xd0df(%rip), %rsi      # 0x134c5
callq 0x21c0
movq %rax, -0x1d0(%rbp)
movq -0x110(%rbp), %rsi
leaq -0x130(%rbp), %rdi
movq %rdi, -0x1c8(%rbp)
callq 0x116a0
movq -0x1d0(%rbp), %rdi
movq -0x1c8(%rbp), %rsi
callq 0x21a0
movq %rax, -0x1c0(%rbp)
jmp 0x6428
movq -0x1c0(%rbp), %rdi
movq 0x15b92(%rip), %rsi     # 0x1bfc8
callq 0x21f0
jmp 0x643d
leaq -0x130(%rbp), %rdi
callq 0x2140
movq -0x148(%rbp), %rdi
addq $0xb0, %rdi
leaq -0x80(%rbp), %rsi
callq 0x7b80
jmp 0x647c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x2140
jmp 0x64ab
jmp 0x647e
leaq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0x6dc0
movq %rax, -0x138(%rbp)
jmp 0x5fcc
movq -0x148(%rbp), %rax
addq $0xb0, %rax
addq $0x1d0, %rsp            # imm = 0x1D0
popq %rbp
retq
movq -0x48(%rbp), %rdi
callq 0x2340
nopw %cs:(%rax,%rax)