// File: /workspace/github_c_makefile_star2_O0/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 $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, 0x1a0(%rsp)
movq %rsi, 0x198(%rsp)
movq %rdx, 0x190(%rsp)
movl $0x0, 0x18c(%rsp)
movq $0x0, 0x180(%rsp)
movq $0x0, 0x178(%rsp)
movq $0x0, 0x170(%rsp)
movq $0x0, 0x168(%rsp)
movq $0x0, 0x160(%rsp)
movq $0x0, 0x158(%rsp)
movq $0x0, 0x150(%rsp)
movq $0x0, 0x148(%rsp)
movq $0x0, 0x140(%rsp)
movq $0x0, 0x138(%rsp)
movq $0x0, 0x130(%rsp)
movq $0x0, 0x128(%rsp)
movq $0x0, 0xd8(%rsp)
movq $0x0, 0xd0(%rsp)
movq $0x0, 0xc8(%rsp)
movq $0x0, 0xc0(%rsp)
xorl %eax, %eax
movl %eax, %edi
callq 0x124040
movq %rax, 0xa0(%rsp)
cmpq $0x0, 0xa0(%rsp)
jne 0x4e9f68
movq 0x152069(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c0d2(%rip), %rsi     # 0x516013
leaq 0xd1e3c(%rip), %rdx     # 0x5bbd84
leaq 0xd1e40(%rip), %rcx     # 0x5bbd8f
leaq 0xd1e4a(%rip), %r8      # 0x5bbda0
movl $0x4c, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e9f6a
jmp 0x4e9f6c
cmpq $0x0, 0x190(%rsp)
je 0x4e9fc2
movq 0x190(%rsp), %rdi
callq 0xd8a60
testb $0x1, %al
jne 0x4e9f8a
jmp 0x4e9fc2
movq 0x15200f(%rip), %rax    # 0x63bfa0
movq (%rax), %rdi
leaq 0x2c078(%rip), %rsi     # 0x516013
leaq 0x2c21d(%rip), %rdx     # 0x5161bf
leaq 0xd1de6(%rip), %rcx     # 0x5bbd8f
leaq 0xd1df0(%rip), %r8      # 0x5bbda0
movl $0x4f, %r9d
movb $0x0, %al
callq 0x199f0
callq 0x19370
jmp 0x4e9fc4
movq 0x1a0(%rsp), %rax
movq 0x120(%rax), %rdi
callq 0x11dee0
movq %rax, 0xb8(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x120(%rax), %rdi
callq 0x11dfa0
movq %rax, 0x180(%rsp)
movl $0x38, %edi
leaq 0xd1d98(%rip), %rsi     # 0x5bbda0
movl $0x58, %edx
callq 0xe80f0
movq %rax, 0x118(%rsp)
imulq $0x7, 0x180(%rsp), %rdi
movl $0x18, %esi
leaq 0xd1d71(%rip), %rdx     # 0x5bbda0
movl $0x58, %ecx
callq 0xe83c0
movq %rax, %rcx
movq 0x118(%rsp), %rax
movq %rcx, (%rax)
movq $0x1, 0x98(%rsp)
cmpq $0x7, 0x98(%rsp)
jae 0x4ea0ac
movq 0x118(%rsp), %rax
movq 0x98(%rsp), %rcx
subq $0x1, %rcx
movq (%rax,%rcx,8), %rdx
imulq $0x18, 0x180(%rsp), %rax
addq %rax, %rdx
movq 0x118(%rsp), %rax
movq 0x98(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x98(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x98(%rsp)
jmp 0x4ea053
movw $0x0, 0x188(%rsp)
movzwl 0x188(%rsp), %eax
cmpl $0x7, %eax
jge 0x4ea147
movq $0x0, 0x158(%rsp)
movq 0x158(%rsp), %rax
cmpq 0x180(%rsp), %rax
jae 0x4ea12c
movl $0x8, %edi
callq 0x80990
movq %rax, %rcx
movq 0x118(%rsp), %rax
movzwl 0x188(%rsp), %edx
movq (%rax,%rdx,8), %rax
imulq $0x18, 0x158(%rsp), %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq 0x158(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x158(%rsp)
jmp 0x4ea0d3
jmp 0x4ea12e
movw 0x188(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x188(%rsp)
jmp 0x4ea0b6
callq 0x11f5c0
movq %rax, 0xf0(%rsp)
callq 0x11f5c0
movq %rax, 0xf8(%rsp)
callq 0x11f5c0
movq %rax, 0x100(%rsp)
callq 0x11f5c0
movq %rax, 0x108(%rsp)
callq 0x11f5c0
movq %rax, 0x110(%rsp)
movq $0x0, 0x160(%rsp)
movq 0x160(%rsp), %rax
cmpq 0x198(%rsp), %rax
jae 0x4eac12
movq 0x180(%rsp), %rdi
movl $0x8, %esi
leaq 0xd1be2(%rip), %rdx     # 0x5bbda0
movl $0x71, %ecx
callq 0xe83c0
movq %rax, 0xe8(%rsp)
movq 0x180(%rsp), %rdi
movl $0x8, %esi
leaq 0xd1bbc(%rip), %rdx     # 0x5bbda0
movl $0x72, %ecx
callq 0xe83c0
movq %rax, 0x120(%rsp)
movl $0x4, %edi
movl $0x1, %esi
leaq 0xd1b99(%rip), %rdx     # 0x5bbda0
movl $0x73, %ecx
callq 0xe83c0
movq %rax, 0xc8(%rsp)
movl $0x4, %edi
movl $0x1, %esi
leaq 0xd1b76(%rip), %rdx     # 0x5bbda0
movl $0x74, %ecx
callq 0xe83c0
movq %rax, 0xc0(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x170(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq %rax, 0xb0(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x178(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq %rax, 0xa8(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x100(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
movq (%rax), %rdi
callq 0x4eae90
movw %ax, 0x18a(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x118(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
movq %rax, 0x90(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x110(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
movq %rax, %rcx
movq 0x90(%rsp), %rax
subq (%rcx), %rax
addq $0x2, %rax
movq %rax, 0x178(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x168(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq %rax, %rdi
callq 0x192b0
movq %rax, 0x170(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x158(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq %rax, %rdi
callq 0x19880
movq %rax, 0x138(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x160(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq %rax, %rdi
callq 0x19880
movq %rax, 0x130(%rsp)
movq 0x130(%rsp), %rax
subq 0x138(%rsp), %rax
addq $0x2, %rax
movq %rax, 0x168(%rsp)
movq 0x178(%rsp), %rax
subq 0x168(%rsp), %rax
cmpq $0x0, %rax
jbe 0x4ea3e7
movq 0x178(%rsp), %rax
subq 0x168(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, 0x128(%rsp)
jmp 0x4ea409
movq 0x168(%rsp), %rax
subq 0x178(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rdx, 0x128(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x118(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
movq (%rax), %rax
cmpq 0x180(%rsp), %rax
ja 0x4ea448
movq 0x168(%rsp), %rax
subq $0x1, %rax
cmpq 0x170(%rsp), %rax
je 0x4ea454
movq $0x1, 0x128(%rsp)
cmpq $0x0, 0x128(%rsp)
je 0x4ea4af
movq 0x190(%rsp), %rax
movq %rax, 0x88(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x140(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq 0x88(%rsp), %rdi
movq %rax, %rdx
leaq 0xd191f(%rip), %rsi     # 0x5bbdbc
movb $0x0, %al
callq 0xd88c0
movl $0xffffffff, 0x18c(%rsp) # imm = 0xFFFFFFFF
movq 0x178(%rsp), %rdi
movl $0x1, %esi
leaq 0xd18dd(%rip), %rdx     # 0x5bbda0
movl $0xa3, %ecx
callq 0xe83c0
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rax
movq %rax, 0x68(%rsp)
movq 0x178(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0xb8(%rsp), %rax
movq %rax, 0x60(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x110(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
movq 0x60(%rsp), %rcx
movq 0x68(%rsp), %rdi
movq 0x70(%rsp), %rsi
movq (%rax), %rax
subq $0x1, %rax
addq %rax, %rcx
leaq 0xb1ae9(%rip), %rdx     # 0x59c021
movb $0x0, %al
callq 0x19b90
movq 0x168(%rsp), %rdi
movl $0x1, %esi
leaq 0xd184d(%rip), %rdx     # 0x5bbda0
movl $0xab, %ecx
callq 0xe83c0
movq %rax, 0xd0(%rsp)
movq 0xd0(%rsp), %rax
movq %rax, 0x78(%rsp)
movq 0x168(%rsp), %rax
movq %rax, 0x80(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x168(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x11f8c0
movq 0x78(%rsp), %rdi
movq 0x80(%rsp), %rsi
movq %rax, %rcx
leaq 0xb1a6c(%rip), %rdx     # 0x59c021
movb $0x0, %al
callq 0x19b90
movq 0x1a0(%rsp), %rax
movq 0x100(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
cmpq $0x0, (%rax)
jge 0x4ea610
cmpl $0x0, 0x18c(%rsp)
jne 0x4ea610
movq 0xd8(%rsp), %rdi
movq 0x178(%rsp), %rsi
subq $0x1, %rsi
movq 0x190(%rsp), %rdx
callq 0x31ac60
movl %eax, 0x18c(%rsp)
movq 0x1a0(%rsp), %rax
movq 0x108(%rax), %rdi
movq 0x160(%rsp), %rsi
callq 0x80b60
cmpq $0x0, (%rax)
jge 0x4ea664
cmpl $0x0, 0x18c(%rsp)
jne 0x4ea664
movq 0xd0(%rsp), %rdi
movq 0x168(%rsp), %rsi
subq $0x1, %rsi
movq 0x190(%rsp), %rdx
callq 0x31ac60
movl %eax, 0x18c(%rsp)
cmpl $0x0, 0x18c(%rsp)
jne 0x4eab5f
movq $0x0, 0x158(%rsp)
movq $0x0, 0x150(%rsp)
movq $0x0, 0x148(%rsp)
movq 0x158(%rsp), %rax
movq 0x170(%rsp), %rcx
subq $0x2, %rcx
cmpq %rcx, %rax
jae 0x4eaac4
movq 0x150(%rsp), %rax
cmpq 0x180(%rsp), %rax
jae 0x4eaa81
movq 0x148(%rsp), %rax
cmpq 0x170(%rsp), %rax
jae 0x4eaa81
movq 0xb0(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x158(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x50(%rsp), %rax
movb (%rax,%rcx), %al
movb %al, 0xe4(%rsp)
movq 0xa8(%rsp), %rax
movq %rax, 0x58(%rsp)
movq 0x158(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
movq %rax, %rcx
movq 0x58(%rsp), %rax
movb (%rax,%rcx), %al
movb %al, 0xe0(%rsp)
movsbl 0xe4(%rsp), %eax
cmpl $0x2d, %eax
jne 0x4ea798
movq 0xb0(%rsp), %rdi
movq 0x158(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
addq %rax, %rdi
leaq 0xb0bb5(%rip), %rsi     # 0x59b327
callq 0x19280
movq %rax, 0x140(%rsp)
imulq $0x3, 0x140(%rsp), %rax
addq 0x148(%rsp), %rax
movq %rax, 0x148(%rsp)
movsbl 0xe0(%rsp), %eax
cmpl $0x2d, %eax
jne 0x4ea7ef
movq 0xa8(%rsp), %rdi
movq 0x158(%rsp), %rax
movl $0x3, %ecx
xorl %edx, %edx
divq %rcx
addq %rax, %rdi
leaq 0xb0b5e(%rip), %rsi     # 0x59b327
callq 0x19280
movq %rax, 0x140(%rsp)
imulq $0x3, 0x140(%rsp), %rax
addq 0x150(%rsp), %rax
movq %rax, 0x150(%rsp)
movsbl 0xe0(%rsp), %eax
cmpl $0x2d, %eax
je 0x4ea9d5
movsbl 0xe4(%rsp), %eax
cmpl $0x2d, %eax
je 0x4ea9d5
movq 0xc8(%rsp), %rdi
movq 0xd8(%rsp), %rcx
addq 0x150(%rsp), %rcx
movl $0x4, %esi
leaq 0xb17ec(%rip), %rdx     # 0x59c021
movb $0x0, %al
callq 0x19b90
movq 0xc0(%rsp), %rdi
movq 0xd0(%rsp), %rcx
addq 0x148(%rsp), %rcx
movl $0x4, %esi
leaq 0xb17c1(%rip), %rdx     # 0x59c021
movb $0x0, %al
callq 0x19b90
movq 0xc8(%rsp), %rdi
leaq 0xd15be(%rip), %rsi     # 0x5bbe34
callq 0x19280
cmpq $0x3, %rax
jne 0x4ea9d3
movq 0xc0(%rsp), %rdi
leaq 0xd15a0(%rip), %rsi     # 0x5bbe34
callq 0x19280
cmpq $0x3, %rax
jne 0x4ea9d3
movq 0xd0(%rsp), %rax
movq 0x148(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0xe1(%rsp)
movq 0xd0(%rsp), %rax
movq 0x148(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0xe2(%rsp)
movq 0xd0(%rsp), %rax
movq 0x148(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0xe3(%rsp)
movq 0xd8(%rsp), %rax
movq 0x150(%rsp), %rcx
movb (%rax,%rcx), %al
movb %al, 0xe5(%rsp)
movq 0xd8(%rsp), %rax
movq 0x150(%rsp), %rcx
movb 0x1(%rax,%rcx), %al
movb %al, 0xe6(%rsp)
movq 0xd8(%rsp), %rax
movq 0x150(%rsp), %rcx
movb 0x2(%rax,%rcx), %al
movb %al, 0xe7(%rsp)
movq 0xa0(%rsp), %rdi
movb 0xe5(%rsp), %dl
movb 0xe6(%rsp), %cl
movb 0xe7(%rsp), %al
movq 0x190(%rsp), %r9
leaq 0xe4(%rsp), %r8
movsbl %dl, %esi
movsbl %cl, %edx
movsbl %al, %ecx
callq 0x1240c0
movl %eax, 0x18c(%rsp)
cmpl $0x0, 0x18c(%rsp)
jne 0x4ea9d1
movq 0xa0(%rsp), %rdi
movb 0xe1(%rsp), %dl
movb 0xe2(%rsp), %cl
movb 0xe3(%rsp), %al
movq 0x190(%rsp), %r9
leaq 0xe0(%rsp), %r8
movsbl %dl, %esi
movsbl %cl, %edx
movsbl %al, %ecx
callq 0x1240c0
movl %eax, 0x18c(%rsp)
jmp 0x4ea9d3
jmp 0x4ea9d5
movq 0x118(%rsp), %rdi
movw 0x18a(%rsp), %cx
movq 0x150(%rsp), %r8
movq 0x148(%rsp), %r9
movq 0x170(%rsp), %rbp
movq 0x180(%rsp), %r13
movq 0x160(%rsp), %r12
movq 0x1a0(%rsp), %r15
movq 0xe8(%rsp), %r14
movq 0x120(%rsp), %rbx
movq 0xd8(%rsp), %r11
movq 0xd0(%rsp), %r10
leaq 0xe0(%rsp), %rsi
leaq 0xe4(%rsp), %rdx
leaq 0xf0(%rsp), %rax
movswl %cx, %ecx
movq %rbp, (%rsp)
movq %r13, 0x8(%rsp)
movq %r12, 0x10(%rsp)
movq %r15, 0x18(%rsp)
movq %r14, 0x20(%rsp)
movq %rbx, 0x28(%rsp)
movq %r11, 0x30(%rsp)
movq %r10, 0x38(%rsp)
movq %rax, 0x40(%rsp)
callq 0x4eaef0
jmp 0x4eaa83
movq 0x158(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x158(%rsp)
movq 0x150(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x150(%rsp)
movq 0x148(%rsp), %rax
addq $0x3, %rax
movq %rax, 0x148(%rsp)
jmp 0x4ea696
movq 0xd8(%rsp), %rdi
leaq 0xd12cd(%rip), %rsi     # 0x5bbda0
movl $0x10d, %edx            # imm = 0x10D
callq 0xe88c0
movq 0xd0(%rsp), %rdi
leaq 0xd12b4(%rip), %rsi     # 0x5bbda0
movl $0x10e, %edx            # imm = 0x10E
callq 0xe88c0
movq 0xc8(%rsp), %rdi
leaq 0xd129b(%rip), %rsi     # 0x5bbda0
movl $0x10f, %edx            # imm = 0x10F
callq 0xe88c0
movq 0xc0(%rsp), %rdi
leaq 0xd1282(%rip), %rsi     # 0x5bbda0
movl $0x110, %edx            # imm = 0x110
callq 0xe88c0
movq 0xe8(%rsp), %rdi
leaq 0xd1269(%rip), %rsi     # 0x5bbda0
movl $0x111, %edx            # imm = 0x111
callq 0xe88c0
movq 0x120(%rsp), %rdi
leaq 0xd1250(%rip), %rsi     # 0x5bbda0
movl $0x112, %edx            # imm = 0x112
callq 0xe88c0
jmp 0x4eabf7
movq 0xd8(%rsp), %rdi
leaq 0xd1232(%rip), %rsi     # 0x5bbda0
movl $0x116, %edx            # imm = 0x116
callq 0xe88c0
movq 0xd0(%rsp), %rdi
leaq 0xd1219(%rip), %rsi     # 0x5bbda0
movl $0x117, %edx            # imm = 0x117
callq 0xe88c0
movq 0xc8(%rsp), %rdi
leaq 0xd1200(%rip), %rsi     # 0x5bbda0
movl $0x118, %edx            # imm = 0x118
callq 0xe88c0
movq 0xc0(%rsp), %rdi
leaq 0xd11e7(%rip), %rsi     # 0x5bbda0
movl $0x119, %edx            # imm = 0x119
callq 0xe88c0
movq 0xe8(%rsp), %rdi
leaq 0xd11ce(%rip), %rsi     # 0x5bbda0
movl $0x11a, %edx            # imm = 0x11A
callq 0xe88c0
movq 0x120(%rsp), %rdi
leaq 0xd11b5(%rip), %rsi     # 0x5bbda0
movl $0x11b, %edx            # imm = 0x11B
callq 0xe88c0
jmp 0x4eac12
jmp 0x4eabf9
movq 0x160(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x160(%rsp)
jmp 0x4ea194
cmpl $0x0, 0x18c(%rsp)
jne 0x4ead67
movq $0x0, 0x158(%rsp)
movq 0x158(%rsp), %rax
cmpq 0x180(%rsp), %rax
jae 0x4ead2e
movw $0x0, 0x188(%rsp)
movzwl 0x188(%rsp), %eax
cmpl $0x7, %eax
jge 0x4ead13
movq 0x118(%rsp), %rax
movzwl 0x188(%rsp), %ecx
movq (%rax,%rcx,8), %rax
imulq $0x18, 0x158(%rsp), %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
je 0x4eacf8
movq 0x118(%rsp), %rax
movzwl 0x188(%rsp), %ecx
movq (%rax,%rcx,8), %rax
movq 0x158(%rsp), %rcx
leaq (%rcx,%rcx,2), %rcx
movq 0x8(%rax,%rcx,8), %xmm1
movaps 0x2dc7f(%rip), %xmm0    # 0x518930
punpckldq %xmm0, %xmm1    # xmm1 = xmm1[0],xmm0[0],xmm1[1],xmm0[1]
movapd 0x2dc83(%rip), %xmm0    # 0x518940
subpd %xmm0, %xmm1
movaps %xmm1, %xmm0
unpckhpd %xmm1, %xmm1            # xmm1 = xmm1[1,1]
addsd %xmm0, %xmm1
movq 0x118(%rsp), %rax
movzwl 0x188(%rsp), %ecx
movq (%rax,%rcx,8), %rax
imulq $0x18, 0x158(%rsp), %rcx
addq %rcx, %rax
movsd (%rax), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, (%rax)
jmp 0x4eacfa
movw 0x188(%rsp), %ax
addw $0x1, %ax
movw %ax, 0x188(%rsp)
jmp 0x4eac4c
jmp 0x4ead15
movq 0x158(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x158(%rsp)
jmp 0x4eac2c
movq 0x118(%rsp), %rdi
movq 0x180(%rsp), %rcx
movq 0x1a0(%rsp), %r8
movq 0x190(%rsp), %r9
leaq 0xf0(%rsp), %rsi
movl $0x7, %edx
callq 0x4ee570
movl %eax, 0x18c(%rsp)
movq $0x0, 0x160(%rsp)
cmpq $0x7, 0x160(%rsp)
jae 0x4eadf3
movq $0x0, 0x158(%rsp)
movq 0x158(%rsp), %rax
cmpq 0x180(%rsp), %rax
jae 0x4eaddb
movq 0x118(%rsp), %rax
movq 0x160(%rsp), %rcx
movq (%rax,%rcx,8), %rax
imulq $0x18, 0x158(%rsp), %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
callq 0x81f80
movq 0x158(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x158(%rsp)
jmp 0x4ead8a
jmp 0x4eaddd
movq 0x160(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x160(%rsp)
jmp 0x4ead73
movq 0x118(%rsp), %rax
movq (%rax), %rdi
leaq 0xd0f9b(%rip), %rsi     # 0x5bbda0
movl $0x141, %edx            # imm = 0x141
callq 0xe88c0
movq 0x118(%rsp), %rdi
leaq 0xd0f82(%rip), %rsi     # 0x5bbda0
movl $0x141, %edx            # imm = 0x141
callq 0xe88c0
movq 0xa0(%rsp), %rdi
callq 0x1246a0
movq 0xf0(%rsp), %rdi
callq 0x11fd20
movq 0xf8(%rsp), %rdi
callq 0x11fd20
movq 0x100(%rsp), %rdi
callq 0x11fd20
movq 0x108(%rsp), %rdi
callq 0x11fd20
movq 0x110(%rsp), %rdi
callq 0x11fd20
movl 0x18c(%rsp), %eax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop