// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: wherePathSatisfiesOrderBy
static int 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,       /* Might contain WHERE_GROUPBY or WHERE_DISTINCTBY */
  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 nColumn;          /* Number of columns in pIndex */
  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 );

  /* Sortability of virtual tables is determined by the xBestIndex method
  ** of the virtual table itself */
  if( pLast->wsFlags & WHERE_VIRTUALTABLE ){
    testcase( nLoop>0 );  /* True when outer loops are one-row and match 
                          ** no ORDER BY terms */
    return pLast->u.vtab.isOrdered;
  }
  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;
  for(iLoop=0; isOrderDistinct && obSat<obDone && iLoop<=nLoop; iLoop++){
    if( iLoop>0 ) ready |= pLoop->maskSelf;
    pLoop = iLoop<nLoop ? pPath->aLoop[iLoop] : pLast;
    assert( (pLoop->wsFlags & WHERE_VIRTUALTABLE)==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 = findTerm(&pWInfo->sWC, iCur, pOBExpr->iColumn,
                       ~ready, WO_EQ|WO_ISNULL, 0);
      if( pTerm==0 ) continue;
      if( (pTerm->eOperator&WO_EQ)!=0 && pOBExpr->iColumn>=0 ){
        const char *z1, *z2;
        pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
        if( !pColl ) pColl = db->pDfltColl;
        z1 = pColl->zName;
        pColl = sqlite3ExprCollSeq(pWInfo->pParse, pTerm->pExpr);
        if( !pColl ) pColl = db->pDfltColl;
        z2 = pColl->zName;
        if( sqlite3StrICmp(z1, z2)!=0 ) continue;
      }
      obSat |= MASKBIT(i);
    }

    if( (pLoop->wsFlags & WHERE_ONEROW)==0 ){
      if( pLoop->wsFlags & WHERE_IPK ){
        pIndex = 0;
        nColumn = 0;
      }else if( (pIndex = pLoop->u.btree.pIndex)==0 || pIndex->bUnordered ){
        return 0;
      }else{
        nColumn = pIndex->nColumn;
        isOrderDistinct = pIndex->onError!=OE_None;
      }

      /* 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;   /* True to run the ORDER BY search loop */

        /* Skip over == and IS NULL terms */
        if( j<pLoop->u.btree.nEq
         && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL))!=0
        ){
          if( i & WO_ISNULL ){
            testcase( isOrderDistinct );
            isOrderDistinct = 0;
          }
          continue;  
        }

        /* Get the column number in the table (iColumn) and sort order
        ** (revIdx) for the j-th column of the index.
        */
        if( j<nColumn ){
          /* Normal index columns */
          iColumn = pIndex->aiColumn[j];
          revIdx = pIndex->aSortOrder[j];
          if( iColumn==pIndex->pTable->iPKey ) iColumn = -1;
        }else{
          /* The ROWID column at the end */
          assert( j==nColumn );
          iColumn = -1;
          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 and mark that ORDER BY term off 
        */
        bOnce = 1;
        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( pOBExpr->op!=TK_COLUMN ) continue;
          if( pOBExpr->iTable!=iCur ) continue;
          if( pOBExpr->iColumn!=iColumn ) continue;
          if( iColumn>=0 ){
            pColl = sqlite3ExprCollSeq(pWInfo->pParse, pOrderBy->a[i].pExpr);
            if( !pColl ) pColl = db->pDfltColl;
            if( sqlite3StrICmp(pColl->zName, pIndex->azColl[j])!=0 ) continue;
          }
          isMatch = 1;
          break;
        }
        if( isMatch ){
          if( iColumn<0 ){
            testcase( distinctColumns==0 );
            distinctColumns = 1;
          }
          obSat |= MASKBIT(i);
          if( (pWInfo->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 ) return 0;
            }else{
              rev = revIdx ^ pOrderBy->a[i].sortOrder;
              if( rev ) *pRevMask |= MASKBIT(iLoop);
              revSet = 1;
            }
          }
        }else{
          /* No match found */
          if( j==0 || j<nColumn ){
            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;
        if( MASKBIT(i) & obSat ) continue;
        p = pOrderBy->a[i].pExpr;
        if( (exprTableUsage(&pWInfo->sMaskSet, p)&~orderDistinctMask)==0 ){
          obSat |= MASKBIT(i);
        }
      }
    }
  } /* End the loop over all WhereLoops from outer-most down to inner-most */
  if( obSat==obDone ) return 1;
  if( !isOrderDistinct ) return 0;
  return -1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
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, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq (%rax), %rax
movq %rax, -0x80(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x30(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x7a62d
movq -0x30(%rbp), %rax
movzbl 0x1d(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x7add2
movzwl -0x24(%rbp), %eax
cmpl $0x0, %eax
je 0x7a654
movq -0x80(%rbp), %rax
movzwl 0x4c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7a654
movl $0x0, -0x4(%rbp)
jmp 0x7add2
movq -0x18(%rbp), %rax
movl (%rax), %eax
movw %ax, -0x3a(%rbp)
movzwl -0x3a(%rbp), %eax
cmpl $0x3f, %eax
jle 0x7a673
movl $0x0, -0x4(%rbp)
jmp 0x7add2
movb $0x1, -0x34(%rbp)
movzwl -0x3a(%rbp), %eax
movl %eax, %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
subq $0x1, %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq $0x0, -0xa0(%rbp)
movl $0x0, -0x40(%rbp)
movzbl -0x34(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xc1(%rbp)
je 0x7a6ea
movq -0x88(%rbp), %rcx
xorl %eax, %eax
cmpq -0x90(%rbp), %rcx
movb %al, -0xc1(%rbp)
jae 0x7a6ea
movl -0x40(%rbp), %eax
movzwl -0x24(%rbp), %ecx
cmpl %ecx, %eax
setle %al
movb %al, -0xc1(%rbp)
movb -0xc1(%rbp), %al
testb $0x1, %al
jne 0x7a6f9
jmp 0x7ada3
cmpl $0x0, -0x40(%rbp)
jle 0x7a715
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
orq -0xa0(%rbp), %rax
movq %rax, -0xa0(%rbp)
movl -0x40(%rbp), %eax
movzwl -0x24(%rbp), %ecx
cmpl %ecx, %eax
jge 0x7a739
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movslq -0x40(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xd0(%rbp)
jmp 0x7a744
movq -0x30(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
addq $0x8, %rax
movq -0x58(%rbp), %rcx
movzbl 0x10(%rcx), %ecx
imulq $0x68, %rcx, %rcx
addq %rcx, %rax
movl 0x3c(%rax), %eax
movl %eax, -0x4c(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x7a912
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x7a7a5
jmp 0x7a904
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x648b0
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x98, %eax
je 0x7a7d7
jmp 0x7a904
movq -0x68(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x4c(%rbp), %eax
je 0x7a7e8
jmp 0x7a904
movq -0x10(%rbp), %rdi
addq $0x150, %rdi            # imm = 0x150
movl -0x4c(%rbp), %esi
movq -0x68(%rbp), %rax
movswl 0x30(%rax), %edx
movq -0xa0(%rbp), %rcx
xorq $-0x1, %rcx
movl $0x82, %r8d
xorl %eax, %eax
movl %eax, %r9d
callq 0x77230
movq %rax, -0x60(%rbp)
cmpq $0x0, -0x60(%rbp)
jne 0x7a829
jmp 0x7a904
movq -0x60(%rbp), %rax
movzwl 0x18(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7a8e9
movq -0x68(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl $0x0, %eax
jl 0x7a8e9
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x659b0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x7a887
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xa8(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
callq 0x659b0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x7a8bf
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0xa8(%rbp), %rdi
movq -0xb0(%rbp), %rsi
callq 0xc970
cmpl $0x0, %eax
je 0x7a8e7
jmp 0x7a904
jmp 0x7a8e9
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x7a777
movq -0x58(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
jne 0x7accf
movq -0x58(%rbp), %rax
movl 0x28(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x7a948
movq $0x0, -0x78(%rbp)
movw $0x0, -0x38(%rbp)
jmp 0x7a99e
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x78(%rbp)
cmpq $0x0, %rax
je 0x7a96e
movq -0x78(%rbp), %rax
movb 0x57(%rax), %al
shrb $0x2, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x7a97a
movl $0x0, -0x4(%rbp)
jmp 0x7add2
movq -0x78(%rbp), %rax
movw 0x54(%rax), %ax
movw %ax, -0x38(%rbp)
movq -0x78(%rbp), %rax
movzbl 0x56(%rax), %eax
cmpl $0x0, %eax
setne %al
andb $0x1, %al
movzbl %al, %eax
movb %al, -0x34(%rbp)
jmp 0x7a99e
movb $0x0, -0x31(%rbp)
movb $0x0, -0x32(%rbp)
movb $0x0, -0x35(%rbp)
movl $0x0, -0x48(%rbp)
movl -0x48(%rbp), %eax
movzwl -0x38(%rbp), %ecx
cmpl %ecx, %eax
jg 0x7acc3
movl -0x48(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x7aa03
movq -0x58(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movzwl 0x18(%rax), %eax
movl %eax, -0x44(%rbp)
andl $0x82, %eax
cmpl $0x0, %eax
je 0x7aa03
movl -0x44(%rbp), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x7a9fe
movb $0x0, -0x34(%rbp)
jmp 0x7acb5
movl -0x48(%rbp), %eax
movzwl -0x38(%rbp), %ecx
cmpl %ecx, %eax
jge 0x7aa4e
movq -0x78(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x48(%rbp), %rcx
movl (%rax,%rcx,4), %eax
movl %eax, -0x50(%rbp)
movq -0x78(%rbp), %rax
movq 0x38(%rax), %rax
movslq -0x48(%rbp), %rcx
movb (%rax,%rcx), %al
movb %al, -0x33(%rbp)
movl -0x50(%rbp), %eax
movq -0x78(%rbp), %rcx
movq 0x18(%rcx), %rcx
movswl 0x40(%rcx), %ecx
cmpl %ecx, %eax
jne 0x7aa4c
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
jmp 0x7aa59
movl $0xffffffff, -0x50(%rbp) # imm = 0xFFFFFFFF
movb $0x0, -0x33(%rbp)
movzbl -0x34(%rbp), %eax
cmpl $0x0, %eax
je 0x7aa98
cmpl $0x0, -0x50(%rbp)
jl 0x7aa98
movl -0x48(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jl 0x7aa98
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x8(%rax), %rax
movslq -0x50(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
jne 0x7aa98
movb $0x0, -0x34(%rbp)
movb $0x1, -0xb1(%rbp)
movb $0x0, -0x36(%rbp)
movl $0x0, -0x44(%rbp)
movzbl -0xb1(%rbp), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0xd1(%rbp)
je 0x7aad0
movl -0x44(%rbp), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
setl %al
movb %al, -0xd1(%rbp)
movb -0xd1(%rbp), %al
testb $0x1, %al
jne 0x7aadf
jmp 0x7abda
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x7aafe
jmp 0x7abcc
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x648b0
movq %rax, -0x68(%rbp)
movzwl -0x22(%rbp), %eax
andl $0x300, %eax            # imm = 0x300
cmpl $0x0, %eax
jne 0x7ab32
movb $0x0, -0xb1(%rbp)
movq -0x68(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x98, %eax
je 0x7ab45
jmp 0x7abcc
movq -0x68(%rbp), %rax
movl 0x2c(%rax), %eax
cmpl -0x4c(%rbp), %eax
je 0x7ab53
jmp 0x7abcc
movq -0x68(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl -0x50(%rbp), %eax
je 0x7ab62
jmp 0x7abcc
cmpl $0x0, -0x50(%rbp)
jl 0x7abc6
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x659b0
movq %rax, -0x70(%rbp)
cmpq $0x0, -0x70(%rbp)
jne 0x7aba1
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x70(%rbp), %rax
movq (%rax), %rdi
movq -0x78(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xc970
cmpl $0x0, %eax
je 0x7abc4
jmp 0x7abcc
jmp 0x7abc6
movb $0x1, -0x36(%rbp)
jmp 0x7abda
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x7aaaa
cmpb $0x0, -0x36(%rbp)
je 0x7ac9c
cmpl $0x0, -0x50(%rbp)
jge 0x7abee
movb $0x1, -0x35(%rbp)
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rax
movzwl 0x32(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
jne 0x7ac9a
cmpb $0x0, -0x31(%rbp)
je 0x7ac54
movzbl -0x32(%rbp), %eax
movzbl -0x33(%rbp), %ecx
xorl %ecx, %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x44(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movzbl 0x18(%rcx), %ecx
cmpl %ecx, %eax
je 0x7ac52
movl $0x0, -0x4(%rbp)
jmp 0x7add2
jmp 0x7ac98
movzbl -0x33(%rbp), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x44(%rbp), %rdx
shlq $0x5, %rdx
addq %rdx, %rcx
movzbl 0x18(%rcx), %ecx
xorl %ecx, %eax
movb %al, -0x32(%rbp)
cmpb $0x0, -0x32(%rbp)
je 0x7ac94
movl -0x40(%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 0x7ac9a
jmp 0x7acb3
cmpl $0x0, -0x48(%rbp)
je 0x7acad
movl -0x48(%rbp), %eax
movzwl -0x38(%rbp), %ecx
cmpl %ecx, %eax
jge 0x7acb1
movb $0x0, -0x34(%rbp)
jmp 0x7acc3
jmp 0x7acb5
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x7a9b1
cmpb $0x0, -0x35(%rbp)
je 0x7accd
movb $0x1, -0x34(%rbp)
jmp 0x7accf
cmpb $0x0, -0x34(%rbp)
je 0x7ad93
movq -0x58(%rbp), %rax
movq 0x8(%rax), %rax
orq -0x98(%rbp), %rax
movq %rax, -0x98(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movzwl -0x3a(%rbp), %ecx
cmpl %ecx, %eax
jge 0x7ad91
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
andq -0x88(%rbp), %rax
cmpq $0x0, %rax
je 0x7ad21
jmp 0x7ad83
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x44(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x10(%rbp), %rdi
addq $0x4c, %rdi
movq -0xc0(%rbp), %rsi
callq 0x760d0
movq -0x98(%rbp), %rcx
xorq $-0x1, %rcx
andq %rcx, %rax
cmpq $0x0, %rax
jne 0x7ad81
movl -0x44(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq -0x88(%rbp), %rax
movq %rax, -0x88(%rbp)
jmp 0x7ad83
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x7acf6
jmp 0x7ad93
jmp 0x7ad95
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x7a6af
movq -0x88(%rbp), %rax
cmpq -0x90(%rbp), %rax
jne 0x7adbc
movl $0x1, -0x4(%rbp)
jmp 0x7add2
cmpb $0x0, -0x34(%rbp)
jne 0x7adcb
movl $0x0, -0x4(%rbp)
jmp 0x7add2
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
movl -0x4(%rbp), %eax
addq $0xe0, %rsp
popq %rbp
retq
nop