// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/tools/gt_sfxmap.c
// Function: gt_sfxmap_compresslcp
static int gt_sfxmap_compresslcp(const char *indexname,
                                 GtLogger *logger,GtError *err)
{
  Sequentialsuffixarrayreader *ssar = NULL;
  bool haserr = false;

  gt_error_check(err);
  ssar = gt_newSequentialsuffixarrayreaderfromfile(
                                          indexname,
                                          SARR_LCPTAB | SARR_ESQTAB,
                                          true,
                                          logger,
                                          err);
  if (ssar == NULL)
  {
    haserr = true;
  }
  if (!haserr)
  {
#ifndef NDEBUG
    GtUword elems = 0;
#endif
    GT_UNUSED GtUword totallength
      = gt_Sequentialsuffixarrayreader_totallength(ssar);
    GtUword maxbranchdepth
      = gt_Sequentialsuffixarrayreader_maxbranchdepth(ssar);
    FILE *fpcompressedlcp = gt_fa_fopen_with_suffix(indexname,
                                     GT_LCPTABSUFFIX_BYTECOMPRESSED,"wb",err);
    unsigned int bitsperentry = gt_determinebitspervalue(maxbranchdepth);
    GtBitbuffer *bitbuffer = NULL;

    gt_assert(ssar != NULL);
    if (fpcompressedlcp == NULL)
    {
       haserr = true;
    } else
    {
      bitbuffer = gt_bitbuffer_FILE_new(fpcompressedlcp,bitsperentry);
    }
    if (bitsperentry > 0)
    {
      if (!haserr)
      {
        gt_bitbuffer_write_fixed_bits_FILE(bitbuffer,0UL);
        while (true)
        {
          GtUword currentlcp;

          SSAR_NEXTSEQUENTIALLCPTABVALUE(currentlcp,ssar);
          gt_bitbuffer_write_fixed_bits_FILE (bitbuffer,currentlcp);
#ifndef NDEBUG
          elems++;
#endif
        }
      }
      if (!haserr)
      {
        gt_assert(elems == totallength);
      }
    }
    gt_freeSequentialsuffixarrayreader(&ssar);
    gt_bitbuffer_delete(bitbuffer);
    if (fpcompressedlcp != NULL)
    {
      gt_fa_fclose(fpcompressedlcp);
    }
  }
  return haserr ? -1 : 0;
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movq %rdx, 0x60(%rsp)
movq $0x0, 0x58(%rsp)
movb $0x0, 0x57(%rsp)
cmpq $0x0, 0x60(%rsp)
je 0x6a1d1
movq 0x60(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x6a199
jmp 0x6a1d1
movq 0x5d1e00(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4abe69(%rip), %rsi    # 0x516013
leaq 0x4ac00e(%rip), %rdx    # 0x5161bf
leaq 0x4c0a87(%rip), %rcx    # 0x52ac3f
leaq 0x4c042b(%rip), %r8     # 0x52a5ea
movl $0x3d7, %r9d            # imm = 0x3D7
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6a1d3
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %rcx
movq 0x60(%rsp), %r8
movl $0x5, %esi
movl $0x1, %edx
callq 0x23b3e0
movq %rax, 0x58(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x6a203
movb $0x1, 0x57(%rsp)
testb $0x1, 0x57(%rsp)
jne 0x6a54e
movq $0x0, 0x48(%rsp)
movq 0x58(%rsp), %rdi
callq 0x23bf20
movq %rax, 0x40(%rsp)
movq 0x58(%rsp), %rdi
callq 0x23bf80
movq %rax, 0x38(%rsp)
movq 0x70(%rsp), %rdi
movq 0x60(%rsp), %r9
leaq 0x4c0a0f(%rip), %rsi    # 0x52ac55
leaq 0x4bc950(%rip), %rdx    # 0x526b9d
leaq 0x4c0396(%rip), %rcx    # 0x52a5ea
movl $0x3ec, %r8d            # imm = 0x3EC
callq 0xd92c0
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0xec660
movl %eax, 0x2c(%rsp)
movq $0x0, 0x20(%rsp)
cmpq $0x0, 0x58(%rsp)
jne 0x6a2bb
movq 0x5d1d16(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4abd7f(%rip), %rsi    # 0x516013
leaq 0x4c09c0(%rip), %rdx    # 0x52ac5b
leaq 0x4c099d(%rip), %rcx    # 0x52ac3f
leaq 0x4c0341(%rip), %r8     # 0x52a5ea
movl $0x3f0, %r9d            # imm = 0x3F0
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6a2bd
cmpq $0x0, 0x30(%rsp)
jne 0x6a2cc
movb $0x1, 0x57(%rsp)
jmp 0x6a2e2
movq 0x30(%rsp), %rdi
movl 0x2c(%rsp), %eax
movzwl %ax, %esi
callq 0x88980
movq %rax, 0x20(%rsp)
cmpl $0x0, 0x2c(%rsp)
jbe 0x6a526
testb $0x1, 0x57(%rsp)
jne 0x6a4d3
movq 0x20(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x891c0
movq 0x58(%rsp), %rax
testb $0x1, 0x40(%rax)
je 0x6a3b2
movq 0x58(%rsp), %rax
movq (%rax), %rsi
addq $0xd0, %rsi
leaq 0x17(%rsp), %rdi
callq 0x6bdb0
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jle 0x6a3a8
movzbl 0x17(%rsp), %eax
cmpl $0xff, %eax
jge 0x6a351
movzbl 0x17(%rsp), %eax
movq %rax, 0x18(%rsp)
jmp 0x6a3a6
movq 0x58(%rsp), %rax
movq (%rax), %rsi
addq $0xe8, %rsi
movq %rsp, %rdi
callq 0x6be90
movl %eax, 0x10(%rsp)
cmpl $0x0, 0x10(%rsp)
jne 0x6a39c
movq 0x60(%rsp), %rdi
leaq 0x4c08e9(%rip), %rsi    # 0x52ac68
leaq 0x4c0264(%rip), %rdx    # 0x52a5ea
movl $0x401, %ecx            # imm = 0x401
movb $0x0, %al
callq 0xd88c0
movb $0x1, 0x57(%rsp)
jmp 0x6a4d1
movq 0x8(%rsp), %rax
movq %rax, 0x18(%rsp)
jmp 0x6a3ad
jmp 0x6a4d1
jmp 0x6a4af
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rax
movq 0x58(%rsp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x6a4ab
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x60(%rax), %rax
movq 0x58(%rsp), %rdx
movq 0x20(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x20(%rdx)
movb (%rax,%rcx), %al
movb %al, 0x17(%rsp)
movzbl 0x17(%rsp), %eax
cmpl $0xff, %eax
jge 0x6a40c
movzbl 0x17(%rsp), %eax
movq %rax, 0x18(%rsp)
jmp 0x6a4a9
jmp 0x6a40e
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rax
movq 0x58(%rsp), %rcx
movq 0x28(%rcx), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq 0x58(%rsp), %rcx
movq 0x20(%rcx), %rcx
subq $0x1, %rcx
cmpq %rcx, %rax
je 0x6a477
movq 0x5d1b5a(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4abbc3(%rip), %rsi    # 0x516013
leaq 0x4c084e(%rip), %rdx    # 0x52aca5
leaq 0x4c07e1(%rip), %rcx    # 0x52ac3f
leaq 0x4c0185(%rip), %r8     # 0x52a5ea
movl $0x401, %r9d            # imm = 0x401
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6a479
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x68(%rax), %rax
movq 0x58(%rsp), %rdx
movq 0x28(%rdx), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, 0x28(%rdx)
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
jmp 0x6a4ad
jmp 0x6a4d1
jmp 0x6a4af
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x891c0
movq 0x48(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x48(%rsp)
jmp 0x6a306
jmp 0x6a4d3
testb $0x1, 0x57(%rsp)
jne 0x6a524
jmp 0x6a4dc
movq 0x48(%rsp), %rax
cmpq 0x40(%rsp), %rax
je 0x6a520
movq 0x5d1ab1(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x4abb1a(%rip), %rsi    # 0x516013
leaq 0x4c07ff(%rip), %rdx    # 0x52acff
leaq 0x4c0738(%rip), %rcx    # 0x52ac3f
leaq 0x4c00dc(%rip), %r8     # 0x52a5ea
movl $0x40a, %r9d            # imm = 0x40A
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x6a522
jmp 0x6a524
jmp 0x6a526
leaq 0x58(%rsp), %rdi
callq 0x23b5e0
movq 0x20(%rsp), %rdi
callq 0x895a0
cmpq $0x0, 0x30(%rsp)
je 0x6a54c
movq 0x30(%rsp), %rdi
callq 0xd9390
jmp 0x6a54e
movb 0x57(%rsp), %dl
xorl %eax, %eax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testb $0x1, %dl
cmovnel %ecx, %eax
addq $0x78, %rsp
retq
nopw %cs:(%rax,%rax)