// File: /workspace/github_c_makefile_star2_O2/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 $0xe8, %rsp
movq %r9, 0xd0(%rsp)
movl %ecx, %eax
movq %rdx, 0xc8(%rsp)
testl %r8d, %r8d
je 0x27b849
movq (%rdi), %rcx
movq (%rcx), %rcx
testb $0x40, 0x5c(%rcx)
jne 0x27bffe
movq %rdi, 0x68(%rsp)
movzwl (%rsi), %r15d
xorl %ecx, %ecx
cmpl $0x3f, %r15d
ja 0x27c000
pushq $-0x1
popq %rdx
movl %r15d, %ecx
shlq %cl, %rdx
movzwl %ax, %eax
movl %eax, 0x1c(%rsp)
andl $0x803, %eax            # imm = 0x803
cmpl $0x1, %eax
movl $0x183, %eax            # imm = 0x183
sbbl $0x0, %eax
movl %eax, 0x64(%rsp)
notq %rdx
leaq 0x8(%rsi), %rax
movq %rax, 0x98(%rsp)
movq 0x68(%rsp), %rax
leaq 0x68(%rax), %rcx
movq %rcx, 0xd8(%rsp)
addq $0x290, %rax            # imm = 0x290
movq %rax, 0xe0(%rsp)
movzwl %r8w, %eax
movq %rax, 0xb0(%rsp)
addq $0x18, %rsi
movq %rsi, 0x88(%rsp)
movb $0x1, %al
movl %eax, 0xc(%rsp)
pushq $0x1
popq %r8
xorl %eax, %eax
movq $0x0, 0x10(%rsp)
xorl %r10d, %r10d
movq $0x0, 0xa8(%rsp)
movq $0x0, 0x90(%rsp)
movq %r15, 0x20(%rsp)
movq %rdx, 0x30(%rsp)
cmpb $0x0, 0xc(%rsp)
je 0x27bfce
cmpq %rdx, %r10
jae 0x27bfce
cmpq 0xb0(%rsp), %rax
ja 0x27bfce
testq %rax, %rax
je 0x27b942
movq 0x90(%rsp), %rcx
movq 0x10(%rsp), %rdx
orq 0x8(%rdx), %rcx
movq %rcx, 0x90(%rsp)
movq 0xd0(%rsp), %rcx
cmpq 0xb0(%rsp), %rax
movq %rax, 0x40(%rsp)
jae 0x27b984
btl $0xb, 0x1c(%rsp)
movq 0xc8(%rsp), %rax
movq 0x18(%rax), %rax
movq 0x40(%rsp), %rcx
movq (%rax,%rcx,8), %rcx
movq 0x40(%rsp), %rax
movq 0x30(%rsp), %rdx
jb 0x27bb50
movq %rcx, 0x10(%rsp)
testb $0x4, 0x29(%rcx)
jne 0x27bfae
cmpb $0x0, 0x1c(%rsp)
jns 0x27b9a4
movq 0x10(%rsp), %rax
andw $0x0, 0x1e(%rax)
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq 0x10(%rsp), %rcx
movzbl 0x10(%rcx), %ecx
imulq $0x70, %rcx, %rcx
movl 0x48(%rax,%rcx), %eax
movl %eax, 0x58(%rsp)
movq 0x90(%rsp), %rax
notq %rax
movq %rax, 0x50(%rsp)
xorl %ebx, %ebx
cmpq %r15, %rbx
je 0x27bae4
movq %r8, %r12
movl %ebx, %ecx
shlq %cl, %r12
btq %rbx, %r10
jb 0x27badc
movq %r10, %rbp
imulq $0x18, %rbx, %r14
movq 0x98(%rsp), %rax
movq (%rax,%r14), %rdi
callq 0x267d34
cmpb $-0x5c, (%rax)
jne 0x27bad5
movq %rax, %r13
movl 0x58(%rsp), %esi
cmpl %esi, 0x2c(%rax)
jne 0x27bad5
movswl 0x30(%r13), %edx
movq 0xd8(%rsp), %rdi
movq 0x50(%rsp), %rcx
movl 0x64(%rsp), %r8d
xorl %r9d, %r9d
callq 0x278f6e
testq %rax, %rax
je 0x27bad0
movq %rax, %r15
movzwl 0x14(%rax), %eax
cmpw $0x1, %ax
movq %rbp, %r10
movq 0x10(%rsp), %r8
jne 0x27ba7a
movzwl 0x2c(%r8), %ecx
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x27bac9
movq 0x38(%r8), %rsi
leaq 0x1(%rdx), %rdi
cmpq (%rsi,%rdx,8), %r15
movq %rdi, %rdx
jne 0x27ba64
testb $-0x7e, %al
je 0x27bac6
cmpw $0x0, 0x30(%r13)
js 0x27bac6
addq 0x98(%rsp), %r14
movq 0x68(%rsp), %rax
movq (%rax), %r13
movq (%r14), %rsi
movq %r13, %rdi
callq 0x2765b9
movq %rax, %r14
movq (%r15), %rsi
movq %r13, %rdi
callq 0x22953c
testq %rax, %rax
je 0x27bad0
movq (%r14), %rdi
movq (%rax), %rsi
callq 0x221779
testl %eax, %eax
movq %rbp, %r10
jne 0x27bac9
orq %r12, %r10
movq 0x20(%rsp), %r15
jmp 0x27bad8
movq 0x20(%rsp), %r15
movq %rbp, %r10
pushq $0x1
popq %r8
incq %rbx
jmp 0x27b9d4
movq 0x10(%rsp), %rax
movl 0x28(%rax), %eax
btl $0xc, %eax
jb 0x27bb41
btl $0x8, %eax
movl $0x0, %r9d
jb 0x27bb5a
movq 0x10(%rsp), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0x27bffe
testb $0x4, 0x63(%rcx)
jne 0x27bffe
movzwl 0x5e(%rcx), %edx
movl %edx, 0x60(%rsp)
movzwl 0x60(%rcx), %r11d
movq %rcx, 0x70(%rsp)
cmpb $0x0, 0x62(%rcx)
setne %cl
testw %ax, %ax
setns %al
andb %cl, %al
movl %eax, 0xc(%rsp)
jmp 0x27bb6e
movq 0x30(%rsp), %rdx
movq 0x40(%rsp), %rax
jmp 0x27bef5
movq %rcx, 0x10(%rsp)
jmp 0x27bf9d
movq $0x0, 0x70(%rsp)
movq %r8, %r11
movl $0x0, 0x60(%rsp)
movq %r8, %rdx
movq 0x40(%rsp), %rax
movl %eax, %ecx
shlq %cl, %rdx
movq %rdx, 0xb8(%rsp)
xorl %r14d, %r14d
movq %r8, %r13
xorl %ebx, %ebx
movq $0x0, 0xa0(%rsp)
movq $0x0, 0x78(%rsp)
movq 0x30(%rsp), %rdx
movq %r11, 0xc0(%rsp)
cmpq %r11, %r14
je 0x27bfa5
movq 0x10(%rsp), %rsi
movzwl 0x18(%rsi), %ecx
movzbl 0xc(%rsp), %eax
cmpq %rcx, %r14
jae 0x27bbd6
movzwl 0x2e(%rsi), %edx
cmpq %rdx, %r14
jae 0x27bd57
movq %r13, 0x80(%rsp)
movq %r14, 0x28(%rsp)
movl %ebx, 0x3c(%rsp)
movb $0x1, %r13b
movq 0x88(%rsp), %r12
movl 0xc(%rsp), %r11d
movq 0x70(%rsp), %rdx
testq %rdx, %rdx
je 0x27bc5e
movq 0x8(%rdx), %rsi
movq %rdx, %rdi
movq 0x18(%rdx), %rdx
movq 0x28(%rsp), %r8
movzwl (%rsi,%r8,2), %esi
movq 0x38(%rdi), %rdi
movb (%rdi,%r8), %bl
andb $0x1, %bl
cmpw 0x44(%rdx), %si
movl $0xffff, %edi           # imm = 0xFFFF
cmovel %edi, %esi
movswl %si, %r14d
cmpq %rcx, %r8
movl %ebx, 0x4c(%rsp)
jb 0x27bc6a
testb %r11b, %r11b
je 0x27bc6a
testw %si, %si
js 0x27bc6a
movq 0x8(%rdx), %rcx
movl %r14d, %edx
shlq $0x5, %rdx
cmpb $0x0, 0x18(%rcx,%rdx)
cmovel %r9d, %eax
movl %eax, 0xc(%rsp)
jmp 0x27bc6a
movl $0x0, 0x4c(%rsp)
pushq $-0x1
popq %r14
xorl %r15d, %r15d
movq %r10, 0x50(%rsp)
testb %r13b, %r13b
je 0x27beaf
cmpq 0x20(%rsp), %r15
jae 0x27beaf
btq %r15, %r10
jb 0x27bd4b
movl 0x1c(%rsp), %ebp
andl $0xc0, %ebp
movq -0x10(%r12), %rbx
movq %rbx, %rdi
callq 0x267d34
testl %ebp, %ebp
movzbl %r13b, %r13d
cmovel %ebp, %r13d
cmpl $-0x1, %r14d
jl 0x27bce3
cmpb $-0x5c, (%rax)
jne 0x27bd07
movl 0x58(%rsp), %ecx
cmpl %ecx, 0x2c(%rax)
movq 0x50(%rsp), %r10
movq 0x10(%rsp), %rdx
jne 0x27bd4b
movswl 0x30(%rax), %eax
cmpl %eax, %r14d
jne 0x27bd4b
cmpl $-0x1, %r14d
jne 0x27bd13
jmp 0x27bda7
movq 0x70(%rsp), %rcx
movq 0x50(%rcx), %rcx
imulq $0x18, 0x28(%rsp), %rdx
movq 0x8(%rcx,%rdx), %rsi
movq %rax, %rdi
movl 0x58(%rsp), %edx
callq 0x278f01
testl %eax, %eax
je 0x27bd0e
movq 0x50(%rsp), %r10
jmp 0x27bd4b
movq -0x10(%r12), %rbx
movq 0x68(%rsp), %rax
movq (%rax), %rdi
movq %rbx, %rsi
callq 0x2765b9
movq (%rax), %rdi
movq 0x70(%rsp), %rax
movq 0x40(%rax), %rax
movq 0x28(%rsp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x221779
movq 0x10(%rsp), %rdx
movq 0x50(%rsp), %r10
testl %eax, %eax
je 0x27bda7
incq %r15
addq $0x18, %r12
jmp 0x27bc72
movq 0x38(%rsi), %rdx
movq (%rdx,%r14,8), %rsi
movzwl 0x14(%rsi), %edi
testl %edi, 0x64(%rsp)
je 0x27bd7b
testw $0x180, %di             # imm = 0x180
cmovnel %r9d, %eax
movl %eax, 0xc(%rsp)
jmp 0x27be9a
movq %r14, 0x28(%rsp)
movl %ebx, 0x3c(%rsp)
testb $0x1, %dil
movq 0x88(%rsp), %r12
movl 0xc(%rsp), %r11d
movq %r13, 0x80(%rsp)
jne 0x27bdf9
movb $0x1, %r13b
jmp 0x27bbf7
cmpb $0x0, 0x1c(%rsp)
jns 0x27bdb9
movq 0x28(%rsp), %rax
incl %eax
movw %ax, 0x1e(%rdx)
cmpq 0x20(%rsp), %r15
setae %al
movl 0x1c(%rsp), %ecx
andl $0x40, %ecx
shrl $0x6, %ecx
orb %al, %cl
jne 0x27be4e
cmpb $0x0, 0x78(%rsp)
je 0x27be18
movl 0x4c(%rsp), %esi
xorb 0xa0(%rsp), %sil
movb (%r12), %al
andb $0x1, %al
movb $0x1, %cl
movq %rcx, 0x78(%rsp)
cmpb %al, %sil
je 0x27be4e
jmp 0x27beaf
movq (%rsi), %rsi
movq %r13, %rdi
cmpq %rcx, %rdi
jae 0x27bd9f
movq (%rdx,%rdi,8), %r8
incq %rdi
xorl %r13d, %r13d
cmpq %rsi, (%r8)
jne 0x27bdff
jmp 0x27bbf7
movb (%r12), %al
andb $0x1, %al
movl %eax, %ecx
movl 0x4c(%rsp), %esi
xorb %sil, %cl
movq %rcx, 0xa0(%rsp)
movb $0x1, %cl
movq %rcx, 0x78(%rsp)
cmpb %sil, %al
je 0x27be4e
movq 0x120(%rsp), %rax
movq 0xb8(%rsp), %rcx
orq %rcx, (%rax)
testb $0x2, (%r12)
je 0x27be64
movzwl 0x18(%rdx), %eax
cmpq %rax, 0x28(%rsp)
jne 0x27beaf
orb $0x8, 0x2a(%rdx)
cmpl $-0x1, %r14d
movl 0x3c(%rsp), %ebx
movzbl %bl, %ebx
pushq $0x1
popq %rax
cmovel %eax, %ebx
btsq %r15, %r10
xorl %r9d, %r9d
movq 0x20(%rsp), %r15
pushq $0x1
popq %r8
movq 0xc0(%rsp), %r11
movq 0x28(%rsp), %r14
movq 0x80(%rsp), %r13
incq %r14
incq %r13
movq 0x30(%rsp), %rdx
movq 0x40(%rsp), %rax
jmp 0x27bbad
movq 0x28(%rsp), %rdx
cmpl %edx, 0x60(%rsp)
movl 0xc(%rsp), %ecx
movzbl %cl, %ecx
movl $0x0, %eax
cmoval %eax, %ecx
testq %rdx, %rdx
cmovel %eax, %ecx
movq 0x20(%rsp), %r15
movq 0x30(%rsp), %rdx
pushq $0x1
popq %r8
movq 0x40(%rsp), %rax
movl 0x3c(%rsp), %ebx
orb %cl, %bl
jne 0x27bef5
movl $0x0, 0xc(%rsp)
jmp 0x27bf9d
movq 0xa8(%rsp), %rsi
movq 0x10(%rsp), %rcx
orq 0x8(%rcx), %rsi
movq %rsi, 0xa8(%rsp)
notq %rsi
movq %rsi, 0x58(%rsp)
movq 0x98(%rsp), %r14
xorl %ebx, %ebx
cmpq %rbx, %r15
je 0x27bf97
movq %r8, %rbp
movl %ebx, %ecx
shlq %cl, %rbp
btq %rbx, %r10
jb 0x27bf7f
movq %r10, %r13
movq (%r14), %r12
movq 0xe0(%rsp), %rdi
movq %r12, %rsi
callq 0x278aa4
movq %rax, %r15
testq %rax, %rax
jne 0x27bf5d
movq %r12, %rdi
callq 0x261298
testl %eax, %eax
je 0x27bf88
testq %r15, 0x58(%rsp)
movq %r13, %r10
je 0x27bf69
xorl %ebp, %ebp
orq %rbp, %r10
movq 0x20(%rsp), %r15
movq 0x30(%rsp), %rdx
pushq $0x1
popq %r8
movq 0x40(%rsp), %rax
incq %rbx
addq $0x18, %r14
jmp 0x27bf20
movq 0x20(%rsp), %r15
movq 0x30(%rsp), %rdx
movq %r13, %r10
jmp 0x27bf76
movb $0x1, %cl
movl %ecx, 0xc(%rsp)
incq %rax
jmp 0x27b902
movl 0xc(%rsp), %ecx
jmp 0x27bee4
movq 0x10(%rsp), %rax
cmpb $0x0, 0x1d(%rax)
movq %r10, %rax
cmovneq 0x30(%rsp), %rax
cmpb $0x0, 0x1c(%rsp)
cmovnsq %rax, %r10
movq 0x30(%rsp), %rdx
cmpq %rdx, %r10
jne 0x27bfd8
movl %r15d, %ecx
jmp 0x27c000
movb $-0x1, %cl
cmpb $0x0, 0xc(%rsp)
jne 0x27c000
movq %r15, %rcx
cmpq $0x2, %rcx
jl 0x27bffe
decq %rcx
pushq $-0x1
popq %rax
shlq %cl, %rax
orq %r10, %rax
cmpq $-0x1, %rax
jne 0x27bfe4
jmp 0x27c000
xorl %ecx, %ecx
movl %ecx, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq