// File: /workspace/github_c_makefile_star2_O0/mrkite[P]regs/src/main.cc
// Function: parseNum(char const*)
static inline uint32_t parseNum(const char *s) {
  uint32_t bank = 0;
  uint32_t res = 0;
  while (isspace(*s)) {
    s++;
  }
  bool ishex = false;
  if (s[0] == '0' && s[1] == 'x') {
    s += 2;
    ishex = true;
  } else if (s[0] == '$') {
    s++;
    ishex = true;
  }
  if (ishex) {
    while (isxdigit(*s) || *s == '/') {
      if (*s == '/') {
        s++;
        bank = res;
        res = 0;
        continue;
      }
      res <<= 4;
      if (isdigit(*s)) {
        res |= *s - '0';
      } else if (*s >= 'a' && *s <= 'f') {
        res |= *s - 'a' + 10;
      } else {
        res |= *s - 'A' + 10;
      }
      s++;
    }
  } else {
    while (isdigit(*s)) {
      res *= 10;
      res += *s - '0';
      s++;
    }
  }
  return (bank << 16) | res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x6080
cmpl $0x0, %eax
je 0x7a79
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x7a5a
movb $0x0, -0x11(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x7aa8
movq -0x8(%rbp), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
jne 0x7aa8
movq -0x8(%rbp), %rax
addq $0x2, %rax
movq %rax, -0x8(%rbp)
movb $0x1, -0x11(%rbp)
jmp 0x7ac6
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x24, %eax
jne 0x7ac4
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movb $0x1, -0x11(%rbp)
jmp 0x7ac6
testb $0x1, -0x11(%rbp)
je 0x7bae
jmp 0x7ad2
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x60e0
movl %eax, %ecx
movb $0x1, %al
cmpl $0x0, %ecx
movb %al, -0x12(%rbp)
jne 0x7afa
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
sete %al
movb %al, -0x12(%rbp)
movb -0x12(%rbp), %al
testb $0x1, %al
jne 0x7b06
jmp 0x7bac
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x2f, %eax
jne 0x7b2d
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
movl -0x10(%rbp), %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
jmp 0x7ad2
movl -0x10(%rbp), %eax
shll $0x4, %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x62c0
cmpl $0x0, %eax
je 0x7b59
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x7b9b
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x61, %eax
jl 0x7b86
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x66, %eax
jg 0x7b86
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
subl $0x61, %eax
addl $0xa, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x7b99
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
subl $0x41, %eax
addl $0xa, %eax
orl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
jmp 0x7b9b
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x7ad2
jmp 0x7be8
jmp 0x7bb0
movq -0x8(%rbp), %rax
movsbl (%rax), %edi
callq 0x62c0
cmpl $0x0, %eax
je 0x7be6
imull $0xa, -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
movsbl (%rax), %eax
subl $0x30, %eax
addl -0x10(%rbp), %eax
movl %eax, -0x10(%rbp)
movq -0x8(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x8(%rbp)
jmp 0x7bb0
jmp 0x7be8
movl -0xc(%rbp), %eax
shll $0x10, %eax
orl -0x10(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)