// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/match/querymatch-display.c
// Function: gt_querymatch_display_flag_new
GtSeedExtendDisplayFlag *gt_querymatch_display_flag_new(
                           const GtStrArray *display_args,
                           GtSeedExtendDisplaySetMode setmode,
                           GtError *err)
{
  GtSeedExtendDisplayFlag *display_flag = gt_malloc(sizeof *display_flag);
  char copyspace[GT_MAX_DISPLAY_FLAG_LENGTH+1];
  bool haserr = false;
  size_t num_gfa2_default_flags = 0;
  GtUword da_idx;
  const uint64_t trace_mask = gt_display_mask(Gt_Trace_display) |
                              gt_display_mask(Gt_Dtrace_display);
  /* required implications:
      mandatory: S_seqnum, Q_seqnum, S_start, Q_start
                 either editdist or score
      either S_len or S_end must be set
      either Q_len or Q_end must be set
      if Strand is not set, then order of Q_start and Q_end gives strand
  */
  display_flag->alignmentwidth = 0;
  display_flag->trace_delta = 0;
  display_flag->nextfree = 0;
  display_flag->flags = 0;
  if (setmode != GT_SEED_EXTEND_DISPLAY_SET_NO)
  {
    if (gt_querymatch_display_args_contain(display_args,"blast"))
    {
      GtSeedExtendDisplay_enum blast_flags[] =
      {
        Gt_Queryid_display,
        Gt_Subjectid_display,
        Gt_Identity_display,
        Gt_Alignmentlength_display,
        Gt_Mismatches_display,
        Gt_Gapopens_display,
        Gt_Q_start_display,
        Gt_Q_end_display,
        Gt_S_start_display,
        Gt_S_end_display,
        Gt_Evalue_display,
        Gt_Bitscore_display
      };
      gt_querymatch_display_multi_flag_add(display_flag,blast_flags,
                                           sizeof blast_flags/
                                           sizeof blast_flags[0]);
    } else
    {
      if (gt_querymatch_display_args_contain(display_args,"gfa2"))
      {
        GtSeedExtendDisplay_enum gfa2_flags[] =
        {
          Gt_S_seqnum_display,
          Gt_Q_seqnum_display,
          Gt_S_start_display,
          Gt_S_end_display,
          Gt_Q_start_display,
          Gt_Q_end_display
        };
        gt_querymatch_display_multi_flag_add(display_flag,gfa2_flags,
                                             sizeof gfa2_flags/
                                             sizeof gfa2_flags[0]);
        num_gfa2_default_flags = sizeof gfa2_flags/sizeof gfa2_flags[0];
      } else
      {
        if (!gt_querymatch_display_args_contain(display_args,"custom"))
        {
          if (setmode == GT_SEED_EXTEND_DISPLAY_SET_STANDARD)
          {
            GtSeedExtendDisplay_enum standard_flags[] =
            {
              Gt_S_len_display,
              Gt_S_seqnum_display,
              Gt_S_start_display,
              Gt_Strand_display,
              Gt_Q_len_display,
              Gt_Q_seqnum_display,
              Gt_Q_start_display,
              Gt_Score_display,
              Gt_Editdist_display,
              Gt_Identity_display
            };
            gt_querymatch_display_multi_flag_add(display_flag,standard_flags,
                                                 sizeof standard_flags/
                                                 sizeof standard_flags[0]);
          } else
          {

            gt_assert(setmode == GT_SEED_EXTEND_DISPLAY_SET_EXACT);
            GtSeedExtendDisplay_enum exact_flags[] =
            {
              Gt_S_len_display,
              Gt_S_seqnum_display,
              Gt_S_start_display,
              Gt_Strand_display,
              Gt_Q_len_display,
              Gt_Q_seqnum_display,
              Gt_Q_start_display
            };
            gt_querymatch_display_multi_flag_add(display_flag,exact_flags,
                                                 sizeof exact_flags/
                                                 sizeof exact_flags[0]);
          }
        }
      }
    }
  }
  for (da_idx = 0; da_idx < gt_str_array_size(display_args); da_idx++)
  {
    const char *da = gt_str_array_get(display_args,da_idx);
    GtWord parameter;
    int ret = gt_querymatch_display_flag_set(copyspace,&parameter,
                                             display_flag,da,err);

    if (ret == -1)
    {
      haserr = true;
      break;
    }
    if (ret == 1)
    {
      /* the only flag with a parameter is Gt_Alignment_display */
      if (parameter < 0)
      {
        const char *key;

        if (display_flag->flags & gt_display_mask(Gt_Alignment_display))
        {
          key = "alignment";
        } else
        {
          if (display_flag->flags & gt_display_mask(Gt_Trace_display))
          {
            key = "trace";
          } else
          {
            gt_assert(display_flag->flags & gt_display_mask(Gt_Dtrace_display));
            key = "dtrace";
          }
        }
        gt_error_set(err,"integer following \"%s=\" must be positive",key);
        haserr = true;
        break;
      }
      if (display_flag->flags & gt_display_mask(Gt_Alignment_display))
      {
        display_flag->alignmentwidth = (GtUword) parameter;
      } else
      {
        gt_assert (display_flag->flags & trace_mask);
        display_flag->trace_delta = (GtUword) parameter;
      }
    }
  }
  if (!haserr)
  {
    if ((display_flag->flags & gt_display_mask(Gt_Alignment_display)) &&
         display_flag->alignmentwidth == 0)
    {
      display_flag->alignmentwidth = GT_SEED_EXTEND_DEFAULT_ALIGNMENT_WIDTH;
    }
    if ((display_flag->flags & trace_mask) && display_flag->trace_delta == 0)
    {
      display_flag->trace_delta = GT_SEED_EXTEND_DEFAULT_TRACE_DELTA;
    }
  }
  if (!haserr && num_gfa2_default_flags > 0)
  {
    if (gt_querymatch_options_order_check(display_flag,
                                          num_gfa2_default_flags,err) != 0)
    {
      haserr = true;
    }
  }
  if (haserr)
  {
    gt_querymatch_display_flag_delete(display_flag);
    return NULL;
  }
  return display_flag;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, (%rsp)
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x1e1f20(%rip), %rsi    # 0x34b19f
movl $0xc0, %edi
movl $0x158, %edx            # imm = 0x158
callq 0x93160
andq $0x0, (%rax)
movq %rax, 0x8(%rsp)
andq $0x0, 0xb8(%rax)
xorps %xmm0, %xmm0
movups %xmm0, 0xa8(%rax)
movb $0x1, %cl
movl %ecx, 0x1c(%rsp)
testl %ebp, %ebp
movq %rbx, 0x20(%rsp)
je 0x1692f3
movq %rbx, %r14
movq %rax, %rbx
leaq 0x1be8a0(%rip), %rsi    # 0x327b65
movq %r14, %rdi
callq 0x169814
testb %al, %al
je 0x169306
leaq 0x1e2588(%rip), %rsi    # 0x34b860
pushq $0xc
popq %rdx
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x169867
movq $0x0, 0x10(%rsp)
jmp 0x16933d
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rbp
jmp 0x1693a9
leaq 0x1e1eb1(%rip), %rsi    # 0x34b1be
movq %r14, %rdi
callq 0x169814
testb %al, %al
je 0x169345
leaq 0x1e2570(%rip), %rsi    # 0x34b890
pushq $0x6
popq %rdx
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
movq %rdx, 0x10(%rsp)
callq 0x169867
movl $0x0, 0x1c(%rsp)
movq %rbx, %rax
movq %r14, %rbx
jmp 0x1693a9
leaq 0x1e1e77(%rip), %rsi    # 0x34b1c3
movq %r14, %rdi
callq 0x169814
testb %al, %al
je 0x169368
movq $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rbp
jmp 0x1693a1
cmpl $0x2, %ebp
je 0x169381
cmpl $0x1, %ebp
jne 0x169742
leaq 0x1e2533(%rip), %rsi    # 0x34b8b0
pushq $0xa
jmp 0x16938a
leaq 0x1e2558(%rip), %rsi    # 0x34b8e0
pushq $0x7
popq %rdx
movq 0x8(%rsp), %rbp
movq %rbp, %rdi
callq 0x169867
movq $0x0, 0x10(%rsp)
movq %rbx, %rax
movq 0x20(%rsp), %rbx
leaq 0xa8(%rax), %rcx
movq %rcx, 0x28(%rsp)
addq $0xb0, %rax
movq %rax, 0x38(%rsp)
xorl %r14d, %r14d
movq %rbx, %rdi
callq 0xae61c
cmpq %rax, %r14
jae 0x16956b
movq %r14, %rsi
movq %rbx, %rdi
movq %r14, 0x48(%rsp)
callq 0xae386
movq %rax, %r12
movq %rax, %rdi
pushq $0x3d
popq %rsi
callq 0x17260
testq %rax, %rax
je 0x16941f
movq %rax, %rbx
leaq 0x1(%rax), %rdi
leaq 0x1b32ca(%rip), %rsi    # 0x31c6cf
leaq 0x30(%rsp), %rdx
xorl %eax, %eax
callq 0x177b0
cmpl $0x1, %eax
jne 0x169628
subq %r12, %rbx
jmp 0x169421
xorl %ebx, %ebx
leaq 0x50(%rsp), %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x169da8
testq %rax, %rax
je 0x16960e
movq %rax, %r14
movq %rbx, 0x40(%rsp)
movl 0x8(%rax), %esi
movq %rbp, %rdi
callq 0x169ca9
cmpl $0x3, 0x8(%r14)
jne 0x169475
movq %rbp, %rdi
pushq $0x20
popq %rsi
callq 0x169ca9
movq %rbp, %rdi
pushq $0x21
popq %rsi
callq 0x169ca9
movq %rbp, %rdi
pushq $0x22
popq %rsi
callq 0x169ca9
xorl %ebx, %ebx
cmpq $0x1f, %rbx
ja 0x1694f0
leaq 0x2ca2fc(%rip), %rax    # 0x433780
movq (%rax,%rbx,8), %r13
movq 0x8(%rax,%rbx,8), %r12
xorl %edi, %edi
movq %r13, %rsi
xorl %edx, %edx
callq 0x169da8
movq %rax, %r14
xorl %edi, %edi
movq %r12, %rsi
xorl %edx, %edx
callq 0x169da8
testq %r14, %r14
je 0x1696b9
movq %rax, %r15
testq %rax, %rax
je 0x1696db
movq 0x8(%rsp), %rax
movq (%rax), %rbp
movl 0x8(%r14), %edi
callq 0x1697cf
testq %rbp, %rax
movq 0x8(%rsp), %rbp
je 0x1694ea
movq (%rbp), %r14
movl 0x8(%r15), %edi
callq 0x1697cf
testq %r14, %rax
jne 0x169537
addq $0x2, %rbx
jmp 0x169477
cmpq $0x0, 0x40(%rsp)
movq 0x20(%rsp), %rbx
je 0x16952a
movq 0x30(%rsp), %rcx
movq (%rbp), %rax
testq %rcx, %rcx
js 0x169638
movq 0x28(%rsp), %rdx
testb $0x1, %al
jne 0x169527
movq 0x38(%rsp), %rdx
testw $0x3000, %ax            # imm = 0x3000
je 0x16970a
movq %rcx, (%rdx)
movq 0x48(%rsp), %r14
incq %r14
jmp 0x1693c3
leaq 0x1e2134(%rip), %rsi    # 0x34b672
movq (%rsp), %rdi
movq %r13, %rdx
movq %r12, %rcx
xorl %eax, %eax
callq 0x89dbb
movq %rbp, %rdi
callq 0x16924a
xorl %ebp, %ebp
movq %rbp, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbp), %rax
testb $0x1, %al
je 0x16958a
movq 0x28(%rsp), %rcx
cmpq $0x0, (%rcx)
jne 0x16958a
movq 0x28(%rsp), %rcx
movq $0x3c, (%rcx)
testw $0x3000, %ax            # imm = 0x3000
movq 0x38(%rsp), %rax
movq 0x10(%rsp), %rbx
je 0x1695a7
cmpq $0x0, (%rax)
jne 0x1695a7
movq $0x32, (%rax)
cmpb $0x0, 0x1c(%rsp)
jne 0x169559
leaq 0x30(%rsp), %rdi
movq %rbp, %rsi
callq 0x1691c6
movq %rax, %r14
movq %rbp, %rdi
callq 0x1690e6
testb %al, %al
jne 0x1695da
movq %rbp, %rdi
callq 0x1690dc
testb %al, %al
je 0x16965e
movq 0x30(%rsp), %rax
cmpq %rbx, %rax
jbe 0x169770
xorl %ecx, %ecx
cmpq %rax, %rbx
jae 0x169559
movl (%r14,%rbx,4), %edx
cmpq $0xa, %rdx
je 0x169607
cmpl $0xc, %edx
je 0x169607
testb $0x1, %cl
je 0x169675
incq %rbx
movb $0x1, %cl
jmp 0x1695ea
leaq 0x1e1e80(%rip), %rsi    # 0x34b495
leaq 0x1e1ece(%rip), %rcx    # 0x34b4ea
movq (%rsp), %rdi
movq %r12, %rdx
jmp 0x169548
leaq 0x1e1e1b(%rip), %rsi    # 0x34b44a
movq (%rsp), %rdi
movq %r12, %rdx
jmp 0x1696ad
testb $0x1, %al
jne 0x169655
btl $0xc, %eax
jb 0x16969b
btl $0xd, %eax
jae 0x16979e
leaq 0x1e1bfb(%rip), %rdx    # 0x34b24e
jmp 0x1696a2
leaq 0x186529(%rip), %rdx    # 0x2efb85
jmp 0x1696a2
leaq 0x1e2049(%rip), %rsi    # 0x34b6ae
movq (%rsp), %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x16954f
leaq 0x1e2284(%rip), %rax    # 0x34b900
movl (%rax,%rdx,4), %eax
shlq $0x4, %rax
leaq 0x2cfc06(%rip), %rcx    # 0x439290
movq (%rax,%rcx), %rdx
leaq 0x1e20b6(%rip), %rsi    # 0x34b74b
movq (%rsp), %rdi
jmp 0x1696ad
leaq 0x219c10(%rip), %rdx    # 0x3832b2
movq (%rsp), %rdi
leaq 0x1e1ba8(%rip), %rsi    # 0x34b255
xorl %eax, %eax
callq 0x89dbb
jmp 0x16954f
movq 0x2ce8a8(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e1f89(%rip), %rsi    # 0x34b653
leaq 0x1e1ace(%rip), %rdx    # 0x34b19f
movl $0xf9, %ecx
movq %r13, %r8
jmp 0x1696fb
movq 0x2ce886(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x1e1f67(%rip), %rsi    # 0x34b653
leaq 0x1e1aac(%rip), %rdx    # 0x34b19f
movl $0xfa, %ecx
movq %r12, %r8
xorl %eax, %eax
callq 0x17a50
pushq $0x2
popq %rdi
callq 0x178f0
movq 0x2ce857(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x17b8f8(%rip), %rsi    # 0x2e5013
leaq 0x1e1b5c(%rip), %rdx    # 0x34b27e
leaq 0x1e1acd(%rip), %rcx    # 0x34b1f6
leaq 0x1e1a6f(%rip), %r8     # 0x34b19f
movl $0x1e7, %r9d            # imm = 0x1E7
xorl %eax, %eax
callq 0x17a50
callq 0x17390
movq 0x2ce81f(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x17b8c0(%rip), %rsi    # 0x2e5013
leaq 0x1e1a70(%rip), %rdx    # 0x34b1ca
leaq 0x1e1a95(%rip), %rcx    # 0x34b1f6
leaq 0x1e1a37(%rip), %r8     # 0x34b19f
movl $0x1aa, %r9d            # imm = 0x1AA
jmp 0x169736
movq 0x2ce7f1(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x17b892(%rip), %rsi    # 0x2e5013
leaq 0x1e1f72(%rip), %rdx    # 0x34b6fa
leaq 0x1e1f9a(%rip), %rcx    # 0x34b729
leaq 0x1e1a09(%rip), %r8     # 0x34b19f
movl $0x13c, %r9d            # imm = 0x13C
jmp 0x169736
movq 0x2ce7c3(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x17b864(%rip), %rsi    # 0x2e5013
leaq 0x1e1a5f(%rip), %rdx    # 0x34b215
leaq 0x1e1a39(%rip), %rcx    # 0x34b1f6
leaq 0x1e19db(%rip), %r8     # 0x34b19f
movl $0x1da, %r9d            # imm = 0x1DA
jmp 0x169736