// File: /workspace/github_c_makefile_star2_O1/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, 0xc8(%rsp)
movq %rdi, %r13
xorl %edi, %edi
callq 0x123d42
movq %rax, 0x78(%rsp)
testq %rax, %rax
je 0x338236
testq %rbx, %rbx
je 0x337545
movq %rbx, %rdi
callq 0x101a9a
testb %al, %al
jne 0x33823b
movq %rbx, 0x48(%rsp)
movq 0x120(%r13), %rdi
callq 0x120d23
movq %rax, 0xc0(%rsp)
movq 0x120(%r13), %rdi
callq 0x120d4c
movq %rax, %rbp
leaq 0xb839a(%rip), %rbx     # 0x3ef90e
movl $0x38, %edi
movq %rbx, %rsi
movl $0x58, %edx
callq 0x1092b2
movq %rax, %r12
leaq (,%rbp,8), %r14
movq %r14, %rdi
subq %rbp, %rdi
movl $0x18, %esi
movq %rbx, %rdx
movl $0x58, %ecx
callq 0x1093ef
movq %rax, (%r12)
leaq (%r14,%r14,2), %rcx
addq %rcx, %rax
movl $0x1, %edx
movq %rax, (%r12,%rdx,8)
incq %rdx
addq %rcx, %rax
cmpq $0x7, %rdx
jne 0x3375b9
xorl %ebx, %ebx
testq %rbp, %rbp
je 0x3375f4
movl $0x10, %r14d
movq %rbp, %r15
movl $0x8, %edi
callq 0xd46fc
movq (%r12,%rbx,8), %rcx
movq %rax, (%rcx,%r14)
addq $0x18, %r14
decq %r15
jne 0x3375d9
incq %rbx
cmpq $0x7, %rbx
jne 0x3375cb
callq 0x121b54
movq %rax, 0x98(%rsp)
callq 0x121b54
movq %rax, 0xa0(%rsp)
callq 0x121b54
movq %rax, 0xa8(%rsp)
callq 0x121b54
movq %rax, 0xb0(%rsp)
callq 0x121b54
movq %rax, 0xb8(%rsp)
cmpq $0x0, 0xc8(%rsp)
movq %r12, 0xd0(%rsp)
je 0x33805e
decq 0xc0(%rsp)
leaq 0xf0(%r13), %rax
movq %rax, 0xf0(%rsp)
leaq 0xb829b(%rip), %rbx     # 0x3ef90e
movq $0x0, 0x18(%rsp)
xorl %r15d, %r15d
movq %r13, 0x68(%rsp)
movq %rbp, 0x88(%rsp)
movl $0x8, %esi
movq %rbp, %rdi
movq %rbx, %rdx
movl $0x71, %ecx
callq 0x1093ef
movq %rax, 0x30(%rsp)
movl $0x8, %esi
movq %rbp, %rdi
movq %rbx, %rdx
movl $0x72, %ecx
callq 0x1093ef
movq %rax, 0x38(%rsp)
movl $0x4, %edi
movl $0x1, %esi
movq %rbx, %rdx
movl $0x73, %ecx
callq 0x1093ef
movq %rax, 0x80(%rsp)
movl $0x4, %edi
movl $0x1, %esi
movq %rbx, %rdx
movl $0x74, %ecx
callq 0x1093ef
movq %rax, 0x70(%rsp)
movq 0x170(%r13), %rdi
movq %r15, %rsi
callq 0x121cfa
movq %rax, 0x110(%rsp)
movq 0x178(%r13), %rdi
movq %r15, %rsi
callq 0x121cfa
movq %rax, 0xe0(%rsp)
movq 0x100(%r13), %rdi
movq %r15, %rsi
callq 0xd47ba
movq (%rax), %rdi
callq 0x338240
movw %ax, 0x26(%rsp)
movq 0x118(%r13), %rdi
movq %r15, %rsi
callq 0xd47ba
movq (%rax), %r14
movq 0x110(%r13), %rdi
movq %r15, %rsi
callq 0xd47ba
subq (%rax), %r14
movq 0x168(%r13), %rdi
movq %r15, %rsi
callq 0x121cfa
movq %rax, %rdi
callq 0x172f0
movq %rax, 0x90(%rsp)
movq 0x158(%r13), %rdi
movq %r15, %rsi
callq 0x121cfa
movq %rax, %rdi
callq 0x17930
movq %rax, %rbp
movq 0x160(%r13), %rdi
movq %r15, 0x28(%rsp)
movq %r15, %rsi
callq 0x121cfa
movq %rax, %rdi
callq 0x17930
movq %rax, %r15
subq %rbp, %r15
movb $0x1, %bl
movq %r14, %rax
subq %r15, %rax
je 0x3377ec
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movabsq $0x5555555555555556, %rcx # imm = 0x5555555555555556
cmpq %rcx, %rax
setb %bl
movq 0x118(%r13), %rdi
movq 0x28(%rsp), %rbp
movq %rbp, %rsi
callq 0xd47ba
leaq 0x1(%r15), %r12
movq 0x88(%rsp), %rcx
cmpq %rcx, (%rax)
ja 0x33781f
cmpq 0x90(%rsp), %r12
jne 0x33781f
testb %bl, %bl
jne 0x33784e
movq 0x140(%r13), %rdi
movq %rbp, %rsi
callq 0x121cfa
movq 0x48(%rsp), %rdi
leaq 0xb80f0(%rip), %rsi     # 0x3ef92a
movq %rax, %rdx
xorl %eax, %eax
callq 0x1019cf
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x18(%rsp)
movq %r12, 0x10(%rsp)
leaq 0x2(%r14), %rbp
addq $0x2, %r15
movl $0x1, %esi
movq %rbp, %rdi
leaq 0xb80a4(%rip), %rbx     # 0x3ef90e
movq %rbx, %rdx
movl $0xa3, %ecx
callq 0x1093ef
movq %rax, %r12
movq 0x110(%r13), %rdi
movq 0x28(%rsp), %rsi
callq 0xd47ba
movq (%rax), %rcx
addq 0xc0(%rsp), %rcx
movq %r12, 0x58(%rsp)
movq %r12, %rdi
movq %rbp, %rsi
leaq 0x9a929(%rip), %rbp     # 0x3d21d1
movq %rbp, %rdx
xorl %eax, %eax
callq 0x17c60
movl $0x1, %esi
movq %r15, %rdi
movq %rbx, %rdx
movl $0xab, %ecx
callq 0x1093ef
movq %rax, %rbx
movq 0x168(%r13), %rdi
movq 0x28(%rsp), %rsi
callq 0x121cfa
movq %rbx, 0x50(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq 0x28(%rsp), %rbx
movq %rax, %rcx
xorl %eax, %eax
callq 0x17c60
movq 0x100(%r13), %rdi
movq %rbx, %rsi
callq 0xd47ba
cmpq $0x0, (%rax)
jns 0x33792e
cmpl $0x0, 0x18(%rsp)
jne 0x33792e
incq %r14
movq 0x58(%rsp), %rdi
movq %r14, %rsi
movq 0x48(%rsp), %rdx
callq 0x21fe1c
movq %rax, 0x18(%rsp)
movq 0x108(%r13), %rdi
movq %rbx, %rsi
callq 0xd47ba
cmpq $0x0, (%rax)
movq 0x88(%rsp), %rbp
movq 0x10(%rsp), %rsi
jns 0x33796f
movq 0x18(%rsp), %rax
testl %eax, %eax
movq 0x38(%rsp), %r14
jne 0x337979
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rdx
callq 0x21fe1c
jmp 0x337979
movq 0x18(%rsp), %rax
movq 0x38(%rsp), %r14
testl %eax, %eax
jne 0x338069
movq 0x90(%rsp), %rax
movq %rax, %rcx
addq $-0x2, %rcx
je 0x337fc1
leaq -0x3(%rax), %rdx
movq %rdx, 0x100(%rsp)
movzwl 0x26(%rsp), %edx
movq $0x0, 0x18(%rsp)
xorl %esi, %esi
xorl %r12d, %r12d
xorl %edi, %edi
movq 0x30(%rsp), %r14
movq %rcx, 0x108(%rsp)
movq %rdx, 0xf8(%rsp)
cmpq %rbp, %r12
jae 0x337faa
cmpq %rax, %rdi
jae 0x337faa
movq %rsi, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movq %rdx, %r15
shrq %r15
movq 0x110(%rsp), %rax
movb (%rax,%r15), %bpl
movb %bpl, 0xf(%rsp)
movq 0xe0(%rsp), %rcx
movb (%rcx,%r15), %bl
movb %bl, 0xe(%rsp)
cmpb $0x2d, %bpl
movq %rsi, 0x120(%rsp)
jne 0x337a46
movq %r13, %r14
movq %rdi, %r13
leaq (%rax,%r15), %rdi
leaq 0x99a9e(%rip), %rsi     # 0x3d14d2
callq 0x172c0
movq %r13, %rdi
movq %r14, %r13
leaq (%rax,%rax,2), %rax
addq %rax, %rdi
movq 0x70(%rsp), %r14
movq %rdi, 0x60(%rsp)
cmpb $0x2d, %bl
jne 0x337a73
addq 0xe0(%rsp), %r15
movq %r15, %rdi
leaq 0x99a6b(%rip), %rsi     # 0x3d14d2
callq 0x172c0
leaq (%rax,%rax,2), %rax
addq %rax, %r12
cmpb $0x2d, %bpl
movq %r12, 0x40(%rsp)
je 0x337b5e
cmpb $0x2d, %bl
je 0x337b5e
movq 0x58(%rsp), %rax
leaq (%rax,%r12), %r15
movl $0x4, %esi
movq 0x80(%rsp), %r12
movq %r12, %rdi
leaq 0x9a726(%rip), %rbx     # 0x3d21d1
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x17c60
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq (%rax,%rcx), %rbp
movl $0x4, %esi
movq %r14, %rdi
movq %rbx, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x17c60
movq %r12, %rdi
leaq 0xb7ebd(%rip), %rbx     # 0x3ef9a2
movq %rbx, %rsi
callq 0x172c0
cmpq $0x3, %rax
jne 0x337b5e
movq %r14, %rdi
movq %rbx, %rsi
callq 0x172c0
cmpq $0x3, %rax
jne 0x337b5e
movb (%rbp), %bl
movb 0x1(%rbp), %r12b
movb 0x2(%rbp), %bpl
movsbl (%r15), %esi
movsbl 0x1(%r15), %edx
movsbl 0x2(%r15), %ecx
movq 0x78(%rsp), %rdi
leaq 0xf(%rsp), %r8
movq 0x48(%rsp), %r9
callq 0x123d7c
movq %rax, 0x18(%rsp)
testl %eax, %eax
jne 0x337b5e
movsbl %bl, %esi
movsbl %r12b, %edx
movsbl %bpl, %ecx
movq 0x78(%rsp), %rdi
leaq 0xe(%rsp), %r8
movq 0x48(%rsp), %r9
callq 0x123d7c
movq %rax, 0x18(%rsp)
movq $0x0, 0xe8(%rsp)
movq 0x110(%r13), %rdi
movq 0x28(%rsp), %r12
movq %r12, %rsi
callq 0xd47ba
movq (%rax), %rax
movq %rax, 0xd8(%rsp)
movq 0x118(%r13), %rdi
movq %r12, %rsi
callq 0xd47ba
movq (%rax), %rdx
movb 0xe(%rsp), %al
movswl 0x26(%rsp), %ecx
cmpb $0x2a, %al
movl %ecx, 0x10(%rsp)
movq %rdx, 0x118(%rsp)
jne 0x337bf9
xorl %ebx, %ebx
movq 0x38(%rsp), %rbp
movq 0x30(%rsp), %r14
movq 0x40(%rsp), %r15
movsd 0x198(%r13), %xmm0
movzwl %bx, %ebx
movl %ebx, (%rsp)
movq %r13, %rdi
movq %r14, %rsi
movq %rbp, %rdx
movq %r12, %r8
movq %r15, %r9
callq 0x33826c
movl 0x10(%rsp), %ecx
incl %ebx
cmpw $0x3, %bx
jne 0x337bc5
jmp 0x337d93
movb 0xf(%rsp), %sil
cmpb $0x2a, %sil
jne 0x337c4c
xorl %ebx, %ebx
movq 0x38(%rsp), %rbp
movq %r13, %r14
movq 0x30(%rsp), %r13
movq 0x40(%rsp), %r15
movsd 0x1a0(%r14), %xmm0
movzwl %bx, %ebx
movl %ebx, (%rsp)
movq %r14, %rdi
movq %r13, %rsi
movq %rbp, %rdx
movq %r12, %r8
movq %r15, %r9
callq 0x33826c
movl 0x10(%rsp), %ecx
incl %ebx
cmpw $0x3, %bx
jne 0x337c18
jmp 0x337d93
cmpb %sil, %al
jne 0x337cfd
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq (%rax,%rcx), %r14
movq 0x58(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rax,%rcx), %rbx
callq 0x17110
movq %rax, %rbp
xorl %r12d, %r12d
movq 0x68(%rsp), %r13
movl 0x10(%rsp), %ecx
movq (%rbp), %rax
movsbq (%r14,%r12), %rdx
movl (%rax,%rdx,4), %esi
movsbq (%rbx,%r12), %rdx
cmpl (%rax,%rdx,4), %esi
sete %al
xorb 0x1e9(%r13), %al
jne 0x337cef
movsd 0x180(%r13), %xmm0
movzwl %r12w, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %r8
movq 0x40(%rsp), %r9
callq 0x33826c
movl 0x10(%rsp), %ecx
movsd 0xf0(%r13), %xmm0
addsd 0x17542(%rip), %xmm0    # 0x34f228
movsd %xmm0, 0xf0(%r13)
incq %r12
cmpq $0x3, %r12
jne 0x337c85
jmp 0x337d93
callq 0x17110
movq %rax, %r15
movq 0x50(%rsp), %rax
movq 0x60(%rsp), %rcx
leaq (%rax,%rcx), %rbx
movq 0x58(%rsp), %rax
movq 0x40(%rsp), %rcx
leaq (%rax,%rcx), %r12
xorl %ebp, %ebp
movl 0x10(%rsp), %ecx
movq (%r15), %rax
movsbq (%rbx,%rbp), %rdx
movl (%rax,%rdx,4), %esi
movsbq (%r12,%rbp), %rdx
cmpl (%rax,%rdx,4), %esi
je 0x337d8a
movq 0x68(%rsp), %r14
movsd 0x188(%r14), %xmm0
movzwl %bp, %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
movq 0x28(%rsp), %r8
movq 0x40(%rsp), %r9
callq 0x33826c
movl 0x10(%rsp), %ecx
movsd 0xf8(%r14), %xmm0
addsd 0x174a7(%rip), %xmm0    # 0x34f228
movsd %xmm0, 0xf8(%r14)
incq %rbp
cmpq $0x3, %rbp
jne 0x337d27
movq 0x60(%rsp), %rdi
cmpq %rdi, 0x100(%rsp)
jne 0x337f7b
movq 0x68(%rsp), %rcx
movsd 0xf8(%rcx), %xmm0
ucomisd 0x3d225(%rip), %xmm0    # 0x374fe0
jne 0x337dd0
jp 0x337dd0
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xf8(%rcx)
movsd 0xf0(%rcx), %xmm0
divsd 0xf8(%rcx), %xmm0
movsd 0x17440(%rip), %xmm1    # 0x34f228
ucomisd %xmm0, %xmm1
movq 0xd0(%rsp), %r14
movq 0xf8(%rsp), %r12
movq 0x118(%rsp), %r13
ja 0x337f66
movq 0xd8(%rsp), %rax
leaq -0x1(%rax), %rbp
movq 0x98(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x68(%rsp), %r15
movq 0x130(%r15), %rdi
movq 0x28(%rsp), %rbx
movq %rbx, %rsi
callq 0x121cfa
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x121c30
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x140(%r15), %rdi
movq %rbx, %rsi
callq 0x121cfa
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x121c30
movq 0xa8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x138(%r15), %rdi
movq %rbx, %rsi
callq 0x121cfa
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x121c30
movq 0xb0(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x158(%r15), %rdi
movq %rbx, %rsi
callq 0x121cfa
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0x121c30
movq 0xb8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x160(%r15), %rdi
movq %rbx, %rsi
callq 0x121cfa
movq 0x10(%rsp), %rdi
leaq 0xe8(%rsp), %r15
movq %rax, %rsi
callq 0x121c30
movq 0xa0(%rsp), %rdi
callq 0x121e78
decq %rax
movq %rax, 0xe8(%rsp)
cmpq %r13, %rbp
jae 0x337f66
movq 0xd8(%rsp), %rax
leaq (%rax,%rax,2), %rbx
addq $-0x3, %rbx
movq 0x30(%rsp), %rax
movsd (%rax,%rbp,8), %xmm0
movq (%r14,%r12,8), %rax
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
movq 0x38(%rsp), %rcx
movq (%rcx,%rbp,8), %rcx
addq %rcx, 0x8(%rax,%rbx,8)
movq 0x10(%rax,%rbx,8), %rdi
movl $0x8, %edx
movq %r15, %rsi
callq 0xd49ce
incq %rbp
addq $0x3, %rbx
cmpq %rbp, %r13
jne 0x337f22
movq 0xf0(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq 0x60(%rsp), %rdi
movq 0x88(%rsp), %rbp
movq 0x30(%rsp), %r14
movq 0x68(%rsp), %r13
movq 0x90(%rsp), %rax
movq 0x108(%rsp), %rcx
movq 0x120(%rsp), %rsi
movq 0x40(%rsp), %r12
addq $0x3, %rsi
addq $0x3, %r12
addq $0x3, %rdi
cmpq %rcx, %rsi
jb 0x3379cc
jmp 0x337fcf
movq $0x0, 0x18(%rsp)
movq 0x30(%rsp), %r14
movq 0x58(%rsp), %rdi
leaq 0xb7933(%rip), %rbx     # 0x3ef90e
movq %rbx, %rsi
movl $0x10d, %edx            # imm = 0x10D
callq 0x109670
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
movl $0x10e, %edx            # imm = 0x10E
callq 0x109670
movq 0x80(%rsp), %rdi
movq %rbx, %rsi
movl $0x10f, %edx            # imm = 0x10F
callq 0x109670
movq 0x70(%rsp), %rdi
movq %rbx, %rsi
movl $0x110, %edx            # imm = 0x110
callq 0x109670
movq %r14, %rdi
movq %rbx, %rsi
movl $0x111, %edx            # imm = 0x111
callq 0x109670
movq 0x38(%rsp), %rdi
movq %rbx, %rsi
movl $0x112, %edx            # imm = 0x112
callq 0x109670
movq 0x28(%rsp), %r15
incq %r15
cmpq 0xc8(%rsp), %r15
jne 0x33768c
jmp 0x3380e2
movq $0x0, 0x18(%rsp)
jmp 0x3380e2
movq %rax, 0x18(%rsp)
leaq 0xb7899(%rip), %rbx     # 0x3ef90e
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movl $0x116, %edx            # imm = 0x116
callq 0x109670
movq 0x50(%rsp), %rdi
movq %rbx, %rsi
movl $0x117, %edx            # imm = 0x117
callq 0x109670
movq 0x80(%rsp), %rdi
movq %rbx, %rsi
movl $0x118, %edx            # imm = 0x118
callq 0x109670
movq 0x70(%rsp), %rdi
movq %rbx, %rsi
movl $0x119, %edx            # imm = 0x119
callq 0x109670
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
movl $0x11a, %edx            # imm = 0x11A
callq 0x109670
movq %r14, %rdi
movq %rbx, %rsi
movl $0x11b, %edx            # imm = 0x11B
callq 0x109670
movq 0x18(%rsp), %rax
testl %eax, %eax
movq 0xd0(%rsp), %r12
jne 0x33817c
testq %rbp, %rbp
je 0x33815c
xorl %eax, %eax
movq 0x187da(%rip), %xmm0    # 0x3508e0
movapd 0x187e2(%rip), %xmm1    # 0x3508f0
leaq (%rax,%rax,2), %rcx
xorl %edx, %edx
movq (%r12,%rdx,8), %rdi
movq 0x8(%rdi,%rcx,8), %rsi
testq %rsi, %rsi
je 0x33814b
leaq (%rdi,%rcx,8), %rdi
movq %rsi, %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 (%rdi), %xmm2
divsd %xmm3, %xmm2
movsd %xmm2, (%rdi)
incq %rdx
cmpq $0x7, %rdx
jne 0x338114
incq %rax
cmpq %rbp, %rax
jne 0x33810e
leaq 0x98(%rsp), %rsi
movl $0x7, %edx
movq %r12, %rdi
movq %rbp, %rcx
movq %r13, %r8
movq 0x48(%rsp), %r9
callq 0x339d94
movq %rax, %r13
xorl %ebx, %ebx
testq %rbp, %rbp
je 0x3381a5
movl $0x10, %r14d
movq %rbp, %r15
movq (%r12,%rbx,8), %rax
movq (%rax,%r14), %rdi
callq 0xd4ef4
addq $0x18, %r14
decq %r15
jne 0x33818f
incq %rbx
cmpq $0x7, %rbx
jne 0x338181
movq (%r12), %rdi
leaq 0xb7755(%rip), %rbx     # 0x3ef90e
movq %rbx, %rsi
movl $0x141, %edx            # imm = 0x141
callq 0x109670
movq %r12, %rdi
movq %rbx, %rsi
movl $0x141, %edx            # imm = 0x141
callq 0x109670
movq 0x78(%rsp), %rdi
callq 0x124000
movq 0x98(%rsp), %rdi
callq 0x121e8b
movq 0xa0(%rsp), %rdi
callq 0x121e8b
movq 0xa8(%rsp), %rdi
callq 0x121e8b
movq 0xb0(%rsp), %rdi
callq 0x121e8b
movq 0xb8(%rsp), %rdi
callq 0x121e8b
movl %r13d, %eax
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x97dbe
callq 0x97d87