// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %r9, 0x38(%rsp)
movq %r8, %r12
movq %rcx, %r14
movl %edx, %ebx
movq %rsi, %r13
movq %rdi, %r15
movq 0x80(%rsp), %rbp
testq %rbp, %rbp
je 0x1513d5
movq %rbp, %rdi
callq 0x89eb7
testb %al, %al
jne 0x15161a
movq %rbp, %rdi
callq 0x89eb7
testb %al, %al
jne 0x151648
movq %r15, 0x30(%rsp)
xorl %r15d, %r15d
cmpq %r15, %r12
je 0x1513ee
cmpb $0x3d, (%r14,%r15)
je 0x151406
incq %r15
jmp 0x1513dd
leaq 0x1f3dea(%rip), %rsi    # 0x3451df
movq %rbp, %rdi
movl %r12d, %edx
movl %r12d, %ecx
movq %r14, %r8
jmp 0x151564
movq %r13, 0x28(%rsp)
leaq (%r14,%r15), %r13
incq %r13
pushq $0x2e
popq %rsi
movq %r13, %rdi
callq 0x17260
testq %rax, %rax
je 0x151458
leaq 0x19c098(%rip), %rsi    # 0x2ed4c1
leaq 0x20(%rsp), %rdx
movq %r13, %rdi
xorl %eax, %eax
callq 0x177b0
cmpl $0x1, %eax
jne 0x15153c
movl %ebx, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
pushq $0x2
popq %rax
movl %eax, 0xc(%rsp)
jmp 0x1514a4
movl %ebx, 0x1c(%rsp)
leaq 0x1cb26c(%rip), %rsi    # 0x31c6cf
leaq 0x20(%rsp), %rbx
movq %r13, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x177b0
cmpl $0x1, %eax
sete %al
movq (%rbx), %rdx
testq %rdx, %rdx
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x15154b
xorl %ecx, %ecx
movq %rdx, %rax
movq %rdx, 0x10(%rsp)
shrq $0x20, %rax
setne %cl
movl %ecx, 0xc(%rsp)
movl %r15d, %eax
movq %rax, 0x40(%rsp)
xorl %ebp, %ebp
movq 0x38(%rsp), %rbx
movq (%rbx), %rdi
callq 0x586a4
cmpq %rax, %rbp
jae 0x1515bf
movq (%rbx), %rdi
movq %rbp, %rsi
callq 0x581aa
movq %rax, %r13
movq (%rax), %r12
movq %r14, %rdi
movq %r12, %rsi
movq 0x40(%rsp), %rdx
callq 0x177e0
incq %rbp
testl %eax, %eax
jne 0x1514b3
movb $0x1, 0x22(%r13)
xorl %eax, %eax
cmpb $0x1, 0x21(%r13)
jne 0x15156e
movq 0x8(%r13), %rcx
testq %rcx, %rcx
je 0x15157d
movl 0xc(%rsp), %edx
cmpl $0x2, %edx
je 0x1515a0
cmpl $0x1, %edx
movq 0x80(%rsp), %rdi
jne 0x1515f2
leaq 0x1f3bce(%rip), %rsi    # 0x3450f6
movq 0x10(%rsp), %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x89dbb
jmp 0x1515bf
notl %r15d
addl %r12d, %r15d
leaq 0x1f3c3d(%rip), %rsi    # 0x345186
jmp 0x151558
notl %r15d
addl %r12d, %r15d
leaq 0x1f3c5b(%rip), %rsi    # 0x3451b3
movq %rbp, %rdi
movl %r15d, %edx
movl %r15d, %ecx
movq %r13, %r8
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl 0xc(%rsp), %ecx
testl %ecx, %ecx
je 0x1515fe
cmpl $0x2, %ecx
movq 0x10(%rsp), %rdx
jne 0x15160e
cmpb $0x0, 0x20(%r13)
je 0x15167e
movq 0x18(%r13), %rcx
jmp 0x151612
movsd 0x10(%rsp), %xmm0
leaq 0x1f3b6e(%rip), %rsi    # 0x34511b
movq 0x80(%rsp), %rdi
movq %r12, %rdx
movb $0x1, %al
callq 0x89dbb
leaq 0x1f3b76(%rip), %rsi    # 0x34513c
movq 0x80(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x28(%rsp), %rcx
movl 0x1c(%rsp), %r8d
movl %r15d, %r9d
xorl %eax, %eax
pushq %r14
pushq %r15
callq 0x89dbb
popq %rax
popq %rcx
jmp 0x15156b
movq 0x10(%rsp), %rdx
movl %edx, (%rcx)
jmp 0x15156e
movl 0x10(%rsp), %ecx
movq 0x10(%r13), %rdx
movq %rcx, (%rdx)
jmp 0x15156e
movq 0x10(%r13), %rcx
movq %rdx, (%rcx)
jmp 0x15156e
movq 0x2e6947(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1939e8(%rip), %rsi    # 0x2e5013
leaq 0x193b8d(%rip), %rdx    # 0x2e51bf
leaq 0x1f3a91(%rip), %rcx    # 0x3450ca
leaq 0x1f399c(%rip), %r8     # 0x344fdc
movl $0x107, %r9d            # imm = 0x107
jmp 0x151672
movq 0x2e6919(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1939ba(%rip), %rsi    # 0x2e5013
leaq 0x193b5f(%rip), %rdx    # 0x2e51bf
leaq 0x1f3b05(%rip), %rcx    # 0x34516c
leaq 0x1f396e(%rip), %r8     # 0x344fdc
pushq $0x7c
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2e68e3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x193984(%rip), %rsi    # 0x2e5013
leaq 0x1f3a4d(%rip), %rdx    # 0x3450e3
leaq 0x1f3a2d(%rip), %rcx    # 0x3450ca
leaq 0x1f3938(%rip), %r8     # 0x344fdc
movl $0x123, %r9d            # imm = 0x123
jmp 0x151672