// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/match/test-mergeesa.c
// Function: gt_performtheindexmerging
int gt_performtheindexmerging(const GtStr *storeindex,
                           const GtStrArray *indexnametab,
                           GtLogger *logger,
                           GtError *err)
{
  Emissionmergedesa emmesa;
  unsigned int demand = SARR_ESQTAB | SARR_SUFTAB | SARR_LCPTAB;
  bool haserr = false;

  gt_error_check(err);
  if (gt_emissionmergedesa_init(&emmesa,
                             indexnametab,
                             demand,
                             logger,
                             err) != 0)
  {
    haserr = true;
  }
  if (!haserr)
  {
    if (gt_str_array_size(indexnametab) > 1UL)
    {
      if (mergeandstoreindex(storeindex,&emmesa,err) != 0)
      {
        haserr = true;
      }
    } else
    {
      gt_error_set(err,"merging requires more than one index");
      haserr = true;
    }
  }
  gt_emissionmergedesa_wrap(&emmesa);
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40148, %rsp          # imm = 0x40148
movq %rcx, %rbx
movq %rdx, %r12
movq %rsi, %r15
movq %rdi, %r14
testq %rcx, %rcx
je 0x209e8a
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x20a1c1
leaq 0x100e0(%rsp), %rdi
movq %r15, %rsi
movl $0x7, %edx
movq %r12, %rcx
movq %rbx, %r8
callq 0x31bc69
xorl %r13d, %r13d
testl %eax, %eax
setne %r12b
jne 0x20a19c
movq %r15, %rdi
callq 0x121e78
cmpq $0x2, %rax
jb 0x209f0e
testq %rbx, %rbx
je 0x209ed7
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x20a1cb
xorps %xmm0, %xmm0
leaq 0xa0(%rsp), %rdi
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
leaq 0x18665d(%rip), %rdx    # 0x390551
movq %r14, %rsi
movq %rbx, %rcx
callq 0x20a1d5
xorl %ebp, %ebp
testl %eax, %eax
setne %r15b
je 0x209f27
movl %r15d, %ebp
jmp 0x209f50
leaq 0x1bbc7e(%rip), %rsi    # 0x3c5b93
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r12b
jmp 0x20a19c
leaq 0xb0(%rsp), %rdi
leaq 0x1a38da(%rip), %rdx    # 0x3ad810
movq %r14, %rsi
movq %rbx, %rcx
callq 0x20a1d5
testl %eax, %eax
movb %r15b, %bpl
movl $0x1, %eax
cmovel %ebp, %eax
movl %eax, %ebp
testb %bpl, %bpl
jne 0x209f7d
leaq 0xc0(%rsp), %rdi
leaq 0x1a38ed(%rip), %rdx    # 0x3ad851
movq %r14, %rsi
movq %rbx, %rcx
callq 0x20a1d5
testl %eax, %eax
movzbl %bpl, %eax
movl $0x1, %ebp
cmovel %eax, %ebp
movb $0x0, 0xe(%rsp)
testb %bpl, %bpl
jne 0x20a13e
movq 0xb8(%rsp), %rcx
leaq 0xe(%rsp), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x125658
movq $0x1, 0xd0(%rsp)
movq 0x40138(%rsp), %rdx
movl 0x100ec(%rsp), %ecx
leaq 0x28(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x319d08
testq %rax, %rax
je 0x20a1d0
movq %rax, %r14
cmpl $0x0, 0x100e8(%rsp)
je 0x20a12a
movl %ebp, 0x14(%rsp)
movl %r12d, 0x10(%rsp)
leaq 0xf(%rsp), %r13
leaq 0x18(%rsp), %rbp
leaq 0x100e0(%rsp), %rdi
movq %rbx, %rsi
callq 0x31b880
testl %eax, %eax
jne 0x20a11f
testq %rbx, %rbx
je 0x20a02b
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x20a1c6
movl 0x100fc(%rsp), %edx
testq %rdx, %rdx
je 0x20a065
leaq (,%rdx,8), %rax
xorl %ecx, %ecx
movl 0x20100(%rsp,%rcx,2), %esi
movq 0x20108(%rsp,%rcx,2), %rdi
addq (%r14,%rsi,8), %rdi
movq %rdi, 0xd8(%rsp,%rcx)
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x20a041
movq 0xa8(%rsp), %rcx
movl $0x8, %esi
leaq 0xd8(%rsp), %rdi
callq 0x125658
movzbl 0x40100(%rsp), %eax
movl 0x100fc(%rsp), %r15d
subl %eax, %r15d
je 0x20a103
xorl %r12d, %r12d
movq 0x10100(%rsp,%r12,8), %rax
cmpq $0xfe, %rax
jbe 0x20a0d5
movq 0xc8(%rsp), %rcx
movq 0xd0(%rsp), %rdx
movq %rdx, 0x18(%rsp)
movq %rax, 0x20(%rsp)
movl $0x10, %esi
movl $0x1, %edx
movq %rbp, %rdi
callq 0x125658
movb $-0x1, %al
movb %al, 0xf(%rsp)
movq 0xb8(%rsp), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %r13, %rdi
callq 0x125658
incq 0xd0(%rsp)
incq %r12
cmpq %r12, %r15
jne 0x20a097
cmpl $0x0, 0x100e8(%rsp)
jne 0x209ffe
movl 0x10(%rsp), %r12d
xorl %r13d, %r13d
movl 0x14(%rsp), %ebp
jmp 0x20a12a
movb $0x1, %bpl
movl 0x10(%rsp), %r12d
xorl %r13d, %r13d
leaq 0x1bba48(%rip), %rsi    # 0x3c5b79
movq %r14, %rdi
movl $0xbf, %edx
callq 0x109670
movq 0xa8(%rsp), %rdi
callq 0x101f02
movq 0xa0(%rsp), %rdi
callq 0x121b03
movq 0xb8(%rsp), %rdi
callq 0x101f02
movq 0xb0(%rsp), %rdi
callq 0x121b03
movq 0xc8(%rsp), %rdi
callq 0x101f02
movq 0xc0(%rsp), %rdi
callq 0x121b03
testb %bpl, %bpl
movb %r12b, %r13b
movl $0x1, %r12d
cmovel %r13d, %r12d
leaq 0x100e0(%rsp), %rdi
callq 0x31bf3f
movzbl %r12b, %eax
negl %eax
addq $0x40148, %rsp          # imm = 0x40148
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x81004
callq 0x81076
callq 0x8103d
callq 0x810ad