// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: analyzeOneTable
static void analyzeOneTable(
  Parse *pParse,   /* Parser context */
  Table *pTab,     /* Table whose indices are to be analyzed */
  Index *pOnlyIdx, /* If not NULL, only analyze this one index */
  int iStatCur,    /* Index of VdbeCursor that writes the sqlite_stat1 table */
  int iMem,        /* Available memory locations begin here */
  int iTab         /* Next available cursor */
){
  sqlite3 *db = pParse->db;    /* Database handle */
  Index *pIdx;                 /* An index to being analyzed */
  int iIdxCur;                 /* Cursor open on index being analyzed */
  int iTabCur;                 /* Table cursor */
  Vdbe *v;                     /* The virtual machine being built up */
  int i;                       /* Loop counter */
  int jZeroRows = -1;          /* Jump from here if number of rows is zero */
  int iDb;                     /* Index of database containing pTab */
  u8 needTableCnt = 1;         /* True to count the table */
  int regNewRowid = iMem++;    /* Rowid for the inserted record */
  int regStat = iMem++;        /* Register to hold StatAccum object */
  int regChng = iMem++;        /* Index of changed index field */
  int regRowid = iMem++;       /* Rowid argument passed to stat_push() */
  int regTemp = iMem++;        /* Temporary use register */
  int regTemp2 = iMem++;       /* Second temporary use register */
  int regTabname = iMem++;     /* Register containing table name */
  int regIdxname = iMem++;     /* Register containing index name */
  int regStat1 = iMem++;       /* Value for the stat column of sqlite_stat1 */
  int regPrev = iMem;          /* MUST BE LAST (see below) */
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
  Table *pStat1 = 0;
#endif

  pParse->nMem = MAX(pParse->nMem, iMem);
  v = sqlite3GetVdbe(pParse);
  if( v==0 || NEVER(pTab==0) ){
    return;
  }
  if( pTab->tnum==0 ){
    /* Do not gather statistics on views or virtual tables */
    return;
  }
  if( sqlite3_strlike("sqlite\\_%", pTab->zName, '\\')==0 ){
    /* Do not gather statistics on system tables */
    return;
  }
  assert( sqlite3BtreeHoldsAllMutexes(db) );
  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
  assert( iDb>=0 );
  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
#ifndef SQLITE_OMIT_AUTHORIZATION
  if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,
      db->aDb[iDb].zDbSName ) ){
    return;
  }
#endif

#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
  if( db->xPreUpdateCallback ){
    pStat1 = (Table*)sqlite3DbMallocZero(db, sizeof(Table) + 13);
    if( pStat1==0 ) return;
    pStat1->zName = (char*)&pStat1[1];
    memcpy(pStat1->zName, "sqlite_stat1", 13);
    pStat1->nCol = 3;
    pStat1->iPKey = -1;
    sqlite3VdbeAddOp4(pParse->pVdbe, OP_Noop, 0, 0, 0,(char*)pStat1,P4_DYNBLOB);
  }
#endif

  /* Establish a read-lock on the table at the shared-cache level.
  ** Open a read-only cursor on the table. Also allocate a cursor number
  ** to use for scanning indexes (iIdxCur). No index cursor is opened at
  ** this time though.  */
  sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
  iTabCur = iTab++;
  iIdxCur = iTab++;
  pParse->nTab = MAX(pParse->nTab, iTab);
  sqlite3OpenTable(pParse, iTabCur, iDb, pTab, OP_OpenRead);
  sqlite3VdbeLoadString(v, regTabname, pTab->zName);

  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    int nCol;                     /* Number of columns in pIdx. "N" */
    int addrRewind;               /* Address of "OP_Rewind iIdxCur" */
    int addrNextRow;              /* Address of "next_row:" */
    const char *zIdxName;         /* Name of the index */
    int nColTest;                 /* Number of columns to test for changes */

    if( pOnlyIdx && pOnlyIdx!=pIdx ) continue;
    if( pIdx->pPartIdxWhere==0 ) needTableCnt = 0;
    if( !HasRowid(pTab) && IsPrimaryKeyIndex(pIdx) ){
      nCol = pIdx->nKeyCol;
      zIdxName = pTab->zName;
      nColTest = nCol - 1;
    }else{
      nCol = pIdx->nColumn;
      zIdxName = pIdx->zName;
      nColTest = pIdx->uniqNotNull ? pIdx->nKeyCol-1 : nCol-1;
    }

    /* Populate the register containing the index name. */
    sqlite3VdbeLoadString(v, regIdxname, zIdxName);
    VdbeComment((v, "Analysis for %s.%s", pTab->zName, zIdxName));

    /*
    ** Pseudo-code for loop that calls stat_push():
    **
    **   Rewind csr
    **   if eof(csr) goto end_of_scan;
    **   regChng = 0
    **   goto chng_addr_0;
    **
    **  next_row:
    **   regChng = 0
    **   if( idx(0) != regPrev(0) ) goto chng_addr_0
    **   regChng = 1
    **   if( idx(1) != regPrev(1) ) goto chng_addr_1
    **   ...
    **   regChng = N
    **   goto chng_addr_N
    **
    **  chng_addr_0:
    **   regPrev(0) = idx(0)
    **  chng_addr_1:
    **   regPrev(1) = idx(1)
    **  ...
    **
    **  endDistinctTest:
    **   regRowid = idx(rowid)
    **   stat_push(P, regChng, regRowid)
    **   Next csr
    **   if !eof(csr) goto next_row;
    **
    **  end_of_scan:
    */

    /* Make sure there are enough memory cells allocated to accommodate
    ** the regPrev array and a trailing rowid (the rowid slot is required
    ** when building a record to insert into the sample column of
    ** the sqlite_stat4 table.  */
    pParse->nMem = MAX(pParse->nMem, regPrev+nColTest);

    /* Open a read-only cursor on the index being analyzed. */
    assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) );
    sqlite3VdbeAddOp3(v, OP_OpenRead, iIdxCur, pIdx->tnum, iDb);
    sqlite3VdbeSetP4KeyInfo(pParse, pIdx);
    VdbeComment((v, "%s", pIdx->zName));

    /* Invoke the stat_init() function. The arguments are:
    **
    **    (1) the number of columns in the index including the rowid
    **        (or for a WITHOUT ROWID table, the number of PK columns),
    **    (2) the number of columns in the key without the rowid/pk
    **    (3) estimated number of rows in the index,
    */
    sqlite3VdbeAddOp2(v, OP_Integer, nCol, regStat+1);
    assert( regRowid==regStat+2 );
    sqlite3VdbeAddOp2(v, OP_Integer, pIdx->nKeyCol, regRowid);
#ifdef SQLITE_ENABLE_STAT4
    if( OptimizationEnabled(db, SQLITE_Stat4) ){
      sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regTemp);
      addrRewind = sqlite3VdbeAddOp1(v, OP_Rewind, iIdxCur);
      VdbeCoverage(v);
    }else
#endif
    {
      addrRewind = sqlite3VdbeAddOp1(v, OP_Rewind, iIdxCur);
      VdbeCoverage(v);
      sqlite3VdbeAddOp3(v, OP_Count, iIdxCur, regTemp, 1);
    }
    assert( regTemp2==regStat+4 );
    sqlite3VdbeAddOp2(v, OP_Integer, db->nAnalysisLimit, regTemp2);
    sqlite3VdbeAddFunctionCall(pParse, 0, regStat+1, regStat, 4,
                               &statInitFuncdef, 0);

    /* Implementation of the following:
    **
    **   Rewind csr
    **   if eof(csr) goto end_of_scan;
    **   regChng = 0
    **   goto next_push_0;
    **
    */
    sqlite3VdbeAddOp2(v, OP_Integer, 0, regChng);
    addrNextRow = sqlite3VdbeCurrentAddr(v);

    if( nColTest>0 ){
      int endDistinctTest = sqlite3VdbeMakeLabel(pParse);
      int *aGotoChng;               /* Array of jump instruction addresses */
      aGotoChng = sqlite3DbMallocRawNN(db, sizeof(int)*nColTest);
      if( aGotoChng==0 ) continue;

      /*
      **  next_row:
      **   regChng = 0
      **   if( idx(0) != regPrev(0) ) goto chng_addr_0
      **   regChng = 1
      **   if( idx(1) != regPrev(1) ) goto chng_addr_1
      **   ...
      **   regChng = N
      **   goto endDistinctTest
      */
      sqlite3VdbeAddOp0(v, OP_Goto);
      addrNextRow = sqlite3VdbeCurrentAddr(v);
      if( nColTest==1 && pIdx->nKeyCol==1 && IsUniqueIndex(pIdx) ){
        /* For a single-column UNIQUE index, once we have found a non-NULL
        ** row, we know that all the rest will be distinct, so skip
        ** subsequent distinctness tests. */
        sqlite3VdbeAddOp2(v, OP_NotNull, regPrev, endDistinctTest);
        VdbeCoverage(v);
      }
      for(i=0; i<nColTest; i++){
        char *pColl = (char*)sqlite3LocateCollSeq(pParse, pIdx->azColl[i]);
        sqlite3VdbeAddOp2(v, OP_Integer, i, regChng);
        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regTemp);
        analyzeVdbeCommentIndexWithColumnName(v,pIdx,i);
        aGotoChng[i] =
        sqlite3VdbeAddOp4(v, OP_Ne, regTemp, 0, regPrev+i, pColl, P4_COLLSEQ);
        sqlite3VdbeChangeP5(v, SQLITE_NULLEQ);
        VdbeCoverage(v);
      }
      sqlite3VdbeAddOp2(v, OP_Integer, nColTest, regChng);
      sqlite3VdbeGoto(v, endDistinctTest);


      /*
      **  chng_addr_0:
      **   regPrev(0) = idx(0)
      **  chng_addr_1:
      **   regPrev(1) = idx(1)
      **  ...
      */
      sqlite3VdbeJumpHere(v, addrNextRow-1);
      for(i=0; i<nColTest; i++){
        sqlite3VdbeJumpHere(v, aGotoChng[i]);
        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regPrev+i);
        analyzeVdbeCommentIndexWithColumnName(v,pIdx,i);
      }
      sqlite3VdbeResolveLabel(v, endDistinctTest);
      sqlite3DbFree(db, aGotoChng);
    }

    /*
    **  chng_addr_N:
    **   regRowid = idx(rowid)            // STAT4 only
    **   stat_push(P, regChng, regRowid)  // 3rd parameter STAT4 only
    **   Next csr
    **   if !eof(csr) goto next_row;
    */
#ifdef SQLITE_ENABLE_STAT4
    if( OptimizationEnabled(db, SQLITE_Stat4) ){
      assert( regRowid==(regStat+2) );
      if( HasRowid(pTab) ){
        sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, regRowid);
      }else{
        Index *pPk = sqlite3PrimaryKeyIndex(pIdx->pTable);
        int j, k, regKey;
        regKey = sqlite3GetTempRange(pParse, pPk->nKeyCol);
        for(j=0; j<pPk->nKeyCol; j++){
          k = sqlite3TableColumnToIndex(pIdx, pPk->aiColumn[j]);
          assert( k>=0 && k<pIdx->nColumn );
          sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, regKey+j);
          analyzeVdbeCommentIndexWithColumnName(v,pIdx,k);
        }
        sqlite3VdbeAddOp3(v, OP_MakeRecord, regKey, pPk->nKeyCol, regRowid);
        sqlite3ReleaseTempRange(pParse, regKey, pPk->nKeyCol);
      }
    }
#endif
    assert( regChng==(regStat+1) );
    {
      sqlite3VdbeAddFunctionCall(pParse, 1, regStat, regTemp, 2+IsStat4,
                                 &statPushFuncdef, 0);
      if( db->nAnalysisLimit ){
        int j1, j2, j3;
        j1 = sqlite3VdbeAddOp1(v, OP_IsNull, regTemp); VdbeCoverage(v);
        j2 = sqlite3VdbeAddOp1(v, OP_If, regTemp); VdbeCoverage(v);
        j3 = sqlite3VdbeAddOp4Int(v, OP_SeekGT, iIdxCur, 0, regPrev, 1);
        VdbeCoverage(v);
        sqlite3VdbeJumpHere(v, j1);
        sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, addrNextRow); VdbeCoverage(v);
        sqlite3VdbeJumpHere(v, j2);
        sqlite3VdbeJumpHere(v, j3);
      }else{
        sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, addrNextRow); VdbeCoverage(v);
      }
    }

    /* Add the entry to the stat1 table. */
    callStatGet(pParse, regStat, STAT_GET_STAT1, regStat1);
    assert( "BBB"[0]==SQLITE_AFF_TEXT );
    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regTemp, "BBB", 0);
    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
    sqlite3VdbeChangeP4(v, -1, (char*)pStat1, P4_TABLE);
#endif
    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);

    /* Add the entries to the stat4 table. */
#ifdef SQLITE_ENABLE_STAT4
    if( OptimizationEnabled(db, SQLITE_Stat4) && db->nAnalysisLimit==0 ){
      int regEq = regStat1;
      int regLt = regStat1+1;
      int regDLt = regStat1+2;
      int regSample = regStat1+3;
      int regCol = regStat1+4;
      int regSampleRowid = regCol + nCol;
      int addrNext;
      int addrIsNull;
      u8 seekOp = HasRowid(pTab) ? OP_NotExists : OP_NotFound;

      pParse->nMem = MAX(pParse->nMem, regCol+nCol);

      addrNext = sqlite3VdbeCurrentAddr(v);
      callStatGet(pParse, regStat, STAT_GET_ROWID, regSampleRowid);
      addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, regSampleRowid);
      VdbeCoverage(v);
      callStatGet(pParse, regStat, STAT_GET_NEQ, regEq);
      callStatGet(pParse, regStat, STAT_GET_NLT, regLt);
      callStatGet(pParse, regStat, STAT_GET_NDLT, regDLt);
      sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0);
      VdbeCoverage(v);
      for(i=0; i<nCol; i++){
        sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iTabCur, i, regCol+i);
      }
      sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol, regSample);
      sqlite3VdbeAddOp3(v, OP_MakeRecord, regTabname, 6, regTemp);
      sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid);
      sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regTemp, regNewRowid);
      sqlite3VdbeAddOp2(v, OP_Goto, 1, addrNext); /* P1==1 for end-of-loop */
      sqlite3VdbeJumpHere(v, addrIsNull);
    }
#endif /* SQLITE_ENABLE_STAT4 */

    /* End of analysis */
    sqlite3VdbeJumpHere(v, addrRewind);
  }


  /* Create a single sqlite_stat1 entry containing NULL as the index
  ** name and the row count as the content.
  */
  if( pOnlyIdx==0 && needTableCnt ){
    VdbeComment((v, "%s", pTab->zName));
    sqlite3VdbeAddOp2(v, OP_Count, iTabCur, regStat1);
    jZeroRows = sqlite3VdbeAddOp1(v, OP_IfNot, regStat1); VdbeCoverage(v);
    sqlite3VdbeAddOp2(v, OP_Null, 0, regIdxname);
    assert( "BBB"[0]==SQLITE_AFF_TEXT );
    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regTemp, "BBB", 0);
    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regTemp, regNewRowid);
    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
#ifdef SQLITE_ENABLE_PREUPDATE_HOOK
    sqlite3VdbeChangeP4(v, -1, (char*)pStat1, P4_TABLE);
#endif
    sqlite3VdbeJumpHere(v, jZeroRows);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, 0x70(%rsp)
movl %r8d, %r15d
movl %ecx, %ebp
movq %rdx, 0x98(%rsp)
movq %rsi, %r12
movq (%rdi), %rax
movq %rax, 0x80(%rsp)
leal 0x9(%r15), %edx
movl 0x38(%rdi), %eax
cmpl %edx, %eax
movq %rdx, 0x60(%rsp)
cmovlel %edx, %eax
movl %eax, 0x38(%rdi)
movq %rdi, 0x20(%rsp)
callq 0x2bc630
movq %rax, %rbx
testq %rax, %rax
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x2e9ba3
cmpl $0x0, 0x38(%r12)
je 0x2e9ba3
movq (%r12), %r14
leaq 0xf036d(%rip), %rdi     # 0x3d95cf
leaq 0xe81d3(%rip), %rdx     # 0x3d143c
movq %r14, %rsi
movl $0x5c, %ecx
callq 0x27c120
testl %eax, %eax
je 0x2e9ba3
movq 0x70(%r12), %rcx
movq 0x80(%rsp), %rax
movq 0x20(%rax), %rax
testq %rcx, %rcx
je 0x2e92af
leaq 0x18(%rax), %rdx
movl $0xffffffff, %r13d      # imm = 0xFFFFFFFF
incl %r13d
leaq 0x20(%rdx), %rsi
cmpq %rcx, (%rdx)
movq %rsi, %rdx
jne 0x2e929e
jmp 0x2e92b5
movl $0xffff8000, %r13d      # imm = 0xFFFF8000
movslq %r13d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r8
movq 0x20(%rsp), %rdi
movl $0x1c, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x2c37ba
testl %eax, %eax
jne 0x2e9ba3
movl %ebp, 0x14(%rsp)
leal 0x4(%r15), %eax
movl %eax, 0x18(%rsp)
movq %r15, %rbp
addl $0x6, %r15d
leal 0x7(%rbp), %eax
movl %eax, 0x58(%rsp)
leal 0x8(%rbp), %eax
movl %eax, 0x4c(%rsp)
movl 0x38(%r12), %edx
movq (%r12), %r8
movq 0x20(%rsp), %r14
movq %r14, %rdi
movl %r13d, %esi
xorl %ecx, %ecx
callq 0x2bc937
movq 0x70(%rsp), %rsi
leal 0x2(%rsi), %eax
movl 0x34(%r14), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x34(%r14)
movq %r14, %rdi
movl %r13d, 0x94(%rsp)
movl %r13d, %edx
movq %r12, %rcx
movl $0x60, %r8d
callq 0x2bc82f
movq (%r12), %r14
movq %rbx, %rdi
movl $0x73, %esi
xorl %edx, %edx
movl %r15d, 0x50(%rsp)
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x27b778
movq 0x10(%r12), %r15
testq %r15, %r15
je 0x2e9a8f
leal 0x1(%rbp), %eax
movl %eax, 0x30(%rsp)
leal 0x2(%rbp), %eax
movl %eax, 0x34(%rsp)
leal 0x3(%rbp), %eax
movl %eax, 0x90(%rsp)
leal 0x5(%rbp), %eax
movl %eax, 0x8c(%rsp)
movq 0x70(%rsp), %rax
incl %eax
movl %eax, 0x10(%rsp)
movl 0x60(%rsp), %eax
movq %rax, 0xa0(%rsp)
movb $0x1, %dl
movq %r12, 0x38(%rsp)
movq %rbp, %r13
movl 0x14(%rsp), %ebp
movq %r13, 0x68(%rsp)
movq 0x98(%rsp), %rcx
testq %rcx, %rcx
setne %al
cmpq %rcx, %r15
setne %cl
testb %cl, %al
jne 0x2e9a44
cmpq $0x0, 0x48(%r15)
movzbl %dl, %edx
movl $0x0, %eax
cmovel %eax, %edx
movzwl 0x63(%r15), %eax
testb $-0x80, 0x40(%r12)
movl %edx, 0x5c(%rsp)
je 0x2e9423
movl %eax, %ecx
andl $0x3, %ecx
cmpw $0x2, %cx
jne 0x2e9423
movzwl 0x5e(%r15), %r14d
movq (%r12), %r13
jmp 0x2e942f
movzwl 0x60(%r15), %r14d
movq (%r15), %r13
testb $0x8, %al
jne 0x2e9434
movl %r14d, %r12d
jmp 0x2e9439
movzwl 0x5e(%r15), %r12d
movq %r12, 0x78(%rsp)
movq %rbx, %rdi
movl $0x73, %esi
xorl %edx, %edx
movl 0x58(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl %eax, %esi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x27b778
movq 0x20(%rsp), %r13
movl 0x38(%r13), %eax
movq 0x60(%rsp), %rcx
addl %r12d, %ecx
decl %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x38(%r13)
movl 0x58(%r15), %ecx
movq %rbx, %rdi
movl $0x60, %esi
movl 0x10(%rsp), %r12d
movl %r12d, %edx
movl 0x94(%rsp), %r8d
callq 0x2a83e1
movq %r13, %rdi
movq %r15, %rsi
callq 0x2bca31
movq %rbx, %rdi
movl $0x45, %esi
movl %r14d, %edx
movq %r13, %r14
movl 0x34(%rsp), %ebp
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %r15, 0x40(%rsp)
movzwl 0x5e(%r15), %edx
movq %rbx, %rdi
movl $0x45, %esi
movl 0x90(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x25, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, %r15d
movq %rbx, %rdi
movl $0x5c, %esi
movl %r12d, %edx
movq 0x78(%rsp), %r12
movl 0x18(%rsp), %ecx
movl $0x1, %r8d
callq 0x2a83e1
movq 0x80(%rsp), %r13
movl 0x2b0(%r13), %edx
movq %rbx, %rdi
movl $0x45, %esi
movl 0x8c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl $0x0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movl %ebp, %edx
movl 0x30(%rsp), %ecx
movl $0x4, %r8d
leaq 0x1cea2c(%rip), %r9     # 0x4b7f90
callq 0x2bee54
movq %rbx, %rdi
movl $0x45, %esi
xorl %edx, %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
cmpl $0x2, %r12d
jb 0x2e97d6
decl %r12d
movl 0x44(%r14), %eax
decl %eax
movl %eax, 0x2c(%rsp)
movl %eax, 0x44(%r14)
movl %r12d, %ebp
leaq (,%rbp,4), %rsi
movq %r13, %rdi
callq 0x282a35
testq %rax, %rax
movq %r12, %r13
movq 0x38(%rsp), %r12
je 0x2e9a53
movq %rax, %r14
movl %r15d, 0x54(%rsp)
movq %rbx, %rdi
movl $0xb, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl 0x90(%rbx), %eax
movl %eax, 0x1c(%rsp)
movq %r13, 0x78(%rsp)
cmpl $0x1, %r13d
movq 0x40(%rsp), %rax
jne 0x2e961d
cmpw $0x1, 0x5e(%rax)
jne 0x2e961d
cmpb $0x0, 0x62(%rax)
je 0x2e961d
movq %rbx, %rdi
movl $0x33, %esi
movq 0x60(%rsp), %rdx
movl 0x2c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq 0x40(%rsp), %rax
xorl %r13d, %r13d
movq 0x40(%rax), %rax
movq (%rax,%r13,8), %rsi
movq 0x20(%rsp), %rdi
callq 0x2bcc04
movq %rax, %r12
movq %rbx, %rdi
movl $0x45, %esi
movl %r13d, %edx
movl 0x34(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x59, %esi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
movl 0x18(%rsp), %r15d
movl %r15d, %r8d
callq 0x2a83e1
movq 0xa0(%rsp), %rax
leal (%rax,%r13), %r8d
movq %rbx, %rdi
movl $0x34, %esi
movl %r15d, %edx
xorl %ecx, %ecx
callq 0x2a83e1
movl %eax, %r15d
movq %rbx, %rdi
movl %eax, %esi
movq %r12, %rdx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
callq 0x27b778
movl %r15d, (%r14,%r13,4)
movslq 0x90(%rbx), %rax
testq %rax, %rax
jle 0x2e96bd
movq 0x88(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movw $0x80, -0x16(%rcx,%rax,8)
incq %r13
cmpq %r13, %rbp
movq 0x40(%rsp), %rax
jne 0x2e9620
movq %rbx, %rdi
movl $0x45, %esi
movq 0x78(%rsp), %r12
movl %r12d, %edx
movl 0x34(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0xb, %esi
xorl %edx, %edx
movl 0x2c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
leaq 0x1d5774(%rip), %r15    # 0x4bee88
movq %r15, %rcx
jne 0x2e9738
movl 0x1c(%rsp), %ecx
testl %ecx, %ecx
cmovlel %eax, %ecx
movq 0x88(%rbx), %rdx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $-0x18, %rcx
movl %eax, 0x8(%rcx)
cmpl $0x2, %r12d
movl $0x1, %eax
cmovll %eax, %r12d
xorl %r13d, %r13d
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
movq %r15, %rcx
jne 0x2e977b
movl (%r14,%r13,4), %ecx
leal -0x1(%rax), %edx
testl %ecx, %ecx
cmovnsl %ecx, %edx
movslq %edx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%rbx), %rcx
movl %eax, 0x8(%rcx)
movq 0xa0(%rsp), %rax
leal (%rax,%r13), %r8d
movq %rbx, %rdi
movl $0x59, %esi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
callq 0x2a83e1
incq %r13
cmpq %r13, %r12
jne 0x2e974b
movq 0x68(%rsp), %rbp
movq %rbx, %rdi
movl 0x2c(%rsp), %esi
callq 0x2bfa39
movq 0x80(%rsp), %r13
movq %r13, %rdi
movq %r14, %rsi
callq 0x282904
movq 0x38(%rsp), %r12
movq 0x20(%rsp), %r14
jmp 0x2e97ef
movl %r15d, 0x54(%rsp)
movq 0x68(%rsp), %rbp
movl 0x90(%rbx), %eax
movl %eax, 0x1c(%rsp)
movq 0x38(%rsp), %r12
movl $0x0, (%rsp)
movq %r14, %rdi
movl $0x1, %esi
movl 0x30(%rsp), %edx
movl 0x18(%rsp), %r15d
movl %r15d, %ecx
movl $0x2, %r8d
leaq 0x1ce7c1(%rip), %r9     # 0x4b7fd8
callq 0x2bee54
cmpl $0x0, 0x2b0(%r13)
je 0x2e9882
movq %rbx, %rdi
movl $0x32, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, %r13d
movq %rbx, %rdi
movl $0x12, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, %r14d
movq %rbx, %rdi
movl $0x19, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
movq 0x60(%rsp), %r8
callq 0x2a83e1
movl %eax, %r15d
movq (%rbx), %rax
cmpb $0x0, 0x61(%rax)
je 0x2e98ad
movl 0x90(%rbx), %eax
jmp 0x2e98db
movq %rbx, %rdi
movl $0x5, %esi
movl 0x10(%rsp), %edx
movl 0x1c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbp, %r13
movl 0x14(%rsp), %ebp
leaq 0x1d55e0(%rip), %r15    # 0x4bee88
jmp 0x2e996f
movq 0x88(%rbx), %rax
movslq %r15d, %rcx
leaq (%rcx,%rcx,2), %rcx
movb $-0x3, 0x1(%rax,%rcx,8)
movl $0x1, 0x10(%rax,%rcx,8)
movq (%rbx), %rax
cmpb $0x0, 0x61(%rax)
movl 0x90(%rbx), %eax
je 0x2e9a67
leaq 0x1d55a6(%rip), %rcx    # 0x4bee88
movq 0x38(%rsp), %r12
movl %eax, 0x8(%rcx)
movq %rbx, %rdi
movl $0x5, %esi
movl 0x10(%rsp), %edx
movl 0x1c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl 0x90(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x2e992b
movl %eax, 0x1d5579(%rip)    # 0x4bee90
leaq 0x1d556a(%rip), %r15    # 0x4bee88
movq %r15, %rcx
movq 0x20(%rsp), %r14
movq %rbp, %r13
jmp 0x2e9968
leal -0x1(%rax), %ecx
testl %r14d, %r14d
cmovsl %ecx, %r14d
movq 0x88(%rbx), %rdx
movslq %r14d, %rsi
leaq (%rsi,%rsi,2), %rsi
testl %r15d, %r15d
cmovsl %ecx, %r15d
movl %eax, 0x8(%rdx,%rsi,8)
movslq %r15d, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rcx
movq 0x20(%rsp), %r14
movq %rbp, %r13
leaq 0x1d5520(%rip), %r15    # 0x4bee88
movl %eax, 0x8(%rcx)
movl 0x14(%rsp), %ebp
movl $0x0, (%rsp)
movq %r14, %rdi
xorl %esi, %esi
movl 0x30(%rsp), %edx
movl 0x4c(%rsp), %ecx
movl $0x1, %r8d
leaq 0x1ce690(%rip), %r9     # 0x4b8020
callq 0x2bee54
movq %rbx, %rdi
movl $0x5b, %esi
movl 0x50(%rsp), %edx
movl $0x3, %ecx
movl 0x18(%rsp), %r14d
movl %r14d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl %eax, %esi
leaq 0xefc1a(%rip), %rdx     # 0x3d95d9
xorl %ecx, %ecx
callq 0x27b778
movq %rbx, %rdi
movl $0x78, %esi
movl %ebp, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x79, %esi
movl %ebp, %edx
movl %r14d, %ecx
movl %r13d, %r8d
callq 0x2a83e1
movslq 0x90(%rbx), %rax
testq %rax, %rax
jle 0x2e9a0e
movq 0x88(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movw $0x8, -0x16(%rcx,%rdx,8)
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
movq %r15, %rcx
movq 0x40(%rsp), %r15
jne 0x2e9a3d
leal -0x1(%rax), %ecx
movl 0x54(%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 0x5c(%rsp), %edx
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x2e93d0
jmp 0x2e9a88
movl 0x14(%rsp), %ebp
movq 0x40(%rsp), %r15
movl 0x5c(%rsp), %edx
movq 0x68(%rsp), %r13
jmp 0x2e9a44
leal -0x1(%rax), %ecx
testl %r13d, %r13d
cmovnsl %r13d, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x88(%rbx), %rcx
jmp 0x2e98e2
testb %dl, %dl
setne %al
jmp 0x2e9a98
movb $0x1, %al
movq %rbp, %r13
movl 0x14(%rsp), %ebp
cmpq $0x0, 0x98(%rsp)
movl 0x18(%rsp), %r12d
jne 0x2e9ba3
testb %al, %al
je 0x2e9ba3
movq %rbx, %rdi
movl $0x5c, %esi
movq 0x70(%rsp), %rdx
movl %ebp, %r14d
movl 0x4c(%rsp), %ebp
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x14, %esi
movl %ebp, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movl %eax, %ebp
movq %rbx, %rdi
movl $0x48, %esi
xorl %edx, %edx
movl 0x58(%rsp), %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x5b, %esi
movl 0x50(%rsp), %edx
movl $0x3, %ecx
movl %r12d, %r8d
callq 0x2a83e1
leaq 0xefabb(%rip), %rdx     # 0x3d95d9
movq %rbx, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x27b778
movq %rbx, %rdi
movl $0x78, %esi
movl %r14d, %edx
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x2a83e1
movq %rbx, %rdi
movl $0x79, %esi
movl %r14d, %edx
movl %r12d, %ecx
movl %r13d, %r8d
callq 0x2a83e1
movslq 0x90(%rbx), %rax
testq %rax, %rax
jle 0x2e9b74
movq 0x88(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movw $0x8, -0x16(%rcx,%rdx,8)
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x2e9b86
leaq 0x1d5304(%rip), %rcx    # 0x4bee88
jmp 0x2e9ba0
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
movl %eax, 0x8(%rcx)
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq