// File: /workspace/github_c_makefile_star2_O0/cogbee[P]vmir-latest/src/vmir_support.c
// Function: vmir_hexdump
static void __attribute__((unused))
vmir_hexdump(const char *pfx, const void *data_, int len)
{
  int i, j, k;
  const uint8_t *data = data_;
  char buf[100];

  for(i = 0; i < len; i+= 16) {
    int p = snprintf(buf, sizeof(buf), "0x%06x: ", i);

    for(j = 0; j + i < len && j < 16; j++) {
      p += snprintf(buf + p, sizeof(buf) - p, "%s%02x ",
                    j==8 ? " " : "", data[i+j]);
    }
    const int cnt = (17 - j) * 3 + (j < 8);
    for(k = 0; k < cnt; k++)
      buf[p + k] = ' ';
    p += cnt;

    for(j = 0; j + i < len && j < 16; j++)
      buf[p++] = data[i+j] < 32 || data[i+j] > 126 ? '.' : data[i+j];
    buf[p] = 0;
    printf("%s: %s\n", pfx, buf);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xa0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x1c8e7
leaq -0x90(%rbp), %rdi
movl -0x18(%rbp), %ecx
movl $0x64, %esi
leaq 0x21f80(%rip), %rdx     # 0x3e667
movb $0x0, %al
callq 0x3180
movl %eax, -0x94(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
addl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x99(%rbp)
jge 0x1c71b
cmpl $0x10, -0x1c(%rbp)
setl %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0x1c727
jmp 0x1c799
leaq -0x90(%rbp), %rdi
movslq -0x94(%rbp), %rax
addq %rax, %rdi
movslq -0x94(%rbp), %rax
movl $0x64, %esi
subq %rax, %rsi
movl -0x1c(%rbp), %edx
leaq 0x22954(%rip), %rcx     # 0x3f0a5
leaq 0x226db(%rip), %rax     # 0x3ee33
cmpl $0x8, %edx
cmoveq %rax, %rcx
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %edx
addl -0x1c(%rbp), %edx
movslq %edx, %rdx
movzbl (%rax,%rdx), %r8d
leaq 0x21ef8(%rip), %rdx     # 0x3e670
movb $0x0, %al
callq 0x3180
addl -0x94(%rbp), %eax
movl %eax, -0x94(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1c6fb
movl $0x11, %eax
subl -0x1c(%rbp), %eax
imull $0x3, %eax, %eax
cmpl $0x8, -0x1c(%rbp)
setl %cl
andb $0x1, %cl
movzbl %cl, %ecx
addl %ecx, %eax
movl %eax, -0x98(%rbp)
movl $0x0, -0x20(%rbp)
movl -0x20(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0x1c7e9
movl -0x94(%rbp), %eax
addl -0x20(%rbp), %eax
cltq
movb $0x20, -0x90(%rbp,%rax)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
jmp 0x1c7c0
movl -0x98(%rbp), %eax
addl -0x94(%rbp), %eax
movl %eax, -0x94(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %ecx
addl -0x18(%rbp), %ecx
xorl %eax, %eax
cmpl -0x14(%rbp), %ecx
movb %al, -0x9a(%rbp)
jge 0x1c822
cmpl $0x10, -0x1c(%rbp)
setl %al
movb %al, -0x9a(%rbp)
movb -0x9a(%rbp), %al
testb $0x1, %al
jne 0x1c831
jmp 0x1c8b1
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x20, %eax
jl 0x1c85d
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x7e, %eax
jle 0x1c86a
movl $0x2e, %eax
movl %eax, -0xa0(%rbp)
jmp 0x1c881
movq -0x28(%rbp), %rax
movl -0x18(%rbp), %ecx
addl -0x1c(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %eax
movb %al, %cl
movl -0x94(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x94(%rbp)
cltq
movb %cl, -0x90(%rbp,%rax)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x1c802
movslq -0x94(%rbp), %rax
movb $0x0, -0x90(%rbp,%rax)
movq -0x8(%rbp), %rsi
leaq -0x90(%rbp), %rdx
leaq 0x21da6(%rip), %rdi     # 0x3e678
movb $0x0, %al
callq 0x3170
movl -0x18(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x18(%rbp)
jmp 0x1c6c5
addq $0xa0, %rsp
popq %rbp
retq