// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/match/diagbandseed.c
// Function: gt_diagbandseed_longest_code_run
static GtUword gt_diagbandseed_longest_code_run(const GtKmerPosList
                                                   *kmerpos_list)
{
  GtUword idx;
  GtLongestCodeRunType longest_code_run = 1, current_code_run = 1;
  GtCodetype previouscode;

  gt_assert(kmerpos_list != NULL);
  if (kmerpos_list->encode_info != NULL)
  {
    gt_assert(kmerpos_list->spaceGtUword != NULL);
    previouscode = gt_kmerpos_entry_code(kmerpos_list->encode_info,
                                         kmerpos_list->spaceGtUword[0]);
    for (idx = 1; idx < kmerpos_list->nextfree; idx++)
    {
      const GtCodetype currentcode
        = gt_kmerpos_entry_code(kmerpos_list->encode_info,
                                kmerpos_list->spaceGtUword[idx]);

      if (previouscode == currentcode)
      {
        current_code_run++;
      } else
      {
        if (current_code_run > longest_code_run)
        {
          longest_code_run = current_code_run;
        }
        current_code_run = 1;
        previouscode = currentcode;
      }
    }
  } else
  {
    gt_assert(kmerpos_list->spaceGtDiagbandseedKmerPos != NULL);
    previouscode = kmerpos_list->spaceGtDiagbandseedKmerPos[0].code;
    for (idx = 1; idx < kmerpos_list->nextfree; idx++)
    {
      const GtCodetype currentcode
        = kmerpos_list->spaceGtDiagbandseedKmerPos[idx].code;

      if (previouscode == currentcode)
      {
        current_code_run++;
      } else
      {
        if (current_code_run > longest_code_run)
        {
          longest_code_run = current_code_run;
        }
        current_code_run = 1;
        previouscode = currentcode;
      }
    }
  }
  if (current_code_run > longest_code_run)
  {
    longest_code_run = current_code_run;
  }
  return longest_code_run;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq $0x1, 0x20(%rsp)
movq $0x1, 0x18(%rsp)
cmpq $0x0, 0x30(%rsp)
jne 0x21258b
movq 0x429a46(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x303aaf(%rip), %rsi    # 0x516013
leaq 0x35ff98(%rip), %rdx    # 0x572503
leaq 0x3600ee(%rip), %rcx    # 0x572660
leaq 0x35fa1b(%rip), %r8     # 0x571f94
movl $0x2f8, %r9d            # imm = 0x2F8
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x21258d
movq 0x30(%rsp), %rax
cmpq $0x0, 0x28(%rax)
je 0x2126a1
jmp 0x21259f
movq 0x30(%rsp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x2125e3
movq 0x4299ee(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x303a57(%rip), %rsi    # 0x516013
leaq 0x3600be(%rip), %rdx    # 0x572681
leaq 0x360096(%rip), %rcx    # 0x572660
leaq 0x35f9c3(%rip), %r8     # 0x571f94
movl $0x2fb, %r9d            # imm = 0x2FB
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2125e5
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rsi
callq 0x215180
movq %rax, 0x10(%rsp)
movq $0x1, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x21269c
movq 0x30(%rsp), %rax
movq 0x28(%rax), %rdi
movq 0x30(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x215180
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %rax
cmpq 0x8(%rsp), %rax
jne 0x21265e
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x212687
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x212674
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x1, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x212689
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x21260d
jmp 0x212783
jmp 0x2126a3
movq 0x30(%rsp), %rax
cmpq $0x0, (%rax)
jne 0x2126e6
movq 0x4298eb(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x303954(%rip), %rsi    # 0x516013
leaq 0x35ffde(%rip), %rdx    # 0x5726a4
leaq 0x35ff93(%rip), %rcx    # 0x572660
leaq 0x35f8c0(%rip), %r8     # 0x571f94
movl $0x313, %r9d            # imm = 0x313
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x2126e8
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, 0x10(%rsp)
movq $0x1, 0x28(%rsp)
movq 0x28(%rsp), %rax
movq 0x30(%rsp), %rcx
cmpq 0x18(%rcx), %rax
jae 0x212781
movq 0x30(%rsp), %rax
movq (%rax), %rax
movq 0x28(%rsp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x10(%rsp), %rax
cmpq (%rsp), %rax
jne 0x212747
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x21276f
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x21275d
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x1, 0x18(%rsp)
movq (%rsp), %rax
movq %rax, 0x10(%rsp)
jmp 0x212771
movq 0x28(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x28(%rsp)
jmp 0x212701
jmp 0x212783
movq 0x18(%rsp), %rax
cmpq 0x20(%rsp), %rax
jbe 0x212799
movq 0x18(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x38, %rsp
retq
nopw %cs:(%rax,%rax)