// File: /workspace/github_c_makefile_star2_O3/mrkite[P]regs/src/scanner.cc
// Function: Scanner::dumpHex(std::ostream&, unsigned int, unsigned int)
void Scanner::dumpHex(std::ostream &f, uint32_t from, uint32_t to) {
  auto ptr = getAddress(from);
  if (ptr != nullptr) {
    for (int i = 0; !ptr->eof() && from < to; i += 16) {
      f << hex(from, 6) << ": ";
      std::string ascii;
      int skip = from & 0xf;
      int j = 0;
      for (; j < skip; j++) {
        if (j == 8) {
          f << " ";
          ascii += " ";
        }
        f << "   ";
        ascii += " ";
      }
      for (; j < 16 && !ptr->eof() && from < to; j++) {
        if (j == 8) {
          f << " ";
          ascii += " ";
        }
        uint8_t ch = ptr->r8();
        f << hex(ch, 2) << " ";
        ascii += isprint(ch) ? static_cast<char>(ch) : '.';
        from++;
      }
      for (; j < 16; j++) {
        f << "   ";
      }
      f << "| " << ascii << std::endl;
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %ecx, 0x24(%rsp)
movl %edx, %r15d
movq %rsi, %r14
movq %rdi, %rsi
leaq 0x58(%rsp), %rbx
movq %rbx, %rdi
callq 0x13d80
movq (%rbx), %rax
movq %rax, 0x28(%rsp)
testq %rax, %rax
je 0x14f7f
leaq 0x3195(%rip), %r13      # 0x17e9d
leaq 0x2622(%rip), %r12      # 0x17331
movq 0x28(%rsp), %rdi
callq 0x96ce
cmpl 0x24(%rsp), %r15d
setae %cl
orb %cl, %al
jne 0x14f7f
movl $0x6, %ecx
movq %rsp, %rdi
movl %r15d, %edx
callq 0x13df2
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x5260
movl $0x2, %edx
movq %rax, %rdi
leaq 0x2ee5(%rip), %rsi      # 0x17c3e
callq 0x5260
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x14d79
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5230
leaq 0x10(%rsp), %rax
movq %rax, (%rsp)
movq $0x0, 0x8(%rsp)
movb $0x0, 0x10(%rsp)
movl %r15d, %ebp
andl $0xf, %ebp
je 0x14ddf
xorl %ebx, %ebx
cmpl $0x8, %ebx
jne 0x14dba
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x5260
movq %rsp, %rdi
movq %r13, %rsi
callq 0x5430
movl $0x3, %edx
movq %r14, %rdi
leaq 0x30d2(%rip), %rsi      # 0x17e9b
callq 0x5260
movq %rsp, %rdi
movq %r13, %rsi
callq 0x5430
incl %ebx
cmpl %ebx, %ebp
jne 0x14d9a
movl %r15d, %eax
andl $-0x10, %eax
addl $0x10, %eax
movl %eax, 0x34(%rsp)
movq 0x28(%rsp), %rdi
callq 0x96ce
cmpl 0x24(%rsp), %r15d
setae %cl
orb %cl, %al
jne 0x14ee8
cmpl $0x8, %ebp
jne 0x14e26
movl $0x1, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x5260
movq %rsp, %rdi
movq %r13, %rsi
callq 0x5430
movq 0x28(%rsp), %rdi
callq 0x9780
movl %eax, %ebx
leaq 0x48(%rsp), %rax
movq %rax, 0x38(%rsp)
movl $0x2, %esi
leaq 0x38(%rsp), %rdi
movl $0x30, %edx
callq 0x5270
movzbl %bl, %ebx
movl $0x4, %ecx
xorl %eax, %eax
movl %ebx, %edx
shrl %cl, %edx
andl $0xf, %edx
movb (%rdx,%r12), %dl
movq 0x38(%rsp), %rsi
movb %dl, (%rsi,%rax)
incq %rax
addl $-0x4, %ecx
cmpq $0x2, %rax
jne 0x14e5a
movq 0x38(%rsp), %rsi
movq 0x40(%rsp), %rdx
movq %r14, %rdi
callq 0x5260
movl $0x1, %edx
movq %rax, %rdi
movq %r13, %rsi
callq 0x5260
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x14eb7
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5230
movl %ebx, %edi
callq 0x53f0
testl %eax, %eax
movl $0x2e, %eax
cmovel %eax, %ebx
movsbl %bl, %esi
movq %rsp, %rdi
callq 0x51f0
incl %r15d
incl %ebp
cmpl $0x10, %ebp
jne 0x14dec
movl 0x34(%rsp), %r15d
jmp 0x14f0c
cmpl $0xf, %ebp
ja 0x14f0c
movl $0x10, %ebx
movl $0x3, %edx
movq %r14, %rdi
leaq 0x2f9a(%rip), %rsi      # 0x17e9b
callq 0x5260
decl %ebx
cmpl %ebx, %ebp
jne 0x14ef2
movl $0x2, %edx
movq %r14, %rdi
leaq 0x2f84(%rip), %rsi      # 0x17e9f
callq 0x5260
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r14, %rdi
callq 0x5260
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x5210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x5040
movq %rax, %rdi
callq 0x5190
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x14d0f
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0x14d0f
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x14f8e
callq 0x671a
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x14f9f
movq %rax, %rbx
jmp 0x14fef
jmp 0x14fd1
jmp 0x14fd1
jmp 0x14fd1
jmp 0x14fd1
movq %rax, %rbx
movq 0x38(%rsp), %rdi
leaq 0x48(%rsp), %rax
cmpq %rax, %rdi
je 0x14fd4
movq 0x48(%rsp), %rsi
incq %rsi
callq 0x5230
jmp 0x14fd4
jmp 0x14fd1
jmp 0x14fd1
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x14fef
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x5230
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x14ffe
callq 0x671a
movq %rbx, %rdi
callq 0x53e0