// File: /workspace/github_c_makefile_star2_O2/genometools[P]genometools/src/mgth/mg_combinedscore.c
// Function: mg_combinedscore
int mg_combinedscore(ParseStruct *parsestruct_ptr,
                     GtUword hit_counter, GtError * err)
{
  int had_err = 0;

  unsigned short current_row,
    k;

  GtUword contig_len = 0,
    contig_seq_diff = 0,
    hit_len = 0,
    hit_seq_diff = 0,
    i = 0,
    j = 0,
    contig_index = 0,
    hit_index = 0,
    gap_len = 0,
    ulhit_from = 0,
    ulhit_to = 0,
    mod = 0,
    *count_row;                        /* Hilfszaehler fuer die
                                          involvierten Hits fuer den jew.
                                          combined-Score */

  /* Matrix der Combined-Scores */
  CombinedScoreMatrixEntry **combinedscore_matrix;

  /* Hit-Informationen der relevanten Blast-Hits (relevant:
     Synonym/Nicht-Synonym Rate >=1) */
  HitInformation hit_information;

  /* Hilfszeile zur Abarbeitungs eines Hit */
  double *matrix_row;

  char contig_triplet[3],              /* Query-Triplet von dem die AS
                                          bestimmt werden soll */
    contig_as,                         /* Aminosaeure des uebergebenen
                                          Query-Triplets */
    hit_triplet[3],                    /* Hit-Triplet von dem die AS
                                          bestimmt werden soll */
    hit_as,                            /* Aminosaeure des uebergebenen
                                          Hit-Triplets */
   *contig_seq = NULL,                 /* Contig-DNA-Sequenz */
    *hit_seq = NULL,                   /* Hit-DNA-Sequenz */
    *contig_seq_tri = NULL,
    *hit_seq_tri = NULL,
    *contig_seq_ptr;

  const char *contig_as_ptr,
   *hit_as_ptr;

  GtTransTable *transtable;           /* Standard-Translationstabelle */

  transtable = gt_trans_table_new_standard(NULL);
  gt_assert(transtable);

  /* Check Umgebungsvariablen */
  gt_error_check(err);

  /* Zeiger auf den vollstaendigen Query-DNA Eintrag */
  contig_seq_ptr = gt_str_get(MATRIXSTRUCT(query_dna));

  /* contig_len legt die Anzahl der Spalten der Matrix fest */
  contig_len = gt_str_length(MATRIXSTRUCT(query_dna));

  /* Speicherplatzreservierung fuer die Combined-Score Matrix */
  gt_array2dim_calloc(combinedscore_matrix, 7, contig_len);

  /* Erstellen der GtArrays fuer die Hit-Nummer fuer jeden Matrix-Eintrag
     Ueber die Hit-Nummer erfolgt die Zuordnung zu den entsprechenden
     Blast-Hits in der Hit-Information-Struktur */
  for (k = 0; k < 7; k++)
  {
    for (j = 0; j < contig_len; j++)
    {
      combinedscore_matrix[k][j].hit_number =
        gt_array_new(sizeof (GtUword));
    }
  }

  /* String-Arrays der Hit-Information Struktur anlegen */
  hit_information.hit_gi = gt_str_array_new();
  hit_information.hit_def = gt_str_array_new();
  hit_information.hit_hsp_nr = gt_str_array_new();
  hit_information.hit_from = gt_str_array_new();
  hit_information.hit_to = gt_str_array_new();

  /* fuer jeden Hit erfolgt eine Berechnung der Combined-Scores */
  for (i = 0; i < hit_counter; i++)
  {
    /* Speicherplatz fuer die Hilfszeilen wird reserviert */
    matrix_row = gt_calloc(contig_len, sizeof (double));
    count_row = gt_calloc(contig_len, sizeof (GtUword));
    contig_seq_tri = gt_calloc(4, sizeof (char));
    hit_seq_tri = gt_calloc(4, sizeof (char));

    /* Zeiger auf die Proteinsequenzen von Hit und Query */
    contig_as_ptr = gt_str_array_get(MATRIXSTRUCT(hsp_qseq), i);
    hit_as_ptr = gt_str_array_get(MATRIXSTRUCT(hsp_hseq), i);

    /* Funktion zur Bestimmung der Zeile in der Matrix, die fuer den
       aktuellen Leserahmen steht */
    current_row = get_matrix_row(LONG_VALUE(MATRIXSTRUCT(query_frame), i));

    /* to-from+1 ist die anzahl der zu betrachtenden DNA-Basen,
       zusaetzlich +1 fuer das Stringendezeichen */
    contig_seq_diff =
      LONG_VALUE(MATRIXSTRUCT(query_to), i)
                 - LONG_VALUE(MATRIXSTRUCT(query_from), i) + 2;

    hit_len = strlen(gt_str_array_get(MATRIXSTRUCT(hit_dna), i));

    ulhit_from = atol(gt_str_array_get(MATRIXSTRUCT(hit_from), i));
    ulhit_to = atol(gt_str_array_get(MATRIXSTRUCT(hit_to), i));
    hit_seq_diff = ulhit_to - ulhit_from + 2;

    /* Ueberpruefen der Vereinbarkeit von Query- und Hit-Sequenz
       unterschiedliche Laengen sind nur in 3er Schritten erlaubt -> Gaps
       in der AS-Sequenz */
    if (contig_seq_diff - hit_seq_diff > 0)
    {
      mod = (contig_seq_diff - hit_seq_diff) % 3;
    }
    else
      mod = (hit_seq_diff - contig_seq_diff) % 3;

    if ((LONG_VALUE(MATRIXSTRUCT(query_to), i) > contig_len)
        || (hit_seq_diff - 1 != hit_len))
      mod = 1;

    /* Fehlermeldung bei Unvereinbarkeit */
    if (mod != 0)
    {
      gt_error_set(err,
                "sequences error: matching sequences do not fit in length.\
                 wrong FASTA-files or please delete entry %s!?",
                gt_str_array_get(MATRIXSTRUCT(hit_gi_def), i));
      had_err = -1;
    }

    /* Speicherplatreservierung fuer die Query-DNA-Seq. */
    contig_seq = gt_calloc(contig_seq_diff, sizeof (char));
    /* kopieren von contig_seq_diff-1 Zeichen */
    (void) snprintf(contig_seq, contig_seq_diff, "%s",
                    contig_seq_ptr +
                    (LONG_VALUE(MATRIXSTRUCT(query_from), i) - 1));

    /* die laenge der Hit-Sequenz kann max. der Laenge der QueryDNA Seq
       entsprechen */
    hit_seq = gt_calloc(hit_seq_diff, sizeof (char));
    /* kopieren von hit_seq_diff-1 Zeichen */
    (void) snprintf(hit_seq, hit_seq_diff, "%s",
                    gt_str_array_get(MATRIXSTRUCT(hit_dna), i));

    /* Bei einem negativen Leserahmen muss das Reverse-Komplement der
       Sequenz gebildet werden */
    if ((LONG_VALUE(MATRIXSTRUCT(query_frame), i) < 0) && !had_err)
    {
      /* bestimmen des Reverse-Komplement */
      had_err =
        mg_reverse_complement(contig_seq, contig_seq_diff - 1, err);
    }

    /* Gleiches Vorgehen bei negativen Leserahmen wie bei der Query-DNA */
    if ((LONG_VALUE(MATRIXSTRUCT(hit_frame), i) < 0) && !had_err)
    {
      had_err = mg_reverse_complement(hit_seq, hit_seq_diff - 1, err);
    }

    if (!had_err)
    {
      for (j = 0, contig_index = 0, hit_index = 0; j < hit_len - 2;
           j += 3, contig_index += 3, hit_index += 3)
      {
        if (contig_index < contig_len && hit_index < hit_len)
        {
          contig_as = contig_as_ptr[j / 3];
          hit_as = hit_as_ptr[j / 3];

          if (contig_as == '-')
          {
            gap_len = strspn(contig_as_ptr + j / 3, "-");
            hit_index += 3 * gap_len;
          }
          if (hit_as == '-')
          {
            gap_len = strspn(hit_as_ptr + j / 3, "-");
            contig_index += 3 * gap_len;
          }
          if (hit_as != '-' && contig_as != '-')
          {
            (void) snprintf(contig_seq_tri, 4, "%s",
                            contig_seq + contig_index);
            (void) snprintf(hit_seq_tri, 4, "%s", hit_seq + hit_index);

            if ((strspn(contig_seq_tri, "acgtuACGTU") == 3)
                && (strspn(hit_seq_tri, "acgtuACGTU") == 3))
            {
              /* Aktuelles Hit-Triplet */
              hit_triplet[0] = hit_seq[hit_index];
              hit_triplet[1] = hit_seq[hit_index + 1];
              hit_triplet[2] = hit_seq[hit_index + 2];

              /* Aktuelles Query-Triplet */
              contig_triplet[0] = contig_seq[contig_index];
              contig_triplet[1] = contig_seq[contig_index + 1];
              contig_triplet[2] = contig_seq[contig_index + 2];

              /* Bestimmen der AS der jeweiligen Triplets */
              had_err = gt_trans_table_translate_codon(transtable,
                                                       contig_triplet[0],
                                                       contig_triplet[1],
                                                       contig_triplet[2],
                                                       &contig_as,
                                                       err);
              if (!had_err) {
                had_err = gt_trans_table_translate_codon(transtable,
                                                         hit_triplet[0],
                                                         hit_triplet[1],
                                                         hit_triplet[2],
                                                         &hit_as,
                                                         err);
              }
            }
          }

          /* Aufruf der Funktion fill_matrix; berechnet die
             Combined-Scores uebergeben werden: die Combined-Score-Matrix
             Hit-AS des aktuellen Triplets Query-AS des aktuelen Triplets
             der aktuelle Leserahmen j - hier: die Position in der
             Query-Sequenz hit-len und contig-len i - hier: die aktuell
             betrachtete Hit-Sequenz Zeiger auf die parsestruct die
             Hilfs-Matrix-Zeile Contig- und Hit-Sequenz */
          fill_matrix(combinedscore_matrix,
                      &hit_as,
                      &contig_as,
                      current_row,
                      contig_index,
                      hit_index,
                      hit_len,
                      contig_len,
                      i,
                      parsestruct_ptr,
                      matrix_row,
                      count_row, contig_seq, hit_seq, &hit_information);
        }
      }
      gt_free(contig_seq);
      gt_free(hit_seq);
      gt_free(contig_seq_tri);
      gt_free(hit_seq_tri);
      gt_free(matrix_row);
      gt_free(count_row);
    }
    else
    {
      gt_free(contig_seq);
      gt_free(hit_seq);
      gt_free(contig_seq_tri);
      gt_free(hit_seq_tri);
      gt_free(matrix_row);
      gt_free(count_row);

      break;
    }
  }

  if (!had_err)
  {
    /* nach dem erstellen der Combined-Score Matrix muessen die einzelnen
       Positionen noch mit der Anzahl der beteiligten Hits normalisiert
       werden */
    for (j = 0; j < contig_len; j++)
    {
      for (k = 0; k < 7; k++)
      {
        if (combinedscore_matrix[k][j].count != 0)
        {
          combinedscore_matrix[k][j].
            matrix_score /= combinedscore_matrix[k][j].count;
        }
      }
    }

    /* Aufruf der Funktion computepath - DP-Ansatz uebergeben werden: die
       Combined-Score-Matrix Anzahl Zeilen Anzahl Spalten */
    had_err = mg_computepath(combinedscore_matrix,
                             &hit_information,
                             7, contig_len, parsestruct_ptr, err);
  }

  for (i = 0; i < 7; i++)
  {
    for (j = 0; j < contig_len; j++)
    {
      gt_array_delete(combinedscore_matrix[i][j].hit_number);
    }
  }

  gt_array2dim_delete(combinedscore_matrix);

  gt_trans_table_delete(transtable);

  gt_str_array_delete(hit_information.hit_gi);
  gt_str_array_delete(hit_information.hit_def);
  gt_str_array_delete(hit_information.hit_hsp_nr);
  gt_str_array_delete(hit_information.hit_from);
  gt_str_array_delete(hit_information.hit_to);

  return had_err;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdx, %rbx
movq %rsi, 0xf0(%rsp)
movq %rdi, %r13
xorl %edi, %edi
callq 0xb12f7
testq %rax, %rax
je 0x2cf0ec
movq %rax, %r14
testq %rbx, %rbx
je 0x2ce467
movq %rbx, %rdi
callq 0x89eb7
testb %al, %al
jne 0x2cf116
movq %rbx, 0x60(%rsp)
movq 0x120(%r13), %rdi
callq 0xad1fa
movq %rax, 0xa0(%rsp)
movq 0x120(%r13), %rdi
callq 0xad289
movq %rax, %r15
leaq 0xb8068(%rip), %rbx     # 0x3864fe
pushq $0x38
popq %rdi
pushq $0x58
popq %rbp
movq %rbx, %rsi
movl %ebp, %edx
callq 0x93160
imulq $0x7, %r15, %rdi
pushq $0x18
popq %rsi
movq %rbx, %rdx
movl %ebp, %ecx
movq %rax, %rbx
callq 0x9334a
movq %rax, (%rbx)
pushq $0x1
popq %rax
movq %r15, 0x30(%rsp)
imulq $0x18, %r15, %rcx
cmpq $0x7, %rax
je 0x2ce4e0
movq -0x8(%rbx,%rax,8), %rdx
addq %rcx, %rdx
movq %rdx, (%rbx,%rax,8)
incq %rax
jmp 0x2ce4c9
movq %rbx, 0x68(%rsp)
movq %r14, 0x98(%rsp)
xorl %r14d, %r14d
pushq $0x10
popq %r15
pushq $0x8
popq %rbx
cmpq $0x7, %r14
je 0x2ce52b
movq %r15, %r12
movq 0x30(%rsp), %rbp
subq $0x1, %rbp
jb 0x2ce526
movq %rbx, %rdi
callq 0x5809c
movq 0x68(%rsp), %rcx
movq (%rcx,%r14,8), %rcx
movq %rax, (%rcx,%r12)
addq $0x18, %r12
jmp 0x2ce505
incq %r14
jmp 0x2ce4f7
callq 0xae154
movq %rax, 0xf8(%rsp)
movq %rax, 0xc8(%rsp)
callq 0xae154
movq %rax, 0xa8(%rsp)
movq %rax, 0xd0(%rsp)
callq 0xae154
movq %rax, 0xd8(%rsp)
callq 0xae154
movq %rax, 0xe0(%rsp)
callq 0xae154
movq %rax, 0xe8(%rsp)
decq 0xa0(%rsp)
leaq 0xf0(%r13), %rax
movq %rax, 0xb0(%rsp)
pushq $0x8
popq %rbp
xorl %eax, %eax
xorl %r15d, %r15d
cmpq 0xf0(%rsp), %rax
movl %r15d, 0x10(%rsp)
je 0x2cef12
movq %rax, %r15
movq 0x30(%rsp), %rbx
movq %rbx, %rdi
movq %rbp, %rsi
leaq 0xb7f3b(%rip), %r14     # 0x3864fe
movq %r14, %rdx
pushq $0x71
popq %rcx
callq 0x9334a
movq %rax, 0x40(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
movq %r14, %rdx
pushq $0x72
popq %rcx
callq 0x9334a
movq %rax, 0x48(%rsp)
pushq $0x4
popq %rbx
movq %rbx, %rdi
pushq $0x1
popq %r12
movq %r12, %rsi
movq %r14, %rdx
pushq $0x73
popq %rcx
callq 0x9334a
movq %rax, 0x80(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
movq %r14, %rdx
pushq $0x74
popq %rcx
callq 0x9334a
movq %rax, 0x88(%rsp)
movq 0x170(%r13), %rdi
movq %r15, %rsi
callq 0xae386
movq %rax, 0x108(%rsp)
movq 0x178(%r13), %rdi
movq %r15, %rsi
callq 0xae386
movq %rax, 0xc0(%rsp)
movq 0x100(%r13), %rdi
movq %r15, %rsi
callq 0x581aa
movq (%rax), %rdi
callq 0x2cf14c
movw %ax, 0x2e(%rsp)
movq 0x118(%r13), %rdi
movq %r15, %rsi
callq 0x581aa
movq (%rax), %rbx
movq 0x110(%r13), %rdi
movq %r15, %rsi
callq 0x581aa
subq (%rax), %rbx
movq 0x168(%r13), %rdi
movq %r15, %rsi
callq 0xae386
movq %rax, %rdi
callq 0x172d0
movq %rax, 0x90(%rsp)
movq 0x158(%r13), %rdi
movq %r15, %rsi
callq 0xae386
movq %rax, %rdi
callq 0x178e0
movq %rax, %r12
movq 0x160(%r13), %rdi
movq %r15, 0x20(%rsp)
movq %r15, %rsi
callq 0xae386
movq %rax, %rdi
callq 0x178e0
movq %rax, %r14
subq %r12, %r14
movb $0x1, %bpl
movq %rbx, %rax
subq %r14, %rax
je 0x2ce705
xorl %edx, %edx
pushq $0x3
popq %rcx
divq %rcx
testq %rdx, %rdx
sete %bpl
movq 0x118(%r13), %rdi
movq 0x20(%rsp), %rsi
callq 0x581aa
leaq 0x1(%r14), %r15
movq 0x30(%rsp), %rcx
cmpq %rcx, (%rax)
ja 0x2ce733
cmpq 0x90(%rsp), %r15
jne 0x2ce733
testb %bpl, %bpl
jne 0x2ce761
movq 0x140(%r13), %rdi
movq 0x20(%rsp), %rsi
callq 0xae386
movq 0x60(%rsp), %rdi
leaq 0xb7dca(%rip), %rsi     # 0x38651a
movq %rax, %rdx
xorl %eax, %eax
callq 0x89dbb
pushq $-0x1
popq %rax
movl %eax, 0x10(%rsp)
movq %r15, 0x70(%rsp)
leaq 0x2(%rbx), %r12
addq $0x2, %r14
movq %r12, %rdi
pushq $0x1
popq %rsi
leaq 0xb7d83(%rip), %rdx     # 0x3864fe
movl $0xa3, %ecx
callq 0x9334a
movq %rax, %rbp
movq 0x110(%r13), %rdi
movq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x581aa
movq (%rax), %rcx
addq 0xa0(%rsp), %rcx
movq %rbp, 0x58(%rsp)
movq %rbp, %rdi
movq %r12, %rsi
leaq 0x9a6f0(%rip), %r12     # 0x368ea9
movq %r12, %rdx
xorl %eax, %eax
callq 0x17bf0
movq %r14, %rdi
pushq $0x1
popq %rsi
leaq 0xb7d2e(%rip), %rdx     # 0x3864fe
movl $0xab, %ecx
callq 0x9334a
movq %rax, %rbp
movq 0x168(%r13), %rdi
movq %r15, %rsi
callq 0xae386
movq %rbp, 0x50(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x17bf0
movq 0x100(%r13), %rdi
movq %r15, %rsi
callq 0x581aa
cmpq $0x0, (%rax)
jns 0x2ce840
cmpl $0x0, 0x10(%rsp)
movq 0x68(%rsp), %rbp
jne 0x2ce845
incq %rbx
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movq 0x60(%rsp), %rdx
callq 0x1caf90
movl %eax, 0x10(%rsp)
jmp 0x2ce845
movq 0x68(%rsp), %rbp
movq 0x108(%r13), %rdi
movq 0x20(%rsp), %rsi
callq 0x581aa
cmpq $0x0, (%rax)
movq 0x70(%rsp), %rsi
jns 0x2ce87a
movl 0x10(%rsp), %eax
testl %eax, %eax
jne 0x2ce87e
movq 0x50(%rsp), %rdi
movq 0x60(%rsp), %rdx
callq 0x1caf90
jmp 0x2ce87e
movl 0x10(%rsp), %eax
testl %eax, %eax
jne 0x2cef8f
movq 0x90(%rsp), %rax
leaq -0x2(%rax), %rcx
addq $-0x3, %rax
movq %rax, 0x100(%rsp)
movzwl 0x2e(%rsp), %eax
movq %rax, 0x118(%rsp)
xorl %r12d, %r12d
xorl %ebx, %ebx
xorl %eax, %eax
movl $0x0, 0x10(%rsp)
pushq $0x8
popq %rbp
movq %rcx, 0xb8(%rsp)
cmpq %rcx, %rax
jae 0x2cee87
cmpq 0x30(%rsp), %rbx
jae 0x2cee76
cmpq 0x90(%rsp), %r12
jae 0x2cee76
movq %rax, 0x110(%rsp)
xorl %edx, %edx
pushq $0x3
popq %rcx
divq %rcx
movq %rax, %r14
movq 0x108(%rsp), %rcx
movb (%rcx,%rax), %al
movb %al, 0x17(%rsp)
movq 0xc0(%rsp), %rdx
movb (%rdx,%r14), %bpl
movb %bpl, 0x16(%rsp)
cmpb $0x2d, %al
jne 0x2ce940
leaq (%rcx,%r14), %rdi
leaq 0x99881(%rip), %rsi     # 0x3681aa
callq 0x172a0
leaq (%rax,%rax,2), %r15
addq %r12, %r15
cmpb $0x2d, %bpl
je 0x2ce949
jmp 0x2cea61
cmpb $0x2d, %bpl
jne 0x2ce96c
movq %r12, %r15
addq 0xc0(%rsp), %r14
movq %r14, %rdi
leaq 0x9984f(%rip), %rsi     # 0x3681aa
callq 0x172a0
leaq (%rax,%rax,2), %rax
addq %rax, %rbx
jmp 0x2cea61
movq 0x58(%rsp), %rax
leaq (%rax,%rbx), %rcx
movq %r12, %r14
movq 0x80(%rsp), %r12
movq %r12, %rdi
pushq $0x4
popq %r15
movq %r15, %rsi
leaq 0x9a518(%rip), %rdx     # 0x368ea9
movq %rcx, 0x70(%rsp)
xorl %eax, %eax
callq 0x17bf0
movq 0x50(%rsp), %rax
movq %r14, 0x38(%rsp)
leaq (%rax,%r14), %rbp
movq 0x88(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
leaq 0x9a4e9(%rip), %rdx     # 0x368ea9
movq %rbp, %rcx
xorl %eax, %eax
callq 0x17bf0
movq %r12, %rdi
leaq 0xb7bbe(%rip), %r15     # 0x386592
movq %r15, %rsi
callq 0x172a0
cmpq $0x3, %rax
jne 0x2cea5c
movq %r14, %rdi
movq %r15, %rsi
callq 0x172a0
cmpq $0x3, %rax
jne 0x2cea5c
movb (%rbp), %al
movb %al, 0x18(%rsp)
movb 0x1(%rbp), %al
movb %al, 0x78(%rsp)
movb 0x2(%rbp), %r12b
movq 0x70(%rsp), %rax
movsbl (%rax), %esi
movsbl 0x1(%rax), %edx
movsbl 0x2(%rax), %ecx
movq 0x98(%rsp), %r14
movq %r14, %rdi
leaq 0x17(%rsp), %r8
movq 0x60(%rsp), %r15
movq %r15, %r9
callq 0xb1347
movl %eax, 0x10(%rsp)
testl %eax, %eax
jne 0x2cea5c
movsbl 0x18(%rsp), %esi
movsbl 0x78(%rsp), %edx
movsbl %r12b, %ecx
movq %r14, %rdi
leaq 0x16(%rsp), %r8
movq %r15, %r9
callq 0xb1347
movl %eax, 0x10(%rsp)
movq 0x38(%rsp), %r15
movq 0x110(%r13), %rdi
movq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x581aa
movq (%rax), %rax
movq %rax, 0x78(%rsp)
movq 0x118(%r13), %rdi
movq %r14, %rsi
callq 0x581aa
movq (%rax), %rax
movq %rax, 0x70(%rsp)
movb 0x16(%rsp), %al
movswl 0x2e(%rsp), %r14d
cmpb $0x2a, %al
movq %r15, 0x38(%rsp)
jne 0x2ceaf3
xorl %ebp, %ebp
movsd 0x17777(%rip), %xmm2    # 0x2e6228
cmpw $0x3, %bp
je 0x2ceca3
movsd 0x198(%r13), %xmm0
movzwl %bp, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl %r14d, %ecx
movq 0x20(%rsp), %r8
movq %rbx, %r9
callq 0x2cf1da
movsd 0x17739(%rip), %xmm2    # 0x2e6228
incl %ebp
jmp 0x2ceab1
movb 0x17(%rsp), %cl
cmpb $0x2a, %cl
movsd 0x17726(%rip), %xmm2    # 0x2e6228
jne 0x2ceb48
xorl %ebp, %ebp
cmpw $0x3, %bp
je 0x2ceca3
movsd 0x1a0(%r13), %xmm0
movzwl %bp, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl %r14d, %ecx
movq 0x20(%rsp), %r8
movq %rbx, %r9
callq 0x2cf1da
movsd 0x176e4(%rip), %xmm2    # 0x2e6228
incl %ebp
jmp 0x2ceb06
cmpb %cl, %al
jne 0x2cebf9
movq 0x50(%rsp), %rax
addq %r15, %rax
movq %rax, 0x18(%rsp)
movq 0x58(%rsp), %rax
leaq (%rax,%rbx), %rbp
callq 0x17100
movq %rax, %r12
xorl %r15d, %r15d
movsd 0x176af(%rip), %xmm2    # 0x2e6228
cmpq $0x3, %r15
je 0x2ceca3
movq (%r12), %rax
movq 0x18(%rsp), %rcx
movsbq (%rcx,%r15), %rcx
movl (%rax,%rcx,4), %ecx
movsbq (%rbp,%r15), %rdx
cmpl (%rax,%rdx,4), %ecx
sete %al
xorb 0x1e9(%r13), %al
jne 0x2cebf4
movsd 0x180(%r13), %xmm0
movzwl %r15w, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl %r14d, %ecx
movq 0x20(%rsp), %r8
movq %rbx, %r9
callq 0x2cf1da
movsd 0x1764a(%rip), %xmm2    # 0x2e6228
movsd 0xf0(%r13), %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0xf0(%r13)
incq %r15
jmp 0x2ceb79
callq 0x17100
movq %rax, %rsi
movq 0x50(%rsp), %rax
leaq (%rax,%r15), %rdi
movq 0x58(%rsp), %rax
leaq (%rax,%rbx), %r8
xorl %r12d, %r12d
movsd 0x1760a(%rip), %xmm2    # 0x2e6228
movq %rdi, 0x18(%rsp)
cmpq $0x3, %r12
je 0x2ceca3
movq (%rsi), %rax
movsbq (%rdi,%r12), %rcx
movl (%rax,%rcx,4), %ecx
movsbq (%r8,%r12), %rdx
cmpl (%rax,%rdx,4), %ecx
je 0x2cec9e
movsd 0x188(%r13), %xmm0
movzwl %r12w, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq %rsi, %r15
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
movl %r14d, %ecx
movq %r13, %rbp
movq %r8, %r13
movq 0x20(%rsp), %r8
movq %rbx, %r9
callq 0x2cf1da
movq %r13, %r8
movq %rbp, %r13
movq 0x18(%rsp), %rdi
movq %r15, %rsi
movsd 0x1759e(%rip), %xmm2    # 0x2e6228
movsd 0xf8(%rbp), %xmm0
addsd %xmm2, %xmm0
movsd %xmm0, 0xf8(%rbp)
incq %r12
jmp 0x2cec23
movq 0x38(%rsp), %r12
cmpq %r12, 0x100(%rsp)
jne 0x2cee4c
movsd 0xf8(%r13), %xmm0
ucomisd 0x3d021(%rip), %xmm0    # 0x30bce8
movq 0x68(%rsp), %r15
pushq $0x8
popq %rbp
jne 0x2cece8
jp 0x2cece8
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xf8(%r13)
movapd %xmm2, %xmm0
movq 0xb0(%rsp), %rax
movsd (%rax), %xmm1
divsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
ja 0x2cee56
movq 0x78(%rsp), %rax
leaq -0x1(%rax), %r12
movq 0x130(%r13), %rdi
movq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0xae386
movq 0xf8(%rsp), %rdi
movq %rax, %rsi
callq 0xae22f
movq 0x140(%r13), %rdi
movq %r14, %rsi
callq 0xae386
movq 0xa8(%rsp), %rdi
movq %rax, %rsi
callq 0xae22f
movq 0xd8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x138(%r13), %rdi
movq %r14, %rsi
callq 0xae386
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xae22f
movq 0xe0(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x158(%r13), %rdi
movq %r14, %rsi
callq 0xae386
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xae22f
movq 0xe8(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x160(%r13), %rdi
movq %r14, %rsi
callq 0xae386
movq 0x18(%rsp), %rdi
movq %rax, %rsi
callq 0xae22f
movq 0xd0(%rsp), %rdi
movq %rdi, 0xa8(%rsp)
callq 0xae61c
decq %rax
movq %rax, 0x120(%rsp)
movq 0x78(%rsp), %rax
leaq (%rax,%rax,2), %r14
addq $-0x3, %r14
cmpq 0x70(%rsp), %r12
jae 0x2cee51
movq 0x40(%rsp), %rax
movsd (%rax,%r12,8), %xmm0
movq 0x118(%rsp), %rax
movq (%r15,%rax,8), %rax
addsd (%rax,%r14,8), %xmm0
movsd %xmm0, (%rax,%r14,8)
movq 0x48(%rsp), %rcx
movq (%rcx,%r12,8), %rcx
addq %rcx, 0x8(%rax,%r14,8)
movq 0x10(%rax,%r14,8), %rdi
leaq 0x120(%rsp), %rsi
movq %rbp, %rdx
callq 0x5851d
incq %r12
addq $0x3, %r14
jmp 0x2cedf6
pushq $0x8
popq %rbp
jmp 0x2cee66
movq 0x38(%rsp), %r12
movq 0xb0(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq 0xb8(%rsp), %rcx
movq 0x110(%rsp), %rax
addq $0x3, %rax
addq $0x3, %rbx
addq $0x3, %r12
jmp 0x2ce8c5
movq 0x58(%rsp), %rdi
leaq 0xb766b(%rip), %rbx     # 0x3864fe
movq %rbx, %rsi
movl $0x10d, %edx            # imm = 0x10D
callq 0x936f9
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
movl $0x10e, %edx            # imm = 0x10E
callq 0x936f9
movq 0x80(%rsp), %rdi
movq %rbx, %rsi
movl $0x10f, %edx            # imm = 0x10F
callq 0x936f9
movq 0x88(%rsp), %rdi
movq %rbx, %rsi
movl $0x110, %edx            # imm = 0x110
callq 0x936f9
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movl $0x111, %edx            # imm = 0x111
callq 0x936f9
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
movl $0x112, %edx            # imm = 0x112
callq 0x936f9
movq 0x20(%rsp), %rax
incq %rax
movl 0x10(%rsp), %r15d
jmp 0x2ce59b
testl %r15d, %r15d
movq 0x68(%rsp), %rbp
jne 0x2cf02d
xorl %eax, %eax
movq 0x189b6(%rip), %xmm0    # 0x2e78e0
movapd 0x189be(%rip), %xmm1    # 0x2e78f0
movq 0x60(%rsp), %r9
cmpq 0x30(%rsp), %rax
je 0x2cf00e
imulq $0x18, %rax, %rcx
xorl %edx, %edx
cmpq $0x7, %rdx
je 0x2cef8a
movq (%rbp,%rdx,8), %rsi
movq 0x8(%rsi,%rcx), %rdi
testq %rdi, %rdi
je 0x2cef85
addq %rcx, %rsi
movq %rdi, %xmm2
punpckldq %xmm0, %xmm2    # xmm2 = xmm2[0],xmm0[0],xmm2[1],xmm0[1]
subpd %xmm1, %xmm2
movapd %xmm2, %xmm3
unpckhpd %xmm2, %xmm3            # xmm3 = xmm3[1],xmm2[1]
addsd %xmm2, %xmm3
movsd (%rsi), %xmm2
divsd %xmm3, %xmm2
movsd %xmm2, (%rsi)
incq %rdx
jmp 0x2cef48
incq %rax
jmp 0x2cef37
movl %eax, 0x10(%rsp)
leaq 0xb7564(%rip), %rbx     # 0x3864fe
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movl $0x116, %edx            # imm = 0x116
callq 0x936f9
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
movl $0x117, %edx            # imm = 0x117
callq 0x936f9
movq 0x80(%rsp), %rdi
movq %rbx, %rsi
movl $0x118, %edx            # imm = 0x118
callq 0x936f9
movq 0x88(%rsp), %rdi
movq %rbx, %rsi
movl $0x119, %edx            # imm = 0x119
callq 0x936f9
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movl $0x11a, %edx            # imm = 0x11A
callq 0x936f9
movq 0x48(%rsp), %rdi
movq %rbx, %rsi
movl $0x11b, %edx            # imm = 0x11B
callq 0x936f9
jmp 0x2cf02d
leaq 0xc8(%rsp), %rsi
pushq $0x7
popq %rdx
movq %rbp, %rdi
movq 0x30(%rsp), %rcx
movq %r13, %r8
callq 0x2d0bcc
movl %eax, 0x10(%rsp)
xorl %ebx, %ebx
pushq $0x10
popq %r14
cmpq $0x7, %rbx
je 0x2cf060
movq %r14, %r15
movq 0x30(%rsp), %r12
subq $0x1, %r12
jb 0x2cf05b
movq (%rbp,%rbx,8), %rax
movq (%rax,%r15), %rdi
callq 0x58eb9
addq $0x18, %r15
jmp 0x2cf041
incq %rbx
jmp 0x2cf033
movq (%rbp), %rdi
leaq 0xb7493(%rip), %rbx     # 0x3864fe
movq %rbx, %rsi
movl $0x141, %edx            # imm = 0x141
callq 0x936f9
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x141, %edx            # imm = 0x141
callq 0x936f9
movq 0x98(%rsp), %rdi
callq 0xb168a
movq 0xc8(%rsp), %rdi
callq 0xae662
movq 0xd0(%rsp), %rdi
callq 0xae662
movq 0xd8(%rsp), %rdi
callq 0xae662
movq 0xe0(%rsp), %rdi
callq 0xae662
movq 0xe8(%rsp), %rdi
callq 0xae662
movl 0x10(%rsp), %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x168e75(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x15f16(%rip), %rsi     # 0x2e5013
leaq 0xb73de(%rip), %rdx     # 0x3864e2
leaq 0xb73e2(%rip), %rcx     # 0x3864ed
leaq 0xb73ec(%rip), %r8      # 0x3864fe
pushq $0x4c
jmp 0x2cf13e
movq 0x168e4b(%rip), %rax    # 0x437f68
movq (%rax), %rdi
leaq 0x15eec(%rip), %rsi     # 0x2e5013
leaq 0x16091(%rip), %rdx     # 0x2e51bf
leaq 0xb73b8(%rip), %rcx     # 0x3864ed
leaq 0xb73c2(%rip), %r8      # 0x3864fe
pushq $0x4f
popq %r9
xorl %eax, %eax
callq 0x17a50
callq 0x17390