// File: /workspace/github_c_makefile_star2_O0/wahern[P]cqueues/src/lib/socket.c
// Function: so_dump
static void so_dump(const unsigned char *src, size_t len, FILE *fp) {
	static const unsigned char hex[] = "0123456789abcdef";
	static const unsigned char tmp[] = "                                                            |                |\n";
	unsigned char ln[sizeof tmp];
	const unsigned char *p, *pe;
	unsigned char *h, *g;
	unsigned i, n;

	p  = src;
	pe = p + len;

	while (p < pe) {
		memcpy(ln, tmp, sizeof ln);

		h = &ln[2];
		g = &ln[61];

		n = p - src;
		h[0] = hex[0x0f & (n >> 20)];
		h[1] = hex[0x0f & (n >> 16)];
		h[2] = hex[0x0f & (n >> 12)];
		h[3] = hex[0x0f & (n >> 8)];
		h[4] = hex[0x0f & (n >> 4)];
		h[5] = hex[0x0f & (n >> 0)];
		h += 8;

		for (n = 0; n < 2; n++) {
			for (i = 0; i < 8 && pe - p > 0; i++, p++) {
				h[0] = hex[0x0f & (*p >> 4)];
				h[1] = hex[0x0f & (*p >> 0)];
				h += 3;

				*g++ = (isgraph(*p))? *p : '.';
			}

			h++;
		}

		fputs((char *)ln, fp);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x78(%rbp), %rax
cmpq -0x80(%rbp), %rax
jae 0x317ab
leaq -0x70(%rbp), %rdi
leaq 0x185dc(%rip), %rsi     # 0x49b00
movl $0x50, %edx
callq 0xfb40
leaq -0x70(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x88(%rbp)
leaq -0x70(%rbp), %rax
addq $0x3d, %rax
movq %rax, -0x90(%rbp)
movq -0x78(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, -0x98(%rbp)
movl -0x98(%rbp), %eax
shrl $0x14, %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x1856c(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, (%rax)
movl -0x98(%rbp), %eax
shrl $0x10, %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x18549(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, 0x1(%rax)
movl -0x98(%rbp), %eax
shrl $0xc, %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x18525(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, 0x2(%rax)
movl -0x98(%rbp), %eax
shrl $0x8, %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x18501(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, 0x3(%rax)
movl -0x98(%rbp), %eax
shrl $0x4, %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x184dd(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, 0x4(%rax)
movl -0x98(%rbp), %eax
shrl $0x0, %eax
andl $0xf, %eax
movl %eax, %eax
movl %eax, %ecx
leaq 0x184b9(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, 0x5(%rax)
movq -0x88(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x88(%rbp)
movl $0x0, -0x98(%rbp)
cmpl $0x2, -0x98(%rbp)
jae 0x31799
movl $0x0, -0x94(%rbp)
xorl %eax, %eax
cmpl $0x8, -0x94(%rbp)
movb %al, -0x99(%rbp)
jae 0x31690
movq -0x80(%rbp), %rax
movq -0x78(%rbp), %rcx
subq %rcx, %rax
cmpq $0x0, %rax
setg %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x3169f
jmp 0x31773
movq -0x78(%rbp), %rax
movzbl (%rax), %eax
sarl $0x4, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x1842a(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, (%rax)
movq -0x78(%rbp), %rax
movzbl (%rax), %eax
sarl $0x0, %eax
andl $0xf, %eax
movslq %eax, %rcx
leaq 0x18407(%rip), %rax     # 0x49ae0
movb (%rax,%rcx), %cl
movq -0x88(%rbp), %rax
movb %cl, 0x1(%rax)
movq -0x88(%rbp), %rax
addq $0x3, %rax
movq %rax, -0x88(%rbp)
callq 0xff40
movq (%rax), %rax
movq -0x78(%rbp), %rcx
movzbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
je 0x31727
movq -0x78(%rbp), %rax
movzbl (%rax), %eax
movl %eax, -0xa0(%rbp)
jmp 0x31734
movl $0x2e, %eax
movl %eax, -0xa0(%rbp)
jmp 0x31734
movl -0xa0(%rbp), %eax
movb %al, %cl
movq -0x90(%rbp), %rax
movq %rax, %rdx
addq $0x1, %rdx
movq %rdx, -0x90(%rbp)
movb %cl, (%rax)
movl -0x94(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x94(%rbp)
movq -0x78(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x78(%rbp)
jmp 0x31667
movq -0x88(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movl -0x98(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x31650
leaq -0x70(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0xffb0
jmp 0x3150b
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)