// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: whereLoopAddBtreeIndex
static int whereLoopAddBtreeIndex(
  WhereLoopBuilder *pBuilder,     /* The WhereLoop factory */
  struct SrcList_item *pSrc,      /* FROM clause term being analyzed */
  Index *pProbe,                  /* An index on pSrc */
  LogEst nInMul                   /* log(Number of iterations due to IN) */
){
  WhereInfo *pWInfo = pBuilder->pWInfo;  /* WHERE analyse context */
  Parse *pParse = pWInfo->pParse;        /* Parsing context */
  sqlite3 *db = pParse->db;       /* Database connection malloc context */
  WhereLoop *pNew;                /* Template WhereLoop under construction */
  WhereTerm *pTerm;               /* A WhereTerm under consideration */
  int opMask;                     /* Valid operators for constraints */
  WhereScan scan;                 /* Iterator for WHERE terms */
  Bitmask saved_prereq;           /* Original value of pNew->prereq */
  u16 saved_nLTerm;               /* Original value of pNew->nLTerm */
  u16 saved_nEq;                  /* Original value of pNew->u.btree.nEq */
  u16 saved_nSkip;                /* Original value of pNew->nSkip */
  u32 saved_wsFlags;              /* Original value of pNew->wsFlags */
  LogEst saved_nOut;              /* Original value of pNew->nOut */
  int rc = SQLITE_OK;             /* Return code */
  LogEst rSize;                   /* Number of rows in the table */
  LogEst rLogSize;                /* Logarithm of table size */
  WhereTerm *pTop = 0, *pBtm = 0; /* Top and bottom range constraints */

  pNew = pBuilder->pNew;
  if( db->mallocFailed ) return SQLITE_NOMEM;

  assert( (pNew->wsFlags & WHERE_VIRTUALTABLE)==0 );
  assert( (pNew->wsFlags & WHERE_TOP_LIMIT)==0 );
  if( pNew->wsFlags & WHERE_BTM_LIMIT ){
    opMask = WO_LT|WO_LE;
  }else if( /*pProbe->tnum<=0 ||*/ (pSrc->fg.jointype & JT_LEFT)!=0 ){
    opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE;
  }else{
    opMask = WO_EQ|WO_IN|WO_GT|WO_GE|WO_LT|WO_LE|WO_ISNULL|WO_IS;
  }
  if( pProbe->bUnordered ) opMask &= ~(WO_GT|WO_GE|WO_LT|WO_LE);

  assert( pNew->u.btree.nEq<pProbe->nColumn );

  saved_nEq = pNew->u.btree.nEq;
  saved_nSkip = pNew->nSkip;
  saved_nLTerm = pNew->nLTerm;
  saved_wsFlags = pNew->wsFlags;
  saved_prereq = pNew->prereq;
  saved_nOut = pNew->nOut;
  pTerm = whereScanInit(&scan, pBuilder->pWC, pSrc->iCursor, saved_nEq,
                        opMask, pProbe);
  pNew->rSetup = 0;
  rSize = pProbe->aiRowLogEst[0];
  rLogSize = estLog(rSize);
  for(; rc==SQLITE_OK && pTerm!=0; pTerm = whereScanNext(&scan)){
    u16 eOp = pTerm->eOperator;   /* Shorthand for pTerm->eOperator */
    LogEst rCostIdx;
    LogEst nOutUnadjusted;        /* nOut before IN() and WHERE adjustments */
    int nIn = 0;
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
    int nRecValid = pBuilder->nRecValid;
#endif
    if( (eOp==WO_ISNULL || (pTerm->wtFlags&TERM_VNULL)!=0)
     && indexColumnNotNull(pProbe, saved_nEq)
    ){
      continue; /* ignore IS [NOT] NULL constraints on NOT NULL columns */
    }
    if( pTerm->prereqRight & pNew->maskSelf ) continue;

    /* Do not allow the upper bound of a LIKE optimization range constraint
    ** to mix with a lower range bound from some other source */
    if( pTerm->wtFlags & TERM_LIKEOPT && pTerm->eOperator==WO_LT ) continue;

    pNew->wsFlags = saved_wsFlags;
    pNew->u.btree.nEq = saved_nEq;
    pNew->nLTerm = saved_nLTerm;
    if( whereLoopResize(db, pNew, pNew->nLTerm+1) ) break; /* OOM */
    pNew->aLTerm[pNew->nLTerm++] = pTerm;
    pNew->prereq = (saved_prereq | pTerm->prereqRight) & ~pNew->maskSelf;

    assert( nInMul==0
        || (pNew->wsFlags & WHERE_COLUMN_NULL)!=0 
        || (pNew->wsFlags & WHERE_COLUMN_IN)!=0 
        || (pNew->wsFlags & WHERE_SKIPSCAN)!=0 
    );

    if( eOp & WO_IN ){
      Expr *pExpr = pTerm->pExpr;
      pNew->wsFlags |= WHERE_COLUMN_IN;
      if( ExprHasProperty(pExpr, EP_xIsSelect) ){
        /* "x IN (SELECT ...)":  TUNING: the SELECT returns 25 rows */
        nIn = 46;  assert( 46==sqlite3LogEst(25) );
      }else if( ALWAYS(pExpr->x.pList && pExpr->x.pList->nExpr) ){
        /* "x IN (value, value, ...)" */
        nIn = sqlite3LogEst(pExpr->x.pList->nExpr);
      }
      assert( nIn>0 );  /* RHS always has 2 or more terms...  The parser
                        ** changes "x IN (?)" into "x=?". */

    }else if( eOp & (WO_EQ|WO_IS) ){
      int iCol = pProbe->aiColumn[saved_nEq];
      pNew->wsFlags |= WHERE_COLUMN_EQ;
      assert( saved_nEq==pNew->u.btree.nEq );
      if( iCol==XN_ROWID 
       || (iCol>0 && nInMul==0 && saved_nEq==pProbe->nKeyCol-1)
      ){
        if( iCol>=0 && pProbe->uniqNotNull==0 ){
          pNew->wsFlags |= WHERE_UNQ_WANTED;
        }else{
          pNew->wsFlags |= WHERE_ONEROW;
        }
      }
    }else if( eOp & WO_ISNULL ){
      pNew->wsFlags |= WHERE_COLUMN_NULL;
    }else if( eOp & (WO_GT|WO_GE) ){
      testcase( eOp & WO_GT );
      testcase( eOp & WO_GE );
      pNew->wsFlags |= WHERE_COLUMN_RANGE|WHERE_BTM_LIMIT;
      pBtm = pTerm;
      pTop = 0;
      if( pTerm->wtFlags & TERM_LIKEOPT ){
        /* Range contraints that come from the LIKE optimization are
        ** always used in pairs. */
        pTop = &pTerm[1];
        assert( (pTop-(pTerm->pWC->a))<pTerm->pWC->nTerm );
        assert( pTop->wtFlags & TERM_LIKEOPT );
        assert( pTop->eOperator==WO_LT );
        if( whereLoopResize(db, pNew, pNew->nLTerm+1) ) break; /* OOM */
        pNew->aLTerm[pNew->nLTerm++] = pTop;
        pNew->wsFlags |= WHERE_TOP_LIMIT;
      }
    }else{
      assert( eOp & (WO_LT|WO_LE) );
      testcase( eOp & WO_LT );
      testcase( eOp & WO_LE );
      pNew->wsFlags |= WHERE_COLUMN_RANGE|WHERE_TOP_LIMIT;
      pTop = pTerm;
      pBtm = (pNew->wsFlags & WHERE_BTM_LIMIT)!=0 ?
                     pNew->aLTerm[pNew->nLTerm-2] : 0;
    }

    /* At this point pNew->nOut is set to the number of rows expected to
    ** be visited by the index scan before considering term pTerm, or the
    ** values of nIn and nInMul. In other words, assuming that all 
    ** "x IN(...)" terms are replaced with "x = ?". This block updates
    ** the value of pNew->nOut to account for pTerm (but not nIn/nInMul).  */
    assert( pNew->nOut==saved_nOut );
    if( pNew->wsFlags & WHERE_COLUMN_RANGE ){
      /* Adjust nOut using stat3/stat4 data. Or, if there is no stat3/stat4
      ** data, using some other estimate.  */
      whereRangeScanEst(pParse, pBuilder, pBtm, pTop, pNew);
    }else{
      int nEq = ++pNew->u.btree.nEq;
      assert( eOp & (WO_ISNULL|WO_EQ|WO_IN|WO_IS) );

      assert( pNew->nOut==saved_nOut );
      if( pTerm->truthProb<=0 && pProbe->aiColumn[saved_nEq]>=0 ){
        assert( (eOp & WO_IN) || nIn==0 );
        testcase( eOp & WO_IN );
        pNew->nOut += pTerm->truthProb;
        pNew->nOut -= nIn;
      }else{
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
        tRowcnt nOut = 0;
        if( nInMul==0 
         && pProbe->nSample 
         && pNew->u.btree.nEq<=pProbe->nSampleCol
         && ((eOp & WO_IN)==0 || !ExprHasProperty(pTerm->pExpr, EP_xIsSelect))
        ){
          Expr *pExpr = pTerm->pExpr;
          if( (eOp & (WO_EQ|WO_ISNULL|WO_IS))!=0 ){
            testcase( eOp & WO_EQ );
            testcase( eOp & WO_IS );
            testcase( eOp & WO_ISNULL );
            rc = whereEqualScanEst(pParse, pBuilder, pExpr->pRight, &nOut);
          }else{
            rc = whereInScanEst(pParse, pBuilder, pExpr->x.pList, &nOut);
          }
          if( rc==SQLITE_NOTFOUND ) rc = SQLITE_OK;
          if( rc!=SQLITE_OK ) break;          /* Jump out of the pTerm loop */
          if( nOut ){
            pNew->nOut = sqlite3LogEst(nOut);
            if( pNew->nOut>saved_nOut ) pNew->nOut = saved_nOut;
            pNew->nOut -= nIn;
          }
        }
        if( nOut==0 )
#endif
        {
          pNew->nOut += (pProbe->aiRowLogEst[nEq] - pProbe->aiRowLogEst[nEq-1]);
          if( eOp & WO_ISNULL ){
            /* TUNING: If there is no likelihood() value, assume that a 
            ** "col IS NULL" expression matches twice as many rows 
            ** as (col=?). */
            pNew->nOut += 10;
          }
        }
      }
    }

    /* Set rCostIdx to the cost of visiting selected rows in index. Add
    ** it to pNew->rRun, which is currently set to the cost of the index
    ** seek only. Then, if this is a non-covering index, add the cost of
    ** visiting the rows in the main table.  */
    rCostIdx = pNew->nOut + 1 + (15*pProbe->szIdxRow)/pSrc->pTab->szTabRow;
    pNew->rRun = sqlite3LogEstAdd(rLogSize, rCostIdx);
    if( (pNew->wsFlags & (WHERE_IDX_ONLY|WHERE_IPK))==0 ){
      pNew->rRun = sqlite3LogEstAdd(pNew->rRun, pNew->nOut + 16);
    }
    ApplyCostMultiplier(pNew->rRun, pProbe->pTable->costMult);

    nOutUnadjusted = pNew->nOut;
    pNew->rRun += nInMul + nIn;
    pNew->nOut += nInMul + nIn;
    whereLoopOutputAdjust(pBuilder->pWC, pNew, rSize);
    rc = whereLoopInsert(pBuilder, pNew);

    if( pNew->wsFlags & WHERE_COLUMN_RANGE ){
      pNew->nOut = saved_nOut;
    }else{
      pNew->nOut = nOutUnadjusted;
    }

    if( (pNew->wsFlags & WHERE_TOP_LIMIT)==0
     && pNew->u.btree.nEq<pProbe->nColumn
    ){
      whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nInMul+nIn);
    }
    pNew->nOut = saved_nOut;
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
    pBuilder->nRecValid = nRecValid;
#endif
  }
  pNew->prereq = saved_prereq;
  pNew->u.btree.nEq = saved_nEq;
  pNew->nSkip = saved_nSkip;
  pNew->wsFlags = saved_wsFlags;
  pNew->nOut = saved_nOut;
  pNew->nLTerm = saved_nLTerm;

  /* Consider using a skip-scan if there are no WHERE clause constraints
  ** available for the left-most terms of the index, and if the average
  ** number of repeats in the left-most terms is at least 18. 
  **
  ** The magic number 18 is selected on the basis that scanning 17 rows
  ** is almost always quicker than an index seek (even though if the index
  ** contains fewer than 2^17 rows we assume otherwise in other parts of
  ** the code). And, even if it is not, it should not be too much slower. 
  ** On the other hand, the extra seeks could end up being significantly
  ** more expensive.  */
  assert( 42==sqlite3LogEst(18) );
  if( saved_nEq==saved_nSkip
   && saved_nEq+1<pProbe->nKeyCol
   && pProbe->noSkipScan==0
   && pProbe->aiRowLogEst[saved_nEq+1]>=42  /* TUNING: Minimum for skip-scan */
   && (rc = whereLoopResize(db, pNew, pNew->nLTerm+1))==SQLITE_OK
  ){
    LogEst nIter;
    pNew->u.btree.nEq++;
    pNew->nSkip++;
    pNew->aLTerm[pNew->nLTerm++] = 0;
    pNew->wsFlags |= WHERE_SKIPSCAN;
    nIter = pProbe->aiRowLogEst[saved_nEq] - pProbe->aiRowLogEst[saved_nEq+1];
    pNew->nOut -= nIter;
    /* TUNING:  Because uncertainties in the estimates for skip-scan queries,
    ** add a 1.375 fudge factor to make skip-scan slightly less likely. */
    nIter += 5;
    whereLoopAddBtreeIndex(pBuilder, pSrc, pProbe, nIter + nInMul);
    pNew->nOut = saved_nOut;
    pNew->u.btree.nEq = saved_nEq;
    pNew->nSkip = saved_nSkip;
    pNew->wsFlags = saved_wsFlags;
  }

  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xf8, %rsp
movq (%rdi), %rax
movq (%rax), %rax
movq (%rax), %rax
movl $0x7, %r15d
cmpb $0x0, 0x51(%rax)
jne 0x694ca
movq %rdx, %rbx
movq %rsi, %rdx
movq %rax, -0x90(%rbp)
movq %rcx, -0x88(%rbp)
movq 0x18(%rdi), %r14
movl 0x28(%r14), %ecx
movl $0x18, %eax
movl %ecx, -0x6c(%rbp)
testb $0x20, %cl
movq %rsi, -0x80(%rbp)
jne 0x68e45
testb $0x8, 0x3c(%rdx)
movl $0x1bf, %ecx            # imm = 0x1BF
movl $0x3f, %eax
cmovel %ecx, %eax
movq -0x80(%rbp), %rdx
movl %eax, %r8d
andl $-0x7d, %r8d
testb $0x4, 0x63(%rbx)
cmovel %eax, %r8d
movzwl 0x18(%r14), %eax
movw %ax, -0x2a(%rbp)
movzwl %ax, %ecx
movzwl 0x2e(%r14), %eax
movw %ax, -0x4a(%rbp)
movzwl 0x2c(%r14), %eax
movw %ax, -0x2c(%rbp)
movq (%r14), %rax
movq %rax, -0xa8(%rbp)
movzwl 0x16(%r14), %eax
movl %eax, -0x5c(%rbp)
movq %rdi, -0x78(%rbp)
movq 0x8(%rdi), %rsi
movl 0x44(%rdx), %edx
leaq -0x120(%rbp), %rdi
movq %rcx, -0x68(%rbp)
movq %rbx, %r9
callq 0x6702d
movq %rax, %r13
movq %r14, -0x48(%rbp)
movw $0x0, 0x12(%r14)
movq %rbx, -0x40(%rbp)
movq 0x10(%rbx), %rax
movswq (%rax), %rbx
xorl %r15d, %r15d
movl $0x0, %eax
cmpq $0xb, %rbx
jl 0x68ed5
movq %rbx, %rdi
callq 0x3d559
addl $-0x21, %eax
movq %rbx, -0xb0(%rbp)
movzwl -0x2c(%rbp), %ecx
movq %rcx, -0xa0(%rbp)
testq %r13, %r13
je 0x693b0
movq -0xa0(%rbp), %rcx
incl %ecx
movl %ecx, -0x98(%rbp)
xorl %r12d, %r12d
cwtl
movl %eax, -0x94(%rbp)
movq $0x0, -0x58(%rbp)
movq %r12, -0x38(%rbp)
movzwl 0x1a(%r13), %r12d
cmpl $0x100, %r12d           # imm = 0x100
jne 0x68f5f
movq -0x40(%rbp), %rdx
movq 0x8(%rdx), %rax
movq -0x68(%rbp), %rcx
movswq (%rax,%rcx,2), %rcx
testq %rcx, %rcx
js 0x68f50
movq 0x18(%rdx), %rax
movq 0x8(%rax), %rax
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
movzbl 0x28(%rax,%rcx), %eax
jmp 0x68f59
xorl %eax, %eax
cmpw $-0x1, %cx
sete %al
xorl %ebx, %ebx
testl %eax, %eax
jne 0x68f6f
movq -0x48(%rbp), %rax
movq 0x8(%rax), %rax
xorl %ebx, %ebx
testq %rax, 0x28(%r13)
je 0x68fa4
xorl %r15d, %r15d
movq -0x38(%rbp), %r12
testb %bl, %bl
jne 0x693b0
leaq -0x120(%rbp), %rdi
callq 0x670cb
testl %r15d, %r15d
jne 0x693b0
movq %rax, %r13
testq %rax, %rax
jne 0x68f11
jmp 0x693b0
xorl %r15d, %r15d
cmpl $0x10, %r12d
jne 0x68fbd
movzwl 0x1c(%r13), %eax
andl $0x100, %eax            # imm = 0x100
je 0x68fbd
xorl %ebx, %ebx
jmp 0x68f72
movl -0x6c(%rbp), %eax
movq -0x48(%rbp), %r14
movl %eax, 0x28(%r14)
movzwl -0x2a(%rbp), %eax
movw %ax, 0x18(%r14)
movzwl -0x2c(%rbp), %eax
movw %ax, 0x2c(%r14)
movq -0x90(%rbp), %rdi
movq %r14, %rsi
movl -0x98(%rbp), %edx
callq 0x6862c
movb $0x1, %bl
testl %eax, %eax
jne 0x68f72
movq 0x38(%r14), %rcx
movzwl 0x2c(%r14), %edx
leal 0x1(%rdx), %eax
movw %ax, 0x2c(%r14)
movq %r13, (%rcx,%rdx,8)
movq 0x28(%r13), %rcx
orq -0xa8(%rbp), %rcx
movq 0x8(%r14), %rdx
notq %rdx
andq %rcx, %rdx
movq %rdx, (%r14)
testb $0x1, %r12b
jne 0x6909f
testb $-0x7e, %r12b
movq -0x78(%rbp), %r15
movq -0x88(%rbp), %rsi
je 0x690d4
movq -0x40(%rbp), %rbx
movq 0x8(%rbx), %rax
movq -0x68(%rbp), %rcx
movzwl (%rax,%rcx,2), %ecx
movq -0x48(%rbp), %rdi
movl 0x28(%rdi), %eax
movl %eax, %edx
orl $0x1, %edx
movl %edx, 0x28(%rdi)
cmpw $-0x1, %cx
je 0x69089
xorl %edi, %edi
testw %si, %si
jne 0x69133
testw %cx, %cx
jle 0x69133
movzwl 0x5e(%rbx), %edx
decl %edx
cmpl -0x68(%rbp), %edx
jne 0x69121
testw %cx, %cx
js 0x69115
testb $0x8, 0x63(%rbx)
jne 0x69115
orl $0x10001, %eax          # imm = 0x10001
jmp 0x6911a
movq (%r13), %rax
orl $0x4, 0x28(%r14)
movw $0x2e, %di
testb $0x8, 0x5(%rax)
movq -0x78(%rbp), %r15
jne 0x6912f
movq 0x20(%rax), %rax
testq %rax, %rax
movq -0x40(%rbp), %rbx
je 0x69121
movslq (%rax), %rdi
testq %rdi, %rdi
je 0x69121
callq 0x3d559
movl %eax, %edi
jmp 0x69133
btl $0x8, %r12d
jb 0x69125
movq -0x48(%rbp), %r14
movl 0x28(%r14), %ecx
testb $0x24, %r12b
je 0x69318
orl $0x22, %ecx
movl %ecx, 0x28(%r14)
xorl %r15d, %r15d
testb $0x1, 0x1d(%r13)
jne 0x6933b
movq %r13, -0x58(%rbp)
movq $0x0, -0x38(%rbp)
xorl %edi, %edi
jmp 0x693a3
orl $0x1001, %eax           # imm = 0x1001
movq -0x48(%rbp), %rcx
movl %eax, 0x28(%rcx)
xorl %edi, %edi
jmp 0x69133
movq -0x48(%rbp), %rax
orb $0x8, 0x28(%rax)
xorl %edi, %edi
movq -0x40(%rbp), %rbx
movq -0x48(%rbp), %r14
testb $0x2, 0x28(%r14)
jne 0x69187
movl 0x18(%r14), %eax
incl %eax
movw %ax, 0x18(%r14)
movzwl 0x18(%r13), %ecx
testw %cx, %cx
jle 0x691ae
movzwl %ax, %eax
movq 0x10(%rbx), %rdx
movzwl (%rdx,%rax,2), %ecx
subw -0x2(%rdx,%rax,2), %cx
addw 0x16(%r14), %cx
movw %cx, 0x16(%r14)
btl $0x8, %r12d
movq -0x38(%rbp), %r12
movl %edi, %r13d
jae 0x69241
addl $0xa, %ecx
jmp 0x6923c
movzwl 0x16(%r14), %ecx
movl %ecx, %eax
cmpq $0x0, -0x58(%rbp)
movq -0x38(%rbp), %r12
movl %edi, %r13d
je 0x691cf
movq -0x58(%rbp), %rax
movzwl 0x18(%rax), %eax
testw %ax, %ax
jle 0x691cd
leal -0x14(%rcx), %eax
jmp 0x691cf
movq 0x8(%rbx), %rdx
movq -0x68(%rbp), %rsi
cmpw $0x0, (%rdx,%rsi,2)
js 0x69153
movl %edi, %r13d
subl %edi, %ecx
addw 0x16(%r14), %cx
movq -0x38(%rbp), %r12
jmp 0x6923c
addl %ecx, %eax
testq %r12, %r12
je 0x691e8
movzwl 0x18(%r12), %edx
testw %dx, %dx
jle 0x691e4
addl $-0x14, %eax
jmp 0x691e8
addl %eax, %edx
movl %edx, %eax
cmpq $0x0, -0x58(%rbp)
je 0x6920e
testq %r12, %r12
je 0x6920e
movq -0x58(%rbp), %rdx
cmpw $0x0, 0x18(%rdx)
jle 0x6920e
cmpw $0x0, 0x18(%r12)
leal -0x14(%rax), %edx
cmovlel %eax, %edx
movl %edx, %eax
movswl %cx, %edx
movq -0x58(%rbp), %rcx
negq %rcx
movl $0x0, %ecx
sbbl %ecx, %ecx
cmpq $0x1, %r12
adcl $-0x1, %ecx
addl %edx, %ecx
cmpw $0xb, %ax
movl $0xa, %edx
cmovgel %eax, %edx
movzwl %dx, %eax
cmpl %eax, %ecx
cmovgel %eax, %ecx
movw %cx, 0x16(%r14)
movq %rbx, %rax
movzwl 0x16(%r14), %ebx
movswl 0x5c(%rax), %eax
leal (%rax,%rax,4), %eax
leal (%rax,%rax,2), %eax
movq -0x80(%rbp), %rcx
movq 0x20(%rcx), %rcx
movswl 0x44(%rcx), %ecx
cltd
idivl %ecx
addl %ebx, %eax
incl %eax
movswl %ax, %esi
movl -0x94(%rbp), %edi
callq 0x68bba
movw %ax, 0x14(%r14)
movzwl 0x28(%r14), %ecx
testl $0x140, %ecx            # imm = 0x140
jne 0x69299
leal 0x10(%rbx), %ecx
movswl %cx, %esi
movswl %ax, %edi
callq 0x68bba
movw %ax, 0x14(%r14)
addl -0x88(%rbp), %r13d
addw %r13w, 0x14(%r14)
movl %r13d, %eax
addl %ebx, %eax
movw %ax, 0x16(%r14)
movq 0x8(%r15), %rdi
movq %r14, %rsi
movq -0xb0(%rbp), %rdx
callq 0x68ca5
movq %r15, %rdi
movq %r14, %rsi
callq 0x686b4
movl %eax, %r15d
movl 0x28(%r14), %eax
testb $0x2, %al
movl -0x5c(%rbp), %ecx
cmovel %ebx, %ecx
movw %cx, 0x16(%r14)
testb $0x10, %al
jne 0x69309
movzwl 0x18(%r14), %eax
movq -0x40(%rbp), %rcx
cmpw 0x60(%rcx), %ax
jae 0x69309
movswl %r13w, %ecx
movq -0x78(%rbp), %rdi
movq -0x80(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x68dd6
movl -0x5c(%rbp), %eax
movw %ax, 0x16(%r14)
xorl %ebx, %ebx
jmp 0x68f76
movl %ecx, %edx
orl $0x12, %edx
movl %edx, 0x28(%r14)
testb $0x20, %cl
movq -0x40(%rbp), %rbx
jne 0x69364
movq $0x0, -0x58(%rbp)
movq %r13, -0x38(%rbp)
jmp 0x69121
leaq 0x38(%r13), %rcx
movq %rcx, -0x38(%rbp)
movzwl %ax, %edx
incl %edx
movq -0x90(%rbp), %rdi
movq %r14, %rsi
callq 0x6862c
testl %eax, %eax
je 0x6937f
movq %r13, -0x58(%rbp)
jmp 0x68f72
movq 0x38(%r14), %rcx
movzwl %ax, %eax
movq -0x10(%rcx,%rax,8), %rax
movq %rax, -0x58(%rbp)
xorl %edi, %edi
movq %r13, -0x38(%rbp)
jmp 0x69133
movq 0x38(%r14), %rax
movzwl 0x2c(%r14), %ecx
leal 0x1(%rcx), %edx
movw %dx, 0x2c(%r14)
movq -0x38(%rbp), %rdx
movq %rdx, (%rax,%rcx,8)
orb $0x10, 0x28(%r14)
xorl %edi, %edi
movq %r13, -0x58(%rbp)
movq -0x40(%rbp), %rbx
movq -0x78(%rbp), %r15
jmp 0x69133
movq -0xa8(%rbp), %rax
movq -0x48(%rbp), %rsi
movq %rax, (%rsi)
movzwl -0x2a(%rbp), %ecx
movw %cx, 0x18(%rsi)
movzwl -0x4a(%rbp), %edx
movw %dx, 0x2e(%rsi)
movl -0x6c(%rbp), %eax
movl %eax, 0x28(%rsi)
movl -0x5c(%rbp), %eax
movw %ax, 0x16(%rsi)
movzwl -0x2c(%rbp), %eax
movw %ax, 0x2c(%rsi)
cmpw %dx, %cx
jne 0x694ca
movq -0x68(%rbp), %rax
incl %eax
movq -0x40(%rbp), %rbx
movzwl 0x5e(%rbx), %ecx
cmpl %ecx, %eax
jae 0x694ca
testb $0x40, 0x63(%rbx)
jne 0x694ca
movq 0x10(%rbx), %rax
movq -0x68(%rbp), %rcx
cmpw $0x2a, 0x2(%rax,%rcx,2)
movq -0x78(%rbp), %r14
movq -0x88(%rbp), %r13
movq -0x90(%rbp), %rdi
jl 0x694ca
movq -0xa0(%rbp), %rdx
incl %edx
movq -0x48(%rbp), %rsi
callq 0x6862c
movq -0x80(%rbp), %rsi
movl %eax, %r15d
testl %eax, %eax
jne 0x694ca
movq -0x48(%rbp), %r15
incw 0x18(%r15)
incw 0x2e(%r15)
movq 0x38(%r15), %rax
movzwl 0x2c(%r15), %ecx
leal 0x1(%rcx), %edx
movw %dx, 0x2c(%r15)
movq $0x0, (%rax,%rcx,8)
orb $-0x80, 0x29(%r15)
movq 0x10(%rbx), %rax
movq -0x68(%rbp), %rdx
movzwl (%rax,%rdx,2), %ecx
subw 0x2(%rax,%rdx,2), %cx
subw %cx, 0x16(%r15)
leal (%rcx,%r13), %eax
addl $0x5, %eax
movswl %ax, %ecx
movq %r14, %rdi
movq %rbx, %rdx
callq 0x68dd6
movl -0x5c(%rbp), %eax
movw %ax, 0x16(%r15)
movzwl -0x2a(%rbp), %eax
movw %ax, 0x18(%r15)
movzwl -0x4a(%rbp), %eax
movw %ax, 0x2e(%r15)
movl -0x6c(%rbp), %eax
movl %eax, 0x28(%r15)
xorl %r15d, %r15d
movl %r15d, %eax
addq $0xf8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq