// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/esa-scanprj.c
// Function: gt_scannedprjkey_scanline
static int gt_scannedprjkey_scanline(uint32_t *lengthofkey,
                                     GtScannedprjvalue *scannedprjvalue,
                                     const char *linebuffer,
                                     GtUword linelength,
                                     GtError *err)
{
  GtUword idx;
  bool haserr = false, found = false;
  int retval = 0;

  gt_error_check(err);
  for (idx=0; idx<linelength; idx++)
  {
    if (linebuffer[idx] == '=')
    {
      *lengthofkey = (uint32_t) idx;
      found = true;
      if (strchr(linebuffer + idx + 1,'.') != NULL)
      {
        double readdouble;

        if (sscanf((const char *) (linebuffer + idx + 1),"%lf",
                   &readdouble) != 1)
        {
          gt_error_set(err,"cannot find floating point number in \"%*.*s\"",
                             (int) (linelength - (idx+1)),
                             (int) (linelength - (idx+1)),
                             linebuffer + idx + 1);
          return -1;
        }
        scannedprjvalue->doublevalue = readdouble;
        retval = 2;
      } else
      {
        int64_t readint;

        if (sscanf((const char *) (linebuffer + idx + 1),
                   FormatScanint64_t,
                   SCANint64_tcast(&readint)) != 1 || readint < (int64_t) 0)
        {
          gt_error_set(err,"cannot find non-negative integer in \"%*.*s\"",
                             (int) (linelength - (idx+1)),
                             (int) (linelength - (idx+1)),
                             linebuffer + idx + 1);
          return -1;
        }
        if (readint <= (int64_t) UINT32_MAX)
        {
          scannedprjvalue->uint32value = (uint32_t) readint;
          retval = 0;
        } else
        {
          scannedprjvalue->uint64value = (uint64_t) readint;
          retval = 1;
        }
      }
      break;
    }
  }
  if (!found)
  {
    gt_error_set(err,"missing equality symbol in \"%*.*s\"",
                       (int) linelength,
                       (int) linelength,
                       linebuffer);
    haserr = true;
  }
  return haserr ? -1 : retval;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %r8, %rbx
movq %rcx, %r14
movq %rdx, %rbp
movq %rsi, 0x8(%rsp)
movq %rdi, %r15
testq %r8, %r8
je 0x1a5462
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x1a557a
testq %r14, %r14
je 0x1a5481
leaq 0x1(%rbp), %r12
xorl %r13d, %r13d
cmpb $0x3d, -0x1(%r12)
je 0x1a54af
incq %r13
incq %r12
cmpq %r13, %r14
jne 0x1a546e
leaq 0x1ff9d7(%rip), %rsi    # 0x3a4e5f
movq %rbx, %rdi
movl %r14d, %edx
movl %r14d, %ecx
movq %rbp, %r8
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl %r13d, (%r15)
movq %r12, %rdi
movl $0x2e, %esi
callq 0x17280
testq %rax, %rax
je 0x1a54f5
leaq 0x1a7ff6(%rip), %rsi    # 0x34d4c1
leaq 0x10(%rsp), %rdx
movq %r12, %rdi
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
jne 0x1a553b
movsd 0x10(%rsp), %xmm0
movq 0x8(%rsp), %rax
movsd %xmm0, (%rax)
movl $0x2, %eax
jmp 0x1a54a0
leaq 0x1d6dc8(%rip), %rsi    # 0x37c2c4
leaq 0x10(%rsp), %r15
movq %r12, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
sete %cl
movq (%r15), %rax
testq %rax, %rax
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
jne 0x1a554a
movq %rax, %rcx
shrq $0x20, %rcx
jne 0x1a5568
movq 0x8(%rsp), %rcx
movl %eax, (%rcx)
xorl %eax, %eax
jmp 0x1a54a0
notl %r13d
addl %r14d, %r13d
leaq 0x1ff8be(%rip), %rsi    # 0x3a4e06
jmp 0x1a5557
notl %r13d
addl %r14d, %r13d
leaq 0x1ff8dc(%rip), %rsi    # 0x3a4e33
movq %rbx, %rdi
movl %r13d, %edx
movl %r13d, %ecx
movq %r12, %r8
jmp 0x1a5494
movq 0x8(%rsp), %rcx
movq %rax, (%rcx)
movl $0x1, %eax
jmp 0x1a54a0
callq 0x62645
nop