// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: wherePathSatisfiesOrderBy
static i8 wherePathSatisfiesOrderBy(
  WhereInfo *pWInfo,    /* The WHERE clause */
  ExprList *pOrderBy,   /* ORDER BY or GROUP BY or DISTINCT clause to check */
  WherePath *pPath,     /* The WherePath to check */
  u16 wctrlFlags,       /* WHERE_GROUPBY or _DISTINCTBY or _ORDERBY_LIMIT */
  u16 nLoop,            /* Number of entries in pPath->aLoop[] */
  WhereLoop *pLast,     /* Add this WhereLoop to the end of pPath->aLoop[] */
  Bitmask *pRevMask     /* OUT: Mask of WhereLoops to run in reverse order */
){
  u8 revSet;            /* True if rev is known */
  u8 rev;               /* Composite sort order */
  u8 revIdx;            /* Index sort order */
  u8 isOrderDistinct;   /* All prior WhereLoops are order-distinct */
  u8 distinctColumns;   /* True if the loop has UNIQUE NOT NULL columns */
  u8 isMatch;           /* iColumn matches a term of the ORDER BY clause */
  u16 eqOpMask;         /* Allowed equality operators */
  u16 nKeyCol;          /* Number of key columns in pIndex */
  u16 nColumn;          /* Total number of ordered columns in the index */
  u16 nOrderBy;         /* Number terms in the ORDER BY clause */
  int iLoop;            /* Index of WhereLoop in pPath being processed */
  int i, j;             /* Loop counters */
  int iCur;             /* Cursor number for current WhereLoop */
  int iColumn;          /* A column number within table iCur */
  WhereLoop *pLoop = 0; /* Current WhereLoop being processed. */
  WhereTerm *pTerm;     /* A single term of the WHERE clause */
  Expr *pOBExpr;        /* An expression from the ORDER BY clause */
  CollSeq *pColl;       /* COLLATE function from an ORDER BY clause term */
  Index *pIndex;        /* The index associated with pLoop */
  sqlite3 *db = pWInfo->pParse->db;  /* Database connection */
  Bitmask obSat = 0;    /* Mask of ORDER BY terms satisfied so far */
  Bitmask obDone;       /* Mask of all ORDER BY terms */
  Bitmask orderDistinctMask;  /* Mask of all well-ordered loops */
  Bitmask ready;              /* Mask of inner loops */

  /*
  ** We say the WhereLoop is "one-row" if it generates no more than one
  ** row of output.  A WhereLoop is one-row if all of the following are true:
  **  (a) All index columns match with WHERE_COLUMN_EQ.
  **  (b) The index is unique
  ** Any WhereLoop with an WHERE_COLUMN_EQ constraint on the rowid is one-row.
  ** Every one-row WhereLoop will have the WHERE_ONEROW bit set in wsFlags.
  **
  ** We say the WhereLoop is "order-distinct" if the set of columns from
  ** that WhereLoop that are in the ORDER BY clause are different for every
  ** row of the WhereLoop.  Every one-row WhereLoop is automatically
  ** order-distinct.   A WhereLoop that has no columns in the ORDER BY clause
  ** is not order-distinct. To be order-distinct is not quite the same as being
  ** UNIQUE since a UNIQUE column or index can have multiple rows that
  ** are NULL and NULL values are equivalent for the purpose of order-distinct.
  ** To be order-distinct, the columns must be UNIQUE and NOT NULL.
  **
  ** The rowid for a table is always UNIQUE and NOT NULL so whenever the
  ** rowid appears in the ORDER BY clause, the corresponding WhereLoop is
  ** automatically order-distinct.
  */

  assert( pOrderBy!=0 );
  if( nLoop && OptimizationDisabled(db, SQLITE_OrderByIdxJoin) ) return 0;

  nOrderBy = pOrderBy->nExpr;
  testcase( nOrderBy==BMS-1 );
  if( nOrderBy>BMS-1 ) return 0;  /* Cannot optimize overly large ORDER BYs */
  isOrderDistinct = 1;
  obDone = MASKBIT(nOrderBy)-1;
  orderDistinctMask = 0;
  ready = 0;
  eqOpMask = WO_EQ | WO_IS | WO_ISNULL;
  if( wctrlFlags & (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MAX|WHERE_ORDERBY_MIN) ){
    eqOpMask |= WO_IN;
  }
  for(iLoop=0; isOrderDistinct && obSat<obDone && iLoop<=nLoop; iLoop++){
    if( iLoop>0 ) ready |= pLoop->maskSelf;
    if( iLoop<nLoop ){
      pLoop = pPath->aLoop[iLoop];
      if( wctrlFlags & WHERE_ORDERBY_LIMIT ) continue;
    }else{
      pLoop = pLast;
    }
    if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){
      if( pLoop->u.vtab.isOrdered && (wctrlFlags & WHERE_DISTINCTBY)==0 ){
        obSat = obDone;
      }
      break;
    }else if( wctrlFlags & WHERE_DISTINCTBY ){
      pLoop->u.btree.nDistinctCol = 0;
    }
    iCur = pWInfo->pTabList->a[pLoop->iTab].iCursor;

    /* Mark off any ORDER BY term X that is a column in the table of
    ** the current loop for which there is term in the WHERE
    ** clause of the form X IS NULL or X=? that reference only outer
    ** loops.
    */
    for(i=0; i<nOrderBy; i++){
      if( MASKBIT(i) & obSat ) continue;
      pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr);
      if( pOBExpr->op!=TK_COLUMN ) continue;
      if( pOBExpr->iTable!=iCur ) continue;
      pTerm = sqlite3WhereFindTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
                       ~ready, eqOpMask, 0);
      if( pTerm==0 ) continue;
      if( pTerm->eOperator==WO_IN ){
        /* IN terms are only valid for sorting in the ORDER BY LIMIT
        ** optimization, and then only if they are actually used
        ** by the query plan */
        assert( wctrlFlags &
               (WHERE_ORDERBY_LIMIT|WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) );
        for(j=0; j<pLoop->nLTerm && pTerm!=pLoop->aLTerm[j]; j++){}
        if( j>=pLoop->nLTerm ) continue;
      }
      if( (pTerm->eOperator&(WO_EQ|WO_IS))!=0 && pOBExpr->iColumn>=0 ){
        Parse *pParse = pWInfo->pParse;
        CollSeq *pColl1 = sqlite3ExprNNCollSeq(pParse, pOrderBy->a[i].pExpr);
        CollSeq *pColl2 = sqlite3ExprCompareCollSeq(pParse, pTerm->pExpr);
        assert( pColl1 );
        if( pColl2==0 || sqlite3StrICmp(pColl1->zName, pColl2->zName) ){
          continue;
        }
        testcase( pTerm->pExpr->op==TK_IS );
      }
      obSat |= MASKBIT(i);
    }

    if( (pLoop->wsFlags & WHERE_ONEROW)==0 ){
      if( pLoop->wsFlags & WHERE_IPK ){
        pIndex = 0;
        nKeyCol = 0;
        nColumn = 1;
      }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){
        return 0;
      }else{
        nKeyCol = pIndex->nKeyCol;
        nColumn = pIndex->nColumn;
        assert( nColumn==nKeyCol+1 || !HasRowid(pIndex->pTable) );
        assert( pIndex->aiColumn[nColumn-1]==XN_ROWID
                          || !HasRowid(pIndex->pTable));
        isOrderDistinct = IsUniqueIndex(pIndex)
                          && (pLoop->wsFlags & WHERE_SKIPSCAN)==0;
      }

      /* Loop through all columns of the index and deal with the ones
      ** that are not constrained by == or IN.
      */
      rev = revSet = 0;
      distinctColumns = 0;
      for(j=0; j<nColumn; j++){
        u8 bOnce = 1; /* True to run the ORDER BY search loop */

        assert( j>=pLoop->u.btree.nEq
            || (pLoop->aLTerm[j]==0)==(j<pLoop->nSkip)
        );
        if( j<pLoop->u.btree.nEq && j>=pLoop->nSkip ){
          u16 eOp = pLoop->aLTerm[j]->eOperator;

          /* Skip over == and IS and ISNULL terms.  (Also skip IN terms when
          ** doing WHERE_ORDERBY_LIMIT processing).  Except, IS and ISNULL
          ** terms imply that the index is not UNIQUE NOT NULL in which case
          ** the loop need to be marked as not order-distinct because it can
          ** have repeated NULL rows.
          **
          ** If the current term is a column of an ((?,?) IN (SELECT...))
          ** expression for which the SELECT returns more than one column,
          ** check that it is the only column used by this loop. Otherwise,
          ** if it is one of two or more, none of the columns can be
          ** considered to match an ORDER BY term.
          */
          if( (eOp & eqOpMask)!=0 ){
            if( eOp & (WO_ISNULL|WO_IS) ){
              testcase( eOp & WO_ISNULL );
              testcase( eOp & WO_IS );
              testcase( isOrderDistinct );
              isOrderDistinct = 0;
            }
            continue;
          }else if( ALWAYS(eOp & WO_IN) ){
            /* ALWAYS() justification: eOp is an equality operator due to the
            ** j<pLoop->u.btree.nEq constraint above.  Any equality other
            ** than WO_IN is captured by the previous "if".  So this one
            ** always has to be WO_IN. */
            Expr *pX = pLoop->aLTerm[j]->pExpr;
            for(i=j+1; i<pLoop->u.btree.nEq; i++){
              if( pLoop->aLTerm[i]->pExpr==pX ){
                assert( (pLoop->aLTerm[i]->eOperator & WO_IN) );
                bOnce = 0;
                break;
              }
            }
          }
        }

        /* Get the column number in the table (iColumn) and sort order
        ** (revIdx) for the j-th column of the index.
        */
        if( pIndex ){
          iColumn = pIndex->aiColumn[j];
          revIdx = pIndex->aSortOrder[j] & KEYINFO_ORDER_DESC;
          if( iColumn==pIndex->pTable->iPKey ) iColumn = XN_ROWID;
        }else{
          iColumn = XN_ROWID;
          revIdx = 0;
        }

        /* An unconstrained column that might be NULL means that this
        ** WhereLoop is not well-ordered
        */
        if( isOrderDistinct
         && iColumn>=0
         && j>=pLoop->u.btree.nEq
         && pIndex->pTable->aCol[iColumn].notNull==0
        ){
          isOrderDistinct = 0;
        }

        /* Find the ORDER BY term that corresponds to the j-th column
        ** of the index and mark that ORDER BY term off
        */
        isMatch = 0;
        for(i=0; bOnce && i<nOrderBy; i++){
          if( MASKBIT(i) & obSat ) continue;
          pOBExpr = sqlite3ExprSkipCollateAndLikely(pOrderBy->a[i].pExpr);
          testcase( wctrlFlags & WHERE_GROUPBY );
          testcase( wctrlFlags & WHERE_DISTINCTBY );
          if( (wctrlFlags & (WHERE_GROUPBY|WHERE_DISTINCTBY))==0 ) bOnce = 0;
          if( iColumn>=XN_ROWID ){
            if( pOBExpr->op!=TK_COLUMN ) continue;
            if( pOBExpr->iTable!=iCur ) continue;
            if( pOBExpr->iColumn!=iColumn ) continue;
          }else{
            Expr *pIdxExpr = pIndex->aColExpr->a[j].pExpr;
            if( sqlite3ExprCompareSkip(pOBExpr, pIdxExpr, iCur) ){
              continue;
            }
          }
          if( iColumn!=XN_ROWID ){
            pColl = sqlite3ExprNNCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
            if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue;
          }
          if( wctrlFlags & WHERE_DISTINCTBY ){
            pLoop->u.btree.nDistinctCol = j+1;
          }
          isMatch = 1;
          break;
        }
        if( isMatch && (wctrlFlags & WHERE_GROUPBY)==0 ){
          /* Make sure the sort order is compatible in an ORDER BY clause.
          ** Sort order is irrelevant for a GROUP BY clause. */
          if( revSet ){
            if( (rev ^ revIdx)!=(pOrderBy->a[i].sortFlags&KEYINFO_ORDER_DESC) ){
              isMatch = 0;
            }
          }else{
            rev = revIdx ^ (pOrderBy->a[i].sortFlags & KEYINFO_ORDER_DESC);
            if( rev ) *pRevMask |= MASKBIT(iLoop);
            revSet = 1;
          }
        }
        if( isMatch && (pOrderBy->a[i].sortFlags & KEYINFO_ORDER_BIGNULL) ){
          if( j==pLoop->u.btree.nEq ){
            pLoop->wsFlags |= WHERE_BIGNULL_SORT;
          }else{
            isMatch = 0;
          }
        }
        if( isMatch ){
          if( iColumn==XN_ROWID ){
            testcase( distinctColumns==0 );
            distinctColumns = 1;
          }
          obSat |= MASKBIT(i);
        }else{
          /* No match found */
          if( j==0 || j<nKeyCol ){
            testcase( isOrderDistinct!=0 );
            isOrderDistinct = 0;
          }
          break;
        }
      } /* end Loop over all index columns */
      if( distinctColumns ){
        testcase( isOrderDistinct==0 );
        isOrderDistinct = 1;
      }
    } /* end-if not one-row */

    /* Mark off any other ORDER BY terms that reference pLoop */
    if( isOrderDistinct ){
      orderDistinctMask |= pLoop->maskSelf;
      for(i=0; i<nOrderBy; i++){
        Expr *p;
        Bitmask mTerm;
        if( MASKBIT(i) & obSat ) continue;
        p = pOrderBy->a[i].pExpr;
        mTerm = sqlite3WhereExprUsage(&pWInfo->sMaskSet,p);
        if( mTerm==0 && !sqlite3ExprIsConstant(p) ) continue;
        if( (mTerm&~orderDistinctMask)==0 ){
          obSat |= MASKBIT(i);
        }
      }
    }
  } /* End the loop over all WhereLoops from outer-most down to inner-most */
  if( obSat==obDone ) return (i8)nOrderBy;
  if( !isOrderDistinct ){
    for(i=nOrderBy-1; i>0; i--){
      Bitmask m = MASKBIT(i) - 1;
      if( (obSat&m)==m ) return i;
    }
    return 0;
  }
  return -1;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq %r9, 0xa8(%rsp)
movl %ecx, %eax
movq %rdx, 0xa0(%rsp)
movq %rsi, 0x10(%rsp)
testl %r8d, %r8d
je 0x2dc7b3
movq (%rdi), %rcx
movq (%rcx), %rcx
testb $0x40, 0x5c(%rcx)
jne 0x2dc7c2
movq 0x10(%rsp), %rcx
movzwl (%rcx), %r10d
cmpl $0x3f, %r10d
jbe 0x2dc7c9
xorl %eax, %eax
jmp 0x2dcfa7
movq $-0x1, %rdx
movl %r10d, %ecx
shlq %cl, %rdx
movzwl %ax, %esi
movl %esi, %eax
andl $0x803, %eax            # imm = 0x803
cmpl $0x1, %eax
movl $0x183, %eax            # imm = 0x183
sbbl $0x0, %eax
movl %eax, 0x4c(%rsp)
testl %r10d, %r10d
je 0x2dcfa4
notq %rdx
movq %rdx, 0x58(%rsp)
addq $0x8, 0x10(%rsp)
leaq 0x68(%rdi), %rax
movq %rax, 0xb8(%rsp)
movq %rdi, 0x60(%rsp)
leaq 0x290(%rdi), %rax
movq %rax, 0xc0(%rsp)
movzwl %r8w, %edx
xorl %edi, %edi
xorl %r8d, %r8d
movq $0x0, 0x80(%rsp)
xorl %r13d, %r13d
xorl %r9d, %r9d
movq %r10, 0x18(%rsp)
movl %esi, 0x24(%rsp)
movq %rdx, 0x98(%rsp)
testq %rdi, %rdi
je 0x2dc85b
orq 0x8(%r9), %r8
movq 0xa8(%rsp), %r9
cmpq %rdx, %rdi
jae 0x2dc882
btl $0xb, %esi
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax,%rdi,8), %r9
jb 0x2dcf60
testb $0x4, 0x29(%r9)
jne 0x2dcf82
movq %rdi, 0x88(%rsp)
testb %sil, %sil
jns 0x2dc8a1
movw $0x0, 0x1e(%r9)
movq 0x60(%rsp), %rax
movq 0x8(%rax), %rax
movq %r9, 0x28(%rsp)
movzbl 0x10(%r9), %ecx
imulq $0x70, %rcx, %rcx
movl 0x48(%rax,%rcx), %esi
movq %r8, 0xb0(%rsp)
notq %r8
movq %r8, 0x38(%rsp)
xorl %r14d, %r14d
movl %esi, 0x8(%rsp)
movl $0x1, %ebp
movl %r14d, %ecx
shlq %cl, %rbp
btq %r14, %r13
jb 0x2dca3e
leaq (%r14,%r14,2), %r12
movq 0x10(%rsp), %rax
movq (%rax,%r12,8), %rbx
movl 0x4(%rbx), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x2dc918
btl $0x12, %eax
jb 0x2dc90b
addq $0x10, %rbx
jmp 0x2dc913
movq 0x20(%rbx), %rbx
addq $0x8, %rbx
movq (%rbx), %rbx
jmp 0x2dc8f5
cmpb $-0x5c, (%rbx)
jne 0x2dca3e
cmpl %esi, 0x2c(%rbx)
jne 0x2dca3e
movswl 0x30(%rbx), %edx
movq 0xb8(%rsp), %rdi
movq 0x38(%rsp), %rcx
movl 0x4c(%rsp), %r8d
xorl %r9d, %r9d
callq 0x2d9b77
testq %rax, %rax
je 0x2dca30
movq %rax, %r15
movzwl 0x14(%rax), %eax
cmpw $0x1, %ax
movq 0x18(%rsp), %r10
jne 0x2dc98e
movq 0x28(%rsp), %rdx
movzwl 0x2c(%rdx), %ecx
testq %rcx, %rcx
je 0x2dca3a
movq 0x38(%rdx), %rdx
xorl %esi, %esi
cmpq (%rdx,%rsi,8), %r15
je 0x2dc98e
incq %rsi
cmpq %rsi, %rcx
jne 0x2dc97b
jmp 0x2dca3a
testb $-0x7e, %al
je 0x2dca37
cmpw $0x0, 0x30(%rbx)
js 0x2dca37
movq 0x10(%rsp), %rax
leaq (%rax,%r12,8), %rax
movq 0x60(%rsp), %rcx
movq (%rcx), %r12
movq (%rax), %rsi
movq %r12, %rdi
callq 0x2a9678
movq %rax, %rbx
testq %rax, %rax
jne 0x2dc9cd
movq (%r12), %rax
movq 0x10(%rax), %rbx
movq (%r15), %rax
xorl %ecx, %ecx
movl 0x4(%rax), %edx
movl $0x200, %esi            # imm = 0x200
andl %esi, %edx
sete %cl
shrl $0x6, %edx
movq 0x10(%rax,%rdx), %rsi
movq 0x10(%rax,%rcx,8), %rdx
movq %r12, %rdi
callq 0x2a9634
testq %rax, %rax
je 0x2dca30
movq (%rbx), %rcx
movq (%rax), %rax
xorl %edx, %edx
movq 0x18(%rsp), %r10
movzbl (%rcx,%rdx), %esi
movzbl (%rax,%rdx), %edi
cmpb %dil, %sil
jne 0x2dca1a
testq %rsi, %rsi
jne 0x2dca2b
jmp 0x2dca37
leaq 0xf48bf(%rip), %r8      # 0x3d12e0
movb (%rsi,%r8), %sil
cmpb (%rdi,%r8), %sil
jne 0x2dca3a
incq %rdx
jmp 0x2dca06
movq 0x18(%rsp), %r10
jmp 0x2dca3a
orq %rbp, %r13
movl 0x8(%rsp), %esi
incq %r14
cmpq %r10, %r14
jne 0x2dc8d3
movq 0x28(%rsp), %r8
movl 0x28(%r8), %eax
btl $0xc, %eax
jb 0x2dce6c
btl $0x8, %eax
jb 0x2dcaad
movq 0x20(%r8), %rbx
testq %rbx, %rbx
movl 0x24(%rsp), %r14d
je 0x2dc7c2
testb $0x4, 0x63(%rbx)
jne 0x2dc7c2
movzwl 0x60(%rbx), %edx
cmpb $0x0, 0x62(%rbx)
setne %cl
testw %ax, %ax
setns %r11b
andb %cl, %r11b
movq %rdx, 0x78(%rsp)
testq %rdx, %rdx
je 0x2dcf7b
movzwl 0x5e(%rbx), %eax
movq %rax, 0x70(%rsp)
jmp 0x2dcaca
movl $0x1, %eax
movq %rax, 0x78(%rsp)
movq $0x0, 0x70(%rsp)
movb $0x1, %r11b
xorl %ebx, %ebx
movl 0x24(%rsp), %r14d
movl $0x1, %eax
movq 0x88(%rsp), %rcx
shlq %cl, %rax
movq %rax, 0x90(%rsp)
xorl %r15d, %r15d
movq $0x0, 0x50(%rsp)
movq $0x0, 0x68(%rsp)
xorl %ebp, %ebp
movq %rbx, 0x38(%rsp)
movzwl 0x18(%r8), %ecx
movb $0x1, %al
movb $0x1, %r12b
cmpq %rcx, %r15
jae 0x2dcb70
movzwl 0x2e(%r8), %edx
movb $0x1, %r12b
cmpq %rdx, %r15
jb 0x2dcb70
movq 0x38(%r8), %rdx
movq (%rdx,%r15,8), %rsi
movzwl 0x14(%rsi), %edi
testl %edi, 0x4c(%rsp)
je 0x2dcb44
testl $0x180, %edi            # imm = 0x180
movzbl %r11b, %r11d
movl $0x0, %eax
cmovnel %eax, %r11d
jmp 0x2dcde1
testb $0x1, %dil
jne 0x2dcb4f
movb $0x1, %r12b
jmp 0x2dcb70
movq (%rsi), %rsi
leal -0x1(%rcx), %edi
movq %r15, %r8
cmpq %r8, %rdi
sete %al
je 0x2dcb4a
movq 0x8(%rdx,%r8,8), %r9
incq %r8
xorl %r12d, %r12d
cmpq %rsi, (%r9)
jne 0x2dcb58
testq %rbx, %rbx
movl %ebp, 0x44(%rsp)
je 0x2dcbd9
movq 0x8(%rbx), %rsi
movq 0x18(%rbx), %rdx
movzwl (%rsi,%r15,2), %esi
movq 0x38(%rbx), %rdi
movb (%rdi,%r15), %dil
andb $0x1, %dil
movl %edi, 0x34(%rsp)
cmpw 0x44(%rdx), %si
movl $0xffff, %edi           # imm = 0xFFFF
cmovel %edi, %esi
movswl %si, %r9d
cmpq %rcx, %r15
jb 0x2dcbd2
testb %r11b, %r11b
je 0x2dcbd2
testw %si, %si
js 0x2dcbd2
movq 0x8(%rdx), %rcx
movl %r9d, %edx
shlq $0x5, %rdx
cmpb $0x0, 0x18(%rcx,%rdx)
movzbl %r11b, %r11d
movl $0x0, %ecx
cmovel %ecx, %r11d
movl %r11d, 0xc(%rsp)
jmp 0x2dcbec
movl %r11d, 0xc(%rsp)
movl $0xffffffff, %r9d       # imm = 0xFFFFFFFF
movl $0x0, 0x34(%rsp)
testb %al, %al
je 0x2dce3c
xorl %ebp, %ebp
movl %r9d, 0x48(%rsp)
btq %rbp, %r13
jae 0x2dcc17
testb %r12b, %r12b
je 0x2dce3c
incq %rbp
cmpq %r10, %rbp
jb 0x2dcbfb
jmp 0x2dce3c
leaq (,%rbp,2), %rbx
addq %rbp, %rbx
movq 0x10(%rsp), %rax
movq (%rax,%rbx,8), %rsi
testq %rsi, %rsi
je 0x2dcc59
movq %rsi, %rdi
movl 0x4(%rdi), %eax
testl $0x41000, %eax          # imm = 0x41000
je 0x2dcc5b
btl $0x12, %eax
jb 0x2dcc49
addq $0x10, %rdi
jmp 0x2dcc51
movq 0x20(%rdi), %rdi
addq $0x8, %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x2dcc33
xorl %edi, %edi
movl %r14d, %eax
andl $0xc0, %eax
movzbl %r12b, %r12d
cmovel %eax, %r12d
cmpl $-0x1, %r9d
jl 0x2dcc97
cmpb $-0x5c, (%rdi)
jne 0x2dcc01
movl 0x8(%rsp), %eax
cmpl %eax, 0x2c(%rdi)
jne 0x2dcc01
movswl 0x30(%rdi), %eax
cmpl %eax, %r9d
jne 0x2dcc01
cmpl $-0x1, %r9d
jne 0x2dccd1
jmp 0x2dcd3c
movq 0x38(%rsp), %rax
movq 0x50(%rax), %rax
leaq (%r15,%r15,2), %rcx
movq 0x8(%rax,%rcx,8), %rsi
movl 0x8(%rsp), %edx
callq 0x2d9af8
testl %eax, %eax
je 0x2dccc5
movq 0x18(%rsp), %r10
movl 0x48(%rsp), %r9d
jmp 0x2dcc01
movq 0x10(%rsp), %rax
leaq (%rax,%rbx,8), %rax
movq (%rax), %rsi
movq 0x60(%rsp), %rax
movq (%rax), %r14
movq %r14, %rdi
callq 0x2a9678
testq %rax, %rax
jne 0x2dcced
movq (%r14), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movq 0x38(%rsp), %rcx
movq 0x40(%rcx), %rcx
movq (%rcx,%r15,8), %rcx
xorl %edx, %edx
movq 0x18(%rsp), %r10
movl 0x24(%rsp), %r14d
movl 0x48(%rsp), %r9d
movzbl (%rax,%rdx), %esi
movzbl (%rcx,%rdx), %edi
cmpb %dil, %sil
jne 0x2dcd22
testq %rsi, %rsi
jne 0x2dcd37
jmp 0x2dcd3c
leaq 0xf45b7(%rip), %r8      # 0x3d12e0
movb (%rsi,%r8), %sil
cmpb (%rdi,%r8), %sil
jne 0x2dcc01
incq %rdx
jmp 0x2dcd0e
testb %r14b, %r14b
jns 0x2dcd4e
leal 0x1(%r15), %eax
movq 0x28(%rsp), %rcx
movw %ax, 0x1e(%rcx)
testb $0x40, %r14b
jne 0x2dcd8e
cmpb $0x0, 0x50(%rsp)
je 0x2dcdf1
movl 0x34(%rsp), %edi
xorb 0x68(%rsp), %dil
movl %ebp, %eax
leaq (%rax,%rax,2), %rcx
movq 0x10(%rsp), %rdx
movb 0x10(%rdx,%rcx,8), %cl
movl %ecx, %edx
andb $0x1, %dl
movb $0x1, %sil
movq %rsi, 0x50(%rsp)
cmpb %dl, %dil
je 0x2dcd9d
jmp 0x2dce3c
movl %ebp, %eax
leaq (%rax,%rax,2), %rcx
movq 0x10(%rsp), %rdx
movb 0x10(%rdx,%rcx,8), %cl
testb $0x2, %cl
movq 0x28(%rsp), %r8
je 0x2dcdbf
movzwl 0x18(%r8), %ecx
cmpq %rcx, %r15
jne 0x2dce3c
movq 0x28(%rsp), %r8
orb $0x8, 0x2a(%r8)
cmpl $-0x1, %r9d
movl 0x44(%rsp), %ebp
movzbl %bpl, %ebp
movl $0x1, %ecx
cmovel %ecx, %ebp
btsq %rax, %r13
movl 0xc(%rsp), %r11d
movq 0x38(%rsp), %rbx
incq %r15
cmpq 0x78(%rsp), %r15
jne 0x2dcafe
jmp 0x2dce63
movl %ebp, %eax
leaq (%rax,%rax,2), %rcx
movq 0x10(%rsp), %rdx
movb 0x10(%rdx,%rcx,8), %cl
movl %ecx, %edx
andb $0x1, %dl
movl %edx, %esi
movl 0x34(%rsp), %edi
xorb %dil, %sil
movq %rsi, 0x68(%rsp)
movb $0x1, %sil
movq %rsi, 0x50(%rsp)
cmpb %dil, %dl
je 0x2dcd9d
movq 0x130(%rsp), %rdx
movq 0x90(%rsp), %rsi
orq %rsi, (%rdx)
jmp 0x2dcd9d
cmpl %r15d, 0x70(%rsp)
movl 0xc(%rsp), %r11d
movzbl %r11b, %r11d
movl $0x0, %eax
cmoval %eax, %r11d
testq %r15, %r15
cmovel %eax, %r11d
movq 0x28(%rsp), %r8
movl 0x44(%rsp), %ebp
orb %r11b, %bpl
je 0x2dcf9b
movq 0x80(%rsp), %rbx
orq 0x8(%r8), %rbx
movq %rbx, 0x80(%rsp)
notq %rbx
movq 0x10(%rsp), %r12
xorl %r14d, %r14d
movl $0x1, %ebp
movl %r14d, %ecx
shlq %cl, %rbp
btq %r14, %r13
jb 0x2dcf26
movq (%r12), %r15
testq %r15, %r15
je 0x2dcf1a
movq 0xc0(%rsp), %rdi
movq %r15, %rsi
callq 0x2d95bc
movq 0x18(%rsp), %r10
testq %rax, %rax
jne 0x2dcf1c
movw $0x1, 0xec(%rsp)
leaq -0x1c54d(%rip), %rax    # 0x2c0987
movq %rax, 0xd0(%rsp)
leaq -0x1c463(%rip), %rax    # 0x2c0a80
movq %rax, 0xd8(%rsp)
movl $0x0, 0xf0(%rsp)
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
callq 0x2c0a8c
cmpw $0x0, 0xec(%rsp)
je 0x2dcf38
xorl %eax, %eax
movq 0x18(%rsp), %r10
jmp 0x2dcf1c
xorl %eax, %eax
testq %rbx, %rax
je 0x2dcf23
xorl %ebp, %ebp
orq %rbp, %r13
incq %r14
addq $0x18, %r12
cmpq %r14, %r10
jne 0x2dce8b
jmp 0x2dcf3f
movq 0x18(%rsp), %r10
jmp 0x2dcf26
movl 0x24(%rsp), %esi
movq 0x98(%rsp), %rdx
movq 0x88(%rsp), %rdi
movq 0xb0(%rsp), %r8
movq 0x28(%rsp), %r9
xorl %ecx, %ecx
cmpq 0x58(%rsp), %r13
jae 0x2dcf9d
leaq 0x1(%rdi), %rax
cmpq %rdx, %rdi
movq %rax, %rdi
jb 0x2dc852
jmp 0x2dcf9d
xorl %ebp, %ebp
jmp 0x2dce63
cmpb $0x0, 0x1d(%r9)
movq %r13, %rax
cmovneq 0x58(%rsp), %rax
testb %sil, %sil
cmovnsq %rax, %r13
xorl %ecx, %ecx
jmp 0x2dcf9d
movb $0x1, %cl
cmpq 0x58(%rsp), %r13
jne 0x2dcfb9
movl %r10d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $-0x1, %al
testb %cl, %cl
je 0x2dcfa7
movq %r10, %rax
cmpq $0x2, %rax
jl 0x2dc7c2
decq %rax
movq $-0x1, %rdx
movl %eax, %ecx
shlq %cl, %rdx
orq %r13, %rdx
cmpq $-0x1, %rdx
jne 0x2dcfc2
jmp 0x2dcfa7