// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/diagbandseed.c
// Function: gt_seedpairlist_new
static GtSeedpairlist *gt_seedpairlist_new(GtDiagbandseedBaseListType splt,
                        const GtSequencePartsInfo *aseqranges,
                        GtUword aidx,
                        const GtSequencePartsInfo *bseqranges,
                        GtUword bidx,
                        GtUword maxmat,
                        GtUword amaxlen)
{
  GtSeedpairlist *seedpairlist = gt_malloc(sizeof *seedpairlist);
  int idx;
  const int allbits = sizeof (GtWord) * CHAR_BIT;
  const GtUword
    anumofseq = gt_sequence_parts_info_numofsequences_get(aseqranges,aidx),
    bnumofseq = gt_sequence_parts_info_numofsequences_get(bseqranges,bidx);

  gt_assert(maxmat <= 2);
  seedpairlist->maxmat_show = gt_diagbandseed_derive_maxmat_show(maxmat);
  seedpairlist->maxmat_compute = maxmat > 0 ? true : false;
  seedpairlist->amaxlen = amaxlen;
  seedpairlist->aseqrange_max_length
    = gt_sequence_parts_info_max_length_get(aseqranges,aidx);
  seedpairlist->bseqrange_max_length
    = gt_sequence_parts_info_max_length_get(bseqranges,bidx);
  seedpairlist->bits_values[idx_aseqnum]
    = (GtBitcount_type) gt_radixsort_bits(anumofseq);
  seedpairlist->bits_values[idx_bseqnum]
    = (GtBitcount_type) gt_radixsort_bits(bnumofseq);
  if (seedpairlist->maxmat_compute)
  {
    seedpairlist->bits_values[idx_bpos]
      = (GtBitcount_type) gt_radixsort_bits(
                             seedpairlist->aseqrange_max_length +
                             seedpairlist->bseqrange_max_length + 1);
    /* in this case we store diagonal values in SeedPair and we have
        make sure that they fit into the space for a position */
    gt_assert(seedpairlist->bits_values[idx_bpos] <=
              sizeof (GtDiagbandseedPosition) * CHAR_BIT);
  } else
  {
    seedpairlist->bits_values[idx_bpos]
      = (GtBitcount_type) gt_radixsort_bits(
                                         seedpairlist->bseqrange_max_length);
  }
  seedpairlist->bits_values[idx_apos]
    = (GtBitcount_type) gt_radixsort_bits(seedpairlist->aseqrange_max_length);
  seedpairlist->bits_units[0] = seedpairlist->bits_values[idx_aseqnum] +
                                seedpairlist->bits_values[idx_bseqnum];
  seedpairlist->bits_units[1] = seedpairlist->bits_values[idx_apos] +
                                seedpairlist->bits_values[idx_bpos];
  seedpairlist->bits_left_adjust[idx_aseqnum]
    = allbits - seedpairlist->bits_values[idx_aseqnum];
  seedpairlist->bits_left_adjust[idx_bseqnum]
    = allbits - seedpairlist->bits_units[0];
  seedpairlist->bits_left_adjust[idx_bpos]
    = allbits - seedpairlist->bits_values[idx_bpos];
  seedpairlist->bits_left_adjust[idx_apos]
    = allbits - seedpairlist->bits_units[1];
  seedpairlist->transfer_mask
    = (((GtUword) 1) << seedpairlist->bits_left_adjust[idx_bseqnum]) - 1;
  gt_assert(seedpairlist->bits_values[idx_apos] > 0);
  gt_assert(seedpairlist->bits_values[idx_bpos] > 0);
  for (idx = 0, seedpairlist->bits_seedpair = 0; idx < 4; idx++)
  {
    seedpairlist->bits_seedpair += seedpairlist->bits_values[idx];
    seedpairlist->mask_tab[idx]
      = (((GtUword) 1) << seedpairlist->bits_values[idx]) - 1;
  }
  /* the following is only used for bits_seedpair > allbits */
  seedpairlist->transfer_shift = seedpairlist->bits_seedpair - allbits;
  seedpairlist->bits_unused_in2GtUwords = 2 * allbits -
                                          seedpairlist->bits_seedpair;
  seedpairlist->bytes_seedpair
    = gt_radixsort_bits2bytes(seedpairlist->bits_seedpair);
  if (seedpairlist->bytes_seedpair <= sizeof (GtUword))
  {
    int shift = seedpairlist->bits_seedpair;
    for (idx = 0; idx < 4; idx++)
    {
      shift -= seedpairlist->bits_values[idx];
      seedpairlist->shift_tab[idx] = shift;
    }
  }
  seedpairlist->aseqrange_start
    = gt_sequence_parts_info_start_get(aseqranges,aidx);
  seedpairlist->bseqrange_start
    = gt_sequence_parts_info_start_get(bseqranges,bidx);
  seedpairlist->aseqrange_end
    = gt_sequence_parts_info_end_get(aseqranges,aidx);
  seedpairlist->bseqrange_end
    = gt_sequence_parts_info_end_get(bseqranges,bidx);
  seedpairlist->mlist_struct = NULL;
  seedpairlist->mlist_ulong = NULL;
  seedpairlist->mlist_bytestring = NULL;
  if (splt == GT_DIAGBANDSEED_BASE_LIST_UNDEFINED)
  {
    if (seedpairlist->bytes_seedpair <= sizeof (GtUword))
    {
      splt = GT_DIAGBANDSEED_BASE_LIST_ULONG;
    } else
    {
      splt = GT_DIAGBANDSEED_BASE_LIST_BYTESTRING;
    }
  }
  if (splt == GT_DIAGBANDSEED_BASE_LIST_ULONG)
  {
    if (seedpairlist->bytes_seedpair > sizeof (GtUword))
    {
      splt = GT_DIAGBANDSEED_BASE_LIST_BYTESTRING;
    }
  } else
  {
    if (splt == GT_DIAGBANDSEED_BASE_LIST_BYTESTRING &&
        seedpairlist->bytes_seedpair <= sizeof (GtUword))
    {
      splt = GT_DIAGBANDSEED_BASE_LIST_ULONG;
    }
  }
  if (splt == GT_DIAGBANDSEED_BASE_LIST_ULONG)
  {
    gt_assert(seedpairlist->bytes_seedpair <= sizeof (GtUword));
    seedpairlist->mlist_ulong = gt_malloc(sizeof *seedpairlist->mlist_ulong);
    GT_INITARRAY(seedpairlist->mlist_ulong, GtUword);
  } else
  {
    if (splt == GT_DIAGBANDSEED_BASE_LIST_BYTESTRING)
    {
      gt_assert(seedpairlist->bytes_seedpair > sizeof (GtUword));
      seedpairlist->mlist_bytestring
        = gt_malloc(sizeof *seedpairlist->mlist_bytestring);
      GT_INITARRAY(seedpairlist->mlist_bytestring, uint8_t);
    } else
    {
      seedpairlist->mlist_struct
        = gt_malloc(sizeof *seedpairlist->mlist_struct);
      GT_INITARRAY(seedpairlist->mlist_struct, GtDiagbandseedSeedPair);
    }
  }
  seedpairlist->splt = splt;
  return seedpairlist;
}

// Assembly:
subq $0x58, %rsp
movq 0x60(%rsp), %rax
movl %edi, 0x54(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq %r8, 0x30(%rsp)
movq %r9, 0x28(%rsp)
movl $0xc0, %edi
leaq 0x35c692(%rip), %rsi    # 0x571f94
movl $0x538, %edx            # imm = 0x538
callq 0xe80f0
movq %rax, 0x20(%rsp)
movl $0x40, 0x18(%rsp)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2b01f0
movq %rax, 0x10(%rsp)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2b01f0
movq %rax, 0x8(%rsp)
cmpq $0x2, 0x28(%rsp)
jbe 0x215981
movq 0x426650(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3006b9(%rip), %rsi    # 0x516013
leaq 0x35d080(%rip), %rdx    # 0x5729e1
leaq 0x35d085(%rip), %rcx    # 0x5729ed
leaq 0x35c625(%rip), %r8     # 0x571f94
movl $0x53f, %r9d            # imm = 0x53F
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x215983
movq 0x28(%rsp), %rdi
callq 0x211440
movb %al, %cl
movq 0x20(%rsp), %rax
andb $0x1, %cl
movb %cl, 0xb1(%rax)
movq 0x28(%rsp), %rdx
xorl %eax, %eax
movl $0x1, %ecx
cmpq $0x0, %rdx
cmoval %ecx, %eax
cmpl $0x0, %eax
setne %cl
movq 0x20(%rsp), %rax
andb $0x1, %cl
movb %cl, 0xb0(%rax)
movq 0x60(%rsp), %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0xb8(%rax)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2b0290
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x68(%rax)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2b0290
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x70(%rax)
movq 0x10(%rsp), %rdi
callq 0x1019c0
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x7a(%rax)
movq 0x8(%rsp), %rdi
callq 0x1019c0
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x7c(%rax)
movq 0x20(%rsp), %rax
testb $0x1, 0xb0(%rax)
je 0x215ab7
movq 0x20(%rsp), %rax
movq 0x68(%rax), %rdi
movq 0x20(%rsp), %rax
addq 0x70(%rax), %rdi
addq $0x1, %rdi
callq 0x1019c0
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x7e(%rax)
movq 0x20(%rsp), %rax
movzwl 0x7e(%rax), %eax
cmpq $0x20, %rax
jbe 0x215ab3
movq 0x42651e(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x300587(%rip), %rsi    # 0x516013
leaq 0x35cf6e(%rip), %rdx    # 0x572a01
leaq 0x35cf53(%rip), %rcx    # 0x5729ed
leaq 0x35c4f3(%rip), %r8     # 0x571f94
movl $0x554, %r9d            # imm = 0x554
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x215ab5
jmp 0x215ad1
movq 0x20(%rsp), %rax
movq 0x70(%rax), %rdi
callq 0x1019c0
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x7e(%rax)
movq 0x20(%rsp), %rax
movq 0x68(%rax), %rdi
callq 0x1019c0
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x80(%rax)
movq 0x20(%rsp), %rax
movzwl 0x7a(%rax), %eax
movq 0x20(%rsp), %rcx
movzwl 0x7c(%rcx), %ecx
addl %ecx, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x82(%rax)
movq 0x20(%rsp), %rax
movzwl 0x80(%rax), %eax
movq 0x20(%rsp), %rcx
movzwl 0x7e(%rcx), %ecx
addl %ecx, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x84(%rax)
movq 0x20(%rsp), %rax
movzwl 0x7a(%rax), %ecx
movl $0x40, %eax
subl %ecx, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x86(%rax)
movq 0x20(%rsp), %rax
movzwl 0x82(%rax), %ecx
movl $0x40, %eax
subl %ecx, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x88(%rax)
movq 0x20(%rsp), %rax
movzwl 0x7e(%rax), %ecx
movl $0x40, %eax
subl %ecx, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x8a(%rax)
movq 0x20(%rsp), %rax
movzwl 0x84(%rax), %ecx
movl $0x40, %eax
subl %ecx, %eax
movw %ax, %cx
movq 0x20(%rsp), %rax
movw %cx, 0x8c(%rax)
movq 0x20(%rsp), %rax
movzwl 0x88(%rax), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
subq $0x1, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x40(%rax)
movq 0x20(%rsp), %rax
movzwl 0x80(%rax), %eax
cmpl $0x0, %eax
jg 0x215c2a
movq 0x4263a7(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x300410(%rip), %rsi    # 0x516013
leaq 0x35ce49(%rip), %rdx    # 0x572a53
leaq 0x35cddc(%rip), %rcx    # 0x5729ed
leaq 0x35c37c(%rip), %r8     # 0x571f94
movl $0x56b, %r9d            # imm = 0x56B
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x215c2c
jmp 0x215c2e
movq 0x20(%rsp), %rax
movzwl 0x7e(%rax), %eax
cmpl $0x0, %eax
jg 0x215c74
movq 0x42635d(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x3003c6(%rip), %rsi    # 0x516013
leaq 0x35ce27(%rip), %rdx    # 0x572a7b
leaq 0x35cd92(%rip), %rcx    # 0x5729ed
leaq 0x35c332(%rip), %r8     # 0x571f94
movl $0x56c, %r9d            # imm = 0x56C
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x215c76
movl $0x0, 0x1c(%rsp)
movq 0x20(%rsp), %rax
movw $0x0, 0x78(%rax)
cmpl $0x4, 0x1c(%rsp)
jge 0x215ce9
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movzwl 0x7a(%rax,%rcx,2), %edx
movq 0x20(%rsp), %rax
movzwl 0x78(%rax), %ecx
addl %edx, %ecx
movw %cx, 0x78(%rax)
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movzwl 0x7a(%rax,%rcx,2), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %edx
shlq %cl, %rdx
subq $0x1, %rdx
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movq %rdx, 0x20(%rax,%rcx,8)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x215c89
movq 0x20(%rsp), %rax
movzwl 0x78(%rax), %ecx
subl $0x40, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xa8(%rax)
movq 0x20(%rsp), %rax
movzwl 0x78(%rax), %eax
movl $0x80, %ecx
subl %eax, %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0xac(%rax)
movq 0x20(%rsp), %rax
movzwl 0x78(%rax), %eax
movl %eax, %edi
callq 0x101a20
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x90(%rax)
movq 0x20(%rsp), %rax
cmpq $0x8, 0x90(%rax)
ja 0x215da2
movq 0x20(%rsp), %rax
movzwl 0x78(%rax), %eax
movl %eax, 0x4(%rsp)
movl $0x0, 0x1c(%rsp)
cmpl $0x4, 0x1c(%rsp)
jge 0x215da0
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movzwl 0x7a(%rax,%rcx,2), %ecx
movl 0x4(%rsp), %eax
subl %ecx, %eax
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %edx
movq 0x20(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movl %edx, 0x98(%rax,%rcx,4)
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x215d5e
jmp 0x215da2
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2b00f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x48(%rax)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2b00f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x50(%rax)
movq 0x48(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x2b0170
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x58(%rax)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x2b0170
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x60(%rax)
movq 0x20(%rsp), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x8(%rax)
movq 0x20(%rsp), %rax
movq $0x0, 0x10(%rax)
cmpl $0x3, 0x54(%rsp)
jne 0x215e5e
movq 0x20(%rsp), %rax
cmpq $0x8, 0x90(%rax)
ja 0x215e54
movl $0x1, 0x54(%rsp)
jmp 0x215e5c
movl $0x2, 0x54(%rsp)
jmp 0x215e5e
cmpl $0x1, 0x54(%rsp)
jne 0x215e7e
movq 0x20(%rsp), %rax
cmpq $0x8, 0x90(%rax)
jbe 0x215e7c
movl $0x2, 0x54(%rsp)
jmp 0x215e9e
cmpl $0x2, 0x54(%rsp)
jne 0x215e9c
movq 0x20(%rsp), %rax
cmpq $0x8, 0x90(%rax)
ja 0x215e9c
movl $0x1, 0x54(%rsp)
jmp 0x215e9e
cmpl $0x1, 0x54(%rsp)
jne 0x215f4d
jmp 0x215eab
movq 0x20(%rsp), %rax
cmpq $0x8, 0x90(%rax)
jbe 0x215ef2
movq 0x4260df(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x300148(%rip), %rsi    # 0x516013
leaq 0x35cbd1(%rip), %rdx    # 0x572aa3
leaq 0x35cb14(%rip), %rcx    # 0x5729ed
leaq 0x35c0b4(%rip), %r8     # 0x571f94
movl $0x5a7, %r9d            # imm = 0x5A7
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x215ef4
movl $0x18, %edi
leaq 0x35c094(%rip), %rsi    # 0x571f94
movl $0x5a8, %edx            # imm = 0x5A8
callq 0xe80f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x8(%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x21604d
cmpl $0x2, 0x54(%rsp)
jne 0x215ff9
jmp 0x215f5a
movq 0x20(%rsp), %rax
cmpq $0x8, 0x90(%rax)
ja 0x215fa1
movq 0x426030(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x300099(%rip), %rsi    # 0x516013
leaq 0x35cb53(%rip), %rdx    # 0x572ad4
leaq 0x35ca65(%rip), %rcx    # 0x5729ed
leaq 0x35c005(%rip), %r8     # 0x571f94
movl $0x5ae, %r9d            # imm = 0x5AE
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x215fa3
movl $0x18, %edi
leaq 0x35bfe5(%rip), %rsi    # 0x571f94
movl $0x5b0, %edx            # imm = 0x5B0
callq 0xe80f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, 0x10(%rax)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x21604b
movl $0x18, %edi
leaq 0x35bf8f(%rip), %rsi    # 0x571f94
movl $0x5b5, %edx            # imm = 0x5B5
callq 0xe80f0
movq %rax, %rcx
movq 0x20(%rsp), %rax
movq %rcx, (%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq $0x0, (%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq $0x0, 0x10(%rax)
movq 0x20(%rsp), %rax
movq (%rax), %rax
movq $0x0, 0x8(%rax)
jmp 0x21604b
jmp 0x21604d
movl 0x54(%rsp), %ecx
movq 0x20(%rsp), %rax
movl %ecx, 0x18(%rax)
movq 0x20(%rsp), %rax
addq $0x58, %rsp
retq
nopw %cs:(%rax,%rax)