// File: /workspace/github_c_makefile_star2_O3/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 $0x40138, %rsp          # imm = 0x40138
movq %rcx, %r14
movq %rdx, %rbx
movq %rsi, %r12
movq %rdi, %r15
testq %rcx, %rcx
je 0x20067a
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x200985
leaq 0x100d0(%rsp), %rdi
movq %r12, %rsi
movl $0x7, %edx
movq %rbx, %rcx
movq %r14, %r8
callq 0x311956
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testl %eax, %eax
jne 0x20078f
movl %eax, %ebx
movq %r12, %rdi
callq 0x11c131
cmpq $0x2, %rax
jb 0x20077e
testq %r14, %r14
je 0x2006cb
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x20098a
xorps %xmm0, %xmm0
leaq 0x90(%rsp), %rdi
movaps %xmm0, 0x20(%rdi)
movaps %xmm0, 0x10(%rdi)
movaps %xmm0, (%rdi)
leaq 0x186a90(%rip), %rdx    # 0x387178
movq %r15, %rsi
movq %r14, %rcx
callq 0x200999
testl %eax, %eax
jne 0x200719
leaq 0xa0(%rsp), %rdi
leaq 0x1a3b6b(%rip), %rdx    # 0x3a4271
movq %r15, %rsi
movq %r14, %rcx
callq 0x200999
testl %eax, %eax
je 0x2007b0
movb $0x0, 0x2(%rsp)
movb $0x1, %bpl
testl %ebx, %ebx
setne %bl
movq 0x98(%rsp), %rdi
callq 0xfd09a
movq 0x90(%rsp), %rdi
callq 0x11bdbf
movq 0xa8(%rsp), %rdi
callq 0xfd09a
movq 0xa0(%rsp), %rdi
callq 0x11bdbf
movq 0xb8(%rsp), %rdi
callq 0xfd09a
movq 0xb0(%rsp), %rdi
callq 0x11bdbf
orb %bpl, %bl
movzbl %bl, %ebp
negl %ebp
jmp 0x20078f
leaq 0x1bbd9e(%rip), %rsi    # 0x3bc523
movq %r14, %rdi
xorl %eax, %eax
callq 0xfcb67
leaq 0x100d0(%rsp), %rdi
callq 0x311bfd
movl %ebp, %eax
addq $0x40138, %rsp          # imm = 0x40138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xb0(%rsp), %rdi
leaq 0x1a3af3(%rip), %rdx    # 0x3a42b2
movq %r15, %rsi
movq %r14, %rcx
callq 0x200999
movb $0x0, 0x2(%rsp)
movb $0x1, %bpl
testl %eax, %eax
setne %al
jne 0x200721
movl %eax, 0x4(%rsp)
movq 0xa8(%rsp), %rcx
leaq 0x2(%rsp), %rdi
movl $0x1, %esi
movl $0x1, %edx
callq 0x11f89c
movq $0x1, 0xc0(%rsp)
movq 0x40128(%rsp), %rdx
movl 0x100dc(%rsp), %ecx
leaq 0x18(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x30fb60
testq %rax, %rax
je 0x200994
movq %rax, %r15
cmpl $0x0, 0x100d8(%rsp)
je 0x200965
leaq 0x3(%rsp), %rbp
leaq 0x100d0(%rsp), %rdi
movq %r14, %rsi
callq 0x3115c0
testl %eax, %eax
jne 0x200969
testq %r14, %r14
je 0x200873
movq %r14, %rdi
callq 0xfcc32
testb %al, %al
jne 0x20098f
movl 0x100ec(%rsp), %edx
testq %rdx, %rdx
je 0x2008af
leaq (,%rdx,8), %rax
xorl %ecx, %ecx
movl 0x200f0(%rsp,%rcx,2), %esi
movq 0x200f8(%rsp,%rcx,2), %rdi
addq (%r15,%rsi,8), %rdi
movq %rdi, 0xc8(%rsp,%rcx)
addq $0x8, %rcx
cmpq %rcx, %rax
jne 0x200889
jmp 0x2008b1
xorl %edx, %edx
movq 0x98(%rsp), %rcx
movl $0x8, %esi
leaq 0xc8(%rsp), %rdi
callq 0x11f89c
movzbl 0x400f0(%rsp), %eax
movl 0x100ec(%rsp), %r13d
subl %eax, %r13d
je 0x200951
xorl %r12d, %r12d
movq 0x100f0(%rsp,%r12,8), %rax
cmpq $0xfe, %rax
jbe 0x200923
movq 0xb8(%rsp), %rcx
movq 0xc0(%rsp), %rdx
movq %rdx, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movl $0x10, %esi
movl $0x1, %edx
leaq 0x8(%rsp), %rdi
callq 0x11f89c
movb $-0x1, %al
movb %al, 0x3(%rsp)
movq 0xa8(%rsp), %rcx
movl $0x1, %esi
movl $0x1, %edx
movq %rbp, %rdi
callq 0x11f89c
incq 0xc0(%rsp)
incq %r12
cmpq %r12, %r13
jne 0x2008e3
cmpl $0x0, 0x100d8(%rsp)
jne 0x200846
movl 0x4(%rsp), %ebp
jmp 0x20096c
xorl %ebp, %ebp
jmp 0x20096c
movb $0x1, %bpl
leaq 0x1bbb96(%rip), %rsi    # 0x3bc509
movq %r15, %rdi
movl $0xbf, %edx
callq 0x1045eb
jmp 0x200721
callq 0x7f1fa
callq 0x7f233
callq 0x7f26c
callq 0x7f2a3