// File: mattn[P]minijson/./minijson.h
// Function: minijson::error minijson::parse_number<char const*>(char const*&, minijson::value&)
inline error
parse_number(Iter& i, value& v) {
  Iter p = i;

#define _IS_NUM(x)  ('0' <= x && x <= '9')
#define _IS_ALNUM(x)  (('0' <= x && x <= '9') || ('a' <= x && x <= 'f') || ('A' <= x && x <= 'F'))
  if (*i == '0' && *(i + 1) == 'x' && _IS_ALNUM(*(i+2))) {
    i += 3;
    while (_IS_ALNUM(*i)) i++;
    v = (number) strtod(p, nullptr);
  } else {
    while (_IS_NUM(*i)) i++;
    if (*i == '.') {
      i++;
      if (!_IS_NUM(*i)) {
        i = p;
        return invalid_token_error;
      }
      while (_IS_NUM(*i)) i++;
    }
    if (*i == 'e') {
      i++;
      if (!_IS_NUM(*i)) {
        i = p;
        return invalid_token_error;
      }
      while (_IS_NUM(*i)) i++;
    }
    v = (number) strtod(p, nullptr);
  }
  if (*i && nullptr == strchr(":,\x7d]\r\n ", *i)) {
    i = p;
    return invalid_token_error;
  }
  return no_error;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x30, %eax
jne 0x72ca
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x1(%rax), %eax
cmpl $0x78, %eax
jne 0x72ca
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x71b6
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x39, %eax
jle 0x7206
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %ecx
movl $0x61, %eax
cmpl %ecx, %eax
jg 0x71da
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x66, %eax
jle 0x7206
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %ecx
movl $0x41, %eax
cmpl %ecx, %eax
jg 0x72ca
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl 0x2(%rax), %eax
cmpl $0x46, %eax
jg 0x72ca
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x3, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x723b
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x39, %ecx
movb %al, -0x21(%rbp)
jle 0x7293
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movl $0x61, %eax
cmpl %ecx, %eax
jg 0x7262
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movb $0x1, %al
cmpl $0x66, %ecx
movb %al, -0x21(%rbp)
jle 0x7293
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edx
xorl %eax, %eax
movl $0x41, %ecx
cmpl %edx, %ecx
movb %al, -0x22(%rbp)
jg 0x728d
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x46, %eax
setle %al
movb %al, -0x22(%rbp)
movb -0x22(%rbp), %al
movb %al, -0x21(%rbp)
movb -0x21(%rbp), %al
testb $0x1, %al
jne 0x729c
jmp 0x72af
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x7214
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2180
movq -0x18(%rbp), %rdi
callq 0x9010
jmp 0x746a
jmp 0x72cc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edx
xorl %eax, %eax
movl $0x30, %ecx
cmpl %edx, %ecx
movb %al, -0x23(%rbp)
jg 0x72f7
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x23(%rbp)
movb -0x23(%rbp), %al
testb $0x1, %al
jne 0x7300
jmp 0x7310
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x72cc
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x2e, %eax
jne 0x73b2
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x7353
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x736a
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x74b1
jmp 0x736c
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edx
xorl %eax, %eax
movl $0x30, %ecx
cmpl %edx, %ecx
movb %al, -0x24(%rbp)
jg 0x7397
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x24(%rbp)
movb -0x24(%rbp), %al
testb $0x1, %al
jne 0x73a0
jmp 0x73b0
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x736c
jmp 0x73b2
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x65, %eax
jne 0x7454
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %ecx
movl $0x30, %eax
cmpl %ecx, %eax
jg 0x73f5
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
jle 0x740c
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x74b1
jmp 0x740e
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %edx
xorl %eax, %eax
movl $0x30, %ecx
cmpl %edx, %ecx
movb %al, -0x25(%rbp)
jg 0x7439
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %eax
cmpl $0x39, %eax
setle %al
movb %al, -0x25(%rbp)
movb -0x25(%rbp), %al
testb $0x1, %al
jne 0x7442
jmp 0x7452
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
jmp 0x740e
jmp 0x7454
movq -0x20(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x2180
movq -0x18(%rbp), %rdi
callq 0x9010
movq -0x10(%rbp), %rax
movq (%rax), %rax
cmpb $0x0, (%rax)
je 0x74aa
movq -0x10(%rbp), %rax
movq (%rax), %rax
movsbl (%rax), %esi
leaq 0x2d18(%rip), %rdi      # 0xa19f
callq 0x2090
movq %rax, %rcx
xorl %eax, %eax
cmpq %rcx, %rax
jne 0x74aa
movq -0x20(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movl $0x2, -0x4(%rbp)
jmp 0x74b1
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)