// File: /workspace/github_c_makefile_star2_O3/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 $0x138, %rsp            # imm = 0x138
movq %rdx, %rbx
movq %rsi, 0xa8(%rsp)
movq %rdi, %r13
xorl %edi, %edi
callq 0x11e038
movq %rax, 0x98(%rsp)
testq %rax, %rax
je 0x32d633
testq %rbx, %rbx
je 0x32c8d8
movq %rbx, %rdi
callq 0xfcc32
testb %al, %al
jne 0x32d638
movq %rbx, 0x78(%rsp)
movq 0x120(%r13), %rdi
callq 0x11b0a1
movq %rax, 0xa0(%rsp)
movq 0x120(%r13), %rdi
callq 0x11b0ca
movq %rax, %r15
leaq 0xb97f7(%rip), %rbx     # 0x3e60fe
movl $0x38, %edi
movq %rbx, %rsi
movl $0x58, %edx
callq 0x104226
movq %rax, %rbp
leaq (,%r15,8), %r14
movq %r14, %rdi
movq %r15, 0x10(%rsp)
subq %r15, %rdi
movl $0x18, %esi
movq %rbx, %rdx
movl $0x58, %ecx
callq 0x10436a
movq %rax, (%rbp)
leaq (%r14,%r14,2), %rcx
addq %rcx, %rax
movl $0x1, %edx
movq %rax, (%rbp,%rdx,8)
incq %rdx
addq %rcx, %rax
cmpq $0x7, %rdx
jne 0x32c951
xorl %ebx, %ebx
cmpq $0x0, 0x10(%rsp)
je 0x32c993
movl $0x10, %r14d
movq 0x10(%rsp), %r15
movl $0x8, %edi
callq 0xd214c
movq (%rbp,%rbx,8), %rcx
movq %rax, (%rcx,%r14)
addq $0x18, %r14
decq %r15
jne 0x32c977
incq %rbx
cmpq $0x7, %rbx
jne 0x32c964
callq 0x11be10
movq %rax, 0x108(%rsp)
movq %rax, 0xd8(%rsp)
callq 0x11be10
movq %rax, %rbx
movq %rax, 0xe0(%rsp)
callq 0x11be10
movq %rax, 0xe8(%rsp)
callq 0x11be10
movq %rax, 0xf0(%rsp)
callq 0x11be10
movq %rax, 0xf8(%rsp)
cmpq $0x0, 0xa8(%rsp)
je 0x32d469
movq %rbx, 0xb0(%rsp)
decq 0xa0(%rsp)
leaq 0xf0(%r13), %rax
movq %rax, 0xb8(%rsp)
leaq 0xb96e1(%rip), %rbx     # 0x3e60fe
movq $0x0, 0x28(%rsp)
xorl %r12d, %r12d
movq 0x10(%rsp), %r14
movq %rbp, 0x70(%rsp)
movq %r13, 0x50(%rsp)
movl $0x8, %esi
movq %r14, %rdi
movq %rbx, %rdx
movl $0x71, %ecx
callq 0x10436a
movq %rax, 0x58(%rsp)
movl $0x8, %esi
movq %r14, %rdi
movq %rbx, %rdx
movl $0x72, %ecx
callq 0x10436a
movq %rax, 0x30(%rsp)
movl $0x4, %edi
movl $0x1, %esi
movq %rbx, %rdx
movl $0x73, %ecx
callq 0x10436a
movq %rax, 0x88(%rsp)
movl $0x4, %edi
movl $0x1, %esi
movq %rbx, %rdx
movl $0x74, %ecx
callq 0x10436a
movq %rax, 0x90(%rsp)
movq 0x170(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, 0x118(%rsp)
movq 0x178(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, 0xc0(%rsp)
movq 0x100(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
movq (%rax), %rdi
callq 0x32d63d
movw %ax, 0x26(%rsp)
movq 0x118(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
movq (%rax), %r14
movq 0x110(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
subq (%rax), %r14
movq 0x168(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0x172f0
movq %rax, 0x80(%rsp)
movq 0x158(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0x17930
movq %rax, %rbp
movq 0x160(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rax, %rdi
callq 0x17930
movq %rax, %r15
subq %rbp, %r15
movb $0x1, %bl
movq %r14, %rax
subq %r15, %rax
je 0x32cb96
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
imulq %rcx, %rax
movabsq $0x5555555555555556, %rcx # imm = 0x5555555555555556
cmpq %rcx, %rax
setb %bl
movq 0x118(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
leaq 0x1(%r15), %rbp
movq 0x10(%rsp), %rcx
cmpq %rcx, (%rax)
ja 0x32cbc1
cmpq 0x80(%rsp), %rbp
jne 0x32cbc1
testb %bl, %bl
jne 0x32cbf0
movq 0x140(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq 0x78(%rsp), %rdi
leaq 0xb953e(%rip), %rsi     # 0x3e611a
movq %rax, %rdx
xorl %eax, %eax
callq 0xfcb67
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movq %rax, 0x28(%rsp)
movq %rbp, 0x18(%rsp)
movq %r14, 0x38(%rsp)
leaq 0x2(%r14), %rbp
addq $0x2, %r15
movl $0x1, %esi
movq %rbp, %rdi
leaq 0xb94ed(%rip), %rbx     # 0x3e60fe
movq %rbx, %rdx
movl $0xa3, %ecx
callq 0x10436a
movq %rax, %r14
movq 0x110(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
movq (%rax), %rcx
addq 0xa0(%rsp), %rcx
movq %r14, 0x68(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
leaq 0x9be5c(%rip), %rbp     # 0x3c8aa9
movq %rbp, %rdx
xorl %eax, %eax
callq 0x17c60
movl $0x1, %esi
movq %r15, %rdi
movq %rbx, %rdx
movl $0xab, %ecx
callq 0x10436a
movq %rax, %rbx
movq 0x168(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %rbx, 0x60(%rsp)
movq %rbx, %rdi
movq %r15, %rsi
movq %rbp, %rdx
movq %rax, %rcx
xorl %eax, %eax
callq 0x17c60
movq 0x100(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
cmpq $0x0, (%rax)
jns 0x32ccda
cmpl $0x0, 0x28(%rsp)
movq 0x70(%rsp), %rbp
movq 0x30(%rsp), %r15
jne 0x32cce4
movq 0x38(%rsp), %rsi
incq %rsi
movq 0x68(%rsp), %rdi
movq 0x78(%rsp), %rdx
callq 0x2160d0
movq %rax, 0x28(%rsp)
jmp 0x32cce4
movq 0x70(%rsp), %rbp
movq 0x30(%rsp), %r15
movq 0x108(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
cmpq $0x0, (%rax)
jns 0x32cd1c
movq 0x28(%rsp), %r14
testl %r14d, %r14d
jne 0x32cd21
movq 0x60(%rsp), %rdi
movq 0x18(%rsp), %rsi
movq 0x78(%rsp), %rdx
callq 0x2160d0
movl %eax, %r14d
jmp 0x32cd21
movq 0x28(%rsp), %r14
testl %r14d, %r14d
movq 0x80(%rsp), %rax
jne 0x32d4f6
movq %rax, %rcx
addq $-0x2, %rcx
movq %rcx, 0x128(%rsp)
je 0x32d3c2
leaq -0x3(%rax), %rcx
movq %rcx, 0x110(%rsp)
movzwl 0x26(%rsp), %ecx
movq %rcx, 0x100(%rsp)
movq $0x0, 0x28(%rsp)
xorl %esi, %esi
xorl %r14d, %r14d
xorl %edi, %edi
movq %r12, 0x40(%rsp)
movq 0x10(%rsp), %rcx
cmpq %rcx, %r14
jae 0x32d39c
cmpq %rax, %rdi
jae 0x32d39c
movq %rsi, %rax
movabsq $-0x5555555555555555, %rcx # imm = 0xAAAAAAAAAAAAAAAB
mulq %rcx
movq %rdx, %r15
shrq %r15
movq 0x118(%rsp), %rcx
movb (%rcx,%r15), %al
movb %al, 0xf(%rsp)
movq 0xc0(%rsp), %rdx
movb (%rdx,%r15), %bpl
movb %bpl, 0xe(%rsp)
cmpb $0x2d, %al
movq %rsi, 0xc8(%rsp)
jne 0x32cdfc
movq %r13, %r12
movq %rdi, %r13
leaq (%rcx,%r15), %rdi
leaq 0x9afca(%rip), %rsi     # 0x3c7daa
callq 0x172c0
leaq (%rax,%rax,2), %rbx
addq %r13, %rbx
movq %r12, %r13
movq 0x40(%rsp), %r12
cmpb $0x2d, %bpl
je 0x32ce09
jmp 0x32ce27
cmpb $0x2d, %bpl
jne 0x32cf0c
movq %rdi, %rbx
addq 0xc0(%rsp), %r15
movq %r15, %rdi
leaq 0x9af8f(%rip), %rsi     # 0x3c7daa
callq 0x172c0
leaq (%rax,%rax,2), %rax
addq %rax, %r14
movq %rbx, 0x48(%rsp)
movq 0x110(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
movq (%rax), %rbx
movq 0x118(%r13), %rdi
movq %r12, %rsi
callq 0xd2207
movq (%rax), %rax
movq %rax, 0xd0(%rsp)
movb 0xe(%rsp), %al
movswl 0x26(%rsp), %ecx
cmpb $0x2a, %al
movq %r14, 0x18(%rsp)
movl %ecx, 0x38(%rsp)
movq %rbx, 0x120(%rsp)
jne 0x32ceb9
xorl %ebx, %ebx
movq 0x30(%rsp), %rbp
movq %r14, %r15
movq 0x58(%rsp), %r14
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 0x32d669
movl 0x38(%rsp), %ecx
incl %ebx
cmpw $0x3, %bx
jne 0x32ce85
jmp 0x32d161
movb 0xf(%rsp), %dl
cmpb $0x2a, %dl
jne 0x32d016
xorl %ebx, %ebx
movq 0x30(%rsp), %rbp
movq %r14, %r15
movq %r13, %r14
movq 0x58(%rsp), %r13
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 0x32d669
movl 0x38(%rsp), %ecx
incl %ebx
cmpw $0x3, %bx
jne 0x32ced8
jmp 0x32d161
movq 0x68(%rsp), %rax
movq %r14, 0x18(%rsp)
leaq (%rax,%r14), %r15
movl $0x4, %esi
movq 0x88(%rsp), %r14
movq %rdi, %r13
movq %r14, %rdi
leaq 0x9bb75(%rip), %rbx     # 0x3c8aa9
movq %rbx, %rdx
movq %r15, %rcx
xorl %eax, %eax
callq 0x17c60
movq 0x60(%rsp), %rax
movq %r13, 0x48(%rsp)
leaq (%rax,%r13), %rbp
movl $0x4, %esi
movq 0x90(%rsp), %r13
movq %r13, %rdi
movq %rbx, %rdx
movq %rbp, %rcx
xorl %eax, %eax
callq 0x17c60
movq %r14, %rdi
leaq 0xb921c(%rip), %rbx     # 0x3e6192
movq %rbx, %rsi
callq 0x172c0
cmpq $0x3, %rax
jne 0x32d0c1
movq %r13, %rdi
movq %rbx, %rsi
callq 0x172c0
cmpq $0x3, %rax
movq 0x50(%rsp), %r13
jne 0x32d3b8
movb (%rbp), %al
movb %al, 0x38(%rsp)
movb 0x1(%rbp), %r12b
movb 0x2(%rbp), %bpl
movsbl (%r15), %esi
movsbl 0x1(%r15), %edx
movsbl 0x2(%r15), %ecx
movq 0x98(%rsp), %r15
movq %r15, %rdi
leaq 0xf(%rsp), %r8
movq 0x78(%rsp), %rbx
movq %rbx, %r9
callq 0x11e072
movq %rax, 0x28(%rsp)
testl %eax, %eax
movq 0x18(%rsp), %r14
jne 0x32d00c
movsbl 0x38(%rsp), %esi
movsbl %r12b, %edx
movsbl %bpl, %ecx
movq %r15, %rdi
leaq 0xe(%rsp), %r8
movq %rbx, %r9
callq 0x11e072
movq %rax, 0x28(%rsp)
movq 0x40(%rsp), %r12
jmp 0x32ce2c
cmpb %dl, %al
jne 0x32d0d0
movq 0x60(%rsp), %rax
movq 0x48(%rsp), %rcx
leaq (%rax,%rcx), %r15
movq 0x68(%rsp), %rax
leaq (%rax,%r14), %rbx
callq 0x17110
movq %rax, %rbp
xorl %r12d, %r12d
movq 0x50(%rsp), %r13
movl 0x38(%rsp), %ecx
movq (%rbp), %rax
movsbq (%r15,%r12), %rdx
movl (%rax,%rdx,4), %esi
movsbq (%rbx,%r12), %rdx
cmpl (%rax,%rdx,4), %esi
sete %al
xorb 0x1e9(%r13), %al
jne 0x32d0b3
movsd 0x180(%r13), %xmm0
movzwl %r12w, %eax
movl %eax, (%rsp)
movq %r13, %rdi
movq 0x58(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x40(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0x32d669
movl 0x38(%rsp), %ecx
movsd 0xf0(%r13), %xmm0
addsd 0x1917e(%rip), %xmm0    # 0x346228
movsd %xmm0, 0xf0(%r13)
incq %r12
cmpq $0x3, %r12
jne 0x32d049
jmp 0x32d161
movq 0x18(%rsp), %r14
movq 0x50(%rsp), %r13
jmp 0x32ce2c
callq 0x17110
movq %rax, %r15
movq 0x60(%rsp), %rax
movq 0x48(%rsp), %rcx
leaq (%rax,%rcx), %rbx
movq 0x68(%rsp), %rax
leaq (%rax,%r14), %r12
xorl %ebp, %ebp
movl 0x38(%rsp), %ecx
movq (%r15), %rax
movsbq (%rbx,%rbp), %rdx
movl (%rax,%rdx,4), %esi
movsbq (%r12,%rbp), %rdx
cmpl (%rax,%rdx,4), %esi
je 0x32d158
movq 0x50(%rsp), %r14
movsd 0x188(%r14), %xmm0
movzwl %bp, %eax
movl %eax, (%rsp)
movq %r14, %rdi
movq 0x58(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq 0x40(%rsp), %r8
movq 0x18(%rsp), %r9
callq 0x32d669
movl 0x38(%rsp), %ecx
movsd 0xf8(%r14), %xmm0
addsd 0x190d9(%rip), %xmm0    # 0x346228
movsd %xmm0, 0xf8(%r14)
incq %rbp
cmpq $0x3, %rbp
jne 0x32d0f5
movq 0x48(%rsp), %rdi
cmpq %rdi, 0x110(%rsp)
jne 0x32d338
movq 0x50(%rsp), %r13
movsd 0xf8(%r13), %xmm0
ucomisd 0x3ec06(%rip), %xmm0    # 0x36bd90
movq 0x70(%rsp), %rbp
movq 0x10(%rsp), %rcx
movsd 0x1908c(%rip), %xmm2    # 0x346228
movq 0x30(%rsp), %r15
movq 0x18(%rsp), %r14
jne 0x32d1bf
jp 0x32d1bf
movabsq $0x3ff0000000000000, %rax # imm = 0x3FF0000000000000
movq %rax, 0xf8(%r13)
movapd %xmm2, %xmm0
movq 0xb8(%rsp), %rax
movsd (%rax), %xmm1
divsd %xmm0, %xmm1
ucomisd %xmm1, %xmm2
movq 0x40(%rsp), %r12
ja 0x32d37c
movq 0x120(%rsp), %rbx
leaq -0x1(%rbx), %rbp
movq 0x130(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq 0x108(%rsp), %rdi
movq %rax, %rsi
callq 0x11bee9
movq 0x140(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq 0xb0(%rsp), %rdi
movq %rax, %rsi
callq 0x11bee9
movq 0xe8(%rsp), %r15
movq 0x138(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %r15, %rdi
movq %rax, %rsi
callq 0x11bee9
movq 0xf0(%rsp), %r15
movq 0x158(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %r15, %rdi
movq %rax, %rsi
callq 0x11bee9
movq 0xf8(%rsp), %r15
movq 0x160(%r13), %rdi
movq %r12, %rsi
callq 0x11bfb3
movq %r15, %rdi
movq %rax, %rsi
callq 0x11bee9
movq 0xe0(%rsp), %rdi
movq %rdi, 0xb0(%rsp)
callq 0x11c131
decq %rax
movq %rax, 0x130(%rsp)
cmpq 0xd0(%rsp), %rbp
jae 0x32d368
movq 0x100(%rsp), %r14
leaq (%rbx,%rbx,2), %rbx
addq $-0x3, %rbx
movq 0x70(%rsp), %r15
movq 0x30(%rsp), %r13
movq 0x58(%rsp), %r12
movsd (%r12,%rbp,8), %xmm0
movq (%r15,%r14,8), %rax
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
movq (%r13,%rbp,8), %rcx
addq %rcx, 0x8(%rax,%rbx,8)
movq 0x10(%rax,%rbx,8), %rdi
movl $0x8, %edx
leaq 0x130(%rsp), %rsi
callq 0xd2410
incq %rbp
addq $0x3, %rbx
cmpq %rbp, 0xd0(%rsp)
jne 0x32d2db
movq %r15, %rbp
movq 0x40(%rsp), %r12
movq %r13, %r15
movq 0x50(%rsp), %r13
movq 0x18(%rsp), %r14
jmp 0x32d372
movq 0x70(%rsp), %rbp
movq 0x10(%rsp), %rcx
movq 0x40(%rsp), %r12
movq 0x30(%rsp), %r15
movq 0x50(%rsp), %r13
movq 0x80(%rsp), %rax
movq 0xc8(%rsp), %rsi
movq 0x18(%rsp), %r14
jmp 0x32d39c
movq 0x70(%rsp), %rbp
movq 0x30(%rsp), %r15
movq 0x48(%rsp), %rdi
movq 0x10(%rsp), %rcx
movq 0xb8(%rsp), %rax
xorpd %xmm0, %xmm0
movupd %xmm0, (%rax)
movq 0x80(%rsp), %rax
movq 0xc8(%rsp), %rsi
addq $0x3, %rsi
addq $0x3, %r14
addq $0x3, %rdi
cmpq 0x128(%rsp), %rsi
jb 0x32cd7a
jmp 0x32d3d0
movq 0x18(%rsp), %r14
jmp 0x32ce2c
movq $0x0, 0x28(%rsp)
movq 0x10(%rsp), %rcx
movq %rcx, %r14
movq 0x68(%rsp), %rdi
leaq 0xb8d1f(%rip), %rbx     # 0x3e60fe
movq %rbx, %rsi
movl $0x10d, %edx            # imm = 0x10D
callq 0x1045eb
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
movl $0x10e, %edx            # imm = 0x10E
callq 0x1045eb
movq 0x88(%rsp), %rdi
movq %rbx, %rsi
movl $0x10f, %edx            # imm = 0x10F
callq 0x1045eb
movq 0x90(%rsp), %rdi
movq %rbx, %rsi
movl $0x110, %edx            # imm = 0x110
callq 0x1045eb
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movl $0x111, %edx            # imm = 0x111
callq 0x1045eb
movq %r15, %rdi
movq %rbx, %rsi
movl $0x112, %edx            # imm = 0x112
callq 0x1045eb
incq %r12
cmpq 0xa8(%rsp), %r12
jne 0x32ca38
movq 0x28(%rsp), %r14
testl %r14d, %r14d
jne 0x32d56d
movq 0x10(%rsp), %rcx
testq %rcx, %rcx
movq 0x78(%rsp), %r9
je 0x32d4d9
xorl %eax, %eax
movq 0x1a45e(%rip), %xmm0    # 0x3478e0
movapd 0x1a466(%rip), %xmm1    # 0x3478f0
leaq (%rax,%rax,2), %r8
xorl %edx, %edx
movq (%rbp,%rdx,8), %rdi
movq 0x8(%rdi,%r8,8), %rsi
testq %rsi, %rsi
je 0x32d4c8
leaq (%rdi,%r8,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 0x32d490
incq %rax
cmpq %rcx, %rax
jne 0x32d48a
leaq 0xd8(%rsp), %rsi
movl $0x7, %edx
movq %rbp, %rdi
movq %r13, %r8
callq 0x32f034
movl %eax, %r14d
jmp 0x32d56d
leaq 0xb8c01(%rip), %rbx     # 0x3e60fe
movq 0x68(%rsp), %rdi
movq %rbx, %rsi
movl $0x116, %edx            # imm = 0x116
callq 0x1045eb
movq 0x60(%rsp), %rdi
movq %rbx, %rsi
movl $0x117, %edx            # imm = 0x117
callq 0x1045eb
movq 0x88(%rsp), %rdi
movq %rbx, %rsi
movl $0x118, %edx            # imm = 0x118
callq 0x1045eb
movq 0x90(%rsp), %rdi
movq %rbx, %rsi
movl $0x119, %edx            # imm = 0x119
callq 0x1045eb
movq 0x58(%rsp), %rdi
movq %rbx, %rsi
movl $0x11a, %edx            # imm = 0x11A
callq 0x1045eb
movq %r15, %rdi
movq %rbx, %rsi
movl $0x11b, %edx            # imm = 0x11B
callq 0x1045eb
movq %r14, %r13
xorl %ebx, %ebx
movq 0x98(%rsp), %r12
cmpq $0x0, 0x10(%rsp)
je 0x32d5a4
movl $0x10, %r14d
movq 0x10(%rsp), %r15
movq (%rbp,%rbx,8), %rax
movq (%rax,%r14), %rdi
callq 0xd2938
addq $0x18, %r14
decq %r15
jne 0x32d58d
incq %rbx
cmpq $0x7, %rbx
jne 0x32d57a
movq (%rbp), %rdi
leaq 0xb8b46(%rip), %rbx     # 0x3e60fe
movq %rbx, %rsi
movl $0x141, %edx            # imm = 0x141
callq 0x1045eb
movq %rbp, %rdi
movq %rbx, %rsi
movl $0x141, %edx            # imm = 0x141
callq 0x1045eb
movq %r12, %rdi
callq 0x11e318
movq 0xd8(%rsp), %rdi
callq 0x11c144
movq 0xe0(%rsp), %rdi
callq 0x11c144
movq 0xe8(%rsp), %rdi
callq 0x11c144
movq 0xf0(%rsp), %rdi
callq 0x11c144
movq 0xf8(%rsp), %rdi
callq 0x11c144
movl %r13d, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x95ce9
callq 0x95cb2