// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq (%rdi), %rax
movq 0x10(%rdi), %rcx
leaq -0x1(%rcx), %rdx
movq %rdx, 0x48(%rsp)
movq 0x18(%rdi), %rdx
leaq -0x1(%rdx), %rdi
movq %rdi, 0x40(%rsp)
movq (%rax), %r11
movl 0x8(%rax), %edi
movq %rsi, 0x78(%rsp)
movq 0x8(%rsi), %rsi
movq %rsi, 0x38(%rsp)
movl 0x10(%rax), %ebx
subl 0x14(%rax), %ebx
movl (%r11), %ebp
movslq %edi, %rax
movq %rdx, 0x60(%rsp)
addq $-0x2, %rdx
movq %rdx, 0x58(%rsp)
leaq 0x1(%rcx), %rdx
movq %rdx, 0x88(%rsp)
leaq -0x3(%rcx), %rdx
movq %rdx, 0x68(%rsp)
leaq -0x4(%r11), %rdx
movq %rdx, 0x80(%rsp)
movdqa 0x895d(%rip), %xmm6     # 0x1a450
movdqa 0x8965(%rip), %xmm7     # 0x1a460
movdqa 0x896c(%rip), %xmm8     # 0x1a470
pcmpeqd %xmm9, %xmm9
movq %rcx, 0x20(%rsp)
addq $-0x2, %rcx
movq %rcx, 0x90(%rsp)
xorl %r13d, %r13d
movq %r11, 0x8(%rsp)
movl %edi, 0x4(%rsp)
movq %rax, 0x28(%rsp)
cmpl %edi, %r13d
jge 0x12467
movl %ebx, %esi
leal 0x1(%r13), %eax
cmpl %edi, %eax
movl %ebp, 0x10(%rsp)
jge 0x11caf
movslq %r13d, %rdx
incq %rdx
movl %esi, %r8d
movl %r13d, %esi
notl %esi
xorl %ecx, %ecx
movl $0x1, %r15d
movl %r8d, (%rsp)
movl %ebp, %r14d
movq 0x28(%rsp), %rax
movl (%r11,%rdx,4), %ebp
movl %ebp, %r10d
subl %r14d, %r10d
jne 0x11b7f
movl %r14d, %ebp
movl %r13d, %edi
jmp 0x11c90
movl %edx, %edi
movl %edx, %ebx
subl %r13d, %ebx
testl %r14d, %r14d
js 0x11c01
addl %r8d, %ebx
testl %ebp, %ebp
jle 0x11cde
cmpl $0x31, %r10d
jg 0x11cde
testl %r10d, %r10d
jle 0x11c71
movl %r14d, %eax
addq 0x40(%rsp), %rax
addl %r14d, %r8d
addl %edx, %r8d
subl %r13d, %r8d
movslq %r8d, %r9
addq 0x48(%rsp), %r9
movl %r10d, %r10d
xorl %r11d, %r11d
xorl %r8d, %r8d
movb (%r9,%r11), %r14b
cmpb $0x4, %r14b
je 0x11bef
movb (%rax,%r11), %r12b
cmpb %r12b, %r14b
je 0x11be7
cmpb $0x4, %r12b
je 0x11bef
incl %r8d
incq %r11
cmpl %r11d, %r10d
jne 0x11bcb
movl %ebx, %r9d
movq 0x8(%rsp), %r11
movq 0x28(%rsp), %rax
jmp 0x11c81
movl %r8d, %r9d
subl %ebx, %r9d
testl %ebp, %ebp
jns 0x11ce3
movl %r14d, %r11d
subl %ebp, %r11d
cmpl $0x31, %r11d
jg 0x11ceb
testl %r11d, %r11d
jle 0x11c79
movslq %r14d, %r10
movq 0x48(%rsp), %rax
subq %r10, %rax
addl %r8d, %r13d
addl %esi, %r14d
addl %r13d, %r14d
movslq %r14d, %r8
movq 0x40(%rsp), %r10
subq %r8, %r10
movl %r11d, %r11d
xorl %ebx, %ebx
xorl %r8d, %r8d
movb (%rax,%rbx), %r14b
cmpb $0x4, %r14b
je 0x11bf2
movb (%r10,%rbx), %r12b
cmpb %r12b, %r14b
je 0x11c67
cmpb $0x4, %r12b
je 0x11bf2
incl %r8d
incq %rbx
cmpl %ebx, %r11d
jne 0x11c4b
jmp 0x11bf2
xorl %r8d, %r8d
movl %ebx, %r9d
jmp 0x11c81
xorl %r8d, %r8d
movq 0x8(%rsp), %r11
addl %r8d, %ecx
incl %r15d
movl %r9d, %r8d
movl %edi, %r13d
movl %ebp, %r14d
incq %rdx
decl %esi
cmpq %rax, %rdx
jne 0x11b68
movl %ebp, %r14d
movl %edi, %r13d
movl 0x4(%rsp), %edi
movl %edi, %eax
movl (%rsp), %esi
jmp 0x11cbd
movl $0x1, %r15d
xorl %ecx, %ecx
movl %ebp, %r14d
movl %esi, %r8d
movl %eax, %ebx
subl %r13d, %ebx
testl %r14d, %r14d
js 0x11cd1
addl %r8d, %ebx
xorl %ebp, %ebp
movl %eax, %r13d
jmp 0x11cfd
subl %ebx, %r8d
xorl %ebp, %ebp
movl %eax, %r13d
movl %r8d, %ebx
jmp 0x11cfd
movl %edi, %r13d
jmp 0x11cf6
movl %edi, %r13d
movl %r9d, %ebx
jmp 0x11cf6
movl %edi, %r13d
movl %r9d, %ebx
movq 0x8(%rsp), %r11
movl 0x4(%rsp), %edi
movl (%rsp), %esi
cmpl $0x1, %r15d
je 0x11b2b
movl %esi, (%rsp)
movl %esi, %eax
subl %ebx, %eax
movl %eax, %edx
negl %edx
cmovsl %eax, %edx
incl %edx
addl %ecx, %r15d
movq %r15, 0x70(%rsp)
leal 0x4(,%r15,4), %esi
imull %edx, %esi
movq 0x78(%rsp), %rax
cmpl (%rax), %esi
movq 0x38(%rsp), %rax
jle 0x11d6e
movq 0x78(%rsp), %r12
movq %r12, %rdi
movl %edx, %r15d
callq 0x4220
movl %r15d, %edx
pcmpeqd %xmm9, %xmm9
movdqa 0x8717(%rip), %xmm8     # 0x1a470
movdqa 0x86ff(%rip), %xmm7     # 0x1a460
movdqa 0x86e7(%rip), %xmm6     # 0x1a450
movq 0x8(%r12), %rax
movl %edx, %ecx
movq %rax, 0x38(%rsp)
movq %rcx, 0x50(%rsp)
leaq (%rax,%rcx,4), %rax
movq %rax, 0x30(%rsp)
movslq (%rsp), %r12
movslq %ebx, %r11
movl 0x10(%rsp), %r10d
testl %r10d, %r10d
js 0x120d5
movl %r10d, %r9d
addq %r9, %r12
movq 0x20(%rsp), %rax
addq %r12, %rax
movq 0x58(%rsp), %rcx
addq %r9, %rcx
incl %r10d
xorl %esi, %esi
movb -0x2(%rax,%rsi), %dil
leaq -0x1(%rsi), %rdx
decl %r10d
cmpb $0x4, %dil
je 0x11dd7
movb (%rcx,%rsi), %r8b
cmpb $0x4, %r8b
je 0x11dd7
movq %rdx, %rsi
cmpb %dil, %r8b
jne 0x11db3
leaq (%r9,%rdx), %rcx
incq %rcx
movq %rcx, 0x18(%rsp)
movslq %r14d, %rcx
decq %rcx
addq 0x20(%rsp), %r11
movq 0x60(%rsp), %r8
movb (%r11,%rcx), %sil
leaq 0x1(%rcx), %rdi
movq %rdi, 0x10(%rsp)
cmpb $0x4, %sil
je 0x11e1a
movb (%r8,%rcx), %dil
cmpb $0x4, %dil
je 0x11e1a
movq 0x10(%rsp), %rcx
cmpb %sil, %dil
jne 0x11df3
movb (%rax,%rdx), %cl
xorl %eax, %eax
cmpb $0x4, %cl
movq 0x8(%rsp), %r11
movl 0x4(%rsp), %edi
movq 0x38(%rsp), %r8
je 0x11e58
addq 0x88(%rsp), %r12
addq %rdx, %r12
movslq %r10d, %rsi
addq 0x40(%rsp), %rsi
xorl %eax, %eax
cmpb (%rsi,%rax), %cl
jne 0x11e58
movb (%r12,%rax), %cl
incq %rax
cmpb $0x4, %cl
jne 0x11e47
addl %r9d, %eax
addl %edx, %eax
incl %eax
movl %eax, (%r8)
movl (%rsp), %esi
cmpl %ebx, %esi
jge 0x11f3f
addq %rdx, %r9
movl %esi, %eax
notl %eax
addl %ebx, %eax
leaq 0x4(%rax), %rcx
andq $-0x4, %rcx
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
xorl %edx, %edx
movq %rdx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, %xmm3
por %xmm7, %xmm3
movdqa %xmm0, %xmm2
pxor %xmm8, %xmm2
pxor %xmm8, %xmm3
movdqa %xmm3, %xmm4
pcmpgtd %xmm2, %xmm4
pcmpeqd %xmm2, %xmm3
pshufd $0xf5, %xmm3, %xmm5     # xmm5 = xmm3[1,1,3,3]
pand %xmm4, %xmm5
pshufd $0xf5, %xmm4, %xmm3     # xmm3 = xmm4[1,1,3,3]
por %xmm5, %xmm3
movd %xmm3, %eax
notl %eax
testb $0x1, %al
je 0x11ed7
movl %r9d, 0x4(%r8,%rdx,4)
pxor %xmm9, %xmm3
pextrw $0x4, %xmm3, %eax
testb $0x1, %al
je 0x11eea
movl %r9d, 0x8(%r8,%rdx,4)
por %xmm6, %xmm1
pxor %xmm8, %xmm1
movdqa %xmm1, %xmm3
pcmpgtd %xmm2, %xmm3
pcmpeqd %xmm2, %xmm1
pshufd $0xf5, %xmm1, %xmm2     # xmm2 = xmm1[1,1,3,3]
pand %xmm3, %xmm2
pshufd $0xf5, %xmm3, %xmm1     # xmm1 = xmm3[1,1,3,3]
por %xmm2, %xmm1
pxor %xmm9, %xmm1
pextrw $0x0, %xmm1, %eax
testb $0x1, %al
je 0x11f24
movl %r9d, 0xc(%r8,%rdx,4)
pextrw $0x4, %xmm1, %eax
testb $0x1, %al
je 0x11f32
movl %r9d, 0x10(%r8,%rdx,4)
addq $0x4, %rdx
cmpq %rdx, %rcx
jne 0x11e8a
movq 0x10(%rsp), %rax
cmpq %rax, 0x18(%rsp)
jge 0x11b2b
xorl %r9d, %r9d
movq 0x30(%rsp), %r8
movq 0x18(%rsp), %r15
cmpl %ebx, %esi
jg 0x11ff2
xorl %edx, %edx
xorl %r10d, %r10d
movq 0x18(%rsp), %rax
movl %eax, %ecx
movq 0x38(%rsp), %r11
movl %esi, %r14d
movl (%r11), %esi
leal 0x1(%rsi), %eax
incl %r10d
cmpl %ecx, %esi
cmovll %ecx, %eax
cmovgl %esi, %ecx
cmovgel %edx, %r10d
movl %r10d, (%r8)
leal (%rax,%r14), %esi
movslq %esi, %rsi
movq 0x48(%rsp), %rdi
movb (%rdi,%rsi), %sil
movl $0x0, %r15d
cmpb $0x4, %sil
je 0x11fd8
movslq %r14d, %r12
movslq %eax, %r15
movq 0x40(%rsp), %rdi
addq %r15, %rdi
addq 0x20(%rsp), %r12
addq %r15, %r12
xorl %r15d, %r15d
cmpb (%rdi,%r15), %sil
jne 0x11fd8
movb (%r12,%r15), %sil
incq %r15
cmpb $0x4, %sil
jne 0x11fc5
addq $0x4, %r8
addl %eax, %r15d
movl %r15d, (%r11)
addq $0x4, %r11
leal 0x1(%r14), %eax
cmpl %ebx, %r14d
movl %eax, %r14d
jne 0x11f78
incl %r9d
movq 0x10(%rsp), %rdx
cmpl %edx, %r15d
movl (%rsp), %esi
jl 0x11f5c
cmpl 0x70(%rsp), %r9d
movq 0x8(%rsp), %r11
movl 0x4(%rsp), %edi
jge 0x11b2b
cmpq 0x30(%rsp), %r8
jbe 0x11b2b
negq 0x50(%rsp)
movl %r13d, %r9d
movl %ebx, %r10d
movq 0x58(%rsp), %r14
movq 0x68(%rsp), %r15
movq %rdx, %r12
leal (%r10,%rdx), %eax
cltq
movq 0x20(%rsp), %rcx
movb -0x2(%rcx,%rax), %cl
xorl %eax, %eax
cmpb $0x4, %cl
je 0x12071
movslq %r12d, %rdx
movslq %r10d, %rsi
addq %r15, %rsi
xorl %eax, %eax
cmpb (%r14,%rdx), %cl
jne 0x12071
incl %eax
movb (%rsi,%rdx), %cl
decq %rdx
cmpb $0x4, %cl
jne 0x1205e
movq %r12, %rdx
subl %eax, %edx
movq 0x18(%rsp), %rax
cmpl %eax, %edx
cmovlel %eax, %edx
movq 0x50(%rsp), %rax
leaq (%r8,%rax,4), %r8
movl %r10d, %eax
subl (%rsp), %eax
cltq
movl (%r8,%rax,4), %eax
testl %eax, %eax
je 0x120c3
subl %eax, %r10d
testl %eax, %eax
jle 0x120c5
movslq %r9d, %r9
movq 0x80(%rsp), %rcx
leaq (%rcx,%r9,4), %rcx
subl %eax, %r9d
incl %eax
movl %edx, (%rcx)
addq $-0x4, %rcx
decl %eax
cmpl $0x1, %eax
ja 0x120b4
jmp 0x120c5
decl %edx
cmpq 0x30(%rsp), %r8
ja 0x1203a
jmp 0x11b2b
movl $0x1, %ecx
subl %r10d, %ecx
negl %r10d
movl %r10d, %r15d
movslq %r10d, %rax
movq %rax, %rsi
shlq $0x20, %rsi
movabsq $0x100000000, %rdx      # imm = 0x100000000
addq %rdx, %rsi
movq %rax, %rdx
movq %r12, 0x10(%rsp)
subq %r12, %rdx
addq 0x60(%rsp), %rdx
movq 0x90(%rsp), %rdi
addq %rax, %rdi
xorl %r9d, %r9d
movabsq $-0x100000000, %r8      # imm = 0xFFFFFFFF00000000
addq %r8, %rsi
movb -0x2(%rdx,%r9), %r12b
leaq -0x1(%r9), %r10
decl %ecx
cmpb $0x4, %r12b
je 0x12148
movb (%rdi,%r9), %r8b
cmpb $0x4, %r8b
je 0x12148
movq %r10, %r9
cmpb %r12b, %r8b
jne 0x12118
negl %r14d
movl %eax, %r9d
leaq (%r9,%r10), %rdi
incq %rdi
movq %rdi, 0x18(%rsp)
movslq %r14d, %rdi
leaq (%rax,%r10), %r14
incq %r14
decq %rdi
movq 0x60(%rsp), %rax
subq %r11, %rax
movb (%rax,%rdi), %r11b
leaq 0x1(%rdi), %r12
cmpb $0x4, %r11b
je 0x12194
movq 0x20(%rsp), %r8
movb (%r8,%rdi), %r8b
cmpb $0x4, %r8b
je 0x12194
movq %r12, %rdi
cmpb %r11b, %r8b
jne 0x1216f
sarq $0x20, %rsi
movq 0x48(%rsp), %rax
movb (%rax,%rsi), %sil
xorl %eax, %eax
cmpb $0x4, %sil
movq 0x8(%rsp), %r11
movl 0x4(%rsp), %edi
movq 0x38(%rsp), %r8
je 0x121d7
movslq %ecx, %rcx
addq 0x20(%rsp), %rcx
addq %r10, %rdx
xorl %eax, %eax
cmpb (%rdx,%rax), %sil
jne 0x121d7
movb (%rcx,%rax), %sil
incq %rax
cmpb $0x4, %sil
jne 0x121c4
addl %r15d, %eax
addl %r10d, %eax
incl %eax
movl %eax, (%r8)
movl (%rsp), %esi
cmpl %ebx, %esi
jle 0x122bb
addq %r10, %r9
movl %ebx, %eax
notl %eax
addl %esi, %eax
leaq 0x4(%rax), %rcx
andq $-0x4, %rcx
movq %rax, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
pxor %xmm8, %xmm0
xorl %edx, %edx
movq %rdx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movdqa %xmm1, %xmm2
por %xmm7, %xmm2
pxor %xmm8, %xmm2
movdqa %xmm2, %xmm3
pcmpgtd %xmm0, %xmm3
pcmpeqd %xmm0, %xmm2
pshufd $0xf5, %xmm2, %xmm4     # xmm4 = xmm2[1,1,3,3]
pand %xmm3, %xmm4
pshufd $0xf5, %xmm3, %xmm2     # xmm2 = xmm3[1,1,3,3]
por %xmm4, %xmm2
movd %xmm2, %eax
notl %eax
testb $0x1, %al
je 0x12253
movl %r9d, 0x4(%r8,%rdx,4)
pxor %xmm9, %xmm2
pextrw $0x4, %xmm2, %eax
testb $0x1, %al
je 0x12266
movl %r9d, 0x8(%r8,%rdx,4)
por %xmm6, %xmm1
pxor %xmm8, %xmm1
movdqa %xmm1, %xmm2
pcmpgtd %xmm0, %xmm2
pcmpeqd %xmm0, %xmm1
pshufd $0xf5, %xmm1, %xmm3     # xmm3 = xmm1[1,1,3,3]
pand %xmm2, %xmm3
pshufd $0xf5, %xmm2, %xmm1     # xmm1 = xmm2[1,1,3,3]
por %xmm3, %xmm1
pxor %xmm9, %xmm1
pextrw $0x0, %xmm1, %eax
testb $0x1, %al
je 0x122a0
movl %r9d, 0xc(%r8,%rdx,4)
pextrw $0x4, %xmm1, %eax
testb $0x1, %al
je 0x122ae
movl %r9d, 0x10(%r8,%rdx,4)
addq $0x4, %rdx
cmpq %rdx, %rcx
jne 0x1220f
cmpq %r12, %r14
jge 0x11b2b
movq 0x40(%rsp), %rax
subq 0x10(%rsp), %rax
movq %rax, 0x98(%rsp)
xorl %eax, %eax
movq 0x30(%rsp), %r8
movq 0x18(%rsp), %r9
movq %r12, 0xa0(%rsp)
movl %eax, 0x10(%rsp)
cmpl %ebx, %esi
jl 0x1237f
xorl %ecx, %ecx
movq 0x98(%rsp), %rdx
xorl %r11d, %r11d
movq 0x18(%rsp), %rax
movl %eax, %r14d
movq 0x38(%rsp), %r15
movl (%r15), %edi
leal 0x1(%rdi), %eax
incl %r11d
cmpl %r14d, %edi
cmovll %r14d, %eax
cmovgl %edi, %r14d
cmovgel %ecx, %r11d
movl %r11d, (%r8)
movslq %eax, %rdi
movq 0x48(%rsp), %r9
movb (%r9,%rdi), %r12b
movl $0x0, %r9d
cmpb $0x4, %r12b
je 0x12365
movq 0x20(%rsp), %r9
leaq (%r9,%rdi), %r10
addq %rdx, %rdi
xorl %r9d, %r9d
cmpb (%rdi,%r9), %r12b
jne 0x12365
movb (%r10,%r9), %r12b
incq %r9
cmpb $0x4, %r12b
jne 0x12352
addq $0x4, %r8
addl %eax, %r9d
movl %r9d, (%r15)
addq $0x4, %r15
leal -0x1(%rsi), %eax
incq %rdx
cmpl %ebx, %esi
movl %eax, %esi
jg 0x12310
movl 0x10(%rsp), %eax
incl %eax
movq 0xa0(%rsp), %r12
cmpl %r12d, %r9d
movl (%rsp), %esi
jl 0x122ea
cmpl 0x70(%rsp), %eax
movq 0x8(%rsp), %r11
movl 0x4(%rsp), %edi
jge 0x11b2b
cmpq 0x30(%rsp), %r8
jbe 0x11b2b
negq 0x50(%rsp)
movl %r13d, %r9d
movl %ebx, %r10d
movq 0x58(%rsp), %r14
movq 0x68(%rsp), %r15
movslq %r12d, %rax
movq 0x20(%rsp), %rcx
movb -0x2(%rcx,%rax), %dl
xorl %ecx, %ecx
cmpb $0x4, %dl
je 0x123fd
movslq %r10d, %rcx
movq %r14, %rsi
subq %rcx, %rsi
xorl %ecx, %ecx
cmpb (%rsi,%rax), %dl
jne 0x123fd
incl %ecx
movb (%r15,%rax), %dl
decq %rax
cmpb $0x4, %dl
jne 0x123ea
subl %ecx, %r12d
movq 0x18(%rsp), %rax
cmpl %eax, %r12d
cmovlel %eax, %r12d
movq 0x50(%rsp), %rax
leaq (%r8,%rax,4), %r8
movl (%rsp), %eax
subl %r10d, %eax
cltq
movl (%r8,%rax,4), %eax
testl %eax, %eax
je 0x12454
addl %eax, %r10d
testl %eax, %eax
jle 0x12457
movl %r12d, %ecx
negl %ecx
movslq %r9d, %r9
movq 0x80(%rsp), %rdx
leaq (%rdx,%r9,4), %rdx
subl %eax, %r9d
incl %eax
movl %ecx, (%rdx)
addq $-0x4, %rdx
decl %eax
cmpl $0x1, %eax
ja 0x12445
jmp 0x12457
decl %r12d
cmpq 0x30(%rsp), %r8
ja 0x123cc
jmp 0x11b2b
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nopl (%rax)