// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/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;
  u32 elistFlags = 0;

  p->selFlags |= SF_Expanded;
  if( db->mallocFailed  ){
    return WRC_Abort;
  }
  assert( p->pSrc!=0 );
  if( (selFlags & SF_Expanded)!=0 ){
    return WRC_Prune;
  }
  if( pWalker->eCode ){
    /* Renumber selId because it has been copied from a view */
    p->selId = ++pParse->nSelect;
  }
  pTabList = p->pSrc;
  pEList = p->pEList;
  sqlite3WithPush(pParse, 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->pTab ) continue;
    assert( pFrom->fg.isRecursive==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;
      if( sqlite3ExpandSubquery(pParse, pFrom) ) return WRC_Abort;
#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->nTabRef>=0xffff ){
        sqlite3ErrorMsg(pParse, "too many references to \"%s\": max 65535",
           pTab->zName);
        pFrom->pTab = 0;
        return WRC_Abort;
      }
      pTab->nTabRef++;
      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;
        u8 eCodeOrig = pWalker->eCode;
        if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
        assert( pFrom->pSelect==0 );
        if( pTab->pSelect && (db->flags & SQLITE_EnableView)==0 ){
          sqlite3ErrorMsg(pParse, "access to view \"%s\" prohibited",
            pTab->zName);
        }
#ifndef SQLITE_OMIT_VIRTUALTABLE
        if( IsVirtual(pTab)
         && pFrom->fg.fromDDL
         && ALWAYS(pTab->pVTable!=0)
         && pTab->pVTable->eVtabRisk > ((db->flags & SQLITE_TrustedSchema)!=0)
        ){
          sqlite3ErrorMsg(pParse, "unsafe use of virtual table \"%s\"",
                                  pTab->zName);
        }
#endif
        pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
        nCol = pTab->nCol;
        pTab->nCol = -1;
        pWalker->eCode = 1;  /* Turn on Select.selId renumbering */
        sqlite3WalkSelect(pWalker, pFrom->pSelect);
        pWalker->eCode = eCodeOrig;
        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( pParse->nErr || 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;
    elistFlags |= pE->flags;
  }
  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;
      elistFlags |= pE->flags;
      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].zEName = a[k].zEName;
          pNew->a[pNew->nExpr-1].eEName = a[k].eEName;
          a[k].zEName = 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].zDbSName : "*";
          }
          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
             && sqlite3MatchEName(&pSub->pEList->a[j], 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, 1)
              ){
                /* 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);
              if( zSchemaName ){
                pLeft = sqlite3Expr(db, TK_ID, zSchemaName);
                pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pExpr);
              }
              if( longNames ){
                zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
                zToFree = zColname;
              }
            }else{
              pExpr = pRight;
            }
            pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
            sqlite3TokenInit(&sColname, zColname);
            sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
            if( pNew && (p->selFlags & SF_NestedFrom)!=0 && !IN_RENAME_OBJECT ){
              struct ExprList_item *pX = &pNew->a[pNew->nExpr-1];
              sqlite3DbFree(db, pX->zEName);
              if( pSub ){
                pX->zEName = sqlite3DbStrDup(db, pSub->pEList->a[j].zEName);
                testcase( pX->zEName==0 );
              }else{
                pX->zEName = sqlite3MPrintf(db, "%s.%s.%s",
                                           zSchemaName, zTabName, zColname);
                testcase( pX->zEName==0 );
              }
              pX->eEName = ENAME_TAB;
            }
            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( p->pEList ){
    if( p->pEList->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
      sqlite3ErrorMsg(pParse, "too many columns in result set");
      return WRC_Abort;
    }
    if( (elistFlags & (EP_HasFunc|EP_Subquery))!=0 ){
      p->selFlags |= SF_ComplexResult;
    }
  }
  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 (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x50(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
movw %ax, -0x6a(%rbp)
movl $0x0, -0x70(%rbp)
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x40, %ecx
movl %ecx, 0x4(%rax)
movq -0x50(%rbp), %rax
cmpb $0x0, 0x61(%rax)
je 0x43924e
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movzwl -0x6a(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x439266
movl $0x1, -0x4(%rbp)
jmp 0x439e53
movq -0x10(%rbp), %rax
cmpw $0x0, 0x24(%rax)
je 0x43928b
movq -0x20(%rbp), %rax
movl 0x84(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x84(%rax)
movq -0x18(%rbp), %rax
movl %ecx, 0x10(%rax)
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x68(%rax), %rsi
xorl %edx, %edx
callq 0x4293c0
movq -0x20(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x439ed0
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x4395bf
movq -0x48(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x4392f5
jmp 0x4395a5
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x439f70
cmpl $0x0, %eax
je 0x439313
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movq -0x48(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x439323
jmp 0x439585
movq -0x48(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x43937b
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x42f7d0
cmpl $0x0, %eax
je 0x439358
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x43a3d0
cmpl $0x0, %eax
je 0x439376
movl $0x2, -0x4(%rbp)
jmp 0x439e53
jmp 0x439583
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rdx
xorl %esi, %esi
callq 0x43a500
movq %rax, %rcx
movq %rcx, -0x78(%rbp)
movq -0x48(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, -0x78(%rbp)
jne 0x4393ac
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movq -0x78(%rbp), %rax
cmpl $0xffff, 0x3c(%rax)     # imm = 0xFFFF
jb 0x4393ea
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rdx
leaq 0x173db9(%rip), %rsi    # 0x5ad184
movb $0x0, %al
callq 0x3cb660
movq -0x48(%rbp), %rax
movq $0x0, 0x20(%rax)
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movq -0x78(%rbp), %rax
movl 0x3c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x3c(%rax)
movq -0x78(%rbp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x43941f
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x43a580
cmpl $0x0, %eax
je 0x43941f
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movq -0x78(%rbp), %rax
cmpl $0x0, 0x54(%rax)
jne 0x439438
movq -0x78(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x439581
movq -0x10(%rbp), %rax
movw 0x24(%rax), %ax
movb %al, -0x83(%rbp)
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rsi
callq 0x43a5e0
cmpl $0x0, %eax
je 0x439464
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movq -0x78(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x4394a0
movq -0x50(%rbp), %rcx
movabsq $0x80000000, %rax       # imm = 0x80000000
andq 0x30(%rcx), %rax
cmpq $0x0, %rax
jne 0x4394a0
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rdx
leaq 0x173d12(%rip), %rsi    # 0x5ad1ab
movb $0x0, %al
callq 0x3cb660
movq -0x78(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x43950e
movq -0x48(%rbp), %rax
movb 0x3d(%rax), %al
shrb $0x6, %al
andb $0x1, %al
movzbl %al, %eax
cmpl $0x0, %eax
je 0x43950e
movq -0x78(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x43950e
movq -0x78(%rbp), %rax
movq 0x60(%rax), %rax
movzbl 0x1d(%rax), %eax
movq -0x50(%rbp), %rcx
movq 0x30(%rcx), %rcx
andq $0x80, %rcx
cmpq $0x0, %rcx
setne %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jle 0x43950e
movq -0x20(%rbp), %rdi
movq -0x78(%rbp), %rax
movq (%rax), %rdx
leaq 0x173cc3(%rip), %rsi    # 0x5ad1ca
movb $0x0, %al
callq 0x3cb660
movq -0x50(%rbp), %rdi
movq -0x78(%rbp), %rax
movq 0x18(%rax), %rsi
xorl %edx, %edx
callq 0x4325b0
movq %rax, %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x78(%rbp), %rax
movw 0x46(%rax), %ax
movw %ax, -0x82(%rbp)
movq -0x78(%rbp), %rax
movw $0xffff, 0x46(%rax)     # imm = 0xFFFF
movq -0x10(%rbp), %rax
movw $0x1, 0x24(%rax)
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rsi
callq 0x42f7d0
movzbl -0x83(%rbp), %eax
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x24(%rax)
movw -0x82(%rbp), %cx
movq -0x78(%rbp), %rax
movw %cx, 0x46(%rax)
jmp 0x439583
jmp 0x439585
movq -0x20(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x43a910
cmpl $0x0, %eax
je 0x4395a3
movl $0x2, -0x4(%rbp)
jmp 0x439e53
jmp 0x4395a5
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x48(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x48(%rbp)
jmp 0x4392d6
movq -0x20(%rbp), %rax
cmpl $0x0, 0x30(%rax)
jne 0x4395e8
movq -0x50(%rbp), %rax
movzbl 0x61(%rax), %eax
cmpl $0x0, %eax
jne 0x4395e8
movq -0x20(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x43aa00
cmpl $0x0, %eax
je 0x4395f4
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x43966a
movq -0x40(%rbp), %rax
addq $0x8, %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xb1, %eax
jne 0x439630
jmp 0x43966a
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8b, %eax
jne 0x439652
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movzbl (%rax), %eax
cmpl $0xb1, %eax
jne 0x439652
jmp 0x43966a
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
orl -0x70(%rbp), %eax
movl %eax, -0x70(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4395fb
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x439df1
movq -0x40(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x90(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq 0x30(%rax), %rax
movl %eax, -0x9c(%rbp)
movl -0x9c(%rbp), %ecx
andl $0x4, %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x111(%rbp)
je 0x4396cf
movl -0x9c(%rbp), %eax
andl $0x40, %eax
cmpl $0x0, %eax
sete %al
movb %al, -0x111(%rbp)
movb -0x111(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0xa0(%rbp)
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x439dd5
movq -0x90(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
movl 0x4(%rax), %eax
orl -0x70(%rbp), %eax
movl %eax, -0x70(%rbp)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x60(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xb1, %eax
je 0x439852
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8b, %eax
jne 0x43975a
movq -0x60(%rbp), %rax
movzbl (%rax), %eax
cmpl $0xb1, %eax
je 0x439852
movq -0x20(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdx
callq 0x41d3c0
movq %rax, -0x98(%rbp)
cmpq $0x0, -0x98(%rbp)
je 0x439834
movq -0x90(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rcx
movq -0x98(%rbp), %rax
addq $0x8, %rax
movq -0x98(%rbp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x90(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movb 0x11(%rax), %al
andb $0x3, %al
movzbl %al, %ecx
movq -0x98(%rbp), %rax
addq $0x8, %rax
movq -0x98(%rbp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movb %cl, %dl
movb 0x11(%rax), %cl
andb $0x3, %dl
andb $-0x4, %cl
orb %dl, %cl
movb %cl, 0x11(%rax)
movq -0x90(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, 0x8(%rax)
movq -0x90(%rbp), %rax
movslq -0x2c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0x439dc5
movl $0x0, -0xa4(%rbp)
movq $0x0, -0xb0(%rbp)
movq -0x58(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x8b, %eax
jne 0x439888
movq -0x58(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, -0xb0(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x48(%rbp)
movl -0x24(%rbp), %eax
movq -0x38(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x439d81
movq -0x48(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0xb8(%rbp)
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0xc0(%rbp)
movq -0x48(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xc8(%rbp)
movq $0x0, -0xd0(%rbp)
cmpq $0x0, -0xc8(%rbp)
jne 0x4398fd
movq -0xb8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0x50(%rbp), %rax
cmpb $0x0, 0x61(%rax)
je 0x43990c
jmp 0x439d81
cmpq $0x0, -0xc0(%rbp)
je 0x43992e
movq -0xc0(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
jne 0x4399c3
movq $0x0, -0xc0(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0x439960
movq -0xb0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
callq 0x3c3e60
cmpl $0x0, %eax
je 0x439960
jmp 0x439d67
movq -0x50(%rbp), %rdi
movq -0xb8(%rbp), %rax
movq 0x70(%rax), %rsi
callq 0x3cb770
movl %eax, -0xd4(%rbp)
cmpl $0x0, -0xd4(%rbp)
jl 0x4399a5
movq -0x50(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xd4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x120(%rbp)
jmp 0x4399b5
leaq 0x163cdc(%rip), %rax    # 0x59d688
movq %rax, -0x120(%rbp)
jmp 0x4399b5
movq -0x120(%rbp), %rax
movq %rax, -0xd0(%rbp)
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
movq -0xb8(%rbp), %rcx
movswl 0x46(%rcx), %ecx
cmpl %ecx, %eax
jge 0x439d65
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
cmpq $0x0, -0xb0(%rbp)
je 0x439a4b
cmpq $0x0, -0xc0(%rbp)
je 0x439a4b
movq -0xc0(%rbp), %rax
movq 0x20(%rax), %rdi
addq $0x8, %rdi
movslq -0x28(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
movq -0xb0(%rbp), %rdx
xorl %eax, %eax
movl %eax, %ecx
movq %rcx, %rsi
callq 0x437c80
cmpl $0x0, %eax
jne 0x439a4b
jmp 0x439d57
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x20000, %eax          # imm = 0x20000
cmpl $0x0, %eax
jne 0x439a83
movq -0xb8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x28(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzwl 0x1c(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x439a83
jmp 0x439d57
movl $0x1, -0xa4(%rbp)
cmpl $0x0, -0x24(%rbp)
jle 0x439af8
cmpq $0x0, -0xb0(%rbp)
jne 0x439af8
movq -0x48(%rbp), %rax
movzbl 0x3c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x439ad8
movq -0x38(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0xe0(%rbp), %rdx
xorl %eax, %eax
movl %eax, %r8d
movl $0x1, %r9d
movq %r8, %rcx
callq 0x43ad50
cmpl $0x0, %eax
je 0x439ad8
jmp 0x439d57
movq -0x48(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0xe0(%rbp), %rsi
callq 0x43ae30
cmpl $0x0, %eax
jl 0x439af6
jmp 0x439d57
jmp 0x439af8
movq -0x50(%rbp), %rdi
movq -0xe0(%rbp), %rdx
movl $0x3b, %esi
callq 0x41d620
movq %rax, -0x60(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xe8(%rbp)
movq $0x0, -0xf0(%rbp)
cmpl $0x0, -0xa0(%rbp)
jne 0x439b40
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
jle 0x439bfc
movq -0x50(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movl $0x3b, %esi
callq 0x41d620
movq %rax, -0x108(%rbp)
movq -0x20(%rbp), %rdi
movq -0x108(%rbp), %rdx
movq -0x60(%rbp), %rcx
movl $0x8b, %esi
callq 0x418540
movq %rax, -0x68(%rbp)
cmpq $0x0, -0xd0(%rbp)
je 0x439bbc
movq -0x50(%rbp), %rdi
movq -0xd0(%rbp), %rdx
movl $0x3b, %esi
callq 0x41d620
movq %rax, -0x108(%rbp)
movq -0x20(%rbp), %rdi
movq -0x108(%rbp), %rdx
movq -0x68(%rbp), %rcx
movl $0x8b, %esi
callq 0x418540
movq %rax, -0x68(%rbp)
cmpl $0x0, -0xa0(%rbp)
je 0x439bfa
movq -0x50(%rbp), %rdi
movq -0xc8(%rbp), %rdx
movq -0xe0(%rbp), %rcx
leaq 0xebfe7(%rip), %rsi     # 0x525bc5
movb $0x0, %al
callq 0x3cb7d0
movq %rax, -0xe8(%rbp)
movq -0xe8(%rbp), %rax
movq %rax, -0xf0(%rbp)
jmp 0x439c04
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x20(%rbp), %rdi
movq -0x98(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0x41d3c0
movq %rax, -0x98(%rbp)
movq -0xe8(%rbp), %rsi
leaq -0x100(%rbp), %rdi
callq 0x434fd0
movq -0x20(%rbp), %rdi
movq -0x98(%rbp), %rsi
leaq -0x100(%rbp), %rdx
xorl %ecx, %ecx
callq 0x41d4e0
cmpq $0x0, -0x98(%rbp)
je 0x439d47
movq -0x18(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x439d47
movq -0x20(%rbp), %rax
movzbl 0x11c(%rax), %eax
cmpl $0x2, %eax
jge 0x439d47
movq -0x98(%rbp), %rax
addq $0x8, %rax
movq -0x98(%rbp), %rcx
movl (%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x110(%rbp)
movq -0x50(%rbp), %rdi
movq -0x110(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x3c00a0
cmpq $0x0, -0xc0(%rbp)
je 0x439cff
movq -0x50(%rbp), %rdi
movq -0xc0(%rbp), %rax
movq 0x20(%rax), %rax
addq $0x8, %rax
movslq -0x28(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rsi
callq 0x3c91a0
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x439d34
movq -0x50(%rbp), %rdi
movq -0xd0(%rbp), %rdx
movq -0xc8(%rbp), %rcx
movq -0xe8(%rbp), %r8
leaq 0x173329(%rip), %rsi    # 0x5ad048
movb $0x0, %al
callq 0x3cb7d0
movq %rax, %rcx
movq -0x110(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x110(%rbp), %rax
movb 0x11(%rax), %cl
andb $-0x4, %cl
orb $0x2, %cl
movb %cl, 0x11(%rax)
movq -0x50(%rbp), %rdi
movq -0xf0(%rbp), %rsi
callq 0x3c00a0
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x4399ca
jmp 0x439d67
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
movq -0x48(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x48(%rbp)
jmp 0x43989b
cmpl $0x0, -0xa4(%rbp)
jne 0x439dc3
cmpq $0x0, -0xb0(%rbp)
je 0x439daf
movq -0x20(%rbp), %rdi
movq -0xb0(%rbp), %rdx
leaq 0x173445(%rip), %rsi    # 0x5ad1eb
movb $0x0, %al
callq 0x3cb660
jmp 0x439dc1
movq -0x20(%rbp), %rdi
leaq 0x173443(%rip), %rsi    # 0x5ad1fd
movb $0x0, %al
callq 0x3cb660
jmp 0x439dc3
jmp 0x439dc5
jmp 0x439dc7
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x4396e7
movq -0x50(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x40c6a0
movq -0x98(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x439e4c
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movl (%rax), %eax
movq -0x50(%rbp), %rcx
cmpl 0x84(%rcx), %eax
jle 0x439e2d
movq -0x20(%rbp), %rdi
leaq 0x1733f4(%rip), %rsi    # 0x5ad211
movb $0x0, %al
callq 0x3cb660
movl $0x2, -0x4(%rbp)
jmp 0x439e53
movl -0x70(%rbp), %eax
andl $0x200004, %eax         # imm = 0x200004
cmpl $0x0, %eax
je 0x439e4a
movq -0x18(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x40000, %ecx          # imm = 0x40000
movl %ecx, 0x4(%rax)
jmp 0x439e4c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x120, %rsp            # imm = 0x120
popq %rbp
retq
nop