// File: /workspace/github_cpp_makefile_star2_O2/ncbi[P]amr/seq.cpp
// Function: Seq_sp::Align::Align(Seq_sp::Peptide const&, Seq_sp::Peptide const&, Seq_sp::SubstMat const&, double, double, unsigned long)
Align::Align (const Peptide &pep1,
	            const Peptide &pep2,
	            const SubstMat &substMat,
	            AlignScore gapOpenCost,
	            AlignScore gapCost,
	            size_t semiglobalMatchLen_min)
{
  ASSERT (! pep1. sparse);
  ASSERT (! pep2. sparse);
  ASSERT (gapOpenCost >= 0.0);
  ASSERT (gapCost >= 0.0);
  
  
#if 0
  // PAR
	int gap_open   = 1;  
	int gap_extent = 1;
	if (blosum62)
	{
	  gap_open   = -11;  
		gap_extent =  -2; 
	}
	else
	{
	  gap_open   = -8;  
		gap_extent = -2;  
	}
  ASSERT (gap_open <= 0);
  ASSERT (gap_extent < 0);

	CNWAligner al (pep1. seq, pep2. seq, blosum62 ? & NCBISM_Blosum62 : & NCBISM_Pam30);
  al. SetWg (gap_open);
  al. SetWs (gap_extent);
	al. SetEndSpaceFree (semiglobal, semiglobal, semiglobal, semiglobal);
	score = al. Run ();
  tr = al. GetTranscriptString ();  
  
	finish (pep1, pep2, semiglobal, match_len_min);
#endif


  const string seq1 ("-" + pep1. seq);
  const string seq2 ("-" + pep2. seq);


  Vector<Vector<Cell>> cells (seq1. size ());
  for (Vector<Cell>& rowVec : cells)
    rowVec = Vector<Cell> (seq2. size ());
  FFOR (size_t, row_, seq1. size () + seq2. size () - 1)
  {
    size_t row = row_;
    size_t col = 0;
    if (row_ >= seq1. size ())
    {
      row = seq1. size () - 1;
      col = row_ - row;
    }
    
    cells [0] [0]. scores [Cell::dirDiag] = 0.0;
    while (col < seq2. size ())
    {
      Cell::Score&    scores_cur  = cells [row] [col]. scores; 
      Cell::Dir_best& dirs_cur    = cells [row] [col]. dirs; 
      if (col)
      {
        AlignScore&    score_cur = scores_cur [Cell::dirLeft];
        Cell::Dir& dir_cur   = dirs_cur   [Cell::dirLeft];
        const Cell::Score& prev = cells [row] [col - 1]. scores;
        if (semiglobalMatchLen_min && (! row || row == seq1. size () - 1))
        {
          score_cur = prev [Cell::dirLeft];
          dir_cur = Cell::dirLeft;
          if (maximize (score_cur, prev [Cell::dirUp]))
            dir_cur = Cell::dirUp;
          if (maximize (score_cur, prev [Cell::dirDiag]))
            dir_cur = Cell::dirDiag;
        }
        else
        {
          score_cur = prev [Cell::dirUp];
          dir_cur = Cell::dirUp;
          if (maximize (score_cur, prev [Cell::dirDiag]))
            dir_cur = Cell::dirDiag;
          score_cur -= gapOpenCost;
          if (maximize (score_cur, prev [Cell::dirLeft]))
            dir_cur = Cell::dirLeft;
          score_cur -= gapCost;
        //score_cur= - gapCost + max (prev [Cell::dirLeft], max (prev [Cell::dirUp], prev [Cell::dirDiag]) - gapOpenCost);
        }
      }
      if (row)
      {
        AlignScore&    score_cur = scores_cur [Cell::dirUp];
        Cell::Dir& dir_cur   = dirs_cur   [Cell::dirUp];
        const Cell::Score& prev = cells [row - 1] [col]. scores;
        if (semiglobalMatchLen_min && (! col || col == seq2. size () - 1))
        {
          score_cur = prev [Cell::dirLeft];
          dir_cur = Cell::dirLeft;
          if (maximize (score_cur, prev [Cell::dirUp]))
            dir_cur = Cell::dirUp;
          if (maximize (score_cur, prev [Cell::dirDiag]))
            dir_cur = Cell::dirDiag;
        }
        else
        {
          score_cur = prev [Cell::dirLeft];
          dir_cur = Cell::dirLeft;
          if (maximize (score_cur, prev [Cell::dirDiag]))
            dir_cur = Cell::dirDiag;
          score_cur -= gapOpenCost;
          if (maximize (score_cur, prev [Cell::dirUp]))
            dir_cur = Cell::dirUp;
          score_cur -= gapCost;        
        //score_cur = - gapCost + max (prev [Cell::dirUp], max (prev [Cell::dirLeft], prev [Cell::dirDiag]) - gapOpenCost);
        }
      }
      if (row && col)
      {
        AlignScore&    score_cur = scores_cur [Cell::dirDiag];
        Cell::Dir& dir_cur   = dirs_cur   [Cell::dirDiag];
        const Cell::Score& prev = cells [row - 1] [col - 1]. scores;
        score_cur = prev [Cell::dirLeft];
        dir_cur = Cell::dirLeft;
        if (maximize (score_cur, prev [Cell::dirUp]))
          dir_cur = Cell::dirUp;
        if (maximize (score_cur, prev [Cell::dirDiag]))
          dir_cur = Cell::dirDiag;
        score_cur += substMat. sim [size_t (seq1 [row])] [size_t (seq2 [col])];
      #if 0
        score_cur =   substMat. sim [size_t (seq1 [row])] [size_t (seq2 [col])] 
                    + max (prev [Cell::dirUp], max (prev [Cell::dirLeft], prev [Cell::dirDiag]));
      #endif
      }
      
      if (! row)
        break;
      row--;
      col++;
    }
  }
  
  
  transformations. reserve (pep1. seq. size () + pep2. seq. size ());
  {
    size_t row = seq1. size () - 1;
    size_t col = seq2. size () - 1;
    Cell::Dir dir = Cell::dirUp;
    {
      const Cell::Score& scores_last = cells [row] [col]. scores;
      score = scores_last [Cell::dirUp];
      if (maximize (score, scores_last [Cell::dirLeft]))
        dir = Cell::dirLeft;
      if (maximize (score, scores_last [Cell::dirDiag]))
        dir = Cell::dirDiag;
    //score = max (score_last [Cell::dirUp], max (score_last [Cell::dirLeft], score_last [Cell::dirDiag]));
    }
    while (row || col)
    {
      char transformation = '\0';
      const Cell::Dir dir_new = cells [row] [col]. dirs [dir];
      switch (dir)
      {
        case Cell::dirUp:   transformation = '_'; 
                            deletions++;
                            ASSERT (row); 
                            row--; 
                            break;
        case Cell::dirLeft: transformation = '-';  
                            insertions++;
                            ASSERT (col); 
                            col--; 
                            break;
        case Cell::dirDiag: ASSERT (row); 
                            ASSERT (col);
                            {
                              const char c1 = pep1. seq [row - 1];
                              const char c2 = pep2. seq [col - 1];
                              if (   c1 == c2
                                  && ! isAmbigAa (c1)
                                  && ! isAmbigAa (c2)
                                 )
                              {
                                transformation = '|';
                                matches++;
                              }
                              else
                              {
                                transformation = ' ';
                                substitutions++;
                              }
                            }
                            row--; 
                            col--; 
                            break;
        default: ERROR;
      }
      ASSERT (transformation);
      transformations += transformation;
      dir = dir_new;
    }
  }
  reverse (transformations);  
#if 0
  PRINT (seq1);
  PRINT (seq2);
  PRINT (transformations);
  PRINT (pep2. seq. size ());
  PRINT (size2 ());
#endif
  ASSERT (pep1. seq. size () == size1 ());
  ASSERT (pep2. seq. size () == size2 ());
  
  
  stop1 = size1 ();
  stop2 = size2 ();
  if (semiglobalMatchLen_min)
  {
  	for (const char* c = & transformations [0]; *c == '-'; c++)
  	  start2++;
  	for (const char* c = & transformations [0]; *c == '_'; c++)
  	  start1++;
  	for (const char* c = & transformations [transformations. size () - 1]; stop2 && *c == '-'; c--)
  	  stop2--;
  	for (const char* c = & transformations [transformations. size () - 1]; stop1 && *c == '_'; c--)
  	  stop1--;
  }

		
	self_score1 = pep1. getSelfSimilarity (substMat, start1, stop1);
	self_score2 = pep2. getSelfSimilarity (substMat, start2, stop2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1e8, %rsp            # imm = 0x1E8
movq %r8, 0x1b0(%rsp)
movsd %xmm1, 0x1a8(%rsp)
movsd %xmm0, 0x1a0(%rsp)
movq %rcx, 0x198(%rsp)
movq %rdx, %r14
movq %rdi, %rbx
leaq 0x36674(%rip), %rax     # 0x88ab8
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r15
leaq 0x10(%rdi), %rax
movq %rax, 0x190(%rsp)
leaq 0x20(%rdi), %rax
movq %rax, 0x10(%rdi)
andq $0x0, 0x18(%rdi)
movb $0x0, 0x20(%rdi)
callq 0xc070
xorpd %xmm0, %xmm0
movupd %xmm0, 0x30(%rbx)
movupd %xmm0, 0x40(%rbx)
movupd %xmm0, 0x50(%rbx)
movupd %xmm0, 0x60(%rbx)
movq %rbx, 0x8(%rsp)
movupd %xmm0, 0x70(%rbx)
movq %rax, 0xf8(%rsp)
andl $0x0, (%rax)
movq %r15, 0x188(%rsp)
cmpb $0x1, 0x48(%r15)
je 0x531c0
movq %r14, 0x180(%rsp)
cmpb $0x1, 0x48(%r14)
je 0x5329a
xorpd %xmm0, %xmm0
movsd 0x1a0(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x53374
movsd 0x1a8(%rsp), %xmm1
ucomisd %xmm0, %xmm1
jb 0x5344e
movq 0x188(%rsp), %rax
leaq 0x28(%rax), %rdx
leaq 0xe260(%rip), %rsi      # 0x60761
leaq 0x160(%rsp), %rdi
movq %rdx, 0x1c8(%rsp)
callq 0x2a1c8
movq 0x180(%rsp), %rax
leaq 0x28(%rax), %rdx
leaq 0xe238(%rip), %rsi      # 0x60761
leaq 0x140(%rsp), %rdi
movq %rdx, 0x1c0(%rsp)
callq 0x2a1c8
movq 0x168(%rsp), %r15
movq %r15, %rax
shrq $0x3a, %rax
xorpd %xmm0, %xmm0
movapd %xmm0, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
jne 0x53528
testq %r15, %r15
je 0x52579
movq %r15, %rdi
shlq $0x5, %rdi
callq 0xc5b0
movq %rax, %rbx
jmp 0x5257b
xorl %ebx, %ebx
movq 0x8(%rsp), %rax
addq $0x30, %rax
movq %rax, 0x1b8(%rsp)
movq %rbx, 0x100(%rsp)
movq %rbx, 0x108(%rsp)
movq %r15, %rax
shlq $0x5, %rax
addq %rbx, %rax
movq %rax, 0x110(%rsp)
movq %rbx, %r14
subq $0x1, %r15
jb 0x525d3
movq %r14, %rdi
xorl %esi, %esi
callq 0x5afb4
movq (%r14), %rax
movq %rax, 0x8(%r14)
movb $0x0, 0x18(%r14)
addq $0x20, %r14
jmp 0x525b1
movq %r14, 0x108(%rsp)
movb $0x0, 0x118(%rsp)
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x5af5e
xorl %ebp, %ebp
movabsq $-0x10000000000000, %r12 # imm = 0xFFF0000000000000
cmpq %rbx, %r14
je 0x526ab
movq 0x148(%rsp), %r13
movabsq $0x333333333333334, %rax # imm = 0x333333333333334
cmpq %rax, %r13
jae 0x52d90
movq %r15, %rdi
movq %r13, %rsi
callq 0x5afb4
movq 0x10(%rsp), %rax
movq %rax, %rcx
subq $0x1, %r13
jb 0x5264f
movapd 0x1091f(%rip), %xmm0    # 0x62f60
movupd %xmm0, (%rcx)
movq %r12, 0x10(%rcx)
addq $0x28, %rcx
jmp 0x52633
movq %rcx, 0x18(%rsp)
movb %bpl, 0x28(%rsp)
movq 0x10(%rbx), %rdx
movq 0x20(%rsp), %rsi
movq %rsi, 0x10(%rbx)
movupd (%rbx), %xmm0
movq %rax, (%rbx)
movq %rcx, 0x8(%rbx)
movapd %xmm0, 0x30(%rsp)
movq %rdx, 0x40(%rsp)
xorpd %xmm0, %xmm0
movapd %xmm0, 0x10(%rsp)
andq $0x0, 0x20(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x5af5e
movb %bpl, 0x18(%rbx)
movq %r15, %rdi
callq 0x5af5e
addq $0x20, %rbx
jmp 0x525fc
movq 0x168(%rsp), %rax
movq 0x148(%rsp), %rcx
addq %rcx, %rax
decq %rax
movq %rax, 0x1d0(%rsp)
movq 0x198(%rsp), %rax
addq $0x8, %rax
movq %rax, 0x1e0(%rsp)
leaq 0x100(%rsp), %rbx
xorl %ecx, %ecx
cmpq 0x1d0(%rsp), %rcx
je 0x52a33
movq 0x168(%rsp), %rax
leaq -0x1(%rax), %rbp
movq %rcx, %r12
subq %rbp, %r12
cmpq %rax, %rcx
movl $0x0, %eax
cmovbq %rax, %r12
movq %rcx, 0x1d8(%rsp)
cmovbq %rcx, %rbp
movq %rbx, %rdi
xorl %esi, %esi
callq 0x53970
movq %rax, %rdi
xorl %esi, %esi
callq 0x53b4c
andq $0x0, 0x10(%rax)
cmpq 0x148(%rsp), %r12
jae 0x52a23
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x53970
movq %rax, %rdi
movq %r12, %rsi
callq 0x53b4c
movq %rax, %r15
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x53970
movq %rax, %rdi
movq %r12, %rsi
callq 0x53b4c
movq %rax, %r14
testq %r12, %r12
je 0x5286c
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x53970
leaq -0x1(%r12), %rsi
movq %rax, %rdi
callq 0x53b4c
cmpq $0x0, 0x1b0(%rsp)
je 0x52803
testq %rbp, %rbp
je 0x527b9
movq 0x168(%rsp), %rcx
decq %rcx
cmpq %rcx, %rbp
jne 0x52803
movsd (%rax), %xmm0
movsd %xmm0, (%r15)
andl $0x0, 0x18(%r14)
movsd 0x8(%rax), %xmm1
movsd (%r15), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x527e9
movsd %xmm1, (%r15)
movl $0x1, 0x18(%r14)
movsd (%r15), %xmm0
movsd 0x10(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5286c
movsd %xmm1, (%r15)
movl $0x2, 0x18(%r14)
jmp 0x5286c
movsd 0x8(%rax), %xmm0
movsd %xmm0, (%r15)
movl $0x1, 0x18(%r14)
movsd 0x10(%rax), %xmm1
movsd (%r15), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x52837
movsd %xmm1, (%r15)
movl $0x2, 0x18(%r14)
movsd (%r15), %xmm0
subsd 0x1a0(%rsp), %xmm0
movsd %xmm0, (%r15)
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x5285e
movsd %xmm1, (%r15)
andl $0x0, 0x18(%r14)
movsd (%r15), %xmm0
subsd 0x1a8(%rsp), %xmm0
movsd %xmm0, (%r15)
movq %rbp, %r13
subq $0x1, %r13
jb 0x52a23
movq %rbx, %rdi
movq %r13, %rsi
callq 0x53970
movq %rax, %rdi
movq %r12, %rsi
callq 0x53b4c
cmpq $0x0, 0x1b0(%rsp)
je 0x52902
testq %r12, %r12
je 0x528af
movq 0x148(%rsp), %rcx
decq %rcx
cmpq %rcx, %r12
jne 0x52902
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%r15)
andl $0x0, 0x1c(%r14)
movsd 0x8(%rax), %xmm1
movsd 0x8(%r15), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x528e3
movsd %xmm1, 0x8(%r15)
movl $0x1, 0x1c(%r14)
movsd 0x8(%r15), %xmm0
movsd 0x10(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x52973
movsd %xmm1, 0x8(%r15)
movl $0x2, 0x1c(%r14)
jmp 0x52973
movsd (%rax), %xmm0
movsd %xmm0, 0x8(%r15)
andl $0x0, 0x1c(%r14)
movsd 0x10(%rax), %xmm1
movsd 0x8(%r15), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x52936
movsd %xmm1, 0x8(%r15)
movl $0x2, 0x1c(%r14)
movsd 0x8(%r15), %xmm0
subsd 0x1a0(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
movsd 0x8(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x52964
movsd %xmm1, 0x8(%r15)
movl $0x1, 0x1c(%r14)
movsd 0x8(%r15), %xmm0
subsd 0x1a8(%rsp), %xmm0
movsd %xmm0, 0x8(%r15)
testq %r12, %r12
je 0x52a18
movq %rbx, %rdi
movq %r13, %rsi
callq 0x53970
leaq -0x1(%r12), %rsi
movq %rax, %rdi
callq 0x53b4c
movsd (%rax), %xmm0
movsd %xmm0, 0x10(%r15)
andl $0x0, 0x20(%r14)
movsd 0x8(%rax), %xmm1
movsd 0x10(%r15), %xmm0
ucomisd %xmm0, %xmm1
jbe 0x529c8
movsd %xmm1, 0x10(%r15)
movl $0x1, 0x20(%r14)
movsd 0x10(%r15), %xmm0
movsd 0x10(%rax), %xmm1
ucomisd %xmm0, %xmm1
jbe 0x529e7
movsd %xmm1, 0x10(%r15)
movl $0x2, 0x20(%r14)
movsd 0x10(%r15), %xmm0
movq 0x160(%rsp), %rax
movsbq (%rax,%rbp), %rax
movq 0x140(%rsp), %rcx
movsbq (%rcx,%r12), %rcx
shlq $0xa, %rax
addq 0x1e0(%rsp), %rax
addsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x10(%r15)
incq %r12
movq %r13, %rbp
jmp 0x52738
movq 0x1d8(%rsp), %rcx
incq %rcx
jmp 0x526e7
movq 0x180(%rsp), %rax
movq 0x30(%rax), %rsi
movq 0x188(%rsp), %rax
addq 0x30(%rax), %rsi
movq 0x190(%rsp), %rdi
callq 0xc910
movq 0x168(%rsp), %rbx
decq %rbx
movq 0x148(%rsp), %r15
leaq 0x100(%rsp), %rdi
movq %rbx, %rsi
callq 0x53970
decq %r15
movq %rax, %rdi
movq %r15, %rsi
callq 0x53b4c
movsd 0x8(%rax), %xmm0
movq 0x8(%rsp), %rcx
movsd %xmm0, 0x8(%rcx)
movsd (%rax), %xmm1
ucomisd %xmm0, %xmm1
movapd %xmm0, %xmm2
jbe 0x52ab4
movq 0x8(%rsp), %rcx
movsd %xmm1, 0x8(%rcx)
movapd %xmm1, %xmm2
xorl %r12d, %r12d
ucomisd %xmm0, %xmm1
setbe %cl
movsd 0x10(%rax), %xmm0
ucomisd %xmm2, %xmm0
jbe 0x52ad9
movq 0x8(%rsp), %rax
movsd %xmm0, 0x8(%rax)
pushq $0x2
popq %r12
jmp 0x52adc
movb %cl, %r12b
leaq 0x100(%rsp), %r14
movq %rbx, %rax
orq %r15, %rax
je 0x52c0c
movl %r12d, %ebp
movq %r14, %rdi
movq %rbx, %rsi
callq 0x53970
movq %rax, %rdi
movq %r15, %rsi
callq 0x53b4c
movl %ebp, %ecx
movl 0x18(%rax,%rcx,4), %r12d
testl %ebp, %ebp
je 0x52bb5
cmpl $0x1, %ebp
je 0x52b91
cmpl $0x2, %ebp
jne 0x52d9c
movq 0xf8(%rsp), %rax
andl $0x0, (%rax)
testq %rbx, %rbx
je 0x52f44
testq %r15, %r15
je 0x52e70
movq 0x1c8(%rsp), %rax
movq (%rax), %rax
movb -0x1(%rax,%rbx), %al
decq %rbx
leaq -0x1(%r15), %r13
movq 0x1c0(%rsp), %rcx
movq (%rcx), %rcx
cmpb -0x1(%rcx,%r15), %al
jne 0x52b84
movsbl %al, %ebp
movl %ebp, %edi
callq 0x5b377
testb %al, %al
jne 0x52b84
movl %ebp, %edi
callq 0x5b377
testb %al, %al
je 0x52bfd
movq 0x8(%rsp), %rax
incq 0x38(%rax)
movb $0x20, %al
jmp 0x52bda
movq 0x8(%rsp), %rax
incq 0x48(%rax)
movq 0xf8(%rsp), %rax
andl $0x0, (%rax)
testq %rbx, %rbx
je 0x53018
decq %rbx
movb $0x5f, %al
jmp 0x52bd7
movq 0x8(%rsp), %rax
incq 0x40(%rax)
movq 0xf8(%rsp), %rax
andl $0x0, (%rax)
testq %r15, %r15
je 0x530ec
decq %r15
movb $0x2d, %al
movq %r15, %r13
movq 0xf8(%rsp), %rcx
andl $0x0, (%rcx)
movzbl %al, %esi
movq 0x190(%rsp), %rdi
callq 0xc510
movq %r13, %r15
jmp 0x52ae4
movq 0x1b8(%rsp), %rax
incq (%rax)
movb $0x7c, %al
jmp 0x52bda
movq 0x190(%rsp), %rdi
callq 0x12680
movq 0xf8(%rsp), %rax
andl $0x0, (%rax)
movq 0x188(%rsp), %rax
movq 0x30(%rax), %rcx
movq 0x8(%rsp), %r8
movq 0x18(%r8), %rsi
movq %rsi, %rax
subq 0x40(%r8), %rax
cmpq %rax, %rcx
jne 0x53534
movq 0x180(%rsp), %rax
movq 0x30(%rax), %rax
movq %rsi, %rdx
subq 0x48(%r8), %rdx
cmpq %rdx, %rax
jne 0x53608
movq %rcx, 0x60(%r8)
movq %rax, 0x68(%r8)
cmpq $0x0, 0x1b0(%rsp)
je 0x52d0d
movq 0x10(%r8), %rdi
movq 0x58(%r8), %rdx
incq %rdx
movq %rdi, %r8
movq 0x8(%rsp), %r9
cmpb $0x2d, (%r8)
jne 0x52ca1
movq %rdx, 0x58(%r9)
incq %r8
incq %rdx
jmp 0x52c8f
movq 0x8(%rsp), %rdx
movq 0x50(%rdx), %rdx
movq %rdi, %r8
movq 0x8(%rsp), %r9
cmpb $0x5f, (%r8)
jne 0x52cc4
incq %rdx
movq %rdx, 0x50(%r9)
incq %r8
jmp 0x52cb2
addq %rdi, %rsi
decq %rsi
decq %rax
movq %rsi, %rdi
movq 0x8(%rsp), %r8
cmpq $-0x1, %rax
je 0x52d00
cmpb $0x2d, (%rdi)
jne 0x52d00
movq %rax, 0x68(%r8)
decq %rdi
decq %rax
jmp 0x52cd5
cmpb $0x5f, (%rsi)
jne 0x52d11
movq 0x8(%rsp), %rcx
movq %rax, 0x60(%rcx)
decq %rsi
movq %rax, %rcx
movq %rcx, %rax
subq $0x1, %rax
jae 0x52cec
xorl %ecx, %ecx
jmp 0x52d11
movq 0x50(%r8), %rdx
movq 0x188(%rsp), %rdi
movq 0x198(%rsp), %rsi
callq 0x50470
movq 0x8(%rsp), %rax
movsd %xmm0, 0x70(%rax)
movq 0x58(%rax), %rdx
movq 0x68(%rax), %rcx
movq 0x180(%rsp), %rdi
movq 0x198(%rsp), %rsi
callq 0x50470
movq 0x8(%rsp), %rax
movsd %xmm0, 0x78(%rax)
leaq 0x100(%rsp), %rdi
callq 0x53d32
leaq 0x140(%rsp), %rdi
callq 0xcbe8
leaq 0x160(%rsp), %rdi
callq 0xcbe8
addq $0x1e8, %rsp            # imm = 0x1E8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0xe611(%rip), %rdi      # 0x613a8
callq 0xc350
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0x10262(%rip), %rsi     # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x10aa, %esi           # imm = 0x10AA
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xb3e2(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x111e2(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xbaab(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0xc19f(%rip), %rdx      # 0x5eff6
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0x1018e(%rip), %rsi     # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x1095, %esi           # imm = 0x1095
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xb30e(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x1110e(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xb9d7(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0x1114a(%rip), %rdx     # 0x64075
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0x100ba(%rip), %rsi     # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x1094, %esi           # imm = 0x1094
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xb23a(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x1103a(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xb903(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0x11072(%rip), %rdx     # 0x64071
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xffe6(%rip), %rsi      # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x108c, %esi           # imm = 0x108C
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xb166(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x10f66(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xb82f(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0x10f9e(%rip), %rdx     # 0x64071
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xff12(%rip), %rsi      # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x1091, %esi           # imm = 0x1091
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xb092(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x10e92(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xb75b(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0x10ece(%rip), %rdx     # 0x64075
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xfe3e(%rip), %rsi      # 0x63012
leaq 0x30(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0xdbbe
leaq 0x98(%rsp), %rdi
movl $0xfee, %esi            # imm = 0xFEE
callq 0xe2d5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0xe26e
leaq 0xafbb(%rip), %rdx      # 0x5e1d1
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe24f
leaq 0x10dbb(%rip), %rsi     # 0x63fea
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0xdbbe
leaq 0xb684(%rip), %rdx      # 0x5e8cc
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe24f
leaq 0x140(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xe26e
leaq 0x10ddb(%rip), %rdx     # 0x64053
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xe24f
leaq 0x160(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xfd64(%rip), %rsi      # 0x63012
leaq 0x30(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0xdbbe
leaq 0x98(%rsp), %rdi
movl $0xfef, %esi            # imm = 0xFEF
callq 0xe2d5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0xe26e
leaq 0xaee1(%rip), %rdx      # 0x5e1d1
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe24f
leaq 0x10ce1(%rip), %rsi     # 0x63fea
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0xdbbe
leaq 0xb5aa(%rip), %rdx      # 0x5e8cc
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe24f
leaq 0x140(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xe26e
leaq 0x10d10(%rip), %rdx     # 0x64062
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xe24f
leaq 0x160(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xfc8a(%rip), %rsi      # 0x63012
leaq 0x30(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0xdbbe
leaq 0x98(%rsp), %rdi
movl $0xff0, %esi            # imm = 0xFF0
callq 0xe2d5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0xe26e
leaq 0xae07(%rip), %rdx      # 0x5e1d1
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe24f
leaq 0x10c07(%rip), %rsi     # 0x63fea
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0xdbbe
leaq 0xb4d0(%rip), %rdx      # 0x5e8cc
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe24f
leaq 0x140(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xe26e
leaq 0x10930(%rip), %rdx     # 0x63d5c
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xe24f
leaq 0x160(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xfbb0(%rip), %rsi      # 0x63012
leaq 0x30(%rsp), %rdi
leaq 0xd8(%rsp), %rdx
callq 0xdbbe
leaq 0x98(%rsp), %rdi
movl $0xff1, %esi            # imm = 0xFF1
callq 0xe2d5
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
leaq 0x98(%rsp), %rdx
callq 0xe26e
leaq 0xad2d(%rip), %rdx      # 0x5e1d1
leaq 0x100(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0xe24f
leaq 0x10b2d(%rip), %rsi     # 0x63fea
leaq 0x58(%rsp), %rdi
leaq 0xb8(%rsp), %rdx
callq 0xdbbe
leaq 0xb3f6(%rip), %rdx      # 0x5e8cc
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0xe24f
leaq 0x140(%rsp), %rdi
leaq 0x100(%rsp), %rsi
leaq 0x78(%rsp), %rdx
callq 0xe26e
leaq 0x10869(%rip), %rdx     # 0x63d6f
leaq 0x160(%rsp), %rdi
leaq 0x140(%rsp), %rsi
callq 0xe24f
leaq 0x160(%rsp), %rdi
callq 0x101d0
leaq 0xde79(%rip), %rdi      # 0x613a8
callq 0xc350
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xfaca(%rip), %rsi      # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x10b9, %esi           # imm = 0x10B9
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xac4a(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x10a4a(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xb313(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0x10a8a(%rip), %rdx     # 0x64079
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
callq 0xc6d0
testl %eax, %eax
jne 0x536dc
leaq 0xf9f6(%rip), %rsi      # 0x63012
leaq 0x58(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0xdbbe
leaq 0xd8(%rsp), %rdi
movl $0x10ba, %esi           # imm = 0x10BA
callq 0xe2d5
leaq 0x78(%rsp), %rdi
leaq 0x58(%rsp), %rsi
leaq 0xd8(%rsp), %rdx
callq 0xe26e
leaq 0xab76(%rip), %rdx      # 0x5e1d1
leaq 0x98(%rsp), %rdi
leaq 0x78(%rsp), %rsi
callq 0xe24f
leaq 0x10976(%rip), %rsi     # 0x63fea
leaq 0x120(%rsp), %rdi
leaq 0x6(%rsp), %rdx
callq 0xdbbe
leaq 0xb23f(%rip), %rdx      # 0x5e8cc
leaq 0xb8(%rsp), %rdi
leaq 0x120(%rsp), %rsi
callq 0xe24f
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0xb8(%rsp), %rdx
callq 0xe26e
leaq 0x109d5(%rip), %rdx     # 0x64098
leaq 0x10(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xe24f
leaq 0x10(%rsp), %rdi
callq 0x101d0
pushq $0x1
popq %rdi
callq 0xc6f0
jmp 0x53798
jmp 0x537a7
jmp 0x53798
jmp 0x537a7
jmp 0x53704
jmp 0x53716
jmp 0x53704
jmp 0x53716
jmp 0x53704
jmp 0x53716
movq %rax, %r14
leaq 0x160(%rsp), %rdi
callq 0xcbe8
jmp 0x53719
movq %rax, %r14
leaq 0x140(%rsp), %rdi
callq 0xcbe8
jmp 0x5373b
jmp 0x537dd
jmp 0x537dd
jmp 0x53738
jmp 0x53738
jmp 0x53738
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0xcbe8
jmp 0x5375a
jmp 0x53819
jmp 0x53819
jmp 0x53757
jmp 0x53757
jmp 0x53757
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0xcbe8
jmp 0x53779
jmp 0x53850
jmp 0x53850
jmp 0x53776
jmp 0x53776
jmp 0x53776
movq %rax, %r14
leaq 0x100(%rsp), %rdi
callq 0xcbe8
jmp 0x537c9
jmp 0x53798
jmp 0x537a7
jmp 0x53798
jmp 0x537a7
jmp 0x53798
jmp 0x537a7
jmp 0x53798
jmp 0x537a7
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xcbe8
jmp 0x537aa
movq %rax, %r14
leaq 0x30(%rsp), %rdi
callq 0xcbe8
jmp 0x537e0
jmp 0x5387c
jmp 0x5387c
jmp 0x537c6
jmp 0x537c6
jmp 0x537c6
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0xcbe8
jmp 0x53802
jmp 0x537dd
jmp 0x537dd
jmp 0x537dd
jmp 0x537dd
movq %rax, %r14
leaq 0xb8(%rsp), %rdi
callq 0xcbe8
jmp 0x5381c
jmp 0x53893
jmp 0x53893
jmp 0x537ff
jmp 0x537ff
jmp 0x537ff
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0xcbe8
jmp 0x5383e
jmp 0x53819
jmp 0x53819
jmp 0x53819
jmp 0x53819
movq %rax, %r14
leaq 0x120(%rsp), %rdi
callq 0xcbe8
jmp 0x53853
jmp 0x538bd
jmp 0x538bd
jmp 0x5383b
jmp 0x5383b
jmp 0x5383b
movq %rax, %r14
leaq 0x30(%rsp), %rdi
jmp 0x53955
jmp 0x53850
jmp 0x53850
jmp 0x53850
jmp 0x53850
movq %rax, %r14
leaq 0x98(%rsp), %rdi
callq 0xcbe8
jmp 0x5387f
jmp 0x53930
jmp 0x53930
jmp 0x538ad
jmp 0x538ad
jmp 0x538ad
jmp 0x538ad
jmp 0x5387c
jmp 0x5387c
jmp 0x5387c
jmp 0x5387c
movq %rax, %r14
leaq 0x78(%rsp), %rdi
callq 0xcbe8
jmp 0x53896
jmp 0x53893
jmp 0x53893
jmp 0x53893
jmp 0x53893
movq %rax, %r14
leaq 0xd8(%rsp), %rdi
callq 0xcbe8
jmp 0x538c0
movq %rax, %r14
jmp 0x5394d
movq %rax, %r14
jmp 0x5395a
jmp 0x538bd
jmp 0x538bd
jmp 0x538bd
jmp 0x538bd
movq %rax, %r14
leaq 0x58(%rsp), %rdi
callq 0xcbe8
jmp 0x53933
movq %rax, %r14
jmp 0x53910
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
movq %rax, %rdi
callq 0xc290
movq %rbx, %rdi
movq %r14, %rsi
callq 0x5af8e
callq 0xc880
movq %rax, %r14
callq 0xc9c0
leaq 0x100(%rsp), %rdi
callq 0x5af76
leaq 0x10(%rsp), %rdi
callq 0x5af5e
jmp 0x53940
movq %rax, %rdi
callq 0xdf79
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
jmp 0x53930
movq %rax, %r14
leaq 0x100(%rsp), %rdi
callq 0x53d32
leaq 0x140(%rsp), %rdi
callq 0xcbe8
leaq 0x160(%rsp), %rdi
callq 0xcbe8
movq 0x190(%rsp), %rdi
callq 0xcbe8
movq %r14, %rdi
callq 0xcaa0
nop