// File: /workspace/github_cpp_makefile_star2_O2/menhits[P]phplus/src/msclStringFuncs.cpp
// Function: putStringInTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string putStringInTable(const string& in, string tableName)
{
	vector<string> lineStrs;
	
	sliceStringBy(in, "\n", lineStrs);
	
	vector<vector<string>> table;
	vector<int> widths;
	//vector<string> lines;
	
	for (auto i: lineStrs)
	{
		vector<string> row;
		
		sliceStringBy(i, "\t", row);
		
		for (unsigned j=0; j<row.size(); j++)
		{
			if (j==widths.size())
				widths.push_back(0);
			
			widths[j]=max(widths[j], int(row[j].size()));
		}
		
		table.push_back(row);
	}
	
	//make sure each row in the table has the same number of cells
	for (auto i: lineStrs)
	{
		for (int j=0; j<int(widths.size())-int(table.back().size()); j++)
			table.back().push_back("");
	}
	
	int totalWidth=0;
	
	for (auto i: widths)
		totalWidth+=i;
	
	string out;
	
	out+="  _"+padString(tableName, totalWidth+2+(table.back().size()-1)*5, 0, "_", "[ ", " ]")+"_  ";
	
	for (auto i: table)
	{
		out+="\n |";
		
		for (unsigned j=0; j<i.size(); j++)
		{
			if (j>0)
				out+="|";
			
			out+=padString("", widths[j]+4, 1, " ");
		}
		
		//out+="  | \n |  "+padString("", totalWidth+(table.back().size()-1)*5, 1, " ")+"  | ";
		
		out+="| ";
		
		out+="\n |  ";
		
		for (unsigned j=0; j<i.size(); j++)
		{
			if (j>0)
				out+="  |  ";
			
			int alignment=(j==i.size()-1)?(1):((j==0)?(-1):0);
			
			out+=padString(i[j], widths[j], alignment);
		}
		
		out+="  | ";
	}
	
	out+="\n |";
	
	for (unsigned j=0; j<table.back().size(); j++)
	{
		if (j>0)
			out+="|";
		
		out+=padString("", widths[j]+4, 1, "_");
	}
	
	out+="| \n";
	
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x268, %rsp            # imm = 0x268
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, 0x18(%rsp)
xorps %xmm0, %xmm0
movaps %xmm0, 0xd0(%rsp)
andq $0x0, 0xe0(%rsp)
leaq 0x11f98(%rip), %rsi     # 0x54ef8
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0xa150
movq %r14, 0xa8(%rsp)
leaq 0x70(%rsp), %rsi
leaq 0xd0(%rsp), %rdx
movq %rbx, %rdi
callq 0x41a63
leaq 0x70(%rsp), %rbx
movq %rbx, %rdi
callq 0xa558
xorps %xmm0, %xmm0
leaq 0xb0(%rsp), %rax
andq $0x0, 0x10(%rax)
leaq 0x90(%rsp), %r12
andq $0x0, 0x10(%r12)
movaps %xmm0, (%rax)
movaps %xmm0, (%r12)
movq 0xd0(%rsp), %r13
movq 0xd8(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x50(%rsp), %r14
leaq 0x30(%rsp), %rbp
cmpq 0x28(%rsp), %r13
je 0x430c7
movq %rbx, %rdi
movq %r13, %rsi
callq 0xa3b0
xorps %xmm0, %xmm0
movaps %xmm0, 0x30(%rsp)
andq $0x0, 0x40(%rsp)
movq %r14, %rdi
leaq 0x11a12(%rip), %rsi     # 0x54a1e
leaq 0x15(%rsp), %rdx
callq 0xa150
movq %rbx, %rdi
movq %r14, %rsi
movq %rbp, %rdx
callq 0x41a63
movq %r14, %rdi
callq 0xa558
xorl %ecx, %ecx
movq 0x30(%rsp), %rax
movl %ecx, %r15d
movq 0x38(%rsp), %rcx
subq %rax, %rcx
sarq $0x5, %rcx
cmpq %r15, %rcx
jbe 0x4309e
movq 0x90(%rsp), %rcx
movq 0x98(%rsp), %rdx
subq %rcx, %rdx
sarq $0x2, %rdx
cmpq %r15, %rdx
jne 0x43080
andl $0x0, 0x50(%rsp)
movq %r12, %rdi
movq %r14, %rsi
callq 0x4431c
movq 0x90(%rsp), %rcx
movq 0x30(%rsp), %rax
movq %r15, %rdx
shlq $0x5, %rdx
movl 0x8(%rax,%rdx), %edx
movl (%rcx,%r15,4), %esi
cmpl %edx, %esi
cmovgl %esi, %edx
movl %edx, (%rcx,%r15,4)
leal 0x1(%r15), %ecx
jmp 0x43033
leaq 0xb0(%rsp), %rdi
movq %rbp, %rsi
callq 0x44224
movq %rbp, %rdi
callq 0x11670
movq %rbx, %rdi
callq 0xa558
addq $0x20, %r13
jmp 0x42fde
movq 0xd0(%rsp), %rbx
movq 0xd8(%rsp), %rax
movq %rax, 0x28(%rsp)
leaq 0x1193c(%rip), %r15     # 0x54a1f
leaq 0x50(%rsp), %r12
leaq 0x30(%rsp), %r13
cmpq 0x28(%rsp), %rbx
je 0x4316d
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0xa3b0
xorl %r14d, %r14d
movq 0x98(%rsp), %rax
subq 0x90(%rsp), %rax
movq 0xb8(%rsp), %rbp
movq -0x10(%rbp), %rcx
subq -0x18(%rbp), %rcx
shrq $0x2, %rax
shrq $0x5, %rcx
subl %ecx, %eax
cmpl %eax, %r14d
jge 0x4315d
movq %r12, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0xa150
addq $-0x18, %rbp
movq %rbp, %rdi
movq %r12, %rsi
callq 0x13632
movq %r12, %rdi
callq 0xa558
incl %r14d
jmp 0x43104
leaq 0x70(%rsp), %rdi
callq 0xa558
addq $0x20, %rbx
jmp 0x430ed
movq 0x90(%rsp), %rax
movq 0x98(%rsp), %rcx
xorl %r14d, %r14d
cmpq %rcx, %rax
je 0x4318e
addl (%rax), %r14d
addq $0x4, %rax
jmp 0x43180
movq 0x18(%rsp), %rcx
leaq 0x10(%rcx), %rax
movq %rax, (%rcx)
andq $0x0, 0x8(%rcx)
movb $0x0, 0x10(%rcx)
movq 0xb8(%rsp), %rax
movq -0x10(%rax), %r15
subq -0x18(%rax), %r15
leaq 0x16014(%rip), %rsi     # 0x591ce
leaq 0x1c8(%rsp), %rdi
leaq 0x15(%rsp), %rdx
callq 0xa150
leaq 0x15ffd(%rip), %rsi     # 0x591d0
leaq 0x1a8(%rsp), %rdi
leaq 0x16(%rsp), %rdx
callq 0xa150
leaq 0x15fe7(%rip), %rsi     # 0x591d3
leaq 0x228(%rsp), %rbx
leaq 0x17(%rsp), %rdx
movq %rbx, %rdi
callq 0xa150
shrq $0x5, %r15
leal (%r15,%r15,4), %eax
leal (%r14,%rax), %edx
addl $-0x3, %edx
movq %rbx, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x1c8(%rsp), %r8
leaq 0x1a8(%rsp), %r9
movq 0xa8(%rsp), %rsi
xorl %ecx, %ecx
callq 0x41e9e
leaq 0x15f8d(%rip), %rsi     # 0x591cc
leaq 0x50(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x11ff8
leaq 0x15f81(%rip), %rdx     # 0x591d6
leaq 0x70(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0xc882
leaq 0x70(%rsp), %rsi
movq 0x18(%rsp), %rdi
callq 0xa540
leaq 0x70(%rsp), %r14
movq %r14, %rdi
callq 0xa558
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xa558
leaq 0x228(%rsp), %rdi
callq 0xa558
leaq 0x1a8(%rsp), %rdi
callq 0xa558
leaq 0x1c8(%rsp), %rdi
callq 0xa558
movq 0xb0(%rsp), %rsi
movq 0xb8(%rsp), %rax
movq %rax, 0xa8(%rsp)
leaq 0x11742(%rip), %rbp     # 0x54a1f
cmpq 0xa8(%rsp), %rsi
je 0x4359b
movq %rbx, %rdi
movq %rsi, 0x28(%rsp)
callq 0x44250
movq 0x18(%rsp), %rdi
leaq 0x15ed6(%rip), %rsi     # 0x591da
callq 0xa520
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0x38(%rsp), %rax
subq 0x30(%rsp), %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x43417
testq %r15, %r15
je 0x4333c
movq 0x18(%rsp), %rdi
leaq 0x15ea5(%rip), %rsi     # 0x591dc
callq 0xa520
leaq 0x50(%rsp), %rdi
movq %rbp, %rsi
leaq 0x15(%rsp), %rdx
callq 0xa150
movq 0x90(%rsp), %rax
movl (%rax,%r15,4), %ebx
leaq 0x188(%rsp), %rdi
leaq 0x11703(%rip), %rsi     # 0x54a6c
leaq 0x16(%rsp), %rdx
callq 0xa150
leaq 0x168(%rsp), %rdi
movq %rbp, %rsi
leaq 0x17(%rsp), %rdx
callq 0xa150
leaq 0x208(%rsp), %r12
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x27(%rsp), %rdx
callq 0xa150
addl $0x4, %ebx
movq %r12, (%rsp)
movq %r14, %rdi
leaq 0x50(%rsp), %rsi
movl %ebx, %edx
pushq $0x1
popq %rcx
leaq 0x188(%rsp), %r8
leaq 0x168(%rsp), %r9
callq 0x41e9e
movq 0x18(%rsp), %rdi
movq %r14, %rsi
callq 0xa540
movq %r14, %rdi
callq 0xa558
leaq 0x208(%rsp), %rdi
callq 0xa558
leaq 0x168(%rsp), %rdi
callq 0xa558
leaq 0x188(%rsp), %rdi
callq 0xa558
leaq 0x50(%rsp), %rdi
callq 0xa558
incl %r15d
jmp 0x4330c
movq 0x18(%rsp), %rdi
leaq 0x15dc3(%rip), %rsi     # 0x591e6
callq 0xa520
movq 0x18(%rsp), %rdi
leaq 0x15daa(%rip), %rsi     # 0x591de
callq 0xa520
xorl %r15d, %r15d
movl %r15d, %r15d
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rax
subq %rbx, %rax
sarq $0x5, %rax
cmpq %r15, %rax
jbe 0x4356a
testq %r15, %r15
je 0x43480
movq 0x18(%rsp), %rdi
leaq 0x15d83(%rip), %rsi     # 0x591ed
callq 0xa520
movq 0x30(%rsp), %rbx
movq 0x38(%rsp), %rax
subq %rbx, %rax
sarq $0x5, %rax
decq %rax
cmpl $0x1, %r15d
movl $0x0, %r13d
sbbl %r13d, %r13d
cmpq %r15, %rax
pushq $0x1
popq %rax
cmovel %eax, %r13d
movq 0x90(%rsp), %rax
movl (%rax,%r15,4), %r12d
leaq 0x148(%rsp), %rdi
leaq 0x115b7(%rip), %rsi     # 0x54a6c
leaq 0x50(%rsp), %rdx
callq 0xa150
leaq 0x128(%rsp), %rdi
movq %rbp, %rsi
leaq 0x15(%rsp), %rdx
callq 0xa150
movq %rbp, %rsi
leaq 0x1e8(%rsp), %rbp
movq %rbp, %rdi
movq %rsi, %r14
leaq 0x16(%rsp), %rdx
callq 0xa150
movq %r15, %rax
shlq $0x5, %rax
addq %rax, %rbx
movq %rbp, (%rsp)
leaq 0x70(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
movl %r12d, %edx
movl %r13d, %ecx
leaq 0x148(%rsp), %r8
leaq 0x128(%rsp), %r9
callq 0x41e9e
movq 0x18(%rsp), %rdi
movq %rbp, %rsi
callq 0xa540
movq %rbp, %rdi
callq 0xa558
leaq 0x1e8(%rsp), %rdi
callq 0xa558
leaq 0x128(%rsp), %rdi
callq 0xa558
leaq 0x148(%rsp), %rdi
callq 0xa558
incl %r15d
movq %r14, %rbp
jmp 0x4343c
movq 0x18(%rsp), %rdi
leaq 0x15c6e(%rip), %rsi     # 0x591e4
callq 0xa520
leaq 0x70(%rsp), %r14
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x11670
movq 0x28(%rsp), %rsi
addq $0x18, %rsi
jmp 0x432dd
leaq 0x15c38(%rip), %rsi     # 0x591da
movq 0x18(%rsp), %rdi
callq 0xa520
xorl %r14d, %r14d
leaq 0x11469(%rip), %r15     # 0x54a1f
leaq 0x248(%rsp), %rbp
leaq 0x70(%rsp), %r12
movl %r14d, %r14d
movq 0xb8(%rsp), %rax
movq -0x10(%rax), %rcx
subq -0x18(%rax), %rcx
sarq $0x5, %rcx
cmpq %r14, %rcx
jbe 0x436ca
testq %r14, %r14
je 0x435f9
movq 0x18(%rsp), %rdi
leaq 0x15be8(%rip), %rsi     # 0x591dc
callq 0xa520
leaq 0x50(%rsp), %rdi
movq %r15, %rsi
leaq 0x30(%rsp), %rdx
callq 0xa150
movq 0x90(%rsp), %rax
movl (%rax,%r14,4), %ebx
leaq 0x108(%rsp), %rdi
leaq 0x15ba8(%rip), %rsi     # 0x591ce
leaq 0x15(%rsp), %rdx
callq 0xa150
leaq 0xe8(%rsp), %rdi
movq %r15, %r13
movq %r15, %rsi
leaq 0x16(%rsp), %rdx
callq 0xa150
movq %rbp, %rdi
movq %r13, %rsi
leaq 0x17(%rsp), %rdx
callq 0xa150
addl $0x4, %ebx
movq %rbp, (%rsp)
movq %r12, %rdi
leaq 0x50(%rsp), %rsi
movl %ebx, %edx
pushq $0x1
popq %rcx
leaq 0x108(%rsp), %r8
leaq 0xe8(%rsp), %r9
callq 0x41e9e
movq 0x18(%rsp), %rdi
movq %r12, %rsi
callq 0xa540
movq %r12, %rdi
callq 0xa558
movq %rbp, %rdi
callq 0xa558
leaq 0xe8(%rsp), %rdi
callq 0xa558
leaq 0x108(%rsp), %rdi
callq 0xa558
leaq 0x50(%rsp), %rdi
callq 0xa558
incl %r14d
jmp 0x435c3
leaq 0x15b18(%rip), %rsi     # 0x591e9
movq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0xa520
leaq 0x90(%rsp), %rdi
callq 0x4430e
leaq 0xb0(%rsp), %rdi
callq 0x442a4
leaq 0xd0(%rsp), %rdi
callq 0x11670
movq %rbx, %rax
addq $0x268, %rsp            # imm = 0x268
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0xa558
jmp 0x4372c
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x4373b
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xa558
jmp 0x4374a
movq %rax, %r14
leaq 0x228(%rsp), %rdi
callq 0xa558
jmp 0x4375c
movq %rax, %r14
leaq 0x1a8(%rsp), %rdi
callq 0xa558
leaq 0x1c8(%rsp), %rdi
jmp 0x437e7
movq %rax, %r14
jmp 0x43769
jmp 0x437f1
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0xa558
jmp 0x438f5
movq %rax, %r14
jmp 0x438f5
jmp 0x437f1
jmp 0x437f1
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0xa558
jmp 0x437aa
movq %rax, %r14
leaq 0x248(%rsp), %rdi
callq 0xa558
jmp 0x437bc
movq %rax, %r14
leaq 0xe8(%rsp), %rdi
callq 0xa558
jmp 0x437ce
movq %rax, %r14
leaq 0x108(%rsp), %rdi
callq 0xa558
jmp 0x437e2
jmp 0x437f1
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x438d1
movq %rax, %r14
jmp 0x438d1
jmp 0x437fd
jmp 0x43818
movq %rax, %r14
jmp 0x438db
jmp 0x43818
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x4381b
jmp 0x4387a
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0x11670
jmp 0x4391c
jmp 0x4387a
jmp 0x4387a
movq %rax, %r14
jmp 0x43852
movq %rax, %r14
jmp 0x43845
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0xa558
leaq 0x1e8(%rsp), %rdi
callq 0xa558
leaq 0x128(%rsp), %rdi
callq 0xa558
jmp 0x43864
movq %rax, %r14
leaq 0x148(%rsp), %rdi
jmp 0x438c2
jmp 0x4387a
movq %rax, %r14
jmp 0x438b0
movq %rax, %r14
jmp 0x438bd
movq %rax, %r14
jmp 0x438c7
movq %rax, %r14
jmp 0x438a3
movq %rax, %r14
leaq 0x70(%rsp), %rdi
callq 0xa558
jmp 0x43896
movq %rax, %r14
leaq 0x208(%rsp), %rdi
callq 0xa558
leaq 0x168(%rsp), %rdi
callq 0xa558
leaq 0x188(%rsp), %rdi
callq 0xa558
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0x11670
movq 0x18(%rsp), %rdi
callq 0xa558
leaq 0x90(%rsp), %rdi
callq 0x4430e
leaq 0xb0(%rsp), %rdi
callq 0x442a4
leaq 0xd0(%rsp), %rdi
callq 0x11670
movq %r14, %rdi
callq 0xa500
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x4391c
movq %rax, %r14
leaq 0x70(%rsp), %rdi
jmp 0x438d6