// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/Token.cpp
// Function: tableStringFromTokens(std::vector<std::shared_ptr<TokenData>, std::allocator<std::shared_ptr<TokenData>>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string tableStringFromTokens(const vector<Token>& tokens, string tableName)
{
	/*string out="Name\tType\n";
	
	for (unsigned i=0; i<tokens.size(); ++i)
	{
		out+=replaceSubstring(tokens[i]->getText(), "\n", "\\n") + "\t";
		
		out+=tokens[i]->getTypeDescription();
		
		if (i<tokens.size()-1)
			out+="\n";
	}
	
	return putStringInTable(out, tableName);*/
	
	vector<string> lines;
	string abv="", blw="";
	string str="";
	//const int tabSize=1;
	const int maxWidth=240;
	const string seporator="    ";
	//const string seporator="   |   ";
	
	for (unsigned i=0; i<tokens.size(); ++i)
	{
		//string next=" | ";
		
		//for (int j=0; j<int(tabSize-str.size()%tabSize); j++)
		//	next+=" ";
		
		//next+=tokens[i]->getText();
		
		if (i>0 && str.size()+seporator.size()+tokens[i]->getText().size()<maxWidth)
		{
			abv+=seporator;
			str+=seporator;
			blw+=seporator;
			
			for (unsigned j=0; j<tokens[i]->getText().size(); j++)
			{
				abv+=" ";
				blw+=" ";
			}
			
			str+=tokens[i]->getText();
		}
		else
		{
			if (i>0)
			{
				lines.push_back(abv);
				lines.push_back(str);
				lines.push_back(blw);
				lines.push_back("");
				abv="";
				blw="";
			}
			
			for (unsigned j=0; j<tokens[i]->getText().size(); j++)
			{
				abv+=" ";
				blw+=" ";
			}
			
			str=tokens[i]->getText();
		}
	}
	
	lines.push_back(abv);
	lines.push_back(str);
	lines.push_back(blw);
	
	return lineListToBoxedString(lines, tableName, -1, false, maxWidth+4);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
leaq 0x88(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x230fd(%rip), %rdx     # 0x77a4f
leaq 0x78(%rsp), %rdi
movq %rdx, %rsi
callq 0xdfa8
leaq 0x68(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x230e0(%rip), %rdx     # 0x77a4f
leaq 0x58(%rsp), %rdi
movq %rdx, %rsi
callq 0xdfa8
leaq 0xa8(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x230c0(%rip), %rdx     # 0x77a4f
leaq 0x98(%rsp), %rdi
movq %rdx, %rsi
callq 0xdfa8
movq %r14, 0xc0(%rsp)
movq %rbx, 0xb8(%rsp)
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
leaq 0x230da(%rip), %rsi     # 0x77a99
leaq 0x230d7(%rip), %rdx     # 0x77a9d
leaq 0x38(%rsp), %rdi
callq 0xdfa8
movq (%r15), %rax
cmpq %rax, 0x8(%r15)
je 0x54c93
leaq 0x10(%rsp), %r14
xorl %ebp, %ebp
movq %rsp, %r12
leaq 0x230ae(%rip), %r13     # 0x77a9c
xorl %edx, %edx
movq %rdx, 0xd0(%rsp)
testl %edx, %edx
je 0x54b9b
movq 0xa0(%rsp), %rcx
movq %rcx, 0xc8(%rsp)
movq %r12, %rdi
movq 0x40(%rsp), %r12
movq %rbp, %rbx
shlq $0x4, %rbx
movq (%rax,%rbx), %rax
movq %r14, (%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
callq 0xde0c
addq 0xc8(%rsp), %r12
addq 0x8(%rsp), %r12
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x54a51
callq 0xa2b0
cmpq $0xef, %r12
ja 0x54afe
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x78(%rsp), %rdi
callq 0xa110
movq %rsp, %r12
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0xa110
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
leaq 0x58(%rsp), %rdi
callq 0xa110
xorl %ebp, %ebp
movq (%r15), %rax
movq (%rax,%rbx), %rax
movq %r14, (%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xde0c
movq (%rsp), %rdi
movq 0x8(%rsp), %r12
cmpq %r14, %rdi
je 0x54ad2
callq 0xa2b0
movl %ebp, %eax
cmpq %rax, %r12
jbe 0x54c2b
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0xa560
movq %rsp, %r12
leaq 0x58(%rsp), %rdi
movq %r13, %rsi
callq 0xa560
incl %ebp
jmp 0x54aa2
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x1e768
movq %rsp, %r12
leaq 0x20(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1e768
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1e768
movq %r14, (%rsp)
movq %r12, %rdi
leaq 0x22f10(%rip), %rdx     # 0x77a4f
movq %rdx, %rsi
callq 0xdfa8
leaq 0x20(%rsp), %rdi
movq %r12, %rsi
callq 0x17280
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x54b62
callq 0xa2b0
movq 0x80(%rsp), %rdx
leaq 0x78(%rsp), %rdi
xorl %esi, %esi
leaq 0x22ed7(%rip), %rcx     # 0x77a4f
xorl %r8d, %r8d
callq 0xa470
movq 0x60(%rsp), %rdx
leaq 0x58(%rsp), %rdi
xorl %esi, %esi
leaq 0x22ebc(%rip), %rcx     # 0x77a4f
xorl %r8d, %r8d
callq 0xa470
xorl %ebx, %ebx
shlq $0x4, %rbp
movq (%r15), %rax
movq (%rax,%rbp), %rax
movq %r14, (%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0xde0c
movq (%rsp), %rdi
movq 0x8(%rsp), %r12
cmpq %r14, %rdi
je 0x54bd1
callq 0xa2b0
movl %ebx, %eax
cmpq %rax, %r12
jbe 0x54bf9
leaq 0x78(%rsp), %rdi
movq %r13, %rsi
callq 0xa560
movq %rsp, %r12
leaq 0x58(%rsp), %rdi
movq %r13, %rsi
callq 0xa560
incl %ebx
jmp 0x54ba1
movq (%r15), %rax
movq (%rax,%rbp), %rax
movq %r14, (%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0xde0c
leaq 0x98(%rsp), %rdi
movq %r12, %rsi
callq 0xa370
jmp 0x54c61
movq (%r15), %rax
movq (%rax,%rbx), %rax
movq %r14, (%rsp)
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
movq %rsp, %r12
movq %r12, %rdi
callq 0xde0c
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
leaq 0x98(%rsp), %rdi
callq 0xa110
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x54c6f
callq 0xa2b0
movq 0xd0(%rsp), %rdx
incl %edx
movq (%r15), %rax
movq 0x8(%r15), %rcx
subq %rax, %rcx
sarq $0x4, %rcx
movq %rdx, %rbp
cmpq %rdx, %rcx
ja 0x549f0
leaq 0x20(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0x1e768
leaq 0x20(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1e768
leaq 0x20(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x1e768
leaq 0xe8(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0xc0(%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0xd8(%rsp), %rdi
callq 0xde0c
leaq 0x20(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
movq 0xb8(%rsp), %rbx
movq %rbx, %rdi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
movl $0xf4, %r9d
callq 0x5bd00
movq 0xd8(%rsp), %rdi
cmpq %r14, %rdi
je 0x54d2b
callq 0xa2b0
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x54d3f
callq 0xa2b0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x54d59
callq 0xa2b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x54d6d
callq 0xa2b0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x54d84
callq 0xa2b0
leaq 0x20(%rsp), %rdi
callq 0x14adc
movq %rbx, %rax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0xd8(%rsp), %rdi
jmp 0x54dd4
movq %rax, %rbx
jmp 0x54e05
movq %rax, %rbx
jmp 0x54e1f
movq %rax, %rbx
jmp 0x54e33
movq %rax, %rbx
jmp 0x54e4a
jmp 0x54dee
jmp 0x54dcd
jmp 0x54dee
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x54df1
callq 0xa2b0
jmp 0x54df1
jmp 0x54dee
jmp 0x54dee
jmp 0x54dee
jmp 0x54dee
jmp 0x54dee
jmp 0x54dee
jmp 0x54dee
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x54e05
callq 0xa2b0
movq 0x98(%rsp), %rdi
leaq 0xa8(%rsp), %rax
cmpq %rax, %rdi
je 0x54e1f
callq 0xa2b0
movq 0x58(%rsp), %rdi
leaq 0x68(%rsp), %rax
cmpq %rax, %rdi
je 0x54e33
callq 0xa2b0
movq 0x78(%rsp), %rdi
leaq 0x88(%rsp), %rax
cmpq %rax, %rdi
je 0x54e4a
callq 0xa2b0
leaq 0x20(%rsp), %rdi
callq 0x14adc
movq %rbx, %rdi
callq 0xa510