// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/extended/consensus_sa.c
// Function: compute_L
static void compute_L(GtBittab **L, GtBittab **C, GtBittab **left,
                      GtUword number_of_sas)
{
  GtUword sa, sa_1, sa_2, sa_1_size = 0, sa_2_size;
  GtBittab *tmpset = gt_bittab_new(number_of_sas);

  for (sa = 0; sa < number_of_sas; sa++) {
    sa_1 = GT_UNDEF_UWORD;

    if (!gt_bittab_is_true(left[sa])) {
      /* bittab is empty */
      gt_bittab_equal(L[sa], C[sa]);
    }
    else {
      for (sa_2  = gt_bittab_get_first_bitnum(left[sa]);
           sa_2 != gt_bittab_get_last_bitnum(left[sa]);
           sa_2  = gt_bittab_get_next_bitnum(left[sa], sa_2)) {
        if (sa_1 == GT_UNDEF_UWORD) {
          sa_1 = sa_2;

          gt_bittab_or(tmpset, L[sa_1], C[sa]);
          sa_1_size = gt_bittab_count_set_bits(tmpset);
        }
        else {
          gt_bittab_or(tmpset, L[sa_2], C[sa]);
          sa_2_size = gt_bittab_count_set_bits(tmpset);

          if (sa_2_size > sa_1_size) {
            sa_1      = sa_2;
            sa_1_size = sa_2_size;
          }
        }
      }

      gt_assert(sa_1 != GT_UNDEF_UWORD);
      gt_bittab_or(L[sa], L[sa_1], C[sa]);
    }
  }
  gt_bittab_delete(tmpset);
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq %rdx, 0x40(%rsp)
movq %rcx, 0x38(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x38(%rsp), %rdi
callq 0x78f00
movq %rax, 0x8(%rsp)
movq $0x0, 0x30(%rsp)
movq 0x30(%rsp), %rax
cmpq 0x38(%rsp), %rax
jae 0x15becf
movq $-0x1, 0x28(%rsp)
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x79d10
testb $0x1, %al
jne 0x15bd3f
movq 0x50(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x79250
jmp 0x15beba
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x79ee0
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x79fb0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
je 0x15be47
cmpq $-0x1, 0x28(%rsp)
jne 0x15bdcc
movq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79480
movq 0x8(%rsp), %rdi
callq 0x7a120
movq %rax, 0x18(%rsp)
jmp 0x15be23
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79480
movq 0x8(%rsp), %rdi
callq 0x7a120
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x18(%rsp), %rax
jbe 0x15be21
movq 0x20(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x15be23
jmp 0x15be25
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x20(%rsp), %rsi
callq 0x7a000
movq %rax, 0x20(%rsp)
jmp 0x15bd57
jmp 0x15be49
cmpq $-0x1, 0x28(%rsp)
jne 0x15be89
movq 0x58180(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x2204(%rip), %rsi      # 0x15e066
leaq 0x33a00(%rip), %rdx     # 0x18f869
leaq 0x33a10(%rip), %rcx     # 0x18f880
leaq 0x336ae(%rip), %r8      # 0x18f525
movl $0x17d, %r9d            # imm = 0x17D
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x15be8b
movq 0x50(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x50(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x48(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79480
jmp 0x15bebc
movq 0x30(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x30(%rsp)
jmp 0x15bce9
movq 0x8(%rsp), %rdi
callq 0x7a420
addq $0x58, %rsp
retq
nop