// File: biotomas[P]ipasir/sat/picosat961/picosat-961/picosat.c
// Function: ascii2flt
static Flt
ascii2flt (const char *str)
{
  Flt ten = base2flt (10, 0);
  Flt onetenth = base2flt (26843546, -28);
  Flt res = ZEROFLT, tmp, base;
  const char *p = str;
  char ch;

  ch = *p++;

  if (ch != '.')
    {
      if (!isdigit (ch))
	return INFFLT;	/* better abort ? */

      res = base2flt (ch - '0', 0);

      while ((ch = *p++))
	{
	  if (ch == '.')
	    break;

	  if (!isdigit (ch))
	    return INFFLT;	/* better abort? */

	  res = mulflt (res, ten);
	  tmp = base2flt (ch - '0', 0);
	  res = addflt (res, tmp);
	}
    }

  if (ch == '.')
    {
      ch = *p++;
      if (!isdigit (ch))
	return INFFLT;	/* better abort ? */

      base = onetenth;
      tmp = mulflt (base2flt (ch - '0', 0), base);
      res = addflt (res, tmp);

      while ((ch = *p++))
	{
	  if (!isdigit (ch))
	    return INFFLT;	/* better abort? */

	  base = mulflt (base, onetenth);
	  tmp = mulflt (base2flt (ch - '0', 0), base);
	  res = addflt (res, tmp);
	}
    }

  return res;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movl $0xa, %edi
xorl %esi, %esi
callq 0xdfd0
movl %eax, -0x14(%rbp)
movl $0x199999a, %edi        # imm = 0x199999A
movl $0xffffffe4, %esi       # imm = 0xFFFFFFE4
callq 0xdfd0
movl %eax, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %al
movb %al, -0x31(%rbp)
movsbl -0x31(%rbp), %eax
cmpl $0x2e, %eax
je 0xe194
callq 0x1200
movq (%rax), %rax
movsbl -0x31(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0xe106
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe28c
movsbl -0x31(%rbp), %edi
subl $0x30, %edi
xorl %esi, %esi
callq 0xdfd0
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %al
movb %al, -0x31(%rbp)
cmpb $0x0, %al
je 0xe192
movsbl -0x31(%rbp), %eax
cmpl $0x2e, %eax
jne 0xe13a
jmp 0xe192
callq 0x1200
movq (%rax), %rax
movsbl -0x31(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0xe163
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe28c
movl -0x1c(%rbp), %edi
movl -0x14(%rbp), %esi
callq 0xe350
movl %eax, -0x1c(%rbp)
movsbl -0x31(%rbp), %edi
subl $0x30, %edi
xorl %esi, %esi
callq 0xdfd0
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0xe500
movl %eax, -0x1c(%rbp)
jmp 0xe117
jmp 0xe194
movsbl -0x31(%rbp), %eax
cmpl $0x2e, %eax
jne 0xe286
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %al
movb %al, -0x31(%rbp)
callq 0x1200
movq (%rax), %rax
movsbl -0x31(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0xe1de
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe28c
movl -0x18(%rbp), %eax
movl %eax, -0x24(%rbp)
movsbl -0x31(%rbp), %edi
subl $0x30, %edi
xorl %esi, %esi
callq 0xdfd0
movl %eax, %edi
movl -0x24(%rbp), %esi
callq 0xe350
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0xe500
movl %eax, -0x1c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rcx
addq $0x1, %rcx
movq %rcx, -0x30(%rbp)
movb (%rax), %al
movb %al, -0x31(%rbp)
cmpb $0x0, %al
je 0xe284
callq 0x1200
movq (%rax), %rax
movsbl -0x31(%rbp), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0xe24b
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xe28c
movl -0x24(%rbp), %edi
movl -0x18(%rbp), %esi
callq 0xe350
movl %eax, -0x24(%rbp)
movsbl -0x31(%rbp), %edi
subl $0x30, %edi
xorl %esi, %esi
callq 0xdfd0
movl %eax, %edi
movl -0x24(%rbp), %esi
callq 0xe350
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %edi
movl -0x20(%rbp), %esi
callq 0xe500
movl %eax, -0x1c(%rbp)
jmp 0xe20d
jmp 0xe286
movl -0x1c(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)