// File: /workspace/github_cpp_makefile_star2_O3/swxlion[P]swxJson/src/swxJson.cpp
// Function: JsonStringEscaper::escape(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const*)
std::string escape(const std::string * const str)
	{
		const uint8_t mark2 = 0xe0;	//-- 1110 0000
		const uint8_t mark3 = 0xf0;	//-- 1111 0000
		const uint8_t mark4 = 0xf8;	//-- 1111 1000
		const uint8_t mark5 = 0xfc;	//-- 1111 1100
		const uint8_t mark6 = 0xfe;	//-- 1111 1110

		const uint8_t utf82 = 0xc0;	//-- 1100 0000
		const uint8_t utf83 = 0xe0;	//-- 1110 0000
		const uint8_t utf84 = 0xf0;	//-- 1111 0000
		const uint8_t utf85 = 0xf8;	//-- 1111 1000
		const uint8_t utf86 = 0xfc;	//-- 1111 1100

		std::ostringstream os;

		int len = (int)str->length();
		const char* p = str->data();
    	for (int i = 0; i < len; i++)
    	{
    		if ((p[i] & 0x80) == 0x00)
    			(this->*_callMap[(unsigned char)(p[i])])(os, p, len, i);
    		else
    		{
    			if ((p[i] & mark2) == utf82 && i + 1 < len)
				{
					os << p[i] << p[i+1];
					i += 1;
				}
				else if ((p[i] & mark3) == utf83 && i + 2 < len)
				{
					os << p[i] << p[i+1] << p[i+2];
					i += 2;
				}
				else if ((p[i] & mark4) == utf84 && i + 3 < len)
				{
					os << p[i] << p[i+1] << p[i+2] << p[i+3];
					i += 3;
				}
				else if ((p[i] & mark5) == utf85 && i + 4 < len)
				{
					os << p[i] << p[i+1] << p[i+2] << p[i+3] << p[i+4];
					i += 4;
				}
				else if ((p[i] & mark6) == utf86 && i + 5 < len)
				{
					os << p[i] << p[i+1] << p[i+2] << p[i+3] << p[i+4] << p[i+5];
					i += 5;
				}
				else
					(this->*_callMap[(unsigned char)(p[i])])(os, p, len, i);
    		}
    	}

    	return os.str();
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x188, %rsp            # imm = 0x188
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, 0x8(%rsp)
leaq 0x10(%rsp), %rdi
callq 0xb2d0
movl 0x8(%rbx), %ebp
movq (%rbx), %r15
movl $0x0, 0x4(%rsp)
testl %ebp, %ebp
jle 0x1c38f
xorl %ecx, %ecx
leaq 0x10(%rsp), %r12
leaq 0x4(%rsp), %r13
leaq 0x3(%rsp), %rbx
movslq %ecx, %rax
movb (%r15,%rax), %dl
movzbl %dl, %eax
testb %al, %al
js 0x1c085
shll $0x4, %eax
movq (%r14,%rax), %r9
movq 0x8(%r14,%rax), %rdi
addq %r14, %rdi
testb $0x1, %r9b
je 0x1c072
movq (%rdi), %rax
movq -0x1(%rax,%r9), %r9
movq %r12, %rsi
movq %r15, %rdx
movl %ebp, %ecx
movq %r13, %r8
callq *%r9
jmp 0x1c37d
movl %edx, %esi
andb $-0x20, %sil
cmpb $-0x40, %sil
sete %sil
leal 0x1(%rcx), %edi
cmpl %ebp, %edi
setl %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c0e0
movb %dl, 0x3(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x1(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
incl 0x4(%rsp)
jmp 0x1c37d
movl %edx, %esi
andb $-0x10, %sil
cmpb $-0x20, %sil
sete %sil
leal 0x2(%rcx), %edi
cmpl %ebp, %edi
setl %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c15a
movb %dl, 0x3(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x1(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x2(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
addl $0x2, 0x4(%rsp)
jmp 0x1c37d
movl %edx, %esi
andb $-0x8, %sil
cmpb $-0x10, %sil
sete %sil
leal 0x3(%rcx), %edi
cmpl %ebp, %edi
setl %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c1f2
movb %dl, 0x3(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x1(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x2(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x3(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
addl $0x3, 0x4(%rsp)
jmp 0x1c37d
movl %edx, %esi
andb $-0x4, %sil
cmpb $-0x8, %sil
sete %sil
leal 0x4(%rcx), %edi
cmpl %ebp, %edi
setl %dil
andb %sil, %dil
cmpb $0x1, %dil
jne 0x1c2ac
movb %dl, 0x3(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x1(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x2(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x3(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x4(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
addl $0x4, 0x4(%rsp)
jmp 0x1c37d
movl %edx, %esi
andb $-0x2, %sil
cmpb $-0x4, %sil
sete %sil
addl $0x5, %ecx
cmpl %ebp, %ecx
setl %cl
andb %sil, %cl
cmpb $0x1, %cl
jne 0x1c055
movb %dl, 0x3(%rsp)
movl $0x1, %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x1(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x2(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x3(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x4(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
movslq 0x4(%rsp), %rcx
movb 0x5(%r15,%rcx), %cl
movb %cl, 0x3(%rsp)
movl $0x1, %edx
movq %rax, %rdi
movq %rbx, %rsi
callq 0xb290
addl $0x5, 0x4(%rsp)
movl 0x4(%rsp), %ecx
incl %ecx
movl %ecx, 0x4(%rsp)
cmpl %ebp, %ecx
jl 0x1c047
leaq 0x18(%rsp), %rsi
movq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0xb320
movq 0xbc20(%rip), %rsi      # 0x27fc8
leaq 0x10(%rsp), %rdi
callq 0xb120
leaq 0x80(%rsp), %rdi
callq 0xb090
movq %rbx, %rax
addq $0x188, %rsp            # imm = 0x188
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1c3d6
movq %rax, %rbx
movq 0xbbe8(%rip), %rsi      # 0x27fc8
leaq 0x10(%rsp), %rdi
callq 0xb120
leaq 0x80(%rsp), %rdi
callq 0xb090
movq %rbx, %rdi
callq 0xb3b0
nop