// File: /workspace/github_c_makefile_star2_O1/ukontainer[P]sqlite-bench/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 ) 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 ) obSat = obDone;
      break;
    }else{
      pLoop->u.btree.nIdxCol = 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 = sqlite3ExprSkipCollate(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 );
        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 ){
        if( sqlite3ExprCollSeqMatch(pWInfo->pParse, 
                  pOrderBy->a[i].pExpr, pTerm->pExpr)==0 ){
          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);
      }

      /* 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). 
          **
          ** 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 ){
              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];
          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 = sqlite3ExprSkipCollate(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;
          }
          pLoop->u.btree.nIdxCol = 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].sortOrder ) isMatch = 0;
          }else{
            rev = revIdx ^ pOrderBy->a[i].sortOrder;
            if( rev ) *pRevMask |= MASKBIT(iLoop);
            revSet = 1;
          }
        }
        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, %r9d
movq %rdx, 0xa0(%rsp)
movq %rsi, %r15
testl %r8d, %r8d
je 0x46b2df
movq (%rdi), %rax
movq (%rax), %rax
testb $0x40, 0x5c(%rax)
jne 0x46bad0
movzwl (%r15), %ecx
xorl %eax, %eax
cmpl $0x3f, %ecx
ja 0x46bad2
movq $-0x1, %rax
shlq %cl, %rax
notq %rax
movq %rax, 0x50(%rsp)
movzwl %r9w, %eax
movl %eax, 0x24(%rsp)
btl $0xb, %eax
movl $0x0, %eax
adcl $0x182, %eax            # imm = 0x182
movl %eax, 0x18(%rsp)
testl %ecx, %ecx
movq %rcx, %rax
je 0x46ba7c
addq $0x8, %r15
leaq 0x68(%rdi), %rcx
movq %rcx, 0xb0(%rsp)
movq %rdi, 0x68(%rsp)
leaq 0x290(%rdi), %rcx
movq %rcx, 0xb8(%rsp)
movl %eax, %r11d
movzwl %r8w, %ecx
movq %rcx, 0x78(%rsp)
movb $0x1, %cl
movl %ecx, (%rsp)
xorl %r13d, %r13d
movq $0x0, 0x58(%rsp)
movq $0x0, 0x70(%rsp)
xorl %r10d, %r10d
xorl %ebx, %ebx
movq %rax, 0x30(%rsp)
movq %r11, 0x10(%rsp)
movq %r15, 0x38(%rsp)
testq %r13, %r13
je 0x46b396
movq 0x58(%rsp), %rcx
orq 0x8(%rbx), %rcx
movq %rcx, 0x58(%rsp)
movq 0xa8(%rsp), %rbx
cmpq 0x78(%rsp), %r13
jae 0x46b3c6
btl $0xb, 0x24(%rsp)
movq 0xa0(%rsp), %rax
movq 0x18(%rax), %rax
movq (%rax,%r13,8), %rbx
movq 0x30(%rsp), %rax
jb 0x46b5b5
testb $0x4, 0x29(%rbx)
jne 0x46ba86
movw $0x0, 0x1e(%rbx)
movq 0x68(%rsp), %rax
movq 0x8(%rax), %rax
movq %rbx, 0x28(%rsp)
movzbl 0x10(%rbx), %ecx
imulq $0x70, %rcx, %rcx
movl 0x48(%rax,%rcx), %r8d
movq 0x58(%rsp), %rbp
notq %rbp
xorl %r15d, %r15d
movq %r13, 0x8(%rsp)
movl %r8d, 0x4(%rsp)
movl $0x1, %ebx
movl %r15d, %ecx
shlq %cl, %rbx
btq %r15, %r10
jb 0x46b549
movq %r15, %r14
shlq $0x5, %r14
movq 0x38(%rsp), %rax
movq (%rax,%r14), %r12
testq %r12, %r12
je 0x46b456
movl 0x4(%r12), %eax
btl $0xc, %eax
jae 0x46b456
btl $0x12, %eax
jb 0x46b447
addq $0x10, %r12
jmp 0x46b450
movq 0x20(%r12), %r12
addq $0x8, %r12
movq (%r12), %r12
jmp 0x46b42b
cmpb $-0x62, (%r12)
jne 0x46b549
cmpl %r8d, 0x2c(%r12)
jne 0x46b549
movq %r10, %r13
movswl 0x30(%r12), %edx
movq 0xb0(%rsp), %rdi
movl %r8d, %esi
movq %rbp, %rcx
movl 0x18(%rsp), %r8d
xorl %r9d, %r9d
callq 0x4686cd
testq %rax, %rax
je 0x46b537
movzwl 0x14(%rax), %ecx
cmpw $0x1, %cx
movq %r13, %r10
movq 0x10(%rsp), %r11
movl 0x4(%rsp), %r8d
jne 0x46b4f6
movq 0x28(%rsp), %rsi
movzwl 0x2c(%rsi), %edx
testq %rdx, %rdx
setne %dil
je 0x46b530
movq 0x38(%rsi), %rsi
cmpq (%rsi), %rax
je 0x46b4f1
leaq -0x1(%rdx), %rdi
xorl %r8d, %r8d
cmpq %r8, %rdi
je 0x46b53f
leaq 0x1(%r8), %r9
cmpq 0x8(%rsi,%r8,8), %rax
movq %r9, %r8
jne 0x46b4d2
cmpq %rdx, %r9
setb %dil
movl 0x4(%rsp), %r8d
testb %dil, %dil
je 0x46b530
testb $-0x7e, %cl
je 0x46b52d
cmpw $0x0, 0x30(%r12)
js 0x46b52d
addq 0x38(%rsp), %r14
movq 0x68(%rsp), %rcx
movq (%rcx), %rdi
movq (%r14), %rsi
movq (%rax), %rdx
callq 0x468666
movl 0x4(%rsp), %r8d
movq 0x10(%rsp), %r11
movq %r13, %r10
testl %eax, %eax
je 0x46b530
orq %rbx, %r10
movq 0x8(%rsp), %r13
jmp 0x46b549
movq %r13, %r10
movq 0x10(%rsp), %r11
movq 0x8(%rsp), %r13
movl 0x4(%rsp), %r8d
incq %r15
cmpq %r11, %r15
jne 0x46b406
movq 0x28(%rsp), %rbx
movl 0x28(%rbx), %eax
btl $0xc, %eax
jb 0x46b5a9
btl $0x8, %eax
movq 0x38(%rsp), %r15
jb 0x46b5bd
movq 0x20(%rbx), %r12
testq %r12, %r12
je 0x46bad0
testb $0x4, 0x63(%r12)
jne 0x46bad0
movzwl 0x5e(%r12), %eax
movq %rax, 0x80(%rsp)
movzwl 0x60(%r12), %eax
cmpb $0x0, 0x62(%r12)
setne %cl
movl %ecx, (%rsp)
jmp 0x46b5d1
xorl %ecx, %ecx
movq 0x38(%rsp), %r15
jmp 0x46b952
movl (%rsp), %ecx
jmp 0x46ba55
movl $0x1, %eax
movq $0x0, 0x80(%rsp)
xorl %r12d, %r12d
testl %eax, %eax
je 0x46b947
movl $0x1, %edx
movl %r13d, %ecx
shlq %cl, %rdx
movq %rdx, 0x98(%rsp)
movl %eax, %eax
movq %rax, 0xc0(%rsp)
xorl %r14d, %r14d
movq $0x0, 0x60(%rsp)
movq $0x0, 0x88(%rsp)
movl $0x0, 0x1c(%rsp)
movq %r12, 0x40(%rsp)
movzwl 0x18(%rbx), %eax
movb $0x1, %bpl
cmpq %rax, %r14
jae 0x46b693
movzwl 0x2e(%rbx), %ecx
cmpq %rcx, %r14
jb 0x46b693
movq 0x38(%rbx), %rdx
movq (%rdx,%r14,8), %rsi
movzwl 0x14(%rsi), %ecx
testl %ecx, 0x18(%rsp)
je 0x46b65d
btl $0x8, %ecx
movl (%rsp), %esi
movzbl %sil, %esi
movl $0x0, %edx
cmovbl %edx, %esi
movl %esi, (%rsp)
movb $0x1, %bpl
jmp 0x46b687
movb $0x1, %bpl
testb $0x1, %cl
je 0x46b687
movq (%rsi), %rsi
leal -0x1(%rax), %edi
movq %r14, %r8
cmpq %r8, %rdi
je 0x46b682
movq 0x8(%rdx,%r8,8), %r9
incq %r8
cmpq %rsi, (%r9)
jne 0x46b66e
xorl %ebp, %ebp
movl 0x4(%rsp), %r8d
movb $0x1, %dl
testl %ecx, 0x18(%rsp)
jne 0x46b8e8
testq %r12, %r12
je 0x46b6c6
movq 0x8(%r12), %rcx
movq 0x18(%r12), %rdx
movzwl (%rcx,%r14,2), %ecx
movq 0x38(%r12), %rsi
cmpw 0x44(%rdx), %cx
movzbl (%rsi,%r14), %edx
movl %edx, 0x20(%rsp)
movl $0xffff, %edx           # imm = 0xFFFF
cmovel %edx, %ecx
movswl %cx, %esi
jmp 0x46b6d3
movl $0x0, 0x20(%rsp)
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
movl (%rsp), %edx
cmpq %rax, %r14
jb 0x46b702
testb %dl, %dl
je 0x46b702
testl %esi, %esi
js 0x46b702
movq 0x18(%r12), %rax
movq 0x8(%rax), %rax
movl %esi, %ecx
shlq $0x5, %rcx
cmpb $0x0, 0x18(%rax,%rcx)
movzbl %dl, %edx
movl $0x0, %eax
cmovel %eax, %edx
movl %edx, (%rsp)
xorl %ebx, %ebx
testb %bpl, %bpl
je 0x46b851
movl %ebp, %r13d
movq %r10, 0x90(%rsp)
movl %esi, 0x4c(%rsp)
btq %rbx, %r10
jae 0x46b73f
incq %rbx
testb %r13b, %r13b
setne %al
cmpq %r11, %rbx
setb %bpl
andb %al, %bpl
jne 0x46b71f
jmp 0x46b848
movq %rbx, %r12
shlq $0x5, %r12
movq (%r15,%r12), %rdi
testq %rdi, %rdi
je 0x46b771
movl 0x4(%rdi), %eax
btl $0xc, %eax
jae 0x46b771
btl $0x12, %eax
jb 0x46b764
addq $0x10, %rdi
jmp 0x46b76c
movq 0x20(%rdi), %rdi
addq $0x8, %rdi
movq (%rdi), %rdi
jmp 0x46b74a
movl 0x24(%rsp), %eax
andl $0xc0, %eax
movzbl %r13b, %r13d
cmovel %eax, %r13d
cmpl $-0x1, %esi
jl 0x46b79c
cmpb $-0x62, (%rdi)
jne 0x46b725
cmpl %r8d, 0x2c(%rdi)
jne 0x46b725
movswl 0x30(%rdi), %eax
cmpl %eax, %esi
jne 0x46b725
jmp 0x46b7d7
movq 0x40(%rsp), %rax
movq 0x50(%rax), %rax
movq %r14, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rsi
movl %r8d, %edx
callq 0x468606
movl 0x4c(%rsp), %esi
movl 0x4(%rsp), %r8d
movq 0x10(%rsp), %r11
movq 0x90(%rsp), %r10
testl %eax, %eax
jne 0x46b725
cmpl $-0x1, %esi
je 0x46b837
addq %r15, %r12
movq 0x68(%rsp), %rax
movq (%rax), %r15
movq (%r12), %rsi
movq %r15, %rdi
callq 0x43cd2e
testq %rax, %rax
jne 0x46b7ff
movq (%r15), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq 0x40(%rsp), %rax
movq 0x40(%rax), %rax
movq (%rax,%r14,8), %rsi
callq 0x407729
testl %eax, %eax
movq 0x90(%rsp), %r10
movq 0x38(%rsp), %r15
movq 0x10(%rsp), %r11
movl 0x4(%rsp), %r8d
movl 0x4c(%rsp), %esi
jne 0x46b725
leal 0x1(%r14), %eax
movq 0x28(%rsp), %rcx
movw %ax, 0x1e(%rcx)
movb $0x1, %al
jmp 0x46b84a
xorl %eax, %eax
movq 0x8(%rsp), %r13
jmp 0x46b853
xorl %eax, %eax
testb $0x40, 0x24(%rsp)
jne 0x46b8a0
testb $0x1, %bpl
je 0x46b8a0
movl %ebx, %ecx
cmpb $0x0, 0x60(%rsp)
movq 0x40(%rsp), %r12
je 0x46b8ff
movzbl 0x88(%rsp), %edx
movl 0x20(%rsp), %edi
xorl %edx, %edi
shlq $0x5, %rcx
movzbl 0x18(%r15,%rcx), %ecx
cmpl %ecx, %edi
movzbl %al, %eax
movl $0x0, %ecx
cmovnel %ecx, %eax
movb $0x1, %cl
movq %rcx, 0x60(%rsp)
jmp 0x46b8a5
movq 0x40(%rsp), %r12
testb %al, %al
je 0x46b8c7
cmpl $-0x1, %esi
movl 0x1c(%rsp), %ecx
movzbl %cl, %ecx
movl $0x1, %eax
cmovel %eax, %ecx
movl %ecx, 0x1c(%rsp)
btsq %rbx, %r10
movb $0x1, %dl
jmp 0x46b8e3
xorl %edx, %edx
cmpq 0x80(%rsp), %r14
movl (%rsp), %eax
movzbl %al, %eax
cmovbl %edx, %eax
testq %r14, %r14
cmovel %edx, %eax
movl %eax, (%rsp)
movq 0x28(%rsp), %rbx
testb %dl, %dl
je 0x46b93d
incq %r14
cmpq 0xc0(%rsp), %r14
jb 0x46b61b
jmp 0x46b93d
shlq $0x5, %rcx
movb 0x18(%r15,%rcx), %cl
movl %ecx, %edx
movl 0x20(%rsp), %edi
xorb %dil, %dl
movq %rdx, 0x88(%rsp)
movb $0x1, %dl
movq %rdx, 0x60(%rsp)
cmpb %dil, %cl
je 0x46b8a5
movq 0x130(%rsp), %rcx
movq 0x98(%rsp), %rdx
orq %rdx, (%rcx)
jmp 0x46b8a5
cmpb $0x0, 0x1c(%rsp)
sete %al
jmp 0x46b949
movb $0x1, %al
cmpb $0x0, (%rsp)
sete %cl
andb %al, %cl
testb %cl, %cl
movq 0x30(%rsp), %rax
je 0x46b962
xorl %ecx, %ecx
jmp 0x46ba55
movq 0x70(%rsp), %rcx
movq %rbx, %rdx
movq %rcx, %rbx
orq 0x8(%rdx), %rbx
movq %rbx, 0x70(%rsp)
notq %rbx
movq %r15, %r12
xorl %r14d, %r14d
movl $0x1, %r13d
movl %r14d, %ecx
shlq %cl, %r13
btq %r14, %r10
jb 0x46ba39
movq (%r12), %r15
testq %r15, %r15
je 0x46b9c3
movq 0xb8(%rsp), %rdi
movq %r15, %rsi
movq %r10, %rbp
callq 0x468297
movq 0x10(%rsp), %r11
movq %rbp, %r10
movq %rax, %rbp
movq 0x30(%rsp), %rax
jmp 0x46b9c5
xorl %ebp, %ebp
testq %rbp, %rbp
jne 0x46ba2a
movb $0x1, 0xec(%rsp)
leaq -0x190fe(%rip), %rcx    # 0x4528db
movq %rcx, 0xd0(%rsp)
leaq -0x19059(%rip), %rcx    # 0x45298f
movq %rcx, 0xd8(%rsp)
movl $0x0, 0xf0(%rsp)
testq %r15, %r15
je 0x46ba20
leaq 0xc8(%rsp), %rdi
movq %r15, %rsi
movq %r10, %r15
callq 0x452999
movq 0x10(%rsp), %r11
movq %r15, %r10
movq 0x30(%rsp), %rax
cmpb $0x0, 0xec(%rsp)
je 0x46ba39
testq %rbx, %rbp
movl $0x0, %ecx
cmovneq %rcx, %r13
orq %r13, %r10
incq %r14
addq $0x20, %r12
cmpq %r14, %rax
jne 0x46b97f
movb $0x1, %cl
movq 0x8(%rsp), %r13
movq 0x28(%rsp), %rbx
movl %ecx, (%rsp)
testb %cl, %cl
je 0x46ba90
cmpq 0x50(%rsp), %r10
jae 0x46ba90
leaq 0x1(%r13), %rax
cmpq 0x78(%rsp), %r13
movq %rax, %r13
movq 0x30(%rsp), %rax
jb 0x46b383
jmp 0x46ba90
movb $0x1, %cl
movl %ecx, (%rsp)
xorl %r10d, %r10d
jmp 0x46ba90
cmpb $0x0, 0x1d(%rbx)
cmovneq 0x50(%rsp), %r10
cmpq 0x50(%rsp), %r10
jne 0x46ba99
jmp 0x46bad2
movq %rax, %rcx
movb $-0x1, %al
cmpb $0x0, (%rsp)
jne 0x46bad2
leal -0x1(%rcx), %edx
cmpq $0x2, %rcx
jl 0x46bad0
decq %rcx
movq $-0x1, %rsi
shlq %cl, %rsi
orq %r10, %rsi
movzbl %dl, %edi
decl %edx
movzbl %al, %eax
cmpq $-0x1, %rsi
cmovel %edi, %eax
jne 0x46baa7
jmp 0x46bad2
xorl %eax, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq