// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq 0x10(%rdi), %r14
movq (%r14), %rdx
movzwl 0xa(%rsi), %eax
movl %eax, %ecx
orl $0x10, %ecx
movw %cx, 0xa(%rsi)
pushq $0x2
popq %rbx
cmpb $0x0, 0x50(%rdx)
jne 0x4521f
movq 0x28(%rsi), %r15
testq %r15, %r15
setne %cl
testb $0x10, %al
sete %al
andb %cl, %al
pushq $0x1
popq %rbx
cmpb $0x1, %al
jne 0x4521f
movq %rdi, -0x38(%rbp)
movq %rdx, -0x68(%rbp)
movq %rsi, -0xa8(%rbp)
movq (%rsi), %rax
movq %rax, -0x98(%rbp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x457b2
leaq 0x8(%r15), %r13
movq %r13, -0xe8(%rbp)
xorl %ebx, %ebx
movq %r14, -0x40(%rbp)
movq %r15, -0x80(%rbp)
movzbl (%r15), %eax
cmpl %eax, %ebx
jae 0x44f9f
cmpq $0x0, 0x20(%r13)
jne 0x451e7
cmpq $0x0, 0x10(%r13)
je 0x44ef6
movq %r14, %rdi
xorl %esi, %esi
movq %r13, %rdx
callq 0x45a80
movq %rax, 0x20(%r13)
testq %rax, %rax
je 0x4521c
movq %rax, %r14
movzwl 0x44(%rax), %eax
cmpw $-0x1, %ax
je 0x451eb
incl %eax
movw %ax, 0x44(%r14)
cmpq $0x0, 0x18(%r14)
jne 0x44ebe
testb $0x10, 0x46(%r14)
je 0x44f7d
movq -0x40(%rbp), %rdi
movq %r14, %rsi
callq 0x45ad0
testl %eax, %eax
jne 0x4521c
movq 0x18(%r14), %rsi
movq -0x68(%rbp), %rdi
xorl %edx, %edx
callq 0x443e4
movq %rax, 0x28(%r13)
movq -0x38(%rbp), %rdi
movq %rax, %rsi
callq 0x43d4b
jmp 0x44f7d
movq 0x28(%r13), %r12
movq -0x38(%rbp), %rdi
movq %r12, %rsi
callq 0x43d4b
movq -0x68(%rbp), %r15
movq %r15, %rdi
pushq $0x78
popq %rsi
callq 0xf4ae
movq %rax, 0x20(%r13)
testq %rax, %rax
je 0x4521c
movq %rax, %r14
movw $0x1, 0x44(%rax)
movq %r15, %rdi
leaq 0x281fa(%rip), %rsi     # 0x6d12f
movq %rax, %rdx
xorl %eax, %eax
callq 0x10594
movq %rax, (%r14)
movq %r12, %rax
movq 0x50(%r12), %r12
testq %r12, %r12
jne 0x44f42
movq (%rax), %rsi
leaq 0x42(%r14), %rdx
movq %r14, %rcx
addq $0x8, %rcx
movq -0x40(%rbp), %rdi
callq 0x45816
orw $-0x1, 0x40(%r14)
movl $0xf4240, 0x38(%r14)    # imm = 0xF4240
orb $0x2, 0x46(%r14)
movq -0x80(%rbp), %r15
movq -0x40(%rbp), %r14
movq %r14, %rdi
movq %r13, %rsi
callq 0x45cb2
testl %eax, %eax
jne 0x4521c
incl %ebx
addq $0x68, %r13
jmp 0x44e5c
movq -0x68(%rbp), %r13
cmpb $0x0, 0x50(%r13)
jne 0x4521c
movq -0xa8(%rbp), %rax
movq 0x28(%rax), %rcx
leaq 0x8(%rcx), %rdx
movq %rcx, -0x48(%rbp)
addq $0x70, %rcx
addq $0x30, %rax
movq %rax, -0x90(%rbp)
xorl %esi, %esi
movq -0x48(%rbp), %rax
movzbl (%rax), %eax
decl %eax
cmpl %eax, %esi
jge 0x45233
movq %rsi, -0x78(%rbp)
movq %rcx, -0x30(%rbp)
movq 0x20(%rcx), %rdi
movq %rdx, -0xc0(%rbp)
cmpq $0x0, 0x20(%rdx)
sete %al
testq %rdi, %rdi
sete %cl
orb %al, %cl
jne 0x45138
movq -0x30(%rbp), %rax
movzbl 0x38(%rax), %eax
movl %eax, %ecx
andl $0x20, %ecx
movl %ecx, -0x50(%rbp)
shrl $0x5, %ecx
movq %rcx, -0xb8(%rbp)
testb $0x4, %al
movq -0x48(%rbp), %r15
movq -0x90(%rbp), %r13
movq %rdi, -0x38(%rbp)
jne 0x4515e
movq -0x30(%rbp), %rbx
movq 0x40(%rbx), %rdx
testq %rdx, %rdx
movq -0x40(%rbp), %r14
je 0x45087
cmpq $0x0, 0x48(%rbx)
jne 0x4579c
cmpl $0x0, -0x50(%rbp)
je 0x4506e
movl 0x3c(%rbx), %esi
movq %rdx, %rdi
callq 0x45ebf
movq 0x40(%rbx), %rdx
movq (%r14), %rdi
movq (%r13), %rsi
callq 0x45ef0
movq %rax, (%r13)
andq $0x0, 0x40(%rbx)
movq -0x38(%rbp), %rdi
movq 0x48(%rbx), %rcx
testq %rcx, %rcx
je 0x45138
movq -0x78(%rbp), %rax
leal 0x1(%rax), %r15d
xorl %edx, %edx
xorl %ebx, %ebx
movq %rcx, -0x60(%rbp)
movslq 0x8(%rcx), %rax
cmpq %rax, %rbx
jge 0x45138
movq (%rcx), %rax
movq %rdx, -0x50(%rbp)
movq (%rax,%rdx), %r12
movq %r12, %rsi
callq 0x45f91
testl %eax, %eax
movq -0x48(%rbp), %r13
js 0x45207
movl %eax, %r14d
movq %r13, %rdi
movl %r15d, %esi
movq %r12, %rdx
leaq -0xd0(%rbp), %rcx
leaq -0x6c(%rbp), %r8
callq 0x45d34
testl %eax, %eax
je 0x45207
movl -0xd0(%rbp), %edx
movl -0x6c(%rbp), %ecx
movq -0x40(%rbp), %rdi
movq %r13, %rsi
movl %r15d, %r8d
movl %r14d, %r9d
movq %rdi, %r14
pushq -0x90(%rbp)
pushq -0xb8(%rbp)
callq 0x45e2c
popq %rax
popq %rcx
incq %rbx
movq -0x50(%rbp), %rdx
addq $0x10, %rdx
movq -0x38(%rbp), %rdi
movq -0x60(%rbp), %rcx
jmp 0x450a4
movq -0x78(%rbp), %rsi
incl %esi
movq -0x30(%rbp), %rcx
addq $0x68, %rcx
movq -0xc0(%rbp), %rdx
addq $0x68, %rdx
movq -0x68(%rbp), %r13
movq -0x80(%rbp), %r15
jmp 0x44fd2
movq -0x30(%rbp), %rax
cmpq $0x0, 0x40(%rax)
jne 0x4577c
cmpq $0x0, 0x48(%rax)
jne 0x4577c
movq -0x78(%rbp), %rax
leal 0x1(%rax), %r14d
xorl %ebx, %ebx
xorl %r12d, %r12d
movswq 0x42(%rdi), %rax
cmpq %rax, %r12
jge 0x4503d
movq 0x8(%rdi), %rax
movq (%rax,%rbx), %rdx
movq %r15, %rdi
movl %r14d, %esi
leaq -0xd0(%rbp), %rcx
leaq -0x6c(%rbp), %r8
callq 0x45d34
testl %eax, %eax
je 0x451da
movl -0xd0(%rbp), %edx
movl -0x6c(%rbp), %ecx
movq -0x40(%rbp), %rdi
movq %r15, %rsi
movl %r14d, %r8d
movl %r12d, %r9d
pushq %r13
pushq -0xb8(%rbp)
callq 0x45e2c
popq %rax
popq %rcx
incq %r12
addq $0x30, %rbx
movq -0x38(%rbp), %rdi
jmp 0x45185
pushq $0x1
jmp 0x4521e
movq (%r14), %rdx
leaq 0x27f4e(%rip), %rsi     # 0x6d143
movq -0x40(%rbp), %rdi
xorl %eax, %eax
callq 0x104d6
andq $0x0, 0x20(%r13)
jmp 0x4521c
leaq 0x28042(%rip), %rsi     # 0x6d250
movq -0x40(%rbp), %rdi
movq %r12, %rdx
xorl %eax, %eax
callq 0x104d6
pushq $0x2
popq %rbx
movl %ebx, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq -0x98(%rbp), %rax
movl (%rax), %eax
xorl %ecx, %ecx
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
shlq $0x5, %rdx
cmpq %rcx, %rdx
je 0x45285
movq -0x98(%rbp), %rsi
movq 0x8(%rsi), %rsi
movq %rsi, -0xd8(%rbp)
movq (%rsi,%rcx), %rsi
movzbl (%rsi), %edi
cmpl $0x76, %edi
je 0x45276
cmpl $0x71, %edi
jne 0x4527f
jmp 0x45294
movq 0x18(%rsi), %rsi
cmpb $0x71, (%rsi)
je 0x45294
addq $0x20, %rcx
jmp 0x4524c
movq -0xa8(%rbp), %rax
movq (%rax), %rcx
jmp 0x4574e
movq (%r14), %rcx
movl 0x2c(%rcx), %ecx
andl $0x60, %ecx
movl %ecx, -0x78(%rbp)
xorl %ecx, %ecx
movq $0x0, -0x60(%rbp)
cltq
cmpq %rax, %rcx
jge 0x45731
movq %rcx, -0xa0(%rbp)
movq %rcx, %rbx
shlq $0x5, %rbx
movq -0xd8(%rbp), %rax
movq (%rax,%rbx), %rdx
movzbl (%rdx), %eax
cmpl $0x71, %eax
je 0x4533e
cmpl $0x76, %eax
jne 0x452ee
movq 0x18(%rdx), %rax
cmpb $0x71, (%rax)
jne 0x452ee
movq 0x10(%rdx), %rax
movq 0x8(%rax), %rbx
jmp 0x45340
addq -0xd8(%rbp), %rbx
movq %r14, %rdi
movq -0x60(%rbp), %rsi
callq 0x3b491
testq %rax, %rax
je 0x4532a
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)
movq %rax, -0x60(%rbp)
andq $0x0, (%rbx)
movq -0xa0(%rbp), %rax
jmp 0x456ec
xorl %ebx, %ebx
movl $0x0, -0x30(%rbp)
movq -0xe8(%rbp), %r12
xorl %ecx, %ecx
movq %rbx, -0xf0(%rbp)
movzbl (%r15), %eax
cmpl %eax, %ecx
movq -0xa0(%rbp), %rax
jae 0x456e6
movq 0x18(%r12), %rsi
movq 0x20(%r12), %rdx
movq %rsi, -0x88(%rbp)
testq %rsi, %rsi
jne 0x4538a
movq (%rdx), %rsi
movq %rsi, -0x88(%rbp)
cmpb $0x0, 0x50(%r13)
jne 0x456e6
movl %ecx, -0x54(%rbp)
movq 0x28(%r12), %rsi
testq %rsi, %rsi
movq %rdx, -0x48(%rbp)
je 0x453ac
testb $0x2, 0xb(%rsi)
jne 0x453f5
testq %rbx, %rbx
je 0x453cc
movq %rbx, %rdi
movq -0x88(%rbp), %rsi
callq 0xb1bf
movq -0x48(%rbp), %rdx
testl %eax, %eax
jne 0x456d8
movq 0x68(%rdx), %rsi
movq %r13, %rdi
callq 0x1064e
testl %eax, %eax
js 0x45402
movq 0x20(%r13), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %rax
movq %rax, -0xb0(%rbp)
xorl %esi, %esi
jmp 0x45412
movq $0x0, -0xb0(%rbp)
jmp 0x45416
xorl %esi, %esi
leaq 0x27d5f(%rip), %rax     # 0x6d16a
movq %rax, -0xb0(%rbp)
movq -0x48(%rbp), %rdx
movq %r12, -0xe0(%rbp)
testq %rbx, %rbx
setne %al
sete %cl
movq %rsi, -0x90(%rbp)
testq %rsi, %rsi
setne %sil
andb %al, %sil
movb %sil, -0xb8(%rbp)
cmpl $0x0, -0x54(%rbp)
setne %al
andb %cl, %al
movb %al, -0xc0(%rbp)
pushq $0x10
popq %rcx
xorl %r14d, %r14d
xorl %r15d, %r15d
movswq 0x42(%rdx), %rax
cmpq %rax, %r15
jge 0x456c9
movq 0x8(%rdx), %r12
movq (%r12,%r14), %rax
movq %rax, -0x38(%rbp)
cmpb $0x0, -0xb8(%rbp)
je 0x454c3
movq -0x90(%rbp), %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq (%rax,%rcx), %rdi
xorl %esi, %esi
movq %rbx, %rdx
movq %r14, -0x50(%rbp)
movq %r15, %r14
movq %rbx, %r15
movq %r13, %rbx
movq %rcx, %r13
xorl %ecx, %ecx
callq 0x43e73
movq %r13, %rcx
movq %rbx, %r13
movq %r15, %rbx
movq %r14, %r15
movq -0x50(%rbp), %r14
movq -0x48(%rbp), %rdx
testl %eax, %eax
je 0x456b9
testb $0x2, 0x2a(%r12,%r14)
jne 0x456b9
movq %rcx, -0x50(%rbp)
cmpb $0x0, -0xc0(%rbp)
je 0x4551e
movq -0xe0(%rbp), %r12
testb $0x4, 0x38(%r12)
je 0x45508
movq -0x80(%rbp), %rdi
movl -0x54(%rbp), %esi
movq -0x38(%rbp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x45d34
testl %eax, %eax
jne 0x456ab
movq 0x48(%r12), %rdi
movq -0x38(%rbp), %rsi
callq 0x45da8
testl %eax, %eax
jns 0x456ab
movq %r13, %rdi
pushq $0x1a
popq %rsi
movq -0x38(%rbp), %rdx
callq 0x3b590
movq %rax, %r12
cmpl $0x20, -0x78(%rbp)
je 0x45543
movq -0x80(%rbp), %rax
cmpb $0x2, (%rax)
jb 0x455cf
movq %r13, %rdi
pushq $0x1a
popq %rbx
movl %ebx, %esi
movq -0x88(%rbp), %rdx
callq 0x3b590
movq -0x40(%rbp), %r13
movq %r13, %rdi
pushq $0x76
popq %rsi
movq %rax, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x36a09
movq %rax, %r12
movq -0xb0(%rbp), %rdx
testq %rdx, %rdx
je 0x455a0
movq -0x68(%rbp), %rdi
movl %ebx, %esi
callq 0x3b590
movq %r13, %rdi
pushq $0x76
popq %rsi
movq %rax, %rdx
movq %r12, %rcx
xorl %r8d, %r8d
callq 0x36a09
movq %rax, %r12
movq %r12, %rbx
cmpl $0x20, -0x78(%rbp)
jne 0x455d2
movq -0x68(%rbp), %rdi
leaq 0x2747a(%rip), %rsi     # 0x6ca2e
movq -0x88(%rbp), %rdx
movq -0x38(%rbp), %rcx
xorl %eax, %eax
callq 0x10594
movq %rax, %r12
movq %rax, -0x30(%rbp)
jmp 0x455de
movq %r12, %rbx
movq $0x0, -0x30(%rbp)
movq -0x38(%rbp), %r12
movq -0x40(%rbp), %r13
movq %r13, %rdi
movq -0x60(%rbp), %rsi
movq %rbx, %rdx
callq 0x3b491
movq %rax, %rbx
movq %r12, -0xd0(%rbp)
movq %r12, %rdi
callq 0x8f8e
movl %eax, -0xc8(%rbp)
movq %r13, %rdi
movq %rbx, %rsi
leaq -0xd0(%rbp), %rdx
xorl %ecx, %ecx
callq 0x3b53e
movq %rbx, -0x60(%rbp)
testq %rbx, %rbx
movq -0x68(%rbp), %r13
movq -0xf0(%rbp), %rbx
je 0x4569f
movq -0xa8(%rbp), %rax
testb $0x2, 0xb(%rax)
je 0x4569f
movq %r12, %r8
movq -0x60(%rbp), %rax
movslq (%rax), %r12
shlq $0x5, %r12
addq 0x8(%rax), %r12
movq -0x90(%rbp), %rax
testq %rax, %rax
je 0x45675
movq (%rax), %rax
movq 0x8(%rax), %rax
movq -0x50(%rbp), %rcx
movq (%rax,%rcx), %rsi
movq %r13, %rdi
callq 0xf173
jmp 0x45694
movq %r13, %rdi
leaq 0x27993(%rip), %rsi     # 0x6d012
movq -0xb0(%rbp), %rdx
movq -0x88(%rbp), %rcx
xorl %eax, %eax
callq 0x10594
movq %rax, -0x10(%r12)
orb $0x2, -0x7(%r12)
movq %r13, %rdi
movq -0x30(%rbp), %rsi
callq 0x968b
pushq $0x1
popq %rax
movl %eax, -0x30(%rbp)
movq -0x48(%rbp), %rdx
movq -0x50(%rbp), %rcx
incq %r15
addq $0x30, %r14
addq $0x20, %rcx
jmp 0x45456
movq -0x40(%rbp), %r14
movq -0x80(%rbp), %r15
movq -0xe0(%rbp), %r12
movl -0x54(%rbp), %ecx
incl %ecx
addq $0x68, %r12
jmp 0x45357
cmpl $0x0, -0x30(%rbp)
je 0x45700
incq %rax
movq %rax, %rcx
movq -0x98(%rbp), %rax
movl (%rax), %eax
jmp 0x452aa
movq %r14, %rdi
testq %rbx, %rbx
je 0x4571e
leaq 0x27a5d(%rip), %rsi     # 0x6d16c
movq %rbx, %rdx
xorl %eax, %eax
callq 0x104d6
jmp 0x45332
leaq 0x27a59(%rip), %rsi     # 0x6d17e
xorl %eax, %eax
callq 0x104d6
jmp 0x45332
movq %r13, %rdi
movq -0x98(%rbp), %rsi
callq 0x2f527
movq -0xa8(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, (%rax)
testq %rcx, %rcx
je 0x45795
movl (%rcx), %eax
cmpl 0x70(%r13), %eax
movl $0x0, %ebx
jle 0x4521f
leaq 0x27a27(%rip), %rsi     # 0x6d192
xorl %ebx, %ebx
movq %r14, %rdi
xorl %eax, %eax
callq 0x104d6
jmp 0x4521f
leaq 0x27a64(%rip), %rsi     # 0x6d1e7
movq -0x40(%rbp), %rdi
xorl %edx, %edx
xorl %eax, %eax
callq 0x104d6
jmp 0x4521c
xorl %ebx, %ebx
jmp 0x4521f
leaq 0x27a76(%rip), %rsi     # 0x6d219
movq %r14, %rdi
xorl %eax, %eax
callq 0x104d6
jmp 0x4521c