// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/match/esa-scanprj.c
// Function: gt_scannedprjkey_analyze
int gt_scannedprjkey_analyze(const char *indexname,
                             const char *suffix,
                             unsigned int linenum,
                             const char *linebuffer,
                             GtUword linelength,
                             GtScannedprjkeytable *scannedprjkeytable,
                             GtError *err)
{
  GtScannedprjkey *rikptr;
  bool found = false, haserr = false;
  GtUword i;
  int retval;
  GtScannedprjvalue scannedprjvalue;
  uint32_t lengthofkey;

  gt_error_check(err);
  retval = gt_scannedprjkey_scanline(&lengthofkey,
                                     &scannedprjvalue,
                                     linebuffer,
                                     linelength,
                                     err);
  if (retval < 0)
  {
    haserr = true;
  } else
  {
    for (i=0; i<gt_array_size(scannedprjkeytable->arr); i++)
    {
      rikptr = gt_array_get(scannedprjkeytable->arr,i);
      if (memcmp(linebuffer, rikptr->keystring,(size_t) lengthofkey) == 0)
      {
        rikptr->found = true;
        if (rikptr->ptrdefined)
        {
          if (rikptr->uint32valueptr == NULL)
          {
            if (retval == 1)
            {
              *(rikptr->uint64valueptr) = scannedprjvalue.uint64value;
            } else
            {
              if (retval == 2)
              {
                gt_assert(rikptr->readdouble);
                *(rikptr->doublevalueptr) = scannedprjvalue.doublevalue;
              } else
              {
                gt_assert(retval == 0);
                *(rikptr->uint64valueptr)
                  = (uint64_t) scannedprjvalue.uint32value;
              }
            }
          } else
          {
            if (retval == 1)
            {
              gt_error_set(err,"uint64value " Formatuint64_t
                           " does not fit into %s",
                           PRINTuint64_tcast(scannedprjvalue.uint64value),
                           rikptr->keystring);
              haserr = true;
              break;
            }
            if (retval == 2)
            {
              gt_error_set(err,"double %.2f does not fit into %s",
                           scannedprjvalue.doublevalue,
                           rikptr->keystring);
              haserr = true;
              break;
            }
            *(rikptr->uint32valueptr) = scannedprjvalue.uint32value;
          }
        }
        found = true;
        break;
      }
    }
    if (!found)
    {
      gt_error_set(err,"file %s%s, line %u: cannot find key for \"%*.*s\"",
                    indexname,
                    suffix,
                    linenum,
                    (int) lengthofkey,
                    (int) lengthofkey,
                    linebuffer);
      haserr = true;
    }
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, %rbp
movq %r8, %r14
movq %rcx, %rbx
movl %edx, %r15d
movq %rsi, %r12
movq %rdi, %r13
movq 0x60(%rsp), %rdi
testq %rdi, %rdi
je 0x1a52ad
callq 0xfcc32
testb %al, %al
jne 0x1a541f
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
movq %rbx, %rdx
movq %r14, %rcx
movq 0x60(%rsp), %r8
jmp 0x1a52be
leaq 0x10(%rsp), %rdi
movq %rsp, %rsi
movq %rbx, %rdx
movq %r14, %rcx
xorl %r8d, %r8d
callq 0x1a542e
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %ecx, %ecx
js 0x1a5410
movl %ecx, 0xc(%rsp)
movq %r13, 0x18(%rsp)
movq %r12, 0x20(%rsp)
movl %r15d, 0x14(%rsp)
movq (%rbp), %rdi
callq 0xd24e0
movl 0x10(%rsp), %r14d
testq %rax, %rax
je 0x1a5330
xorl %r15d, %r15d
movq (%rbp), %rdi
movq %r15, %rsi
callq 0xd2207
movq %rax, %r12
movq (%rax), %r13
movq %rbx, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x17830
testl %eax, %eax
je 0x1a5366
incq %r15
movq (%rbp), %rdi
callq 0xd24e0
cmpq %rax, %r15
jb 0x1a52fb
leaq 0x1ffa85(%rip), %rsi    # 0x3a4dbc
movq 0x60(%rsp), %rdi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movl 0x14(%rsp), %r8d
movl %r14d, %r9d
xorl %eax, %eax
pushq %rbx
pushq %r14
callq 0xfcb67
addq $0x10, %rsp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1a5410
movb $0x1, 0x22(%r12)
cmpb $0x1, 0x21(%r12)
jne 0x1a540e
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x1a53ac
movl 0xc(%rsp), %ecx
cmpl $0x2, %ecx
je 0x1a53c4
cmpl $0x1, %ecx
jne 0x1a53e4
movq (%rsp), %rdx
leaq 0x1ff9db(%rip), %rsi    # 0x3a4d76
movq 0x60(%rsp), %rdi
movq %r13, %rcx
xorl %eax, %eax
callq 0xfcb67
jmp 0x1a5330
movl 0xc(%rsp), %eax
testl %eax, %eax
je 0x1a5403
cmpl $0x2, %eax
je 0x1a53eb
cmpl $0x1, %eax
jne 0x1a5424
movq (%rsp), %rax
jmp 0x1a5406
movsd (%rsp), %xmm0
leaq 0x1ff9cb(%rip), %rsi    # 0x3a4d9b
movq 0x60(%rsp), %rdi
movq %r13, %rdx
movb $0x1, %al
callq 0xfcb67
jmp 0x1a5330
movl (%rsp), %ecx
movl %ecx, (%rax)
jmp 0x1a540e
cmpb $0x0, 0x20(%r12)
je 0x1a5429
movsd (%rsp), %xmm0
movq 0x18(%r12), %rax
movsd %xmm0, (%rax)
jmp 0x1a540e
movl (%rsp), %eax
movq 0x10(%r12), %rcx
movq %rax, (%rcx)
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x6259a
callq 0x6260c
callq 0x625d3