// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movw %r8w, %ax
movq 0x10(%rbp), %r8
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movw %cx, -0x22(%rbp)
movw %ax, -0x24(%rbp)
movq %r9, -0x30(%rbp)
movq $0x0, -0x60(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movzwl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x4550d4
movq -0x88(%rbp), %rax
movzwl 0x5c(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x4550d4
movb $0x0, -0x1(%rbp)
jmp 0x455b24
movq -0x18(%rbp), %rax
movl (%rax), %eax
movw %ax, -0x3e(%rbp)
movzwl -0x3e(%rbp), %eax
cmpl $0x3f, %eax
jle 0x4550f0
movb $0x0, -0x1(%rbp)
jmp 0x455b24
movb $0x1, -0x34(%rbp)
movzwl -0x3e(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movq $0x0, -0xa8(%rbp)
movw $0x182, -0x38(%rbp)     # imm = 0x182
movzwl -0x22(%rbp), %eax
andl $0x803, %eax            # imm = 0x803
cmpl $0x0, %eax
je 0x455144
movzwl -0x38(%rbp), %eax
orl $0x1, %eax
movw %ax, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
movzbl -0x34(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xf1(%rbp)
je 0x455186
movq -0x90(%rbp), %rcx
xorl %eax, %eax
cmpq -0x98(%rbp), %rcx
movb %al, -0xf1(%rbp)
jae 0x455186
movl -0x44(%rbp), %eax
movzwl -0x24(%rbp), %ecx
cmpl %ecx, %eax
setle %al
movb %al, -0xf1(%rbp)
movb -0xf1(%rbp), %al
testb $0x1, %al
jne 0x455195
jmp 0x455aa7
cmpl $0x0, -0x44(%rbp)
jle 0x4551b1
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
orq -0xa8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movl -0x44(%rbp), %eax
movzwl -0x24(%rbp), %ecx
cmpl %ecx, %eax
jge 0x4551e5
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movzwl -0x22(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x4551e3
jmp 0x455a99
jmp 0x4551ed
movq -0x30(%rbp), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x45522c
movq -0x60(%rbp), %rax
movsbl 0x1d(%rax), %eax
cmpl $0x0, %eax
je 0x455227
movzwl -0x22(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
jne 0x455227
movq -0x98(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x455aa7
movzwl -0x22(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x455244
movq -0x60(%rbp), %rax
movw $0x0, 0x1e(%rax)
jmp 0x455246
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rax
movq -0x60(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
imulq $0x70, %rcx, %rcx
addq %rcx, %rax
movl 0x40(%rax), %eax
movl %eax, -0x50(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movzwl -0x3e(%rbp), %ecx
cmpl %ecx, %eax
jge 0x45545c
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq -0x90(%rbp), %rax
cmpq $0x0, %rax
je 0x45529c
jmp 0x45544e
movq -0x18(%rbp), %rax
addq $0x8, %rax
movslq -0x48(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x42f120
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa4, %eax
je 0x4552ce
jmp 0x45544e
movq -0x70(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x50(%rbp), %eax
je 0x4552df
jmp 0x45544e
movq -0x10(%rbp), %rdi
addq $0x68, %rdi
movl -0x50(%rbp), %esi
movq -0x70(%rbp), %rax
movswl 0x30(%rax), %edx
movq -0xa8(%rbp), %rcx
xorq $-0x1, %rcx
movzwl -0x38(%rbp), %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x450560
movq %rax, -0x68(%rbp)
cmpq $0x0, -0x68(%rbp)
jne 0x45531c
jmp 0x45544e
movq -0x68(%rbp), %rax
movzwl 0x14(%rax), %eax
cmpl $0x1, %eax
jne 0x455393
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %ecx
movq -0x60(%rbp), %rax
movzwl 0x2c(%rax), %edx
xorl %eax, %eax
cmpl %edx, %ecx
movb %al, -0xf2(%rbp)
jge 0x455364
movq -0x68(%rbp), %rax
movq -0x60(%rbp), %rcx
movq 0x38(%rcx), %rcx
movslq -0x4c(%rbp), %rdx
cmpq (%rcx,%rdx,8), %rax
setne %al
movb %al, -0xf2(%rbp)
movb -0xf2(%rbp), %al
testb $0x1, %al
jne 0x455370
jmp 0x45537d
jmp 0x455372
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x455330
movl -0x4c(%rbp), %eax
movq -0x60(%rbp), %rcx
movzwl 0x2c(%rcx), %ecx
cmpl %ecx, %eax
jl 0x455391
jmp 0x45544e
jmp 0x455393
movq -0x68(%rbp), %rax
movzwl 0x14(%rax), %eax
andl $0x82, %eax
cmpl $0x0, %eax
je 0x455433
movq -0x70(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl $0x0, %eax
jl 0x455433
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
movq -0x18(%rbp), %rax
addq $0x8, %rax
movslq -0x48(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x448820
movq %rax, -0xb8(%rbp)
movq -0xb0(%rbp), %rdi
movq -0x68(%rbp), %rax
movq (%rax), %rsi
callq 0x3cf220
movq %rax, -0xc0(%rbp)
cmpq $0x0, -0xc0(%rbp)
je 0x45542f
movq -0xb8(%rbp), %rax
movq (%rax), %rdi
movq -0xc0(%rbp), %rax
movq (%rax), %rsi
callq 0x3c3e60
cmpl $0x0, %eax
je 0x455431
jmp 0x45544e
jmp 0x455433
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x45526e
movq -0x60(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x4559a2
movq -0x60(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x45549b
movq $0x0, -0x80(%rbp)
movw $0x0, -0x3a(%rbp)
movw $0x1, -0x3c(%rbp)
jmp 0x455523
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x80(%rbp)
cmpq $0x0, %rax
je 0x4554c5
movq -0x80(%rbp), %rax
movw 0x63(%rax), %ax
shrw $0x2, %ax
andw $0x1, %ax
movzwl %ax, %eax
cmpl $0x0, %eax
je 0x4554ce
movb $0x0, -0x1(%rbp)
jmp 0x455b24
movq -0x80(%rbp), %rax
movw 0x5e(%rax), %ax
movw %ax, -0x3a(%rbp)
movq -0x80(%rbp), %rax
movw 0x60(%rax), %ax
movw %ax, -0x3c(%rbp)
movq -0x80(%rbp), %rax
movzbl 0x62(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xf3(%rbp)
je 0x455513
movq -0x60(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x8000, %eax           # imm = 0x8000
cmpl $0x0, %eax
sete %al
movb %al, -0xf3(%rbp)
movb -0xf3(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x34(%rbp)
jmp 0x455523
movb $0x0, -0x31(%rbp)
movb $0x0, -0x32(%rbp)
movb $0x0, -0x35(%rbp)
movl $0x0, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movzwl -0x3c(%rbp), %ecx
cmpl %ecx, %eax
jge 0x455996
movb $0x1, -0xc1(%rbp)
movl -0x4c(%rbp), %eax
movq -0x60(%rbp), %rcx
movzwl 0x18(%rcx), %ecx
cmpl %ecx, %eax
jge 0x455632
movl -0x4c(%rbp), %eax
movq -0x60(%rbp), %rcx
movzwl 0x2e(%rcx), %ecx
cmpl %ecx, %eax
jl 0x455632
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movw 0x14(%rax), %ax
movw %ax, -0xc4(%rbp)
movzwl -0xc4(%rbp), %eax
movzwl -0x38(%rbp), %ecx
andl %ecx, %eax
cmpl $0x0, %eax
je 0x4555b9
movzwl -0xc4(%rbp), %eax
andl $0x180, %eax            # imm = 0x180
cmpl $0x0, %eax
je 0x4555b4
movb $0x0, -0x34(%rbp)
jmp 0x455988
movzwl -0xc4(%rbp), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x45562e
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
movq %rax, -0xd0(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl -0x48(%rbp), %eax
movq -0x60(%rbp), %rcx
movzwl 0x18(%rcx), %ecx
cmpl %ecx, %eax
jge 0x45562c
movq -0x60(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rax
cmpq -0xd0(%rbp), %rax
jne 0x45561f
movb $0x0, -0xc1(%rbp)
jmp 0x45562c
jmp 0x455621
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x4555eb
jmp 0x45562e
jmp 0x455630
jmp 0x455632
cmpq $0x0, -0x80(%rbp)
je 0x45567e
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x4c(%rbp), %rcx
movswl (%rax,%rcx,2), %eax
movl %eax, -0x54(%rbp)
movq -0x80(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x4c(%rbp), %rcx
movzbl (%rax,%rcx), %eax
andl $0x1, %eax
movb %al, -0x33(%rbp)
movl -0x54(%rbp), %eax
movq -0x80(%rbp), %rcx
movq 0x18(%rcx), %rcx
movswl 0x44(%rcx), %ecx
cmpl %ecx, %eax
jne 0x45567c
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
jmp 0x455689
movl $0xffffffff, -0x54(%rbp) # imm = 0xFFFFFFFF
movb $0x0, -0x33(%rbp)
movzbl -0x34(%rbp), %eax
cmpl $0x0, %eax
je 0x4556cb
cmpl $0x0, -0x54(%rbp)
jl 0x4556cb
movl -0x4c(%rbp), %eax
movq -0x60(%rbp), %rcx
movzwl 0x18(%rcx), %ecx
cmpl %ecx, %eax
jl 0x4556cb
movq -0x80(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x54(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzbl 0x18(%rax), %eax
cmpl $0x0, %eax
jne 0x4556cb
movb $0x0, -0x34(%rbp)
movb $0x0, -0x36(%rbp)
movl $0x0, -0x48(%rbp)
movzbl -0xc1(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xf4(%rbp)
je 0x4556fc
movl -0x48(%rbp), %eax
movzwl -0x3e(%rbp), %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0xf4(%rbp)
movb -0xf4(%rbp), %al
testb $0x1, %al
jne 0x45570b
jmp 0x45585d
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq -0x90(%rbp), %rax
cmpq $0x0, %rax
je 0x45572a
jmp 0x45584f
movq -0x18(%rbp), %rax
addq $0x8, %rax
movslq -0x48(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x42f120
movq %rax, -0x70(%rbp)
movzwl -0x22(%rbp), %eax
andl $0xc0, %eax
cmpl $0x0, %eax
jne 0x45575e
movb $0x0, -0xc1(%rbp)
cmpl $-0x1, -0x54(%rbp)
jl 0x45579c
movq -0x70(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xa4, %eax
je 0x455777
jmp 0x45584f
movq -0x70(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x50(%rbp), %eax
je 0x455788
jmp 0x45584f
movq -0x70(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl -0x54(%rbp), %eax
je 0x45579a
jmp 0x45584f
jmp 0x4557d9
movq -0x80(%rbp), %rax
movq 0x50(%rax), %rax
addq $0x8, %rax
movslq -0x4c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
movq -0x70(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movl -0x50(%rbp), %edx
callq 0x4500b0
cmpl $0x0, %eax
je 0x4557d7
jmp 0x45584f
jmp 0x4557d9
cmpl $-0x1, -0x54(%rbp)
je 0x45582a
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
addq $0x8, %rax
movslq -0x48(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x448820
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq (%rax), %rdi
movq -0x80(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x4c(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0x3c3e60
cmpl $0x0, %eax
je 0x455828
jmp 0x45584f
jmp 0x45582a
movzwl -0x22(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x455849
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movw %ax, %cx
movq -0x60(%rbp), %rax
movw %cx, 0x1e(%rax)
movb $0x1, -0x36(%rbp)
jmp 0x45585d
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x4556d6
movzbl -0x36(%rbp), %eax
cmpl $0x0, %eax
je 0x4558f3
movzwl -0x22(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x4558f3
cmpb $0x0, -0x31(%rbp)
je 0x4558aa
movzbl -0x32(%rbp), %eax
movzbl -0x33(%rbp), %ecx
xorl %ecx, %eax
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movslq -0x48(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x10(%rcx), %ecx
andl $0x1, %ecx
cmpl %ecx, %eax
je 0x4558a8
movb $0x0, -0x36(%rbp)
jmp 0x4558f1
movzbl -0x33(%rbp), %eax
movq -0x18(%rbp), %rcx
addq $0x8, %rcx
movslq -0x48(%rbp), %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x10(%rcx), %ecx
andl $0x1, %ecx
xorl %ecx, %eax
movb %al, -0x32(%rbp)
cmpb $0x0, -0x32(%rbp)
je 0x4558ed
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq 0x10(%rbp), %rax
orq (%rax), %rcx
movq %rcx, (%rax)
movb $0x1, -0x31(%rbp)
jmp 0x4558f3
movzbl -0x36(%rbp), %eax
cmpl $0x0, %eax
je 0x455942
movq -0x18(%rbp), %rax
addq $0x8, %rax
movslq -0x48(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movzbl 0x10(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x455942
movl -0x4c(%rbp), %eax
movq -0x60(%rbp), %rcx
movzwl 0x18(%rcx), %ecx
cmpl %ecx, %eax
jne 0x45593c
movq -0x60(%rbp), %rax
movl 0x28(%rax), %ecx
orl $0x80000, %ecx          # imm = 0x80000
movl %ecx, 0x28(%rax)
jmp 0x455940
movb $0x0, -0x36(%rbp)
jmp 0x455942
cmpb $0x0, -0x36(%rbp)
je 0x45596f
cmpl $-0x1, -0x54(%rbp)
jne 0x455952
movb $0x1, -0x35(%rbp)
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x455986
cmpl $0x0, -0x4c(%rbp)
je 0x455980
movl -0x4c(%rbp), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x455984
movb $0x0, -0x34(%rbp)
jmp 0x455996
jmp 0x455988
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x455536
cmpb $0x0, -0x35(%rbp)
je 0x4559a0
movb $0x1, -0x34(%rbp)
jmp 0x4559a2
cmpb $0x0, -0x34(%rbp)
je 0x455a97
movq -0x60(%rbp), %rax
movq 0x8(%rax), %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movzwl -0x3e(%rbp), %ecx
cmpl %ecx, %eax
jge 0x455a95
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq -0x90(%rbp), %rax
cmpq $0x0, %rax
je 0x4559f7
jmp 0x455a87
movq -0x18(%rbp), %rax
addq $0x8, %rax
movslq -0x48(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x290, %rdi            # imm = 0x290
movq -0xe0(%rbp), %rsi
callq 0x44e540
movq %rax, -0xe8(%rbp)
cmpq $0x0, -0xe8(%rbp)
jne 0x455a4f
movq -0xe0(%rbp), %rdi
callq 0x422b80
cmpl $0x0, %eax
jne 0x455a4f
jmp 0x455a87
movq -0xe8(%rbp), %rax
movq -0xa0(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x455a85
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x90(%rbp), %rax
movq %rax, -0x90(%rbp)
jmp 0x455a87
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x4559c9
jmp 0x455a97
jmp 0x455a99
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x45514b
movq -0x90(%rbp), %rax
cmpq -0x98(%rbp), %rax
jne 0x455ac0
movw -0x3e(%rbp), %ax
movb %al, -0x1(%rbp)
jmp 0x455b24
cmpb $0x0, -0x34(%rbp)
jne 0x455b20
movzwl -0x3e(%rbp), %eax
subl $0x1, %eax
movl %eax, -0x48(%rbp)
cmpl $0x0, -0x48(%rbp)
jle 0x455b1a
movl -0x48(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0xf0(%rbp)
movq -0x90(%rbp), %rax
andq -0xf0(%rbp), %rax
cmpq -0xf0(%rbp), %rax
jne 0x455b0d
movl -0x48(%rbp), %eax
movb %al, -0x1(%rbp)
jmp 0x455b24
jmp 0x455b0f
movl -0x48(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x455ad0
movb $0x0, -0x1(%rbp)
jmp 0x455b24
movb $-0x1, -0x1(%rbp)
movb -0x1(%rbp), %al
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq