// File: /workspace/github_c_makefile_star2_O3/ukontainer[P]sqlite-bench/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 regStat4 = iMem++;       /* Register to hold Stat4Accum object */
  int regChng = iMem++;        /* Index of changed index field */
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
  int regRowid = iMem++;       /* Rowid argument passed to stat_push() */
#endif
  int regTemp = iMem++;        /* 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) the number of rows in the index,
    **
    **
    ** The third argument is only used for STAT3 and STAT4
    */
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
    sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regStat4+3);
#endif
    sqlite3VdbeAddOp2(v, OP_Integer, nCol, regStat4+1);
    sqlite3VdbeAddOp2(v, OP_Integer, pIdx->nKeyCol, regStat4+2);
    sqlite3VdbeAddOp4(v, OP_Function0, 0, regStat4+1, regStat4,
                     (char*)&statInitFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 2+IsStat34);

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

    if( nColTest>0 ){
      int endDistinctTest = sqlite3VdbeMakeLabel(v);
      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);
        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);
      }
      sqlite3VdbeResolveLabel(v, endDistinctTest);
      sqlite3DbFree(db, aGotoChng);
    }
  
    /*
    **  chng_addr_N:
    **   regRowid = idx(rowid)            // STAT34 only
    **   stat_push(P, regChng, regRowid)  // 3rd parameter STAT34 only
    **   Next csr
    **   if !eof(csr) goto next_row;
    */
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
    assert( regRowid==(regStat4+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 = sqlite3ColumnOfIndex(pIdx, pPk->aiColumn[j]);
        assert( k>=0 && k<pIdx->nColumn );
        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, k, regKey+j);
        VdbeComment((v, "%s", pTab->aCol[pPk->aiColumn[j]].zName));
      }
      sqlite3VdbeAddOp3(v, OP_MakeRecord, regKey, pPk->nKeyCol, regRowid);
      sqlite3ReleaseTempRange(pParse, regKey, pPk->nKeyCol);
    }
#endif
    assert( regChng==(regStat4+1) );
    sqlite3VdbeAddOp4(v, OP_Function0, 1, regStat4, regTemp,
                     (char*)&statPushFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 2+IsStat34);
    sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, addrNextRow); VdbeCoverage(v);

    /* Add the entry to the stat1 table. */
    callStatGet(v, regStat4, 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 stat3 or stat4 table. */
#ifdef SQLITE_ENABLE_STAT3_OR_STAT4
    {
      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(v, regStat4, STAT_GET_ROWID, regSampleRowid);
      addrIsNull = sqlite3VdbeAddOp1(v, OP_IsNull, regSampleRowid);
      VdbeCoverage(v);
      callStatGet(v, regStat4, STAT_GET_NEQ, regEq);
      callStatGet(v, regStat4, STAT_GET_NLT, regLt);
      callStatGet(v, regStat4, STAT_GET_NDLT, regDLt);
      sqlite3VdbeAddOp4Int(v, seekOp, iTabCur, addrNext, regSampleRowid, 0);
      VdbeCoverage(v);
#ifdef SQLITE_ENABLE_STAT3
      sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iTabCur, 0, regSample);
#else
      for(i=0; i<nCol; i++){
        sqlite3ExprCodeLoadIndexColumn(pParse, pIdx, iTabCur, i, regCol+i);
      }
      sqlite3VdbeAddOp3(v, OP_MakeRecord, regCol, nCol, regSample);
#endif
      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_STAT3_OR_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 $0x98, %rsp
movl %r9d, %ebp
movl %r8d, %r15d
movl %ecx, 0x4c(%rsp)
movq %rdx, %r13
movq %rsi, %rbx
movq (%rdi), %rax
movq %rax, 0x60(%rsp)
leal 0x7(%r15), %edx
movl 0x38(%rdi), %eax
cmpl %edx, %eax
movq %rdx, 0x68(%rsp)
cmovlel %edx, %eax
movl %eax, 0x38(%rdi)
movq %rdi, 0x50(%rsp)
callq 0x44dbe5
movq %rbx, %rsi
movq %rax, %rbx
testq %rax, %rax
sete %al
testq %rsi, %rsi
sete %cl
orb %al, %cl
jne 0x475fb0
cmpl $0x0, 0x38(%rsi)
je 0x475fb0
movq (%rsi), %r14
leaq 0xde743(%rip), %rdi     # 0x553f06
leaq 0xd6d02(%rip), %rdx     # 0x54c4cc
movq %rsi, 0x18(%rsp)
movq %r14, %rsi
movl $0x5c, %ecx
callq 0x40f059
movq 0x18(%rsp), %rcx
testl %eax, %eax
je 0x475fb0
movq 0x70(%rcx), %rcx
movq 0x60(%rsp), %rax
movq 0x20(%rax), %rax
testq %rcx, %rcx
je 0x475816
leaq 0x18(%rax), %rdx
movl $0xffffffff, %r12d      # imm = 0xFFFFFFFF
incl %r12d
leaq 0x20(%rdx), %rsi
cmpq %rcx, (%rdx)
movq %rsi, %rdx
jne 0x475805
jmp 0x47581c
movl $0xfff0bdc0, %r12d      # imm = 0xFFF0BDC0
movslq %r12d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r8
movq 0x50(%rsp), %rdi
movl $0x1c, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x453d2a
testl %eax, %eax
movq 0x18(%rsp), %rax
jne 0x475fb0
leal 0x3(%r15), %ecx
movl %ecx, 0xc(%rsp)
leal 0x4(%r15), %ecx
movl %ecx, 0x28(%rsp)
leal 0x5(%r15), %ecx
movl %ecx, 0x44(%rsp)
leal 0x6(%r15), %ecx
movl %ecx, 0x40(%rsp)
movl 0x38(%rax), %edx
movq (%rax), %r8
movq 0x50(%rsp), %r14
movq %r14, %rdi
movl %r12d, %esi
xorl %ecx, %ecx
callq 0x44def5
movq %rbp, %rsi
leal 0x2(%rbp), %eax
movl 0x34(%r14), %ecx
cmpl %eax, %ecx
cmovgl %ecx, %eax
movl %eax, 0x34(%r14)
movq %r14, %rdi
movq %rbp, 0x58(%rsp)
movl %r12d, 0x78(%rsp)
movl %r12d, %edx
movq 0x18(%rsp), %rcx
movl $0x6d, %r8d
callq 0x44ddf0
movq 0x18(%rsp), %rax
movq (%rax), %r14
movq %rbx, %rdi
movl $0x6a, %esi
xorl %edx, %edx
movl 0x28(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl %eax, %esi
movq %r14, %rdx
xorl %ecx, %ecx
callq 0x40e765
movq 0x18(%rsp), %rdx
movq 0x10(%rdx), %r12
testq %r12, %r12
je 0x475ead
leal 0x1(%r15), %eax
movl %eax, 0x2c(%rsp)
leal 0x2(%r15), %eax
movl %eax, 0x14(%rsp)
movq 0x58(%rsp), %rbp
leal 0x1(%rbp), %eax
movl %eax, 0x10(%rsp)
movl 0x68(%rsp), %eax
movq %rax, 0x88(%rsp)
movb $0x1, %sil
movq %r15, 0x70(%rsp)
movq %r13, 0x80(%rsp)
testq %r13, %r13
setne %al
cmpq %r13, %r12
setne %cl
testb %cl, %al
jne 0x475e80
cmpq $0x0, 0x48(%r12)
movzbl %sil, %esi
movl $0x0, %eax
cmovel %eax, %esi
movzwl 0x63(%r12), %eax
testb $0x20, 0x40(%rdx)
movl %esi, 0x48(%rsp)
je 0x475976
movl %eax, %ecx
andl $0x3, %ecx
cmpw $0x2, %cx
jne 0x475976
movzwl 0x5e(%r12), %r14d
movq (%rdx), %r13
jmp 0x475984
movzwl 0x60(%r12), %r14d
movq (%r12), %r13
testb $0x8, %al
jne 0x475989
movl %r14d, %r15d
jmp 0x47598f
movzwl 0x5e(%r12), %r15d
movq %rbx, %rdi
movl $0x6a, %esi
xorl %edx, %edx
movl 0x44(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl %eax, %esi
movq %r13, %rdx
xorl %ecx, %ecx
callq 0x40e765
movq 0x50(%rsp), %r13
movl 0x38(%r13), %eax
movq 0x68(%rsp), %rcx
movq %r15, %rbp
addl %r15d, %ecx
decl %ecx
cmpl %ecx, %eax
cmovgl %eax, %ecx
movl %ecx, 0x38(%r13)
movl 0x58(%r12), %ecx
movq %rbx, %rdi
movl $0x6d, %esi
movl 0x10(%rsp), %edx
movl 0x78(%rsp), %r8d
callq 0x43a65f
movq %r13, %rdi
movq %r12, %rsi
callq 0x44e011
movq %rbx, %rdi
movl $0x46, %esi
movl %r14d, %edx
movl 0x14(%rsp), %r14d
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movzwl 0x5e(%r12), %edx
movq %rbx, %rdi
movl $0x46, %esi
movl 0xc(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x3f, %esi
xorl %edx, %edx
movl %r14d, %ecx
movl 0x2c(%rsp), %r8d
callq 0x43a65f
movq %rbx, %rdi
movl %eax, %esi
leaq 0x128bcf(%rip), %rdx    # 0x59e620
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
callq 0x40e765
movslq 0xb8(%rbx), %rax
testq %rax, %rax
jle 0x475a76
movq 0x68(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movw $0x2, -0x16(%rcx,%rax,8)
movq %rbx, %rdi
movl $0x24, %esi
movl 0x10(%rsp), %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movl %eax, 0x7c(%rsp)
movq %rbx, %rdi
movl $0x46, %esi
xorl %edx, %edx
movl 0x14(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
cmpl $0x2, %ebp
movq 0x80(%rsp), %r13
movq 0x70(%rsp), %r15
movq %r12, 0x30(%rsp)
jb 0x475d07
decl %ebp
movq 0x18(%rbx), %rdi
callq 0x44fbb5
movl %eax, 0x24(%rsp)
movl %ebp, %r12d
leaq (,%r12,4), %rsi
movq 0x60(%rsp), %rdi
callq 0x415fb1
testq %rax, %rax
je 0x475e90
movq %rax, %r14
movq %rbx, %rdi
movl $0xb, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movl 0xb8(%rbx), %eax
movl %eax, 0x3c(%rsp)
movq %rbp, 0x90(%rsp)
cmpl $0x1, %ebp
jne 0x475b4c
movq 0x30(%rsp), %rax
cmpw $0x1, 0x5e(%rax)
jne 0x475b4c
movq 0x30(%rsp), %rax
cmpb $0x0, 0x62(%rax)
je 0x475b4c
movq %rbx, %rdi
movl $0x33, %esi
movq 0x68(%rsp), %rdx
movl 0x24(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
xorl %r13d, %r13d
movq 0x30(%rsp), %rax
movq 0x40(%rax), %rax
movq (%rax,%r13,8), %rsi
movq 0x50(%rsp), %rdi
callq 0x44e205
movq %rax, %r15
movq %rbx, %rdi
movl $0x46, %esi
movl %r13d, %edx
movl 0x14(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x5a, %esi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
movl 0xc(%rsp), %ebp
movl %ebp, %r8d
callq 0x43a65f
movq 0x88(%rsp), %rax
leal (%rax,%r13), %r8d
movq %rbx, %rdi
movl $0x34, %esi
movl %ebp, %edx
xorl %ecx, %ecx
callq 0x43a65f
movl %eax, %ebp
movq %rbx, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
callq 0x40e765
movl %ebp, (%r14,%r13,4)
movslq 0xb8(%rbx), %rax
testq %rax, %rax
jle 0x475beb
movq 0x68(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movw $0x80, -0x16(%rcx,%rax,8)
incq %r13
cmpq %r13, %r12
jne 0x475b4f
movq %rbx, %rdi
movl $0x46, %esi
movq 0x90(%rsp), %r15
movl %r15d, %edx
movl 0x14(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0xb, %esi
xorl %edx, %edx
movl 0x24(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movl 0xb8(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
leaq 0x12f1c8(%rip), %rcx    # 0x5a4e08
jne 0x475c5e
movl 0x3c(%rsp), %ecx
testl %ecx, %ecx
cmovlel %eax, %ecx
movq 0x68(%rbx), %rdx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
leaq (%rdx,%rcx,8), %rcx
addq $-0x18, %rcx
movl %eax, 0x8(%rcx)
cmpl $0x2, %r15d
movl $0x1, %eax
cmovll %eax, %r15d
xorl %r13d, %r13d
movl 0xb8(%rbx), %eax
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
leaq 0x12f183(%rip), %rcx    # 0x5a4e08
jne 0x475ca2
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 0x68(%rbx), %rcx
movl %eax, 0x8(%rcx)
movq 0x88(%rsp), %rax
leal (%rax,%r13), %r8d
movq %rbx, %rdi
movl $0x5a, %esi
movl 0x10(%rsp), %edx
movl %r13d, %ecx
callq 0x43a65f
incq %r13
cmpq %r13, %r15
jne 0x475c71
movq 0x18(%rbx), %rax
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x475cec
movl 0x24(%rsp), %edx
notl %edx
movl 0xb8(%rbx), %ecx
movslq %edx, %rdx
movl %ecx, (%rax,%rdx,4)
movq 0x60(%rsp), %rdi
movq %r14, %rsi
callq 0x415f0a
movq 0x80(%rsp), %r13
movl 0x3c(%rsp), %ebp
jmp 0x475d0d
movl 0xb8(%rbx), %ebp
movq %rbx, %rdi
movl $0x3f, %esi
movl $0x1, %edx
movl 0x2c(%rsp), %ecx
movl 0xc(%rsp), %r8d
callq 0x43a65f
movq %rbx, %rdi
movl %eax, %esi
leaq 0x128934(%rip), %rdx    # 0x59e668
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
callq 0x40e765
movslq 0xb8(%rbx), %rax
testq %rax, %rax
jle 0x475d59
movq 0x68(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movw $0x2, -0x16(%rcx,%rax,8)
movq %rbx, %rdi
movl $0x5, %esi
movl 0x10(%rsp), %edx
movl %ebp, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x3f, %esi
xorl %edx, %edx
movl 0x2c(%rsp), %ecx
movl 0x40(%rsp), %r8d
callq 0x43a65f
movq %rbx, %rdi
movl %eax, %esi
leaq 0x12891d(%rip), %rdx    # 0x59e6b0
movl $0xfffffff8, %ecx       # imm = 0xFFFFFFF8
callq 0x40e765
movslq 0xb8(%rbx), %rax
testq %rax, %rax
jle 0x475db8
movq 0x68(%rbx), %rcx
leaq (%rax,%rax,2), %rax
movw $0x1, -0x16(%rcx,%rax,8)
movq %rbx, %rdi
movl $0x66, %esi
movl 0x28(%rsp), %edx
movl $0x3, %ecx
movl 0xc(%rsp), %r14d
movl %r14d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl %eax, %esi
leaq 0xde12e(%rip), %rdx     # 0x553f10
xorl %ecx, %ecx
callq 0x40e765
movq %rbx, %rdi
movl $0x79, %esi
movl 0x4c(%rsp), %r12d
movl %r12d, %edx
movq 0x70(%rsp), %r15
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x7a, %esi
movl %r12d, %edx
movl %r14d, %ecx
movl %r15d, %r8d
callq 0x43a65f
movslq 0xb8(%rbx), %rax
testq %rax, %rax
jle 0x475e3a
movq 0x68(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movw $0x8, -0x16(%rcx,%rdx,8)
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
leaq 0x12efc0(%rip), %rcx    # 0x5a4e08
movq 0x18(%rsp), %rdx
movq 0x58(%rsp), %rbp
movq 0x30(%rsp), %r12
movl 0x48(%rsp), %esi
jne 0x475e78
leal -0x1(%rax), %ecx
movl 0x7c(%rsp), %edi
testl %edi, %edi
cmovnsl %edi, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x68(%rbx), %rcx
movl %eax, 0x8(%rcx)
movq 0x70(%rsp), %r15
movq 0x28(%r12), %r12
testq %r12, %r12
jne 0x47592a
jmp 0x475ea5
movq 0x58(%rsp), %rbp
movq 0x18(%rsp), %rdx
movq 0x30(%rsp), %r12
movl 0x48(%rsp), %esi
jmp 0x475e80
testb %sil, %sil
setne %al
jmp 0x475eaf
movb $0x1, %al
testq %r13, %r13
jne 0x475fb0
testb %al, %al
je 0x475fb0
movq %rbx, %rdi
movl $0x68, %esi
movl %ebp, %edx
movl 0x40(%rsp), %r14d
movl %r14d, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x14, %esi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movl 0x4c(%rsp), %r14d
movl %eax, %ebp
movq %rbx, %rdi
movl $0x49, %esi
xorl %edx, %edx
movl 0x44(%rsp), %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x66, %esi
movl 0x28(%rsp), %edx
movl $0x3, %ecx
movl 0xc(%rsp), %r12d
movl %r12d, %r8d
callq 0x43a65f
leaq 0xddfdf(%rip), %rdx     # 0x553f10
movq %rbx, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x40e765
movq %rbx, %rdi
movl $0x79, %esi
movl %r14d, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x43a65f
movq %rbx, %rdi
movl $0x7a, %esi
movl %r14d, %edx
movl %r12d, %ecx
movl %r15d, %r8d
callq 0x43a65f
movslq 0xb8(%rbx), %rax
testq %rax, %rax
jle 0x475f84
movq 0x68(%rbx), %rcx
leaq (%rax,%rax,2), %rdx
movw $0x8, -0x16(%rcx,%rdx,8)
movq (%rbx), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x475f96
leaq 0x12ee74(%rip), %rcx    # 0x5a4e08
jmp 0x475fad
leal -0x1(%rax), %ecx
testl %ebp, %ebp
cmovnsl %ebp, %ecx
movslq %ecx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x3, %rcx
addq 0x68(%rbx), %rcx
movl %eax, 0x8(%rcx)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq