// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: selectExpander
static int selectExpander(Walker *pWalker, Select *p){
  Parse *pParse = pWalker->pParse;
  int i, j, k;
  SrcList *pTabList;
  ExprList *pEList;
  struct SrcList_item *pFrom;
  sqlite3 *db = pParse->db;
  Expr *pE, *pRight, *pExpr;
  u16 selFlags = p->selFlags;

  p->selFlags |= SF_Expanded;
  if( db->mallocFailed  ){
    return WRC_Abort;
  }
  if( NEVER(p->pSrc==0) || (selFlags & SF_Expanded)!=0 ){
    return WRC_Prune;
  }
  pTabList = p->pSrc;
  pEList = p->pEList;
  if( pWalker->xSelectCallback2==selectPopWith ){
    sqlite3WithPush(pParse, findRightmost(p)->pWith, 0);
  }

  /* Make sure cursor numbers have been assigned to all entries in
  ** the FROM clause of the SELECT statement.
  */
  sqlite3SrcListAssignCursors(pParse, pTabList);

  /* Look up every table named in the FROM clause of the select.  If
  ** an entry of the FROM clause is a subquery instead of a table or view,
  ** then create a transient table structure to describe the subquery.
  */
  for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
    Table *pTab;
    assert( pFrom->fg.isRecursive==0 || pFrom->pTab!=0 );
    if( pFrom->fg.isRecursive ) continue;
    assert( pFrom->pTab==0 );
#ifndef SQLITE_OMIT_CTE
    if( withExpand(pWalker, pFrom) ) return WRC_Abort;
    if( pFrom->pTab ) {} else
#endif
    if( pFrom->zName==0 ){
#ifndef SQLITE_OMIT_SUBQUERY
      Select *pSel = pFrom->pSelect;
      /* A sub-query in the FROM clause of a SELECT */
      assert( pSel!=0 );
      assert( pFrom->pTab==0 );
      if( sqlite3WalkSelect(pWalker, pSel) ) return WRC_Abort;
      pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
      if( pTab==0 ) return WRC_Abort;
      pTab->nRef = 1;
      pTab->zName = sqlite3MPrintf(db, "sqlite_sq_%p", (void*)pTab);
      while( pSel->pPrior ){ pSel = pSel->pPrior; }
      sqlite3ColumnsFromExprList(pParse, pSel->pEList,&pTab->nCol,&pTab->aCol);
      pTab->iPKey = -1;
      pTab->nRowLogEst = 200; assert( 200==sqlite3LogEst(1048576) );
      pTab->tabFlags |= TF_Ephemeral;
#endif
    }else{
      /* An ordinary table or view name in the FROM clause */
      assert( pFrom->pTab==0 );
      pFrom->pTab = pTab = sqlite3LocateTableItem(pParse, 0, pFrom);
      if( pTab==0 ) return WRC_Abort;
      if( pTab->nRef==0xffff ){
        sqlite3ErrorMsg(pParse, "too many references to \"%s\": max 65535",
           pTab->zName);
        pFrom->pTab = 0;
        return WRC_Abort;
      }
      pTab->nRef++;
      if( !IsVirtual(pTab) && cannotBeFunction(pParse, pFrom) ){
        return WRC_Abort;
      }
#if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
      if( IsVirtual(pTab) || pTab->pSelect ){
        i16 nCol;
        if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
        assert( pFrom->pSelect==0 );
        pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
        sqlite3SelectSetName(pFrom->pSelect, pTab->zName);
        nCol = pTab->nCol;
        pTab->nCol = -1;
        sqlite3WalkSelect(pWalker, pFrom->pSelect);
        pTab->nCol = nCol;
      }
#endif
    }

    /* Locate the index named by the INDEXED BY clause, if any. */
    if( sqlite3IndexedByLookup(pParse, pFrom) ){
      return WRC_Abort;
    }
  }

  /* Process NATURAL keywords, and ON and USING clauses of joins.
  */
  if( db->mallocFailed || sqliteProcessJoin(pParse, p) ){
    return WRC_Abort;
  }

  /* For every "*" that occurs in the column list, insert the names of
  ** all columns in all tables.  And for every TABLE.* insert the names
  ** of all columns in TABLE.  The parser inserted a special expression
  ** with the TK_ASTERISK operator for each "*" that it found in the column
  ** list.  The following code just has to locate the TK_ASTERISK
  ** expressions and expand each one to the list of all columns in
  ** all tables.
  **
  ** The first loop just checks to see if there are any "*" operators
  ** that need expanding.
  */
  for(k=0; k<pEList->nExpr; k++){
    pE = pEList->a[k].pExpr;
    if( pE->op==TK_ASTERISK ) break;
    assert( pE->op!=TK_DOT || pE->pRight!=0 );
    assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );
    if( pE->op==TK_DOT && pE->pRight->op==TK_ASTERISK ) break;
  }
  if( k<pEList->nExpr ){
    /*
    ** If we get here it means the result set contains one or more "*"
    ** operators that need to be expanded.  Loop through each expression
    ** in the result set and expand them one by one.
    */
    struct ExprList_item *a = pEList->a;
    ExprList *pNew = 0;
    int flags = pParse->db->flags;
    int longNames = (flags & SQLITE_FullColNames)!=0
                      && (flags & SQLITE_ShortColNames)==0;

    for(k=0; k<pEList->nExpr; k++){
      pE = a[k].pExpr;
      pRight = pE->pRight;
      assert( pE->op!=TK_DOT || pRight!=0 );
      if( pE->op!=TK_ASTERISK
       && (pE->op!=TK_DOT || pRight->op!=TK_ASTERISK)
      ){
        /* This particular expression does not need to be expanded.
        */
        pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);
        if( pNew ){
          pNew->a[pNew->nExpr-1].zName = a[k].zName;
          pNew->a[pNew->nExpr-1].zSpan = a[k].zSpan;
          a[k].zName = 0;
          a[k].zSpan = 0;
        }
        a[k].pExpr = 0;
      }else{
        /* This expression is a "*" or a "TABLE.*" and needs to be
        ** expanded. */
        int tableSeen = 0;      /* Set to 1 when TABLE matches */
        char *zTName = 0;       /* text of name of TABLE */
        if( pE->op==TK_DOT ){
          assert( pE->pLeft!=0 );
          assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );
          zTName = pE->pLeft->u.zToken;
        }
        for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
          Table *pTab = pFrom->pTab;
          Select *pSub = pFrom->pSelect;
          char *zTabName = pFrom->zAlias;
          const char *zSchemaName = 0;
          int iDb;
          if( zTabName==0 ){
            zTabName = pTab->zName;
          }
          if( db->mallocFailed ) break;
          if( pSub==0 || (pSub->selFlags & SF_NestedFrom)==0 ){
            pSub = 0;
            if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
              continue;
            }
            iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
            zSchemaName = iDb>=0 ? db->aDb[iDb].zName : "*";
          }
          for(j=0; j<pTab->nCol; j++){
            char *zName = pTab->aCol[j].zName;
            char *zColname;  /* The computed column name */
            char *zToFree;   /* Malloced string that needs to be freed */
            Token sColname;  /* Computed column name as a token */

            assert( zName );
            if( zTName && pSub
             && sqlite3MatchSpanName(pSub->pEList->a[j].zSpan, 0, zTName, 0)==0
            ){
              continue;
            }

            /* If a column is marked as 'hidden', omit it from the expanded
            ** result-set list unless the SELECT has the SF_IncludeHidden
            ** bit set.
            */
            if( (p->selFlags & SF_IncludeHidden)==0
             && IsHiddenColumn(&pTab->aCol[j]) 
            ){
              continue;
            }
            tableSeen = 1;

            if( i>0 && zTName==0 ){
              if( (pFrom->fg.jointype & JT_NATURAL)!=0
                && tableAndColumnIndex(pTabList, i, zName, 0, 0)
              ){
                /* In a NATURAL join, omit the join columns from the 
                ** table to the right of the join */
                continue;
              }
              if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
                /* In a join with a USING clause, omit columns in the
                ** using clause from the table on the right. */
                continue;
              }
            }
            pRight = sqlite3Expr(db, TK_ID, zName);
            zColname = zName;
            zToFree = 0;
            if( longNames || pTabList->nSrc>1 ){
              Expr *pLeft;
              pLeft = sqlite3Expr(db, TK_ID, zTabName);
              pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
              if( zSchemaName ){
                pLeft = sqlite3Expr(db, TK_ID, zSchemaName);
                pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pExpr, 0);
              }
              if( longNames ){
                zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
                zToFree = zColname;
              }
            }else{
              pExpr = pRight;
            }
            pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
            sColname.z = zColname;
            sColname.n = sqlite3Strlen30(zColname);
            sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
            if( pNew && (p->selFlags & SF_NestedFrom)!=0 ){
              struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
              if( pSub ){
                pX->zSpan = sqlite3DbStrDup(db, pSub->pEList->a[j].zSpan);
                testcase( pX->zSpan==0 );
              }else{
                pX->zSpan = sqlite3MPrintf(db, "%s.%s.%s",
                                           zSchemaName, zTabName, zColname);
                testcase( pX->zSpan==0 );
              }
              pX->bSpanIsTab = 1;
            }
            sqlite3DbFree(db, zToFree);
          }
        }
        if( !tableSeen ){
          if( zTName ){
            sqlite3ErrorMsg(pParse, "no such table: %s", zTName);
          }else{
            sqlite3ErrorMsg(pParse, "no tables specified");
          }
        }
      }
    }
    sqlite3ExprListDelete(db, pEList);
    p->pEList = pNew;
  }
#if SQLITE_MAX_COLUMN
  if( p->pEList && p->pEList->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    sqlite3ErrorMsg(pParse, "too many columns in result set");
    return WRC_Abort;
  }
#endif
  return WRC_Continue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq 0x18(%rdi), %r12
movq (%r12), %rdx
movzwl 0xa(%rsi), %eax
movl %eax, %ecx
orl $0x20, %ecx
movw %cx, 0xa(%rsi)
pushq $0x2
popq %r15
cmpb $0x0, 0x51(%rdx)
je 0x50d80
movl %r15d, %eax
jmp 0x5148c
movq %rdx, -0x80(%rbp)
movq 0x28(%rsi), %rcx
movq %rcx, -0xa8(%rbp)
testq %rcx, %rcx
setne %cl
testb $0x20, %al
sete %al
andb %cl, %al
cmpb $0x1, %al
jne 0x51225
movq %rdi, %r13
movq %rsi, -0x98(%rbp)
movq (%rsi), %rax
movq %rax, -0xb0(%rbp)
leaq 0xcc4(%rip), %rax       # 0x51a83
cmpq %rax, 0x10(%rdi)
jne 0x50dee
movq -0x98(%rbp), %rdi
callq 0x51ab3
movq 0x70(%rax), %rax
testq %rax, %rax
je 0x50dee
movq 0x280(%r12), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x280(%r12)
movq %r12, %rdi
movq -0xa8(%rbp), %rbx
movq %rbx, %rsi
callq 0x51ac5
leaq 0x8(%rbx), %r14
movq %r14, -0xe8(%rbp)
xorl %ecx, %ecx
movq %r12, -0x48(%rbp)
movq %r13, -0x38(%rbp)
movq -0xa8(%rbp), %rax
cmpl (%rax), %ecx
jge 0x5122c
testb $0x20, 0x3d(%r14)
jne 0x5121a
movl %ecx, -0x68(%rbp)
cmpq $0x0, 0x8(%r14)
movq %r14, %rax
movq %r14, -0x30(%rbp)
jne 0x510b3
movq 0x10(%rax), %r14
testq %r14, %r14
je 0x510b3
movq 0x18(%r13), %rax
movq (%rax), %rcx
movq %rcx, -0x58(%rbp)
movq %rax, -0x40(%rbp)
leaq 0x280(%rax), %rbx
movq %rbx, -0x50(%rbp)
movq (%rbx), %rbx
testq %rbx, %rbx
movq -0x30(%rbp), %rax
je 0x510b3
movl (%rbx), %r13d
testl %r13d, %r13d
movl $0x0, %eax
cmovlel %eax, %r13d
shlq $0x5, %r13
addq $0x20, %r13
xorl %ecx, %ecx
leaq 0x20(%rcx), %r12
cmpq %r12, %r13
je 0x50eb6
movq 0x10(%rbx,%rcx), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xa4f0
movq %r12, %rcx
testl %eax, %eax
jne 0x50e94
jmp 0x50ec8
addq $0x8, %rbx
pushq $0x2
popq %r15
movq -0x48(%rbp), %r12
movq -0x38(%rbp), %r13
jmp 0x50e6b
movq 0x8(%rbx,%r12), %rsi
testq %rsi, %rsi
jne 0x5147b
movq -0x40(%rbp), %rdi
movq -0x30(%rbp), %r14
movq %r14, %rsi
callq 0x51dd4
testl %eax, %eax
jne 0x51489
movq -0x58(%rbp), %r13
movq %r13, %rdi
pushq $0x78
popq %rsi
callq 0x12153
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x51489
movq %rax, %r15
movw $0x1, 0x40(%rax)
movq -0x10(%rbx,%r12), %rsi
movq %r13, %rdi
callq 0x11f6d
movq %rax, (%r15)
orw $-0x1, 0x3c(%r15)
movw $0xc8, 0x42(%r15)
orb $0x42, 0x46(%r15)
movq (%rbx,%r12), %rsi
movq %r13, %rdi
xorl %edx, %edx
callq 0x4d783
movq %rax, 0x28(%r14)
cmpb $0x0, 0x51(%r13)
jne 0x51489
movq %r15, -0x88(%rbp)
movq %rax, -0x58(%rbp)
movb 0x8(%rax), %al
addb $-0x73, %al
movb %al, -0x78(%rbp)
cmpb $0x1, %al
ja 0x50fd0
movq -0x58(%rbp), %rax
movq 0x28(%rax), %r15
movl (%r15), %eax
testl %eax, %eax
movl $0x0, %ecx
cmovlel %ecx, %eax
imulq $0x70, %rax, %r14
xorl %r13d, %r13d
cmpq %r13, %r14
je 0x50fd0
cmpq $0x0, 0x10(%r15,%r13)
je 0x50f98
addq $0x70, %r13
jmp 0x50f85
movq 0x18(%r15,%r13), %rdi
testq %rdi, %rdi
je 0x50f92
movq -0x10(%rbx,%r12), %rsi
callq 0xa4f0
testl %eax, %eax
jne 0x50f92
movq -0x88(%rbp), %rax
movq %rax, 0x28(%r15,%r13)
orb $0x20, 0x45(%r15,%r13)
incw 0x40(%rax)
movq -0x58(%rbp), %rax
orb $0x20, 0xb(%rax)
jmp 0x50f92
movq -0x88(%rbp), %r15
cmpw $0x3, 0x40(%r15)
jae 0x514bc
leaq 0x1d069(%rip), %rax     # 0x6e053
movq %rax, 0x8(%rbx,%r12)
movq -0x50(%rbp), %rcx
movq (%rcx), %rax
movq %rax, -0x60(%rbp)
movq %rbx, (%rcx)
movq -0x58(%rbp), %r14
movq %r14, %rsi
cmpb $0x1, -0x78(%rbp)
ja 0x5100e
movq 0x50(%r14), %rsi
movq -0x38(%rbp), %r13
movq %r13, %rdi
callq 0x4d28c
movq -0x50(%rbp), %rax
movq %rbx, (%rax)
movq %r14, %rax
movq 0x50(%r14), %r14
testq %r14, %r14
jne 0x51021
movq (%rax), %rax
movq -0x8(%rbx,%r12), %rsi
testq %rsi, %rsi
je 0x5104e
testq %rax, %rax
je 0x51051
movl (%rax), %ecx
movl (%rsi), %r8d
cmpl %r8d, %ecx
je 0x51051
jmp 0x5152b
movq %rax, %rsi
leaq 0x3e(%r15), %rdx
addq $0x8, %r15
movq -0x40(%rbp), %rdi
movq %r15, %rcx
callq 0x51b26
cmpb $0x1, -0x78(%rbp)
ja 0x51096
movq -0x58(%rbp), %rsi
movzwl 0xa(%rsi), %eax
btl $0xd, %eax
leaq 0x1d012(%rip), %rax     # 0x6e090
leaq 0x1d02d(%rip), %rcx     # 0x6e0b2
cmovaeq %rcx, %rax
movq %rax, 0x8(%rbx,%r12)
movq %r13, %rdi
callq 0x4d28c
andq $0x0, 0x8(%rbx,%r12)
movq -0x60(%rbp), %rax
movq -0x50(%rbp), %rcx
movq %rax, (%rcx)
pushq $0x2
popq %r15
movq -0x48(%rbp), %r12
movq -0x30(%rbp), %rax
cmpq $0x0, 0x20(%rax)
movq %rax, %r14
jne 0x51204
cmpq $0x0, 0x10(%r14)
je 0x5116e
movq %r12, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x51d84
movq %rax, 0x20(%r14)
testq %rax, %rax
je 0x50d78
movq %rax, %rbx
movzwl 0x40(%rax), %eax
cmpw $-0x1, %ax
je 0x5149e
incl %eax
movw %ax, 0x40(%rbx)
movb 0x46(%rbx), %al
testb $0x10, %al
jne 0x5111a
movq %r12, %rdi
movq %r14, %rsi
callq 0x51dd4
testl %eax, %eax
jne 0x50d78
movb 0x46(%rbx), %al
testb $0x10, %al
jne 0x51129
cmpq $0x0, 0x18(%rbx)
je 0x51204
movq %r12, %rdi
movq %rbx, %rsi
callq 0x51df7
testl %eax, %eax
jne 0x50d78
movq 0x18(%rbx), %rsi
movq -0x80(%rbp), %rdi
xorl %edx, %edx
callq 0x4d783
movq %rax, 0x28(%r14)
movzwl 0x3e(%rbx), %r14d
orw $-0x1, 0x3e(%rbx)
movq %r13, %rdi
movq %rax, %rsi
callq 0x4d28c
movw %r14w, 0x3e(%rbx)
jmp 0x51200
movl %r15d, %ebx
movq %r14, %r15
movq 0x28(%r14), %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x4d28c
testl %eax, %eax
jne 0x514ce
movq -0x80(%rbp), %r13
movq %r13, %rdi
pushq $0x78
popq %rsi
callq 0x12153
movq %rax, 0x20(%r15)
testq %rax, %rax
je 0x51489
movq %rax, %rbx
movw $0x1, 0x40(%rax)
movq %r13, %rdi
leaq 0x1cdf5(%rip), %rsi     # 0x6dfaf
movq %rax, %rdx
xorl %eax, %eax
callq 0x13638
movq %rax, (%rbx)
movq %r14, %rax
movq 0x50(%r14), %r14
testq %r14, %r14
jne 0x511c7
movq (%rax), %rsi
leaq 0x3e(%rbx), %rdx
movq %rbx, %rcx
addq $0x8, %rcx
movq %r12, %rdi
callq 0x51b26
orw $-0x1, 0x3c(%rbx)
movw $0xc8, 0x42(%rbx)
orb $0x2, 0x46(%rbx)
movq -0x38(%rbp), %r13
pushq $0x2
popq %r15
movq -0x30(%rbp), %r14
movq %r12, %rdi
movq %r14, %rsi
callq 0x52003
testl %eax, %eax
movl -0x68(%rbp), %ecx
jne 0x50d78
incl %ecx
addq $0x70, %r14
jmp 0x50e15
pushq $0x1
jmp 0x5148b
movq -0x80(%rbp), %r12
cmpb $0x0, 0x51(%r12)
jne 0x50d78
movq -0x98(%rbp), %rax
movq 0x28(%rax), %rcx
leaq 0x8(%rcx), %rdx
leaq 0x78(%rcx), %rsi
addq $0x30, %rax
movq %rax, -0x58(%rbp)
xorl %edi, %edi
movq %rcx, -0x30(%rbp)
movl (%rcx), %eax
decl %eax
cmpl %eax, %edi
jge 0x514d2
movq %rdi, -0x78(%rbp)
movq %rsi, -0x40(%rbp)
movq 0x20(%rsi), %rdi
movq %rdx, -0x60(%rbp)
cmpq $0x0, 0x20(%rdx)
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x513ba
movq -0x40(%rbp), %rax
movzbl 0x3c(%rax), %eax
movl %eax, %r12d
andl $0x20, %r12d
movl %r12d, %ecx
shrl $0x5, %ecx
movq %rcx, -0x50(%rbp)
testb $0x4, %al
movq %rdi, -0x68(%rbp)
jne 0x513dd
movq -0x40(%rbp), %rbx
movq 0x48(%rbx), %rdx
testq %rdx, %rdx
je 0x512ff
cmpq $0x0, 0x50(%rbx)
jne 0x51a6c
testl %r12d, %r12d
je 0x512e0
movl 0x44(%rbx), %esi
movq %rdx, %rdi
callq 0x521f0
movq 0x48(%rbx), %rdx
movq -0x48(%rbp), %rax
movq (%rax), %rdi
movq -0x58(%rbp), %r14
movq (%r14), %rsi
callq 0x52262
movq %rax, (%r14)
andq $0x0, 0x48(%rbx)
movq -0x68(%rbp), %rdi
movq 0x50(%rbx), %rcx
testq %rcx, %rcx
movq -0x80(%rbp), %r12
je 0x513ba
movq -0x78(%rbp), %rax
leal 0x1(%rax), %ebx
xorl %edx, %edx
xorl %r13d, %r13d
movq %rcx, -0x88(%rbp)
movslq 0x8(%rcx), %rax
cmpq %rax, %r13
jge 0x513ba
movq (%rcx), %rax
movq %rdx, -0x38(%rbp)
movq (%rax,%rdx), %r15
movq %r15, %rsi
callq 0x52303
testl %eax, %eax
movq -0x30(%rbp), %r14
js 0x5146e
movl %eax, %r12d
movq %r14, %rdi
movl %ebx, %esi
movq %r15, %rdx
leaq -0xd0(%rbp), %rcx
leaq -0x8c(%rbp), %r8
callq 0x52086
testl %eax, %eax
je 0x5146e
movl -0xd0(%rbp), %edx
movl -0x8c(%rbp), %ecx
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movl %ebx, %r8d
movl %r12d, %r9d
pushq -0x58(%rbp)
pushq -0x50(%rbp)
callq 0x5215d
popq %rax
popq %rcx
incq %r13
movq -0x38(%rbp), %rdx
addq $0x10, %rdx
movq -0x80(%rbp), %r12
movq -0x68(%rbp), %rdi
movq -0x88(%rbp), %rcx
jmp 0x51323
movq -0x78(%rbp), %rdi
incl %edi
movq -0x40(%rbp), %rsi
addq $0x70, %rsi
movq -0x60(%rbp), %rdx
addq $0x70, %rdx
pushq $0x2
popq %r15
movq -0x30(%rbp), %rcx
jmp 0x5125d
movq -0x40(%rbp), %rax
cmpq $0x0, 0x48(%rax)
jne 0x51a53
cmpq $0x0, 0x50(%rax)
jne 0x51a53
movq -0x78(%rbp), %rax
leal 0x1(%rax), %r13d
xorl %ebx, %ebx
xorl %r15d, %r15d
movswq 0x3e(%rdi), %rax
cmpq %rax, %r15
jge 0x512b4
movq 0x8(%rdi), %rax
movq (%rax,%rbx), %rdx
movq -0x30(%rbp), %r14
movq %r14, %rdi
movl %r13d, %esi
leaq -0xd0(%rbp), %rcx
leaq -0x8c(%rbp), %r8
callq 0x52086
testl %eax, %eax
je 0x51461
movl -0xd0(%rbp), %edx
movl -0x8c(%rbp), %ecx
movq -0x48(%rbp), %rdi
movq %r14, %rsi
movl %r13d, %r8d
movl %r15d, %r9d
pushq -0x58(%rbp)
pushq -0x50(%rbp)
callq 0x5215d
popq %rax
popq %rcx
incq %r15
addq $0x30, %rbx
movq -0x68(%rbp), %rdi
jmp 0x51404
leaq 0x1cd1b(%rip), %rsi     # 0x6e190
movq -0x48(%rbp), %rdi
jmp 0x5147f
movq -0x40(%rbp), %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x1357a
pushq $0x2
popq %rax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%rbx), %rdx
leaq 0x1cb14(%rip), %rsi     # 0x6dfbc
movq %r12, %rdi
xorl %eax, %eax
callq 0x1357a
andq $0x0, 0x20(%r14)
jmp 0x50d78
movq -0x10(%rbx,%r12), %rdx
leaq 0x1cb60(%rip), %rsi     # 0x6e028
movq -0x40(%rbp), %rdi
jmp 0x51482
movl %ebx, %eax
jmp 0x5148c
movq -0xb0(%rbp), %rax
movl (%rax), %eax
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
shlq $0x5, %rdx
movq -0x48(%rbp), %r14
cmpq %rcx, %rdx
je 0x51555
movq -0xb0(%rbp), %rsi
movq 0x8(%rsi), %rsi
movq %rsi, -0xd8(%rbp)
movq (%rsi,%rcx), %rsi
movzbl (%rsi), %edi
cmpl $0x7a, %edi
je 0x5151c
cmpl $0x9e, %edi
jne 0x51525
jmp 0x51564
movq 0x18(%rsi), %rsi
cmpb $-0x62, (%rsi)
je 0x51564
addq $0x20, %rcx
jmp 0x514ef
movq -0x10(%rbx,%r12), %rdx
leaq 0x1cb33(%rip), %rsi     # 0x6e06a
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
xorl %eax, %eax
callq 0x1357a
movq -0x60(%rbp), %rax
movq %rax, 0x280(%rbx)
jmp 0x51489
movq -0x98(%rbp), %rax
movq (%rax), %rbx
jmp 0x51a25
movq (%r14), %rcx
movl 0x2c(%rcx), %ecx
andl $0x60, %ecx
movl %ecx, -0x40(%rbp)
xorl %ecx, %ecx
xorl %ebx, %ebx
cltq
cmpq %rax, %rcx
jge 0x51a0c
movq %rbx, %rsi
movq %rcx, -0xb8(%rbp)
movq %rcx, %rbx
shlq $0x5, %rbx
movq -0xd8(%rbp), %rax
movq (%rax,%rbx), %rdx
movzbl (%rdx), %eax
cmpl $0x9e, %eax
je 0x51608
cmpl $0x7a, %eax
jne 0x515bd
movq 0x18(%rdx), %rax
cmpb $-0x62, (%rax)
jne 0x515bd
movq 0x10(%rdx), %rax
movq 0x8(%rax), %rdx
jmp 0x5160a
addq -0xd8(%rbp), %rbx
movq %r14, %rdi
callq 0x43125
testq %rax, %rax
je 0x515f5
movq 0x8(%rbx), %rsi
movq 0x8(%rax), %rcx
movslq (%rax), %rdx
shlq $0x5, %rdx
movq %rsi, -0x18(%rcx,%rdx)
movq 0x10(%rbx), %rsi
movq %rsi, -0x10(%rcx,%rdx)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
andq $0x0, (%rbx)
movq %rax, %rbx
movq -0xb8(%rbp), %rax
jmp 0x519ca
xorl %edx, %edx
movl $0x0, -0x38(%rbp)
movq -0xe8(%rbp), %r13
xorl %ecx, %ecx
movq %rsi, %rbx
movq %rdx, -0x60(%rbp)
movq -0xa8(%rbp), %rax
cmpl (%rax), %ecx
movq -0xb8(%rbp), %rax
jge 0x519c4
movq 0x18(%r13), %rdi
movq 0x20(%r13), %rsi
movq %rsi, -0x68(%rbp)
movq %rdi, -0xa0(%rbp)
testq %rdi, %rdi
jne 0x5165d
movq -0x68(%rbp), %rsi
movq (%rsi), %rsi
movq %rsi, -0xa0(%rbp)
cmpb $0x0, 0x51(%r12)
jne 0x519c4
movl %ecx, -0x6c(%rbp)
movq 0x28(%r13), %rsi
testq %rsi, %rsi
je 0x5167b
testb $0x4, 0xb(%rsi)
jne 0x516cd
testq %rdx, %rdx
je 0x5169b
movq %rdx, %rdi
movq -0xa0(%rbp), %rsi
callq 0xa4f0
movq -0x60(%rbp), %rdx
testl %eax, %eax
jne 0x519b6
movq %rbx, -0x50(%rbp)
movq -0x68(%rbp), %r14
movq 0x68(%r14), %rsi
movq %r12, %rdi
callq 0x136fb
testl %eax, %eax
js 0x516e2
movq 0x20(%r12), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %rax
movq %rax, -0xc0(%rbp)
xorl %esi, %esi
jmp 0x516f2
movq %rbx, -0x50(%rbp)
movq $0x0, -0xc0(%rbp)
movq -0x68(%rbp), %r14
jmp 0x516f6
xorl %esi, %esi
leaq 0x1b769(%rip), %rax     # 0x6ce54
movq %rax, -0xc0(%rbp)
movq -0x60(%rbp), %rdx
movq %r13, -0xe0(%rbp)
testq %rdx, %rdx
setne %al
sete %cl
movq %rsi, -0x88(%rbp)
testq %rsi, %rsi
setne %dl
andb %al, %dl
movb %dl, -0x58(%rbp)
cmpl $0x0, -0x6c(%rbp)
setne %al
andb %cl, %al
movb %al, -0x78(%rbp)
pushq $0x10
popq %rcx
xorl %ebx, %ebx
xorl %r15d, %r15d
movswq 0x3e(%r14), %rax
cmpq %rax, %r15
jge 0x5199f
movq 0x8(%r14), %r13
movq (%r13,%rbx), %r14
cmpb $0x0, -0x58(%rbp)
je 0x51790
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax,%rcx), %rdi
xorl %esi, %esi
movq -0x60(%rbp), %rdx
movq %r14, -0x30(%rbp)
movq %rbx, %r14
movq %r15, %rbx
movq %r12, %r15
movq %rcx, %r12
xorl %ecx, %ecx
callq 0x50633
movq %r12, %rcx
movq %r15, %r12
movq %rbx, %r15
movq %r14, %rbx
movq -0x30(%rbp), %r14
testl %eax, %eax
je 0x5198b
movq -0x98(%rbp), %rax
cmpw $0x0, 0xa(%rax)
js 0x517aa
testb $0x2, 0x2b(%r13,%rbx)
jne 0x5198b
movq %rcx, -0x30(%rbp)
cmpb $0x0, -0x78(%rbp)
je 0x517f5
movq -0xe0(%rbp), %r13
testb $0x4, 0x3c(%r13)
je 0x517e1
movq -0xa8(%rbp), %rdi
movl -0x6c(%rbp), %esi
movq %r14, %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x52086
testl %eax, %eax
jne 0x51981
movq 0x50(%r13), %rdi
movq %r14, %rsi
callq 0x520fa
testl %eax, %eax
jns 0x51981
movq %r12, %rdi
pushq $0x1b
popq %rsi
movq %r14, %rdx
callq 0x43226
movq %rax, %r13
cmpl $0x20, -0x40(%rbp)
je 0x5181c
movq -0xa8(%rbp), %rax
cmpl $0x2, (%rax)
jl 0x518b5
movq %r15, -0xf0(%rbp)
movq %r12, %rdi
pushq $0x1b
popq %r15
movl %r15d, %esi
movq -0xa0(%rbp), %rdx
callq 0x43226
movq -0x48(%rbp), %r12
movq %r12, %rdi
pushq $0x7a
popq %rsi
movq %rax, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x3e36c
movq %rax, %r13
movq -0xc0(%rbp), %rdx
testq %rdx, %rdx
je 0x51883
movq -0x80(%rbp), %rdi
movl %r15d, %esi
callq 0x43226
movq %r12, %rdi
pushq $0x7a
popq %rsi
movq %rax, %rdx
movq %r13, %rcx
xorl %r8d, %r8d
callq 0x3e36c
movq %rax, %r13
cmpl $0x20, -0x40(%rbp)
movq -0xf0(%rbp), %r15
jne 0x518b5
movq -0x80(%rbp), %rdi
leaq 0x1a93e(%rip), %rsi     # 0x6c1d9
movq -0xa0(%rbp), %rdx
movq %r14, %rcx
xorl %eax, %eax
callq 0x13638
movq %rax, %r14
movq %rax, -0x38(%rbp)
jmp 0x518bd
movq $0x0, -0x38(%rbp)
movq -0x48(%rbp), %r12
movq %r12, %rdi
movq -0x50(%rbp), %rsi
movq %r13, %rdx
callq 0x43125
movq %rax, %r13
movq %r14, -0xd0(%rbp)
movq %r14, %rdi
callq 0xb080
movl %eax, -0xc8(%rbp)
movq %r12, %rdi
movq %r13, %rsi
leaq -0xd0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x431d4
movq %r13, -0x50(%rbp)
testq %r13, %r13
movq -0x80(%rbp), %r12
je 0x51975
movq -0x98(%rbp), %rax
testb $0x4, 0xb(%rax)
je 0x51975
movq -0x50(%rbp), %rax
movslq (%rax), %r13
shlq $0x5, %r13
addq 0x8(%rax), %r13
movq -0x88(%rbp), %rax
testq %rax, %rax
je 0x5194a
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x30(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq %r12, %rdi
callq 0x11f6d
jmp 0x5196c
movq %r12, %rdi
leaq 0x1c546(%rip), %rsi     # 0x6de9a
movq -0xc0(%rbp), %rdx
movq -0xa0(%rbp), %rcx
movq %r14, %r8
xorl %eax, %eax
callq 0x13638
movq %rax, -0x10(%r13)
orb $0x2, -0x7(%r13)
movq %r12, %rdi
movq -0x38(%rbp), %rsi
callq 0xb856
pushq $0x1
popq %rax
movl %eax, -0x38(%rbp)
movq -0x30(%rbp), %rcx
incq %r15
addq $0x30, %rbx
addq $0x20, %rcx
movq -0x68(%rbp), %r14
jmp 0x5172c
pushq $0x2
popq %r15
movq -0x48(%rbp), %r14
movq -0x50(%rbp), %rbx
movq -0x60(%rbp), %rdx
movq -0xe0(%rbp), %r13
movl -0x6c(%rbp), %ecx
incl %ecx
addq $0x70, %r13
jmp 0x51621
cmpl $0x0, -0x38(%rbp)
je 0x519de
incq %rax
movq %rax, %rcx
movq -0xb0(%rbp), %rax
movl (%rax), %eax
jmp 0x51574
movq %r14, %rdi
testq %rdx, %rdx
je 0x519f9
leaq 0x1c5f6(%rip), %rsi     # 0x6dfe3
xorl %eax, %eax
callq 0x1357a
jmp 0x515fc
leaq 0x1c5f5(%rip), %rsi     # 0x6dff5
xorl %eax, %eax
callq 0x1357a
jmp 0x515fc
movq %r12, %rdi
movq -0xb0(%rbp), %rsi
callq 0x36862
movq -0x98(%rbp), %rax
movq %rbx, (%rax)
xorl %eax, %eax
testq %rbx, %rbx
je 0x5148c
movl (%rbx), %ecx
cmpl 0x70(%r12), %ecx
jle 0x5148c
leaq 0x1c5c5(%rip), %rsi     # 0x6e009
movq %r14, %rdi
xorl %eax, %eax
callq 0x1357a
jmp 0x50d78
leaq 0x1c6cd(%rip), %rsi     # 0x6e127
movq -0x48(%rbp), %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x1357a
jmp 0x51489
leaq 0x1c6e6(%rip), %rsi     # 0x6e159
movq -0x48(%rbp), %rdi
xorl %eax, %eax
callq 0x1357a
jmp 0x51489