// File: /workspace/github_c_makefile_star2_O1/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, %r15
movq %rcx, %rbx
movl %edx, %r13d
movq %rsi, %r14
movl %edi, %r12d
movl $0x3, %eax
movl %eax, 0x2c(%rsp)
movl %eax, 0x28(%rsp)
movb 0x52(%rcx), %al
movb %al, 0xd(%rsp)
movb 0x53(%rcx), %al
movb %al, 0xe(%rsp)
movb 0x54(%rcx), %al
movb %al, 0xf(%rsp)
testq %r8, %r8
je 0xbe562
movq %r15, %rdi
callq 0x101a9a
testb %al, %al
jne 0xbeea2
movzbl 0x51(%rbx), %edi
movq 0x40597b(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x29135d(%rip), %rsi    # 0x34f8d4
callq 0x108ed0
movq %rax, 0x38(%rsp)
callq 0x11ed94
testb %al, %al
je 0xbe59e
callq 0x1226a4
movq %rax, 0x50(%rsp)
movq %rax, %rdi
callq 0x122733
jmp 0xbe5a7
movq $0x0, 0x50(%rsp)
cmpl %r12d, %r13d
movq %r15, 0x10(%rsp)
jge 0xbe5cf
movslq %r12d, %rax
movq -0x8(%r14,%rax,8), %rdx
leaq 0x2a00f4(%rip), %rsi    # 0x35e6b4
movq %r15, %rdi
xorl %eax, %eax
callq 0x1019cf
movb $0x1, %r15b
jmp 0xbe5d2
xorl %r15d, %r15d
movq 0x50(%rsp), %r13
testb %r15b, %r15b
je 0xbe5e0
xorl %ebp, %ebp
jmp 0xbe659
movq 0x98(%rbx), %rdi
callq 0x10fe52
movl $0x1, %esi
testb %al, %al
jne 0xbe60b
movq 0xa0(%rbx), %rdi
callq 0x10fe52
movzbl %al, %eax
movl $0x2, %esi
subl %eax, %esi
movq 0xb0(%rbx), %rdi
movq 0x10(%rsp), %rdx
callq 0x1c2dbd
movq %rax, %rbp
testq %rax, %rax
je 0xbe656
movq 0x4058bd(%rip), %rax    # 0x4c3ee8
movq %r14, %rdx
movq %rax, %r14
movq (%rax), %rdi
movq 0x28(%rbx), %r9
movq 0x38(%rbx), %r8
movl %r12d, %esi
movl $0x1, %ecx
callq 0x1c33b0
movq (%r14), %rdi
movq %rbp, %rsi
callq 0x1c34da
jmp 0xbe659
movb $0x1, %r15b
testb %r15b, %r15b
movq %rbp, 0x58(%rsp)
jne 0xbe6e2
movq %rbp, %rdi
callq 0x1c2cfc
testb %al, %al
jne 0xbe68f
movq %rbp, %rdi
callq 0x1c2d0d
testb %al, %al
jne 0xbe68f
movsd 0xb8(%rbx), %xmm0
ucomisd 0x292685(%rip), %xmm0   # 0x350d10
jne 0xbe68f
jnp 0xbe6e2
movq 0x60(%rbx), %rdi
callq 0x120d23
movq %rax, %rdi
movq 0x10(%rsp), %rsi
callq 0x1000e4
testq %rax, %rax
je 0xbe6df
movq %rax, %r14
movq %rax, %rdi
callq 0x100d3c
movq %rax, %rbp
movq %r14, %rdi
callq 0x100d8f
movq %rbp, %rdi
movq 0x58(%rsp), %rbp
movq %rax, %rsi
xorl %edx, %edx
callq 0x1bfbb9
movq %rax, %r12
movq %r14, %rdi
callq 0x100e07
jmp 0xbe6e5
movb $0x1, %r15b
xorl %r12d, %r12d
testb %r15b, %r15b
jne 0xbe72e
movq 0x98(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbe72e
movl (%rbx), %r14d
movq 0x38(%rbx), %rdi
callq 0x1ea90a
movsd 0xb8(%rbx), %xmm0
movq 0x8(%rbx), %rdx
movq 0x18(%rbx), %rcx
movq %r14, %rdi
movq %rax, %rsi
callq 0x1e9d27
movq %rax, %r14
testq %rax, %rax
jne 0xbe731
callq 0x1e45c
xorl %r14d, %r14d
testb %r15b, %r15b
jne 0xbe792
movq 0xa0(%rbx), %rdi
callq 0x10fe52
testb %al, %al
jne 0xbe762
movq %rbp, %rdi
callq 0x1c2d92
testb %al, %al
jne 0xbe762
movq 0x98(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbe792
movq 0x70(%rbx), %rdi
callq 0x120d23
leaq 0x2c(%rsp), %rdi
leaq 0x28(%rsp), %rsi
movq %rax, %rdx
movq 0x10(%rsp), %rcx
callq 0x1e9ec5
testl %eax, %eax
movzbl %r15b, %eax
movl $0x1, %r15d
cmovel %eax, %r15d
testb %r15b, %r15b
movq %r12, 0x70(%rsp)
jne 0xbe86b
movq 0xa0(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbe86b
movq %r14, 0x68(%rsp)
movq 0x38(%rbx), %rdi
callq 0x1ea90a
movq %rax, %r14
movq %rax, %xmm1
punpckldq 0x29210e(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x292116(%rip), %xmm1   # 0x3508f0
movapd %xmm1, %xmm0
unpckhpd %xmm1, %xmm0            # xmm0 = xmm0[1],xmm1[1]
addsd %xmm1, %xmm0
movq 0x28(%rbx), %rdi
movsd 0x290a36(%rip), %xmm1   # 0x34f228
callq 0x1b8300
movq 0x40(%rbx), %rdi
movq 0x28(%rbx), %rsi
movq 0x30(%rbx), %rdx
movl (%rbx), %ecx
movsd 0xb8(%rbx), %xmm0
movl 0x2c(%rsp), %r9d
movl 0x28(%rsp), %r10d
movq %r14, %r8
movq %rax, %r12
pushq %rax
pushq 0x48(%rbx)
pushq $0x0
pushq %r10
callq 0x1ea31d
addq $0x20, %rsp
movq %rax, 0x18(%rsp)
cmpb $0x1, 0x56(%rbx)
jne 0xbe843
movq 0x18(%rsp), %rdi
callq 0x1ea4af
cmpb $0x1, 0x57(%rbx)
movq 0x68(%rsp), %r14
jne 0xbea4d
callq 0x1b86b4
movq 0x18(%rsp), %rdi
movq %rax, 0x48(%rsp)
movq %rax, %rsi
callq 0x1ea4c2
jmp 0xbe880
movq $0x0, 0x48(%rsp)
xorl %r12d, %r12d
movq $0x0, 0x18(%rsp)
testb %r15b, %r15b
je 0xbe88f
movq 0x70(%rsp), %rdi
jmp 0xbebf1
xorpd %xmm0, %xmm0
movapd %xmm0, 0x90(%rsp)
movapd %xmm0, 0xc0(%rsp)
movapd %xmm0, 0xb0(%rsp)
movapd %xmm0, 0xa0(%rsp)
movapd %xmm0, 0x80(%rsp)
movq 0x70(%rsp), %rax
movq %rax, 0x90(%rsp)
movq %rbp, 0x98(%rsp)
movq %rbp, %rdi
callq 0x1c2d92
testb %al, %al
movq %r12, 0x78(%rsp)
jne 0xbe91a
movq %rbp, %rdi
callq 0x1c2b65
testb %al, %al
jne 0xbe91a
movq %rbp, %rdi
callq 0x1c2b76
testb %al, %al
jne 0xbe91a
movq %rbp, %rdi
callq 0x1c2b43
testb %al, %al
jne 0xbe91a
movq %rbp, %rdi
callq 0x1c2b54
testb %al, %al
je 0xbed1e
movq 0x60(%rbx), %rdi
callq 0x120d23
movq %rbp, %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0x1c1d54
movq %rax, 0x20(%rsp)
testq %rax, %rax
movzbl %r15b, %eax
movl $0x1, %r15d
cmovnel %eax, %r15d
testb %r15b, %r15b
jne 0xbe9e0
movq 0x98(%rbx), %rdi
callq 0x10fe52
testb %al, %al
jne 0xbe972
movq 0xa0(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbe9e0
movq %r14, %r12
movq 0xa0(%rbx), %rdi
callq 0x10fe52
movl $0x64, %r14d
testb %al, %al
je 0xbe98f
movq 0x48(%rbx), %r14
movq 0x38(%rbx), %rdi
callq 0x1ea90a
movsd 0xb8(%rbx), %xmm0
movq 0x40(%rbx), %rdx
movq 0x28(%rbx), %rcx
movq 0x30(%rbx), %r8
movl 0x2c(%rsp), %r9d
movl 0x28(%rsp), %r10d
xorl %r11d, %r11d
movsd 0x290867(%rip), %xmm1   # 0x34f228
movq 0x20(%rsp), %rdi
movq %rax, %rsi
pushq %rbp
pushq $0x1
pushq %r14
pushq %r11
pushq %r11
pushq %r10
callq 0x1c1e8e
addq $0x30, %rsp
movq %r12, %r14
testb %r15b, %r15b
je 0xbe9f6
movq $0x0, 0x30(%rsp)
xorl %r13d, %r13d
jmp 0xbeafb
callq 0x1c3820
movq %rax, 0x88(%rsp)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0xbea15
movq %rax, %rdi
callq 0x1c3942
cmpb $0x1, 0x59(%rbx)
jne 0xbea28
movq 0x88(%rsp), %rdi
callq 0x1c39cf
movq 0x98(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbea5b
leaq 0x80(%rsp), %r13
movq %r14, (%r13)
leaq 0x12c419(%rip), %rax    # 0x1eae64
jmp 0xbea83
movq $0x0, 0x48(%rsp)
jmp 0xbe880
movq 0xa0(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbea8a
leaq 0x80(%rsp), %r13
movq 0x18(%rsp), %rax
movq %rax, (%r13)
leaq 0x12c580(%rip), %rax    # 0x1eb003
movq %rax, 0x30(%rsp)
jmp 0xbea96
movq $0x0, 0x30(%rsp)
xorl %r13d, %r13d
movq %rbp, %rdi
callq 0x1c2ba7
testb %al, %al
je 0xbeafb
callq 0xf36ef
movq %rax, %rbp
movq %rax, %rdi
callq 0xf69de
movq %rbp, %rdi
callq 0xf6a39
movq 0x60(%rbx), %rdi
callq 0x120d23
movq %rbp, %rdi
movq %rax, %rsi
movq 0x10(%rsp), %rdx
callq 0xf374b
movq %rax, %r12
movq %rbp, %rdi
movq 0x58(%rsp), %rbp
callq 0xf424d
movq %r12, 0x60(%rsp)
testq %r12, %r12
movzbl %r15b, %eax
movl $0x1, %r15d
cmovnel %eax, %r15d
jmp 0xbeb04
movq $0x0, 0x60(%rsp)
testb %r15b, %r15b
movq %r14, 0x68(%rsp)
jne 0xbeb2e
movq 0x78(%rbx), %rdi
callq 0x121e78
testq %rax, %rax
jne 0xbeb2e
movq 0x68(%rbx), %rdi
callq 0x120d4c
testq %rax, %rax
je 0xbecdd
testb %r15b, %r15b
jne 0xbebbc
leaq 0x29fd36(%rip), %r14    # 0x35e874
xorl %r12d, %r12d
cmpb $0x1, 0xd(%rsp,%r12)
jne 0xbeba9
movq 0x88(%rsp), %rdi
movl (%r14), %ebp
movl %ebp, %esi
callq 0x1c39c8
movq 0x60(%rbx), %rdi
callq 0x120d23
movq 0x78(%rbx), %rdx
movq 0x68(%rbx), %rcx
movl 0x4(%rbx), %r9d
xorl %edi, %edi
movq %rax, %rsi
movl %ebp, %r8d
movq 0x58(%rsp), %rbp
pushq 0x10(%rsp)
pushq 0x40(%rsp)
pushq %rbp
pushq %r13
pushq 0x50(%rsp)
pushq 0x48(%rsp)
callq 0xbf1ce
addq $0x30, %rsp
testl %eax, %eax
je 0xbeba5
movl $0x1, %r15d
jmp 0xbeba9
movzbl %r15b, %r15d
cmpq $0x1, %r12
ja 0xbebbc
incq %r12
addq $0x4, %r14
testb $0x1, %r15b
je 0xbeb41
movq 0x60(%rsp), %rdi
callq 0xee90c
movq 0x20(%rsp), %rdi
callq 0x1c1ffa
movq 0x88(%rsp), %rdi
callq 0x1c3b35
movq 0x50(%rsp), %r13
movq 0x70(%rsp), %rdi
movq 0x68(%rsp), %r14
movq 0x78(%rsp), %r12
callq 0x1befa8
movq %r14, %rdi
callq 0x1e9dea
movq 0x18(%rsp), %rdi
callq 0x1ea424
movq 0x48(%rsp), %rdi
callq 0x1b8996
movq %r12, %rdi
callq 0x1b85e9
movq 0x38(%rsp), %rdi
callq 0x10916a
movq %rbp, %rdi
callq 0x1c2da6
testq %r13, %r13
je 0xbecc1
movq 0xa0(%rbx), %rdi
callq 0x10fe52
movl %eax, %ebp
movq 0x98(%rbx), %rdi
callq 0x10fe52
movl (%rbx), %ecx
movl 0x4(%rbx), %edx
movq 0x38(%rbx), %r8
movq 0x40(%rbx), %r9
movzbl %bpl, %edi
movzbl %al, %esi
pushq 0x8(%rbx)
pushq 0x18(%rbx)
pushq 0x48(%rbx)
pushq 0x30(%rbx)
callq 0x1ea92f
addq $0x20, %rsp
movq %rax, %rbx
leaq 0x29fa65(%rip), %rdi    # 0x35e6e7
movq %rax, %rsi
xorl %eax, %eax
callq 0x17070
leaq 0x29f35d(%rip), %rsi    # 0x35dff0
movq %rbx, %rdi
movl $0x469, %edx            # imm = 0x469
callq 0x109670
movq 0x405241(%rip), %rax    # 0x4c3ee8
movq (%rax), %rdx
leaq 0x29a588(%rip), %rsi    # 0x359239
movq %r13, %rdi
callq 0x1227b4
movq %r13, %rdi
callq 0x122d79
andb $0x1, %r15b
movzbl %r15b, %eax
negl %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpq $0x0, 0x10(%rbx)
je 0xbed46
movq 0x60(%rbx), %rdi
callq 0x120d23
movq 0x10(%rbx), %rsi
movl 0x4(%rbx), %edx
imull $0x64, %edx, %ecx
movq %rax, %rdi
movq 0x38(%rsp), %r8
movq 0x10(%rsp), %r9
callq 0x209754
testl %eax, %eax
movzbl %r15b, %eax
movl $0x1, %r15d
cmovel %eax, %r15d
jmp 0xbebbc
movq 0x98(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbed38
cmpb $0x0, 0x58(%rbx)
je 0xbe91a
movq $0x0, 0x20(%rsp)
jmp 0xbe9e0
cmpb $0x1, 0x52(%rbx)
jne 0xbee06
cmpb $0x0, 0x55(%rbx)
je 0xbed67
leaq 0x14a(%rip), %rax       # 0xbeea7
movq %rax, 0x40(%rsp)
xorl %r12d, %r12d
jmp 0xbedc6
movq 0x98(%rbx), %rdi
callq 0x10fe52
testb %al, %al
je 0xbed8c
leaq 0x80(%rsp), %r12
movq %r14, (%r12)
leaq 0x22f(%rip), %rax       # 0xbefb9
jmp 0xbedc1
movq 0xa0(%rbx), %rdi
callq 0x10fe52
leaq 0x80(%rsp), %r12
testb %al, %al
je 0xbedba
movq 0x18(%rsp), %rax
movq %rax, 0x80(%rsp)
leaq 0x21a(%rip), %rax       # 0xbefd2
jmp 0xbedc1
leaq 0x22a(%rip), %rax       # 0xbefeb
movq %rax, 0x40(%rsp)
movq 0x60(%rbx), %rdi
callq 0x120d23
movl 0x4(%rbx), %esi
movq 0x20(%rbx), %rdx
movzbl 0x50(%rbx), %ecx
movq %rax, %rdi
movq 0x40(%rsp), %r8
movq %r12, %r9
pushq 0x10(%rsp)
pushq 0x40(%rsp)
callq 0x1ab8e3
addq $0x10, %rsp
testl %eax, %eax
movzbl %r15b, %eax
movl $0x1, %r15d
cmovel %eax, %r15d
testb %r15b, %r15b
jne 0xbebbc
jne 0xbebbc
movl $0x1, %r14d
movl $0x1, %r12d
cmpb $0x1, 0xd(%rsp,%r14)
jne 0xbee8a
movq 0x88(%rsp), %rdi
leaq 0x29fa3c(%rip), %rax    # 0x35e874
movl (%rax,%r14,4), %ebp
movl %ebp, %esi
callq 0x1c39c8
movq 0x60(%rbx), %rdi
callq 0x120d23
movl 0x4(%rbx), %r9d
movl $0x1, %edi
movq %rax, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
movl %ebp, %r8d
movq 0x58(%rsp), %rbp
pushq 0x10(%rsp)
pushq 0x40(%rsp)
pushq %rbp
pushq %r13
pushq 0x50(%rsp)
pushq 0x48(%rsp)
callq 0xbf1ce
addq $0x30, %rsp
testl %eax, %eax
movzbl %r15b, %r15d
cmovnel %r12d, %r15d
cmpq $0x1, %r14
ja 0xbebbc
incq %r14
testb $0x1, %r15b
je 0xbee21
jmp 0xbebbc
callq 0x1e423