// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_repfind.c
// Function: gt_repfind_runner
static int gt_repfind_runner(int argc,const char **argv, int parsed_args,
                             void *tool_arguments, GtError *err)
{
  bool haserr = false;
  GtMaxpairsoptions *arguments = (GtMaxpairsoptions *) tool_arguments;
  GtLogger *logger = NULL;
  GtXdropmatchinfo *xdropmatchinfo = NULL;
  GtGreedyextendmatchinfo *greedyextendmatchinfo = NULL;
  GtTimer *repfindtimer = NULL;
  GtExtendCharAccess cam_a = GT_EXTEND_CHAR_ACCESS_ANY,
                     cam_b = GT_EXTEND_CHAR_ACCESS_ANY;
  GtFtPolishing_info *pol_info = NULL;
  GtQuerymatchoutoptions *querymatchoutoptions;
  GtKarlinAltschulStat *karlin_altschul_stat = NULL;
  Gt_extend_querymatch_func eqmf = NULL;
  void *eqmf_data = NULL;
  int mode;
  const int modes[] = {GT_READMODE_FORWARD,
                       GT_READMODE_REVERSE,
                       GT_READMODE_REVCOMPL};
  const bool flags[] = {arguments->forward,
                        arguments->reverse,
                        arguments->reverse_complement};
  GtSeedExtendDisplayFlag *out_display_flag = NULL;
  GtFtTrimstat *trimstat = NULL;

  gt_error_check(err);
  logger = gt_logger_new(arguments->beverbose, GT_LOGGER_DEFLT_PREFIX, stdout);
  if (gt_showtime_enabled())
  {
    repfindtimer = gt_timer_new();
    gt_timer_start(repfindtimer);
  }
  if (parsed_args < argc)
  {
    gt_error_set(err,"superfluous arguments: \"%s\"",argv[argc-1]);
    haserr = true;
  }
  if (!haserr)
  {
    GtSeedExtendDisplaySetMode setmode;

    if (gt_option_is_set(arguments->refextendxdropoption) ||
        gt_option_is_set(arguments->refextendgreedyoption))
    {
      setmode = GT_SEED_EXTEND_DISPLAY_SET_STANDARD;
    } else
    {
      setmode = GT_SEED_EXTEND_DISPLAY_SET_EXACT;
    }
    out_display_flag = gt_querymatch_display_flag_new(arguments->display_args,
                                                      setmode,err);
    if (out_display_flag == NULL)
    {
      haserr = true;
    } else
    {
      gt_querymatch_Options_output(stdout,argc,argv,true,arguments->minidentity,
                                   arguments->historysize);
      gt_querymatch_Fields_output(stdout,out_display_flag);
    }
  }
  if (!haserr)
  {
    if (gt_querymatch_evalue_display(out_display_flag) ||
        gt_querymatch_bitscore_display(out_display_flag) ||
        arguments->evalue_threshold != DBL_MAX)
    {
      GtEncseqMetadata *emd
        = gt_encseq_metadata_new(gt_str_get(arguments->indexname),err);
      if (emd == NULL)
      {
        haserr = true;
      } else
      {
        karlin_altschul_stat = gt_karlin_altschul_stat_new_gapped(
                                     gt_encseq_metadata_total_length(emd),
                                     gt_encseq_metadata_num_of_sequences(emd),
                                     NULL);
        gt_encseq_metadata_delete(emd);
      }
    }
  }
  if (!haserr && gt_option_is_set(arguments->refextendxdropoption))
  {
    xdropmatchinfo
      = gt_xdrop_matchinfo_new(arguments->userdefinedleastlength,
                               gt_minidentity2errorpercentage(
                                            arguments->minidentity),
                               arguments->evalue_threshold,
                               arguments->xdropbelowscore,
                               arguments->extendxdrop);
    gt_assert(xdropmatchinfo != NULL);
  }
  if (!haserr)
  {
    if (gt_option_is_set(arguments->refextendgreedyoption) ||
        gt_querymatch_alignment_display(out_display_flag) ||
        gt_option_is_set(arguments->refextendxdropoption))
    {
      if (gt_greedy_extend_char_access(&cam_a,
                                       &cam_b,
                                       gt_str_get(arguments->cam_string),err)
         != 0)
      {
        haserr = true;
      }
    }
  }
  if (!haserr && gt_option_is_set(arguments->refextendgreedyoption))
  {
    GtUword errorpercentage = gt_minidentity2errorpercentage(
                                           arguments->minidentity);
    pol_info = polishing_info_new_with_bias(errorpercentage,
                                            GT_DEFAULT_MATCHSCORE_BIAS,
                                            arguments->historysize);
    greedyextendmatchinfo
      = gt_greedy_extend_matchinfo_new(arguments->maxalignedlendifference,
                                       arguments->historysize,
                                       arguments->perc_mat_history,
                                       arguments->userdefinedleastlength,
                                       errorpercentage,
                                       arguments->evalue_threshold,
                                       cam_a,
                                       cam_b,
                                       false,
                                       arguments->extendgreedy,
                                       pol_info);
    if (arguments->check_extend_symmetry)
    {
      gt_greedy_extend_matchinfo_check_extend_symmetry_set(
                                                greedyextendmatchinfo);
    }
    if (arguments->trimstat_on)
    {
      trimstat = gt_ft_trimstat_new();
      gt_greedy_extend_matchinfo_trimstat_set(greedyextendmatchinfo,trimstat);
    }
  }
  if (!haserr)
  {
    GtEncseq *encseq_for_desc = NULL;
    GtProcessinfo_and_querymatchspaceptr info_querymatch
      = Initializer_GtProcessinfo_and_querymatchspaceptr;
    info_querymatch.karlin_altschul_stat = karlin_altschul_stat;
    info_querymatch.out_display_flag = out_display_flag;
    if (gt_querymatch_alignment_display(out_display_flag) ||
        gt_querymatch_trace_display(out_display_flag) ||
        gt_querymatch_dtrace_display(out_display_flag) ||
        gt_querymatch_cigar_display(out_display_flag) ||
        gt_querymatch_cigarX_display(out_display_flag) ||
        (gt_option_is_set(arguments->refextendxdropoption) &&
         !arguments->noxpolish))
    {
      querymatchoutoptions
        = gt_querymatchoutoptions_new(out_display_flag,
                                      gt_str_get(arguments->indexname),err);
      if (querymatchoutoptions == NULL)
      {
        haserr = true;
      }
      if (!haserr && (gt_option_is_set(arguments->refextendxdropoption) ||
                      gt_option_is_set(arguments->refextendgreedyoption)))
      {
        const bool cam_generic = false;
        const bool weakends = false;
        const GtUword sensitivity
          = gt_option_is_set(arguments->refextendgreedyoption)
              ? arguments->extendgreedy
              : 100;
        gt_querymatchoutoptions_extend(querymatchoutoptions,
                                       gt_minidentity2errorpercentage(
                                               arguments->minidentity),
                                      arguments->evalue_threshold,
                                      arguments->maxalignedlendifference,
                                      arguments->historysize,
                                      arguments->perc_mat_history,
                                      cam_a,
                                      cam_b,
                                      cam_generic,
                                      weakends,
                                      sensitivity,
                                      GT_DEFAULT_MATCHSCORE_BIAS,
                                      true,
                                      out_display_flag);
      }
    } else
    {
      querymatchoutoptions = NULL;
    }
    if (!haserr)
    {
      info_querymatch.querymatchspaceptr = gt_querymatch_new();
      if (querymatchoutoptions != NULL)
      {
        gt_querymatch_outoptions_set(info_querymatch.querymatchspaceptr,
                                     querymatchoutoptions);
      }
      if (arguments->verify_alignment)
      {
        gt_querymatch_verify_alignment_set(info_querymatch.querymatchspaceptr);
      }
      if (gt_option_is_set(arguments->refextendxdropoption))
      {
        eqmf = gt_rf_xdrop_extend_querymatch_with_output;
        info_querymatch.processinfo = xdropmatchinfo;
        eqmf_data = (void *) &info_querymatch;
      } else
      {
        if (gt_option_is_set(arguments->refextendgreedyoption))
        {
          eqmf = gt_rf_greedy_extend_querymatch_with_output;
          info_querymatch.processinfo = greedyextendmatchinfo;
          eqmf_data = (void *) &info_querymatch;
        }
      }
      if (gt_querymatch_subjectid_display(out_display_flag))
      {
        GtEncseqLoader *encseq_loader = gt_encseq_loader_new();
        gt_encseq_loader_require_des_tab(encseq_loader);
        gt_encseq_loader_require_sds_tab(encseq_loader);
        encseq_for_desc
          = gt_encseq_loader_load(encseq_loader,
                                  gt_str_get(arguments->indexname),
                                  err);
        gt_encseq_loader_delete(encseq_loader);
        if (encseq_for_desc == NULL)
        {
          haserr = true;
        }
      }
    }
    if (!haserr && gt_str_array_size(arguments->query_files) == 0 &&
        gt_str_length(arguments->query_indexname) == 0)
    {
      if (arguments->samples > 0)
      {
        if (gt_testmaxpairs(gt_str_get(arguments->indexname),
                            arguments->samples,
                            arguments->seedlength,
                            (GtUword)
                            (100 * arguments->seedlength),
                            logger,
                            err) != 0)
        {
          haserr = true;
        }
      } else
      {
        if (!haserr && arguments->forward)
        {
          GtProcessmaxpairs processmaxpairs;
          void *processmaxpairsdata;

          if (arguments->searchspm)
          {
            processmaxpairs = gt_suffix_prefix_match_with_output;
            processmaxpairsdata = NULL;
          } else
          {
            if (gt_option_is_set(arguments->refextendxdropoption))
            {
              processmaxpairs = gt_generic_extend_selfmatch_xdrop_with_output;
              info_querymatch.processinfo = (void *) xdropmatchinfo;
            } else
            {
              if (gt_option_is_set(arguments->refextendgreedyoption))
              {
                processmaxpairs = gt_generic_simplegreedyselfmatchoutput;
                info_querymatch.processinfo = (void *) greedyextendmatchinfo;
              } else
              {
                processmaxpairs = gt_exact_selfmatch_with_output;
              }
            }
            processmaxpairsdata = (void *) &info_querymatch;
          }
          if (gt_callenummaxpairs(gt_str_get(arguments->indexname),
                                  arguments->seedlength,
                                  arguments->maxfreq,
                                  arguments->scanfile,
                                  processmaxpairs,
                                  processmaxpairsdata,
                                  logger,
                                  err) != 0)
          {
            haserr = true;
          }
        }
        if (!haserr)
        {
          /* only handle reverse and reverse_complement, as forward
             is handled as selfmatch-mode */
          for (mode = 1; !haserr && mode < 3; mode++)
          {
            if (flags[mode])
            {
              gt_querymatch_query_readmode_set(
                   info_querymatch.querymatchspaceptr,
                   modes[mode]);
              if (gt_callenumquerymatches(true,
                                          gt_str_get(arguments->indexname),
                                          NULL,
                                          NULL,
                                          modes[mode],
                                          arguments->seedlength,
                                          querymatchoutoptions,
                                          eqmf,
                                          eqmf_data,
                                          out_display_flag,
                                          logger,
                                          err) != 0)
              {
                haserr = true;
              }
            }
          }
        }
      }
    } else
    {
      for (mode = 0; !haserr && mode < 3; mode++)
      {
        if (flags[mode])
        {
          gt_querymatch_query_readmode_set(info_querymatch.querymatchspaceptr,
                                           modes[mode]);
          if (gt_callenumquerymatches(false,
                                  gt_str_get(arguments->indexname),
                                  arguments->query_files,
                                  arguments->query_indexname,
                                  modes[mode],
                                  arguments->seedlength,
                                  querymatchoutoptions,
                                  eqmf,
                                  eqmf_data,
                                  out_display_flag,
                                  logger,
                                  err) != 0)
          {
            haserr = true;
          }
        }
      }
    }
    gt_encseq_delete(encseq_for_desc);
    gt_querymatchoutoptions_delete(querymatchoutoptions);
    gt_querymatch_delete(info_querymatch.querymatchspaceptr);
  }
  gt_karlin_altschul_stat_delete(karlin_altschul_stat);
  gt_xdrop_matchinfo_delete(xdropmatchinfo);
  gt_greedy_extend_matchinfo_delete(greedyextendmatchinfo);
  gt_ft_trimstat_delete(trimstat);
  polishing_info_delete(pol_info);
  gt_logger_delete(logger);
  gt_querymatch_display_flag_delete(out_display_flag);
  if (repfindtimer != NULL)
  {
    char *keystring = gt_seed_extend_params_keystring(
                             gt_option_is_set(arguments->refextendgreedyoption),
                             gt_option_is_set(arguments->refextendxdropoption),
                             arguments->seedlength,
                             arguments->userdefinedleastlength,
                             arguments->minidentity,
                             arguments->maxalignedlendifference,
                             arguments->perc_mat_history,
                             arguments->extendgreedy,
                             arguments->extendxdrop,
                             arguments->xdropbelowscore);
    printf("# TIME repfind-%s",keystring);
    gt_free(keystring);
    gt_timer_show_formatted(repfindtimer," overall " GT_WD ".%02ld\n",stdout);
    gt_timer_delete(repfindtimer);
  }
  return haserr ? -1 : 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, %r13
movq %rcx, %rbx
movl %edx, %r12d
movq %rsi, %r15
movl %edi, %r14d
pushq $0x3
popq %rax
movl %eax, 0x24(%rsp)
movl %eax, 0x20(%rsp)
movb 0x52(%rcx), %al
movb %al, 0x5(%rsp)
movb 0x53(%rcx), %al
movb %al, 0x6(%rsp)
movb 0x54(%rcx), %al
movb %al, 0x7(%rsp)
testq %r8, %r8
je 0x3fce0
movq %r13, %rdi
callq 0x89eb7
testb %al, %al
jne 0x4068f
movzbl 0x51(%rbx), %edi
movq 0x3f81c5(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x2a6bdf(%rip), %rsi    # 0x2e68d4
callq 0x92b50
movq %rax, 0x48(%rsp)
callq 0xaaf34
testb %al, %al
je 0x3fd1c
callq 0xaf478
movq %rax, 0x38(%rsp)
movq %rax, %rdi
callq 0xaf4d6
jmp 0x3fd25
movq $0x0, 0x38(%rsp)
pushq $0x1
popq %rbp
cmpl %r14d, %r12d
movq %rbx, 0x78(%rsp)
jge 0x3fd56
movl %ebp, 0x8(%rsp)
movslq %r14d, %rax
movq -0x8(%r15,%rax,8), %rdx
leaq 0x2b594f(%rip), %rsi    # 0x2f5694
xorl %ebx, %ebx
movq %r13, %rdi
xorl %eax, %eax
callq 0x89dbb
jmp 0x3fec8
movq 0x98(%rbx), %rdi
callq 0x9b4cb
movl %ebp, %esi
testb %al, %al
jne 0x3fd7c
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
movzbl %al, %eax
pushq $0x2
popq %rsi
subl %eax, %esi
movq 0xb0(%rbx), %rdi
movq %r13, %rdx
callq 0x169261
testq %rax, %rax
je 0x3fec2
movq 0x3f8115(%rip), %r12    # 0x437eb0
movq %rax, 0x18(%rsp)
movq (%r12), %rdi
movq 0x28(%rbx), %r9
movq 0x38(%rbx), %r8
pushq $0x1
popq %rcx
movl %r14d, %esi
movq %r15, %rdx
callq 0x16989d
movq (%r12), %rdi
movq 0x18(%rsp), %r12
movq %r12, %rsi
callq 0x169994
movq %r12, %rdi
callq 0x169190
testb %al, %al
jne 0x3fdfb
movq %r12, %rdi
callq 0x169198
testb %al, %al
jne 0x3fdfb
movsd 0xb8(%rbx), %xmm0
ucomisd 0x2a7f1d(%rip), %xmm0   # 0x2e7d10
jne 0x3fdfb
jnp 0x4011b
movq 0x60(%rbx), %rdi
callq 0xad1fa
movq %rax, %rdi
movq %r13, %rsi
callq 0x87eb0
testq %rax, %rax
je 0x3ffc4
movq %rax, %r14
movq %rax, %rdi
callq 0x88588
movq %rax, %r15
movq %r14, %rdi
callq 0x886da
movq %r15, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x1659df
movq %rax, 0x28(%rsp)
movq %r14, %rdi
callq 0x888b5
movq 0x98(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x3ffda
movl (%rbx), %r14d
movq 0x38(%rbx), %rdi
callq 0x18fa0c
movsd 0xb8(%rbx), %xmm0
movq 0x8(%rbx), %rdx
movq 0x18(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x18ebd2
movq %rax, 0x40(%rsp)
testq %rax, %rax
jne 0x3ffe3
movq 0x3f80d0(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a5171(%rip), %rsi    # 0x2e5013
leaq 0x2b5807(%rip), %rdx    # 0x2f56b0
leaq 0x2b57d2(%rip), %rcx    # 0x2f5682
leaq 0x2b5119(%rip), %r8     # 0x2f4fd0
movl $0x353, %r9d            # imm = 0x353
jmp 0x406bb
movl %ebp, 0x8(%rsp)
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
xorl %r12d, %r12d
xorl %edi, %edi
movq 0x38(%rsp), %r15
callq 0x164cbc
movq %r14, %rdi
callq 0x18ec93
movq %rbx, %rdi
callq 0x18f431
movq %rbp, %rdi
callq 0x15d5bc
movq %r13, %rdi
callq 0x15d13c
movq 0x48(%rsp), %rdi
callq 0x92fd0
movq %r12, %rdi
callq 0x16924a
testq %r15, %r15
je 0x3ffac
movq 0x78(%rsp), %rbx
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
movl %eax, %r14d
movq 0x98(%rbx), %rdi
callq 0x9b4cb
movl (%rbx), %ecx
movl 0x4(%rbx), %edx
movq 0x38(%rbx), %r8
movq 0x40(%rbx), %r9
movzbl %r14b, %edi
movzbl %al, %esi
pushq 0x8(%rbx)
pushq 0x18(%rbx)
pushq 0x48(%rbx)
pushq 0x30(%rbx)
callq 0x18fa62
addq $0x20, %rsp
movq %rax, %rbx
leaq 0x2b575a(%rip), %rdi    # 0x2f56c7
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
leaq 0x2b5052(%rip), %rsi    # 0x2f4fd0
movq %rbx, %rdi
movl $0x469, %edx            # imm = 0x469
callq 0x936f9
movq 0x3f7f1e(%rip), %rax    # 0x437eb0
movq (%rax), %rdx
leaq 0x2b0275(%rip), %rsi    # 0x2f0211
movq %r15, %rdi
callq 0xaf5b6
movq %r15, %rdi
callq 0xafc5b
movl 0x8(%rsp), %eax
negl %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %ebp, %ebp
xorl %r14d, %r14d
jmp 0x3fed3
movq $0x0, 0x40(%rsp)
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
jne 0x4000f
movq %r12, %rdi
callq 0x169236
testb %al, %al
jne 0x4000f
movq 0x98(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x40053
movq 0x70(%rbx), %rdi
callq 0xad1fa
leaq 0x24(%rsp), %rdi
leaq 0x20(%rsp), %rsi
movq %rax, %rdx
movq %r13, %rcx
callq 0x18ee01
testl %eax, %eax
je 0x40053
pushq $0x1
popq %rax
movl %eax, 0x8(%rsp)
xorl %ebx, %ebx
xorl %r13d, %r13d
xorl %ebp, %ebp
movq 0x38(%rsp), %r15
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %r14
jmp 0x3feda
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x4010a
movq 0x38(%rbx), %rdi
callq 0x18fa0c
movq %rax, %r14
movq %rax, %xmm1
punpckldq 0x2a7860(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2a7868(%rip), %xmm1   # 0x2e78f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq 0x28(%rbx), %rdi
movsd 0x2a6188(%rip), %xmm1   # 0x2e6228
callq 0x15cd14
movq 0x40(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movl (%rbx), %ecx
movsd 0xb8(%rbx), %xmm0
movl 0x24(%rsp), %r9d
movl 0x20(%rsp), %r11d
movq %r14, %r8
movq %rax, 0x60(%rsp)
pushq %rax
pushq 0x48(%rbx)
pushq $0x0
pushq %r11
callq 0x18f32e
addq $0x20, %rsp
movq %rax, %r14
cmpb $0x1, 0x56(%rbx)
jne 0x400ef
movq %r14, %rdi
callq 0x18f4bc
cmpb $0x1, 0x57(%rbx)
jne 0x40129
callq 0x15d1ec
movq %rax, %r15
movq %r14, %rdi
movq %rax, %rsi
callq 0x18f502
jmp 0x4012c
xorl %r15d, %r15d
movq $0x0, 0x60(%rsp)
xorl %r14d, %r14d
jmp 0x4012c
movq $0x0, 0x28(%rsp)
jmp 0x3fe48
xorl %r15d, %r15d
movq 0x28(%rsp), %rax
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, 0x80(%rsp)
movq %rax, 0x90(%rsp)
movq %r12, 0x98(%rsp)
movq %r12, %rdi
callq 0x169236
testb %al, %al
movq %r14, 0x58(%rsp)
movq %r15, 0x68(%rsp)
jne 0x401bc
movq %r12, %rdi
callq 0x1690e6
testb %al, %al
jne 0x401bc
movq %r12, %rdi
callq 0x1690eb
testb %al, %al
jne 0x401bc
movq %r12, %rdi
callq 0x1690dc
testb %al, %al
jne 0x401bc
movq %r12, %rdi
callq 0x1690e1
testb %al, %al
je 0x404fb
movq 0x60(%rbx), %rdi
callq 0xad1fa
movq %r12, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x16807c
movq %rax, %rbp
testq %rax, %rax
sete %r14b
je 0x402d3
movq 0x98(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
jne 0x40203
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x4026d
movq %r14, %r15
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x4021c
movq 0x48(%rbx), %r14
jmp 0x40220
pushq $0x64
popq %r14
movq 0x38(%rbx), %rdi
callq 0x18fa0c
movsd 0xb8(%rbx), %xmm0
movq 0x40(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %r8
movl 0x24(%rsp), %r9d
movl 0x20(%rsp), %r10d
movsd 0x2a5fd9(%rip), %xmm1   # 0x2e6228
movq %rbp, %rdi
movq %rax, %rsi
pushq %r12
pushq $0x1
pushq %r14
pushq $0x0
pushq $0x0
pushq %r10
callq 0x1681a6
addq $0x30, %rsp
movq %r15, %r14
testq %rbp, %rbp
je 0x402d3
movq %r14, 0x10(%rsp)
callq 0x169e40
movq %rax, %r14
movq %rax, 0x88(%rsp)
testq %rbp, %rbp
je 0x40297
movq %r14, %rdi
movq %rbp, %rsi
callq 0x169fbc
cmpb $0x1, 0x59(%rbx)
jne 0x402a5
movq %r14, %rdi
callq 0x16a0ab
movq 0x98(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x402f3
leaq 0x80(%rsp), %rdx
movq 0x40(%rsp), %rax
movq %rdx, 0x30(%rsp)
movq %rax, (%rdx)
leaq 0x14febe(%rip), %rax    # 0x19018f
jmp 0x4031f
movq $0x0, 0x8(%rsp)
movq $0x0, 0x30(%rsp)
movq $0x0, 0x50(%rsp)
jmp 0x403a6
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x40326
leaq 0x80(%rsp), %rdx
movq 0x58(%rsp), %rax
movq %rdx, 0x30(%rsp)
movq %rax, (%rdx)
leaq 0x150090(%rip), %rax    # 0x1903af
movq %rax, 0x8(%rsp)
jmp 0x40338
movq $0x0, 0x8(%rsp)
movq $0x0, 0x30(%rsp)
movq %r12, %rdi
callq 0x1690fa
testb %al, %al
je 0x40398
callq 0x791cd
movq %rax, %r14
movq %rax, %rdi
callq 0x7d08b
movq %r14, %rdi
callq 0x7d218
movq 0x60(%rbx), %rdi
callq 0xad1fa
movq %r14, %rdi
movq %rax, %rsi
movq %r13, %rdx
callq 0x7921d
movq %rax, %r15
movq %r14, %rdi
callq 0x79f01
movq %r15, 0x50(%rsp)
testq %r15, %r15
movq 0x10(%rsp), %r14
movzbl %r14b, %r14d
pushq $0x1
popq %rax
cmovel %eax, %r14d
jmp 0x403a6
movq $0x0, 0x50(%rsp)
movq 0x10(%rsp), %r14
testb %r14b, %r14b
jne 0x403cb
movq 0x78(%rbx), %rdi
callq 0xae61c
testq %rax, %rax
jne 0x403cb
movq 0x68(%rbx), %rdi
callq 0xad289
testq %rax, %rax
je 0x404bd
movq %r13, 0x70(%rsp)
movq %rbp, %r13
leaq 0x2b547a(%rip), %rbp    # 0x2f5854
xorl %r12d, %r12d
testb $0x1, %r14b
jne 0x40467
cmpq $0x2, %r12
ja 0x40467
cmpb $0x1, 0x5(%rsp,%r12)
jne 0x4045b
movq %r14, %r15
movq 0x88(%rsp), %rdi
movl (%rbp), %r14d
movl %r14d, %esi
callq 0x16a0a4
movq 0x60(%rbx), %rdi
callq 0xad1fa
movq 0x78(%rbx), %rdx
movq 0x68(%rbx), %rcx
movl 0x4(%rbx), %r9d
xorl %edi, %edi
movq %rax, %rsi
movl %r14d, %r8d
pushq 0x70(%rsp)
pushq 0x50(%rsp)
pushq 0x28(%rsp)
pushq 0x48(%rsp)
pushq 0x28(%rsp)
pushq %r13
callq 0x40b5f
addq $0x30, %rsp
testl %eax, %eax
je 0x40454
pushq $0x1
popq %rax
movl %eax, %r14d
jmp 0x4045b
movq %r15, %r14
movzbl %r14b, %r14d
incq %r12
addq $0x4, %rbp
jmp 0x403dd
movq 0x18(%rsp), %r12
movq %r13, %rbp
movq 0x50(%rsp), %rdi
callq 0x735fd
movq %rbp, %rdi
callq 0x16833c
movq 0x88(%rsp), %rdi
callq 0x16a2a1
andb $0x1, %r14b
movzbl %r14b, %eax
movl %eax, 0x8(%rsp)
movq 0x38(%rsp), %r15
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %r14
movq 0x60(%rsp), %r13
movq 0x58(%rsp), %rbx
movq 0x68(%rsp), %rbp
jmp 0x3feda
cmpq $0x0, 0x10(%rbx)
je 0x40525
movq 0x60(%rbx), %rdi
callq 0xad1fa
movq 0x10(%rbx), %rsi
movl 0x4(%rbx), %edx
imull $0x64, %edx, %ecx
movq %rax, %rdi
movq 0x48(%rsp), %r8
movq %r13, %r9
callq 0x1b3bac
testl %eax, %eax
movzbl %r14b, %eax
pushq $0x1
popq %rcx
cmovel %eax, %ecx
movl %ecx, %r14d
jmp 0x4046f
movq 0x98(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x40515
cmpb $0x0, 0x58(%rbx)
je 0x401bc
movq $0x0, 0x10(%rsp)
xorl %ebp, %ebp
jmp 0x40277
cmpb $0x1, 0x52(%rbx)
jne 0x405e0
cmpb $0x0, 0x55(%rbx)
movq %r14, 0x10(%rsp)
je 0x40546
leaq 0x186(%rip), %r14       # 0x406c7
xorl %r15d, %r15d
jmp 0x405a4
movq 0x98(%rbx), %rdi
callq 0x9b4cb
testb %al, %al
je 0x4056f
leaq 0x80(%rsp), %r15
movq 0x40(%rsp), %rax
movq %rax, (%r15)
leaq 0x31d(%rip), %r14       # 0x4088a
jmp 0x405a4
movq 0xa0(%rbx), %rdi
callq 0x9b4cb
leaq 0x80(%rsp), %r15
testb %al, %al
je 0x4059d
movq 0x58(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x33b(%rip), %r14       # 0x408d6
jmp 0x405a4
leaq 0x37e(%rip), %r14       # 0x40922
movq 0x60(%rbx), %rdi
callq 0xad1fa
movl 0x4(%rbx), %esi
movq 0x20(%rbx), %rdx
movzbl 0x50(%rbx), %ecx
movq %rax, %rdi
movq %r14, %r8
movq %r15, %r9
pushq %r13
pushq 0x50(%rsp)
callq 0x14ec11
popq %rcx
popq %rdx
testl %eax, %eax
movq 0x10(%rsp), %r14
movzbl %r14b, %r14d
pushq $0x1
popq %rax
cmovnel %eax, %r14d
testb %r14b, %r14b
jne 0x4046f
pushq $0x1
popq %r12
testb $0x1, %r14b
jne 0x40685
cmpq $0x2, %r12
ja 0x40685
cmpb $0x1, 0x5(%rsp,%r12)
jne 0x4067d
movq 0x88(%rsp), %rdi
movq %r14, 0x10(%rsp)
leaq 0x2b5237(%rip), %rax    # 0x2f5854
movl (%rax,%r12,4), %r14d
movl %r14d, %esi
callq 0x16a0a4
movq 0x60(%rbx), %rdi
callq 0xad1fa
movl 0x4(%rbx), %r9d
movq %r13, %r15
movq %rbp, %r13
pushq $0x1
popq %rbp
movl %ebp, %edi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r14d, %r8d
movq 0x10(%rsp), %r14
pushq %r15
pushq 0x50(%rsp)
pushq 0x28(%rsp)
pushq 0x48(%rsp)
pushq 0x28(%rsp)
pushq %r13
callq 0x40b5f
addq $0x30, %rsp
testl %eax, %eax
movzbl %r14b, %r14d
cmovnel %ebp, %r14d
movq %r13, %rbp
movq %r15, %r13
incq %r12
jmp 0x405ed
movq 0x18(%rsp), %r12
jmp 0x4046f
movq 0x3f78d2(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2a4973(%rip), %rsi    # 0x2e5013
leaq 0x2a4b18(%rip), %rdx    # 0x2e51bf
leaq 0x2b4fd4(%rip), %rcx    # 0x2f5682
leaq 0x2b491b(%rip), %r8     # 0x2f4fd0
movl $0x311, %r9d            # imm = 0x311
xorl %eax, %eax
callq 0x17a50
callq 0x17390