// File: /workspace/github_cpp_makefile_star2_O2/enbock[P]Warp10Server/ulib/src/ByteArray.cpp
// Function: u::ByteArray::toString()
String ByteArray::toString()
{
	String str="[ByteArray size=";
	str += int2string(_size);
	str += " pointer=" + int2string(_position);
	str += " length=" + int2string(_length);
	str += " memory=" + int2string(_size);
	str += "\n";

	static int lineLength = 16;
	static char hex[17] = "0123456789ABCDEF";

	uint64 i;
	uint c;
	char o[lineLength+1];
	char l[3];
	unsigned char v;
	char d[10], f[20];

	c=0;
	sprintf(f, " 0x%%%02dx:", (int)sizeof(uint64));
	sprintf(d, f, 0/*+_buffer*/);
	str += d;
	for(i=0; i<_length and i < 1024*1024*10/*cap on 10MB*/; i++)
	{
		if(c==0) str += " ";
		v = _buffer[i];
		l[0] = hex[v>>4]; // >>4 is identical of /16
		l[1] = hex[v-((v>>4)<<4)]; // <<4 is dientical of *16
		l[2] = 0;

		str += l;
		if(c%2==1) str += " ";
		if(v > 31 && v < 127)
			o[c] = _buffer[i];
		else
			o[c] = *".";
		o[c+1]=0;

		do
		{
			c++;
			if(c == lineLength)
			{
				o[c]=0;
				str += "  ";
				str += o;
				str += "\n";

				sprintf(d, f, i+1);
				if(i+1 < _length)
				{
					str += d;
				}
				c = 0;
			}
			if(c%8==0 && c > 2) str += " ";
			if(i+1 == _length)
			{
				if(c) str +="  ";
				if(c%2==1) str += " ";
			}
		} while(i+1 == _length && c != 0);
	}

	str+="]";
	return str;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x1be6d2(%rip), %rsi    # 0x5c77bb
callq 0x40c908
movq %r14, -0x38(%rbp)
movl 0x48(%r14), %esi
leaq -0xc0(%rbp), %rdi
movq %rbx, -0x60(%rbp)
callq 0x40c712
leaq -0x88(%rbp), %rsi
leaq 0x38(%rbx), %r15
movq %r15, %rdi
callq 0x49b180
leaq -0xc0(%rbp), %rdi
callq 0x4050e8
movq -0x38(%rbp), %rax
movl 0x40(%rax), %esi
leaq -0xc0(%rbp), %rdi
callq 0x40c712
leaq -0x88(%rbp), %rdx
leaq 0x1be686(%rip), %rsi    # 0x5c77cc
leaq -0x58(%rbp), %rdi
callq 0x405368
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x49b180
leaq -0x58(%rbp), %rdi
callq 0x499a70
leaq -0xc0(%rbp), %rdi
callq 0x4050e8
movq -0x38(%rbp), %rax
movl 0x50(%rax), %esi
leaq -0xc0(%rbp), %rdi
callq 0x40c712
leaq -0x88(%rbp), %rdx
leaq 0x1bdedd(%rip), %rsi    # 0x5c706e
leaq -0x58(%rbp), %rdi
callq 0x405368
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x49b180
leaq -0x58(%rbp), %rdi
callq 0x499a70
leaq -0xc0(%rbp), %rdi
callq 0x4050e8
movq -0x38(%rbp), %rax
movl 0x48(%rax), %esi
leaq -0xc0(%rbp), %rdi
callq 0x40c712
leaq -0x88(%rbp), %rdx
leaq 0x1be5fa(%rip), %rsi    # 0x5c77d6
leaq -0x58(%rbp), %rdi
callq 0x405368
leaq -0x58(%rbp), %rsi
movq %r15, %rdi
callq 0x49b180
leaq -0x58(%rbp), %rdi
callq 0x499a70
leaq -0xc0(%rbp), %rdi
callq 0x4050e8
leaq 0x1c95dd(%rip), %rsi    # 0x5d27ea
movq %r15, %rdi
callq 0x49b220
movq %rsp, %r12
addq $-0x20, %r12
movq %r12, %rsp
leaq 0x1be5b9(%rip), %rsi    # 0x5c77df
xorl %ebx, %ebx
leaq -0xc0(%rbp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x4f1960
leaq -0x58(%rbp), %r13
movq %r13, %rdi
movq %r14, %rsi
xorl %edx, %edx
xorl %eax, %eax
callq 0x4f1960
movq %r15, %rdi
movq %r13, %rsi
callq 0x49b220
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
xorl %r13d, %r13d
movq %r12, -0x68(%rbp)
cmpq $0x9fffff, %r13         # imm = 0x9FFFFF
ja 0x4093e2
cmpq %rax, %r13
jae 0x4093e2
testl %ebx, %ebx
jne 0x409292
movq %r15, %rdi
leaq 0x1bec17(%rip), %rsi    # 0x5c7ea4
callq 0x49b220
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movzbl (%rax,%r13), %r12d
movl %r12d, %eax
shrl $0x4, %eax
leaq 0x1be644(%rip), %rcx    # 0x5c78f0
movb (%rax,%rcx), %al
movb %al, -0x2b(%rbp)
movl %r12d, %eax
andl $0xf, %eax
movb (%rax,%rcx), %al
movb %al, -0x2a(%rbp)
movb $0x0, -0x29(%rbp)
movq %r15, %rdi
leaq -0x2b(%rbp), %rsi
callq 0x49b220
testb $0x1, %bl
je 0x4092e2
movq %r15, %rdi
leaq 0x1bebc7(%rip), %rsi    # 0x5c7ea4
callq 0x49b220
addb $-0x20, %r12b
movb $0x2e, %al
cmpb $0x5e, %r12b
ja 0x4092fa
movq -0x38(%rbp), %rax
movq 0x38(%rax), %rax
movb (%rax,%r13), %al
movl %ebx, %ecx
movq -0x68(%rbp), %r12
movb %al, (%r12,%rcx)
leal 0x1(%rbx), %eax
movb $0x0, (%r12,%rax)
incq %r13
incl %ebx
cmpl $0x10, %ebx
jne 0x409374
movb $0x0, 0x10(%r12)
movq %r15, %rdi
leaq 0x1beb7d(%rip), %rsi    # 0x5c7ea3
callq 0x49b220
movq %r15, %rdi
movq %r12, %rsi
callq 0x49b220
movq %r15, %rdi
leaq 0x1c94aa(%rip), %rsi    # 0x5d27ea
callq 0x49b220
xorl %ebx, %ebx
leaq -0x58(%rbp), %r14
movq %r14, %rdi
leaq -0xc0(%rbp), %rsi
movq %r13, %rdx
xorl %eax, %eax
callq 0x4f1960
movq -0x38(%rbp), %rax
cmpq 0x50(%rax), %r13
jae 0x409374
movq %r15, %rdi
movq %r14, %rsi
callq 0x49b220
testb $0x7, %bl
setne %al
cmpl $0x3, %ebx
setb %cl
orb %al, %cl
jne 0x409393
movq %r15, %rdi
leaq 0x1beb16(%rip), %rsi    # 0x5c7ea4
callq 0x49b220
testl %ebx, %ebx
je 0x4093c4
movq -0x38(%rbp), %rax
cmpq 0x50(%rax), %r13
jne 0x4093c4
movq %r15, %rdi
leaq 0x1beaf8(%rip), %rsi    # 0x5c7ea3
callq 0x49b220
testb $0x1, %bl
je 0x4093c4
movq %r15, %rdi
leaq 0x1beae5(%rip), %rsi    # 0x5c7ea4
callq 0x49b220
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
testl %ebx, %ebx
je 0x409269
cmpq %rax, %r13
je 0x40930f
jmp 0x409269
leaq 0x1e29bd(%rip), %rsi    # 0x5ebda6
movq %r15, %rdi
callq 0x49b220
movq -0x60(%rbp), %rax
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40943b
jmp 0x409412
jmp 0x409424
jmp 0x40943b
jmp 0x409412
jmp 0x409424
jmp 0x40943b
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x499a70
jmp 0x409427
jmp 0x409424
jmp 0x40943b
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x4050e8
jmp 0x40943e
jmp 0x40943b
jmp 0x40943b
jmp 0x40943b
movq %rax, %rbx
movq -0x60(%rbp), %rdi
callq 0x4050e8
movq %rbx, %rdi
callq 0x4ca950
nop