// File: /workspace/github_c_makefile_star2_O0/tylerneylon[P]APIsWithLua/lua/liolib.c
// Function: read_number
static int read_number (lua_State *L, FILE *f) {
  RN rn;
  int count = 0;
  int hex = 0;
  char decp[2];
  rn.f = f; rn.n = 0;
  decp[0] = lua_getlocaledecpoint();  /* get decimal point from locale */
  decp[1] = '.';  /* always accept a dot */
  l_lockfile(rn.f);
  do { rn.c = l_getc(rn.f); } while (isspace(rn.c));  /* skip spaces */
  test2(&rn, "-+");  /* optional signal */
  if (test2(&rn, "00")) {
    if (test2(&rn, "xX")) hex = 1;  /* numeral is hexadecimal */
    else count = 1;  /* count initial '0' as a valid digit */
  }
  count += readdigits(&rn, hex);  /* integral part */
  if (test2(&rn, decp))  /* decimal point? */
    count += readdigits(&rn, hex);  /* fractional part */
  if (count > 0 && test2(&rn, (hex ? "pP" : "eE"))) {  /* exponent mark? */
    test2(&rn, "-+");  /* exponent signal */
    readdigits(&rn, 0);  /* exponent digits */
  }
  ungetc(rn.c, rn.f);  /* unread look-ahead char */
  l_unlockfile(rn.f);
  rn.buff[rn.n] = '\0';  /* finish string */
  if (lua_stringtonumber(L, rn.buff))  /* is this a valid number? */
    return 1;  /* ok */
  else {  /* invalid format */
   lua_pushnil(L);  /* "result" to be removed */
   return 0;  /* read fails */
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0xfc(%rbp)
movl $0x0, -0x100(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xf8(%rbp)
movl $0x0, -0xec(%rbp)
callq 0x5100
movq (%rax), %rax
movb (%rax), %al
movb %al, -0x102(%rbp)
movb $0x2e, -0x101(%rbp)
movq -0xf8(%rbp), %rdi
callq 0x54c0
movl %eax, -0xf0(%rbp)
callq 0x5500
movq (%rax), %rax
movslq -0xf0(%rbp), %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
jne 0x2a073
leaq -0xf8(%rbp), %rdi
leaq 0xc08d(%rip), %rsi      # 0x3613d
callq 0x2a2a0
leaq -0xf8(%rbp), %rdi
leaq 0xc64a(%rip), %rsi      # 0x3670d
callq 0x2a2a0
cmpl $0x0, %eax
je 0x2a0fd
leaq -0xf8(%rbp), %rdi
leaq 0xc05c(%rip), %rsi      # 0x36137
callq 0x2a2a0
cmpl $0x0, %eax
je 0x2a0f1
movl $0x1, -0x100(%rbp)
jmp 0x2a0fb
movl $0x1, -0xfc(%rbp)
jmp 0x2a0fd
movl -0x100(%rbp), %esi
leaq -0xf8(%rbp), %rdi
callq 0x2a300
addl -0xfc(%rbp), %eax
movl %eax, -0xfc(%rbp)
leaq -0x102(%rbp), %rsi
leaq -0xf8(%rbp), %rdi
callq 0x2a2a0
cmpl $0x0, %eax
je 0x2a151
movl -0x100(%rbp), %esi
leaq -0xf8(%rbp), %rdi
callq 0x2a300
addl -0xfc(%rbp), %eax
movl %eax, -0xfc(%rbp)
cmpl $0x0, -0xfc(%rbp)
jle 0x2a1a7
movl -0x100(%rbp), %ecx
leaq 0xc5ac(%rip), %rsi      # 0x36713
leaq 0xc5a2(%rip), %rax      # 0x36710
cmpl $0x0, %ecx
cmovneq %rax, %rsi
leaq -0xf8(%rbp), %rdi
callq 0x2a2a0
cmpl $0x0, %eax
je 0x2a1a7
leaq -0xf8(%rbp), %rdi
leaq 0xbfa9(%rip), %rsi      # 0x3613d
callq 0x2a2a0
leaq -0xf8(%rbp), %rdi
xorl %esi, %esi
callq 0x2a300
movl -0xf0(%rbp), %edi
movq -0xf8(%rbp), %rsi
callq 0x5360
movslq -0xec(%rbp), %rax
movb $0x0, -0xe8(%rbp,%rax)
movq -0x10(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
addq $0x10, %rsi
callq 0x6600
cmpq $0x0, %rax
je 0x2a1eb
movl $0x1, -0x4(%rbp)
jmp 0x2a1fb
movq -0x10(%rbp), %rdi
callq 0x6b60
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw (%rax,%rax)