// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/prsqualint.c
// Function: gt_parsequalifiedinteger
Qualifiedinteger *gt_parsequalifiedinteger(const char *option,
                                        const char *lparam,
                                        GtError *err)
{
  GtWord readint = 0;
  size_t i;
  char *lparamcopy;
  bool haserr = false;
  Qualifiedinteger *qualint;

  lparamcopy = gt_malloc(sizeof (char) * (strlen(lparam)+1));
  qualint = gt_malloc(sizeof (*qualint));
  strcpy(lparamcopy,lparam);
  for (i=0; lparamcopy[i] != '\0'; i++)
  {
    if (!isdigit((int) lparamcopy[i]) &&
        lparamcopy[i] != BESTCHARACTER &&
        lparamcopy[i] != PERCENTAWAYCHARACTER)
    {
      ERRORLPARAM;
      haserr = true;
      break;
    }
  }
  if (!haserr && i == 0)
  {
    ERRORLPARAM;
    haserr = true;
  }
  if (!haserr)
  {
    if (lparamcopy[i-1] == BESTCHARACTER)
    {
      lparamcopy[i-1] = '\0';
      qualint->qualtag = Qualbestof;
    } else
    {
      if (lparamcopy[i-1] == PERCENTAWAYCHARACTER)
      {
        lparamcopy[i-1] = '\0';
        qualint->qualtag = Qualpercentaway;
      } else
      {
        qualint->qualtag = Qualabsolute;
      }
    }
    if (sscanf(lparamcopy,""GT_WD"",&readint) != 1 || readint <= 0)
    {
      ERRORLPARAM;
      haserr = true;
    }
  }
  if (!haserr &&
      (qualint->qualtag == Qualpercentaway || qualint->qualtag == Qualbestof))
  {
    if (readint > 100L)
    {
      ERRORLPARAM;
      haserr = true;
    }
  }
  qualint->integervalue = (GtUword) readint;
  gt_free(lparamcopy);
  if (haserr)
  {
    gt_free (qualint);
    return NULL;
  }
  return qualint;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq $0x0, 0x30(%rsp)
movb $0x0, 0x1f(%rsp)
movq 0x40(%rsp), %rdi
callq 0x192b0
movq %rax, %rdi
addq $0x1, %rdi
shlq $0x0, %rdi
leaq 0x3191ba(%rip), %rsi    # 0x57c717
movl $0x39, %edx
callq 0xe80f0
movq %rax, 0x20(%rsp)
movl $0x10, %edi
leaq 0x31919f(%rip), %rsi    # 0x57c717
movl $0x3a, %edx
callq 0xe80f0
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x19700
movq $0x0, 0x28(%rsp)
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x263696
callq 0x197c0
movq (%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x28(%rsp), %rdx
movsbl (%rcx,%rdx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x263681
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x62, %eax
je 0x263681
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x70, %eax
je 0x263681
cmpq $0x0, 0x38(%rsp)
je 0x263645
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x319105(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0xd88c0
jmp 0x26367a
movq 0x3d8954(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x3190ce(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0x199f0
movb $0x1, 0x1f(%rsp)
jmp 0x263696
jmp 0x263683
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x26359f
testb $0x1, 0x1f(%rsp)
jne 0x263719
cmpq $0x0, 0x28(%rsp)
jne 0x263719
cmpq $0x0, 0x38(%rsp)
je 0x2636df
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x31906b(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0xd88c0
jmp 0x263714
movq 0x3d88ba(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x319034(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0x199f0
movb $0x1, 0x1f(%rsp)
testb $0x1, 0x1f(%rsp)
jne 0x263838
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x62, %eax
jne 0x26375a
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl $0x2, (%rax)
jmp 0x26379d
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x70, %eax
jne 0x263790
movq 0x20(%rsp), %rax
movq 0x28(%rsp), %rcx
subq $0x1, %rcx
movb $0x0, (%rax,%rcx)
movq 0x10(%rsp), %rax
movl $0x1, (%rax)
jmp 0x26379b
movq 0x10(%rsp), %rax
movl $0x0, (%rax)
jmp 0x26379d
movq 0x20(%rsp), %rdi
leaq 0x2eb0c6(%rip), %rsi    # 0x54e86f
leaq 0x30(%rsp), %rdx
movb $0x0, %al
callq 0x19770
cmpl $0x1, %eax
jne 0x2637c2
cmpq $0x0, 0x30(%rsp)
jg 0x263836
cmpq $0x0, 0x38(%rsp)
je 0x2637fc
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x318f4e(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0xd88c0
jmp 0x263831
movq 0x3d879d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x318f17(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0x199f0
movb $0x1, 0x1f(%rsp)
jmp 0x263838
testb $0x1, 0x1f(%rsp)
jne 0x2638d5
movq 0x10(%rsp), %rax
cmpl $0x1, (%rax)
je 0x263857
movq 0x10(%rsp), %rax
cmpl $0x2, (%rax)
jne 0x2638d5
cmpq $0x64, 0x30(%rsp)
jle 0x2638d3
cmpq $0x0, 0x38(%rsp)
je 0x263899
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x318eb1(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0xd88c0
jmp 0x2638ce
movq 0x3d8700(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
movq 0x40(%rsp), %rdx
movq 0x48(%rsp), %rcx
leaq 0x318e7a(%rip), %rsi    # 0x57c72e
movl $0x62, %r8d
movl $0x70, %r9d
movl $0x70, (%rsp)
movb $0x0, %al
callq 0x199f0
movb $0x1, 0x1f(%rsp)
jmp 0x2638d5
movq 0x30(%rsp), %rcx
movq 0x10(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rdi
leaq 0x318e28(%rip), %rsi    # 0x57c717
movl $0x6d, %edx
callq 0xe88c0
testb $0x1, 0x1f(%rsp)
je 0x263921
movq 0x10(%rsp), %rdi
leaq 0x318e0b(%rip), %rsi    # 0x57c717
movl $0x70, %edx
callq 0xe88c0
movq $0x0, 0x50(%rsp)
jmp 0x26392b
movq 0x10(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)
nop