// File: /workspace/github_c_makefile_star2_O1/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 $0x88, %rsp
movl %r8d, %r12d
movl %ecx, -0x74(%rbp)
movq %rdx, -0xb0(%rbp)
movq %rsi, %rbx
movq (%rdi), %rax
movq %rax, -0x58(%rbp)
movq %rdi, -0x40(%rbp)
callq 0x45b57
movq %rax, %r14
testq %rax, %rax
sete %al
testq %rbx, %rbx
sete %cl
orb %al, %cl
jne 0x6308f
cmpl $0x0, 0x3c(%rbx)
je 0x6308f
leal 0x1(%r12), %eax
movl %eax, -0x6c(%rbp)
leal 0x2(%r12), %eax
movl %eax, -0x2c(%rbp)
leal 0x3(%r12), %eax
movl %eax, -0x78(%rbp)
leal 0x4(%r12), %eax
movl %eax, -0x34(%rbp)
leal 0x5(%r12), %r15d
leal 0x6(%r12), %eax
movl %eax, -0x70(%rbp)
leal 0x7(%r12), %eax
movl %eax, -0x50(%rbp)
movq %rbx, -0x88(%rbp)
movq (%rbx), %rdx
leaq 0x7(%rdx), %r9
movl $0x7, %ecx
leaq 0x1858c(%rip), %r8      # 0x7adec
xorl %r10d, %r10d
leaq 0x137f6(%rip), %rax     # 0x76060
leaq 0x18582(%rip), %rdi     # 0x7adf3
movq %r8, %r11
movq %rdx, %rsi
movzbl (%rsi), %ebx
testq %rbx, %rbx
je 0x628a7
movl %r15d, %r13d
movb (%rbx,%rax), %bl
movzbl (%r11), %r15d
cmpb (%r15,%rax), %bl
jne 0x628b6
incq %rsi
incq %r10
incq %r11
decq %rcx
movl %r13d, %r15d
jne 0x62877
xorl %ecx, %ecx
movq %r9, %rsi
jmp 0x628ad
addq %r10, %r8
movq %r8, %rdi
movq -0x88(%rbp), %rbx
jmp 0x628c3
movq %r11, %rdi
movq -0x88(%rbp), %rbx
movl %r13d, %r15d
testl %ecx, %ecx
jle 0x6308f
movzbl (%rsi), %ecx
movb (%rcx,%rax), %cl
movzbl (%rdi), %esi
cmpb (%rsi,%rax), %cl
je 0x6308f
movq 0x68(%rbx), %rax
testq %rax, %rax
je 0x62912
movq -0x58(%rbp), %rdi
movl 0x28(%rdi), %ecx
testl %ecx, %ecx
jle 0x6291e
movq 0x20(%rdi), %rsi
addq $0x18, %rsi
xorl %r13d, %r13d
cmpq %rax, (%rsi)
je 0x62921
incq %r13
addq $0x20, %rsi
cmpq %r13, %rcx
jne 0x628fc
movl %ecx, %r13d
jmp 0x62921
movl $0xfff0bdc0, %r13d      # imm = 0xFFF0BDC0
movq -0x58(%rbp), %rdi
jmp 0x62921
xorl %r13d, %r13d
movq 0x20(%rdi), %rax
movslq %r13d, %rcx
shlq $0x5, %rcx
movq (%rax,%rcx), %r8
movq -0x40(%rbp), %rdi
movl $0x1c, %esi
xorl %ecx, %ecx
callq 0x45d75
testl %eax, %eax
jne 0x6308f
movl %r15d, -0xa4(%rbp)
movl 0x3c(%rbx), %edx
movq (%rbx), %r8
movq %rbx, %r15
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movl %r13d, %esi
xorl %ecx, %ecx
callq 0x45c9b
movl 0x54(%rbx), %eax
movq %rax, -0x68(%rbp)
incl %eax
movl %eax, 0x54(%rbx)
movq (%r15), %rbx
movq %r14, %rdi
movl $0x5e, %esi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x11975
movq 0x10(%r15), %r15
testq %r15, %r15
je 0x62f59
leal 0x8(%r12), %eax
movq %rax, -0x48(%rbp)
movb $0x1, %dl
movl -0x2c(%rbp), %ebx
movq -0x58(%rbp), %rdi
movq %r12, -0x80(%rbp)
movq %r13, -0x98(%rbp)
movq -0xb0(%rbp), %rcx
testq %rcx, %rcx
setne %al
cmpq %rcx, %r15
setne %cl
testb %cl, %al
jne 0x62f45
cmpq $0x0, 0x48(%r15)
movzbl %dl, %edx
movl $0x0, %eax
cmovel %eax, %edx
movl %edx, -0x38(%rbp)
movzwl 0x54(%r15), %r13d
leal (,%r13,4), %esi
callq 0x115e9
movq %rax, -0x60(%rbp)
testq %rax, %rax
je 0x62f2e
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r15, -0x90(%rbp)
movq %r15, %rsi
callq 0x4c1d4
movq %rax, %r15
movq -0x48(%rbp), %rax
leal (%rax,%r13,2), %eax
cmpl 0x58(%rbx), %eax
jle 0x62a40
movq -0x40(%rbp), %rcx
movl %eax, 0x58(%rcx)
movq -0x90(%rbp), %rbx
movl 0x50(%rbx), %ecx
movq %r14, %rdi
movl $0x30, %esi
movq -0x68(%rbp), %rdx
movq -0x98(%rbp), %r8
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
movl $0xfffffff0, %ecx       # imm = 0xFFFFFFF0
callq 0x11975
movq (%rbx), %r15
movq %r14, %rdi
movl $0x5e, %esi
xorl %edx, %edx
movl -0x6c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
movq %r15, %rdx
xorl %ecx, %ecx
callq 0x11975
movl %r13d, %ebx
negl %ebx
movl $0x7, %r15d
leal (%r12,%r15), %ecx
movq %r14, %rdi
movl $0x15, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x45b9e
leal (%rbx,%r15), %eax
incl %eax
movl %r15d, %ecx
incl %ecx
movl %ecx, %r15d
cmpl $0x8, %eax
jne 0x62aa6
testq %r13, %r13
je 0x62afb
movq -0x48(%rbp), %rax
leal (%rax,%r13), %r15d
movl %r13d, %ebx
movq %r14, %rdi
movl $0x18, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
incl %r15d
decl %ebx
jne 0x62adf
movq %r14, %rdi
callq 0x4c4bf
movl $0x0, -0x30(%rbp)
movq %r14, %rdi
movl $0x65, %esi
movq -0x68(%rbp), %rdx
movl %eax, -0x4c(%rbp)
movl %eax, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl 0x34(%r14), %eax
movl %eax, -0xa8(%rbp)
movq %r14, %rdi
movl $0x20, %esi
movl -0x50(%rbp), %edx
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x45b9e
testl %r13d, %r13d
movl -0x78(%rbp), %ebx
je 0x62c16
movq -0x48(%rbp), %rax
addl %r13d, %eax
movq %rax, -0xa0(%rbp)
xorl %r15d, %r15d
movl $0x0, -0x30(%rbp)
movq %r14, %rdi
movl $0x29, %esi
movq -0x68(%rbp), %rdx
movl %r15d, %ecx
movl %ebx, %r8d
callq 0x45b9e
testq %r15, %r15
jne 0x62b9e
movq %r14, %rdi
movl $0x28, %esi
movq -0x48(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl %eax, -0x30(%rbp)
movq -0x90(%rbp), %rax
movq 0x40(%rax), %rax
movq (%rax,%r15,8), %rsi
movq -0x40(%rbp), %rdi
callq 0x4bc6a
movq %rax, %r12
movq -0xa0(%rbp), %rax
leal (%rax,%r15), %r8d
movq %r14, %rdi
movl $0x4b, %esi
movl %ebx, %edx
xorl %ecx, %ecx
callq 0x45b9e
movl %eax, %ebx
movq %r14, %rdi
movl %eax, %esi
movq %r12, %rdx
movl $0xfffffffc, %ecx       # imm = 0xFFFFFFFC
callq 0x11975
movq -0x60(%rbp), %rax
movl %ebx, (%rax,%r15,4)
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x62c07
movslq 0x34(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $-0x80, -0x15(%rax,%rcx,8)
incq %r15
cmpq %r15, %r13
movl -0x78(%rbp), %ebx
jne 0x62b69
movq %r14, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl -0x4c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45b9e
testq %r13, %r13
je 0x62cde
movl -0x30(%rbp), %eax
movq %rax, -0xa0(%rbp)
movq -0x48(%rbp), %rax
leal (%rax,%r13), %r12d
movl %r13d, %ebx
xorl %r15d, %r15d
movq -0x60(%rbp), %rax
movslq (%rax,%r15,4), %rax
testq %rax, %rax
js 0x62c6d
movl 0x34(%r14), %ecx
cmpl %eax, %ecx
jbe 0x62c6d
movq 0x8(%r14), %rdx
leaq (%rax,%rax,2), %rax
movl %ecx, 0x8(%rdx,%rax,8)
cmpl $0x0, -0x30(%rbp)
setns %al
testq %r15, %r15
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x62c9d
movl 0x34(%r14), %eax
cmpl -0x30(%rbp), %eax
jbe 0x62c9d
movq 0x8(%r14), %rcx
movq -0xa0(%rbp), %rdx
leaq (%rdx,%rdx,2), %rdx
movl %eax, 0x8(%rcx,%rdx,8)
movq -0x48(%rbp), %rax
leal (%rax,%r15), %edx
movq %r14, %rdi
movl $0x20, %esi
movl $0x1, %ecx
xorl %r8d, %r8d
callq 0x45b9e
leal (%r12,%r15), %r8d
movq %r14, %rdi
movl $0x29, %esi
movq -0x68(%rbp), %rdx
movl %r15d, %ecx
callq 0x45b9e
incq %r15
cmpq %rbx, %r15
jne 0x62c4c
movq -0x58(%rbp), %rdi
movq -0x60(%rbp), %rsi
callq 0x9c3a
cmpl $0x0, -0x4c(%rbp)
movl -0x50(%rbp), %r15d
jns 0x62d0c
movq 0x40(%r14), %rax
testq %rax, %rax
je 0x62d0c
movl -0x4c(%rbp), %edx
notl %edx
movl 0x34(%r14), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
movq %r14, %rdi
movl $0x7, %esi
movq -0x68(%rbp), %rbx
movl %ebx, %edx
movl -0xa8(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x36, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x1d, %esi
movl %r15d, %edx
movl -0x2c(%rbp), %ebx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x28, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl %eax, -0x60(%rbp)
testq %r13, %r13
movl -0xa4(%rbp), %r12d
je 0x62e3a
movq -0x48(%rbp), %rax
movl %eax, %r15d
movq %r14, %rdi
movl $0x5e, %esi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
leaq 0x185ae(%rip), %rdx     # 0x7b352
xorl %ecx, %ecx
callq 0x11975
movq %r14, %rdi
movl $0x5b, %esi
movl %r12d, %edx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x56, %esi
movl -0x50(%rbp), %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x20, %esi
movl %r12d, %edx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x59, %esi
movl %r15d, %edx
movl %r12d, %ecx
movl %r12d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x90, %esi
movl %r12d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x5b, %esi
movl %r12d, %edx
movl %ebx, %ecx
movl %ebx, %r8d
callq 0x45b9e
incl %r15d
decl %r13d
jne 0x62d83
movq -0x90(%rbp), %rax
cmpq $0x0, 0x48(%rax)
setne %al
movl -0x60(%rbp), %edx
testl %edx, %edx
setns %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x62e6e
movl 0x34(%r14), %eax
cmpl %edx, %eax
jbe 0x62e6e
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 -0x80(%rbp), %rdx
movl $0x3, %ecx
movl -0x34(%rbp), %ebx
movl %ebx, %r8d
callq 0x45b9e
movq %r14, %rdi
movl %eax, %esi
leaq 0x199de(%rip), %rdx     # 0x7c874
xorl %ecx, %ecx
callq 0x11975
movq %r14, %rdi
movl $0x41, %esi
movl -0x74(%rbp), %r12d
movl %r12d, %edx
movl -0x70(%rbp), %r15d
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x42, %esi
movl %r12d, %edx
movl %ebx, %ecx
movl %r15d, %r8d
callq 0x45b9e
movq 0x8(%r14), %rax
testq %rax, %rax
movq -0x98(%rbp), %r13
je 0x62eed
movslq 0x34(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x8, -0x15(%rax,%rcx,8)
movq -0x90(%rbp), %r15
cmpq $0x0, 0x48(%r15)
sete %cl
movl -0x60(%rbp), %r8d
testl %r8d, %r8d
setns %dl
andb %cl, %dl
cmpb $0x1, %dl
movq -0x58(%rbp), %rdi
jne 0x62f3b
movl 0x34(%r14), %ecx
cmpl %r8d, %ecx
movl -0x2c(%rbp), %ebx
jbe 0x62f28
movl %r8d, %edx
leaq (%rdx,%rdx,2), %rdx
movl %ecx, 0x8(%rax,%rdx,8)
movq -0x80(%rbp), %r12
jmp 0x62f42
movq -0x58(%rbp), %rdi
movq -0x98(%rbp), %r13
jmp 0x62f42
movq -0x80(%rbp), %r12
movl -0x2c(%rbp), %ebx
movl -0x38(%rbp), %edx
movq 0x28(%r15), %r15
testq %r15, %r15
jne 0x629c6
testb %dl, %dl
setne %al
jmp 0x62f5e
movb $0x1, %al
movl -0x2c(%rbp), %ebx
cmpq $0x0, -0xb0(%rbp)
jne 0x63079
testb %al, %al
je 0x63079
movq -0x88(%rbp), %rax
movl 0x3c(%rax), %ecx
movq %r14, %rdi
movl $0x30, %esi
movq -0x68(%rbp), %r15
movl %r15d, %edx
movl %r13d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x2c, %esi
movl %r15d, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x36, %esi
movl %r15d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x28, %esi
movl %ebx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movl %eax, %ebx
movq %r14, %rdi
movl $0x18, %esi
xorl %edx, %edx
movl -0x6c(%rbp), %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x2b, %esi
movl %r12d, %edx
movl $0x3, %ecx
movl -0x34(%rbp), %r15d
movl %r15d, %r8d
callq 0x45b9e
leaq 0x19867(%rip), %rdx     # 0x7c874
movq %r14, %rdi
movl %eax, %esi
xorl %ecx, %ecx
callq 0x11975
movq %r14, %rdi
movl $0x41, %esi
movl -0x74(%rbp), %r13d
movl %r13d, %edx
movl -0x70(%rbp), %r12d
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x45b9e
movq %r14, %rdi
movl $0x42, %esi
movl %r13d, %edx
movl %r15d, %ecx
movl %r12d, %r8d
callq 0x45b9e
movq 0x8(%r14), %rax
testq %rax, %rax
je 0x63063
movslq 0x34(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $0x8, -0x15(%rax,%rcx,8)
testl %ebx, %ebx
js 0x63079
movl 0x34(%r14), %ecx
cmpl %ebx, %ecx
jbe 0x63079
movl %ebx, %edx
leaq (%rdx,%rdx,2), %rdx
movl %ecx, 0x8(%rax,%rdx,8)
movq -0x40(%rbp), %rax
movl -0x34(%rbp), %ecx
cmpl %ecx, 0x58(%rax)
jge 0x6308f
movq -0x40(%rbp), %rax
movl -0x34(%rbp), %ecx
movl %ecx, 0x58(%rax)
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq