// File: /workspace/github_c_makefile_star2_O0/thegenemyers[P]DASCRUBBER/align.c
// Function: Local_Alignment
Path *Local_Alignment(Alignment *align, Work_Data *ework, Align_Spec *espec,
                      int low, int hgh, int anti, int lbord, int hbord)
{ _Work_Data  *work = ( _Work_Data *) ework;
  _Align_Spec *spec = (_Align_Spec *) espec;

  Path *apath, *bpath;
  int   aoff, boff;
  int   minp, maxp;
  int   selfie;
  int   fshort, rshort;

  { int alen, blen;
    int maxtp, wsize;

    alen = align->alen;
    blen = align->blen;

    if (hgh-low >= 7500)
      wsize = VectorEl*(hgh-low+1);
    else
      wsize = VectorEl*10000;
    if (wsize >= work->vecmax)
      if (enlarge_vector(work,wsize))
        EXIT(NULL);

    if (alen < blen)
      maxtp = 2*(blen/spec->trace_space+2);
    else
      maxtp = 2*(alen/spec->trace_space+2);
    wsize = 4*maxtp*sizeof(uint16) + sizeof(Path);
    if (wsize > work->pntmax)
      if (enlarge_points(work,wsize))
        EXIT(NULL);

    apath = align->path;
    bpath = (Path *) work->points;

    apath->trace = ((uint16 *) (bpath+1)) + maxtp;
    bpath->trace = ((uint16 *) apath->trace) +  2*maxtp;
  }

#ifdef DEBUG_PASSES
  printf("\n");
#endif

  selfie = (align->aseq == align->bseq);

  while (((anti-hgh) >> 1) < 0)
    hgh -= 1;
   
  if (lbord < 0)
    { if (selfie && low >= 0)
        minp = 1;
      else
        minp = -INT32_MAX;
    }
  else
    minp = low-lbord;
  if (hbord < 0)
    { if (selfie && hgh <= 0)
        maxp = -1;
      else
        maxp = INT32_MAX;
    }
  else
    maxp = hgh+hbord;

  if (ACOMP(align->flags))
    { aoff = align->alen % spec->trace_space;
      boff = 0;
    }
  else if (COMP(align->flags))
    { aoff = 0;
      boff = align->blen % spec->trace_space;
    }
  else
    { aoff = 0;
      boff = 0;
    }

  if (forward_wave(work,spec,align,bpath,&low,hgh,anti,minp,maxp,aoff,boff))
    EXIT(NULL);

  fshort = ((apath->aepos + apath->bepos) - anti < DUB_TRIM);

#ifdef DEBUG_PASSES
  printf("F1 (%d,%d) ~ %d => (%d,%d) %d\n",
         (2*anti+(low+hgh))/4,(2*anti-(low+hgh))/4,hgh-low,
         apath->aepos,apath->bepos,apath->diffs);
#endif

  if (reverse_wave(work,spec,align,bpath,low,low,anti,minp,maxp,aoff,boff))
    EXIT(NULL);

#ifdef DEBUG_PASSES
  printf("R1 (%d,%d) => (%d,%d) %d\n",
         (anti+low)/2,(anti-low)/2,apath->abpos,apath->bbpos,apath->diffs);
#endif

  rshort = (anti - (apath->abpos + apath->bbpos) < DUB_TRIM);

  if (fshort)
    { if (rshort)
        { apath->aepos = apath->abpos = (apath->abpos+apath->aepos)/2;
          apath->bepos = apath->bbpos = (apath->bbpos+apath->bepos)/2;
          bpath->aepos = bpath->abpos = (bpath->abpos+bpath->aepos)/2;
          bpath->bepos = bpath->bbpos = (bpath->bbpos+bpath->bepos)/2;
          apath->tlen  = 0;
          bpath->tlen  = 0;
        }
      else
        { low  = apath->abpos - apath->bbpos;
          anti = apath->abpos + apath->bbpos;
          apath->tlen = bpath->tlen = 0;
          if (forward_wave(work,spec,align,bpath,&low,low,anti,minp,maxp,aoff,boff))
            EXIT(NULL);
        }
    }
  else
    { if (rshort)
        { low  = apath->aepos - apath->bepos;
          anti = apath->aepos + apath->bepos;
          apath->tlen = bpath->tlen = 0;
          apath->diffs = 0;
          if (reverse_wave(work,spec,align,bpath,low,low,anti,minp,maxp,aoff,boff))
            EXIT(NULL);
        }
    }
        

  bpath->diffs = apath->diffs;
  if (ACOMP(align->flags))
    { uint16 *trace = (uint16 *) apath->trace;
      uint16  p;
      int     i, j;

      bpath->aepos = apath->bepos;
      bpath->bepos = apath->aepos;
      bpath->abpos = apath->bbpos;
      bpath->bbpos = apath->abpos;

      apath->abpos = align->alen - bpath->bepos;
      apath->bbpos = align->blen - bpath->aepos;
      apath->aepos = align->alen - bpath->bbpos;
      apath->bepos = align->blen - bpath->abpos;
      i = apath->tlen-2;
      j = 0;
      while (j < i)
        { p = trace[i];
          trace[i] = trace[j];
          trace[j] = p;
          p = trace[i+1];
          trace[i+1] = trace[j+1];
          trace[j+1] = p;
          i -= 2;
          j += 2;
        }
    }
  else if (COMP(align->flags))
    { uint16 *trace = (uint16 *) bpath->trace;
      uint16  p;
      int     i, j;

      bpath->abpos = align->blen - apath->bepos;
      bpath->bbpos = align->alen - apath->aepos;
      bpath->aepos = align->blen - apath->bbpos;
      bpath->bepos = align->alen - apath->abpos;
      i = bpath->tlen-2;
      j = 0;
      while (j < i)
        { p = trace[i];
          trace[i] = trace[j];
          trace[j] = p;
          p = trace[i+1];
          trace[i+1] = trace[j+1];
          trace[j+1] = p;
          i -= 2;
          j += 2;
        }
    }
  else
    { bpath->aepos = apath->bepos;
      bpath->bepos = apath->aepos;
      bpath->abpos = apath->bbpos;
      bpath->bbpos = apath->abpos;
    }

#ifdef DEBUG_POINTS
  { uint16 *trace = (uint16 *) apath->trace;
    int     a, h;

    printf("\nA-path (%d,%d)->(%d,%d)",apath->abpos,apath->bbpos,apath->aepos,apath->bepos);
    printf(" %c\n",((COMP(align->flags) || ACOMP(align->flags)) ? 'c' : 'n'));
    a = apath->bbpos;
    for (h = 1; h < apath->tlen; h += 2)
      { int dif = trace[h-1];
        int del = trace[h];
        a += del;
        printf("      %d / %d (%d)\n",dif,del,a);
      }
  }

  { uint16 *trace = (uint16 *) bpath->trace;
    int     a, h;

    printf("\nB-path (%d,%d)->(%d,%d)",bpath->abpos,bpath->bbpos,bpath->aepos,bpath->bepos);
    printf(" %c [%d,%d]\n",((COMP(align->flags) || ACOMP(align->flags)) ? 'c' : 'n'),
                           align->blen,align->alen);
    a = bpath->bbpos;
    for (h = 1; h < bpath->tlen; h += 2)
      { int dif = trace[h-1];
        int del = trace[h];
        a += del;
        printf("      %d / %d (%d)\n",dif,del,a);
      }
  }
#endif

  return (bpath);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0xd0, %rsp
movl 0x18(%rbp), %eax
movl 0x10(%rbp), %eax
movq %rdi, -0x18(%rbp)
movq %rsi, -0x20(%rbp)
movq %rdx, -0x28(%rbp)
movl %ecx, -0x2c(%rbp)
movl %r8d, -0x30(%rbp)
movl %r9d, -0x34(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movl %eax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movl %eax, -0x7c(%rbp)
movl -0x30(%rbp), %eax
subl -0x2c(%rbp), %eax
cmpl $0x1d4c, %eax           # imm = 0x1D4C
jl 0x49a6
movl 0x2685e(%rip), %eax     # 0x2b1f0
movl -0x30(%rbp), %ecx
subl -0x2c(%rbp), %ecx
addl $0x1, %ecx
imull %ecx, %eax
movl %eax, -0x84(%rbp)
jmp 0x49b6
imull $0x2710, 0x26840(%rip), %eax # imm = 0x2710
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jl 0x49e4
movq -0x40(%rbp), %rdi
movl -0x84(%rbp), %esi
callq 0x5220
cmpl $0x0, %eax
je 0x49e2
movl $0x1, %edi
callq 0x2290
jmp 0x49e4
movl -0x78(%rbp), %eax
cmpl -0x7c(%rbp), %eax
jge 0x4a01
movl -0x7c(%rbp), %eax
movq -0x48(%rbp), %rcx
cltd
idivl 0x8(%rcx)
addl $0x2, %eax
shll %eax
movl %eax, -0x80(%rbp)
jmp 0x4a14
movl -0x78(%rbp), %eax
movq -0x48(%rbp), %rcx
cltd
idivl 0x8(%rcx)
addl $0x2, %eax
shll %eax
movl %eax, -0x80(%rbp)
movl -0x80(%rbp), %eax
shll $0x2, %eax
cltq
shlq %rax
addq $0x20, %rax
movl %eax, -0x84(%rbp)
movl -0x84(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jle 0x4a58
movq -0x40(%rbp), %rdi
movl -0x84(%rbp), %esi
callq 0x52a0
cmpl $0x0, %eax
je 0x4a56
movl $0x1, %edi
callq 0x2290
jmp 0x4a58
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x40(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rcx
addq $0x20, %rcx
movslq -0x80(%rbp), %rax
shlq %rax
addq %rax, %rcx
movq -0x50(%rbp), %rax
movq %rcx, (%rax)
movq -0x50(%rbp), %rax
movq (%rax), %rcx
movl -0x80(%rbp), %eax
shll %eax
cltq
shlq %rax
addq %rax, %rcx
movq -0x58(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x18(%rcx), %rax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x6c(%rbp)
movl -0x34(%rbp), %eax
subl -0x30(%rbp), %eax
sarl %eax
cmpl $0x0, %eax
jge 0x4ad6
movl -0x30(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x4abe
cmpl $0x0, 0x10(%rbp)
jge 0x4afa
cmpl $0x0, -0x6c(%rbp)
je 0x4af1
cmpl $0x0, -0x2c(%rbp)
jl 0x4af1
movl $0x1, -0x64(%rbp)
jmp 0x4af8
movl $0x80000001, -0x64(%rbp) # imm = 0x80000001
jmp 0x4b03
movl -0x2c(%rbp), %eax
subl 0x10(%rbp), %eax
movl %eax, -0x64(%rbp)
cmpl $0x0, 0x18(%rbp)
jge 0x4b27
cmpl $0x0, -0x6c(%rbp)
je 0x4b1e
cmpl $0x0, -0x30(%rbp)
jg 0x4b1e
movl $0xffffffff, -0x68(%rbp) # imm = 0xFFFFFFFF
jmp 0x4b25
movl $0x7fffffff, -0x68(%rbp) # imm = 0x7FFFFFFF
jmp 0x4b30
movl -0x30(%rbp), %eax
addl 0x18(%rbp), %eax
movl %eax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x4b5a
movq -0x18(%rbp), %rax
movl 0x20(%rax), %eax
movq -0x48(%rbp), %rcx
cltd
idivl 0x8(%rcx)
movl %edx, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x4b94
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x4b84
movl $0x0, -0x5c(%rbp)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %eax
movq -0x48(%rbp), %rcx
cltd
idivl 0x8(%rcx)
movl %edx, -0x60(%rbp)
jmp 0x4b92
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
jmp 0x4b94
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl -0x30(%rbp), %r9d
movl -0x34(%rbp), %r14d
movl -0x64(%rbp), %ebx
movl -0x68(%rbp), %r11d
movl -0x5c(%rbp), %r10d
movl -0x60(%rbp), %eax
leaq -0x2c(%rbp), %r8
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x5320
cmpl $0x0, %eax
je 0x4be8
movl $0x1, %edi
callq 0x2290
movq -0x50(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x50(%rbp), %rcx
addl 0x1c(%rcx), %eax
subl -0x34(%rbp), %eax
cmpl $0x2d, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x70(%rbp)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movl -0x2c(%rbp), %r9d
movl -0x34(%rbp), %r14d
movl -0x64(%rbp), %ebx
movl -0x68(%rbp), %r11d
movl -0x5c(%rbp), %r10d
movl -0x60(%rbp), %eax
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x7840
cmpl $0x0, %eax
je 0x4c5b
movl $0x1, %edi
callq 0x2290
movl -0x34(%rbp), %eax
movq -0x50(%rbp), %rcx
movl 0x10(%rcx), %ecx
movq -0x50(%rbp), %rdx
addl 0x14(%rdx), %ecx
subl %ecx, %eax
cmpl $0x2d, %eax
setl %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x74(%rbp)
cmpl $0x0, -0x70(%rbp)
je 0x4dd6
cmpl $0x0, -0x74(%rbp)
je 0x4d43
movq -0x50(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x50(%rbp), %rcx
addl 0x18(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x50(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x50(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x50(%rbp), %rcx
addl 0x1c(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x50(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x58(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x58(%rbp), %rcx
addl 0x18(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x58(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x58(%rbp), %rax
movl 0x14(%rax), %eax
movq -0x58(%rbp), %rcx
addl 0x1c(%rcx), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x58(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x50(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x58(%rbp), %rax
movl $0x0, 0x8(%rax)
jmp 0x4dd1
movq -0x50(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x50(%rbp), %rcx
subl 0x14(%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %eax
movq -0x50(%rbp), %rcx
addl 0x14(%rcx), %eax
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x50(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl -0x2c(%rbp), %r9d
movl -0x34(%rbp), %r14d
movl -0x64(%rbp), %ebx
movl -0x68(%rbp), %r11d
movl -0x5c(%rbp), %r10d
movl -0x60(%rbp), %eax
leaq -0x2c(%rbp), %r8
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x5320
cmpl $0x0, %eax
je 0x4dcf
movl $0x1, %edi
callq 0x2290
jmp 0x4dd1
jmp 0x4e7b
cmpl $0x0, -0x74(%rbp)
je 0x4e79
movq -0x50(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x50(%rbp), %rcx
subl 0x1c(%rcx), %eax
movl %eax, -0x2c(%rbp)
movq -0x50(%rbp), %rax
movl 0x18(%rax), %eax
movq -0x50(%rbp), %rcx
addl 0x1c(%rcx), %eax
movl %eax, -0x34(%rbp)
movq -0x58(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x50(%rbp), %rax
movl $0x0, 0x8(%rax)
movq -0x50(%rbp), %rax
movl $0x0, 0xc(%rax)
movq -0x40(%rbp), %rdi
movq -0x48(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x58(%rbp), %rcx
movl -0x2c(%rbp), %r8d
movl -0x2c(%rbp), %r9d
movl -0x34(%rbp), %r14d
movl -0x64(%rbp), %ebx
movl -0x68(%rbp), %r11d
movl -0x5c(%rbp), %r10d
movl -0x60(%rbp), %eax
movl %r14d, (%rsp)
movl %ebx, 0x8(%rsp)
movl %r11d, 0x10(%rsp)
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x7840
cmpl $0x0, %eax
je 0x4e77
movl $0x1, %edi
callq 0x2290
jmp 0x4e79
jmp 0x4e7b
movq -0x50(%rbp), %rax
movl 0xc(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0xc(%rax)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x504a
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x50(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x50(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x50(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x58(%rbp), %rax
subl 0x1c(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x58(%rbp), %rax
subl 0x18(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x58(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x58(%rbp), %rax
subl 0x10(%rax), %ecx
movq -0x50(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x50(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x2, %eax
movl %eax, -0x98(%rbp)
movl $0x0, -0x9c(%rbp)
movl -0x9c(%rbp), %eax
cmpl -0x98(%rbp), %eax
jge 0x5045
movq -0x90(%rbp), %rax
movslq -0x98(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x92(%rbp)
movq -0x90(%rbp), %rax
movslq -0x9c(%rbp), %rcx
movw (%rax,%rcx,2), %dx
movq -0x90(%rbp), %rax
movslq -0x98(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movw -0x92(%rbp), %dx
movq -0x90(%rbp), %rax
movslq -0x9c(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0x90(%rbp), %rax
movl -0x98(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x92(%rbp)
movq -0x90(%rbp), %rax
movl -0x9c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %dx
movq -0x90(%rbp), %rax
movl -0x98(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movw -0x92(%rbp), %dx
movq -0x90(%rbp), %rax
movl -0x9c(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0x98(%rbp), %eax
subl $0x2, %eax
movl %eax, -0x98(%rbp)
movl -0x9c(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x9c(%rbp)
jmp 0x4f50
jmp 0x520a
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x51d0
movq -0x58(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x50(%rbp), %rax
subl 0x1c(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x50(%rbp), %rax
subl 0x18(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x14(%rax)
movq -0x18(%rbp), %rax
movl 0x24(%rax), %ecx
movq -0x50(%rbp), %rax
subl 0x14(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x18(%rbp), %rax
movl 0x20(%rax), %ecx
movq -0x50(%rbp), %rax
subl 0x10(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x58(%rbp), %rax
movl 0x8(%rax), %eax
subl $0x2, %eax
movl %eax, -0xb0(%rbp)
movl $0x0, -0xb4(%rbp)
movl -0xb4(%rbp), %eax
cmpl -0xb0(%rbp), %eax
jge 0x51ce
movq -0xa8(%rbp), %rax
movslq -0xb0(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0xaa(%rbp)
movq -0xa8(%rbp), %rax
movslq -0xb4(%rbp), %rcx
movw (%rax,%rcx,2), %dx
movq -0xa8(%rbp), %rax
movslq -0xb0(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movw -0xaa(%rbp), %dx
movq -0xa8(%rbp), %rax
movslq -0xb4(%rbp), %rcx
movw %dx, (%rax,%rcx,2)
movq -0xa8(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0xaa(%rbp)
movq -0xa8(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw (%rax,%rcx,2), %dx
movq -0xa8(%rbp), %rax
movl -0xb0(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movw -0xaa(%rbp), %dx
movq -0xa8(%rbp), %rax
movl -0xb4(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movw %dx, (%rax,%rcx,2)
movl -0xb0(%rbp), %eax
subl $0x2, %eax
movl %eax, -0xb0(%rbp)
movl -0xb4(%rbp), %eax
addl $0x2, %eax
movl %eax, -0xb4(%rbp)
jmp 0x50d9
jmp 0x5208
movq -0x50(%rbp), %rax
movl 0x1c(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x18(%rax)
movq -0x50(%rbp), %rax
movl 0x18(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x1c(%rax)
movq -0x50(%rbp), %rax
movl 0x14(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x50(%rbp), %rax
movl 0x10(%rax), %ecx
movq -0x58(%rbp), %rax
movl %ecx, 0x14(%rax)
jmp 0x520a
movq -0x58(%rbp), %rax
addq $0xd0, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nopw (%rax,%rax)