// File: /workspace/github_cpp_makefile_star2_O2/menhits[P]phplus/src/msclStringFuncs.cpp
// Function: lineListToBoxedString(std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<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>>, int, bool, int)
string lineListToBoxedString(const vector<string>& in, string boxName, int lineNum, bool alwaysWidthMax, int maxWidth)
{
	string out;
	
	auto first=in.begin();
	auto last=in.end();
	
	if (first!=last)
	{
		last--;
		
		while(first!=last && *first=="")
		{
			first++;
			if (lineNum>=0)
				lineNum++;
		}
		
		while (first!=last && *last=="")
		{
			last--;
		}
		
		last++;
	}
	
	//the extra width of the padding on the right and left (not the virt lines)
	int extraWidth=(lineNum<0)?4:10;
	
	//the size of the contents (not the container)
	int size;
	
	if (alwaysWidthMax)
	{
		size=maxWidth-extraWidth;
	}
	else
	{
		size=boxName.size()-extraWidth+6;
		
		for (auto i: in)
		{
			size=max(size, int(i.size()));
		}
		
		size=min(maxWidth-extraWidth, size);
	}
	
	if (boxName=="")
		out+="  "+padString("", size+extraWidth, 1, "_")+"  ";
	else
		out+="  _"+padString(boxName, size+extraWidth-2, 0, "_", "[ ", " ]")+"_  ";
	
	out+="\n |"+padString("", size+extraWidth, 1, " ")+"| ";
	
	auto i=first;
	
	while (i!=last)
	{
		if (lineNum<0)
		{
			out+="\n |  ";
		}
		else
		{
			out+="\n |"+padString(to_string(lineNum), 4, -1)+"    ";
			lineNum++;
		}
		
		out+=padString(*i, size, 1)+"  | ";
			
		i++;
	}
	
	out+="\n |"+padString("", size+extraWidth, 1, "_")+"| \n";
	
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x2f8, %rsp            # imm = 0x2F8
movq %r9, 0x20(%rsp)
movl %r8d, %ebp
movl %ecx, 0x1c(%rsp)
movq %rdx, 0x28(%rsp)
movq %rsi, %r14
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rdi, 0x10(%rsp)
movb $0x0, 0x10(%rdi)
movq (%rsi), %r15
movq 0x8(%rsi), %rax
cmpq %rax, %r15
je 0x42401
movq %rax, %rbx
leaq -0x20(%rax), %r13
leaq 0x12672(%rip), %r12     # 0x54a1f
cmpq %r13, %r15
je 0x423d8
movq %r15, %rdi
movq %r12, %rsi
callq 0x182b0
testb %al, %al
je 0x423d8
addq $0x20, %r15
movl 0x1c(%rsp), %ecx
movl %ecx, %eax
notl %eax
shrl $0x1f, %eax
addl %eax, %ecx
movl %ecx, 0x1c(%rsp)
jmp 0x423ad
movq %rbx, %r12
movq %r12, 0xb0(%rsp)
addq $-0x20, %r12
cmpq %r12, %r15
je 0x42409
leaq 0x1262c(%rip), %rsi     # 0x54a1f
movq %r12, %rdi
callq 0x182b0
testb %al, %al
jne 0x423db
jmp 0x42409
movq %r15, 0xb0(%rsp)
movl 0x1c(%rsp), %ecx
testl %ecx, %ecx
pushq $0x4
popq %rax
pushq $0xa
popq %r13
cmovsl %eax, %r13d
testb %bpl, %bpl
je 0x42429
movq 0x20(%rsp), %rax
subl %r13d, %eax
jmp 0x42482
movq %r13, %rbx
testl %ecx, %ecx
pushq $0x2
popq %rax
pushq $-0x4
popq %rbp
cmovsl %eax, %ebp
movq 0x28(%rsp), %rax
addl 0x8(%rax), %ebp
movq (%r14), %r12
movq 0x8(%r14), %r13
leaq 0x50(%rsp), %r14
cmpq %r13, %r12
je 0x42472
movq %r14, %rdi
movq %r12, %rsi
callq 0xa3b0
movl 0x58(%rsp), %eax
cmpl %eax, %ebp
cmovlel %eax, %ebp
movq %r14, %rdi
callq 0xa558
addq $0x20, %r12
jmp 0x4244b
movq 0x20(%rsp), %rax
movq %rbx, %r13
subl %r13d, %eax
cmpl %eax, %ebp
cmovll %ebp, %eax
movq %rax, 0x20(%rsp)
leaq 0x12591(%rip), %rsi     # 0x54a1f
movq 0x28(%rsp), %rdi
callq 0x182b0
testb %al, %al
movq 0x10(%rsp), %r12
je 0x425c9
leaq 0x12573(%rip), %rsi     # 0x54a1f
leaq 0x70(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xa150
leaq 0x16d0c(%rip), %rsi     # 0x591ce
leaq 0x218(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0xa150
leaq 0x12544(%rip), %rsi     # 0x54a1f
leaq 0x1f8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xa150
leaq 0x1252b(%rip), %rsi     # 0x54a1f
leaq 0x2b8(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0xa150
movq 0x20(%rsp), %rax
leal (%rax,%r13), %edx
movq %rbx, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rcx
leaq 0x218(%rsp), %r8
leaq 0x1f8(%rsp), %r9
callq 0x41e9e
leaq 0x1252c(%rip), %rsi     # 0x54a6b
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x11ff8
leaq 0x12513(%rip), %rdx     # 0x54a6b
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xc882
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0xa540
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x90(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
leaq 0x2b8(%rsp), %rdi
callq 0xa558
leaq 0x1f8(%rsp), %rdi
callq 0xa558
leaq 0x218(%rsp), %rdi
callq 0xa558
leaq 0x70(%rsp), %rdi
jmp 0x426ca
leaq 0x16bfe(%rip), %rsi     # 0x591ce
leaq 0x1d8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0xa150
leaq 0x16be7(%rip), %rsi     # 0x591d0
leaq 0x1b8(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xa150
leaq 0x16bd1(%rip), %rsi     # 0x591d3
leaq 0x298(%rsp), %r14
leaq 0xd(%rsp), %rdx
movq %r14, %rdi
callq 0xa150
movq 0x20(%rsp), %rax
leal (%rax,%r13), %edx
addl $-0x2, %edx
movq %r14, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x1d8(%rsp), %r8
leaq 0x1b8(%rsp), %r9
movq 0x28(%rsp), %rsi
xorl %ecx, %ecx
callq 0x41e9e
leaq 0x16b7d(%rip), %rsi     # 0x591cc
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x11ff8
leaq 0x16b6e(%rip), %rdx     # 0x591d6
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xc882
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0xa540
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x90(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
leaq 0x298(%rsp), %rdi
callq 0xa558
leaq 0x1b8(%rsp), %rdi
callq 0xa558
leaq 0x1d8(%rsp), %rdi
callq 0xa558
leaq 0x12349(%rip), %rsi     # 0x54a1f
leaq 0x70(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xa150
leaq 0x12380(%rip), %rsi     # 0x54a6c
leaq 0x198(%rsp), %rdi
leaq 0xd(%rsp), %rdx
callq 0xa150
leaq 0x1231a(%rip), %rsi     # 0x54a1f
leaq 0x178(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xa150
leaq 0x12301(%rip), %rsi     # 0x54a1f
leaq 0x278(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0xa150
addl 0x20(%rsp), %r13d
movq %rbx, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rcx
leaq 0x198(%rsp), %r8
leaq 0x178(%rsp), %r9
movl %r13d, %edx
callq 0x41e9e
leaq 0x16a72(%rip), %rsi     # 0x591da
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x11ff8
leaq 0x16a65(%rip), %rdx     # 0x591e6
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xc882
movq %r13, 0x28(%rsp)
leaq 0x50(%rsp), %rsi
movq %r12, %rdi
callq 0xa540
leaq 0x50(%rsp), %r13
movq %r13, %rdi
callq 0xa558
leaq 0x90(%rsp), %r12
movq %r12, %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
leaq 0x278(%rsp), %rdi
callq 0xa558
leaq 0x178(%rsp), %rdi
callq 0xa558
leaq 0x198(%rsp), %rdi
callq 0xa558
leaq 0x70(%rsp), %rdi
callq 0xa558
leaq 0x1221b(%rip), %r14     # 0x54a1f
leaq 0x2d8(%rsp), %rbp
cmpq 0xb0(%rsp), %r15
je 0x429fa
movl 0x1c(%rsp), %esi
testl %esi, %esi
js 0x42927
leaq 0x70(%rsp), %rdi
callq 0x1837a
leaq 0x158(%rsp), %rdi
leaq 0x1222d(%rip), %rsi     # 0x54a6c
leaq 0xc(%rsp), %rdx
callq 0xa150
leaq 0x138(%rsp), %rdi
movq %r14, %rsi
leaq 0xd(%rsp), %rdx
callq 0xa150
leaq 0x258(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %rsi
leaq 0xe(%rsp), %rdx
callq 0xa150
movq %rbx, (%rsp)
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
leaq 0x70(%rsp), %rsi
pushq $0x4
popq %rdx
pushq $-0x1
popq %rcx
leaq 0x158(%rsp), %r8
leaq 0x138(%rsp), %r9
callq 0x41e9e
movq %r12, %rdi
leaq 0x1692e(%rip), %rsi     # 0x591da
movq %rbx, %rdx
callq 0x11ff8
movq %r13, %rdi
movq %r12, %rsi
leaq 0x121a8(%rip), %rdx     # 0x54a69
callq 0xc882
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xa540
movq %r13, %rdi
callq 0xa558
movq %r12, %rdi
callq 0xa558
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0xa558
leaq 0x258(%rsp), %rdi
callq 0xa558
leaq 0x138(%rsp), %rdi
callq 0xa558
leaq 0x158(%rsp), %rdi
callq 0xa558
leaq 0x70(%rsp), %rdi
callq 0xa558
incl 0x1c(%rsp)
jmp 0x4293d
movq 0x10(%rsp), %rdi
leaq 0x168ab(%rip), %rsi     # 0x591de
callq 0xa520
leaq 0x30(%rsp), %rbx
leaq 0x118(%rsp), %rdi
leaq 0x12120(%rip), %rsi     # 0x54a6c
movq %rbx, %rdx
callq 0xa150
leaq 0xf8(%rsp), %rdi
movq %r14, %rsi
leaq 0x70(%rsp), %rdx
callq 0xa150
movq %rbp, %rdi
movq %r14, %rsi
leaq 0xc(%rsp), %rdx
callq 0xa150
movq %rbp, (%rsp)
movq %r12, %rdi
movq %r15, %rsi
movq 0x20(%rsp), %rdx
pushq $0x1
popq %rcx
leaq 0x118(%rsp), %r8
leaq 0xf8(%rsp), %r9
callq 0x41e9e
movq %r13, %rdi
movq %r12, %rsi
leaq 0x16837(%rip), %rdx     # 0x591e4
callq 0xc882
movq 0x10(%rsp), %rdi
movq %r13, %rsi
callq 0xa540
movq %r13, %rdi
callq 0xa558
movq %r12, %rdi
callq 0xa558
movq %rbp, %rdi
callq 0xa558
leaq 0xf8(%rsp), %rdi
callq 0xa558
leaq 0x118(%rsp), %rdi
callq 0xa558
addq $0x20, %r15
jmp 0x4280c
leaq 0x1201e(%rip), %rsi     # 0x54a1f
leaq 0x70(%rsp), %rdi
leaq 0xc(%rsp), %rdx
callq 0xa150
leaq 0x167b7(%rip), %rsi     # 0x591ce
leaq 0xd8(%rsp), %rdi
leaq 0xd(%rsp), %rdx
movq 0x10(%rsp), %r14
callq 0xa150
movq 0x28(%rsp), %r15
leaq 0x11fe5(%rip), %rsi     # 0x54a1f
leaq 0xb8(%rsp), %rdi
leaq 0xe(%rsp), %rdx
callq 0xa150
leaq 0x11fcc(%rip), %rsi     # 0x54a1f
leaq 0x238(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0xa150
movq %rbx, (%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x70(%rsp), %rsi
pushq $0x1
popq %rcx
leaq 0xd8(%rsp), %r8
leaq 0xb8(%rsp), %r9
movl %r15d, %edx
callq 0x41e9e
leaq 0x16742(%rip), %rsi     # 0x591da
leaq 0x90(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x11ff8
leaq 0x16738(%rip), %rdx     # 0x591e9
leaq 0x50(%rsp), %rdi
leaq 0x90(%rsp), %rsi
callq 0xc882
leaq 0x50(%rsp), %rsi
movq %r14, %rdi
callq 0xa540
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x90(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
leaq 0x238(%rsp), %rdi
callq 0xa558
leaq 0xb8(%rsp), %rdi
callq 0xa558
leaq 0xd8(%rsp), %rdi
callq 0xa558
leaq 0x70(%rsp), %rdi
callq 0xa558
movq %r14, %rax
addq $0x2f8, %rsp            # imm = 0x2F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x42b58
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x42b6a
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0xa558
jmp 0x42b7c
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0xa558
jmp 0x42b8b
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xa558
jmp 0x42b9a
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xa558
jmp 0x42bac
movq %rax, %r14
leaq 0x2b8(%rsp), %rdi
callq 0xa558
jmp 0x42bbe
movq %rax, %r14
leaq 0x298(%rsp), %rdi
callq 0xa558
jmp 0x42bdb
movq %rax, %r14
leaq 0x1f8(%rsp), %rdi
callq 0xa558
leaq 0x218(%rsp), %rdi
jmp 0x42cd0
movq %rax, %r14
leaq 0x1b8(%rsp), %rdi
callq 0xa558
leaq 0x1d8(%rsp), %rdi
jmp 0x42cda
movq %rax, %r14
jmp 0x42bcb
movq %rax, %r14
jmp 0x42be8
jmp 0x42ce9
jmp 0x42cee
jmp 0x42cee
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x42c20
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0xa558
jmp 0x42c32
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xa558
jmp 0x42c41
movq %rax, %r14
leaq 0x238(%rsp), %rdi
callq 0xa558
jmp 0x42c53
movq %rax, %r14
leaq 0xb8(%rsp), %rdi
callq 0xa558
leaq 0xd8(%rsp), %rdi
jmp 0x42cd0
movq %rax, %r14
jmp 0x42c60
jmp 0x42ce9
jmp 0x42dbc
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
jmp 0x42c88
movq %rax, %r14
leaq 0x90(%rsp), %rdi
callq 0xa558
jmp 0x42c9a
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xa558
jmp 0x42ca9
movq %rax, %r14
leaq 0x278(%rsp), %rdi
callq 0xa558
jmp 0x42cbb
movq %rax, %r14
leaq 0x178(%rsp), %rdi
callq 0xa558
leaq 0x198(%rsp), %rdi
callq 0xa558
leaq 0x70(%rsp), %rdi
callq 0xa558
jmp 0x42dbf
movq %rax, %r14
jmp 0x42cc8
movq %rax, %r14
jmp 0x42cd5
movq %rax, %r14
jmp 0x42ddb
jmp 0x42dbc
jmp 0x42dbc
movq %rax, %r14
jmp 0x42d6b
movq %rax, %r14
jmp 0x42d33
movq %rax, %r14
jmp 0x42d5e
movq %rax, %r14
jmp 0x42d26
movq %rax, %r14
jmp 0x42d51
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x90(%rsp), %rdi
callq 0xa558
leaq 0x30(%rsp), %rdi
callq 0xa558
jmp 0x42d44
jmp 0x42dbc
movq %rax, %r14
leaq 0x258(%rsp), %rdi
callq 0xa558
leaq 0x138(%rsp), %rdi
callq 0xa558
leaq 0x158(%rsp), %rdi
callq 0xa558
movq 0x10(%rsp), %r12
leaq 0x70(%rsp), %rdi
jmp 0x42dd6
movq %rax, %r14
jmp 0x42dad
movq %rax, %r14
jmp 0x42da0
movq %rax, %r14
jmp 0x42d93
movq %rax, %r14
leaq 0x50(%rsp), %rdi
callq 0xa558
leaq 0x90(%rsp), %rdi
callq 0xa558
leaq 0x2d8(%rsp), %rdi
callq 0xa558
leaq 0xf8(%rsp), %rdi
callq 0xa558
jmp 0x42dc9
movq %rax, %r14
movq 0x10(%rsp), %r12
jmp 0x42ddb
movq %rax, %r14
movq 0x10(%rsp), %r12
leaq 0x118(%rsp), %rdi
callq 0xa558
movq %r12, %rdi
callq 0xa558
movq %r14, %rdi
callq 0xa500