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

  for (sa = number_of_sas-1; sa >= 0; sa--) {
    sa_1 = GT_UNDEF_UWORD;

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

          gt_bittab_or(tmpset, R[sa_1], C[sa]);
          sa_1_size = gt_bittab_count_set_bits(tmpset);
        }
        else {
          gt_bittab_or(tmpset, R[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(R[sa], R[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, 0x20(%rsp)
movq 0x38(%rsp), %rdi
callq 0x78f00
movq %rax, 0x8(%rsp)
movq 0x38(%rsp), %rax
subq $0x1, %rax
movq %rax, 0x10(%rsp)
cmpq $0x0, 0x10(%rsp)
jl 0x15c100
movq $-0x1, 0x30(%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x79d10
testb $0x1, %al
jne 0x15bf70
movq 0x50(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x79250
jmp 0x15c0eb
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x79ee0
movq %rax, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq %rax, (%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x79fb0
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
je 0x15c078
cmpq $-0x1, 0x30(%rsp)
jne 0x15bffd
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79480
movq 0x8(%rsp), %rdi
callq 0x7a120
movq %rax, 0x20(%rsp)
jmp 0x15c054
movq 0x8(%rsp), %rdi
movq 0x50(%rsp), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79480
movq 0x8(%rsp), %rdi
callq 0x7a120
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x15c052
movq 0x28(%rsp), %rax
movq %rax, 0x30(%rsp)
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x15c054
jmp 0x15c056
movq 0x40(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x28(%rsp), %rsi
callq 0x7a000
movq %rax, 0x28(%rsp)
jmp 0x15bf88
jmp 0x15c07a
cmpq $-0x1, 0x30(%rsp)
jne 0x15c0ba
movq 0x57f4f(%rip), %rax     # 0x1b3fd8
movq (%rax), %rdi
leaq 0x1fd3(%rip), %rsi      # 0x15e066
leaq 0x337cf(%rip), %rdx     # 0x18f869
leaq 0x337e9(%rip), %rcx     # 0x18f88a
leaq 0x3347d(%rip), %r8      # 0x18f525
movl $0x1a6, %r9d            # imm = 0x1A6
movb $0x0, %al
callq 0xb890
callq 0xb2e0
jmp 0x15c0bc
movq 0x50(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x50(%rsp), %rax
movq 0x30(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
movq 0x48(%rsp), %rax
movq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
callq 0x79480
jmp 0x15c0ed
movq 0x10(%rsp), %rax
addq $-0x1, %rax
movq %rax, 0x10(%rsp)
jmp 0x15bf1e
movq 0x8(%rsp), %rdi
callq 0x7a420
addq $0x58, %rsp
retq
nop