// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: constructAutomaticIndex
static void constructAutomaticIndex(
  Parse *pParse,              /* The parsing context */
  WhereClause *pWC,           /* The WHERE clause */
  struct SrcList_item *pSrc,  /* The FROM clause term to get the next index */
  Bitmask notReady,           /* Mask of cursors that are not available */
  WhereLevel *pLevel          /* Write new index here */
){
  int nKeyCol;                /* Number of columns in the constructed index */
  WhereTerm *pTerm;           /* A single term of the WHERE clause */
  WhereTerm *pWCEnd;          /* End of pWC->a[] */
  Index *pIdx;                /* Object describing the transient index */
  Vdbe *v;                    /* Prepared statement under construction */
  int addrInit;               /* Address of the initialization bypass jump */
  Table *pTable;              /* The table being indexed */
  int addrTop;                /* Top of the index fill loop */
  int regRecord;              /* Register holding an index record */
  int n;                      /* Column counter */
  int i;                      /* Loop counter */
  int mxBitCol;               /* Maximum column in pSrc->colUsed */
  CollSeq *pColl;             /* Collating sequence to on a column */
  WhereLoop *pLoop;           /* The Loop object */
  char *zNotUsed;             /* Extra space on the end of pIdx */
  Bitmask idxCols;            /* Bitmap of columns used for indexing */
  Bitmask extraCols;          /* Bitmap of additional columns */
  u8 sentWarning = 0;         /* True if a warnning has been issued */
  Expr *pPartial = 0;         /* Partial Index Expression */
  int iContinue = 0;          /* Jump here to skip excluded rows */
  struct SrcList_item *pTabItem;  /* FROM clause term being indexed */
  int addrCounter = 0;        /* Address where integer counter is initialized */
  int regBase;                /* Array of registers where record is assembled */

  /* Generate code to skip over the creation and initialization of the
  ** transient index on 2nd and subsequent iterations of the loop. */
  v = pParse->pVdbe;
  assert( v!=0 );
  addrInit = sqlite3VdbeAddOp0(v, OP_Once); VdbeCoverage(v);

  /* Count the number of columns that will be added to the index
  ** and used to match WHERE clause constraints */
  nKeyCol = 0;
  pTable = pSrc->pTab;
  pWCEnd = &pWC->a[pWC->nTerm];
  pLoop = pLevel->pWLoop;
  idxCols = 0;
  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
    Expr *pExpr = pTerm->pExpr;
    assert( !ExprHasProperty(pExpr, EP_FromJoin)    /* prereq always non-zero */
         || pExpr->iRightJoinTable!=pSrc->iCursor   /*   for the right-hand   */
         || pLoop->prereq!=0 );                     /*   table of a LEFT JOIN */
    if( pLoop->prereq==0
     && (pTerm->wtFlags & TERM_VIRTUAL)==0
     && !ExprHasProperty(pExpr, EP_FromJoin)
     && sqlite3ExprIsTableConstant(pExpr, pSrc->iCursor) ){
      pPartial = sqlite3ExprAnd(pParse, pPartial,
                                sqlite3ExprDup(pParse->db, pExpr, 0));
    }
    if( termCanDriveIndex(pTerm, pSrc, notReady) ){
      int iCol = pTerm->u.leftColumn;
      Bitmask cMask = iCol>=BMS ? MASKBIT(BMS-1) : MASKBIT(iCol);
      testcase( iCol==BMS );
      testcase( iCol==BMS-1 );
      if( !sentWarning ){
        sqlite3_log(SQLITE_WARNING_AUTOINDEX,
            "automatic index on %s(%s)", pTable->zName,
            pTable->aCol[iCol].zName);
        sentWarning = 1;
      }
      if( (idxCols & cMask)==0 ){
        if( whereLoopResize(pParse->db, pLoop, nKeyCol+1) ){
          goto end_auto_index_create;
        }
        pLoop->aLTerm[nKeyCol++] = pTerm;
        idxCols |= cMask;
      }
    }
  }
  assert( nKeyCol>0 );
  pLoop->u.btree.nEq = pLoop->nLTerm = nKeyCol;
  pLoop->wsFlags = WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WHERE_INDEXED
                     | WHERE_AUTO_INDEX;

  /* Count the number of additional columns needed to create a
  ** covering index.  A "covering index" is an index that contains all
  ** columns that are needed by the query.  With a covering index, the
  ** original table never needs to be accessed.  Automatic indices must
  ** be a covering index because the index will not be updated if the
  ** original table changes and the index and table cannot both be used
  ** if they go out of sync.
  */
  extraCols = pSrc->colUsed & (~idxCols | MASKBIT(BMS-1));
  mxBitCol = MIN(BMS-1,pTable->nCol);
  testcase( pTable->nCol==BMS-1 );
  testcase( pTable->nCol==BMS-2 );
  for(i=0; i<mxBitCol; i++){
    if( extraCols & MASKBIT(i) ) nKeyCol++;
  }
  if( pSrc->colUsed & MASKBIT(BMS-1) ){
    nKeyCol += pTable->nCol - BMS + 1;
  }

  /* Construct the Index object to describe this index */
  pIdx = sqlite3AllocateIndexObject(pParse->db, nKeyCol+1, 0, &zNotUsed);
  if( pIdx==0 ) goto end_auto_index_create;
  pLoop->u.btree.pIndex = pIdx;
  pIdx->zName = "auto-index";
  pIdx->pTable = pTable;
  n = 0;
  idxCols = 0;
  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
    if( termCanDriveIndex(pTerm, pSrc, notReady) ){
      int iCol = pTerm->u.leftColumn;
      Bitmask cMask = iCol>=BMS ? MASKBIT(BMS-1) : MASKBIT(iCol);
      testcase( iCol==BMS-1 );
      testcase( iCol==BMS );
      if( (idxCols & cMask)==0 ){
        Expr *pX = pTerm->pExpr;
        idxCols |= cMask;
        pIdx->aiColumn[n] = pTerm->u.leftColumn;
        pColl = sqlite3ExprCompareCollSeq(pParse, pX);
        assert( pColl!=0 || pParse->nErr>0 ); /* TH3 collate01.800 */
        pIdx->azColl[n] = pColl ? pColl->zName : sqlite3StrBINARY;
        n++;
      }
    }
  }
  assert( (u32)n==pLoop->u.btree.nEq );

  /* Add additional columns needed to make the automatic index into
  ** a covering index */
  for(i=0; i<mxBitCol; i++){
    if( extraCols & MASKBIT(i) ){
      pIdx->aiColumn[n] = i;
      pIdx->azColl[n] = sqlite3StrBINARY;
      n++;
    }
  }
  if( pSrc->colUsed & MASKBIT(BMS-1) ){
    for(i=BMS-1; i<pTable->nCol; i++){
      pIdx->aiColumn[n] = i;
      pIdx->azColl[n] = sqlite3StrBINARY;
      n++;
    }
  }
  assert( n==nKeyCol );
  pIdx->aiColumn[n] = XN_ROWID;
  pIdx->azColl[n] = sqlite3StrBINARY;

  /* Create the automatic index */
  assert( pLevel->iIdxCur>=0 );
  pLevel->iIdxCur = pParse->nTab++;
  sqlite3VdbeAddOp2(v, OP_OpenAutoindex, pLevel->iIdxCur, nKeyCol+1);
  sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
  VdbeComment((v, "for %s", pTable->zName));

  /* Fill the automatic index with content */
  pTabItem = &pWC->pWInfo->pTabList->a[pLevel->iFrom];
  if( pTabItem->fg.viaCoroutine ){
    int regYield = pTabItem->regReturn;
    addrCounter = sqlite3VdbeAddOp2(v, OP_Integer, 0, 0);
    sqlite3VdbeAddOp3(v, OP_InitCoroutine, regYield, 0, pTabItem->addrFillSub);
    addrTop =  sqlite3VdbeAddOp1(v, OP_Yield, regYield);
    VdbeCoverage(v);
    VdbeComment((v, "next row of %s", pTabItem->pTab->zName));
  }else{
    addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur); VdbeCoverage(v);
  }
  if( pPartial ){
    iContinue = sqlite3VdbeMakeLabel(pParse);
    sqlite3ExprIfFalse(pParse, pPartial, iContinue, SQLITE_JUMPIFNULL);
    pLoop->wsFlags |= WHERE_PARTIALIDX;
  }
  regRecord = sqlite3GetTempReg(pParse);
  regBase = sqlite3GenerateIndexKey(
      pParse, pIdx, pLevel->iTabCur, regRecord, 0, 0, 0, 0
  );
  sqlite3VdbeAddOp2(v, OP_IdxInsert, pLevel->iIdxCur, regRecord);
  sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
  if( pPartial ) sqlite3VdbeResolveLabel(v, iContinue);
  if( pTabItem->fg.viaCoroutine ){
    sqlite3VdbeChangeP2(v, addrCounter, regBase+n);
    testcase( pParse->db->mallocFailed );
    assert( pLevel->iIdxCur>0 );
    translateColumnToCopy(pParse, addrTop, pLevel->iTabCur,
                          pTabItem->regResult, pLevel->iIdxCur);
    sqlite3VdbeGoto(v, addrTop);
    pTabItem->fg.viaCoroutine = 0;
  }else{
    sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1); VdbeCoverage(v);
    sqlite3VdbeChangeP5(v, SQLITE_STMTSTATUS_AUTOINDEX);
  }
  sqlite3VdbeJumpHere(v, addrTop);
  sqlite3ReleaseTempReg(pParse, regRecord);

  /* Jump here when skipping the initialization */
  sqlite3VdbeJumpHere(v, addrInit);

end_auto_index_create:
  sqlite3ExprDelete(pParse->db, pPartial);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %r8, %r12
movq %rcx, 0x30(%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movq 0x10(%rdi), %rdi
movq %rdi, 0x48(%rsp)
movl $0x11, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, 0x50(%rsp)
movq %r14, 0x18(%rsp)
movq 0x20(%r14), %rax
movq %rax, 0x40(%rsp)
movq 0x20(%r15), %r14
movq %r15, 0x58(%rsp)
movslq 0x14(%r15), %rax
movq %rax, %rcx
shlq $0x6, %rcx
addq %r14, %rcx
movq %rcx, 0x28(%rsp)
movq %r12, 0x38(%rsp)
movq 0x50(%r12), %rcx
movq %rcx, 0x10(%rsp)
testq %rax, %rax
movq %rbx, (%rsp)
jle 0x2d465b
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movq $0x0, 0x20(%rsp)
xorl %r13d, %r13d
xorl %ebx, %ebx
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %r15
cmpq $0x0, (%r15)
jne 0x2d4597
testb $0x2, 0x12(%r14)
jne 0x2d4597
movq %rbx, %rbp
movq (%r14), %rbx
testb $0x1, 0x4(%rbx)
jne 0x2d458f
movq 0x18(%rsp), %rax
movl 0x40(%rax), %eax
movw $0x3, 0x8c(%rsp)
leaq -0x13bb0(%rip), %rcx    # 0x2c0987
movq %rcx, 0x70(%rsp)
leaq -0x13ac3(%rip), %rcx    # 0x2c0a80
movq %rcx, 0x78(%rsp)
movl %eax, 0x90(%rsp)
leaq 0x68(%rsp), %rdi
movq %rbx, %rsi
callq 0x2c0a8c
cmpw $0x0, 0x8c(%rsp)
je 0x2d458f
movq (%rsp), %r15
movq (%r15), %rdi
movq %rbx, %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x2c2864
movq %r15, %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x2b6b0e
movq %rax, 0x8(%rsp)
movq 0x10(%rsp), %r15
movq %rbp, %rbx
movq %r14, %rdi
movq 0x18(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x2db9f8
testl %eax, %eax
je 0x2d4640
movslq 0x28(%r14), %rcx
movl $0x1, %ebp
shlq %cl, %rbp
cmpq $0x40, %rcx
cmovgeq %r12, %rbp
testb %bl, %bl
jne 0x2d45f0
movq 0x40(%rsp), %rax
movq (%rax), %rdx
movq 0x8(%rax), %rax
shlq $0x5, %rcx
movq (%rax,%rcx), %rcx
movl $0x11c, %edi            # imm = 0x11C
leaq 0x1043af(%rip), %rsi    # 0x3d8998
xorl %eax, %eax
callq 0x274d08
movb $0x1, %bl
testq %r13, %rbp
jne 0x2d4640
movq %r13, %r12
movq (%rsp), %rax
movq (%rax), %rdi
movq 0x20(%rsp), %r13
leal 0x1(%r13), %ebx
movq %r15, %rsi
movl %ebx, %edx
callq 0x2db076
testl %eax, %eax
jne 0x2d4bd3
movq 0x38(%r15), %rax
movslq %r13d, %rcx
movq %r14, (%rax,%rcx,8)
movq %r12, %r13
orq %rbp, %r13
movl %ebx, %eax
movq %rax, 0x20(%rsp)
movabsq $-0x8000000000000000, %r12 # imm = 0x8000000000000000
movb $0x1, %bl
addq $0x40, %r14
cmpq 0x28(%rsp), %r14
jb 0x2d44fd
notq %r13
orq %r12, %r13
movq (%rsp), %rbx
jmp 0x2d4674
movq $0x0, 0x20(%rsp)
movq $-0x1, %r13
movq $0x0, 0x8(%rsp)
movq 0x10(%rsp), %rax
movq 0x20(%rsp), %r8
movw %r8w, 0x2c(%rax)
movw %r8w, 0x18(%rax)
movl $0x4241, 0x28(%rax)     # imm = 0x4241
movq 0x18(%rsp), %rax
movq 0x58(%rax), %rax
andq %rax, %r13
movq 0x40(%rsp), %r12
movswl 0x46(%r12), %edi
cmpw $0x3f, %di
movl $0x3f, %ecx
cmovll %edi, %ecx
movl %ecx, %esi
testl %edi, %edi
movq %rsi, 0x60(%rsp)
jle 0x2d4802
addl $0x3, %ecx
andl $0x7c, %ecx
leaq -0x1(%rsi), %rdx
movd %r8d, %xmm0
movq %rdx, %xmm1
pshufd $0x44, %xmm1, %xmm1     # xmm1 = xmm1[0,1,0,1]
movq %r13, %xmm2
pshufd $0x44, %xmm2, %xmm5     # xmm5 = xmm2[0,1,0,1]
movdqa 0xca334(%rip), %xmm6    # 0x39ea20
movdqa 0x8432c(%rip), %xmm7    # 0x358a20
movdqa 0x101053(%rip), %xmm8   # 0x3d5750
pxor %xmm9, %xmm9
pcmpeqd %xmm10, %xmm10
movdqa 0xf2b20(%rip), %xmm11   # 0x3c7230
movdqa %xmm0, %xmm2
movdqa %xmm6, %xmm4
movdqa %xmm7, %xmm3
movdqa %xmm8, %xmm12
psllq %xmm7, %xmm12
pshufd $0xee, %xmm7, %xmm13    # xmm13 = xmm7[2,3,2,3]
movdqa %xmm8, %xmm0
psllq %xmm13, %xmm0
movsd %xmm12, %xmm0           # xmm0 = xmm12[0],xmm0[1]
movdqa %xmm8, %xmm12
psllq %xmm6, %xmm12
pshufd $0xee, %xmm6, %xmm13    # xmm13 = xmm6[2,3,2,3]
movdqa %xmm8, %xmm14
psllq %xmm13, %xmm14
movsd %xmm12, %xmm14          # xmm14 = xmm12[0],xmm14[1]
andpd %xmm5, %xmm14
andpd %xmm5, %xmm0
pcmpeqd %xmm9, %xmm0
pcmpeqd %xmm9, %xmm14
movdqa %xmm0, %xmm12
shufps $0xdd, %xmm14, %xmm12   # xmm12 = xmm12[1,3],xmm14[1,3]
shufps $0x88, %xmm14, %xmm0    # xmm0 = xmm0[0,2],xmm14[0,2]
andps %xmm12, %xmm0
paddd %xmm2, %xmm0
psubd %xmm10, %xmm0
paddq %xmm11, %xmm7
paddq %xmm11, %xmm6
addq $-0x4, %rcx
jne 0x2d4710
movdqa 0x8428b(%rip), %xmm5    # 0x358a30
pxor %xmm5, %xmm1
pxor %xmm5, %xmm3
movdqa %xmm3, %xmm6
pcmpgtd %xmm1, %xmm6
pxor %xmm5, %xmm4
movdqa %xmm4, %xmm5
pcmpgtd %xmm1, %xmm5
movdqa %xmm6, %xmm7
shufps $0x88, %xmm5, %xmm7     # xmm7 = xmm7[0,2],xmm5[0,2]
pcmpeqd %xmm1, %xmm3
pcmpeqd %xmm1, %xmm4
shufps $0xdd, %xmm4, %xmm3     # xmm3 = xmm3[1,3],xmm4[1,3]
andps %xmm7, %xmm3
shufps $0xdd, %xmm5, %xmm6     # xmm6 = xmm6[1,3],xmm5[1,3]
orps %xmm3, %xmm6
pand %xmm6, %xmm2
pandn %xmm0, %xmm6
por %xmm2, %xmm6
pshufd $0xee, %xmm6, %xmm0     # xmm0 = xmm6[2,3,2,3]
paddd %xmm6, %xmm0
pshufd $0x55, %xmm0, %xmm1     # xmm1 = xmm0[1,1,1,1]
paddd %xmm0, %xmm1
movd %xmm1, %r8d
movq %rdi, 0x20(%rsp)
leal -0x3e(%rdi), %ecx
testq %rax, %rax
movq (%rbx), %rdi
movl $0x1, %eax
cmovsl %ecx, %eax
addl %r8d, %eax
movl %eax, 0x54(%rsp)
movswl %ax, %esi
xorl %r14d, %r14d
leaq 0x68(%rsp), %rcx
xorl %edx, %edx
callq 0x2c9e00
testq %rax, %rax
je 0x2d4bd7
movq %rax, %r15
movq 0x10(%rsp), %rax
movq %r15, 0x20(%rax)
leaq 0x104165(%rip), %rax    # 0x3d89b2
movq %rax, (%r15)
movq %r12, 0x18(%r15)
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rbx
cmpq 0x28(%rsp), %rbx
jae 0x2d4905
xorl %r14d, %r14d
xorl %r12d, %r12d
movq %rbx, %rdi
movq 0x18(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x2db9f8
testl %eax, %eax
je 0x2d48f6
movl 0x28(%rbx), %ecx
movl $0x1, %ebp
shlq %cl, %rbp
cmpl $0x40, %ecx
movabsq $-0x8000000000000000, %rax # imm = 0x8000000000000000
cmovgeq %rax, %rbp
testq %r12, %rbp
jne 0x2d48f6
movq (%rbx), %rax
movq 0x8(%r15), %rdx
movslq %r14d, %r14
movw %cx, (%rdx,%r14,2)
xorl %ecx, %ecx
movl 0x4(%rax), %edx
movl $0x200, %esi            # imm = 0x200
andl %esi, %edx
sete %cl
shrl $0x6, %edx
movq 0x10(%rax,%rdx), %rsi
movq 0x10(%rax,%rcx,8), %rdx
movq (%rsp), %rdi
callq 0x2a9634
leaq 0xfd280(%rip), %rcx     # 0x3d1b60
testq %rax, %rax
je 0x2d48e8
movq (%rax), %rcx
orq %rbp, %r12
movq 0x40(%r15), %rax
movq %rcx, (%rax,%r14,8)
incl %r14d
addq $0x40, %rbx
cmpq 0x28(%rsp), %rbx
jb 0x2d486e
cmpw $0x0, 0x20(%rsp)
movq 0x60(%rsp), %rdi
jle 0x2d494b
xorl %eax, %eax
leaq 0xfd245(%rip), %rcx     # 0x3d1b60
movq (%rsp), %rbx
movq 0x40(%rsp), %rsi
btq %rax, %r13
jae 0x2d4941
movq 0x8(%r15), %rdx
movslq %r14d, %r14
movw %ax, (%rdx,%r14,2)
movq 0x40(%r15), %rdx
movq %rcx, (%rdx,%r14,8)
incl %r14d
incq %rax
cmpq %rax, %rdi
jne 0x2d4924
jmp 0x2d4954
movq (%rsp), %rbx
movq 0x40(%rsp), %rsi
movq 0x18(%rsp), %rax
cmpq $0x0, 0x58(%rax)
js 0x2d4967
movq 0x48(%rsp), %r13
jmp 0x2d49a0
cmpw $0x40, 0x46(%rsi)
movq 0x48(%rsp), %r13
jl 0x2d49a0
movslq %r14d, %r14
movl $0x3f, %eax
leaq 0xfd1de(%rip), %rcx     # 0x3d1b60
movq 0x8(%r15), %rdx
movw %ax, (%rdx,%r14,2)
movq 0x40(%r15), %rdx
movq %rcx, (%rdx,%r14,8)
incq %r14
incl %eax
movswl 0x46(%rsi), %edx
cmpl %edx, %eax
jl 0x2d4982
movq 0x8(%r15), %rax
movslq %r14d, %rcx
movw $0xffff, (%rax,%rcx,2)  # imm = 0xFFFF
movq 0x40(%r15), %rax
leaq 0xfd1a8(%rip), %rdx     # 0x3d1b60
movq %rdx, (%rax,%rcx,8)
movl 0x34(%rbx), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x34(%rbx)
movq 0x38(%rsp), %r12
movl %edx, 0x8(%r12)
movl $0x0, 0x30(%rsp)
movq %r13, %rdi
movl $0x63, %esi
movl 0x54(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movq %r12, %rbx
movq %r15, %rsi
callq 0x2bca31
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movzbl 0x34(%r12), %ecx
imulq $0x70, %rcx, %rcx
leaq (%rax,%rcx), %r12
addq $0x8, %r12
testb $0x10, 0x3d(%r12)
jne 0x2d4a2c
movl 0x4(%rbx), %edx
movq %r13, %rdi
movl $0x25, %esi
jmp 0x2d4a69
movl 0x34(%r12), %ebx
movq %r13, %rdi
movl $0x45, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, 0x30(%rsp)
movl 0x30(%r12), %r8d
movq %r13, %rdi
movl $0xd, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x2a83e1
movq %r13, %rdi
movl $0xe, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rax, 0x28(%rsp)
movq 0x8(%rsp), %rsi
testq %rsi, %rsi
je 0x2d4aaa
movq (%rsp), %r13
movl 0x44(%r13), %ebx
decl %ebx
movl %ebx, 0x44(%r13)
movq %r13, %rdi
movl %ebx, %edx
movl $0x10, %ecx
callq 0x2bfceb
movq 0x10(%rsp), %rax
orb $0x2, 0x2a(%rax)
jmp 0x2d4ab0
xorl %ebx, %ebx
movq (%rsp), %r13
movb 0x1f(%r13), %al
testb %al, %al
movq %r12, 0x18(%rsp)
je 0x2d4ad0
decb %al
movb %al, 0x1f(%r13)
movzbl %al, %eax
movl 0xd4(%r13,%rax,4), %ebp
jmp 0x2d4ada
movl 0x38(%r13), %ebp
incl %ebp
movl %ebp, 0x38(%r13)
movq 0x38(%rsp), %r12
movl 0x4(%r12), %edx
movq %r13, %rdi
movq %r15, %rsi
movl %ebp, %ecx
xorl %r8d, %r8d
xorl %r9d, %r9d
pushq $0x0
pushq $0x0
callq 0x2ca5e6
addq $0x10, %rsp
movl %eax, %r15d
movl 0x8(%r12), %edx
movq 0x48(%rsp), %r13
movq %r13, %rdi
movl $0x82, %esi
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movslq 0x90(%r13), %rax
testq %rax, %rax
jle 0x2d4b3c
movq 0x88(%r13), %rcx
leaq (%rax,%rax,2), %rax
movw $0x10, -0x16(%rcx,%rax,8)
cmpq $0x0, 0x8(%rsp)
movq 0x18(%rsp), %r12
je 0x2d4b53
movq %r13, %rdi
movl %ebx, %esi
callq 0x2bfa39
testb $0x10, 0x3d(%r12)
jne 0x2d4ba2
movq 0x38(%rsp), %rax
movl 0x4(%rax), %edx
movq 0x28(%rsp), %rbx
leal 0x1(%rbx), %ecx
movq %r13, %rdi
movl $0x5, %esi
xorl %r8d, %r8d
callq 0x2a83e1
movslq 0x90(%r13), %rax
testq %rax, %rax
jle 0x2d4c2f
movq 0x88(%r13), %rcx
leaq (%rax,%rax,2), %rdx
movw $0x3, -0x16(%rcx,%rdx,8)
jmp 0x2d4c2f
movl 0x30(%rsp), %ecx
testl %ecx, %ecx
movq 0x38(%rsp), %rsi
movq 0x28(%rsp), %rbx
jns 0x2d4bbd
movl 0x90(%r13), %ecx
decl %ecx
addl %r14d, %r15d
movq (%r13), %rax
cmpb $0x0, 0x61(%rax)
je 0x2d4be1
leaq 0x1ea2b7(%rip), %rax    # 0x4bee88
jmp 0x2d4bf3
movq (%rsp), %rbx
movq 0x8(%rsp), %rsi
jmp 0x2d4cb9
movslq %ecx, %rax
leaq (%rax,%rax,2), %rax
shlq $0x3, %rax
addq 0x88(%r13), %rax
movl %r15d, 0x8(%rax)
movl 0x38(%r12), %ecx
movl 0x4(%rsi), %edx
movl 0x8(%rsi), %r8d
movq (%rsp), %rdi
movl %ebx, %esi
callq 0x2dcfe6
movq %r13, %rdi
movl $0xb, %esi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
andb $-0x11, 0x3d(%r12)
movl 0x90(%r13), %eax
movq 0x8(%rsp), %rsi
movq (%r13), %rcx
movb 0x61(%rcx), %cl
testb %cl, %cl
je 0x2d4c48
leaq 0x1ea242(%rip), %rdx    # 0x4bee88
jmp 0x2d4c62
leal -0x1(%rax), %edx
testl %ebx, %ebx
cmovnsl %ebx, %edx
movslq %edx, %rdx
leaq (%rdx,%rdx,2), %rdx
shlq $0x3, %rdx
addq 0x88(%r13), %rdx
movq (%rsp), %rbx
movl %eax, 0x8(%rdx)
testl %ebp, %ebp
je 0x2d4c8b
movzbl 0x1f(%rbx), %edx
cmpq $0x7, %rdx
ja 0x2d4c8b
leal 0x1(%rdx), %eax
movb %al, 0x1f(%rbx)
movl %ebp, 0xd4(%rbx,%rdx,4)
movl 0x90(%r13), %eax
testb %cl, %cl
je 0x2d4c98
leaq 0x1ea1f2(%rip), %rcx    # 0x4bee88
jmp 0x2d4cb6
leal -0x1(%rax), %ecx
movl 0x50(%rsp), %edx
testl %edx, %edx
cmovnsl %edx, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%r13), %rcx
movl %eax, 0x8(%rcx)
testq %rsi, %rsi
je 0x2d4cc6
movq (%rbx), %rdi
callq 0x2a6164
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq