// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/extended/diagonalbandalign.c
// Function: evaluateDBcrosspoints
static void evaluateDBcrosspoints(GtLinspaceManagement *spacemanager,
                                  GtDiagAlignentry *Diagcolumn,
                                  const GtScoreHandler *scorehandler,
                                  LinearAlignEdge edge,
                                  GtUword rowoffset,
                                  GtUword coloffset,
                                  const GtUchar *useq,
                                  GtUword ustart,
                                  GtUword ulen,
                                  const GtUchar *vseq,
                                  GtUword vstart,
                                  GtUword vlen,
                                  GtWord left_dist,
                                  GtWord right_dist)
{
  GtUword idx, prevcpoint, cpoint, ctemp, new_ulen;
  GtWord new_left, new_right, diag = GT_DIV2(left_dist+right_dist);
  GtDiagAlignentry dtemp;

  if (ulen == 0)
  {
    for (idx = 1; idx <=vlen; idx++)
    {
      Diagcolumn[idx].currentrowindex = rowoffset;
      Diagcolumn[idx].last_type = Linear_I;
    }
    Diagcolumn[0].currentrowindex = rowoffset;
    Diagcolumn[0].last_type = edge;
    return;
  }

  if (vlen == 0)
  {
    Diagcolumn[0] = (GtDiagAlignentry) {ulen, edge};
    return;
  }

  if (gt_linspace_management_checksquare(spacemanager,ulen,vlen,
                                         sizeof (GtUword),sizeof(GtUword)))
  {
    dtab_in_square_space(spacemanager, Diagcolumn,
                         useq, ustart, ulen,
                         vseq, vstart, vlen,
                         left_dist, right_dist,
                         rowoffset, edge, scorehandler);
    return;
  }

  cpoint = evaluateallDBtabcolumns (spacemanager, Diagcolumn, scorehandler,edge,
                                    rowoffset, useq, ustart, ulen,
                                    vseq, vstart, vlen,
                                    left_dist, right_dist);

  /* if no crosspoint is found */
  if (cpoint == GT_UWORD_MAX)
  {
    if (diag < 0)
    {
      return evaluateDBcrosspoints(spacemanager,Diagcolumn, scorehandler, edge,
                                   rowoffset, coloffset, useq, ustart, ulen,
                                   vseq, vstart, vlen,
                                   diag+1, right_dist);
    }

    else if (diag > 0)
      return evaluateDBcrosspoints(spacemanager, Diagcolumn, scorehandler, edge,
                                   rowoffset, coloffset, useq, ustart, ulen,
                                   vseq, vstart, vlen,
                                   left_dist, diag-1);
    else
    {
      gt_assert(false); /* there have to be an crosspoint */
    }
  }

  /* exception, if last crosspoint != (m+1)entry, bottom right corner */
  if (cpoint != vlen)
  {
    if (diag + ((GtWord)ulen-(GtWord)vlen) > 0)
    {
      dtemp = Diagcolumn[cpoint];
      new_left = GT_MAX((GtWord)left_dist-diag+1,
                    -((GtWord)ulen-((GtWord)Diagcolumn[cpoint].currentrowindex+1
                    -(GtWord)rowoffset)));
      new_right = 0;
      new_ulen =  ulen - (Diagcolumn[cpoint].currentrowindex+1-rowoffset);
      evaluateDBcrosspoints(spacemanager, Diagcolumn+cpoint, scorehandler,
                            Linear_D, Diagcolumn[cpoint].currentrowindex+1,
                            coloffset+cpoint, useq,
                            Diagcolumn[cpoint].currentrowindex+1, new_ulen,
                            vseq, vstart+cpoint, vlen-cpoint,
                            new_left, new_right);

    Diagcolumn[cpoint] = dtemp;
    }
    else
    {
      new_left = -1;
      new_right =  GT_MIN((GtWord)right_dist-((GtWord)diag)-1,
                      ((GtWord)vlen-(GtWord)cpoint-1));
      new_ulen = ulen - (Diagcolumn[cpoint].currentrowindex-rowoffset);
      evaluateDBcrosspoints(spacemanager,Diagcolumn+cpoint+1,scorehandler,
                            Linear_I, Diagcolumn[cpoint].currentrowindex,
                            coloffset+cpoint+1, useq,
                            Diagcolumn[cpoint].currentrowindex, new_ulen,
                            vseq, vstart+cpoint+1, vlen-cpoint-1,
                            new_left, new_right);
    }
  }

  /* look at all 'normally' crosspoints,
     call segments between pairwise crosspoints*/
  while (Diagcolumn[cpoint].lastcpoint != GT_UWORD_MAX)
  {
    prevcpoint = cpoint;
    if (prevcpoint == 0)
      break;

    cpoint = Diagcolumn[cpoint].lastcpoint;
    ctemp =  Diagcolumn[cpoint].lastcpoint;
    if (Diagcolumn[prevcpoint].last_type == Linear_R ||
       ((Diagcolumn[prevcpoint].last_type == Linear_I) &&
       (prevcpoint-cpoint == 1)))
    {
      continue;
    }
    else if (Diagcolumn[prevcpoint].last_type == Linear_D)
    {
      new_left = -1;
      new_right = GT_MIN(right_dist-((GtWord)diag)-1,
                     (GtWord)prevcpoint-(GtWord)cpoint-1);
      new_ulen = Diagcolumn[prevcpoint].currentrowindex-
                 Diagcolumn[cpoint].currentrowindex-1;

      evaluateDBcrosspoints(spacemanager,Diagcolumn+cpoint+1,scorehandler,
                   Linear_I, Diagcolumn[cpoint].currentrowindex,
                   coloffset+cpoint+1, useq, Diagcolumn[cpoint].currentrowindex,
                   new_ulen, vseq, vstart + cpoint+1, prevcpoint-cpoint-1,
                   new_left, new_right);
    }
    else if (Diagcolumn[prevcpoint].last_type == Linear_I)
    {
      dtemp = Diagcolumn[cpoint];
      new_ulen = Diagcolumn[prevcpoint].currentrowindex-
                 Diagcolumn[cpoint].currentrowindex-1;
      new_left = GT_MAX(left_dist-diag+1,-new_ulen);
      new_right = 0;

      evaluateDBcrosspoints(spacemanager,Diagcolumn+cpoint,scorehandler,
                            Linear_D, Diagcolumn[cpoint].currentrowindex+1,
                            coloffset+cpoint, useq,
                            Diagcolumn[cpoint].currentrowindex+1, new_ulen,
                            vseq, vstart + cpoint, prevcpoint-1-cpoint,
                            new_left, new_right);
      Diagcolumn[cpoint] = dtemp;
    }
    else
    {
      /* if (Diagcolumn[cpoint].last_type == Linear_X), never reach this line */
      gt_assert(false);
    }
    Diagcolumn[cpoint].lastcpoint  = ctemp;
  }

  /* exception, if first crosspoint != 0-entry, upper left corner */
  if (vstart-coloffset != cpoint)
  {
    if (Diagcolumn[cpoint].last_type == Linear_D)
    {
      new_ulen = Diagcolumn[cpoint].currentrowindex-ustart-1;
      new_left =  GT_MAX(diag, -new_ulen);
      new_right = GT_MIN(right_dist, (GtWord)cpoint);

      evaluateDBcrosspoints(spacemanager, Diagcolumn, scorehandler,
                            edge, rowoffset, coloffset,
                            useq, ustart, new_ulen,
                            vseq, vstart, cpoint,
                            new_left, new_right);

    }
    else if (Diagcolumn[cpoint].last_type == Linear_I)
    {
      new_left = GT_MAX(left_dist,
                 -((GtWord)Diagcolumn[cpoint].currentrowindex-(GtWord)ustart));
      new_right = GT_MIN((GtWord)cpoint-1, diag);
      evaluateDBcrosspoints(spacemanager, Diagcolumn, scorehandler,
                            edge, rowoffset, coloffset, useq, ustart,
                            Diagcolumn[cpoint].currentrowindex-ustart,
                            vseq, vstart, cpoint-1,
                            new_left, new_right);
    }
    else if (Diagcolumn[cpoint].last_type == Linear_R ||
             Diagcolumn[cpoint].last_type  == Linear_X)
    {
      gt_assert(false); /* this cant be the first crosspoint or
                           it have to be 0-entry */
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movq %r8, %r13
movl %ecx, %ebx
movq 0x148(%rsp), %r14
movq 0x130(%rsp), %rbp
testq %rbp, %rbp
je 0x139e6d
testq %r14, %r14
je 0x139ea8
movq %rdi, %r15
movq %rdx, 0x8(%rsp)
movq %r9, 0x18(%rsp)
movq %rsi, (%rsp)
movq 0x158(%rsp), %r12
movl $0x8, %ecx
movl $0x8, %r8d
movq %rbp, %rsi
movq %r14, %rdx
callq 0x163af9
testb %al, %al
movq %r13, 0x48(%rsp)
movl %ebx, 0x14(%rsp)
je 0x139ebd
cmpq $0x0, (%rsp)
je 0x13a8da
movq 0x148(%rsp), %rcx
subq 0x130(%rsp), %rcx
movq %rcx, %rdx
sarq $0x3f, %rdx
andq %rcx, %rdx
xorl %eax, %eax
testq %rcx, %rcx
cmovgq %rcx, %rax
cmpq 0x150(%rsp), %rdx
movq 0x120(%rsp), %r14
jl 0x13a8e4
cmpq %r12, %rax
jg 0x13a8e4
movq %r15, %rdi
movq 0x130(%rsp), %r15
movq %r15, %rsi
movq 0x148(%rsp), %rdx
callq 0x163bd7
movq %rax, %rbx
movq %rax, %rdi
movq %r14, %rsi
movq %r12, %rax
movq 0x128(%rsp), %r12
movq %r12, %rdx
movq %r15, %rcx
movq 0x138(%rsp), %rbp
movq %rbp, %r8
movq 0x140(%rsp), %r15
movq %r15, %r9
movq 0x8(%rsp), %r14
pushq %r14
pushq %rax
pushq 0x160(%rsp)
pushq 0x160(%rsp)
callq 0x138f48
addq $0x20, %rsp
movq %rbx, 0x28(%rsp)
testq %rbx, %rbx
je 0x13a8e9
movq %r14, %rdi
callq 0x1797fb
movq %rax, 0x30(%rsp)
movq 0x120(%rsp), %rax
addq %r12, %rax
decq %rax
movq %rax, 0x38(%rsp)
leaq -0x1(%rbp,%r15), %rax
movq %rax, 0x58(%rsp)
movq 0x148(%rsp), %rdi
leaq (%rdi,%rdi,2), %rax
movq (%rsp), %rdx
leaq 0x8(%rdx,%rax,8), %rax
movq %rax, 0x50(%rsp)
movb $0x1, %r15b
movb $0x1, %r14b
movq %rdi, %rbp
movq 0x130(%rsp), %rbx
movq 0x28(%rsp), %r8
movl %r15d, %eax
andb %r14b, %al
testb $0x1, %al
je 0x139da2
movq -0x8(%r8,%rbx,8), %rax
movq (%r8,%rbx,8), %rcx
movq (%rcx,%rbp,8), %r12
movq -0x8(%rax,%rbp,8), %r13
movq 0x38(%rsp), %rax
movzbl (%rax,%rbx), %esi
movq 0x58(%rsp), %rax
movzbl (%rax,%rbp), %edx
movq 0x8(%rsp), %rdi
callq 0x17982a
movq (%rsp), %rdx
addq %r13, %rax
movq 0x48(%rsp), %r13
cmpq %rax, %r12
movq 0x148(%rsp), %rdi
movq 0x28(%rsp), %r8
jne 0x139da2
cmpq %rdi, %rbp
jne 0x139d7d
leaq (%rbx,%r13), %rax
movq 0x50(%rsp), %rcx
movq %rax, (%rcx)
leaq (,%rbp,2), %rax
addq %rbp, %rax
movl $0x0, 0x10(%rdx,%rax,8)
decq %rbp
leaq (%rbx,%r13), %rcx
decq %rcx
decq %rbx
jmp 0x139e42
testb $0x1, %r15b
je 0x139df5
movq -0x8(%r8,%rbx,8), %rax
movq (%r8,%rbx,8), %rcx
movq (%rax,%rbp,8), %rax
addq 0x30(%rsp), %rax
cmpq %rax, (%rcx,%rbp,8)
jne 0x139df5
cmpq %rdi, %rbp
jne 0x139dd1
leaq (%rbx,%r13), %rax
movq 0x50(%rsp), %rcx
movq %rax, (%rcx)
leaq (,%rbp,2), %rax
addq %rbp, %rax
movl $0x1, 0x10(%rdx,%rax,8)
leaq (%rbx,%r13), %rcx
decq %rcx
decq %rbx
movq %rcx, 0x8(%rdx,%rax,8)
jmp 0x139e47
testb $0x1, %r14b
je 0x13a8cb
movq (%r8,%rbx,8), %rax
movq -0x8(%rax,%rbp,8), %rcx
addq 0x30(%rsp), %rcx
cmpq %rcx, (%rax,%rbp,8)
jne 0x13a8cb
cmpq %rdi, %rbp
jne 0x139e28
leaq (%rbx,%r13), %rax
movq 0x50(%rsp), %rcx
movq %rax, (%rcx)
leaq (,%rbp,2), %rax
addq %rbp, %rax
movl $0x2, 0x10(%rdx,%rax,8)
decq %rbp
leaq (%rbx,%r13), %rcx
movq %rcx, -0x10(%rdx,%rax,8)
testq %rbp, %rbp
setne %r14b
testq %rbx, %rbx
setne %r15b
movq %rbp, %rax
orq %rbx, %rax
jne 0x139d12
movl 0x14(%rsp), %eax
movl %eax, 0x10(%rdx)
jmp 0x13a686
testq %r14, %r14
je 0x139e9c
incq %r14
cmpq $0x3, %r14
movl $0x2, %eax
cmovaeq %r14, %rax
decq %rax
leaq 0x28(%rsi), %rcx
movq %r13, -0x8(%rcx)
movl $0x2, (%rcx)
addq $0x18, %rcx
decq %rax
jne 0x139e89
movq %r13, 0x8(%rsi)
movl %ebx, 0x10(%rsi)
jmp 0x13a686
movl %ebx, %eax
movq %rbp, (%rsi)
movq %rax, 0x8(%rsi)
movl $0x0, 0x10(%rsi)
jmp 0x13a686
subq %rbp, %r14
movq %r14, %rdx
sarq $0x3f, %rdx
andq %r14, %rdx
xorl %eax, %eax
testq %r14, %r14
cmovgq %r14, %rax
movq 0x150(%rsp), %rbp
cmpq %rbp, %rdx
jl 0x13a8df
cmpq %r12, %rax
jg 0x13a8df
leaq (%r12,%rbp), %r14
movq %r15, %rdi
callq 0x163b94
movq %rax, %rbp
movq %r15, %rdi
callq 0x163ba0
movq %rax, 0x70(%rsp)
movq 0x8(%rsp), %rdi
callq 0x1797fb
movq %rbp, %r8
movq %rax, %r10
movq $0x0, (%rbp)
movq $-0x1, %rax
cmpq $0x1, %r14
ja 0x139f42
movq (%rsp), %rax
movl %ebx, 0x10(%rax)
movq $-0x1, (%rax)
movq %r13, 0x8(%rax)
xorl %eax, %eax
movq %r14, %rcx
sarq %rcx
movq %rcx, 0x20(%rsp)
movq 0x150(%rsp), %rcx
negq %rcx
movq %rcx, %r11
movq 0x70(%rsp), %r9
movq %rax, (%r9)
jae 0x139fcc
movl $0x1, %eax
movl $0x1, %edx
subq 0x150(%rsp), %rdx
cmpq $0x3, %rdx
movl $0x2, %ecx
cmovaeq %rdx, %rcx
movq 0x20(%rsp), %rdx
negq %rdx
movq (%rsp), %rdi
movq -0x8(%r8,%rax,8), %rsi
addq %r10, %rsi
movq %rsi, (%r8,%rax,8)
cmpq %rax, %rdx
jne 0x139fbb
movl $0x1, 0x10(%rdi)
movq $-0x1, (%rdi)
leaq (%rax,%r13), %rsi
movq %rsi, 0x8(%rdi)
xorl %esi, %esi
jmp 0x139fc0
movq -0x8(%r9,%rax,8), %rsi
movq %rsi, (%r9,%rax,8)
incq %rax
cmpq %rax, %rcx
jne 0x139f90
movq %r14, 0xa8(%rsp)
movq %r15, 0x40(%rsp)
movq 0x128(%rsp), %rax
movq 0x120(%rsp), %rdx
leaq (%rdx,%rax), %rcx
movq %rcx, 0xc0(%rsp)
leaq -0x1(%rdx,%rax), %rax
movq %rax, 0xb0(%rsp)
movq 0x138(%rsp), %rax
movq 0x140(%rsp), %rcx
leaq -0x1(%rax,%rcx), %rax
movq %rax, 0x80(%rsp)
movq 0x130(%rsp), %rax
movq %r11, %rdx
cmpq %rax, %r11
sete %r15b
movl $0x1, %edi
movl $0x1, %ecx
subq %rax, %rcx
movq %rcx, 0xb8(%rsp)
xorl %r11d, %r11d
movq 0x20(%rsp), %rax
movq %rax, 0x78(%rsp)
movq $-0x1, %r14
movq $-0x1, %rbx
movq %r8, 0x88(%rsp)
movq %r10, 0x60(%rsp)
movq (%r8), %r13
movq (%r9), %rax
cmpq %r12, %rdi
movq %rax, 0x58(%rsp)
jbe 0x13a096
cmpq %rdx, %r11
je 0x13a08b
movq 0x8(%r8), %rbx
movq 0x8(%r9), %r14
incq %r11
movq %rbx, %rbp
movq %r14, %r12
jmp 0x13a09c
movq %r13, %rbp
movq %rax, %r12
xorl %ebx, %ebx
cmpq 0x130(%rsp), %rdx
setb %bl
leaq (%rdx,%rbx), %rax
movq %rax, 0x30(%rsp)
subq %r11, %rax
movq %rax, 0xc8(%rsp)
setne %al
orb %r15b, %al
testb $0x1, %al
movq $-0x1, %rax
cmoveq %rax, %rbp
cmoveq %rax, %r12
leaq (%r10,%rbp), %rax
cmpq $-0x1, %rbp
cmoveq %rbp, %rax
movq %rax, (%r8)
movb $0x1, %r14b
testq %r11, %r11
movq %rdi, 0x28(%rsp)
movq %r11, 0x38(%rsp)
movq %rdx, 0x68(%rsp)
je 0x13a135
cmpq $-0x1, %r13
je 0x13a143
movq 0xb0(%rsp), %rax
movzbl (%rax,%r11), %esi
movq 0x80(%rsp), %rax
movzbl (%rax,%rdi), %edx
movq 0x8(%rsp), %rdi
callq 0x17982a
movq 0x70(%rsp), %r9
movq 0x88(%rsp), %r8
addq %r13, %rax
jmp 0x13a14a
xorl %eax, %eax
movq 0x48(%rsp), %rdx
movq 0x20(%rsp), %rsi
jmp 0x13a174
movq $-0x1, %rax
cmpq (%r8), %rax
movq 0x48(%rsp), %rdx
movq 0x20(%rsp), %rsi
jbe 0x13a15d
xorl %eax, %eax
jmp 0x13a165
movq %rax, (%r8)
movb $0x1, %al
xorl %r14d, %r14d
movq 0x60(%rsp), %r10
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %r11
testb %al, %al
je 0x13a1bf
movq %rdi, %rcx
subq %r11, %rcx
xorl %eax, %eax
cmpq %rsi, %rcx
movq 0x58(%rsp), %r14
jne 0x13a1a6
leaq (%rdi,%rdi,2), %rcx
movq (%rsp), %rsi
movl %eax, 0x10(%rsi,%rcx,8)
movq %r14, (%rsi,%rcx,8)
leaq (%r11,%rdx), %rax
movq %rax, 0x8(%rsi,%rcx,8)
movq %rdi, %r14
movq %r14, (%r9)
leaq 0x1(%r11), %rax
cmpq 0x30(%rsp), %rax
jbe 0x13a1dd
movq %rbp, %rbx
movq %r12, %r14
jmp 0x13a396
testb %r14b, %r14b
je 0x13a8d0
movq %rdi, %rcx
subq %r11, %rcx
movl $0x2, %eax
movq %r12, %r14
cmpq %rsi, %rcx
je 0x13a18a
jmp 0x13a1a6
leaq (%rdi,%rdi,2), %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq %rax, 0xd8(%rsp)
movq 0xc0(%rsp), %rax
addq %r11, %rax
movq %rax, 0xe0(%rsp)
leaq (%rdx,%r11), %rax
movq %rax, 0xd0(%rsp)
movq 0x78(%rsp), %rax
addq %r11, %rax
movq %rax, 0x58(%rsp)
movq 0xb8(%rsp), %rax
addq %r11, %rax
movq %rax, 0x50(%rsp)
movq %r11, %rax
subq 0x68(%rsp), %rax
subq %rbx, %rax
incq %rax
movq %rax, 0x68(%rsp)
movl $0x2, %r13d
testb $0x1, %r15b
jne 0x13a268
movq 0x68(%rsp), %rax
addq %r13, %rax
movq $-0x1, %rbx
movq $-0x1, %r14
cmpq $0x2, %rax
je 0x13a27e
leaq (%r11,%r13), %rax
decq %rax
testq %r11, %r11
cmovneq %r13, %rax
movq (%r8,%rax,8), %rbx
movq (%r9,%rax,8), %r14
movq 0x50(%rsp), %rax
addq %r13, %rax
cmpq $0x2, %rax
movzbl %r15b, %r15d
movl $0x1, %eax
cmovel %eax, %r15d
leaq (%rbx,%r10), %rax
cmpq $-0x1, %rbx
cmoveq %rbx, %rax
movq %rax, -0x8(%r8,%r13,8)
cmpq $-0x1, %rbp
je 0x13a2e4
movq 0xe0(%rsp), %rax
movzbl -0x2(%rax,%r13), %esi
movq 0x80(%rsp), %rax
movzbl (%rax,%rdi), %edx
movq 0x8(%rsp), %rdi
callq 0x17982a
movq 0x60(%rsp), %r10
movq 0x88(%rsp), %r8
addq %rbp, %rax
jmp 0x13a2eb
movq $-0x1, %rax
movl $0x2, %ecx
cmpq -0x8(%r8,%r13,8), %rax
ja 0x13a2fe
movq %rax, -0x8(%r8,%r13,8)
xorl %ecx, %ecx
movq -0x10(%r8,%r13,8), %rdx
leaq (%rdx,%r10), %rax
cmpq $-0x1, %rdx
cmoveq %rdx, %rax
cmpq -0x8(%r8,%r13,8), %rax
movq 0x70(%rsp), %r9
movq 0x28(%rsp), %rdi
movq 0x38(%rsp), %r11
jae 0x13a32f
movq %rax, -0x8(%r8,%r13,8)
movl $0x1, %ecx
testl %ecx, %ecx
je 0x13a342
cmpl $0x1, %ecx
jne 0x13a33f
movq -0x10(%r9,%r13,8), %r12
jmp 0x13a342
movq %r14, %r12
movq 0x58(%rsp), %rax
addq %r13, %rax
cmpq $0x2, %rax
jne 0x13a373
movq 0xd8(%rsp), %rdx
movl %ecx, 0x10(%rdx)
movq %r12, (%rdx)
movq 0xd0(%rsp), %rax
addq %r13, %rax
decq %rax
movq %rax, 0x8(%rdx)
movq %rdi, %r12
movq %r12, -0x8(%r9,%r13,8)
leaq (%r11,%r13), %rax
incq %rax
incq %r13
decq %rax
movq %r14, %r12
movq %rbx, %rbp
cmpq 0x30(%rsp), %rax
jbe 0x13a246
incq %rdi
decq 0x78(%rsp)
movq 0x30(%rsp), %rdx
cmpq 0x148(%rsp), %rdi
movq 0x158(%rsp), %r12
jbe 0x13a06e
movq 0xc8(%rsp), %rax
movq (%r9,%rax,8), %r14
cmpq $-0x1, %r14
movq 0x40(%rsp), %rdi
je 0x13a4c6
movq 0x148(%rsp), %rsi
movq %rsi, %rax
subq %r14, %rax
movq 0x48(%rsp), %rdx
movq 0x120(%rsp), %rbx
movq 0x20(%rsp), %r13
je 0x13a5eb
movq 0x130(%rsp), %r15
movq %r15, %rcx
subq %rsi, %rcx
addq %r13, %rcx
jle 0x13a579
leaq (%r14,%r14,2), %rcx
movq (%rsp), %rsi
leaq (%rsi,%rcx,8), %rbx
movq 0x10(%rbx), %rcx
movq %rcx, 0xa0(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x150(%rsp), %rcx
subq %r13, %rcx
movq 0x8(%rbx), %r10
leaq 0x1(%r10), %r8
addq %rdx, %r15
movq %r8, %rdx
subq %r15, %rdx
leaq 0x1(%rcx), %r11
cmpq %rdx, %rcx
cmovlq %rdx, %r11
notq %r10
addq %r15, %r10
movq 0x18(%rsp), %rcx
leaq (%r14,%rcx), %r9
movq 0x140(%rsp), %rcx
leaq (%r14,%rcx), %r15
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movl $0x1, %ecx
pushq $0x0
pushq %r11
pushq %rax
pushq %r15
pushq 0x158(%rsp)
pushq %r10
pushq %r8
pushq 0x158(%rsp)
callq 0x139b7b
addq $0x40, %rsp
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rbx)
movaps 0x90(%rsp), %xmm0
movups %xmm0, (%rbx)
jmp 0x13a5eb
movq 0x20(%rsp), %r14
testq %r14, %r14
movq 0x48(%rsp), %r8
movq 0x120(%rsp), %rax
js 0x13a537
cmpq $0x2, 0xa8(%rsp)
movl 0x14(%rsp), %ecx
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq 0x128(%rsp), %r10
movq 0x138(%rsp), %r11
movq 0x140(%rsp), %rbx
jb 0x13a8ee
decq %r14
movq 0x18(%rsp), %r9
pushq %r14
pushq 0x158(%rsp)
pushq 0x158(%rsp)
pushq %rbx
pushq %r11
pushq 0x158(%rsp)
pushq %r10
jmp 0x13a573
incq %r14
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movl 0x14(%rsp), %ecx
movq 0x18(%rsp), %r9
pushq %r12
pushq %r14
pushq 0x158(%rsp)
pushq 0x158(%rsp)
pushq 0x158(%rsp)
pushq 0x158(%rsp)
pushq 0x158(%rsp)
pushq %rax
jmp 0x13a8ba
movq %r13, %rax
notq %rax
addq %r12, %rax
movq %r14, %r10
notq %r10
addq %rsi, %r10
cmpq %r10, %rax
cmovgeq %r10, %rax
leaq (%r14,%r14,2), %rcx
movq (%rsp), %rsi
leaq (%rsi,%rcx,8), %rsi
addq $0x18, %rsi
movq -0x10(%rsi), %r8
addq %rdx, %r15
subq %r8, %r15
movq 0x18(%rsp), %rcx
leaq (%rcx,%r14), %r9
incq %r9
movq 0x140(%rsp), %rcx
leaq 0x1(%rcx,%r14), %r11
movq 0x8(%rsp), %rdx
movl $0x2, %ecx
pushq %rax
pushq $-0x1
pushq %r10
pushq %r11
pushq 0x158(%rsp)
pushq %r15
pushq %r8
pushq %rbx
callq 0x139b7b
addq $0x40, %rsp
leaq (%r14,%r14,2), %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,8), %rax
movq (%rax), %rcx
cmpq $-0x1, %rcx
sete %dl
testq %r14, %r14
sete %sil
orb %dl, %sil
je 0x13a698
movq %r14, %r15
movq %rax, %rbx
movq (%rsp), %rsi
movq 0x140(%rsp), %r14
movq %r14, %rax
subq 0x18(%rsp), %rax
cmpq %r15, %rax
movq 0x48(%rsp), %r8
je 0x13a686
movl 0x10(%rbx), %eax
cmpq $0x3, %rax
ja 0x13a686
leaq 0x2498d7(%rip), %rcx    # 0x383f1c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x128(%rsp), %r11
movq %r11, %rax
notq %rax
addq 0x8(%rbx), %rax
movq %rax, %r10
negq %r10
movq 0x20(%rsp), %rcx
cmpq %r10, %rcx
cmovaq %rcx, %r10
movq 0x158(%rsp), %rbx
cmpq %rbx, %r15
cmovlq %r15, %rbx
jmp 0x13a88f
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x150(%rsp), %rdx
subq %r13, %rdx
incq %rdx
movq %rdx, 0x38(%rsp)
notq %r13
addq %r12, %r13
movq 0x18(%rsp), %rdx
incq %rdx
movq %rdx, 0x30(%rsp)
movq 0x140(%rsp), %rdx
incq %rdx
movq %rdx, 0x28(%rsp)
movq (%rsp), %rsi
movq %rcx, %r15
leaq (%rcx,%rcx,2), %rbp
leaq (%rsi,%rbp,8), %rbx
movl 0x10(%rax), %ecx
testl %ecx, %ecx
je 0x13a78e
movq (%rsi,%rbp,8), %r12
cmpl $0x1, %ecx
je 0x13a720
cmpl $0x2, %ecx
jne 0x13a8d5
movq %r14, %rdx
subq %r15, %rdx
cmpq $0x1, %rdx
movq (%rsp), %rsi
je 0x13a78e
cmpl $0x2, %ecx
je 0x13a7b0
cmpl $0x1, %ecx
jne 0x13a8d5
movq %r15, %rcx
notq %rcx
addq %rcx, %r14
cmpq %r14, %r13
movq %r14, %r10
cmovlq %r13, %r10
movq 0x8(%rbx), %r8
movq %r8, %r11
notq %r11
addq 0x8(%rax), %r11
leaq 0x18(%rbx), %rsi
movq 0x30(%rsp), %rax
leaq (%rax,%r15), %r9
movq 0x28(%rsp), %rax
addq %r15, %rax
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rdx
movl $0x2, %ecx
pushq %r10
pushq $-0x1
pushq %r14
pushq %rax
pushq 0x158(%rsp)
pushq %r11
pushq %r8
pushq 0x158(%rsp)
callq 0x139b7b
addq $0x40, %rsp
movq %r12, (%rbx)
movq (%rsp), %rsi
testq %r15, %r15
je 0x13a61b
movq (%rsi,%rbp,8), %rcx
movq %rbx, %rax
movq %r15, %r14
cmpq $-0x1, %rcx
jne 0x13a6d2
jmp 0x13a61b
movq 0x10(%rbx), %rcx
movq %rcx, 0xa0(%rsp)
movups (%rbx), %xmm0
movaps %xmm0, 0x90(%rsp)
movq 0x8(%rbx), %r8
movq %r8, %r10
notq %r10
addq 0x8(%rax), %r10
movq %r10, %rcx
negq %rcx
movq 0x38(%rsp), %rdx
movq %rdx, %rax
cmpq %rcx, %rdx
ja 0x13a7eb
movq %rcx, %rax
incq %r8
movq 0x18(%rsp), %rcx
leaq (%r15,%rcx), %r9
movq 0x140(%rsp), %rcx
leaq (%r15,%rcx), %r11
movq %r15, %rcx
notq %rcx
addq %rcx, %r14
movq 0x40(%rsp), %rdi
movq %rbx, %rsi
movq 0x8(%rsp), %rdx
movl $0x1, %ecx
pushq $0x0
pushq %rax
pushq %r14
pushq %r11
pushq 0x158(%rsp)
pushq %r10
pushq %r8
pushq 0x158(%rsp)
callq 0x139b7b
addq $0x40, %rsp
movq 0xa0(%rsp), %rax
movq %rax, 0x10(%rbx)
movaps 0x90(%rsp), %xmm0
movups %xmm0, (%rbx)
jmp 0x13a787
movq 0x8(%rbx), %rax
movq 0x128(%rsp), %r11
movq %r11, %r10
subq %rax, %r10
movq 0x150(%rsp), %rcx
cmpq %rcx, %r10
cmovleq %rcx, %r10
decq %r15
movq 0x20(%rsp), %rbx
cmpq %rbx, %r15
cmovlq %r15, %rbx
subq %r11, %rax
movq 0x40(%rsp), %rdi
movq 0x8(%rsp), %rdx
movl 0x14(%rsp), %ecx
movq 0x18(%rsp), %r9
pushq %rbx
pushq %r10
pushq %r15
pushq %r14
pushq 0x158(%rsp)
pushq %rax
pushq %r11
pushq 0x158(%rsp)
callq 0x139b7b
addq $0x128, %rsp            # imm = 0x128
jmp 0x13a68d
callq 0x3fd47
callq 0x3fc2a
callq 0x3fc63
callq 0x3fdf2
callq 0x3fd0e
callq 0x3fdb9
callq 0x3fd80
callq 0x3fcd5
callq 0x3fc9c