// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/tools/gt_chain2dim.c
// Function: gt_chain2dim_runner
static int gt_chain2dim_runner (GT_UNUSED int argc,
                                GT_UNUSED const char **argv,
                                GT_UNUSED int parsed_args,
                                void *tool_arguments,
                                GtError * err)
{
  GtChain2dimoptions *arguments = tool_arguments;
  GtChain2Dimmatchtable *matchtable;
  bool haserr = false;
  GtLogger *logger = NULL;

  gt_error_check (err);
  gt_assert (arguments != NULL);
  gt_assert (parsed_args == argc);

  matchtable = gt_chain_analyzeopenformatfile(arguments->weightfactor,
                                              gt_str_get(arguments->
                                                         matchfile),
                                              err);
  if (matchtable == NULL)
  {
    haserr = true;
  }
  if (!haserr)
  {
    unsigned int presortdim = 1U;
    GtChain2Dim *chain;
    Counter counter;

    logger = gt_logger_new(arguments->verbose, GT_LOGGER_DEFLT_PREFIX, stdout);
    gt_chain_possiblysortmatches(logger, matchtable, presortdim);
    chain = gt_chain_chain_new();
    counter.chaincounter = 0;
    gt_chain_fastchaining(arguments->gtchainmode,
                          chain,
                          matchtable,
                          true,
                          presortdim,
                          true,
                          arguments->silent ? gt_outputformatchainsilent
                                            : gt_outputformatchain,
                          &counter,
                          logger);
    gt_chain_chain_delete(chain);
  }
  gt_chain_chainmode_delete(arguments->gtchainmode);
  gt_chain_matchtable_delete(matchtable);
  if (logger != NULL)
  {
    gt_logger_delete(logger);
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %r8, %r14
movq %rcx, %rbx
movl %edx, %ebp
movl %edi, %r15d
testq %r8, %r8
je 0x9ca61
movq %r14, %rdi
callq 0x101a9a
testb %al, %al
jne 0x9cb6d
testq %rbx, %rbx
je 0x9cb63
cmpl %r15d, %ebp
jne 0x9cb68
movsd 0x8(%rbx), %xmm0
movsd %xmm0, (%rsp)
movq 0x18(%rbx), %rdi
callq 0x120d23
movsd (%rsp), %xmm0
movq %rax, %rdi
movq %r14, %rsi
callq 0x196f6c
movq %rax, %r14
testq %rax, %rax
je 0x9caee
movzbl 0x1(%rbx), %edi
movq 0x42743f(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x2b2e21(%rip), %rsi    # 0x34f8d4
callq 0x108ed0
movq %rax, %r15
movq %rax, %rdi
movq %r14, %rsi
movl $0x1, %edx
callq 0x19661c
callq 0x1968ac
movq %rax, %r12
movq $0x0, 0x8(%rsp)
movq 0x50(%rbx), %rdi
cmpb $0x0, (%rbx)
je 0x9caf3
leaq -0x5ec(%rip), %rax      # 0x9c500
jmp 0x9cafa
xorl %r15d, %r15d
jmp 0x9cb30
leaq -0x504(%rip), %rax      # 0x9c5f6
subq $0x8, %rsp
leaq 0x10(%rsp), %r10
movq %r12, %rsi
movq %r14, %rdx
movl $0x1, %ecx
movl $0x1, %r8d
movl $0x1, %r9d
pushq %r15
pushq %r10
pushq %rax
callq 0x195127
addq $0x20, %rsp
movq %r12, %rdi
callq 0x1968d3
movq 0x50(%rbx), %rdi
callq 0x196895
movq %r14, %rdi
callq 0x194f6e
testq %r15, %r15
je 0x9cb4e
movq %r15, %rdi
callq 0x10916a
xorl %eax, %eax
cmpq $0x1, %r14
sbbl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
callq 0x18656
callq 0x1861d
callq 0x185e4
nop