// File: /workspace/github_c_makefile_star2_O3/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movl %ecx, -0x78(%rbp)
movq %rdx, -0xc8(%rbp)
movq %rsi, -0x40(%rbp)
testb $0x4, 0x29(%r9)
jne 0x5aafe
movq (%rdi), %rax
movq (%rax), %rdx
testw %r8w, %r8w
je 0x5aae9
testb $-0x80, 0x4c(%rdx)
jne 0x5aaf7
movq -0x40(%rbp), %rax
movzwl (%rax), %r10d
cmpl $0x3f, %r10d
jbe 0x5ab08
xorl %eax, %eax
jmp 0x5b171
movzbl 0x1d(%r9), %eax
jmp 0x5b171
movq $-0x1, %rax
movl %r10d, %ecx
shlq %cl, %rax
notq %rax
movq %rax, -0xa8(%rbp)
testl %r10d, %r10d
je 0x5b14b
movq %rdx, -0x98(%rbp)
leaq 0x150(%rdi), %rax
movq %rax, -0xf0(%rbp)
leaq 0x4c(%rdi), %rax
movq %rax, -0xf8(%rbp)
movzwl %r8w, %ecx
movb $0x1, %r8b
andl $0x300, -0x78(%rbp)     # imm = 0x300
xorl %edx, %edx
xorl %esi, %esi
movq $0x0, -0xb0(%rbp)
xorl %r12d, %r12d
xorl %eax, %eax
movq %r10, -0x70(%rbp)
movq %r9, -0xd8(%rbp)
movq %rdi, -0x88(%rbp)
movq %rcx, -0xd0(%rbp)
testq %rdx, %rdx
je 0x5ab8c
orq 0x8(%rax), %rsi
movl %r8d, -0x30(%rbp)
cmpq %rcx, %rdx
jae 0x5aba4
movq -0xc8(%rbp), %rax
movq 0x18(%rax), %rax
movq (%rax,%rdx,8), %r9
movq %rdx, -0xb8(%rbp)
movq 0x8(%rdi), %rax
movq %r9, -0x68(%rbp)
movzbl 0x10(%r9), %ecx
imulq $0x68, %rcx, %rcx
movl 0x44(%rax,%rcx), %r8d
movq %rsi, -0xe8(%rbp)
notq %rsi
movq %rsi, -0x50(%rbp)
xorl %ebx, %ebx
movl %r8d, -0x34(%rbp)
movl $0x1, %r14d
movl %ebx, %ecx
shlq %cl, %r14
btq %rbx, %r12
jb 0x5ad15
movq %rbx, %r15
shlq $0x5, %r15
movq -0x40(%rbp), %rax
movq 0x8(%rax), %r13
addq %r15, %r13
movq (%r13), %r13
movzbl (%r13), %eax
cmpl $0x18, %eax
je 0x5ac0f
cmpl $0x5c, %eax
jne 0x5ac15
addq $0x10, %r13
jmp 0x5abfc
cmpl $0x98, %eax
jne 0x5ad15
cmpl %r8d, 0x2c(%r13)
jne 0x5ad15
movswl 0x30(%r13), %edx
movq -0xf0(%rbp), %rdi
movl %r8d, %esi
movq -0x50(%rbp), %rcx
movl $0x82, %r8d
xorl %r9d, %r9d
callq 0x59103
testq %rax, %rax
je 0x5ad0d
testb $0x2, 0x18(%rax)
movq -0x70(%rbp), %r10
je 0x5ad08
cmpw $0x0, 0x30(%r13)
js 0x5ad08
movq %rax, -0x60(%rbp)
movq -0x88(%rbp), %r13
movq (%r13), %rdi
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax,%r15), %rsi
callq 0x4b225
testq %rax, %rax
jne 0x5ac9e
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %r15
movq (%r13), %rdi
movq -0x60(%rbp), %rax
movq (%rax), %rsi
callq 0x4b225
testq %rax, %rax
jne 0x5acc1
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rax
movb (%r15), %cl
testb %cl, %cl
movq -0x70(%rbp), %r10
je 0x5acf4
incq %r15
movzbl %cl, %ecx
leaq 0x1b3d4(%rip), %rdi     # 0x760b0
movb (%rcx,%rdi), %dl
movzbl (%rax), %esi
cmpb (%rsi,%rdi), %dl
jne 0x5acf6
incq %rax
movb (%r15), %cl
incq %r15
testb %cl, %cl
jne 0x5acd2
xorl %ecx, %ecx
leaq 0x1b3b3(%rip), %rdx     # 0x760b0
movb (%rcx,%rdx), %cl
movzbl (%rax), %eax
cmpb (%rax,%rdx), %cl
jne 0x5ad11
orq %r14, %r12
jmp 0x5ad11
movq -0x70(%rbp), %r10
movl -0x34(%rbp), %r8d
incq %rbx
cmpq %r10, %rbx
jne 0x5abd5
movq -0x68(%rbp), %rdx
movl 0x28(%rdx), %eax
btl $0xc, %eax
jb 0x5b0a2
btl $0x8, %eax
movq -0xb8(%rbp), %rcx
jb 0x5ad68
movq 0x20(%rdx), %r9
xorl %eax, %eax
testq %r9, %r9
je 0x5b171
testb $0x4, 0x57(%r9)
jne 0x5b171
movzwl 0x54(%r9), %r11d
cmpb $0x0, 0x56(%r9)
setne %al
jmp 0x5ad71
xorl %r11d, %r11d
xorl %r9d, %r9d
movl -0x30(%rbp), %eax
movl $0x1, %esi
shlq %cl, %rsi
movq %rsi, -0xc0(%rbp)
movl %r11d, %r15d
incl %r11d
xorl %edi, %edi
movq $0x0, -0x90(%rbp)
movq $0x0, -0xa0(%rbp)
movl %eax, %ebx
xorl %r13d, %r13d
movq %r9, -0xe0(%rbp)
movq %r11, -0x80(%rbp)
movq %r15, -0x58(%rbp)
movslq 0x18(%rdx), %rax
cmpq %rax, %rdi
jge 0x5adec
movq 0x30(%rdx), %rcx
movq (%rcx,%rdi,8), %rcx
movzwl 0x18(%rcx), %ecx
testb $-0x7e, %cl
je 0x5adec
testb %cl, %cl
movzbl %bl, %ebx
movl $0x0, %eax
cmovsl %eax, %ebx
movq %r12, %r14
incq %rdi
movq %r14, %r12
cmpq %r11, %rdi
jne 0x5adb2
jmp 0x5b083
cmpq %r15, %rdi
movq %rdi, -0x50(%rbp)
movl %r13d, -0x74(%rbp)
jae 0x5ae6b
movq 0x8(%r9), %rcx
movq 0x18(%r9), %rdx
movl (%rcx,%rdi,4), %edi
movq 0x38(%r9), %rsi
movswl 0x40(%rdx), %ecx
cmpl %ecx, %edi
movl %edi, -0x30(%rbp)
movl %edi, %ecx
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
cmovel %edi, %ecx
movq -0x50(%rbp), %rdi
movb (%rsi,%rdi), %sil
testl %ecx, %ecx
setns %r14b
movl %r14d, -0x60(%rbp)
testb %bl, %bl
movl %esi, -0x44(%rbp)
je 0x5ae84
testl %ecx, %ecx
js 0x5ae84
movb $0x1, %r14b
movl %r14d, -0x60(%rbp)
cmpq %rax, %rdi
jl 0x5ae62
movq 0x8(%rdx), %rax
movl %ecx, %ecx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
cmpb $0x0, 0x28(%rax,%rcx)
movzbl %bl, %ebx
movl $0x0, %eax
cmovel %eax, %ebx
movl %ebx, -0x2c(%rbp)
movl -0x30(%rbp), %r11d
jmp 0x5ae8a
movl %ebx, -0x2c(%rbp)
movl $0xffffffff, %r11d      # imm = 0xFFFFFFFF
movl $0x0, -0x60(%rbp)
movl $0x0, -0x44(%rbp)
jmp 0x5ae8a
movl %ebx, -0x2c(%rbp)
movl %ecx, %r11d
movb $0x1, %r13b
xorl %ebx, %ebx
movl %r11d, -0x30(%rbp)
movl $0x1, %r14d
movl %ebx, %ecx
shlq %cl, %r14
btq %rbx, %r12
jb 0x5af91
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rbx, %r15
shlq $0x5, %r15
movq (%rax,%r15), %rsi
movq %rsi, %rax
movzbl (%rax), %ecx
cmpl $0x5c, %ecx
je 0x5aecb
cmpl $0x18, %ecx
jne 0x5aed1
movq 0x10(%rax), %rax
jmp 0x5aebe
movl -0x78(%rbp), %edx
testl %edx, %edx
movzbl %r13b, %r13d
cmovel %edx, %r13d
cmpb $-0x68, %cl
jne 0x5af91
cmpl %r8d, 0x2c(%rax)
jne 0x5af91
movswl 0x30(%rax), %eax
cmpl %eax, %r11d
jne 0x5af91
cmpb $0x0, -0x60(%rbp)
je 0x5afab
movq -0x88(%rbp), %rax
movq (%rax), %rdi
callq 0x4b225
testq %rax, %rax
jne 0x5af27
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rax
movq (%rax), %rcx
movq -0xe0(%rbp), %r9
movq 0x40(%r9), %rax
movq -0x50(%rbp), %rdi
movq (%rax,%rdi,8), %rax
movb (%rcx), %dl
testb %dl, %dl
movq -0x70(%rbp), %r10
movl -0x30(%rbp), %r11d
je 0x5af79
incq %rcx
movzbl %dl, %edx
leaq 0x1b158(%rip), %r8      # 0x760b0
movb (%rdx,%r8), %sil
movzbl (%rax), %edi
cmpb (%rdi,%r8), %sil
jne 0x5af73
incq %rax
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x5af4e
xorl %edx, %edx
movq -0x50(%rbp), %rdi
jmp 0x5af7b
xorl %edx, %edx
leaq 0x1b12e(%rip), %rsi     # 0x760b0
movb (%rdx,%rsi), %cl
movzbl (%rax), %eax
cmpb (%rax,%rsi), %cl
movl -0x34(%rbp), %r8d
je 0x5afab
testb %r13b, %r13b
je 0x5b060
incq %rbx
cmpq %r10, %rbx
jb 0x5ae93
jmp 0x5b060
testl %r11d, %r11d
movl -0x74(%rbp), %r13d
movzbl %r13b, %r13d
movl $0x1, %eax
cmovsl %eax, %r13d
orq %r12, %r14
movq -0x88(%rbp), %rax
testb $0x1, 0x33(%rax)
jne 0x5b012
cmpb $0x0, -0x90(%rbp)
movq -0x68(%rbp), %rdx
je 0x5b026
movl -0x44(%rbp), %esi
xorb -0xa0(%rbp), %sil
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movb $0x1, %cl
movq %rcx, -0x90(%rbp)
cmpb 0x18(%rax,%r15), %sil
movq -0x80(%rbp), %r11
movl -0x2c(%rbp), %ebx
movq -0x58(%rbp), %r15
je 0x5addc
jmp 0x5aaf7
movq -0x68(%rbp), %rdx
movq -0x80(%rbp), %r11
movl -0x2c(%rbp), %ebx
movq -0x58(%rbp), %r15
jmp 0x5addc
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movb 0x18(%rax,%r15), %al
movl %eax, %ecx
movl -0x44(%rbp), %esi
xorb %sil, %cl
movq %rcx, -0xa0(%rbp)
movb $0x1, %cl
movq %rcx, -0x90(%rbp)
cmpb %sil, %al
je 0x5b016
movq 0x10(%rbp), %rax
movq -0xc0(%rbp), %rcx
orq %rcx, (%rax)
jmp 0x5b016
cmpq -0x58(%rbp), %rdi
movl -0x2c(%rbp), %ebx
movzbl %bl, %ebx
movl $0x0, %eax
cmovbl %eax, %ebx
testq %rdi, %rdi
cmovel %eax, %ebx
movq %r12, %r14
movq -0x68(%rbp), %rdx
movl -0x74(%rbp), %r13d
testb %r13b, %r13b
je 0x5b092
movb $0x1, %al
movl %eax, -0x30(%rbp)
movq %r14, %r12
jmp 0x5b0a2
testb %bl, %bl
je 0x5b155
movq %r14, %r12
movl %ebx, %eax
movl %eax, -0x30(%rbp)
movq -0xb0(%rbp), %r14
orq 0x8(%rdx), %r14
movq %r14, -0xb0(%rbp)
notq %r14
xorl %ebx, %ebx
movl $0x1, %r15d
movl %ebx, %ecx
shlq %cl, %r15
btq %rbx, %r12
jb 0x5b0f8
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %rsi
movq -0xf8(%rbp), %rdi
callq 0x58edf
testq %r14, %rax
je 0x5b0f1
xorl %r15d, %r15d
orq %r15, %r12
movq -0x70(%rbp), %r10
incq %rbx
cmpq %r10, %rbx
jne 0x5b0b9
movl -0x30(%rbp), %r8d
testb %r8b, %r8b
movq -0x88(%rbp), %rdi
je 0x5b15b
cmpq -0xa8(%rbp), %r12
jae 0x5b15b
movq -0xb8(%rbp), %rdx
leaq 0x1(%rdx), %rax
movq -0xd0(%rbp), %rcx
cmpq %rcx, %rdx
movq %rax, %rdx
movq -0xd8(%rbp), %r9
movq -0xe8(%rbp), %rsi
movq -0x68(%rbp), %rax
jb 0x5ab83
jmp 0x5b15b
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r12d, %r12d
jmp 0x5b162
xorl %r8d, %r8d
movq %r14, %r12
xorl %ecx, %ecx
negb %r8b
sbbl %ecx, %ecx
cmpq -0xa8(%rbp), %r12
movl $0x1, %eax
cmovnel %ecx, %eax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq