// File: 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
subq $0x270, %rsp            # imm = 0x270
movq %rdi, -0x248(%rbp)
movq %rdi, %rax
movq %rax, -0x240(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x238(%rbp)
movb $0x0, -0x11(%rbp)
leaq 0x1cc883(%rip), %rsi    # 0x5dbd2d
callq 0x417c40
movq -0x238(%rbp), %rax
movl 0x48(%rax), %esi
leaq -0x70(%rbp), %rdi
callq 0x4178a0
jmp 0x40f4c4
movq -0x248(%rbp), %rdi
leaq -0x38(%rbp), %rsi
addq $0x38, %rdi
callq 0x4af380
jmp 0x40f4da
leaq -0x70(%rbp), %rdi
callq 0x405650
movq -0x238(%rbp), %rax
movl 0x40(%rax), %esi
leaq -0xf8(%rbp), %rdi
callq 0x4178a0
jmp 0x40f4fb
leaq -0xc0(%rbp), %rdx
leaq 0x1cc835(%rip), %rsi    # 0x5dbd3e
leaq -0xa0(%rbp), %rdi
callq 0x405d50
jmp 0x40f517
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4af380
jmp 0x40f530
leaq -0xa0(%rbp), %rdi
callq 0x4adc60
leaq -0xf8(%rbp), %rdi
callq 0x405650
movq -0x238(%rbp), %rax
movl 0x50(%rax), %esi
leaq -0x170(%rbp), %rdi
callq 0x4178a0
jmp 0x40f560
leaq -0x138(%rbp), %rdx
leaq 0x1cbb00(%rip), %rsi    # 0x5db06e
leaq -0x118(%rbp), %rdi
callq 0x405d50
jmp 0x40f57c
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq -0x118(%rbp), %rsi
callq 0x4af380
jmp 0x40f595
leaq -0x118(%rbp), %rdi
callq 0x4adc60
leaq -0x170(%rbp), %rdi
callq 0x405650
movq -0x238(%rbp), %rax
movl 0x48(%rax), %esi
leaq -0x1e8(%rbp), %rdi
callq 0x4178a0
jmp 0x40f5c5
leaq -0x1b0(%rbp), %rdx
leaq 0x1cc775(%rip), %rsi    # 0x5dbd48
leaq -0x190(%rbp), %rdi
callq 0x405d50
jmp 0x40f5e1
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq -0x190(%rbp), %rsi
callq 0x4af380
jmp 0x40f5fa
leaq -0x190(%rbp), %rdi
callq 0x4adc60
leaq -0x1e8(%rbp), %rdi
callq 0x405650
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1d7da6(%rip), %rsi    # 0x5e73ca
callq 0x4af460
jmp 0x40f62b
movl 0x255b2f(%rip), %eax    # 0x665160
incl %eax
movq %rsp, %rcx
movq %rcx, -0x200(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x268(%rbp)
movq %rcx, %rsp
movq %rax, -0x208(%rbp)
movl $0x0, -0x1f4(%rbp)
leaq 0x1cc6e1(%rip), %rsi    # 0x5dbd51
xorl %eax, %eax
movl %eax, -0x258(%rbp)
movb %al, -0x251(%rbp)
leaq -0x230(%rbp), %rdi
movq %rdi, -0x260(%rbp)
movl $0x8, %edx
callq 0x505b50
movq -0x260(%rbp), %rsi
movl -0x258(%rbp), %edx
movb -0x251(%rbp), %al
leaq -0x216(%rbp), %rdi
movq %rdi, -0x250(%rbp)
callq 0x505b50
movq -0x248(%rbp), %rdi
movq -0x250(%rbp), %rsi
addq $0x38, %rdi
callq 0x4af460
jmp 0x40f6d5
movq $0x0, -0x1f0(%rbp)
movq -0x238(%rbp), %rdx
movq -0x1f0(%rbp), %rcx
xorl %eax, %eax
cmpq 0x50(%rdx), %rcx
movb %al, -0x269(%rbp)
jae 0x40f710
cmpq $0xa00000, -0x1f0(%rbp) # imm = 0xA00000
setb %al
movb %al, -0x269(%rbp)
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0x40f71f
jmp 0x40fae2
cmpl $0x0, -0x1f4(%rbp)
jne 0x40f81a
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1cd250(%rip), %rsi    # 0x5dc98e
callq 0x4af460
jmp 0x40f745
jmp 0x40f81a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x40fb27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x405650
jmp 0x40fb27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x40f79b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xa0(%rbp), %rdi
callq 0x4adc60
leaq -0xf8(%rbp), %rdi
callq 0x405650
jmp 0x40fb27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x40f7d2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x4adc60
leaq -0x170(%rbp), %rdi
callq 0x405650
jmp 0x40fb27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x40f809
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x4adc60
leaq -0x1e8(%rbp), %rdi
callq 0x405650
jmp 0x40fb27
movq -0x248(%rbp), %rdi
movq -0x238(%rbp), %rax
movq 0x38(%rax), %rax
movq -0x1f0(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x20c(%rbp)
movzbl -0x20c(%rbp), %eax
shrl $0x4, %eax
leaq 0x255923(%rip), %rcx    # 0x665170
movb (%rax,%rcx), %al
movb %al, -0x20b(%rbp)
movzbl -0x20c(%rbp), %eax
andl $0xf, %eax
movb (%rax,%rcx), %al
movb %al, -0x20a(%rbp)
movb $0x0, -0x209(%rbp)
addq $0x38, %rdi
leaq -0x20b(%rbp), %rsi
callq 0x4af460
jmp 0x40f882
movl -0x1f4(%rbp), %eax
andl $0x1, %eax
cmpl $0x1, %eax
jne 0x40f8ab
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1cd0ec(%rip), %rsi    # 0x5dc98e
callq 0x4af460
jmp 0x40f8a9
jmp 0x40f8ab
movzbl -0x20c(%rbp), %eax
cmpl $0x1f, %eax
jle 0x40f8ea
movzbl -0x20c(%rbp), %eax
cmpl $0x7f, %eax
jge 0x40f8ea
movq -0x268(%rbp), %rax
movq -0x238(%rbp), %rcx
movq 0x38(%rcx), %rcx
movq -0x1f0(%rbp), %rdx
movb (%rcx,%rdx), %dl
movl -0x1f4(%rbp), %ecx
movb %dl, (%rax,%rcx)
jmp 0x40f900
movq -0x268(%rbp), %rax
movb 0x1d4b16(%rip), %dl     # 0x5e440d
movl -0x1f4(%rbp), %ecx
movb %dl, (%rax,%rcx)
movq -0x268(%rbp), %rax
movl -0x1f4(%rbp), %ecx
addl $0x1, %ecx
movl %ecx, %ecx
movb $0x0, (%rax,%rcx)
movl -0x1f4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1f4(%rbp)
movl -0x1f4(%rbp), %eax
cmpl 0x25582f(%rip), %eax    # 0x665160
jne 0x40f9f0
movq -0x248(%rbp), %rdi
movq -0x268(%rbp), %rax
movl -0x1f4(%rbp), %ecx
movb $0x0, (%rax,%rcx)
addq $0x38, %rdi
leaq 0x1cd033(%rip), %rsi    # 0x5dc98d
callq 0x4af460
jmp 0x40f961
movq -0x268(%rbp), %rsi
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
callq 0x4af460
jmp 0x40f97a
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1d7a3e(%rip), %rsi    # 0x5e73ca
callq 0x4af460
jmp 0x40f993
leaq -0x216(%rbp), %rdi
leaq -0x230(%rbp), %rsi
movq -0x1f0(%rbp), %rdx
addq $0x1, %rdx
movb $0x0, %al
callq 0x505b50
movq -0x238(%rbp), %rcx
movq -0x1f0(%rbp), %rax
addq $0x1, %rax
cmpq 0x50(%rcx), %rax
jae 0x40f9e6
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq -0x216(%rbp), %rsi
callq 0x4af460
jmp 0x40f9e4
jmp 0x40f9e6
movl $0x0, -0x1f4(%rbp)
movl -0x1f4(%rbp), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x40fa22
cmpl $0x2, -0x1f4(%rbp)
jbe 0x40fa22
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1ccf75(%rip), %rsi    # 0x5dc98e
callq 0x4af460
jmp 0x40fa20
jmp 0x40fa22
movq -0x238(%rbp), %rcx
movq -0x1f0(%rbp), %rax
addq $0x1, %rax
cmpq 0x50(%rcx), %rax
jne 0x40fa89
cmpl $0x0, -0x1f4(%rbp)
je 0x40fa5e
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1ccf38(%rip), %rsi    # 0x5dc98d
callq 0x4af460
jmp 0x40fa5c
jmp 0x40fa5e
movl -0x1f4(%rbp), %eax
andl $0x1, %eax
cmpl $0x1, %eax
jne 0x40fa87
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1ccf10(%rip), %rsi    # 0x5dc98e
callq 0x4af460
jmp 0x40fa85
jmp 0x40fa87
jmp 0x40fa89
jmp 0x40fa8b
movq -0x238(%rbp), %rdx
movq -0x1f0(%rbp), %rcx
addq $0x1, %rcx
xorl %eax, %eax
cmpq 0x50(%rdx), %rcx
movb %al, -0x26a(%rbp)
jne 0x40fabb
cmpl $0x0, -0x1f4(%rbp)
setne %al
movb %al, -0x26a(%rbp)
movb -0x26a(%rbp), %al
testb $0x1, %al
jne 0x40f916
jmp 0x40facb
movq -0x1f0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1f0(%rbp)
jmp 0x40f6e0
movq -0x248(%rbp), %rdi
addq $0x38, %rdi
leaq 0x1f0e92(%rip), %rsi    # 0x600986
callq 0x4af460
jmp 0x40fafb
movb $0x1, -0x11(%rbp)
movq -0x200(%rbp), %rax
movq %rax, %rsp
testb $0x1, -0x11(%rbp)
jne 0x40fb1b
movq -0x248(%rbp), %rdi
callq 0x405650
movq -0x240(%rbp), %rax
movq %rbp, %rsp
popq %rbp
retq
movq -0x248(%rbp), %rdi
callq 0x405650
movq -0x78(%rbp), %rdi
callq 0x4deb40
nopl (%rax)