// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/msclStringFuncs.cpp
// Function: tabsToSpaces(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, int)
string tabsToSpaces(const string& in, int spaceNum)
{
	int xPos=0;
	string out;
	int sectionStart=0;
	
	for (unsigned i=0; i<in.size(); i++)
	{
		if (substringMatches(in, i, "\t"))
		{
			string tabStr;
			
			for (int j=0; j<spaceNum-(xPos%spaceNum); j++)
			{
				tabStr+=" ";
			}
			
			out+=in.substr(sectionStart, i-sectionStart)+tabStr;
			
			sectionStart=i+1;
		}
		
		xPos++;
		
		if (substringMatches(in, i, "\n"))
		{
			xPos=0;
		}
	}
	
	out+=in.substr(sectionStart, in.size());
	
	return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movl %edx, 0x3c(%rsp)
leaq 0x10(%rdi), %rax
movq %rax, 0x60(%rsp)
movq %rax, (%rdi)
movq $0x0, 0x8(%rdi)
movq %rdi, 0x30(%rsp)
movb $0x0, 0x10(%rdi)
xorl %edx, %edx
movq %rsi, (%rsp)
cmpq $0x0, 0x8(%rsi)
je 0x5b23f
leaq 0x10(%rsp), %r12
leaq 0x68(%rsp), %rdx
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
movq %rdx, %r13
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
leaq 0x1ca4e(%rip), %rsi     # 0x77a4e
leaq 0x1ca48(%rip), %rdx     # 0x77a4f
callq 0xdfa8
movslq %r15d, %rbp
movq 0x18(%rsp), %rax
leaq (%rax,%rbp), %rcx
movq (%rsp), %rdx
cmpq %rcx, 0x8(%rdx)
jae 0x5b02c
movq 0x10(%rsp), %rdi
xorl %r14d, %r14d
jmp 0x5b067
movq 0x10(%rsp), %rdi
testq %rax, %rax
je 0x5b064
movq (%rsp), %rcx
movq (%rcx), %rcx
movl $0x1, %edx
xorl %esi, %esi
leal (%r15,%rdx), %r8d
decl %r8d
movb (%rcx,%r8), %r8b
cmpb (%rdi,%rsi), %r8b
sete %r14b
jne 0x5b067
movl %edx, %esi
incl %edx
cmpq %rsi, %rax
ja 0x5b044
jmp 0x5b067
movb $0x1, %r14b
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5b076
callq 0xa2b0
testb %r14b, %r14b
je 0x5b184
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
movb $0x0, 0x20(%rsp)
movl %ebx, %eax
cltd
movl 0x3c(%rsp), %r14d
idivl %r14d
subl %edx, %r14d
jle 0x5b0bb
movq %r12, %rdi
leaq 0x1c9eb(%rip), %rsi     # 0x77a9c
callq 0xa560
decl %r14d
jne 0x5b0a7
movslq 0xc(%rsp), %rdx
movl %r15d, %ecx
subl %edx, %ecx
movq %r13, %r14
movq %r13, %rdi
movq (%rsp), %rsi
callq 0xa2f0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq %r14, %rdi
callq 0xa110
leaq 0x50(%rsp), %rsi
movq %rsi, 0x40(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x5b10e
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x5b114
movups (%rcx), %xmm0
movups %xmm0, (%rsi)
movq 0x8(%rax), %rdx
movq %rdx, 0x48(%rsp)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movq 0x30(%rsp), %rdi
callq 0xa110
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x5b154
callq 0xa2b0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5b168
callq 0xa2b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5b17c
callq 0xa2b0
leal 0x1(%r15), %eax
movl %eax, 0xc(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
leaq 0x1cd90(%rip), %rsi     # 0x77f28
leaq 0x1cd8a(%rip), %rdx     # 0x77f29
callq 0xdfa8
movq (%rsp), %rax
movq 0x8(%rax), %rcx
movq 0x18(%rsp), %rax
addq %rax, %rbp
cmpq %rbp, %rcx
movq %r13, %rdx
jae 0x5b1c5
movq 0x10(%rsp), %rdi
xorl %ebp, %ebp
jmp 0x5b205
movq 0x10(%rsp), %rdi
testq %rax, %rax
je 0x5b202
movq (%rsp), %rdx
movq (%rdx), %rdx
movl $0x1, %esi
xorl %r8d, %r8d
leal (%r15,%rsi), %r9d
decl %r9d
movb (%rdx,%r9), %r9b
cmpb (%rdi,%r8), %r9b
sete %bpl
jne 0x5b1fd
movl %esi, %r8d
incl %esi
cmpq %r8, %rax
ja 0x5b1de
movq %r13, %rdx
jmp 0x5b205
movb $0x1, %bpl
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5b21f
callq 0xa2b0
movq %r13, %rdx
movq (%rsp), %rax
movq 0x8(%rax), %rcx
incl %ebx
testb %bpl, %bpl
movl $0x0, %eax
cmovnel %eax, %ebx
incl %r15d
cmpq %r15, %rcx
ja 0x5afe9
movslq 0xc(%rsp), %rdx
jmp 0x5b241
xorl %ecx, %ecx
leaq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0xa2f0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %rdi
callq 0xa110
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5b276
callq 0xa2b0
movq 0x30(%rsp), %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
jmp 0x5b2e5
jmp 0x5b2d3
movq %rax, %rbx
jmp 0x5b2bb
jmp 0x5b2d8
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x5b2bb
callq 0xa2b0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5b2db
callq 0xa2b0
jmp 0x5b2db
jmp 0x5b2d3
movq %rax, %rbx
jmp 0x5b2ef
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5b2ef
callq 0xa2b0
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x60(%rsp), %rdi
je 0x5b303
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510