// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/align.c
// Function: Gap_Improver
void Gap_Improver(Alignment *aln, Work_Data *ework)
{ _Work_Data *work = (_Work_Data *) ework;
  int        *F, *H;
  int        *f, *h;

  char  *A, *B;
  int    x;
  int    p, q;
  int    d, m;
  int   *t, T;
  int    Fpos, Lpos, Fdag, Hamm, Gaps, Diag;
  int    passes;
 
  A = aln->aseq-1;
  B = aln->bseq-1;
  t = (int *) aln->path->trace;
  T = aln->path->tlen;
  F = (int *) work->vector;

  d = aln->path->abpos - aln->path->bbpos;
  q = t[0];
  x = 0;
  while (x < T)
    { p = q;
      m = x;
      Fdag = d;
      Fpos = p;
      Hamm = 0;
      Gaps = 1;
      while (1)
        { x += 1;
          q = 0;
          if (x >= T || (q = t[x]) != p)
            { m = x-m;
              if (p < 0)
                { d -= m;
                  if (q >= 0)
                    break;
                  if (p-q >= LONG_SNAKE)
                    break;
                  Hamm += hamming(A-p,B-(d+p),p-q);
                }
              else
                { d += m;
                  if (q <= 0)
                    break;
                  if (q-p >= LONG_SNAKE)
                    break;
                  Hamm += hamming(A+(p+d),B+p,q-p);
                }
              Gaps += 1;
              p = q;
              m = x;
            }
        }
      if (Gaps == 1)
        continue;
      Lpos = p;
      Diag = abs(Fdag-d)+1;

      // Process box

      p = Diag*(Gaps+Hamm+1)*sizeof(int);
      if (p > work->vecmax)
        { if (enlarge_vector(work,p))
            EXIT (1);
          F = (int *) work->vector;
        }
      H = F + Diag;

#ifdef BOX_STATS
      { int hgt  = Gaps+Hamm+1;
        int area = Diag*hgt;
        if (area > MaxBxArea)
          MaxBxArea = area;
        if (Diag > MaxBxWidth)
          MaxBxWidth = Diag;
        if (hgt > MaxBxHeight)
          MaxBxHeight = hgt;
        NumBx += 1;
        SumBx += area;
        if (area >= 10000)
          BxHist[100] += 1;
        else
          BxHist[area/100] += 1;
      }
#endif
#ifdef DEBUG_BOX
      printf("Box:  %5d :: %4d x %3d (%2d+%2d)  :: %5d .. %5d  %6d .. %6d\n",
             (Gaps+Hamm+1)*Diag,abs(Fpos-Lpos),Diag,Hamm,Gaps,Fpos,Lpos,Fdag,d);
      fflush(stdout);
#endif

      if (Fpos < 0)
        { Fpos = -Fpos;
          Lpos = -Lpos;

          while (A[Fpos-1] != B[(Fpos-Fdag)-1] && A[Fpos-1] != 4 && B[(Fpos-Fdag)-1] != 4)
            { Fpos -= 1;
#ifdef BOX_STATS
              BxExtend += 1;
#endif
            }
          while (A[Lpos] != B[Lpos-d] && A[Lpos] != 4 && B[Lpos-d] != 4)
            { Lpos += 1;
#ifdef BOX_STATS
              BxExtend += 1;
#endif
            }

          f = F;
          *f++ = p = Fpos + snake(A+Fpos,B+(Fpos-Fdag));
          for (m = Fdag-1; m >= d; m--)
            *f++ = Fpos-1;
          passes = 0;

#ifdef DEBUG_DP
          printf(" %2d:",passes);
          for (m = Fdag; m >= d; m--)
            printf(" %d",F[Fdag-m]);
          printf("\n");
          fflush(stdout);
#endif

          h = H;
          p = Fpos;
          while (p < Lpos)
            { int b, c;

              b = Fpos;
              c = 0;
              f = F;
              for (m = Fdag; m >= d; m--)
                { p = b;
                  if (*f >= b)
                    { b = *f;
                      c = 0;
                      p = b+1;
                    }
                  else
                    c += 1;
                  *h++ = c;
                  *f++ = p += snake(A+p,B+(p-m));
                }
              passes += 1;

#ifdef DEBUG_DP
              printf(" %2d:",passes);
              for (m = Fdag; m >= d; m--)
                printf(" %d(%2d)",F[Fdag-m],h[(d-m)-1]);
              printf("\n");
              fflush(stdout);
#endif
            }

          if (passes < Gaps+Hamm)
            { int y, k;

              p = Lpos;
              m = d;
              y = x;
#ifdef DEBUG_BACK
              printf("Short cut %d\n",(Gaps+Hamm)-passes);
              printf("Path (%d,%d)",p,m);
#endif
#ifdef BOX_STATS
              BxGaps += (Gaps+Hamm)-passes;
#endif
              while (h > H)
                { p -= rsnake(A+p,B+(p-m));
                  if (p < Fpos)
                    p = Fpos;
                  h -= Diag;
                  k = h[Fdag-m];
                  if (k == 0)
                    p -= 1;
                  else
                    { m += k;
                      for (; k > 0; k--)
                        t[--y] = -p;
                    }
#ifdef DEBUG_BACK
                  printf(" (%d,%d)",p,m);
#endif
                }
#ifdef DEBUG_BACK
              printf("\n");
#endif
            }
        }
      else
        { while (B[Fpos-1] != A[(Fpos+Fdag)-1] && B[Fpos-1] != 4 && A[(Fpos+Fdag)-1] != 4)
            { Fpos -= 1;
#ifdef BOX_STATS
              BxExtend += 1;
#endif
            }
          while (B[Lpos] != A[Lpos+d] && B[Lpos] != 4 && A[Lpos+d] != 4)
            { Lpos += 1;
#ifdef BOX_STATS
              BxExtend += 1;
#endif
            }

          f = F;
          *f++ = p = Fpos + snake(A+(Fpos+Fdag),B+Fpos);
          for (m = Fdag+1; m <= d; m++)
            *f++ = Fpos-1;
          passes = 0;

#ifdef DEBUG_DP
          printf(" %2d:",passes);
          for (m = Fdag; m <= d; m++) 
            printf(" %d",F[m-Fdag]);
          printf("\n");
          fflush(stdout);
#endif

          h = H;
          p = Fpos;
          while (p < Lpos)
            { int b, c;

              b = Fpos;
              c = 0;
              f = F;
              for (m = Fdag; m <= d; m++) 
                { p = b;
                  if (*f >= b)
                    { b = *f;
                      c = 0;
                      p = b+1;
                    }
                  else
                    c += 1;
                  *h++ = c; 
                  *f++ = p += snake(A+(m+p),B+p);
                }
              passes += 1;

#ifdef DEBUG_DP
              printf(" %2d:",passes);
              for (m = Fdag; m <= d; m++) 
                printf(" %d(%2d)",F[m-Fdag],h[(m-d)-1]);
              printf("\n");
              fflush(stdout);
#endif
            }

          if (passes < Gaps+Hamm)
            { int y, k;

              p = Lpos;
              m = d;
              y = x;
#ifdef DEBUG_BACK
              printf("Short cut %d\n",(Gaps+Hamm)-passes);
              printf("Path (%d,%d)",p,m);
#endif
#ifdef BOX_STATS
              BxGaps += (Gaps+Hamm)-passes;
#endif
              while (h > H)
                { p -= rsnake(A+(p+m),B+p);
                  if (p < Fpos)
                    p = Fpos;
                  h -= Diag;
                  k = h[m-Fdag];
                  if (k == 0)
                    p -= 1;
                  else
                    { m -= k;
                      for (; k > 0; k--)
                        t[--y] = p;
                    }
#ifdef DEBUG_BACK
                  printf(" (%d,%d)",p,m);
#endif
                }
#ifdef DEBUG_BACK
              printf("\n");
#endif
            }
        }
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
addq $-0x1, %rax
movq %rax, -0x40(%rbp)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
addq $-0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x8(%rax), %eax
movl %eax, -0x6c(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movl 0x10(%rax), %eax
movq -0x8(%rbp), %rcx
movq (%rcx), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0x58(%rbp)
movq -0x68(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x54(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x1a7e8
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x78(%rbp)
movl -0x50(%rbp), %eax
movl %eax, -0x70(%rbp)
movl $0x0, -0x7c(%rbp)
movl $0x1, -0x80(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x54(%rbp)
movl -0x4c(%rbp), %eax
cmpl -0x6c(%rbp), %eax
jge 0x19f4a
movq -0x68(%rbp), %rax
movslq -0x4c(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x54(%rbp)
cmpl -0x50(%rbp), %eax
je 0x1a015
movl -0x4c(%rbp), %eax
subl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x50(%rbp)
jge 0x19fb7
movl -0x5c(%rbp), %ecx
movl -0x58(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x54(%rbp)
jl 0x19f6f
jmp 0x1a01a
movl -0x50(%rbp), %eax
subl -0x54(%rbp), %eax
cmpl $0x32, %eax
jl 0x19f7f
jmp 0x1a01a
movq -0x40(%rbp), %rdi
movslq -0x50(%rbp), %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movl -0x58(%rbp), %eax
addl -0x50(%rbp), %eax
movslq %eax, %rcx
xorl %eax, %eax
subq %rcx, %rax
addq %rax, %rsi
movl -0x50(%rbp), %edx
subl -0x54(%rbp), %edx
callq 0x1a800
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
jmp 0x1a000
movl -0x5c(%rbp), %eax
addl -0x58(%rbp), %eax
movl %eax, -0x58(%rbp)
cmpl $0x0, -0x54(%rbp)
jg 0x19fc8
jmp 0x1a01a
movl -0x54(%rbp), %eax
subl -0x50(%rbp), %eax
cmpl $0x32, %eax
jl 0x19fd5
jmp 0x1a01a
movq -0x40(%rbp), %rdi
movl -0x50(%rbp), %eax
addl -0x58(%rbp), %eax
cltq
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movslq -0x50(%rbp), %rax
addq %rax, %rsi
movl -0x54(%rbp), %edx
subl -0x50(%rbp), %edx
callq 0x1a800
addl -0x7c(%rbp), %eax
movl %eax, -0x7c(%rbp)
movl -0x80(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x80(%rbp)
movl -0x54(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x5c(%rbp)
jmp 0x19f1b
cmpl $0x1, -0x80(%rbp)
jne 0x1a025
jmp 0x19ee9
movl -0x50(%rbp), %eax
movl %eax, -0x74(%rbp)
movl -0x78(%rbp), %eax
subl -0x58(%rbp), %eax
movl %eax, %ecx
negl %ecx
cmovnsl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movl -0x80(%rbp), %ecx
addl -0x7c(%rbp), %ecx
addl $0x1, %ecx
imull %ecx, %eax
cltq
shlq $0x2, %rax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl (%rcx), %eax
jle 0x1a08e
movq -0x18(%rbp), %rdi
movl -0x50(%rbp), %esi
callq 0x5220
cmpl $0x0, %eax
je 0x1a082
movl $0x1, %edi
callq 0x2290
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movslq -0x84(%rbp), %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
cmpl $0x0, -0x70(%rbp)
jge 0x1a451
xorl %eax, %eax
subl -0x70(%rbp), %eax
movl %eax, -0x70(%rbp)
xorl %eax, %eax
subl -0x74(%rbp), %eax
movl %eax, -0x74(%rbp)
movq -0x40(%rbp), %rax
movl -0x70(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
movq -0x48(%rbp), %rax
movl -0x70(%rbp), %edx
subl -0x78(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rax,%rdx), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xa9(%rbp)
je 0x1a12d
movq -0x40(%rbp), %rax
movl -0x70(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
movb %al, -0xa9(%rbp)
je 0x1a12d
movq -0x48(%rbp), %rax
movl -0x70(%rbp), %ecx
subl -0x78(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4, %eax
setne %al
movb %al, -0xa9(%rbp)
movb -0xa9(%rbp), %al
testb $0x1, %al
jne 0x1a139
jmp 0x1a147
movl -0x70(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x1a0be
jmp 0x1a149
movq -0x40(%rbp), %rax
movslq -0x74(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %edx
subl -0x58(%rbp), %edx
movslq %edx, %rdx
movsbl (%rax,%rdx), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xaa(%rbp)
je 0x1a1a8
movq -0x40(%rbp), %rax
movslq -0x74(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
movb %al, -0xaa(%rbp)
je 0x1a1a8
movq -0x48(%rbp), %rax
movl -0x74(%rbp), %ecx
subl -0x58(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4, %eax
setne %al
movb %al, -0xaa(%rbp)
movb -0xaa(%rbp), %al
testb $0x1, %al
jne 0x1a1b4
jmp 0x1a1bf
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1a149
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0xb0(%rbp)
movq -0x40(%rbp), %rdi
movslq -0x70(%rbp), %rax
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movl -0x70(%rbp), %eax
subl -0x78(%rbp), %eax
cltq
addq %rax, %rsi
callq 0x1a890
movl -0xb0(%rbp), %ecx
addl %eax, %ecx
movl %ecx, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movl -0x78(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jl 0x1a23e
movl -0x70(%rbp), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1a214
movl $0x0, -0x88(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x1a34a
movl -0x70(%rbp), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jl 0x1a336
movl -0x8c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl -0x8c(%rbp), %eax
jl 0x1a2ca
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x8c(%rbp)
movl $0x0, -0x90(%rbp)
movl -0x8c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1a2d9
movl -0x90(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x90(%rbp)
movl -0x90(%rbp), %ecx
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x38(%rbp)
movl %ecx, (%rax)
movq -0x40(%rbp), %rdi
movslq -0x50(%rbp), %rax
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movl -0x50(%rbp), %eax
subl -0x5c(%rbp), %eax
cltq
addq %rax, %rsi
callq 0x1a890
movl %eax, %ecx
addl -0x50(%rbp), %ecx
movl %ecx, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movl -0x5c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1a283
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x1a256
movl -0x88(%rbp), %eax
movl -0x80(%rbp), %ecx
addl -0x7c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x1a44c
movl -0x74(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0x94(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x1a44a
movq -0x40(%rbp), %rdi
movslq -0x50(%rbp), %rax
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movl -0x50(%rbp), %eax
subl -0x5c(%rbp), %eax
cltq
addq %rax, %rsi
callq 0x1a900
movl %eax, %ecx
movl -0x50(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x1a3b8
movl -0x70(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x84(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl -0x78(%rbp), %ecx
subl -0x5c(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x98(%rbp)
cmpl $0x0, -0x98(%rbp)
jne 0x1a3ff
movl -0x50(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1a445
movl -0x98(%rbp), %eax
addl -0x5c(%rbp), %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0x98(%rbp)
jle 0x1a443
xorl %edx, %edx
subl -0x50(%rbp), %edx
movq -0x68(%rbp), %rax
movl -0x94(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0x94(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0x98(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x98(%rbp)
jmp 0x1a40b
jmp 0x1a445
jmp 0x1a373
jmp 0x1a44c
jmp 0x1a7e3
jmp 0x1a453
movq -0x48(%rbp), %rax
movl -0x70(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
movq -0x40(%rbp), %rax
movl -0x70(%rbp), %edx
addl -0x78(%rbp), %edx
subl $0x1, %edx
movslq %edx, %rdx
movsbl (%rax,%rdx), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xb1(%rbp)
je 0x1a4c2
movq -0x48(%rbp), %rax
movl -0x70(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
movb %al, -0xb1(%rbp)
je 0x1a4c2
movq -0x40(%rbp), %rax
movl -0x70(%rbp), %ecx
addl -0x78(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4, %eax
setne %al
movb %al, -0xb1(%rbp)
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x1a4ce
jmp 0x1a4dc
movl -0x70(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x70(%rbp)
jmp 0x1a453
jmp 0x1a4de
movq -0x48(%rbp), %rax
movslq -0x74(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movq -0x40(%rbp), %rax
movl -0x74(%rbp), %edx
addl -0x58(%rbp), %edx
movslq %edx, %rdx
movsbl (%rax,%rdx), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xb2(%rbp)
je 0x1a53d
movq -0x48(%rbp), %rax
movslq -0x74(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x4, %ecx
movb %al, -0xb2(%rbp)
je 0x1a53d
movq -0x40(%rbp), %rax
movl -0x74(%rbp), %ecx
addl -0x58(%rbp), %ecx
movslq %ecx, %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x4, %eax
setne %al
movb %al, -0xb2(%rbp)
movb -0xb2(%rbp), %al
testb $0x1, %al
jne 0x1a549
jmp 0x1a554
movl -0x74(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x74(%rbp)
jmp 0x1a4de
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0xb8(%rbp)
movq -0x40(%rbp), %rdi
movl -0x70(%rbp), %eax
addl -0x78(%rbp), %eax
cltq
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movslq -0x70(%rbp), %rax
addq %rax, %rsi
callq 0x1a890
movl -0xb8(%rbp), %ecx
addl %eax, %ecx
movl %ecx, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movl -0x78(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x1a5d3
movl -0x70(%rbp), %ecx
subl $0x1, %ecx
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1a5a9
movl $0x0, -0x88(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x70(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x74(%rbp), %eax
jge 0x1a6df
movl -0x70(%rbp), %eax
movl %eax, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movl -0x78(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
cmpl -0x58(%rbp), %eax
jg 0x1a6cb
movl -0x9c(%rbp), %eax
movl %eax, -0x50(%rbp)
movq -0x30(%rbp), %rax
movl (%rax), %eax
cmpl -0x9c(%rbp), %eax
jl 0x1a65f
movq -0x30(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x9c(%rbp)
movl $0x0, -0xa0(%rbp)
movl -0x9c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1a66e
movl -0xa0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xa0(%rbp)
movl -0xa0(%rbp), %ecx
movq -0x38(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x38(%rbp)
movl %ecx, (%rax)
movq -0x40(%rbp), %rdi
movl -0x5c(%rbp), %eax
addl -0x50(%rbp), %eax
cltq
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movslq -0x50(%rbp), %rax
addq %rax, %rsi
callq 0x1a890
movl %eax, %ecx
addl -0x50(%rbp), %ecx
movl %ecx, -0x50(%rbp)
movq -0x30(%rbp), %rax
movq %rax, %rdx
addq $0x4, %rdx
movq %rdx, -0x30(%rbp)
movl %ecx, (%rax)
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x1a618
movl -0x88(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x88(%rbp)
jmp 0x1a5eb
movl -0x88(%rbp), %eax
movl -0x80(%rbp), %ecx
addl -0x7c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x1a7e1
movl -0x74(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x58(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq -0x38(%rbp), %rax
cmpq -0x28(%rbp), %rax
jbe 0x1a7df
movq -0x40(%rbp), %rdi
movl -0x50(%rbp), %eax
addl -0x5c(%rbp), %eax
cltq
addq %rax, %rdi
movq -0x48(%rbp), %rsi
movslq -0x50(%rbp), %rax
addq %rax, %rsi
callq 0x1a900
movl %eax, %ecx
movl -0x50(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x50(%rbp)
movl -0x50(%rbp), %eax
cmpl -0x70(%rbp), %eax
jge 0x1a74d
movl -0x70(%rbp), %eax
movl %eax, -0x50(%rbp)
movl -0x84(%rbp), %ecx
movq -0x38(%rbp), %rax
movslq %ecx, %rdx
xorl %ecx, %ecx
subq %rdx, %rcx
shlq $0x2, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movl -0x5c(%rbp), %ecx
subl -0x78(%rbp), %ecx
movslq %ecx, %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0xa8(%rbp)
cmpl $0x0, -0xa8(%rbp)
jne 0x1a794
movl -0x50(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x50(%rbp)
jmp 0x1a7da
movl -0xa8(%rbp), %ecx
movl -0x5c(%rbp), %eax
subl %ecx, %eax
movl %eax, -0x5c(%rbp)
cmpl $0x0, -0xa8(%rbp)
jle 0x1a7d8
movl -0x50(%rbp), %edx
movq -0x68(%rbp), %rax
movl -0xa4(%rbp), %ecx
addl $-0x1, %ecx
movl %ecx, -0xa4(%rbp)
movslq %ecx, %rcx
movl %edx, (%rax,%rcx,4)
movl -0xa8(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0xa8(%rbp)
jmp 0x1a7a2
jmp 0x1a7da
jmp 0x1a708
jmp 0x1a7e1
jmp 0x1a7e3
jmp 0x19ee9
addq $0xc0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)