// File: /workspace/github_c_makefile_star2_O0/smilingthax[P]libfontembed/cff.c
// Function: cff_read_real
double cff_read_real(const char **buf) // {{{   NAN on error
{
  int iA,iB=0;

  char tmp[250];
  while (1) {
    const unsigned char b=**buf;
    const unsigned char n1=b&0x0f;
    const unsigned char n[2]={b>>4, n1};
    for (iA=0;iA<2;iA++) {
      switch (n[iA]) {
      case 0x0a:
        tmp[iB++]='.';
        break;
      case 0x0b:
        tmp[iB++]='E';
        tmp[iB++]='+';
        break;
      case 0x0c:
        tmp[iB++]='E';
        tmp[iB++]='-';
        break;
      case 0x0d:
        assert(0);
        break;
      case 0x0e:
        tmp[iB++]='-';
        break;
      case 0x0f:
        tmp[iB++]=0;
        break;
      default: // 0-9
        tmp[iB++]=n[iA]+'0';
        break;
      }
    }
    (*buf)++;
    assert(iB<200);
    if (iB>=200) {
      return NAN;
    }
    if (n1==0xf) {
      break;
    }
  }
  char *end;
  double ret=strtod(tmp,&end);
  assert(!*end);
  if (*end) {
    return NAN;
  }
  return ret;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x140, %rsp            # imm = 0x140
movq %rdi, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x121(%rbp)
movzbl -0x121(%rbp), %eax
andl $0xf, %eax
movb %al, -0x122(%rbp)
movzbl -0x121(%rbp), %eax
sarl $0x4, %eax
movb %al, -0x124(%rbp)
movb -0x122(%rbp), %al
movb %al, -0x123(%rbp)
movl $0x0, -0x14(%rbp)
cmpl $0x2, -0x14(%rbp)
jge 0x78b1
movslq -0x14(%rbp), %rax
movzbl -0x124(%rbp,%rax), %eax
addl $-0xa, %eax
movl %eax, %ecx
movq %rcx, -0x140(%rbp)
subl $0x5, %eax
ja 0x787c
movq -0x140(%rbp), %rax
leaq 0x302f(%rip), %rcx      # 0xa7e0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x2e, -0x120(%rbp,%rax)
jmp 0x78a1
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x45, -0x120(%rbp,%rax)
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x2b, -0x120(%rbp,%rax)
jmp 0x78a1
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x45, -0x120(%rbp,%rax)
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x2d, -0x120(%rbp,%rax)
jmp 0x78a1
leaq 0x4288(%rip), %rdi      # 0xbabe
leaq 0x2880(%rip), %rsi      # 0xa0bd
movl $0x2d, %edx
leaq 0x2fcf(%rip), %rcx      # 0xa818
callq 0x40d0
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x2d, -0x120(%rbp,%rax)
jmp 0x78a1
movl -0x18(%rbp), %eax
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, -0x18(%rbp)
cltq
movb $0x0, -0x120(%rbp,%rax)
jmp 0x78a1
movslq -0x14(%rbp), %rax
movzbl -0x124(%rbp,%rax), %eax
addl $0x30, %eax
movb %al, %cl
movl -0x18(%rbp), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, -0x18(%rbp)
cltq
movb %cl, -0x120(%rbp,%rax)
jmp 0x78a3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x7778
movq -0x10(%rbp), %rax
movq (%rax), %rcx
addq $0x1, %rcx
movq %rcx, (%rax)
cmpl $0xc8, -0x18(%rbp)
jge 0x78ca
jmp 0x78e9
leaq 0x2f6b(%rip), %rdi      # 0xa83c
leaq 0x27e5(%rip), %rsi      # 0xa0bd
movl $0x3b, %edx
leaq 0x2f34(%rip), %rcx      # 0xa818
callq 0x40d0
cmpl $0xc8, -0x18(%rbp)
jl 0x7904
movsd 0x2ede(%rip), %xmm0     # 0xa7d8
movsd %xmm0, -0x8(%rbp)
jmp 0x7987
movzbl -0x122(%rbp), %eax
cmpl $0xf, %eax
jne 0x7912
jmp 0x7917
jmp 0x7736
leaq -0x120(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x40f0
movsd %xmm0, -0x138(%rbp)
movq -0x130(%rbp), %rax
cmpb $0x0, (%rax)
jne 0x7940
jmp 0x795f
leaq 0x2efc(%rip), %rdi      # 0xa843
leaq 0x276f(%rip), %rsi      # 0xa0bd
movl $0x45, %edx
leaq 0x2ebe(%rip), %rcx      # 0xa818
callq 0x40d0
movq -0x130(%rbp), %rax
cmpb $0x0, (%rax)
je 0x797a
movsd 0x2e65(%rip), %xmm0     # 0xa7d8
movsd %xmm0, -0x8(%rbp)
jmp 0x7987
movsd -0x138(%rbp), %xmm0
movsd %xmm0, -0x8(%rbp)
movsd -0x8(%rbp), %xmm0
addq $0x140, %rsp            # imm = 0x140
popq %rbp
retq
nopw %cs:(%rax,%rax)