// File: /workspace/github_c_makefile_star2_O2/thegenemyers[P]DASCRUBBER/align.c
// Function: iter_np
static int iter_np(char *A, int M, char *B, int N, Trace_Waves *wave, int mode, int dmax)
{ int  **PVF = wave->PVF; 
  int  **PHF = wave->PHF;
  int    D;
  int    del = M-N;

  { int  *F0, *F1, *F2;
    int  *HF;
    int   low, hgh;
    int   posl, posh;

#ifdef DEBUG_ALIGN
    printf("\n    BASE %ld,%ld: %d vs %d\n",A-wave->Aabs,B-wave->Babs,M,N);
    printf("    A = ");
    for (D = 0; D < M; D++)
      printf("%c",ToA[(int) A[D]]);
    printf("\n");
    printf("    B = ");
    for (D = 0; D < N; D++)
      printf("%c",ToA[(int) B[D]]);
    printf("\n");
#endif

    if (del >= 0)
      { low = 0;
        hgh = del;
      }
    else
      { low = del;
        hgh = 0;
      }

    posl = -dmax;
    posh =  dmax;
    if (wave->Aabs == wave->Babs)
      { if (B == A)
          { EPRINTF(EPLACE,"%s: self comparison starts on diagonal 0 (Compute_Trace)\n",Prog_Name);
            EXIT(-1);
          }
        else if (B < A)
          { if ((B-A)+1 > posl)
              posl = (B-A)+1;
          }
        else
          { if ((B-A)-1 < posh)
              posh = (B-A)-1;
          }
      }

    F1 = PVF[-2];
    F0 = PVF[-1];

    for (D = low-1; D <= hgh+1; D++)
      F1[D] = F0[D] = -2;
    F0[0] = -1;

    low += 1;
    hgh -= 1;

    for (D = 0; 1; D += 1)
      { int   k, i, j;
        int   am, ac, ap;
        char *a;

        if (D > dmax)
          { EPRINTF(EPLACE,"%s: %s\n",Prog_Name,TP_Align);
            EXIT(-1);
          }

        F2 = F1;
        F1 = F0;
        F0 = PVF[D];
        HF = PHF[D];

        if ((D & 0x1) == 0)
          { if (low > posl)
              low -= 1;
            if (hgh < posh)
              hgh += 1;
          }
        F0[hgh+1] = F0[low-1] = -2;

#define FS_MOVE(mdir,pdir)			\
  ac = F1[k]+1;					\
  if (ac < am)					\
    if (ap < am)				\
      { HF[k] = mdir;				\
        j = am;					\
      }						\
    else					\
      { HF[k] = pdir;				\
        j = ap;					\
      }						\
  else						\
    if (ap < ac)				\
      { HF[k] = 0;				\
        j = ac;					\
      }						\
    else					\
      { HF[k] = pdir;				\
        j = ap;					\
      }						\
						\
  if (N < i)					\
    while (j < N && B[j] == a[j])		\
      j += 1;					\
  else						\
    while (j < i && B[j] == a[j])		\
      j += 1;					\
  F0[k] = j;

        j = -2;
        a = A + hgh;
        i = M - hgh;
        for (k = hgh; k > del; k--)
          { ap = j+1;
            am = F2[k-1];
            FS_MOVE(-1,4)
            a -= 1;
            i += 1;
          }

        j = -2;
        a = A + low;
        i = M - low;
        for (k = low; k < del; k++)
          { ap = F2[k+1]+1;
            am = j;
            FS_MOVE(2,1)
            a += 1;
            i -= 1;
          }

        ap = F0[del+1]+1;
        am = j;
        FS_MOVE(2,4)

#ifdef DEBUG_AWAVE
        print_awave(F0,low,hgh);
        print_awave(HF,low,hgh);
#endif

        if (F0[del] >= N)
          break;
      }
  }

  { int   k, h, m, e, c;
    int   ap = (wave->Aabs-A)-1;
    int   bp = (B-wave->Babs)+1;

    PHF[0][0] = 3;

    c = N;
    k = del;
    e = PHF[D][k];
    PHF[D][k] = 3;

    if (mode == UPPERMOST)

      while (e != 3)
        { h = k+e;
          if (e > 1)
            h -= 3;
          else if (e == 0)
            D -= 1;
          else
            D -= 2;

          if (h < k)       // => e = -1 or 2,  UPPERMOST
            { char *a;
  
              a = A + k;
              if (k < 0)
                m = -k;
              else
                m = 0;
              if (PVF[D][h] <= c)
                c = PVF[D][h]-1;
              while (c >= m && a[c] == B[c])
                c -= 1;
              if (e == -1)  //  => edge is 2, others are 1, and 0
                { if (c <= PVF[D+2][k+1])
                    { e = 4;
                      h = k+1;
                      D = D+2;
                    }
                  else if (c == PVF[D+1][k])
                    { e = 0;
                      h = k;
                      D = D+1;
                    }
                  else
                    PVF[D][h] = c+1;
                }
              else      //   => edge is 0, others are 1, and 2 (if k != del), 0 (otherwise)
                { if (k == del)
                    m = D;
                  else
                    m = D-2;
                  if (c <= PVF[m][k+1])
                    { if (k == del)
                        e = 4;
                      else
                        e = 1;
                      h = k+1;
                      D = m;
                    }
                  else if (c == PVF[D-1][k])
                    { e = 0;
                      h = k;
                      D = D-1;
                    }
                  else
                    PVF[D][h] = c+1;
                }
            }

          m = PHF[D][h];
          PHF[D][h] = e;
          e = m;
          k = h;
        }

    else if (mode == LOWERMOST)

      while (e != 3)
        { h = k+e;
          if (e > 1)
            h -= 3;
          else if (e == 0)
            D -= 1;
          else
            D -= 2;

          if (h > k)       // => e = 1 or 4,   LOWERMOST
            { char *a;
  
              a = A + k;
              if (k < 0)
                m = -k;
              else
                m = 0;
              if (PVF[D][h] < c)
                c = PVF[D][h];
              while (c >= m && a[c] == B[c])
                c -= 1;
              if (e == 1)  //  => edge is 2, others are 1, and 0
                { if (c < PVF[D+2][k-1])
                    { e = 2;
                      h = k-1;
                      D = D+2;
                    }
                  else if (c == PVF[D+1][k])
                    { e = 0;
                      h = k;
                      D = D+1;
                    }
                  else
                    PVF[D][h] = c--;
                }
              else      //   => edge is 0, others are 1, and 2 (if k != del), 0 (otherwise)
                { if (k == del)
                    m = D;
                  else
                    m = D-2;
                  if (c < PVF[m][k-1])
                    { if (k == del)
                        e = 2;
                      else
                        e = -1;
                      h = k-1;
                      D = m;
                    }
                  else if (c == PVF[D-1][k])
                    { e = 0;
                      h = k;
                      D = D-1;
                    }
                  else
                    PVF[D][h] = c--;
                }
            }

          m = PHF[D][h];
          PHF[D][h] = e;
          e = m;
          k = h;
        }

    else //  mode == GREEDIEST

      while (e != 3)
        { h = k+e;
          if (e > 1)
            h -= 3;
          else if (e == 0)
            D -= 1;
          else
            D -= 2;

          m = PHF[D][h];
          PHF[D][h] = e;
          e = m;
          k = h;
        }

    k = D = 0;
    e = PHF[D][k];
    while (e != 3)
      { h = k-e;
        c = PVF[D][k];
        if (e > 1)
          h += 3;
        else if (e == 0)
          D += 1;
        else
          D += 2;
#ifdef DEBUG_SCRIPT
        if (h > k)
          printf("     D %d(%d)\n",(c-k)-(ap-1),c+bp);
        else if (h < k)
          printf("     I %d(%d)\n",c+(bp-1),(c+k)-ap);
        else
          printf("     %d S %d\n",(c+k)-(ap+1),c+(bp-1));
#endif
        if (h > k)
          *wave->Stop++ = bp+c;
        else if (h < k)
          *wave->Stop++ = ap-(c+k);
        k = h;
        e = PHF[D][h];
      }
  }

  return (D + abs(del));
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, 0x18(%rsp)
movl %ecx, %r12d
movl 0xd0(%rsp), %r10d
movq 0x20(%r8), %r14
movq 0x28(%r8), %rbp
xorl %r11d, %r11d
movl %esi, 0x34(%rsp)
movl %esi, %eax
subl %ecx, %eax
movl %eax, 0x14(%rsp)
movl $0x0, %ebx
cmovnsl %eax, %ebx
cmovsl %eax, %r11d
movl %r10d, %eax
negl %eax
movl %eax, 0x44(%rsp)
movq 0x10(%r8), %rcx
movq 0x18(%r8), %rsi
movq %r10, 0x70(%rsp)
movslq %r10d, %rax
movq %rax, 0x78(%rsp)
movq %rcx, 0x58(%rsp)
cmpq %rsi, %rcx
movq %rdi, 0x50(%rsp)
movq %rsi, 0x88(%rsp)
jne 0xeeb5
movq %rdx, %rax
subq %rdi, %rax
je 0xf6bf
jae 0xee9f
movslq 0x44(%rsp), %rcx
cmpq %rcx, %rax
jl 0xeeb5
incl %eax
movl %eax, 0x44(%rsp)
jmp 0xeeb5
notq %rdi
addq %rdx, %rdi
movq 0x78(%rsp), %rax
cmpq %rax, %rdi
cmovgel %eax, %edi
movq %rdi, 0x70(%rsp)
movq -0x10(%r14), %r8
movq -0x8(%r14), %r15
leal -0x1(%r11), %ecx
movq %rbx, %rsi
leal 0x1(%rbx), %eax
movslq %ecx, %rcx
pushq $-0x2
popq %rdi
cmpq %rax, %rcx
jg 0xeedf
movl %edi, (%r15,%rcx,4)
movl %edi, (%r8,%rcx,4)
incq %rcx
jmp 0xeecd
movl %r9d, 0x6c(%rsp)
orl $-0x1, (%r15)
incl %r11d
decl %esi
movslq 0x14(%rsp), %rax
movq %rax, 0x38(%rsp)
movslq %r12d, %r13
xorl %ecx, %ecx
movq %r14, 0x8(%rsp)
movq %rbp, 0x20(%rsp)
movq %r12, 0x48(%rsp)
movq %r15, 0x28(%rsp)
cmpq 0x78(%rsp), %rcx
jg 0xf68e
testb $0x1, %cl
jne 0xef38
xorl %eax, %eax
cmpl 0x44(%rsp), %r11d
setg %al
subl %eax, %r11d
xorl %eax, %eax
cmpl 0x70(%rsp), %esi
setl %al
addl %eax, %esi
movq (%r14,%rcx,8), %r15
movq (%rbp,%rcx,8), %rdi
movq %rcx, 0x90(%rsp)
movl %ecx, %eax
movq %rax, (%rsp)
movq %r11, 0x60(%rsp)
movslq %r11d, %rbx
pushq $-0x2
popq %rcx
movl %ecx, -0x4(%r15,%rbx,4)
movq %rsi, 0x80(%rsp)
movslq %esi, %rsi
movl %ecx, 0x4(%r15,%rsi,4)
movq 0x50(%rsp), %rax
leaq (%rax,%rsi), %r9
movl 0x34(%rsp), %eax
subl %esi, %eax
movslq %eax, %r12
movl %ecx, %r14d
movq 0x38(%rsp), %r11
cmpq %r11, %rsi
jle 0xf031
leal 0x1(%r14), %ebp
movl -0x4(%r8,%rsi,4), %r10d
movq 0x28(%rsp), %rax
movl (%rax,%rsi,4), %r11d
leal 0x1(%r11), %ecx
cmpl %r10d, %ecx
jge 0xefc2
xorl %eax, %eax
cmpl %r10d, %ebp
setge %al
leal -0x1(%rax,%rax,4), %eax
cmovgl %ebp, %r10d
movl %r10d, %r14d
jmp 0xefd3
xorl %eax, %eax
cmpl %r11d, %r14d
setge %al
cmovll %ecx, %ebp
shll $0x2, %eax
movl %ebp, %r14d
movl %eax, (%rdi,%rsi,4)
movslq %r14d, %rbp
cmpq %r13, %r12
movq 0x38(%rsp), %r11
jle 0xf002
movq 0x48(%rsp), %rax
cmpl %eax, %r14d
cmovlel %eax, %r14d
cmpq %r13, %rbp
jge 0xf01f
movb (%rdx,%rbp), %al
cmpb (%r9,%rbp), %al
jne 0xf01c
incq %rbp
jmp 0xefef
cmpl %r12d, %r14d
cmovlel %r12d, %r14d
cmpq %r12, %rbp
jge 0xf01f
movb (%rdx,%rbp), %al
cmpb (%r9,%rbp), %al
jne 0xf01c
incq %rbp
jmp 0xf009
movl %ebp, %r14d
movl %r14d, (%r15,%rsi,4)
decq %rsi
decq %r9
incq %r12
jmp 0xef89
movq 0x50(%rsp), %rax
leaq (%rax,%rbx), %r9
movl 0x34(%rsp), %eax
subl %ebx, %eax
movslq %eax, %rsi
pushq $-0x2
popq %rax
movl %eax, %r12d
cmpq %r11, %rbx
jge 0xf0de
movl 0x4(%r8,%rbx,4), %r10d
leal 0x1(%r10), %eax
movq 0x28(%rsp), %rcx
movl (%rcx,%rbx,4), %ecx
leal 0x1(%rcx), %ebp
xorl %r14d, %r14d
cmpl %r12d, %ebp
jge 0xf081
cmpl %r12d, %eax
setl %r14b
cmovgl %eax, %r12d
incl %r14d
movl %r12d, %ebp
jmp 0xf08b
cmpl %ecx, %r10d
setge %r14b
cmovgel %eax, %ebp
movl %r14d, (%rdi,%rbx,4)
movslq %ebp, %r12
cmpq %r13, %rsi
jle 0xf0b5
movq 0x48(%rsp), %rax
cmpl %eax, %ebp
cmovlel %eax, %ebp
cmpq %r13, %r12
jge 0xf0c9
movb (%rdx,%r12), %al
cmpb (%r9,%r12), %al
jne 0xf0cc
incq %r12
jmp 0xf0a1
cmpq %rsi, %r12
jge 0xf0cc
movb (%rdx,%r12), %al
cmpb (%r9,%r12), %al
jne 0xf0cc
incq %r12
jmp 0xf0b5
movl %ebp, %r12d
movl %r12d, (%r15,%rbx,4)
incq %rbx
incq %r9
decq %rsi
jmp 0xf049
movl 0x4(%r15,%r11,4), %r10d
leal 0x1(%r10), %ebp
movslq %ebx, %r8
movq 0x28(%rsp), %rax
movl (%rax,%r8,4), %r11d
leal 0x1(%r11), %ecx
cmpl %r12d, %ecx
jge 0xf10e
xorl %eax, %eax
cmpl %r12d, %ebp
setge %al
leal 0x2(%rax,%rax), %eax
cmovgl %ebp, %r12d
jmp 0xf11f
xorl %eax, %eax
cmpl %r11d, %r10d
setge %al
cmovll %ecx, %ebp
shll $0x2, %eax
movl %ebp, %r12d
movl %eax, (%rdi,%r8,4)
movslq %r12d, %rbx
movq 0x48(%rsp), %rax
cmpl %eax, %esi
movq 0x38(%rsp), %r10
jle 0xf156
cmpl %eax, %r12d
cmovlel %eax, %r12d
movq 0x80(%rsp), %rsi
cmpq %r13, %rbx
jge 0xf179
movb (%rdx,%rbx), %al
cmpb (%r9,%rbx), %al
jne 0xf17c
incq %rbx
jmp 0xf143
movslq %esi, %rax
movq 0x8(%rsp), %r14
movq 0x80(%rsp), %rsi
cmpq %rax, %rbx
jge 0xf181
movb (%rdx,%rbx), %cl
cmpb (%r9,%rbx), %cl
jne 0xf181
incq %rbx
jmp 0xf166
movl %r12d, %ebx
movq 0x8(%rsp), %r14
movl %ebx, (%r15,%r8,4)
movq 0x90(%rsp), %rcx
incq %rcx
movq 0x28(%rsp), %r8
movq 0x48(%rsp), %r12
cmpl %r12d, (%r15,%r10,4)
movq 0x20(%rsp), %rbp
movq 0x60(%rsp), %r11
jl 0xef0b
movq 0x50(%rsp), %rax
movl %eax, %esi
notl %esi
movl %edx, %eax
subl 0x88(%rsp), %eax
movl %eax, 0x34(%rsp)
movq (%rbp), %r15
pushq $0x3
popq %rcx
movl %ecx, (%r15)
movq 0x38(%rsp), %r8
movl (%rdi,%r8,4), %eax
movl %ecx, (%rdi,%r8,4)
movl 0x6c(%rsp), %ecx
cmpl $0x1, %ecx
movl %esi, 0x60(%rsp)
je 0xf3eb
cmpl $-0x1, %ecx
movq 0x18(%rsp), %r8
movq (%rsp), %rbx
jne 0xf5bb
movl 0x14(%rsp), %ecx
movl %ecx, %esi
cmpl $0x3, %eax
je 0xf5f0
leal (%rax,%rsi), %r10d
cmpl $0x2, %eax
jl 0xf21c
addl $-0x3, %r10d
jmp 0xf227
testl %eax, %eax
je 0xf225
addl $-0x2, %ebx
jmp 0xf227
decl %ebx
cmpl %esi, %r10d
movq %rbx, (%rsp)
jle 0xf27c
movslq %esi, %r11
movq 0x50(%rsp), %rcx
leaq (%rcx,%r11), %r13
movl %esi, %ecx
negl %ecx
movl %esi, %r8d
sarl $0x1f, %r8d
andl %ecx, %r8d
movslq %ebx, %rbx
movq (%r14,%rbx,8), %rcx
movslq %r10d, %r9
movq %rcx, 0x28(%rsp)
movl (%rcx,%r9,4), %ecx
cmpl %r12d, %ecx
cmovll %ecx, %r12d
cmpl %r8d, %r12d
jl 0xf28a
movl %r12d, %ecx
movb (%r13,%rcx), %dil
cmpb (%rdx,%rcx), %dil
jne 0xf28a
decl %r12d
jmp 0xf264
movq %r12, %r13
movslq %ebx, %rbx
movslq %r10d, %r11
jmp 0xf3cd
movq %r12, %r13
cmpl $0x1, %eax
jne 0xf2de
movq (%rsp), %r14
movslq %r14d, %r8
movq 0x8(%rsp), %rdi
movq 0x10(%rdi,%r8,8), %rcx
movslq %esi, %rax
movq %r13, %r12
cmpl -0x4(%rcx,%rax,4), %r12d
jge 0xf344
addl $0x2, %r14d
movq %r14, (%rsp)
addq $0x2, %r8
decl %esi
decq %rax
movq %rax, %r11
movq %r8, %rbx
movl %esi, %r10d
pushq $0x2
popq %rax
movq 0x18(%rsp), %r8
movq %rdi, %r14
jmp 0xf3cd
movq %r9, 0x48(%rsp)
movq (%rsp), %rbp
leal -0x2(%rbp), %r8d
movl 0x14(%rsp), %r14d
cmpl %r14d, %esi
cmovel %ebp, %r8d
movslq %r8d, %rcx
movq 0x8(%rsp), %r9
movq %rcx, 0x38(%rsp)
movq (%r9,%rcx,8), %rdi
movslq %esi, %rcx
movq %r13, %r12
cmpl -0x4(%rdi,%rcx,4), %r12d
jge 0xf366
leal -0x1(%rsi), %r10d
decq %rcx
xorl %eax, %eax
cmpl %r14d, %esi
sete %al
leal -0x1(%rax,%rax,2), %eax
movq %rcx, %r11
movq 0x38(%rsp), %rbx
movl %r8d, %ecx
movq %rcx, (%rsp)
movq 0x18(%rsp), %r8
movq %r9, %r14
jmp 0xf3c8
movq 0x8(%rdi,%r8,8), %rax
cmpl %r12d, (%rax,%r11,4)
jne 0xf387
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
incq %r8
xorl %eax, %eax
movq %r8, %rbx
movl %esi, %r10d
jmp 0xf39e
movslq %ebp, %rcx
movq -0x8(%r9,%rcx,8), %rdi
cmpl %r12d, (%rdi,%r11,4)
jne 0xf3aa
decl %ebp
movq %rbp, (%rsp)
decq %rcx
xorl %eax, %eax
movq %rcx, %rbx
movl %esi, %r10d
jmp 0xf3be
movq %r12, %rax
movq 0x28(%rsp), %rcx
movl %eax, (%rcx,%r9,4)
decl %eax
movq %rax, %r13
movq %r9, %r11
pushq $0x1
popq %rax
movq 0x18(%rsp), %r8
movq 0x8(%rsp), %r14
jmp 0xf3cd
movq 0x48(%rsp), %r11
movq 0x28(%rsp), %rcx
movl %r12d, (%rcx,%r11,4)
decl %r12d
movq %r12, %r13
movq 0x18(%rsp), %r8
movq 0x8(%rsp), %r14
movq 0x20(%rsp), %rbp
movq (%rbp,%rbx,8), %rcx
movl (%rcx,%r11,4), %edi
movl %eax, (%rcx,%r11,4)
movl %r10d, %esi
movl %edi, %eax
movq %r13, %r12
movq (%rsp), %rbx
jmp 0xf204
movl 0x14(%rsp), %ecx
movl %ecx, %esi
movq 0x18(%rsp), %r8
movq (%rsp), %rdi
cmpl $0x3, %eax
je 0xf5f0
leal (%rax,%rsi), %r10d
cmpl $0x2, %eax
jl 0xf412
addl $-0x3, %r10d
jmp 0xf41d
testl %eax, %eax
je 0xf41b
addl $-0x2, %edi
jmp 0xf41d
decl %edi
cmpl %esi, %r10d
movq %rdi, (%rsp)
jge 0xf47b
movslq %esi, %r11
movq 0x50(%rsp), %rcx
leaq (%rcx,%r11), %r13
movl %esi, %ecx
negl %ecx
movl %esi, %r8d
sarl $0x1f, %r8d
andl %ecx, %r8d
movslq %edi, %rbx
movq (%r14,%rbx,8), %rcx
movslq %r10d, %rbp
movq %rcx, 0x28(%rsp)
movl (%rcx,%rbp,4), %ecx
leal -0x1(%rcx), %edi
cmpl %r12d, %ecx
cmovlel %edi, %r12d
movq %r12, %rdi
cmpl %r8d, %edi
jl 0xf486
movl %edi, %ecx
movq %rdi, %r14
movb (%r13,%rcx), %dil
cmpb (%rdx,%rcx), %dil
movq %r14, %rdi
jne 0xf486
decl %edi
jmp 0xf45f
movslq %edi, %rbx
movslq %r10d, %r11
jmp 0xf5a4
cmpl $-0x1, %eax
je 0xf4e4
movq %rbp, 0x38(%rsp)
movq (%rsp), %r9
leal -0x2(%r9), %r8d
movl 0x14(%rsp), %ebp
cmpl %ebp, %esi
cmovel %r9d, %r8d
movslq %r8d, %r13
movq 0x8(%rsp), %r14
movq %rdi, %r12
movq (%r14,%r13,8), %rdi
movslq %esi, %rcx
cmpl 0x4(%rdi,%rcx,4), %r12d
jle 0xf523
movslq %r9d, %rcx
movq -0x8(%r14,%rcx,8), %rdi
cmpl %r12d, (%rdi,%r11,4)
movq %r12, %rdi
jne 0xf56b
movq %rdi, %r12
decl %r9d
movq %r9, (%rsp)
decq %rcx
xorl %eax, %eax
movq %rcx, %rbx
jmp 0xf51e
movq (%rsp), %r9
movslq %r9d, %r8
movq 0x8(%rsp), %r14
movq 0x10(%r14,%r8,8), %rcx
movslq %esi, %rax
cmpl 0x4(%rcx,%rax,4), %edi
jle 0xf544
movq 0x8(%r14,%r8,8), %rax
cmpl %edi, (%rax,%r11,4)
jne 0xf581
movq %rdi, %r12
movq (%rsp), %rax
incl %eax
movq %rax, (%rsp)
incq %r8
xorl %eax, %eax
movq %r8, %rbx
movl %esi, %r10d
jmp 0xf595
leal 0x1(%rsi), %r10d
incq %rcx
xorl %eax, %eax
cmpl %ebp, %esi
sete %al
leal 0x1(%rax,%rax,2), %eax
movq %rcx, %r11
movq %r13, %rbx
movl %r8d, %ecx
movq %rcx, (%rsp)
jmp 0xf564
movq %rdi, %r12
addl $0x2, %r9d
movq %r9, (%rsp)
addq $0x2, %r8
incl %esi
incq %rax
movq %rax, %r11
movq %r8, %rbx
movl %esi, %r10d
pushq $0x4
popq %rax
movq 0x18(%rsp), %r8
jmp 0xf59f
movq %rdi, %r12
leal 0x1(%rdi), %ecx
movq 0x38(%rsp), %r11
movq 0x28(%rsp), %rsi
movl %ecx, (%rsi,%r11,4)
jmp 0xf595
movq %rdi, %r12
leal 0x1(%rdi), %eax
movq 0x28(%rsp), %rcx
movl %eax, (%rcx,%rbp,4)
movq %rbp, %r11
pushq $-0x1
popq %rax
movq 0x18(%rsp), %r8
movq 0x8(%rsp), %r14
movq 0x20(%rsp), %rbp
movq (%rbp,%rbx,8), %rcx
movl (%rcx,%r11,4), %edi
movl %eax, (%rcx,%r11,4)
movl %r10d, %esi
movl %edi, %eax
jmp 0xf3f6
movl 0x14(%rsp), %ecx
cmpl $0x3, %eax
je 0xf5f0
addl %eax, %ecx
cmpl $0x2, %eax
jl 0xf5d0
addl $-0x3, %ecx
jmp 0xf5db
testl %eax, %eax
je 0xf5d9
addl $-0x2, %ebx
jmp 0xf5db
decl %ebx
movslq %ebx, %rdx
movq (%rbp,%rdx,8), %rdx
movslq %ecx, %rsi
movl (%rdx,%rsi,4), %edi
movl %eax, (%rdx,%rsi,4)
movl %edi, %eax
jmp 0xf5bf
movq 0x58(%rsp), %rax
addl 0x60(%rsp), %eax
movq %rax, 0x58(%rsp)
movl 0x34(%rsp), %r10d
incl %r10d
xorl %edx, %edx
xorl %eax, %eax
movl (%r15), %esi
cmpl $0x3, %esi
je 0xf66f
movl %edx, %ecx
subl %esi, %ecx
cmpl $0x2, %esi
jl 0xf622
addl $0x3, %ecx
movl %eax, %esi
jmp 0xf62e
testl %esi, %esi
je 0xf62b
leal 0x2(%rax), %esi
jmp 0xf62e
leal 0x1(%rax), %esi
cltq
movq (%r14,%rax,8), %rax
movslq %edx, %rdi
movl (%rax,%rdi,4), %eax
cmpl %edx, %ecx
jle 0xf643
addl %r10d, %eax
jmp 0xf64e
jge 0xf65a
addl %eax, %edx
movq 0x58(%rsp), %rax
subl %edx, %eax
movq (%r8), %rdx
leaq 0x4(%rdx), %rdi
movq %rdi, (%r8)
movl %eax, (%rdx)
movslq %esi, %rax
movslq %ecx, %r15
shlq $0x2, %r15
addq (%rbp,%rax,8), %r15
movl %ecx, %edx
movl %esi, %eax
jmp 0xf60a
movl 0x14(%rsp), %edx
movl %edx, %ecx
negl %ecx
cmovsl %edx, %ecx
addl %ecx, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe963(%rip), %rax      # 0x1dff8
movq (%rax), %rdi
leaq 0xec51(%rip), %rax      # 0x1e2f0
movq (%rax), %rdx
leaq 0x8fb3(%rip), %rsi      # 0x1865c
leaq 0x908f(%rip), %rcx      # 0x1873f
xorl %eax, %eax
callq 0x11a0
pushq $0x1
popq %rdi
callq 0x1280
movq 0xe932(%rip), %rax      # 0x1dff8
movq (%rax), %rdi
leaq 0xec20(%rip), %rax      # 0x1e2f0
movq (%rax), %rdx
leaq 0x902b(%rip), %rsi      # 0x18705
xorl %eax, %eax
callq 0x11a0
jmp 0xf6b7