// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3FindInIndex
SQLITE_PRIVATE int sqlite3FindInIndex(
  Parse *pParse,             /* Parsing context */
  Expr *pX,                  /* The IN expression */
  u32 inFlags,               /* IN_INDEX_LOOP, _MEMBERSHIP, and/or _NOOP_OK */
  int *prRhsHasNull,         /* Register holding NULL status.  See notes */
  int *aiMap,                /* Mapping from Index fields to RHS fields */
  int *piTab                 /* OUT: index to use */
){
  Select *p;                            /* SELECT to the right of IN operator */
  int eType = 0;                        /* Type of RHS table. IN_INDEX_* */
  int iTab = pParse->nTab++;            /* Cursor of the RHS table */
  int mustBeUnique;                     /* True if RHS must be unique */
  Vdbe *v = sqlite3GetVdbe(pParse);     /* Virtual machine being coded */

  assert( pX->op==TK_IN );
  mustBeUnique = (inFlags & IN_INDEX_LOOP)!=0;

  /* If the RHS of this IN(...) operator is a SELECT, and if it matters
  ** whether or not the SELECT result contains NULL values, check whether
  ** or not NULL is actually possible (it may not be, for example, due
  ** to NOT NULL constraints in the schema). If no NULL values are possible,
  ** set prRhsHasNull to 0 before continuing.  */
  if( prRhsHasNull && (pX->flags & EP_xIsSelect) ){
    int i;
    ExprList *pEList = pX->x.pSelect->pEList;
    for(i=0; i<pEList->nExpr; i++){
      if( sqlite3ExprCanBeNull(pEList->a[i].pExpr) ) break;
    }
    if( i==pEList->nExpr ){
      prRhsHasNull = 0;
    }
  }

  /* Check to see if an existing table or index can be used to
  ** satisfy the query.  This is preferable to generating a new
  ** ephemeral table.  */
  if( pParse->nErr==0 && (p = isCandidateForInOpt(pX))!=0 ){
    sqlite3 *db = pParse->db;              /* Database connection */
    Table *pTab;                           /* Table <table>. */
    int iDb;                               /* Database idx for pTab */
    ExprList *pEList = p->pEList;
    int nExpr = pEList->nExpr;

    assert( p->pEList!=0 );             /* Because of isCandidateForInOpt(p) */
    assert( p->pEList->a[0].pExpr!=0 ); /* Because of isCandidateForInOpt(p) */
    assert( p->pSrc!=0 );               /* Because of isCandidateForInOpt(p) */
    pTab = p->pSrc->a[0].pTab;

    /* Code an OP_Transaction and OP_TableLock for <table>. */
    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
    assert( iDb>=0 && iDb<SQLITE_MAX_ATTACHED );
    sqlite3CodeVerifySchema(pParse, iDb);
    sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);

    assert(v);  /* sqlite3GetVdbe() has always been previously called */
    if( nExpr==1 && pEList->a[0].pExpr->iColumn<0 ){
      /* The "x IN (SELECT rowid FROM table)" case */
      int iAddr = sqlite3VdbeAddOp0(v, OP_Once);
      VdbeCoverage(v);

      sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
      eType = IN_INDEX_ROWID;
      ExplainQueryPlan((pParse, 0,
            "USING ROWID SEARCH ON TABLE %s FOR IN-OPERATOR",pTab->zName));
      sqlite3VdbeJumpHere(v, iAddr);
    }else{
      Index *pIdx;                         /* Iterator variable */
      int affinity_ok = 1;
      int i;

      /* Check that the affinity that will be used to perform each
      ** comparison is the same as the affinity of each column in table
      ** on the RHS of the IN operator.  If it not, it is not possible to
      ** use any index of the RHS table.  */
      for(i=0; i<nExpr && affinity_ok; i++){
        Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);
        int iCol = pEList->a[i].pExpr->iColumn;
        char idxaff = sqlite3TableColumnAffinity(pTab,iCol); /* RHS table */
        char cmpaff = sqlite3CompareAffinity(pLhs, idxaff);
        testcase( cmpaff==SQLITE_AFF_BLOB );
        testcase( cmpaff==SQLITE_AFF_TEXT );
        switch( cmpaff ){
          case SQLITE_AFF_BLOB:
            break;
          case SQLITE_AFF_TEXT:
            /* sqlite3CompareAffinity() only returns TEXT if one side or the
            ** other has no affinity and the other side is TEXT.  Hence,
            ** the only way for cmpaff to be TEXT is for idxaff to be TEXT
            ** and for the term on the LHS of the IN to have no affinity. */
            assert( idxaff==SQLITE_AFF_TEXT );
            break;
          default:
            affinity_ok = sqlite3IsNumericAffinity(idxaff);
        }
      }

      if( affinity_ok ){
        /* Search for an existing index that will work for this IN operator */
        for(pIdx=pTab->pIndex; pIdx && eType==0; pIdx=pIdx->pNext){
          Bitmask colUsed;      /* Columns of the index used */
          Bitmask mCol;         /* Mask for the current column */
          if( pIdx->nColumn<nExpr ) continue;
          if( pIdx->pPartIdxWhere!=0 ) continue;
          /* Maximum nColumn is BMS-2, not BMS-1, so that we can compute
          ** BITMASK(nExpr) without overflowing */
          testcase( pIdx->nColumn==BMS-2 );
          testcase( pIdx->nColumn==BMS-1 );
          if( pIdx->nColumn>=BMS-1 ) continue;
          if( mustBeUnique ){
            if( pIdx->nKeyCol>nExpr
             ||(pIdx->nColumn>nExpr && !IsUniqueIndex(pIdx))
            ){
              continue;  /* This index is not unique over the IN RHS columns */
            }
          }

          colUsed = 0;   /* Columns of index used so far */
          for(i=0; i<nExpr; i++){
            Expr *pLhs = sqlite3VectorFieldSubexpr(pX->pLeft, i);
            Expr *pRhs = pEList->a[i].pExpr;
            CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pLhs, pRhs);
            int j;

            assert( pReq!=0 || pRhs->iColumn==XN_ROWID || pParse->nErr );
            for(j=0; j<nExpr; j++){
              if( pIdx->aiColumn[j]!=pRhs->iColumn ) continue;
              assert( pIdx->azColl[j] );
              if( pReq!=0 && sqlite3StrICmp(pReq->zName, pIdx->azColl[j])!=0 ){
                continue;
              }
              break;
            }
            if( j==nExpr ) break;
            mCol = MASKBIT(j);
            if( mCol & colUsed ) break; /* Each column used only once */
            colUsed |= mCol;
            if( aiMap ) aiMap[i] = j;
          }

          assert( i==nExpr || colUsed!=(MASKBIT(nExpr)-1) );
          if( colUsed==(MASKBIT(nExpr)-1) ){
            /* If we reach this point, that means the index pIdx is usable */
            int iAddr = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);
            ExplainQueryPlan((pParse, 0,
                              "USING INDEX %s FOR IN-OPERATOR",pIdx->zName));
            sqlite3VdbeAddOp3(v, OP_OpenRead, iTab, pIdx->tnum, iDb);
            sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
            VdbeComment((v, "%s", pIdx->zName));
            assert( IN_INDEX_INDEX_DESC == IN_INDEX_INDEX_ASC+1 );
            eType = IN_INDEX_INDEX_ASC + pIdx->aSortOrder[0];

            if( prRhsHasNull ){
#ifdef SQLITE_ENABLE_COLUMN_USED_MASK
              i64 mask = (1<<nExpr)-1;
              sqlite3VdbeAddOp4Dup8(v, OP_ColumnsUsed,
                  iTab, 0, 0, (u8*)&mask, P4_INT64);
#endif
              *prRhsHasNull = ++pParse->nMem;
              if( nExpr==1 ){
                sqlite3SetHasNullFlag(v, iTab, *prRhsHasNull);
              }
            }
            sqlite3VdbeJumpHere(v, iAddr);
          }
        } /* End loop over indexes */
      } /* End if( affinity_ok ) */
    } /* End if not an rowid index */
  } /* End attempt to optimize using an index */

  /* If no preexisting index is available for the IN clause
  ** and IN_INDEX_NOOP is an allowed reply
  ** and the RHS of the IN operator is a list, not a subquery
  ** and the RHS is not constant or has two or fewer terms,
  ** then it is not worth creating an ephemeral table to evaluate
  ** the IN operator so return IN_INDEX_NOOP.
  */
  if( eType==0
   && (inFlags & IN_INDEX_NOOP_OK)
   && !ExprHasProperty(pX, EP_xIsSelect)
   && (!sqlite3InRhsIsConstant(pX) || pX->x.pList->nExpr<=2)
  ){
    eType = IN_INDEX_NOOP;
  }

  if( eType==0 ){
    /* Could not find an existing table or index to use as the RHS b-tree.
    ** We will have to generate an ephemeral table to do the job.
    */
    u32 savedNQueryLoop = pParse->nQueryLoop;
    int rMayHaveNull = 0;
    eType = IN_INDEX_EPH;
    if( inFlags & IN_INDEX_LOOP ){
      pParse->nQueryLoop = 0;
    }else if( prRhsHasNull ){
      *prRhsHasNull = rMayHaveNull = ++pParse->nMem;
    }
    assert( pX->op==TK_IN );
    sqlite3CodeRhsOfIN(pParse, pX, iTab);
    if( rMayHaveNull ){
      sqlite3SetHasNullFlag(v, iTab, rMayHaveNull);
    }
    pParse->nQueryLoop = savedNQueryLoop;
  }

  if( aiMap && eType!=IN_INDEX_INDEX_ASC && eType!=IN_INDEX_INDEX_DESC ){
    int i, n;
    n = sqlite3ExprVectorSize(pX->pLeft);
    for(i=0; i<n; i++) aiMap[i] = i;
  }
  *piTab = iTab;
  return eType;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0xa0(%rsp)
movq %r8, 0x48(%rsp)
movq %rcx, %rbp
movl %edx, 0x1c(%rsp)
movq %rsi, %r14
movq %rdi, %r13
movl 0x34(%rdi), %eax
movq %rax, 0x38(%rsp)
incl %eax
movl %eax, 0x34(%rdi)
callq 0x2c5ddf
movq %rax, 0x58(%rsp)
xorl %ebx, %ebx
testq %rbp, %rbp
movq %r14, 0x40(%rsp)
je 0x2cb12a
testb $0x8, 0x5(%r14)
je 0x2cb141
movq 0x20(%r14), %rax
movq 0x20(%rax), %r12
movl (%r12), %r14d
testl %r14d, %r14d
jle 0x2cb135
addq $0x8, %r12
xorl %r15d, %r15d
movq (%r12), %rdi
callq 0x2cbd61
testl %eax, %eax
jne 0x2cb138
incq %r15
addq $0x18, %r12
cmpq %r15, %r14
jne 0x2cb10c
movl %r14d, %r15d
jmp 0x2cb138
movq $0x0, 0x30(%rsp)
jmp 0x2cb146
xorl %r15d, %r15d
xorl %eax, %eax
cmpl %r14d, %r15d
cmoveq %rax, %rbp
movq %rbp, 0x30(%rsp)
movq %r13, 0x10(%rsp)
cmpl $0x0, 0x30(%r13)
je 0x2cb21f
testl %ebx, %ebx
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %r13
jne 0x2cb1df
xorl %ebx, %ebx
testb $0x1, 0x1c(%rsp)
je 0x2cb1df
testb $0x8, 0x5(%r13)
jne 0x2cb1df
movq 0x10(%r13), %r14
movq $0x0, 0x10(%r13)
movw $0x1, 0x94(%rsp)
leaq -0x106e(%rip), %rax     # 0x2ca123
movq %rax, 0x78(%rsp)
leaq -0xf98(%rip), %rax      # 0x2ca205
movq %rax, 0x80(%rsp)
movl $0x0, 0x98(%rsp)
testq %r13, %r13
je 0x2cb1c2
leaq 0x70(%rsp), %rdi
movq %r13, %rsi
callq 0x2ca211
cmpw $0x0, 0x94(%rsp)
movq %r14, 0x10(%r13)
je 0x2cb1da
movq 0x20(%r13), %rax
cmpl $0x2, (%rax)
jg 0x2cb1df
movl $0x5, %ebx
testl %ebx, %ebx
movq 0x10(%rsp), %rdx
movq 0x30(%rsp), %rax
jne 0x2cbcba
movl 0xc4(%rdx), %r15d
testb $0x4, 0x1c(%rsp)
jne 0x2cb2c6
testq %rax, %rax
je 0x2cb2d0
movl 0x38(%rdx), %ecx
incl %ecx
movl %ecx, 0x38(%rdx)
movl %ecx, 0x1c(%rsp)
movl %ecx, (%rax)
jmp 0x2cb2d8
movl $0x820, %eax            # imm = 0x820
movq 0x40(%rsp), %rcx
andl 0x4(%rcx), %eax
xorl %ebx, %ebx
cmpl $0x800, %eax            # imm = 0x800
jne 0x2cb272
movq 0x20(%rcx), %rax
cmpq $0x0, 0x50(%rax)
jne 0x2cb272
testb $0x9, 0x4(%rax)
jne 0x2cb272
cmpq $0x0, 0x60(%rax)
jne 0x2cb272
cmpq $0x0, 0x30(%rax)
jne 0x2cb272
movq 0x28(%rax), %rcx
cmpl $0x1, (%rcx)
jne 0x2cb272
cmpq $0x0, 0x30(%rcx)
jne 0x2cb272
movq 0x28(%rcx), %rcx
cmpl $0x0, 0x54(%rcx)
je 0x2cbd2b
xorl %eax, %eax
testq %rax, %rax
je 0x2cb156
movq 0x20(%rax), %rcx
movq 0x28(%rax), %rax
movq %rcx, 0x20(%rsp)
movl (%rcx), %r15d
movq 0x28(%rax), %rbx
movq 0x70(%rbx), %rax
testq %rax, %rax
je 0x2cb4d5
movq 0x10(%rsp), %rcx
movq (%rcx), %rcx
movq 0x20(%rcx), %rcx
addq $0x18, %rcx
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
incl %ebp
leaq 0x20(%rcx), %rdx
cmpq %rax, (%rcx)
movq %rdx, %rcx
jne 0x2cb2b3
jmp 0x2cb4da
movl $0x0, 0xc4(%rdx)
movl $0x0, 0x1c(%rsp)
movq 0x10(%rdx), %rbx
movl 0x4(%r13), %eax
movl $0x0, 0x20(%rsp)
testb $0x20, %al
jne 0x2cb341
cmpl $0x0, 0x40(%rdx)
jne 0x2cb341
btl $0x19, %eax
jb 0x2cbb42
orl $0x2000000, %eax        # imm = 0x2000000
movl %eax, 0x4(%r13)
movl 0x38(%rdx), %ecx
incl %ecx
movl %ecx, 0x38(%rdx)
movl %ecx, 0x44(%r13)
movq %rbx, %rdi
movl $0x45, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x2b200c
incl %eax
movl %eax, 0x40(%r13)
movq %rbx, %rdi
movl $0x11, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, 0x20(%rsp)
movl %r15d, 0x30(%rsp)
movq 0x10(%r13), %rdx
movb (%rdx), %al
cmpb $-0x53, %al
jne 0x2cb353
movb 0x2(%rdx), %al
movq %rdx, %rcx
cmpb $-0x52, %al
je 0x2cb36e
movzbl %al, %eax
movl $0x1, %r15d
cmpl $0x88, %eax
jne 0x2cb375
movq 0x20(%rdx), %rcx
movq 0x20(%rcx), %rax
movl (%rax), %r15d
movq %rdx, 0x50(%rsp)
movq 0x38(%rsp), %rdx
movl %edx, 0x2c(%r13)
movq %rbx, %rdi
movl $0x64, %esi
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, 0x60(%rsp)
movq 0x10(%rsp), %rbp
movq (%rbp), %rdi
movl %r15d, %esi
movl $0x1, %edx
callq 0x2c6339
testb $0x8, 0x5(%r13)
movq 0x20(%r13), %r14
movq %rax, 0x28(%rsp)
jne 0x2cb3f3
testq %r14, %r14
je 0x2cb80e
movq 0x50(%rsp), %rdi
callq 0x2ca042
movb %al, 0xf(%rsp)
cmpb $0x40, %al
jg 0x2cb820
movb $0x41, 0xf(%rsp)
movq 0x10(%rsp), %r12
movq 0x28(%rsp), %rax
jmp 0x2cb833
movq 0x20(%r14), %r13
cmpl $0x0, 0x20(%rsp)
leaq 0x1159e2(%rip), %rax    # 0x3e0de5
leaq 0x108486(%rip), %rcx    # 0x3d3890
cmoveq %rax, %rcx
movl 0x10(%r14), %r8d
leaq 0x115a3d(%rip), %rdx    # 0x3e0e56
movq %rbp, %rdi
movl $0x1, %esi
xorl %eax, %eax
callq 0x2cae5e
movl %r15d, 0x6c(%rsp)
cmpl %r15d, (%r13)
jne 0x2cb7ff
xorl %r15d, %r15d
leaq 0x70(%rsp), %r12
movb $0xb, (%r12)
movq 0x38(%rsp), %rax
movl %eax, 0x4(%r12)
movl %r15d, 0x8(%r12)
movq %r15, 0x18(%r12)
movq %r15, 0xc(%r12)
movq %rbp, %rdi
movq 0x40(%rsp), %rsi
callq 0x2cafc8
movq %rax, 0x18(%r12)
movl %r15d, 0x8(%r14)
movq %rbp, %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x2b9266
movq 0x18(%r12), %rsi
movl %eax, 0x68(%rsp)
testl %eax, %eax
je 0x2cbbcb
testq %rsi, %rsi
je 0x2cb4a4
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x28c3e7
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
movq 0x10(%rsp), %r14
je 0x2cbc2d
decl (%rdx)
jne 0x2cbc2d
movq 0x10(%rdx), %rdi
movq %rdx, %rsi
callq 0x28c3e7
movq 0x28(%rsp), %rdx
jmp 0x2cbc2d
movl $0xffff8000, %ebp       # imm = 0xFFFF8000
movq 0x10(%rsp), %r14
movq %r14, %rdi
movl %ebp, %esi
callq 0x2cbe18
movl 0x38(%rbx), %edx
movq (%rbx), %r8
movq %r14, %rdi
movl %ebp, %esi
xorl %ecx, %ecx
callq 0x2c60e2
cmpl $0x1, %r15d
jne 0x2cb515
movq 0x20(%rsp), %rax
movq 0x8(%rax), %rax
cmpw $0x0, 0x30(%rax)
js 0x2cb871
testl %r15d, %r15d
jle 0x2cb58c
movq 0x20(%rsp), %rax
leaq 0x8(%rax), %r13
xorl %r14d, %r14d
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
movl %r14d, %esi
callq 0x2c9ff3
movq (%r13), %rcx
movswq 0x30(%rcx), %rcx
testq %rcx, %rcx
js 0x2cb553
movq 0x8(%rbx), %rdx
shlq $0x5, %rcx
movb 0x19(%rdx,%rcx), %cl
jmp 0x2cb555
movb $0x44, %cl
movsbl %cl, %r12d
movq %rax, %rdi
movl %r12d, %esi
callq 0x2ca0e4
addb $-0x41, %al
cmpb $0x2, %al
setb %cl
cmpb $0x43, %r12b
setge %al
orb %cl, %al
incq %r14
cmpq %r15, %r14
jae 0x2cb584
addq $0x18, %r13
testb %al, %al
jne 0x2cb526
testb %al, %al
je 0x2cb7f8
movq 0x10(%rbx), %r14
testq %r14, %r14
je 0x2cb7f8
movl %ebp, 0x50(%rsp)
movslq %r15d, %rax
movq %rax, 0x28(%rsp)
movq $-0x1, %rax
movl %r15d, %ecx
shlq %cl, %rax
movq %rax, 0x60(%rsp)
addq $0x8, 0x20(%rsp)
leaq 0x10f49c(%rip), %r13    # 0x3daa60
movzwl 0x60(%r14), %eax
movl $0x0, %ebx
cmpl %eax, %r15d
jle 0x2cb5e9
movq 0x28(%r14), %r14
testq %r14, %r14
je 0x2cb156
testl %ebx, %ebx
je 0x2cb5c4
jmp 0x2cb156
movl $0x0, %ebx
cmpw $0x3e, %ax
ja 0x2cb5d3
cmpq $0x0, 0x48(%r14)
movl $0x0, %ebx
jne 0x2cb5d3
testb $0x4, 0x1c(%rsp)
jne 0x2cb6dc
testl %r15d, %r15d
jle 0x2cb70d
xorl %ebx, %ebx
xorl %ebp, %ebp
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rdi
movl %ebx, %esi
callq 0x2c9ff3
leaq (%rbx,%rbx,2), %rcx
movq 0x20(%rsp), %rdx
movq (%rdx,%rcx,8), %r12
movq 0x10(%rsp), %rdi
movq %rax, %rsi
movq %r12, %rdx
callq 0x2b325c
movq 0x8(%r14), %rdx
movzwl 0x30(%r12), %esi
xorl %ecx, %ecx
cmpw %si, (%rdx,%rcx,2)
jne 0x2cb694
testq %rax, %rax
je 0x2cb69f
movq (%rax), %rdi
movq 0x40(%r14), %r8
movq (%r8,%rcx,8), %r8
xorl %r9d, %r9d
movzbl (%rdi,%r9), %r10d
movzbl (%r8,%r9), %r11d
cmpb %r11b, %r10b
jne 0x2cb680
testq %r10, %r10
jne 0x2cb68a
jmp 0x2cb68f
movb (%r10,%r13), %r12b
cmpb (%r11,%r13), %r12b
jne 0x2cb68f
incq %r9
jmp 0x2cb66a
cmpb %r11b, %r10b
je 0x2cb69f
incq %rcx
cmpq %r15, %rcx
jne 0x2cb651
movl %r15d, %ecx
cmpl %r15d, %ecx
je 0x2cb6b2
movl $0x1, %eax
shlq %cl, %rax
btq %rcx, %rbp
jae 0x2cb6c8
xorl %eax, %eax
testb %al, %al
je 0x2cb70f
incq %rbx
cmpq 0x28(%rsp), %rbx
jl 0x2cb618
jmp 0x2cb70f
orq %rax, %rbp
movb $0x1, %al
movq 0x48(%rsp), %rdx
testq %rdx, %rdx
je 0x2cb6b4
movl %ecx, (%rdx,%rbx,4)
jmp 0x2cb6b4
movzwl 0x5e(%r14), %ecx
movl $0x0, %ebx
cmpl %ecx, %r15d
jl 0x2cb5d3
cmpl %eax, %r15d
jge 0x2cb60b
cmpb $0x0, 0x62(%r14)
movl $0x0, %ebx
jne 0x2cb60b
jmp 0x2cb5d3
xorl %ebp, %ebp
xorq 0x60(%rsp), %rbp
movl $0x0, %ebx
cmpq $-0x1, %rbp
jne 0x2cb5d3
movq 0x58(%rsp), %r12
movq %r12, %rdi
movl $0x11, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, %ebp
movq (%r14), %rcx
movq 0x10(%rsp), %rbx
movq %rbx, %rdi
xorl %esi, %esi
leaq 0x1156ce(%rip), %rdx    # 0x3e0e20
xorl %eax, %eax
callq 0x2cae5e
movl 0x58(%r14), %ecx
movq %r12, %rdi
movl $0x60, %esi
movq 0x38(%rsp), %rdx
movl 0x50(%rsp), %r8d
callq 0x2b200c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2c61e4
movq 0x38(%r14), %rax
movzbl (%rax), %ebx
cmpq $0x0, 0x30(%rsp)
je 0x2cb7b5
movq 0x10(%rsp), %rax
movl 0x38(%rax), %edx
incl %edx
movl %edx, 0x38(%rax)
movq 0x30(%rsp), %rax
movl %edx, (%rax)
cmpl $0x1, %r15d
jne 0x2cb7b5
movq %r12, %rdi
movq 0x38(%rsp), %rsi
callq 0x2cbe49
movl 0x90(%r12), %eax
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
leaq 0x1fe6bc(%rip), %rcx    # 0x4c9e88
jne 0x2cb7ed
leal -0x1(%rax), %ecx
testl %ebp, %ebp
cmovnsl %ebp, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
movq 0x58(%rsp), %rdx
addq 0x88(%rdx), %rcx
addl $0x3, %ebx
movl %eax, 0x8(%rcx)
jmp 0x2cb5d3
xorl %ebx, %ebx
jmp 0x2cb156
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %r13
jmp 0x2cba84
movq %rax, %rdx
movq 0x10(%rsp), %rbp
movl 0x30(%rsp), %r15d
jmp 0x2cba8e
cmpb $0x45, %al
movq 0x10(%rsp), %r12
movq 0x28(%rsp), %rax
jne 0x2cb833
movb $0x43, 0xf(%rsp)
testq %rax, %rax
je 0x2cb84d
movq 0x10(%r13), %rsi
movq %r12, %rdi
callq 0x2b32a0
movq 0x28(%rsp), %rcx
movq %rax, 0x20(%rcx)
movb 0x1f(%r12), %al
testb %al, %al
je 0x2cb8e5
decb %al
movb %al, 0x1f(%r12)
movzbl %al, %eax
movl 0xd4(%r12,%rax,4), %r15d
jmp 0x2cb8f2
movq 0x58(%rsp), %r15
movq %r15, %rdi
movl $0x11, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, %r14d
movq 0x10(%rsp), %rdi
movq 0x38(%rsp), %rsi
movl %ebp, %edx
movq %r15, %r12
movq %rdi, %r15
movq %rbx, %rcx
movl $0x60, %r8d
callq 0x2c5fdd
movq (%rbx), %rcx
leaq 0x11553a(%rip), %rdx    # 0x3e0df1
movq %r15, %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2cae5e
movl 0x90(%r12), %eax
movq (%r12), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x2cbc4b
leaq 0x1fe5a8(%rip), %rcx    # 0x4c9e88
jmp 0x2cbc68
movl 0x38(%r12), %r15d
incl %r15d
movl %r15d, 0x38(%r12)
movb 0x1f(%r12), %al
testb %al, %al
je 0x2cb90f
decb %al
movb %al, 0x1f(%r12)
movzbl %al, %eax
movl 0xd4(%r12,%rax,4), %ebp
jmp 0x2cb91b
movl 0x38(%r12), %ebp
incl %ebp
movl %ebp, 0x38(%r12)
movl (%r14), %r13d
testl %r13d, %r13d
jle 0x2cba29
addq $0x8, %r14
incl %r13d
movq (%r14), %r12
cmpl $0x0, 0x20(%rsp)
je 0x2cb99a
movw $0x1, 0x94(%rsp)
leaq -0x1826(%rip), %rax     # 0x2ca123
movq %rax, 0x78(%rsp)
leaq -0x1750(%rip), %rax     # 0x2ca205
movq %rax, 0x80(%rsp)
movl $0x0, 0x98(%rsp)
testq %r12, %r12
je 0x2cb97a
leaq 0x70(%rsp), %rdi
movq %r12, %rsi
callq 0x2ca211
cmpw $0x0, 0x94(%rsp)
jne 0x2cb9a2
movq %rbx, %rdi
movl 0x20(%rsp), %esi
callq 0x2cbeef
movq 0x40(%rsp), %rax
andb $-0x3, 0x7(%rax)
movl $0x0, 0x20(%rsp)
movq 0x10(%rsp), %rdi
movq %r12, %rsi
movl %r15d, %edx
callq 0x2c5f97
movq %rbx, %rdi
movl $0x5b, %esi
movl %r15d, %edx
movl $0x1, %ecx
movl %ebp, %r8d
callq 0x2b200c
movq %rbx, %rdi
movl %eax, %esi
leaq 0xf(%rsp), %rdx
movl $0x1, %ecx
callq 0x285198
movq %rbx, %rdi
movl $0x82, %esi
movq 0x38(%rsp), %rdx
movl %ebp, %ecx
movl %r15d, %r8d
callq 0x2b200c
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
jne 0x2cba18
movq 0x88(%rbx), %rcx
cltq
leaq (%rax,%rax,2), %rax
movb $-0x3, 0x1(%rcx,%rax,8)
movl $0x1, 0x10(%rcx,%rax,8)
addq $0x18, %r14
decl %r13d
cmpl $0x1, %r13d
jg 0x2cb92e
testl %r15d, %r15d
je 0x2cba50
movq 0x10(%rsp), %rax
movzbl 0x1f(%rax), %eax
cmpq $0x7, %rax
ja 0x2cba50
leal 0x1(%rax), %ecx
movq 0x10(%rsp), %rdx
movb %cl, 0x1f(%rdx)
movl %r15d, 0xd4(%rdx,%rax,4)
testl %ebp, %ebp
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %r13
je 0x2cba7f
movq 0x10(%rsp), %rax
movzbl 0x1f(%rax), %eax
cmpq $0x7, %rax
ja 0x2cba7f
leal 0x1(%rax), %ecx
movq 0x10(%rsp), %rdx
movb %cl, 0x1f(%rdx)
movl %ebp, 0xd4(%rdx,%rax,4)
movq 0x10(%rsp), %rbp
movl 0x30(%rsp), %r15d
movq 0x28(%rsp), %rdx
testq %rdx, %rdx
je 0x2cbaa4
movq %rbx, %rdi
movl 0x60(%rsp), %esi
movl $0xfffffff7, %ecx       # imm = 0xFFFFFFF7
callq 0x285198
cmpl $0x0, 0x20(%rsp)
je 0x2cbc97
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
leaq 0x1fe3c9(%rip), %r14    # 0x4c9e88
cmpb $0x0, 0x61(%rcx)
movq %r14, %rcx
jne 0x2cbae6
leal -0x1(%rax), %ecx
movl 0x20(%rsp), %edx
testl %edx, %edx
cmovnsl %edx, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%rbx), %rcx
movl %eax, 0x8(%rcx)
movl 0x44(%r13), %edx
movq %rbx, %rdi
movl $0x41, %esi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl 0x90(%rbx), %eax
decl %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
jne 0x2cbb2e
movl 0x40(%r13), %ecx
leal -0x1(%rcx), %edx
testl %ecx, %ecx
cmovlel %eax, %edx
movslq %edx, %rcx
leaq (%rcx,%rcx,2), %r14
shlq $0x3, %r14
addq 0x88(%rbx), %r14
movl %eax, 0x4(%r14)
movb $0x0, 0x1f(%rbp)
movl $0x0, 0x28(%rbp)
jmp 0x2cbc97
movq %rbx, %rdi
movl $0x11, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2b200c
movl %eax, %ebp
testb $0x8, 0x5(%r13)
je 0x2cbb7b
movq 0x20(%r13), %rax
movl 0x10(%rax), %ecx
leaq 0x1152d2(%rip), %rdx    # 0x3e0e3f
movq 0x10(%rsp), %rdi
xorl %esi, %esi
xorl %eax, %eax
callq 0x2cae5e
movl 0x40(%r13), %ecx
movl 0x44(%r13), %edx
movq %rbx, %rdi
movl $0xc, %esi
xorl %r8d, %r8d
callq 0x2b200c
movl 0x2c(%r13), %ecx
movq %rbx, %rdi
movl $0x62, %esi
movq 0x38(%rsp), %rdx
xorl %r8d, %r8d
callq 0x2b200c
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x2cbc75
leaq 0x1fe2c2(%rip), %rcx    # 0x4c9e88
jmp 0x2cbc8f
testq %rsi, %rsi
je 0x2cbbdd
movq 0x10(%rsp), %rax
movq (%rax), %rdi
callq 0x28c3e7
movl 0x6c(%rsp), %eax
testl %eax, %eax
movq 0x10(%rsp), %r14
movq 0x28(%rsp), %rdx
movq 0x50(%rsp), %r15
jle 0x2cbc2d
addq $0x8, %r13
movl %eax, %ebp
xorl %r12d, %r12d
movq %r15, %rdi
movl %r12d, %esi
callq 0x2c9ff3
movq (%r13), %rdx
movq %r14, %rdi
movq %rax, %rsi
callq 0x2b325c
movq 0x28(%rsp), %rdx
movq %rax, 0x20(%rdx,%r12,8)
incq %r12
addq $0x18, %r13
cmpq %r12, %rbp
jne 0x2cbbfd
cmpl $0x0, 0x68(%rsp)
movq 0x48(%rsp), %r12
movq 0x40(%rsp), %r13
movq %r14, %rbp
movl 0x30(%rsp), %r15d
jne 0x2cbc97
jmp 0x2cba8e
leal -0x1(%rax), %ecx
testl %r14d, %r14d
cmovnsl %r14d, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%r12), %rcx
movl %eax, 0x8(%rcx)
movl $0x1, %ebx
jmp 0x2cb156
leal -0x1(%rax), %ecx
testl %ebp, %ebp
cmovnsl %ebp, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%rbx), %rcx
movq 0x10(%rsp), %rbp
movl %eax, 0x8(%rcx)
movl 0x1c(%rsp), %edx
testl %edx, %edx
je 0x2cbcae
movq 0x58(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0x2cbe49
movl %r15d, 0xc4(%rbp)
movl $0x2, %ebx
testq %r12, %r12
je 0x2cbd08
leal -0x5(%rbx), %eax
cmpl $-0x3, %eax
ja 0x2cbd08
movq 0x10(%r13), %rax
movb (%rax), %cl
cmpb $-0x53, %cl
jne 0x2cbcd5
movb 0x2(%rax), %cl
cmpb $-0x52, %cl
je 0x2cbcee
movzbl %cl, %edx
movl $0x1, %ecx
cmpl $0x88, %edx
jne 0x2cbcf4
movq 0x20(%rax), %rax
movq 0x20(%rax), %rax
movl (%rax), %ecx
testl %ecx, %ecx
jle 0x2cbd08
movl %ecx, %eax
xorl %ecx, %ecx
movl %ecx, (%r12,%rcx,4)
incq %rcx
cmpq %rcx, %rax
jne 0x2cbcfc
movq 0xa0(%rsp), %rax
movq 0x38(%rsp), %rcx
movl %ecx, (%rax)
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x20(%rax), %rcx
movslq (%rcx), %rdx
testq %rdx, %rdx
jle 0x2cb274
shlq $0x3, %rdx
leaq (%rdx,%rdx,2), %rdx
xorl %esi, %esi
movq 0x8(%rcx,%rsi), %rdi
cmpb $-0x5c, (%rdi)
jne 0x2cb272
addq $0x18, %rsi
cmpq %rsi, %rdx
jne 0x2cbd45
jmp 0x2cb274