// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/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;

  /* 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;
    if( pFrom->pTab!=0 ){
      /* This statement has already been prepared.  There is no need
      ** to go further. */
      assert( i==0 );
      return WRC_Prune;
    }
    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 );
      sqlite3WalkSelect(pWalker, pSel);
      pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
      if( pTab==0 ) return WRC_Abort;
      pTab->nRef = 1;
      pTab->zName = sqlite3MPrintf(db, "sqlite_subquery_%p_", (void*)pTab);
      while( pSel->pPrior ){ pSel = pSel->pPrior; }
      selectColumnsFromExprList(pParse, pSel->pEList, &pTab->nCol, &pTab->aCol);
      pTab->iPKey = -1;
      pTab->nRowEst = 1000000;
      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 !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
      if( pTab->pSelect || IsVirtual(pTab) ){
        /* We reach here if the named table is a really a view */
        if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
        assert( pFrom->pSelect==0 );
        pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
        sqlite3WalkSelect(pWalker, pFrom->pSelect);
      }
#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_ALL operator for each "*" that it found in the column list.
  ** The following code just has to locate the TK_ALL 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_ALL ) 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_ALL ) 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;

    /* When processing FROM-clause subqueries, it is always the case
    ** that full_column_names=OFF and short_column_names=ON.  The
    ** sqlite3ResultSetOfSelect() routine makes it so. */
    assert( (p->selFlags & SF_NestedFrom)==0
          || ((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_ALL && (pE->op!=TK_DOT || pRight->op!=TK_ALL) ){
        /* 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' (currently only possible
            ** for virtual tables), do not include it in the expanded
            ** result-set list.
            */
            if( IsHiddenColumn(&pTab->aCol[j]) ){
              assert(IsVirtual(pTab));
              continue;
            }
            tableSeen = 1;

            if( i>0 && zTName==0 ){
              if( (pFrom->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");
  }
#endif
  return WRC_Continue;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x120, %rsp            # imm = 0x120
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movw 0xa(%rax), %ax
movw %ax, -0x6a(%rbp)
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %ecx
orl $0x10, %ecx
movw %cx, 0xa(%rax)
movq -0x50(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x6317b
movl $0x2, -0x4(%rbp)
jmp 0x63c27
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x63192
movzwl -0x6a(%rbp), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x6319e
movl $0x1, -0x4(%rbp)
jmp 0x63c27
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x63c40
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movq -0x38(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x63406
movq -0x48(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x631fe
movl $0x1, -0x4(%rbp)
jmp 0x63c27
movq -0x48(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x632e1
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x60fa0
movq -0x50(%rbp), %rdi
movl $0x78, %esi
callq 0x11ca0
movq %rax, %rcx
movq %rcx, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0x78(%rbp)
jne 0x63256
movl $0x2, -0x4(%rbp)
jmp 0x63c27
movq -0x78(%rbp), %rax
movw $0x1, 0x44(%rax)
movq -0x50(%rbp), %rdi
movq -0x78(%rbp), %rdx
leaq 0x4c99c(%rip), %rsi     # 0xafc0b
movb $0x0, %al
callq 0x137f0
movq %rax, %rcx
movq -0x78(%rbp), %rax
movq %rcx, (%rax)
movq -0x80(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x63299
movq -0x80(%rbp), %rax
movq 0x50(%rax), %rax
movq %rax, -0x80(%rbp)
jmp 0x63280
movq -0x20(%rbp), %rdi
movq -0x80(%rbp), %rax
movq (%rax), %rsi
movq -0x78(%rbp), %rdx
addq $0x42, %rdx
movq -0x78(%rbp), %rcx
addq $0x8, %rcx
callq 0x63ce0
movq -0x78(%rbp), %rax
movw $0xffff, 0x40(%rax)     # imm = 0xFFFF
movq -0x78(%rbp), %rax
movl $0xf4240, 0x38(%rax)    # imm = 0xF4240
movq -0x78(%rbp), %rax
movzbl 0x46(%rax), %ecx
orl $0x2, %ecx
movb %cl, 0x46(%rax)
jmp 0x633cc
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x64100
movq %rax, %rcx
movq %rcx, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0x78(%rbp)
jne 0x63312
movl $0x2, -0x4(%rbp)
jmp 0x63c27
movq -0x78(%rbp), %rax
movzwl 0x44(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x63352
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rdx
leaq 0x4c8ec(%rip), %rsi     # 0xafc1f
movb $0x0, %al
callq 0x136f0
movq -0x48(%rbp), %rax
movq $0x0, 0x20(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x63c27
movq -0x78(%rbp), %rax
movw 0x44(%rax), %cx
addw $0x1, %cx
movw %cx, 0x44(%rax)
movq -0x78(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x6337d
movq -0x78(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x633ca
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x64180
cmpl $0x0, %eax
je 0x6339b
movl $0x2, -0x4(%rbp)
jmp 0x63c27
movq -0x50(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x61ba0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x60fa0
jmp 0x633cc
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x64380
cmpl $0x0, %eax
je 0x633ea
movl $0x2, -0x4(%rbp)
jmp 0x63c27
jmp 0x633ec
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x48(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x48(%rbp)
jmp 0x631d5
movq -0x50(%rbp), %rax
movzbl 0x50(%rax), %eax
cmpl $0x0, %eax
jne 0x63425
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x64460
cmpl $0x0, %eax
je 0x63431
movl $0x2, -0x4(%rbp)
jmp 0x63c27
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x63496
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x71, %eax
jne 0x6346b
jmp 0x63496
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x76, %eax
jne 0x63489
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %eax
cmpl $0x71, %eax
jne 0x63489
jmp 0x63496
jmp 0x6348b
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x63438
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x63bf2
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x88(%rbp)
movq $0x0, -0x90(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movl 0x2c(%rax), %eax
movl %eax, -0x94(%rbp)
movl -0x94(%rbp), %ecx
andl $0x20, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x109(%rbp)
je 0x634fa
movl -0x94(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x109(%rbp)
movb -0x109(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x98(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x63bd7
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x71, %eax
je 0x63674
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x76, %eax
jne 0x63572
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x71, %eax
je 0x63674
movq -0x20(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdx
callq 0x54650
movq %rax, -0x90(%rbp)
cmpq $0x0, -0x90(%rbp)
je 0x63656
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x90(%rbp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rcx
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x90(%rbp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
shlq $0x5, %rdx
addq %rdx, %rax
movq %rcx, 0x10(%rax)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, 0x10(%rax)
movq -0x88(%rbp), %rax
movslq -0x2c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0x63bc7
movl $0x0, -0x9c(%rbp)
movq $0x0, -0xa8(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x76, %eax
jne 0x636a8
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa8(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movq -0x38(%rbp), %rcx
movzbl (%rcx), %ecx
cmpl %ecx, %eax
jge 0x63b83
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xc0(%rbp)
movq $0x0, -0xc8(%rbp)
cmpq $0x0, -0xc0(%rbp)
jne 0x63720
movq -0xb0(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x50(%rbp), %rax
cmpb $0x0, 0x50(%rax)
je 0x6372f
jmp 0x63b83
cmpq $0x0, -0xb8(%rbp)
je 0x63752
movq -0xb8(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
jne 0x637e7
movq $0x0, -0xb8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x63784
movq -0xa8(%rbp), %rdi
movq -0xc0(%rbp), %rsi
callq 0xc970
cmpl $0x0, %eax
je 0x63784
jmp 0x63b69
movq -0x50(%rbp), %rdi
movq -0xb0(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x13940
movl %eax, -0xcc(%rbp)
cmpl $0x0, -0xcc(%rbp)
jl 0x637c9
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xcc(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x118(%rbp)
jmp 0x637d9
leaq 0x4c476(%rip), %rax     # 0xafc46
movq %rax, -0x118(%rbp)
jmp 0x637d9
movq -0x118(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0xb0(%rbp), %rcx
movswl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0x63b67
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xd8(%rbp)
cmpq $0x0, -0xa8(%rbp)
je 0x63872
cmpq $0x0, -0xb8(%rbp)
je 0x63872
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0xa8(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
callq 0x610b0
cmpl $0x0, %eax
jne 0x63872
jmp 0x63b59
movq -0xb0(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movzwl 0x2a(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x63899
jmp 0x63b59
movl $0x1, -0x9c(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x63908
cmpq $0x0, -0xa8(%rbp)
jne 0x63908
movq -0x48(%rbp), %rax
movzbl 0x38(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x638e8
movq -0x38(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0xd8(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x64790
cmpl $0x0, %eax
je 0x638e8
jmp 0x63b59
movq -0x48(%rbp), %rax
movq 0x48(%rax), %rdi
movq -0xd8(%rbp), %rsi
callq 0x64830
cmpl $0x0, %eax
jl 0x63906
jmp 0x63b59
jmp 0x63908
movq -0x50(%rbp), %rdi
movq -0xd8(%rbp), %rdx
movl $0x1a, %esi
callq 0x548b0
movq %rax, -0x60(%rbp)
movq -0xd8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq $0x0, -0xe8(%rbp)
cmpl $0x0, -0x98(%rbp)
jne 0x63953
movq -0x38(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jle 0x63a19
movq -0x50(%rbp), %rdi
movq -0xc0(%rbp), %rdx
movl $0x1a, %esi
callq 0x548b0
movq %rax, -0x100(%rbp)
movq -0x20(%rbp), %rdi
movq -0x100(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x76, %esi
xorl %eax, %eax
movl %eax, %r8d
callq 0x508b0
movq %rax, -0x68(%rbp)
cmpq $0x0, -0xc8(%rbp)
je 0x639d9
movq -0x50(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movl $0x1a, %esi
callq 0x548b0
movq %rax, -0x100(%rbp)
movq -0x20(%rbp), %rdi
movq -0x100(%rbp), %rdx
movq -0x68(%rbp), %rcx
movl $0x76, %esi
xorl %eax, %eax
movl %eax, %r8d
callq 0x508b0
movq %rax, -0x68(%rbp)
cmpl $0x0, -0x98(%rbp)
je 0x63a17
movq -0x50(%rbp), %rdi
movq -0xc0(%rbp), %rdx
movq -0xd8(%rbp), %rcx
leaq 0x4bb0f(%rip), %rsi     # 0xaf50a
movb $0x0, %al
callq 0x137f0
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xe8(%rbp)
jmp 0x63a21
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
movq -0x90(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x54650
movq %rax, -0x90(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xf8(%rbp)
movq -0xe0(%rbp), %rdi
callq 0x92f0
movl %eax, -0xf0(%rbp)
movq -0x20(%rbp), %rdi
movq -0x90(%rbp), %rsi
leaq -0xf8(%rbp), %rdx
xorl %ecx, %ecx
callq 0x54790
cmpq $0x0, -0x90(%rbp)
je 0x63b49
movq -0x18(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x63b49
movq -0x90(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x90(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x108(%rbp)
cmpq $0x0, -0xb8(%rbp)
je 0x63b01
movq -0x50(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rsi
callq 0x11720
movq %rax, %rcx
movq -0x108(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x63b36
movq -0x50(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movq -0xc0(%rbp), %rcx
movq -0xe0(%rbp), %r8
leaq 0x4bfcd(%rip), %rsi     # 0xafaee
movb $0x0, %al
callq 0x137f0
movq %rax, %rcx
movq -0x108(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x108(%rbp), %rax
movb 0x19(%rax), %cl
andb $-0x3, %cl
orb $0x2, %cl
movb %cl, 0x19(%rax)
movq -0x50(%rbp), %rdi
movq -0xe8(%rbp), %rsi
callq 0x9cd0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x637ee
jmp 0x63b69
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x48(%rbp), %rax
addq $0x68, %rax
movq %rax, -0x48(%rbp)
jmp 0x636bb
cmpl $0x0, -0x9c(%rbp)
jne 0x63bc5
cmpq $0x0, -0xa8(%rbp)
je 0x63bb1
movq -0x20(%rbp), %rdi
movq -0xa8(%rbp), %rdx
leaq 0x4c0a0(%rip), %rsi     # 0xafc48
movb $0x0, %al
callq 0x136f0
jmp 0x63bc3
movq -0x20(%rbp), %rdi
leaq 0x4c09e(%rip), %rsi     # 0xafc5a
movb $0x0, %al
callq 0x136f0
jmp 0x63bc5
jmp 0x63bc7
jmp 0x63bc9
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x63512
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x47460
movq -0x90(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x63c20
movq -0x18(%rbp), %rax
movq (%rax), %rax
movl (%rax), %eax
movq -0x50(%rbp), %rcx
cmpl 0x70(%rcx), %eax
jle 0x63c20
movq -0x20(%rbp), %rdi
leaq 0x4c055(%rip), %rsi     # 0xafc6e
movb $0x0, %al
callq 0x136f0
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nopw %cs:(%rax,%rax)