// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/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 */
){
  sqlite3 *db = pParse->db;    /* Database handle */
  Index *pIdx;                 /* An index to being analyzed */
  int iIdxCur;                 /* Cursor open on index being analyzed */
  Vdbe *v;                     /* The virtual machine being built up */
  int i;                       /* Loop counter */
  int topOfLoop;               /* The top of the loop */
  int endOfLoop;               /* The end of the loop */
  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 regTabname = iMem++;     /* Register containing table name */
  int regIdxname = iMem++;     /* Register containing index name */
  int regStat1 = iMem++;       /* The stat column of sqlite_stat1 */
#ifdef SQLITE_ENABLE_STAT3
  int regNumEq = regStat1;     /* Number of instances.  Same as regStat1 */
  int regNumLt = iMem++;       /* Number of keys less than regSample */
  int regNumDLt = iMem++;      /* Number of distinct keys less than regSample */
  int regSample = iMem++;      /* The next sample value */
  int regRowid = regSample;    /* Rowid of a sample */
  int regAccum = iMem++;       /* Register to hold Stat3Accum object */
  int regLoop = iMem++;        /* Loop counter */
  int regCount = iMem++;       /* Number of rows in the table or index */
  int regTemp1 = iMem++;       /* Intermediate register */
  int regTemp2 = iMem++;       /* Intermediate register */
  int once = 1;                /* One-time initialization */
  int shortJump = 0;           /* Instruction address */
  int iTabCur = pParse->nTab++; /* Table cursor */
#endif
  int regCol = iMem++;         /* Content of a column in analyzed table */
  int regRec = iMem++;         /* Register holding completed record */
  int regTemp = iMem++;        /* Temporary use register */
  int regNewRowid = iMem++;    /* Rowid for the inserted record */


  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_strnicmp(pTab->zName, "sqlite_", 7)==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].zName ) ){
    return;
  }
#endif

  /* Establish a read-lock on the table at the shared-cache level. */
  sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);

  iIdxCur = pParse->nTab++;
  sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
    int nCol;
    KeyInfo *pKey;
    int addrIfNot = 0;           /* address of OP_IfNot */
    int *aChngAddr;              /* Array of jump instruction addresses */

    if( pOnlyIdx && pOnlyIdx!=pIdx ) continue;
    if( pIdx->pPartIdxWhere==0 ) needTableCnt = 0;
    VdbeNoopComment((v, "Begin analysis of %s", pIdx->zName));
    nCol = pIdx->nColumn;
    aChngAddr = sqlite3DbMallocRaw(db, sizeof(int)*nCol);
    if( aChngAddr==0 ) continue;
    pKey = sqlite3IndexKeyinfo(pParse, pIdx);
    if( iMem+1+(nCol*2)>pParse->nMem ){
      pParse->nMem = iMem+1+(nCol*2);
    }

    /* Open a cursor to the index to be analyzed. */
    assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) );
    sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIdx->tnum, iDb,
        (char *)pKey, P4_KEYINFO_HANDOFF);
    VdbeComment((v, "%s", pIdx->zName));

    /* Populate the register containing the index name. */
    sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, pIdx->zName, 0);

#ifdef SQLITE_ENABLE_STAT3
    if( once ){
      once = 0;
      sqlite3OpenTable(pParse, iTabCur, iDb, pTab, OP_OpenRead);
    }
    sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regCount);
    sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_STAT3_SAMPLES, regTemp1);
    sqlite3VdbeAddOp2(v, OP_Integer, 0, regNumEq);
    sqlite3VdbeAddOp2(v, OP_Integer, 0, regNumLt);
    sqlite3VdbeAddOp2(v, OP_Integer, -1, regNumDLt);
    sqlite3VdbeAddOp3(v, OP_Null, 0, regSample, regAccum);
    sqlite3VdbeAddOp4(v, OP_Function, 1, regCount, regAccum,
                      (char*)&stat3InitFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 2);
#endif /* SQLITE_ENABLE_STAT3 */

    /* The block of memory cells initialized here is used as follows.
    **
    **    iMem:                
    **        The total number of rows in the table.
    **
    **    iMem+1 .. iMem+nCol: 
    **        Number of distinct entries in index considering the 
    **        left-most N columns only, where N is between 1 and nCol, 
    **        inclusive.
    **
    **    iMem+nCol+1 .. Mem+2*nCol:  
    **        Previous value of indexed columns, from left to right.
    **
    ** Cells iMem through iMem+nCol are initialized to 0. The others are 
    ** initialized to contain an SQL NULL.
    */
    for(i=0; i<=nCol; i++){
      sqlite3VdbeAddOp2(v, OP_Integer, 0, iMem+i);
    }
    for(i=0; i<nCol; i++){
      sqlite3VdbeAddOp2(v, OP_Null, 0, iMem+nCol+i+1);
    }

    /* Start the analysis loop. This loop runs through all the entries in
    ** the index b-tree.  */
    endOfLoop = sqlite3VdbeMakeLabel(v);
    sqlite3VdbeAddOp2(v, OP_Rewind, iIdxCur, endOfLoop);
    topOfLoop = sqlite3VdbeCurrentAddr(v);
    sqlite3VdbeAddOp2(v, OP_AddImm, iMem, 1);  /* Increment row counter */

    for(i=0; i<nCol; i++){
      CollSeq *pColl;
      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regCol);
      if( i==0 ){
        /* Always record the very first row */
        addrIfNot = sqlite3VdbeAddOp1(v, OP_IfNot, iMem+1);
      }
      assert( pIdx->azColl!=0 );
      assert( pIdx->azColl[i]!=0 );
      pColl = sqlite3LocateCollSeq(pParse, pIdx->azColl[i]);
      aChngAddr[i] = sqlite3VdbeAddOp4(v, OP_Ne, regCol, 0, iMem+nCol+i+1,
                                      (char*)pColl, P4_COLLSEQ);
      sqlite3VdbeChangeP5(v, SQLITE_NULLEQ);
      VdbeComment((v, "jump if column %d changed", i));
#ifdef SQLITE_ENABLE_STAT3
      if( i==0 ){
        sqlite3VdbeAddOp2(v, OP_AddImm, regNumEq, 1);
        VdbeComment((v, "incr repeat count"));
      }
#endif
    }
    sqlite3VdbeAddOp2(v, OP_Goto, 0, endOfLoop);
    for(i=0; i<nCol; i++){
      sqlite3VdbeJumpHere(v, aChngAddr[i]);  /* Set jump dest for the OP_Ne */
      if( i==0 ){
        sqlite3VdbeJumpHere(v, addrIfNot);   /* Jump dest for OP_IfNot */
#ifdef SQLITE_ENABLE_STAT3
        sqlite3VdbeAddOp4(v, OP_Function, 1, regNumEq, regTemp2,
                          (char*)&stat3PushFuncdef, P4_FUNCDEF);
        sqlite3VdbeChangeP5(v, 5);
        sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, pIdx->nColumn, regRowid);
        sqlite3VdbeAddOp3(v, OP_Add, regNumEq, regNumLt, regNumLt);
        sqlite3VdbeAddOp2(v, OP_AddImm, regNumDLt, 1);
        sqlite3VdbeAddOp2(v, OP_Integer, 1, regNumEq);
#endif        
      }
      sqlite3VdbeAddOp2(v, OP_AddImm, iMem+i+1, 1);
      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, iMem+nCol+i+1);
    }
    sqlite3DbFree(db, aChngAddr);

    /* Always jump here after updating the iMem+1...iMem+1+nCol counters */
    sqlite3VdbeResolveLabel(v, endOfLoop);

    sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, topOfLoop);
    sqlite3VdbeAddOp1(v, OP_Close, iIdxCur);
#ifdef SQLITE_ENABLE_STAT3
    sqlite3VdbeAddOp4(v, OP_Function, 1, regNumEq, regTemp2,
                      (char*)&stat3PushFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 5);
    sqlite3VdbeAddOp2(v, OP_Integer, -1, regLoop);
    shortJump = 
    sqlite3VdbeAddOp2(v, OP_AddImm, regLoop, 1);
    sqlite3VdbeAddOp4(v, OP_Function, 1, regAccum, regTemp1,
                      (char*)&stat3GetFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 2);
    sqlite3VdbeAddOp1(v, OP_IsNull, regTemp1);
    sqlite3VdbeAddOp3(v, OP_NotExists, iTabCur, shortJump, regTemp1);
    sqlite3VdbeAddOp3(v, OP_Column, iTabCur, pIdx->aiColumn[0], regSample);
    sqlite3ColumnDefault(v, pTab, pIdx->aiColumn[0], regSample);
    sqlite3VdbeAddOp4(v, OP_Function, 1, regAccum, regNumEq,
                      (char*)&stat3GetFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 3);
    sqlite3VdbeAddOp4(v, OP_Function, 1, regAccum, regNumLt,
                      (char*)&stat3GetFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 4);
    sqlite3VdbeAddOp4(v, OP_Function, 1, regAccum, regNumDLt,
                      (char*)&stat3GetFuncdef, P4_FUNCDEF);
    sqlite3VdbeChangeP5(v, 5);
    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 6, regRec, "bbbbbb", 0);
    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regNewRowid);
    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regRec, regNewRowid);
    sqlite3VdbeAddOp2(v, OP_Goto, 0, shortJump);
    sqlite3VdbeJumpHere(v, shortJump+2);
#endif        

    /* Store the results in sqlite_stat1.
    **
    ** The result is a single row of the sqlite_stat1 table.  The first
    ** two columns are the names of the table and index.  The third column
    ** is a string composed of a list of integer statistics about the
    ** index.  The first integer in the list is the total number of entries
    ** in the index.  There is one additional integer in the list for each
    ** column of the table.  This additional integer is a guess of how many
    ** rows of the table the index will select.  If D is the count of distinct
    ** values and K is the total number of rows, then the integer is computed
    ** as:
    **
    **        I = (K+D-1)/D
    **
    ** If K==0 then no entry is made into the sqlite_stat1 table.  
    ** If K>0 then it is always the case the D>0 so division by zero
    ** is never possible.
    */
    sqlite3VdbeAddOp2(v, OP_SCopy, iMem, regStat1);
    jZeroRows = sqlite3VdbeAddOp1(v, OP_IfNot, iMem);
    for(i=0; i<nCol; i++){
      sqlite3VdbeAddOp4(v, OP_String8, 0, regTemp, 0, " ", 0);
      sqlite3VdbeAddOp3(v, OP_Concat, regTemp, regStat1, regStat1);
      sqlite3VdbeAddOp3(v, OP_Add, iMem, iMem+i+1, regTemp);
      sqlite3VdbeAddOp2(v, OP_AddImm, regTemp, -1);
      sqlite3VdbeAddOp3(v, OP_Divide, iMem+i+1, regTemp, regTemp);
      sqlite3VdbeAddOp1(v, OP_ToInt, regTemp);
      sqlite3VdbeAddOp3(v, OP_Concat, regTemp, regStat1, regStat1);
    }
    if( pIdx->pPartIdxWhere!=0 ) sqlite3VdbeJumpHere(v, jZeroRows);
    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regRec, "aaa", 0);
    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regRec, regNewRowid);
    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    if( pIdx->pPartIdxWhere==0 ) sqlite3VdbeJumpHere(v, jZeroRows);
  }

  /* Create a single sqlite_stat1 entry containing NULL as the index
  ** name and the row count as the content.
  */
  if( pOnlyIdx==0 && needTableCnt ){
    sqlite3VdbeAddOp3(v, OP_OpenRead, iIdxCur, pTab->tnum, iDb);
    VdbeComment((v, "%s", pTab->zName));
    sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regStat1);
    sqlite3VdbeAddOp1(v, OP_Close, iIdxCur);
    jZeroRows = sqlite3VdbeAddOp1(v, OP_IfNot, regStat1);
    sqlite3VdbeAddOp2(v, OP_Null, 0, regIdxname);
    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regRec, "aaa", 0);
    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regNewRowid);
    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regRec, regNewRowid);
    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
    sqlite3VdbeJumpHere(v, jZeroRows);
  }
  if( pParse->nMem<regRec ) pParse->nMem = regRec;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movl %r8d, %r15d
movl %ecx, %ebx
movq %rdx, %r13
movq %rsi, %r12
movq (%rdi), %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x40(%rbp)
callq 0x45ece
movq %rax, %r14
testq %rax, %rax
sete %al
testq %r12, %r12
sete %cl
orb %al, %cl
jne 0x62f56
cmpl $0x0, 0x3c(%r12)
je 0x62f56
leal 0x1(%r15), %eax
movl %eax, -0x7c(%rbp)
leal 0x2(%r15), %r9d
leal 0x3(%r15), %eax
movl %eax, -0x88(%rbp)
leal 0x4(%r15), %eax
movl %eax, -0x2c(%rbp)
leal 0x5(%r15), %r10d
leal 0x6(%r15), %eax
movl %eax, -0x80(%rbp)
leal 0x7(%r15), %r11d
movq (%r12), %rdx
xorl %ecx, %ecx
leaq 0x1398c(%rip), %rax     # 0x760b0
leaq 0x186c1(%rip), %rsi     # 0x7adec
movzbl (%rdx,%rcx), %edi
testq %rdi, %rdi
je 0x62754
movzbl (%rdi,%rax), %edi
movzbl (%rcx,%rsi), %r8d
movb (%r8,%rax), %r8b
cmpb %r8b, %dil
jne 0x6275e
incq %rcx
cmpq $0x7, %rcx
jne 0x6272b
jmp 0x62f56
movzbl (%rcx,%rsi), %ecx
movb (%rcx,%rax), %r8b
xorl %edi, %edi
movzbl %r8b, %eax
cmpl %eax, %edi
je 0x62f56
movq 0x68(%r12), %rax
testq %rax, %rax
movl %r9d, -0x78(%rbp)
movl %r10d, -0xa4(%rbp)
movl %r11d, -0x44(%rbp)
je 0x627af
movq -0x58(%rbp), %rdi
movl 0x28(%rdi), %ecx
testl %ecx, %ecx
jle 0x627bb
movq 0x20(%rdi), %rsi
addq $0x18, %rsi
xorl %r8d, %r8d
cmpq %rax, (%rsi)
je 0x627be
incq %r8
addq $0x20, %rsi
cmpq %r8, %rcx
jne 0x62799
movl %ecx, %r8d
jmp 0x627be
movl $0xfff0bdc0, %r8d       # imm = 0xFFF0BDC0
movq -0x58(%rbp), %rdi
jmp 0x627be
xorl %r8d, %r8d
movq %r8, -0x50(%rbp)
movq 0x20(%rdi), %rax
movslq %r8d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r8
movq -0x40(%rbp), %rdi
movl $0x1c, %esi
xorl %ecx, %ecx
callq 0x460eb
testl %eax, %eax
jne 0x62f56
movl %ebx, -0x74(%rbp)
movl 0x3c(%r12), %edx
movq (%r12), %r8
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq -0x50(%rbp), %rsi
xorl %ecx, %ecx
callq 0x46018
movl 0x54(%rbx), %eax
movq %rax, -0x68(%rbp)
incl %eax
movl %eax, 0x54(%rbx)
movq %r15, %rbx
movq (%r12), %r15
movq %r14, %rdi
movl $0x5e, %esi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x11a9f
movq 0x10(%r12), %rax
testq %rax, %rax
movq %rbx, -0x98(%rbp)
je 0x62e25
movq %rax, %r15
leal 0x8(%rbx), %eax
movq %rax, -0x70(%rbp)
movl %ebx, %eax
movq %rax, -0xc0(%rbp)
movb $0x1, %dl
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %r8
movq %r12, -0x90(%rbp)
movq %r13, -0xb8(%rbp)
testq %r13, %r13
setne %al
cmpq %r13, %r15
setne %cl
testb %cl, %al
jne 0x62e11
cmpq $0x0, 0x48(%r15)
movzbl %dl, %edx
movl $0x0, %eax
cmovel %eax, %edx
movl %edx, -0x30(%rbp)
movzwl 0x54(%r15), %ebx
leal (,%rbx,4), %esi
callq 0x11721
movq %rax, -0x60(%rbp)
testq %rax, %rax
je 0x62b9d
movq -0x40(%rbp), %r12
movq %r12, %rdi
movq %r15, -0xa0(%rbp)
movq %r15, %rsi
callq 0x4c2fa
movq %rax, %r15
movq -0x70(%rbp), %rax
leal (%rax,%rbx,2), %eax
cmpl 0x58(%r12), %eax
jle 0x628f0
movq -0x40(%rbp), %rcx
movl %eax, 0x58(%rcx)
movq -0xa0(%rbp), %r12
movl 0x50(%r12), %ecx
movq %r14, %rdi
movl $0x30, %esi
movq -0x68(%rbp), %rdx
movq -0x50(%rbp), %r8
callq 0x45f15
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xfffffff0, %ecx       # imm = 0xFFFFFFF0
callq 0x11a9f
movq (%r12), %r15
movq %r14, %rdi
movl $0x5e, %esi
xorl %edx, %edx
movl -0x7c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x11a9f
movl %ebx, %r15d
negl %r15d
movl $0x7, %r12d
movq -0x98(%rbp), %r13
leal (%r12,%r13), %ecx
movq %r14, %rdi
movl $0x15, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x45f15
leal (%r15,%r12), %eax
incl %eax
movl %r12d, %ecx
incl %ecx
movl %ecx, %r12d
cmpl $0x8, %eax
jne 0x6295e
testq %rbx, %rbx
je 0x629b4
movq -0x70(%rbp), %rax
leal (%rax,%rbx), %r15d
movl %ebx, %r12d
movq %r14, %rdi
movl $0x18, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45f15
incl %r15d
decl %r12d
jne 0x62997
movq %r14, %rdi
callq 0x4c5eb
movl %eax, %r15d
movq %r14, %rdi
movl $0x65, %esi
movq -0x68(%rbp), %rdx
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl 0x34(%r14), %eax
movl %eax, -0xa8(%rbp)
movq %r14, %rdi
movl $0x20, %esi
movl -0x44(%rbp), %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x45f15
testq %rbx, %rbx
movl -0x88(%rbp), %r13d
movl %r15d, -0x84(%rbp)
je 0x62baa
movq -0x70(%rbp), %rax
addl %ebx, %eax
movq %rax, -0xb0(%rbp)
xorl %r15d, %r15d
movl $0x0, -0x34(%rbp)
movq %r14, %rdi
movl $0x29, %esi
movq -0x68(%rbp), %rdx
movl %r15d, %ecx
movl %r13d, %r8d
callq 0x45f15
testq %r15, %r15
jne 0x62a5a
movq %r14, %rdi
movl $0x28, %esi
movq -0x70(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0x34(%rbp)
movq -0xa0(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax,%r15,8), %rsi
movq -0x40(%rbp), %rdi
callq 0x4bd86
movq %rax, %r12
movq -0xb0(%rbp), %rax
leal (%rax,%r15), %r8d
movq %r14, %rdi
movl $0x4b, %esi
movl %r13d, %edx
xorl %ecx, %ecx
callq 0x45f15
movl %eax, %r13d
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
movl $0xfffffffc, %ecx       # imm = 0xFFFFFFFC
callq 0x11a9f
movq -0x60(%rbp), %rax
movl %r13d, (%rax,%r15,4)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x62ac5
movslq 0x34(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $-0x80, -0x15(%rax,%rcx,8)
incq %r15
cmpq %r15, %rbx
movl -0x88(%rbp), %r13d
jne 0x62a25
movq %r14, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl -0x84(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
testq %rbx, %rbx
je 0x62bbf
movl -0x34(%rbp), %r12d
movl %ebx, %r13d
xorl %r15d, %r15d
movq -0x60(%rbp), %rax
movslq (%rax,%r15,4), %rax
testq %rax, %rax
js 0x62b24
movl 0x34(%r14), %ecx
cmpl %eax, %ecx
jbe 0x62b24
movq 0x8(%r14), %rdx
leaq (%rax,%rax,2), %rax
movl %ecx, 0x8(%rdx,%rax,8)
cmpl $0x0, -0x34(%rbp)
setns %al
testq %r15, %r15
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x62b4d
movl 0x34(%r14), %eax
cmpl -0x34(%rbp), %eax
jbe 0x62b4d
movq 0x8(%r14), %rcx
leaq (%r12,%r12,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
movq -0xc0(%rbp), %rax
leal (%rax,%r15), %edx
addl $0x8, %edx
movq %r14, %rdi
movl $0x20, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0xb0(%rbp), %rax
leal (%rax,%r15), %r8d
movq %r14, %rdi
movl $0x29, %esi
movq -0x68(%rbp), %rdx
movl %r15d, %ecx
callq 0x45f15
incq %r15
cmpq %r15, %r13
jne 0x62b03
jmp 0x62bbf
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %r8
jmp 0x62e0e
movq %r14, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x9ca4
movl -0x84(%rbp), %edx
testl %edx, %edx
jns 0x62bea
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x62bea
notl %edx
movl 0x34(%r14), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq %r14, %rdi
movl $0x7, %esi
movq -0x68(%rbp), %r15
movl %r15d, %edx
movl -0xa8(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x36, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x1d, %esi
movl -0x44(%rbp), %r15d
movl %r15d, %edx
movl -0x78(%rbp), %r13d
movl %r13d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x28, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, -0x60(%rbp)
testl %ebx, %ebx
movl -0xa4(%rbp), %r12d
je 0x62d20
movq -0x70(%rbp), %rax
movl %eax, %r15d
movq %r14, %rdi
movl $0x5e, %esi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl %eax, %esi
leaq 0x186c9(%rip), %rdx     # 0x7b352
xorl %ecx, %ecx
callq 0x11a9f
movq %r14, %rdi
movl $0x5b, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r13d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x56, %esi
movl -0x44(%rbp), %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x20, %esi
movl %r12d, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x59, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r12d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x90, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x5b, %esi
movl %r12d, %edx
movl %r13d, %ecx
movl %r13d, %r8d
callq 0x45f15
incl %r15d
decl %ebx
jne 0x62c68
movq -0xa0(%rbp), %r15
cmpq $0x0, 0x48(%r15)
setne %al
movl -0x60(%rbp), %edx
testl %edx, %edx
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x62d54
movl 0x34(%r14), %eax
cmpl %edx, %eax
jbe 0x62d54
movq 0x8(%r14), %rcx
movl %edx, %edx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
movq %r14, %rdi
movl $0x2b, %esi
movq -0x98(%rbp), %rdx
movl $0x3, %ecx
movl -0x2c(%rbp), %ebx
movl %ebx, %r8d
callq 0x45f15
movq %r14, %rdi
movl %eax, %esi
leaq 0x19af5(%rip), %rdx     # 0x7c874
xorl %ecx, %ecx
callq 0x11a9f
movq %r14, %rdi
movl $0x41, %esi
movl -0x74(%rbp), %r13d
movl %r13d, %edx
movl -0x80(%rbp), %r12d
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x42, %esi
movl %r13d, %edx
movl %ebx, %ecx
movl %r12d, %r8d
callq 0x45f15
movq 0x8(%r14), %rax
testq %rax, %rax
movq -0xb8(%rbp), %r13
je 0x62dd6
movslq 0x34(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x8, -0x15(%rax,%rcx,8)
movl -0x60(%rbp), %esi
testl %esi, %esi
setns %cl
cmpq $0x0, 0x48(%r15)
sete %dl
andb %cl, %dl
cmpb $0x1, %dl
movq -0x58(%rbp), %rdi
movq -0x50(%rbp), %r8
jne 0x62e07
movl 0x34(%r14), %ecx
cmpl %esi, %ecx
jbe 0x62e07
movl %esi, %edx
leaq (%rdx,%rdx,2), %rdx
movl %ecx, 0x8(%rax,%rdx,8)
movq -0x90(%rbp), %r12
movl -0x30(%rbp), %edx
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x6287d
testb %dl, %dl
setne %al
jmp 0x62e2b
movb $0x1, %al
movq -0x50(%rbp), %r8
testq %r13, %r13
jne 0x62f40
testb %al, %al
je 0x62f40
movl 0x3c(%r12), %ecx
movq %r14, %rdi
movl $0x30, %esi
movq -0x68(%rbp), %r12
movl %r12d, %edx
callq 0x45f15
movq %r14, %rdi
movl $0x2c, %esi
movl %r12d, %edx
movl -0x78(%rbp), %ebx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x36, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x28, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45f15
movl %eax, %ebx
movq %r14, %rdi
movl $0x18, %esi
xorl %edx, %edx
movl -0x7c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x2b, %esi
movq -0x98(%rbp), %rdx
movl $0x3, %ecx
movl -0x2c(%rbp), %r15d
movl %r15d, %r8d
callq 0x45f15
leaq 0x199a0(%rip), %rdx     # 0x7c874
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x11a9f
movq %r14, %rdi
movl $0x41, %esi
movl -0x74(%rbp), %r13d
movl %r13d, %edx
movl -0x80(%rbp), %r12d
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45f15
movq %r14, %rdi
movl $0x42, %esi
movl %r13d, %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x45f15
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x62f2a
movslq 0x34(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x8, -0x15(%rax,%rcx,8)
testl %ebx, %ebx
js 0x62f40
movl 0x34(%r14), %ecx
cmpl %ebx, %ecx
jbe 0x62f40
movl %ebx, %edx
leaq (%rdx,%rdx,2), %rdx
movl %ecx, 0x8(%rax,%rdx,8)
movq -0x40(%rbp), %rax
movl -0x2c(%rbp), %ecx
cmpl %ecx, 0x58(%rax)
jge 0x62f56
movq -0x40(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl %ecx, 0x58(%rax)
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq