// File: /workspace/github_cpp_makefile_star2_O3/menhits[P]phplus/src/msclStringFuncs.cpp
// Function: writeFile(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>> const&, bool)
bool writeFile(const string& filename, const string& contents, bool debug)
{
	std::ofstream outFile;
	
	if (debug)
		cout << "attempting to write to '" << filename << "'..." << endl;
	
	outFile.open(filename);
	
	if (!outFile.is_open())
	{
		if (debug)
			cout << "'" << filename << "' failed to open :(" << endl;
		return false;
	}
	else
	{
		if (debug)
			cout << "file opended, writing to file..." << endl;
		
		outFile << contents;
		
		outFile.close();
		
		if (debug)
			cout << "file reading done, '" << filename << "' closed" << endl;
		
		return true;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x200, %rsp            # imm = 0x200
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r14
movq %rsp, %rdi
callq 0xa4e0
testl %ebp, %ebp
je 0x5e767
movq 0x3b8ab(%rip), %rdi     # 0x99fb0
leaq 0x1db69(%rip), %rsi     # 0x7c275
movl $0x18, %edx
callq 0xa320
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x3b88c(%rip), %rdi     # 0x99fb0
callq 0xa320
movq %rax, %rbx
leaq 0x1daed(%rip), %rsi     # 0x7c220
movl $0x4, %edx
movq %rax, %rdi
callq 0xa320
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0xa2c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0xa030
movq %rax, %rdi
callq 0xa200
movq %rsp, %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0xa190
leaq 0x70(%rsp), %rdi
callq 0xa0c0
movl %eax, %ebx
testb %al, %al
je 0x5e84f
testb %bpl, %bpl
je 0x5e7d7
movq 0x3b819(%rip), %r12     # 0x99fb0
leaq 0x1daf0(%rip), %rsi     # 0x7c28e
movl $0x20, %edx
movq %r12, %rdi
callq 0xa320
movq (%r12), %rax
addq -0x18(%rax), %r12
movq %r12, %rdi
movl $0xa, %esi
callq 0xa2c0
movsbl %al, %esi
movq 0x3b7e6(%rip), %rdi     # 0x99fb0
callq 0xa030
movq %rax, %rdi
callq 0xa200
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %rsp, %rdi
callq 0xa320
movq %rsp, %rdi
callq 0xa430
testb %bpl, %bpl
je 0x5e8bd
movq 0x3b7b2(%rip), %rdi     # 0x99fb0
leaq 0x1da52(%rip), %rsi     # 0x7c257
movl $0x14, %edx
callq 0xa320
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x3b793(%rip), %rdi     # 0x99fb0
callq 0xa320
movq %rax, %r14
leaq 0x1da40(%rip), %rsi     # 0x7c26c
movl $0x8, %edx
movq %rax, %rdi
callq 0xa320
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xa2c0
jmp 0x5e8aa
testb %bpl, %bpl
je 0x5e8bd
movq 0x3b755(%rip), %rdi     # 0x99fb0
leaq 0x1da08(%rip), %rsi     # 0x7c26a
movl $0x1, %edx
callq 0xa320
movq (%r14), %rsi
movq 0x8(%r14), %rdx
movq 0x3b736(%rip), %rdi     # 0x99fb0
callq 0xa320
movq %rax, %r14
leaq 0x1d99c(%rip), %rsi     # 0x7c225
movl $0x13, %edx
movq %rax, %rdi
callq 0xa320
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0xa2c0
movsbl %al, %esi
movq %r14, %rdi
callq 0xa030
movq %rax, %rdi
callq 0xa200
movq 0x3b6d4(%rip), %rax     # 0x99f98
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x8(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, (%rsp,%rcx)
callq 0xa280
leaq 0xf8(%rsp), %rdi
callq 0xa120
movl %ebx, %eax
addq $0x200, %rsp            # imm = 0x200
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0xa450
movq %rbx, %rdi
callq 0xa510