// File: /workspace/github_cpp_makefile_star2_O1/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)
movq %rsi, (%rsp)
movq 0x8(%rsi), %rcx
xorl %edx, %edx
testq %rcx, %rcx
je 0x5a528
leaq 0x10(%rsp), %r12
leaq 0x1c7d0(%rip), %r13     # 0x76a9c
xorl %r15d, %r15d
movl $0x0, 0xc(%rsp)
xorl %ebx, %ebx
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
leaq 0x1c761(%rip), %rsi     # 0x76a4e
leaq 0x1c75b(%rip), %rdx     # 0x76a4f
callq 0xdf6a
movslq %r15d, %rbp
movq 0x18(%rsp), %rax
leaq (%rax,%rbp), %rcx
movq (%rsp), %rdx
cmpq %rcx, 0x8(%rdx)
jb 0x5a353
testq %rax, %rax
sete %r14b
je 0x5a356
movq (%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rsp), %rdx
movl %r15d, %esi
movb (%rcx,%rsi), %sil
cmpb (%rdx), %sil
jne 0x5a353
movl $0x1, %edi
movl %edi, %esi
cmpq %rsi, %rax
setbe %r14b
jbe 0x5a356
leal (%r15,%rsi), %edi
movb (%rcx,%rdi), %r8b
leal 0x1(%rsi), %edi
cmpb (%rdx,%rsi), %r8b
je 0x5a335
jmp 0x5a356
xorl %r14d, %r14d
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5a36a
callq 0xa2b0
testb %r14b, %r14b
je 0x5a476
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 0x5a3ab
movq %r12, %rdi
movq %r13, %rsi
callq 0xa560
decl %r14d
jne 0x5a39b
movslq 0xc(%rsp), %rdx
movl %r15d, %ecx
subl %edx, %ecx
leaq 0x68(%rsp), %r14
movq %r14, %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 0x5a400
movq %rdx, 0x40(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x50(%rsp)
jmp 0x5a406
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 0x5a446
callq 0xa2b0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5a45a
callq 0xa2b0
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5a46e
callq 0xa2b0
leal 0x1(%r15), %eax
movl %eax, 0xc(%rsp)
leaq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
movq %r12, %rdi
leaq 0x1ca9e(%rip), %rsi     # 0x76f28
leaq 0x1ca98(%rip), %rdx     # 0x76f29
callq 0xdf6a
movq 0x18(%rsp), %rax
addq %rax, %rbp
movq (%rsp), %rcx
cmpq %rbp, 0x8(%rcx)
jb 0x5a4ec
testq %rax, %rax
sete %bpl
je 0x5a4ee
movq (%rsp), %rcx
movq (%rcx), %rcx
movq 0x10(%rsp), %rdx
movl %r15d, %esi
movb (%rcx,%rsi), %sil
cmpb (%rdx), %sil
jne 0x5a4ec
movl $0x1, %edi
movl %edi, %esi
cmpq %rsi, %rax
setbe %bpl
jbe 0x5a4ee
leal (%r15,%rsi), %edi
movb (%rcx,%rdi), %r8b
leal 0x1(%rsi), %edi
cmpb (%rdx,%rsi), %r8b
je 0x5a4ce
jmp 0x5a4ee
xorl %ebp, %ebp
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5a502
callq 0xa2b0
incl %ebx
testb %bpl, %bpl
movl $0x0, %eax
cmovnel %eax, %ebx
incl %r15d
movq (%rsp), %rax
movq 0x8(%rax), %rcx
cmpq %r15, %rcx
ja 0x5a2d9
movslq 0xc(%rsp), %rdx
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 0x5a55d
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 0x5a5cc
jmp 0x5a5ba
movq %rax, %rbx
jmp 0x5a5a2
jmp 0x5a5bf
movq %rax, %rbx
movq 0x40(%rsp), %rdi
leaq 0x50(%rsp), %rax
cmpq %rax, %rdi
je 0x5a5a2
callq 0xa2b0
movq 0x68(%rsp), %rdi
leaq 0x78(%rsp), %rax
cmpq %rax, %rdi
je 0x5a5c2
callq 0xa2b0
jmp 0x5a5c2
jmp 0x5a5ba
movq %rax, %rbx
jmp 0x5a5d6
movq %rax, %rbx
movq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rax
cmpq %rax, %rdi
je 0x5a5d6
callq 0xa2b0
movq 0x30(%rsp), %rax
movq (%rax), %rdi
cmpq 0x60(%rsp), %rdi
je 0x5a5ea
callq 0xa2b0
movq %rbx, %rdi
callq 0xa510