// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/tools/gt_matchtool.c
// Function: gt_matchtool_runner
static int gt_matchtool_runner(GT_UNUSED int argc,
                               GT_UNUSED const char **argv,
                               GT_UNUSED int parsed_args,
                               void *tool_arguments, GtError *err)
{
  GtMatchtoolArguments *arguments = tool_arguments;
  GtMatchIterator *mp = NULL;
  GtMatch *match = NULL;
  GtBlastProcessCall *blast_call = NULL;

  int status, had_err = 0;

  gt_error_check(err);
  gt_assert(arguments);

  if (strcmp(gt_str_get(arguments->type), "OPENMATCH") == 0) {
    mp = gt_match_iterator_open_new(gt_str_get(arguments->matchfile), err);
    if (!mp)
      had_err = -1;
  } else if (strcmp(gt_str_get(arguments->type), "BLASTOUT") == 0) {
    mp = gt_match_iterator_blast_file_new(gt_str_get(arguments->matchfile),
                                          err);
    if (!mp)
      had_err = -1;
  } else if (strcmp(gt_str_get(arguments->type), "BLASTALLP") == 0) {
    blast_call = gt_blast_process_call_new_all_prot();
    gt_blast_process_call_set_query(blast_call, gt_str_get(arguments->query));
    gt_blast_process_call_set_db(blast_call, gt_str_get(arguments->db));
    mp = gt_match_iterator_blast_process_new(blast_call, err);
    if (!mp)
      had_err = -1;
  } else if (strcmp(gt_str_get(arguments->type), "BLASTALLN") == 0) {
    blast_call = gt_blast_process_call_new_all_nucl();
    gt_blast_process_call_set_query(blast_call, gt_str_get(arguments->query));
    gt_blast_process_call_set_db(blast_call, gt_str_get(arguments->db));
    mp = gt_match_iterator_blast_process_new(blast_call, err);
    if (!mp)
      had_err = -1;
  } else if (strcmp(gt_str_get(arguments->type), "BLASTP") == 0) {
    blast_call = gt_blast_process_call_new_all_prot();
    gt_blast_process_call_set_query(blast_call, gt_str_get(arguments->query));
    gt_blast_process_call_set_db(blast_call, gt_str_get(arguments->db));
    mp = gt_match_iterator_blast_process_new(blast_call, err);
    if (!mp)
      had_err = -1;
  } else if (strcmp(gt_str_get(arguments->type), "BLASTN") == 0) {
    blast_call = gt_blast_process_call_new_all_prot();
    gt_blast_process_call_set_query(blast_call, gt_str_get(arguments->query));
    gt_blast_process_call_set_db(blast_call, gt_str_get(arguments->db));
    mp =  gt_match_iterator_blast_process_new(blast_call, err);
    if (!mp)
      had_err = -1;
  } else if (strcmp(gt_str_get(arguments->type), "SW") == 0) {
    GtEncseqLoader *el = NULL;
    GtEncseq *es1 = NULL, *es2 = NULL;
    GtScoreMatrix *sm = NULL;
    GtScoreFunction *sf = NULL;
    el = gt_encseq_loader_new();
    es1 = gt_encseq_loader_load(el, gt_str_get(arguments->db), err);
    if (!es1)
      had_err = -1;
    if (!had_err) {
      es2 = gt_encseq_loader_load(el, gt_str_get(arguments->query), err);
      if (!es2)
        had_err = -1;
    }
    gt_encseq_loader_delete(el);
    if (!had_err) {
      GtUword i, j;
      GtAlphabet *a;
      gt_assert(es1 && es2);
      a = gt_encseq_alphabet(es1);
      sm = gt_score_matrix_new(a);
      for (i = 0; i < gt_alphabet_num_of_chars(a); i++)
        for (j = 0; j < gt_alphabet_num_of_chars(a); j++)
          gt_score_matrix_set_score(sm, i, j, (i == j) ? 1 : -1);
      sf = gt_score_function_new(sm, -1, -1);
      mp = gt_match_iterator_sw_new(es1, es2, sf, arguments->minlen,
                                    arguments->maxedist, err);
      if (!mp)
        had_err = -1;
    }
    gt_encseq_delete(es1);
    gt_encseq_delete(es2);
    gt_score_function_delete(sf);
  } else if (strcmp(gt_str_get(arguments->type), "LAST") == 0) {
    GtEncseqLoader *el = NULL;
    GtEncseq *es1 = NULL, *es2 = NULL;
    el = gt_encseq_loader_new();
    es1 = gt_encseq_loader_load(el, gt_str_get(arguments->db), err);
    if (!es1)
      had_err = -1;
    if (!had_err) {
      es2 = gt_encseq_loader_load(el, gt_str_get(arguments->query), err);
      if (!es2)
        had_err = -1;
    }
    gt_encseq_loader_delete(el);
    if (!had_err) {
      mp = gt_match_iterator_last_new(es1, es2,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      10,
                                      GT_UNDEF_INT,
                                      GT_UNDEF_INT,
                                      err);
      if (!mp)
        had_err = -1;
    }
    gt_encseq_delete(es1);
    gt_encseq_delete(es2);
  } else {
    exit(GT_EXIT_PROGRAMMING_ERROR);
  }

  if ((!had_err) && (strcmp(gt_str_get(arguments->type), "OPENMATCH") == 0)) {
    fprintf(stdout, "seqid1\tseqid2\tstartpos1\tstartpos2\tendpos1\tendpos2\t"
                    "weight\n");
    while ((status = gt_match_iterator_next(mp, &match, err))
                                                     != GT_MATCHER_STATUS_END) {
      if (status == GT_MATCHER_STATUS_OK) {
        GtMatchOpen *matcho = (GtMatchOpen*) match;
        GtRange range_seq1;
        GtRange range_seq2;
        gt_match_get_range_seq1(match, &range_seq1);
        gt_match_get_range_seq2(match, &range_seq2);
        fprintf(stdout, "%s\t%s\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\n",
                gt_match_get_seqid1(match),
                gt_match_get_seqid2(match),
                range_seq1.start,
                range_seq2.start,
                range_seq1.end,
                range_seq2.end,
                gt_match_open_get_weight(matcho));
        gt_match_delete(match);
      } else if (status == GT_MATCHER_STATUS_ERROR) {
        had_err =-1;
        break;
      }
    }
    gt_match_iterator_delete(mp);
  } else if ((!had_err) && (strcmp(gt_str_get(arguments->type), "SW") == 0)) {
    fprintf(stdout, "seqid1\tseqid2\tstartpos1\tstartpos2\tendpos1\tendpos2\t"
                    "alilen\tedist\n");
    while ((status = gt_match_iterator_next(mp, &match, err))
                                                     != GT_MATCHER_STATUS_END) {
      if (status == GT_MATCHER_STATUS_OK) {
        GtMatchSW *matchs = gt_match_sw_cast(match);
        GtRange range_seq1;
        GtRange range_seq2;
        gt_match_get_range_seq1(match, &range_seq1);
        gt_match_get_range_seq2(match, &range_seq2);
        fprintf(stdout,
               "%s\t%s\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\n",
                gt_match_get_seqid1(match),
                gt_match_get_seqid2(match),
                range_seq1.start,
                range_seq2.start,
                range_seq1.end,
                range_seq2.end,
                gt_match_sw_get_alignment_length(matchs),
                gt_match_sw_get_edist(matchs));
        gt_match_delete(match);
      } else if (status == GT_MATCHER_STATUS_ERROR) {
        had_err =-1;
        break;
      }
    }
    gt_match_iterator_delete(mp);
  } else if ((!had_err) && (strcmp(gt_str_get(arguments->type), "LAST") == 0)) {
    fprintf(stdout, "seqid1\tseqid2\tstartpos1\tstartpos2\tendpos1\tendpos2\t"
                    "score\n");
    while ((status = gt_match_iterator_next(mp, &match, err))
                                                     != GT_MATCHER_STATUS_END) {
      if (status == GT_MATCHER_STATUS_OK) {
        GtMatchLAST *matchl = gt_match_last_cast(match);
        GtRange range_seq1;
        GtRange range_seq2;
        gt_match_get_range_seq1(match, &range_seq1);
        gt_match_get_range_seq2(match, &range_seq2);
        fprintf(stdout,
              ""GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\n",
                gt_match_last_get_seqno1(matchl),
                gt_match_last_get_seqno2(matchl),
                range_seq1.start,
                range_seq2.start,
                range_seq1.end,
                range_seq2.end,
                gt_match_last_get_score(matchl));
        gt_match_delete(match);
      } else if (status == GT_MATCHER_STATUS_ERROR) {
        had_err =-1;
        break;
      }
    }
    gt_match_iterator_delete(mp);
  } else if (!had_err) {
    fprintf(stdout, "query\tdbname2\tq.startpos\td.startpos\tq.endpos\t"
                    "d.endpos\tbit score\tevalue\tali length\n");
    while ((status = gt_match_iterator_next(mp, &match, err)) !=
                                          GT_MATCHER_STATUS_END) {
      if (status == GT_MATCHER_STATUS_OK) {
        GtMatchBlast *matchb = (GtMatchBlast*) match;
        GtRange range_seq1;
        GtRange range_seq2;
        gt_match_get_range_seq1(match, &range_seq1);
        gt_match_get_range_seq2(match, &range_seq2);
        fprintf(stdout,
              "%s\t%s\t"GT_WU"\t"GT_WU"\t"GT_WU"\t"GT_WU"\t%.3f\t%g\t"GT_WU"\n",
                gt_match_get_seqid1(match),
                gt_match_get_seqid2(match),
                range_seq1.start,
                range_seq2.start,
                range_seq1.end,
                range_seq2.end,
                gt_match_blast_get_bitscore(matchb),
                gt_match_blast_get_evalue(matchb),
                gt_match_blast_get_align_length(matchb));
        gt_match_delete(match);
      } else if (status == GT_MATCHER_STATUS_ERROR) {
        had_err =-1;
        break;
      }
    }
    gt_match_iterator_delete(mp);
  }

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %r8, %r12
movq %rcx, %r14
andq $0x0, (%rsp)
testq %r8, %r8
je 0x3297b
movq %r12, %rdi
callq 0x89eb7
testb %al, %al
jne 0x331f1
testq %r14, %r14
je 0x331c3
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdbf7(%rip), %rsi    # 0x2f058a
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
movq %r12, 0x28(%rsp)
je 0x32acf
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdbdd(%rip), %rsi    # 0x2f0594
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x32aec
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdbc7(%rip), %rsi    # 0x2f059d
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x32ae5
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdbb2(%rip), %rsi    # 0x2f05a7
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x32b02
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdb9d(%rip), %rsi    # 0x2f05b1
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x32ae5
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdb85(%rip), %rsi    # 0x2f05b8
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
je 0x32ae5
movq (%r14), %rdi
callq 0xad1fa
cmpb $0x53, (%rax)
jne 0x32a60
cmpb $0x57, 0x1(%rax)
jne 0x32a60
cmpb $0x0, 0x2(%rax)
je 0x3307e
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bdb50(%rip), %rsi    # 0x2f05bf
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
jne 0x33229
callq 0x791cd
movq %rax, %r15
movq 0x18(%r14), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x7921d
movq %rax, %rbp
testq %rax, %rax
je 0x32ff5
movq 0x10(%r14), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x7921d
movq %rax, %r13
testq %rax, %rax
setne %bl
jmp 0x32ffa
movq 0x8(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
movq %r12, %rsi
callq 0xfe494
jmp 0x32b3d
callq 0xbcff0
jmp 0x32b07
movq 0x8(%r14), %rdi
callq 0xad1fa
movq %rax, %rdi
movq %r12, %rsi
callq 0xfc744
jmp 0x32b3d
callq 0xbcf38
movq %rax, %r15
movq 0x10(%r14), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
callq 0xbd034
movq 0x18(%r14), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
callq 0xbd0af
movq %r15, %rdi
movq %r12, %rsi
callq 0xfc86f
testq %rax, %rax
je 0x3306a
movq %rax, %r15
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bda32(%rip), %rsi    # 0x2f058a
movq %rax, %rdi
callq 0x179e0
testl %eax, %eax
movq %r15, 0x18(%rsp)
je 0x32ccf
movq (%r14), %rdi
callq 0xad1fa
cmpb $0x53, (%rax)
jne 0x32b8a
cmpb $0x57, 0x1(%rax)
jne 0x32b8a
cmpb $0x0, 0x2(%rax)
je 0x32ec5
movq (%r14), %rdi
callq 0xad1fa
leaq 0x2bda26(%rip), %rsi    # 0x2f05bf
movq %rax, %rdi
callq 0x179e0
movq 0x405308(%rip), %rcx    # 0x437eb0
movq (%rcx), %rcx
testl %eax, %eax
je 0x32dc8
leaq 0x2bde10(%rip), %rdi    # 0x2f09ca
pushq $0x52
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
movq %rsp, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xfc67d
testl %eax, %eax
je 0x32bed
cmpl $0x1, %eax
je 0x32fe9
cmpl $0x2, %eax
jne 0x32bc8
jmp 0x32fe4
movq (%rsp), %r12
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0xfbe37
movq (%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xfbe82
movq 0x40529d(%rip), %rax    # 0x437eb0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
callq 0xfbda9
movq %rax, %rbx
movq (%rsp), %rdi
callq 0xfbdf0
movq %rax, %r15
movq 0x40(%rsp), %rbp
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r13
movq %r12, %rdi
callq 0xfc4a5
cvtss2sd %xmm0, %xmm0
movsd %xmm0, 0x20(%rsp)
movq %r12, %rdi
callq 0xfc461
movsd %xmm0, 0x50(%rsp)
movq %r12, %rdi
callq 0xfc4e9
movq %rax, %r10
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
leaq 0x2bdd96(%rip), %rsi    # 0x2f0a1d
movq %rbx, %rdx
leaq 0x8(%rsp), %rbx
movq %r15, %rcx
movq 0x20(%rsp), %r15
movq %rbp, %r8
movq 0x30(%rsp), %r12
movq %r14, %r9
movsd 0x28(%rsp), %xmm0
movsd 0x58(%rsp), %xmm1
movb $0x2, %al
pushq %r10
pushq %r13
pushq 0x28(%rsp)
callq 0x17a50
addq $0x20, %rsp
movq (%rsp), %rdi
callq 0xfc005
jmp 0x32bc8
movq 0x4051da(%rip), %rax    # 0x437eb0
movq (%rax), %rcx
leaq 0x2bdbe0(%rip), %rdi    # 0x2f08c0
pushq $0x39
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
movq %rsp, %rbp
movq %r15, %rdi
movq %rbp, %rsi
movq %r12, %rdx
callq 0xfc67d
testl %eax, %eax
je 0x32d13
cmpl $0x1, %eax
je 0x32fe9
cmpl $0x2, %eax
jne 0x32cee
jmp 0x32fe4
movq (%rsp), %r12
movq %r12, %rdi
leaq 0x40(%rsp), %rsi
callq 0xfbe37
movq (%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xfbe82
movq 0x405177(%rip), %rax    # 0x437eb0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
callq 0xfbda9
movq %rax, 0x20(%rsp)
movq (%rsp), %rdi
callq 0xfbdf0
movq %rax, %rbx
movq 0x40(%rsp), %r15
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r13
movq %r12, %rdi
callq 0xff0cb
movq %rax, %r10
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
leaq 0x2bdb6b(%rip), %rsi    # 0x2f08fa
movq 0x28(%rsp), %rdx
movq 0x30(%rsp), %r12
movq %rbx, %rcx
movq %r15, %r8
movq 0x20(%rsp), %r15
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %r13
pushq 0x28(%rsp)
callq 0x17a50
addq $0x20, %rsp
movq (%rsp), %rdi
callq 0xfc005
jmp 0x32cee
leaq 0x2bdba5(%rip), %rdi    # 0x2f0974
pushq $0x38
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
movq %rsp, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xfc67d
testl %eax, %eax
je 0x32e02
cmpl $0x1, %eax
je 0x32fe9
cmpl $0x2, %eax
jne 0x32ddd
jmp 0x32fe4
callq 0xfedc8
movq (%rsp), %rsi
movq %rax, %rdi
callq 0xfbb1a
movq %rax, %rbx
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xfbe37
movq (%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xfbe82
movq 0x405077(%rip), %rax    # 0x437eb0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq %rbx, %rdi
callq 0xfee72
movq %rax, %r12
movq %rbx, %rdi
callq 0xfeeb3
movq %rax, %r13
movq 0x40(%rsp), %rbp
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %r15
movq %rbx, %rdi
movq %rsp, %rbx
callq 0xfeef4
movq %rax, %r10
subq $0x8, %rsp
movq 0x10(%rsp), %rdi
leaq 0x2bdb1f(%rip), %rsi    # 0x2f09ad
movq %r12, %rdx
movq %r13, %rcx
movq %rbp, %r8
movq 0x30(%rsp), %r12
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %r15
movq 0x30(%rsp), %r15
pushq 0x28(%rsp)
callq 0x17a50
addq $0x20, %rsp
movq (%rsp), %rdi
callq 0xfc005
jmp 0x32ddd
movq 0x404fe4(%rip), %rax    # 0x437eb0
movq (%rax), %rcx
leaq 0x2bda3f(%rip), %rdi    # 0x2f0915
pushq $0x3f
popq %rsi
pushq $0x1
popq %rdx
callq 0x17f00
movq %rsp, %rbx
movq %r15, %rdi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xfc67d
testl %eax, %eax
je 0x32f09
cmpl $0x1, %eax
je 0x32fe9
cmpl $0x2, %eax
jne 0x32ee4
jmp 0x32fe4
callq 0xff10c
movq (%rsp), %rsi
movq %rax, %rdi
callq 0xfbb1a
movq %rax, %r12
movq (%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xfbe37
movq (%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xfbe82
movq 0x404f70(%rip), %rax    # 0x437eb0
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq (%rsp), %rdi
callq 0xfbda9
movq %rax, 0x20(%rsp)
movq (%rsp), %rdi
callq 0xfbdf0
movq %rax, %r13
movq 0x40(%rsp), %rbp
movq 0x48(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x30(%rsp), %r14
movq 0x38(%rsp), %rax
movq %rax, 0x50(%rsp)
movq %r12, %rdi
callq 0xff23e
movq %rbx, %r15
movq %rax, %rbx
movq %r12, %rdi
callq 0xff27f
movq %rax, %r10
movq 0x8(%rsp), %rdi
leaq 0x2bd9b0(%rip), %rsi    # 0x2f0955
movq 0x20(%rsp), %rdx
movq %r13, %rcx
movq %rbp, %r8
movq 0x28(%rsp), %r12
movq %r14, %r9
xorl %eax, %eax
pushq %r10
pushq %rbx
movq %r15, %rbx
pushq 0x60(%rsp)
movq 0x30(%rsp), %r15
pushq 0x28(%rsp)
callq 0x17a50
addq $0x20, %rsp
movq (%rsp), %rdi
callq 0xfc005
jmp 0x32ee4
pushq $-0x1
popq %rbx
jmp 0x32feb
xorl %ebx, %ebx
movq %r15, %rdi
callq 0xfc715
jmp 0x3306d
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x79f01
xorl %r15d, %r15d
testb %bl, %bl
je 0x3304f
subq $0x8, %rsp
movl $0x80000000, %eax       # imm = 0x80000000
movq %rbp, %rdi
movq %r13, %rsi
movl $0x80000000, %edx       # imm = 0x80000000
movl $0x80000000, %ecx       # imm = 0x80000000
movl $0x80000000, %r8d       # imm = 0x80000000
movl $0x80000000, %r9d       # imm = 0x80000000
pushq %r12
pushq %rax
pushq %rax
pushq $0xa
pushq %rax
pushq %rax
pushq %rax
callq 0xfd264
addq $0x40, %rsp
cmpq $0x1, %rax
sbbl %r15d, %r15d
movl %r15d, %ebx
movq %rax, %r15
jmp 0x33052
pushq $-0x1
popq %rbx
movq %rbp, %rdi
callq 0x735fd
movq %r13, %rdi
callq 0x735fd
testl %ebx, %ebx
je 0x32b49
pushq $-0x1
popq %rbx
movl %ebx, %eax
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x791cd
movq %rax, %r15
movq 0x18(%r14), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x7921d
movq %rax, %rbp
testq %rax, %rax
je 0x330c7
movq 0x10(%r14), %rdi
callq 0xad1fa
movq %r15, %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x7921d
movq %rax, %r13
testq %rax, %rax
setne %bl
jmp 0x330cc
xorl %r13d, %r13d
xorl %ebx, %ebx
movq %r15, %rdi
callq 0x79f01
testb %bl, %bl
je 0x33150
testq %rbp, %rbp
je 0x33231
testq %r13, %r13
je 0x33231
movq %r13, 0x8(%rsp)
movq %rbp, %rbx
movq %rbp, %rdi
callq 0x754dd
movq %rax, %r15
movq %rax, %rdi
callq 0xa49fc
movq %rax, %rbp
xorl %r13d, %r13d
movq %r15, %rdi
callq 0x56c8e
movl %eax, %eax
cmpq %rax, %r13
jae 0x33161
xorl %r12d, %r12d
movq %r15, %rdi
callq 0x56c8e
movl %eax, %eax
cmpq %rax, %r12
jae 0x3314b
xorl %eax, %eax
cmpq %r12, %r13
sete %al
leal -0x1(%rax,%rax), %ecx
movq %rbp, %rdi
movl %r13d, %esi
movl %r12d, %edx
callq 0xa53c4
incq %r12
jmp 0x3311d
incq %r13
jmp 0x3310b
pushq $-0x1
popq %rbx
movq $0x0, 0x18(%rsp)
xorl %r15d, %r15d
jmp 0x331a4
pushq $-0x1
popq %rdx
movq %rbp, %rdi
movl %edx, %esi
callq 0xa4844
movq 0x20(%r14), %rcx
movq 0x28(%r14), %r8
movq %rbx, %rbp
movq %rbx, %rdi
movq 0x8(%rsp), %r13
movq %r13, %rsi
movq %rax, %rdx
movq %rax, 0x18(%rsp)
movq 0x28(%rsp), %r12
movq %r12, %r9
callq 0xfe89c
movq %rax, %r15
xorl %ebx, %ebx
cmpq $0x1, %rax
sbbl %ebx, %ebx
movq %rbp, %rdi
callq 0x735fd
movq %r13, %rdi
callq 0x735fd
movq 0x18(%rsp), %rdi
callq 0xa49c4
jmp 0x33062
movq 0x404d9e(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b1e3f(%rip), %rsi    # 0x2e5013
leaq 0x315478(%rip), %rdx    # 0x348653
leaq 0x2bd6bf(%rip), %rcx    # 0x2f08a1
leaq 0x2bd369(%rip), %r8     # 0x2f0552
movl $0xc4, %r9d
jmp 0x3321d
movq 0x404d70(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b1e11(%rip), %rsi    # 0x2e5013
leaq 0x2b1fb6(%rip), %rdx    # 0x2e51bf
leaq 0x2bd691(%rip), %rcx    # 0x2f08a1
leaq 0x2bd33b(%rip), %r8     # 0x2f0552
movl $0xc3, %r9d
xorl %eax, %eax
callq 0x17a50
callq 0x17390
pushq $0x2
popq %rdi
callq 0x178f0
movq 0x404d30(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x2b1dd1(%rip), %rsi    # 0x2e5013
leaq 0x2bd66c(%rip), %rdx    # 0x2f08b5
leaq 0x2bd651(%rip), %rcx    # 0x2f08a1
leaq 0x2bd2fb(%rip), %r8     # 0x2f0552
movl $0xfd, %r9d
jmp 0x3321d
nop