// File: /workspace/github_c_makefile_star2_O0/mrkite[P]regs/src/scanner.cc
// Function: Scanner::hex[abi:cxx11](unsigned int, unsigned long)
std::string Scanner::hex(uint32_t value, size_t len) {
  static const char *digits = "0123456789abcdef";
  if (len == 6) {
    std::string ret="00/0000";
    for (size_t i = 0, j = 5 << 2; i < 6; i++, j -= 4) {
      ret[i < 2 ? i : i + 1] = digits[(value >> j) & 0xf];
    }
    return ret;
  }
  std::string ret(len, '0');
  for (size_t i = 0, j = (len - 1) << 2; i < len; i++, j -= 4) {
    ret[i] = digits[(value >> j) & 0xf];
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x70(%rbp)
movq %rdi, %rax
movq %rax, -0x68(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
cmpq $0x6, -0x20(%rbp)
jne 0x31269
movb $0x0, -0x21(%rbp)
leaq -0x22(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x6560
movq -0x70(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x9197(%rip), %rsi      # 0x3a307
callq 0x7c00
jmp 0x31177
leaq -0x22(%rbp), %rdi
callq 0x6350
movq $0x0, -0x40(%rbp)
movq $0x14, -0x48(%rbp)
cmpq $0x6, -0x40(%rbp)
jae 0x31251
movq 0x555f6(%rip), %rax     # 0x86798
movl -0x14(%rbp), %edx
movq -0x48(%rbp), %rcx
shrl %cl, %edx
movl %edx, %ecx
andl $0xf, %ecx
movl %ecx, %ecx
movb (%rax,%rcx), %al
movb %al, -0x79(%rbp)
cmpq $0x2, -0x40(%rbp)
jae 0x311cc
movq -0x40(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x311db
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x88(%rbp)
movq -0x70(%rbp), %rdi
movq -0x88(%rbp), %rsi
callq 0x65f0
movq %rax, -0x90(%rbp)
jmp 0x311f4
movq -0x90(%rbp), %rax
movb -0x79(%rbp), %cl
movb %cl, (%rax)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x48(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x48(%rbp)
jmp 0x31190
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x22(%rbp), %rdi
callq 0x6350
jmp 0x31381
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x61e0
jmp 0x31381
movb $0x1, -0x21(%rbp)
testb $0x1, -0x21(%rbp)
jne 0x31264
movq -0x70(%rbp), %rdi
callq 0x61e0
jmp 0x31374
movb $0x0, -0x49(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0xa0(%rbp)
leaq -0x4a(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x6560
movq -0x70(%rbp), %rdi
movq -0xa0(%rbp), %rsi
movq -0x98(%rbp), %rcx
movl $0x30, %edx
callq 0x1de90
jmp 0x312a6
leaq -0x4a(%rbp), %rdi
callq 0x6350
movq $0x0, -0x58(%rbp)
movq -0x20(%rbp), %rax
subq $0x1, %rax
shlq $0x2, %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
cmpq -0x20(%rbp), %rax
jae 0x3135f
movq -0x70(%rbp), %rdi
movq 0x554b8(%rip), %rax     # 0x86798
movl -0x14(%rbp), %edx
movb -0x60(%rbp), %cl
shrl %cl, %edx
movl %edx, %ecx
andl $0xf, %ecx
movb (%rax,%rcx), %al
movb %al, -0xa9(%rbp)
movq -0x58(%rbp), %rsi
callq 0x65f0
movq %rax, -0xa8(%rbp)
jmp 0x31308
movq -0xa8(%rbp), %rax
movb -0xa9(%rbp), %cl
movb %cl, (%rax)
movq -0x58(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x58(%rbp)
movq -0x60(%rbp), %rax
subq $0x4, %rax
movq %rax, -0x60(%rbp)
jmp 0x312c7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x4a(%rbp), %rdi
callq 0x6350
jmp 0x31381
movq -0x70(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
callq 0x61e0
jmp 0x31381
movb $0x1, -0x49(%rbp)
testb $0x1, -0x49(%rbp)
jne 0x31372
movq -0x70(%rbp), %rdi
callq 0x61e0
jmp 0x31374
movq -0x68(%rbp), %rax
addq $0xb0, %rsp
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0x6540
nopw (%rax,%rax)