// File: /workspace/github_c_makefile_star2_O3/shifengbin[P]bishe/Output/../Persistence/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,       /* 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 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;
  for(iLoop=0; isOrderDistinct && obSat<obDone && iLoop<=nLoop; iLoop++){
    if( iLoop>0 ) ready |= pLoop->maskSelf;
    pLoop = iLoop<nLoop ? pPath->aLoop[iLoop] : pLast;
    if( pLoop->wsFlags & WHERE_VIRTUALTABLE ){
      if( pLoop->u.vtab.isOrdered ) obSat = obDone;
      break;
    }
    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, WO_EQ|WO_ISNULL|WO_IS, 0);
      if( pTerm==0 ) continue;
      if( (pTerm->eOperator&(WO_EQ|WO_IS))!=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;
        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;   /* True to run the ORDER BY search loop */

        /* Skip over == and IS NULL terms */
        if( j<pLoop->u.btree.nEq
         && pLoop->nSkip==0
         && ((i = pLoop->aLTerm[j]->eOperator) & (WO_EQ|WO_ISNULL|WO_IS))!=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( pIndex ){
          iColumn = pIndex->aiColumn[j];
          revIdx = pIndex->aSortOrder[j];
          if( iColumn==pIndex->pTable->iPKey ) iColumn = -1;
        }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 
        */
        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( iColumn>=(-1) ){
            if( pOBExpr->op!=TK_COLUMN ) continue;
            if( pOBExpr->iTable!=iCur ) continue;
            if( pOBExpr->iColumn!=iColumn ) continue;
          }else{
            if( sqlite3ExprCompare(pOBExpr,pIndex->aColExpr->a[j].pExpr,iCur) ){
              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 && (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<0 ){
            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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %r9, -0xe0(%rbp)
movl %ecx, -0x64(%rbp)
movq %rdx, -0xd0(%rbp)
movq %rsi, -0x50(%rbp)
movq (%rdi), %rax
movq (%rax), %rcx
testl %r8d, %r8d
je 0x680a3
testb $-0x80, 0x4c(%rcx)
jne 0x680b1
movq -0x50(%rbp), %rax
movzwl (%rax), %r9d
cmpl $0x3f, %r9d
jbe 0x680b8
xorl %eax, %eax
jmp 0x687b3
movq %rcx, -0x88(%rbp)
movq $-0x1, %rdx
movl %r9d, %ecx
shlq %cl, %rdx
testl %r9d, %r9d
je 0x68781
notq %rdx
leaq 0x158(%rdi), %rax
movq %rax, -0xf0(%rbp)
leaq 0x54(%rdi), %rax
movq %rax, -0xf8(%rbp)
movzwl %r8w, %ecx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
movl -0x64(%rbp), %eax
andl $0x300, %eax            # imm = 0x300
movl %eax, -0x9c(%rbp)
xorl %esi, %esi
xorl %r10d, %r10d
movq $0x0, -0xb0(%rbp)
xorl %r8d, %r8d
xorl %eax, %eax
movq %r9, -0x48(%rbp)
movq %rdx, -0x90(%rbp)
movq %rdi, -0x98(%rbp)
movq %rcx, -0xd8(%rbp)
testq %rsi, %rsi
je 0x6813f
orq 0x8(%rax), %r10
movq -0xe0(%rbp), %r11
cmpq %rcx, %rsi
jae 0x6815a
movq -0xd0(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax,%rsi,8), %r11
testb $0x4, 0x29(%r11)
jne 0x68773
movq %rsi, -0xb8(%rbp)
movq 0x8(%rdi), %rax
movq %r11, -0x78(%rbp)
movzbl 0x10(%r11), %ecx
imulq $0x70, %rcx, %rcx
movl 0x4c(%rax,%rcx), %r11d
movq %r10, -0xe8(%rbp)
notq %r10
movq %r10, -0x60(%rbp)
xorl %r14d, %r14d
movl %r11d, -0x40(%rbp)
movl $0x1, %r12d
movl %r14d, %ecx
shlq %cl, %r12
btq %r14, %r8
jb 0x682b3
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq %r14, %rbx
shlq $0x5, %rbx
movq (%rax,%rbx), %r13
movl 0x4(%r13), %eax
btl $0xc, %eax
jae 0x681e4
btl $0x12, %eax
jb 0x681d6
addq $0x10, %r13
jmp 0x681de
movq 0x20(%r13), %rax
movq 0x8(%rax), %r13
movq (%r13), %r13
jmp 0x681c0
cmpb $-0x68, (%r13)
jne 0x682b3
cmpl %r11d, 0x2c(%r13)
jne 0x682b3
movq %r8, -0x38(%rbp)
movswl 0x30(%r13), %edx
movq -0xf0(%rbp), %rdi
movl %r11d, %esi
movq -0x60(%rbp), %rcx
movl $0x182, %r8d            # imm = 0x182
xorl %r9d, %r9d
callq 0x65adc
testq %rax, %rax
je 0x682a7
movq %rax, %r15
testb $-0x7e, 0x1a(%rax)
movq -0x48(%rbp), %r9
movq -0x38(%rbp), %r8
je 0x682a2
cmpw $0x0, 0x30(%r13)
js 0x682a2
movq -0x98(%rbp), %r13
movq (%r13), %rdi
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax,%rbx), %rsi
callq 0x51845
testq %rax, %rax
jne 0x6826c
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rbx
movq (%r13), %rdi
movq (%r15), %rsi
callq 0x51845
testq %rax, %rax
jne 0x6828b
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rsi
movq %rbx, %rdi
callq 0xa400
testl %eax, %eax
movq -0x48(%rbp), %r9
movq -0x38(%rbp), %r8
jne 0x682af
orq %r12, %r8
jmp 0x682af
movq -0x48(%rbp), %r9
movq -0x38(%rbp), %r8
movl -0x40(%rbp), %r11d
incq %r14
cmpq %r9, %r14
jne 0x68197
movq -0x78(%rbp), %rsi
movl 0x28(%rsi), %eax
btl $0xc, %eax
jb 0x68656
btl $0x8, %eax
movq -0xb8(%rbp), %rcx
jb 0x68318
movq 0x20(%rsi), %r15
testq %r15, %r15
je 0x680b1
testb $0x4, 0x63(%r15)
jne 0x680b1
movzwl 0x60(%r15), %edi
cmpb $0x0, 0x62(%r15)
setne %al
testq %rdi, %rdi
je 0x6863d
movl %eax, -0x2c(%rbp)
movzwl 0x5e(%r15), %eax
movl %eax, -0x68(%rbp)
jmp 0x68327
movl $0x1, %edi
xorl %r15d, %r15d
movl $0x0, -0x68(%rbp)
movl $0x1, %eax
shlq %cl, %rax
movq %rax, -0xc0(%rbp)
xorl %r14d, %r14d
movq $0x0, -0x80(%rbp)
movq $0x0, -0xa8(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, %r10d
xorl %ebx, %ebx
movq %rdi, -0xc8(%rbp)
movq %r15, -0x60(%rbp)
movzwl 0x18(%rsi), %eax
cmpq %rax, %r14
jae 0x68373
cmpw $0x0, 0x2e(%rsi)
je 0x68564
testq %r15, %r15
movl %ebx, -0x6c(%rbp)
movq %r14, -0x38(%rbp)
je 0x683ef
movq 0x8(%r15), %rdx
movq 0x18(%r15), %rcx
movzwl (%rdx,%r14,2), %edx
movq 0x38(%r15), %rsi
movb (%rsi,%r14), %r12b
cmpw 0x3c(%rcx), %dx
movl $0xffff, %esi           # imm = 0xFFFF
cmovel %esi, %edx
movswl %dx, %esi
movl %esi, %r13d
testw %si, %si
setns %sil
movl %esi, -0x2c(%rbp)
testb %r10b, %r10b
movl %r12d, -0x54(%rbp)
je 0x683e9
testw %dx, %dx
js 0x683e9
movb $0x1, %dl
movl %edx, -0x2c(%rbp)
cmpq %rax, %r14
jb 0x683e9
movq 0x8(%rcx), %rax
movl %r13d, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
cmpb $0x0, 0x28(%rax,%rcx)
movzbl %r10b, %r10d
movl $0x0, %eax
cmovel %eax, %r10d
movl %r10d, -0x30(%rbp)
jmp 0x68407
movl %r10d, -0x30(%rbp)
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
movl $0x0, -0x2c(%rbp)
movl $0x0, -0x54(%rbp)
movb $0x1, %r15b
xorl %r12d, %r12d
movq %r8, %rbx
btq %r12, %r8
jae 0x6842c
testb %r15b, %r15b
je 0x6860c
incq %r12
cmpq %r9, %r12
jb 0x68410
jmp 0x6860c
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq %r12, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r14
testq %r14, %r14
je 0x6846c
movq %r14, %rdi
movl 0x4(%rdi), %eax
btl $0xc, %eax
jae 0x6846e
btl $0x12, %eax
jb 0x6845c
addq $0x10, %rdi
jmp 0x68464
movq 0x20(%rdi), %rax
movq 0x8(%rax), %rdi
movq (%rdi), %rdi
testq %rdi, %rdi
jne 0x68447
xorl %edi, %edi
movl -0x9c(%rbp), %eax
testl %eax, %eax
movzbl %r15b, %r15d
cmovel %eax, %r15d
cmpl $-0x1, %r13d
jl 0x6849e
cmpb $-0x68, (%rdi)
jne 0x68416
cmpl %r11d, 0x2c(%rdi)
jne 0x68416
movswl 0x30(%rdi), %eax
cmpl %eax, %r13d
jne 0x68416
jmp 0x684d1
movq -0x60(%rbp), %rax
movq 0x50(%rax), %rax
movq 0x8(%rax), %rax
movq -0x38(%rbp), %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movl %r11d, %edx
callq 0x532d3
movl -0x40(%rbp), %r11d
movq %rbx, %r8
movq -0x48(%rbp), %r9
testl %eax, %eax
jne 0x68416
cmpb $0x0, -0x2c(%rbp)
je 0x68524
movq -0x98(%rbp), %rax
movq (%rax), %rdi
movq %r14, %rsi
callq 0x51845
testq %rax, %rax
jne 0x684f9
movq -0x88(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rdi
movq -0x60(%rbp), %rax
movq 0x40(%rax), %rax
movq -0x38(%rbp), %rcx
movq (%rax,%rcx,8), %rsi
callq 0xa400
testl %eax, %eax
movq -0x48(%rbp), %r9
movq %rbx, %r8
movl -0x40(%rbp), %r11d
jne 0x68416
btl $0x8, -0x64(%rbp)
jb 0x6858f
cmpb $0x0, -0x80(%rbp)
je 0x685cc
movl -0x54(%rbp), %edi
xorb -0xa8(%rbp), %dil
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
movl %r12d, %eax
movq %rax, %rdx
shlq $0x5, %rdx
movb $0x1, %sil
movq %rsi, -0x80(%rbp)
cmpb 0x18(%rcx,%rdx), %dil
je 0x68592
jmp 0x6860c
movq 0x38(%rsi), %rcx
movq (%rcx,%r14,8), %rcx
movzwl 0x1a(%rcx), %ecx
testl $0x182, %ecx            # imm = 0x182
je 0x68373
btl $0x8, %ecx
movzbl %r10b, %r10d
movl $0x0, %eax
cmovbl %eax, %r10d
jmp 0x685be
movl %r12d, %eax
testl %r13d, %r13d
movl -0x6c(%rbp), %ebx
movzbl %bl, %ebx
movl $0x1, %ecx
cmovsl %ecx, %ebx
btsq %rax, %r8
movq -0x78(%rbp), %rsi
movq -0xc8(%rbp), %rdi
movl -0x30(%rbp), %r10d
movq -0x38(%rbp), %r14
movq -0x60(%rbp), %r15
incq %r14
cmpq %rdi, %r14
jne 0x6835f
jmp 0x68632
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rcx
movl %r12d, %eax
movq %rax, %rdx
shlq $0x5, %rdx
movb 0x18(%rcx,%rdx), %cl
movl %ecx, %edx
movl -0x54(%rbp), %esi
xorb %sil, %dl
movq %rdx, -0xa8(%rbp)
movb $0x1, %dl
movq %rdx, -0x80(%rbp)
cmpb %sil, %cl
je 0x68592
movq 0x10(%rbp), %rcx
movq -0xc0(%rbp), %rdx
orq %rdx, (%rcx)
jmp 0x68592
movq -0x38(%rbp), %rcx
cmpl %ecx, -0x68(%rbp)
movl -0x30(%rbp), %r10d
movzbl %r10b, %r10d
movl $0x0, %eax
cmoval %eax, %r10d
testq %rcx, %rcx
cmovel %eax, %r10d
movq -0x78(%rbp), %rsi
movl -0x6c(%rbp), %ebx
movb $0x1, %al
movl %eax, -0x2c(%rbp)
testb %bl, %bl
jne 0x68656
jmp 0x68640
movl %eax, %r10d
testb %r10b, %r10b
movq -0x90(%rbp), %rdx
je 0x687ce
movl %r10d, %eax
movl %eax, -0x2c(%rbp)
movq -0xb0(%rbp), %rcx
orq 0x8(%rsi), %rcx
movq %rcx, -0xb0(%rbp)
notq %rcx
movq %rcx, -0x40(%rbp)
xorl %r14d, %r14d
movl $0x1, %r13d
movl %r14d, %ecx
shlq %cl, %r13
btq %r14, %r8
jb 0x68714
movq %r8, %rbx
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rax
movq %r14, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r15
movq -0xf8(%rbp), %rdi
movq %r15, %rsi
callq 0x656e1
movq %rax, %r12
testq %rax, %rax
jne 0x68701
leaq -0x118(%rbp), %rax
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
movb $0x1, -0x104(%rbp)
leaq -0x1517f(%rip), %rax    # 0x53555
movq %rax, -0x128(%rbp)
leaq -0x15117(%rip), %rax    # 0x535cb
movq %rax, -0x120(%rbp)
leaq -0x128(%rbp), %rdi
movq %r15, %rsi
callq 0x535da
cmpb $0x0, -0x104(%rbp)
je 0x68722
testq %r12, -0x40(%rbp)
movq %rbx, %r8
je 0x6870d
xorl %r13d, %r13d
orq %r13, %r8
movq -0x48(%rbp), %r9
incq %r14
cmpq %r9, %r14
jne 0x68672
jmp 0x6872b
movq -0x48(%rbp), %r9
movq %rbx, %r8
jmp 0x68714
cmpb $0x0, -0x2c(%rbp)
movq -0xb8(%rbp), %rsi
je 0x687c5
movq -0x90(%rbp), %rdx
cmpq %rdx, %r8
jae 0x6877c
leaq 0x1(%rsi), %rax
movq -0xd8(%rbp), %rcx
cmpq %rcx, %rsi
movq %rax, %rsi
movq -0x98(%rbp), %rdi
movq -0xe8(%rbp), %r10
movq -0x78(%rbp), %rax
jb 0x68136
jmp 0x6877c
cmpb $0x0, 0x1d(%r11)
cmovneq %rdx, %r8
cmpq %rdx, %r8
jne 0x68786
movl %r9d, %eax
jmp 0x687b3
movb $-0x1, %al
cmpb $0x0, -0x2c(%rbp)
jne 0x687b3
movq %r9, %rax
cmpq $0x2, %rax
jl 0x680b1
decq %rax
movq $-0x1, %rdx
movl %eax, %ecx
shlq %cl, %rdx
orq %r8, %rdx
cmpq $-0x1, %rdx
jne 0x68791
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x90(%rbp), %rdx
jmp 0x6877c
movl $0x0, -0x2c(%rbp)
jmp 0x6877c