// File: /workspace/github_c_makefile_star2_O1/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 $0x38, %rsp
movq %r9, %rbp
movq %r8, %r14
movq %rcx, 0x8(%rsp)
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r12
movq 0x70(%rsp), %r13
testq %r13, %r13
je 0x1add95
movq %r13, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1ae07e
testq %r13, %r13
je 0x1add95
movq %r13, %rdi
callq 0x101a9a
testb %al, %al
jne 0x1ae083
testq %r14, %r14
setne %cl
movl %ebx, 0x1c(%rsp)
movq %r15, 0x30(%rsp)
movq %r12, 0x28(%rsp)
je 0x1addbe
movq 0x8(%rsp), %rax
cmpb $0x3d, (%rax)
jne 0x1addc5
movq %rcx, (%rsp)
xorl %r13d, %r13d
jmp 0x1addf3
xorl %ebx, %ebx
jmp 0x1adef4
leaq -0x1(%r14), %rax
xorl %ebx, %ebx
xorl %ecx, %ecx
movq 0x8(%rsp), %rdx
cmpq %rcx, %rax
je 0x1ade8d
leaq 0x1(%rcx), %r13
cmpb $0x3d, 0x1(%rdx,%rcx)
movq %r13, %rcx
jne 0x1addd2
cmpq %r14, %r13
setb %al
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
leaq (%rax,%r13), %r15
incq %r15
movq %r15, %rdi
movl $0x2e, %esi
callq 0x17280
testq %rax, %rax
je 0x1ade42
leaq 0x1a86d9(%rip), %rsi    # 0x3564f1
xorl %ebx, %ebx
leaq 0x20(%rsp), %rdx
movq %r15, %rdi
xorl %eax, %eax
callq 0x177f0
movl %eax, %r12d
cmpl $0x1, %eax
jne 0x1ade91
movl $0x2, %ebx
movq 0x20(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x1adeb2
leaq 0x1d77eb(%rip), %rsi    # 0x385634
xorl %ebx, %ebx
leaq 0x20(%rsp), %r12
movq %r15, %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x177f0
cmpl $0x1, %eax
sete %cl
movq (%r12), %rax
testq %rax, %rax
setns %r12b
andb %cl, %r12b
je 0x1adec4
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %ebx, %ebx
cmpq %rcx, %rax
setg %bl
movl %eax, %ecx
cmovgq %rax, %rcx
movq %rcx, 0x10(%rsp)
jmp 0x1adee5
xorl %ecx, %ecx
jmp 0x1adef4
movl %r13d, %eax
notl %eax
leal (%r14,%rax), %ecx
leaq 0x200507(%rip), %rsi    # 0x3ae3a8
movq 0x70(%rsp), %rdi
movl %ecx, %edx
movq %r15, %r8
xorl %eax, %eax
callq 0x1019cf
movq (%rsp), %rcx
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
cmpl $0x1, %r12d
je 0x1adef4
jmp 0x1adf21
movl %r13d, %eax
notl %eax
leal (%r14,%rax), %ecx
leaq 0x200501(%rip), %rsi    # 0x3ae3d5
movq 0x70(%rsp), %rdi
movl %ecx, %edx
movq %r15, %r8
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
testb %r12b, %r12b
movq (%rsp), %rcx
je 0x1adf21
testb %cl, %cl
je 0x1adefd
movl %ebx, %r15d
jmp 0x1adf21
leaq 0x2004fd(%rip), %rsi    # 0x3ae401
movq 0x70(%rsp), %rdi
movl %r14d, %edx
movl %r14d, %ecx
movq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %r15d      # imm = 0xFFFFFFFF
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
testl %r15d, %r15d
js 0x1adfb9
movq (%rbp), %rdi
callq 0xd4a9a
testq %rax, %rax
je 0x1adf7d
movl %r15d, (%rsp)
movl %r13d, %r12d
xorl %ebx, %ebx
movq (%rbp), %rdi
movq %rbx, %rsi
callq 0xd47ba
movq %rax, %r14
movq (%rax), %r15
movq 0x8(%rsp), %rdi
movq %r15, %rsi
movq %r12, %rdx
callq 0x17830
testl %eax, %eax
je 0x1adfc8
incq %rbx
movq (%rbp), %rdi
callq 0xd4a9a
cmpq %rax, %rbx
jb 0x1adf46
xorl %eax, %eax
xorl %ebx, %ebx
testb %bl, %bl
jne 0x1adfb9
leaq 0x2003d2(%rip), %rsi    # 0x3ae35e
movq 0x70(%rsp), %rdi
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %rcx
movl 0x1c(%rsp), %r8d
movl %r13d, %r9d
xorl %eax, %eax
pushq 0x8(%rsp)
pushq %r13
callq 0x1019cf
addq $0x10, %rsp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, 0x22(%r14)
movb $0x1, %bl
xorl %eax, %eax
cmpb $0x1, 0x21(%r14)
jne 0x1adf81
movq 0x8(%r14), %rcx
testq %rcx, %rcx
je 0x1ae015
movl (%rsp), %esi
cmpl $0x2, %esi
movq 0x10(%rsp), %rdx
je 0x1ae031
cmpl $0x1, %esi
jne 0x1ae056
leaq 0x20031e(%rip), %rsi    # 0x3ae318
xorl %ebx, %ebx
movq 0x70(%rsp), %rdi
movq %r15, %rcx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1adf81
movl (%rsp), %ecx
testl %ecx, %ecx
movq 0x10(%rsp), %rdx
je 0x1ae070
cmpl $0x2, %ecx
je 0x1ae05d
cmpl $0x1, %ecx
jne 0x1ae088
movq 0x10(%r14), %rcx
jmp 0x1ae068
movq %rdx, %xmm0
leaq 0x200300(%rip), %rsi    # 0x3ae33d
movq 0x70(%rsp), %rdi
movq %r15, %rdx
movb $0x1, %al
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x1adf7f
movl %edx, (%rcx)
jmp 0x1adf81
cmpb $0x0, 0x20(%r14)
je 0x1ae08d
movq 0x18(%r14), %rcx
movq %rdx, (%rcx)
jmp 0x1adf81
movl %edx, %ecx
movq 0x10(%r14), %rdx
movq %rcx, (%rdx)
jmp 0x1adf81
callq 0x63c77
callq 0x63c40
callq 0x63ce9
callq 0x63cb0
nop