// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rdi, %r15
movq (%rdi), %rdi
movq (%rdi), %rdx
movl 0x4(%rsi), %r8d
movl %r8d, %ecx
orl $0x40, %ecx
movl %ecx, 0x4(%rsi)
cmpb $0x0, 0x61(%rdx)
je 0x2d0e87
movl $0x2, %eax
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %eax
testb $0x40, %r8b
jne 0x2d0e75
cmpw $0x0, 0x24(%r15)
je 0x2d0eab
movl 0x84(%rdi), %eax
incl %eax
movl %eax, 0x84(%rdi)
movl %eax, 0x10(%rsi)
movq %rdx, 0x30(%rsp)
movq 0x20(%rsi), %rax
movq %rax, 0x90(%rsp)
movq 0x28(%rsi), %rax
movq %rax, 0x50(%rsp)
movq %rsi, 0x70(%rsp)
movq 0x68(%rsi), %rax
testq %rax, %rax
je 0x2d0ee5
movq 0x190(%rdi), %rcx
movq %rcx, 0x8(%rax)
movq %rax, 0x190(%rdi)
movq %rdi, 0x38(%rsp)
movq 0x50(%rsp), %rbx
movq %rbx, %rsi
callq 0x2d1c8a
leaq 0x8(%rbx), %rax
movq %rax, 0xa0(%rsp)
cmpl $0x0, (%rbx)
jle 0x2d15b6
leaq 0x109b4d(%rip), %r14    # 0x3daa60
xorl %ebx, %ebx
movq 0xa0(%rsp), %r12
movq %r15, 0x10(%rsp)
movl $0x4, %edx
cmpq $0x0, 0x20(%r12)
jne 0x2d152b
movq (%r15), %rdi
movl $0x1, %edx
cmpl $0x0, 0x30(%rdi)
movl $0x1, %eax
jne 0x2d1320
cmpq $0x0, 0x8(%r12)
je 0x2d0f87
xorl %r13d, %r13d
testq %r13, %r13
je 0x2d131e
movq 0x18(%r13), %rsi
testq %rsi, %rsi
je 0x2d1054
movq (%r13), %rdx
xorl %ebp, %ebp
xorl %eax, %eax
callq 0x284eb8
movl $0x1, %edx
movl $0x1, %eax
jmp 0x2d1319
movq 0x10(%r12), %rax
testq %rax, %rax
je 0x2d0f52
movq 0x190(%rdi), %rcx
testq %rcx, %rcx
sete %sil
je 0x2d0f52
movb %sil, 0x18(%rsp)
movq %rdi, 0x40(%rsp)
movslq (%rcx), %rdi
testq %rdi, %rdi
setg %sil
jle 0x2d101a
leaq 0x10(%rcx), %r8
movb $0x1, %sil
xorl %r9d, %r9d
movq %r9, %r11
shlq $0x5, %r11
leaq (%r8,%r11), %r10
movq (%r8,%r11), %r11
xorl %ebp, %ebp
movzbl (%rax,%rbp), %r13d
movzbl (%r11,%rbp), %r15d
cmpb %r15b, %r13b
jne 0x2d0fe8
testq %r13, %r13
jne 0x2d0ff3
jmp 0x2d0ff8
movb (%r13,%r14), %dl
cmpb (%r15,%r14), %dl
jne 0x2d0ff8
incq %rbp
jmp 0x2d0fd2
cmpb %r15b, %r13b
je 0x2d100b
incq %r9
cmpq %rdi, %r9
setb %sil
jne 0x2d0fc1
jmp 0x2d1015
movq %rcx, 0x60(%rsp)
movq %r10, 0x20(%rsp)
movq 0x10(%rsp), %r15
testb $0x1, %sil
jne 0x2d1032
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
sete 0x18(%rsp)
jne 0x2d0fab
testb $0x1, 0x18(%rsp)
movl $0x0, %eax
movq 0x20(%rsp), %r13
cmovneq %rax, %r13
movl $0x1, %edx
movq 0x40(%rsp), %rdi
jmp 0x2d0f55
testb $0x4, 0x3d(%r12)
jne 0x2d10ee
movq %r13, 0x20(%rsp)
movq %rdi, 0x40(%rsp)
movq (%rdi), %r13
movl $0x80, %esi
movq %r13, %rdi
callq 0x283569
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0x2d110d
movl $0x1, 0x3c(%rax)
movq 0x20(%rsp), %rbp
movq (%rbp), %rsi
movq %r13, %rdi
movq %r13, 0x18(%rsp)
movq %rax, %r13
callq 0x283365
movq %rax, (%r13)
movw $0xffff, 0x44(%r13)     # imm = 0xFFFF
movw $0xc8, 0x4a(%r13)
orl $0x202, 0x40(%r13)      # imm = 0x202
movq 0x10(%rbp), %rsi
xorl %ebp, %ebp
movq 0x18(%rsp), %rdi
xorl %edx, %edx
callq 0x2cc285
movq %rax, 0x28(%r12)
movq 0x18(%rsp), %rcx
cmpb $0x0, 0x61(%rcx)
je 0x2d1119
movl $0x7, %eax
jmp 0x2d1314
movq 0x10(%r12), %rdx
xorl %ebp, %ebp
leaq 0x1104bc(%rip), %rsi    # 0x3e15b8
xorl %eax, %eax
callq 0x284eb8
movl $0x1, %eax
jmp 0x2d1314
movl $0x2, %eax
xorl %ebp, %ebp
jmp 0x2d1314
movq %r13, 0x18(%rsp)
movb (%rax), %cl
andb $-0x2, %cl
movb %cl, 0xf(%rsp)
cmpb $-0x7c, %cl
movq 0x60(%rsp), %r8
movq %rax, %r13
jne 0x2d11bd
movq 0x28(%r13), %rax
cmpl $0x0, (%rax)
jle 0x2d11bd
leaq 0x8(%rax), %rcx
xorl %edx, %edx
imulq $0x70, %rdx, %rsi
cmpq $0x0, 0x8(%rcx,%rsi)
je 0x2d1160
incq %rdx
movslq (%rax), %rsi
cmpq %rsi, %rdx
jl 0x2d1147
jmp 0x2d11bd
addq %rcx, %rsi
movq 0x10(%rsi), %rdi
testq %rdi, %rdi
je 0x2d1153
movq 0x20(%rsp), %r8
movq (%r8), %r8
xorl %r9d, %r9d
movzbl (%rdi,%r9), %r10d
movzbl (%r8,%r9), %r11d
cmpb %r11b, %r10b
jne 0x2d118d
testq %r10, %r10
jne 0x2d1197
jmp 0x2d119c
movb (%r10,%r14), %bpl
cmpb (%r11,%r14), %bpl
jne 0x2d119c
incq %r9
jmp 0x2d1177
cmpb %r11b, %r10b
movq 0x60(%rsp), %r8
jne 0x2d1153
movq 0x18(%rsp), %rdi
movq %rdi, 0x20(%rsi)
orb $0x20, 0x3d(%rsi)
incl 0x3c(%rdi)
orb $0x20, 0x5(%r13)
jmp 0x2d1153
movq 0x18(%rsp), %rax
cmpl $0x3, 0x3c(%rax)
jb 0x2d11e3
movq 0x20(%rsp), %rax
movq (%rax), %rdx
xorl %ebp, %ebp
movq 0x40(%rsp), %rdi
leaq 0x11030d(%rip), %rsi    # 0x3e14eb
jmp 0x2d10fc
leaq 0x11032c(%rip), %rax    # 0x3e1516
movq 0x20(%rsp), %rcx
movq %rax, 0x18(%rcx)
movq 0x40(%rsp), %rax
movq 0x190(%rax), %rcx
movq %rcx, 0x58(%rsp)
movq %r8, 0x190(%rax)
cmpb $-0x7c, 0xf(%rsp)
jne 0x2d1233
movq 0x50(%r13), %rbp
movq 0x68(%r13), %rax
movq %rax, 0x68(%rbp)
movq %r15, %rdi
movq %rbp, %rsi
callq 0x2ca2ea
movq $0x0, 0x68(%rbp)
jmp 0x2d123e
movq %r15, %rdi
movq %r13, %rsi
callq 0x2ca2ea
movq 0x40(%rsp), %rdi
movq 0x60(%rsp), %rax
movq %rax, 0x190(%rdi)
movq %r13, %rcx
movq %rcx, %rax
movq 0x50(%rcx), %rcx
testq %rcx, %rcx
jne 0x2d1252
movq 0x20(%rax), %rax
movq 0x20(%rsp), %rcx
movq 0x8(%rcx), %rsi
testq %rsi, %rsi
je 0x2d12ab
testq %rax, %rax
je 0x2d12ae
movl (%rax), %ecx
movl (%rsi), %r8d
cmpl %r8d, %ecx
je 0x2d12ae
movq 0x20(%rsp), %rax
movq (%rax), %rdx
xorl %ebp, %ebp
movq %rdi, %r13
leaq 0x11029a(%rip), %rsi    # 0x3e152d
xorl %eax, %eax
callq 0x284eb8
movq 0x58(%rsp), %rax
movq %rax, 0x190(%r13)
jmp 0x2d1103
movq %rax, %rsi
movq 0x18(%rsp), %rcx
leaq 0x46(%rcx), %rdx
addq $0x8, %rcx
callq 0x2d24b3
cmpb $-0x7c, 0xf(%rsp)
jne 0x2d12f3
btl $0xd, 0x4(%r13)
leaq 0x11027f(%rip), %rax    # 0x3e1553
leaq 0x11029a(%rip), %rcx    # 0x3e1575
cmovaeq %rcx, %rax
movq 0x20(%rsp), %rcx
movq %rax, 0x18(%rcx)
movq %r15, %rdi
movq %r13, %rsi
callq 0x2ca2ea
movq 0x20(%rsp), %rax
movq $0x0, 0x18(%rax)
movq 0x40(%rsp), %rax
movq 0x58(%rsp), %rcx
movq %rcx, 0x190(%rax)
movb $0x1, %bpl
movl $0x1, %edx
testb %bpl, %bpl
je 0x2d1320
xorl %eax, %eax
testl %eax, %eax
jne 0x2d152b
cmpq $0x0, 0x20(%r12)
je 0x2d1344
movq 0x38(%rsp), %rdi
movq %r12, %rsi
callq 0x2d1fff
movl %eax, %edx
jmp 0x2d152b
cmpq $0x0, 0x10(%r12)
je 0x2d13a0
movq 0x38(%rsp), %r15
movq %r15, %rdi
xorl %esi, %esi
movq %r12, %rdx
callq 0x2d1ce5
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0x2d1521
movq %rax, %r13
movl 0x3c(%rax), %eax
cmpl $0xffff, %eax           # imm = 0xFFFF
jb 0x2d13ff
movq (%r13), %rdx
movq %r15, %rdi
leaq 0x1100b4(%rip), %rsi    # 0x3e143f
xorl %eax, %eax
callq 0x284eb8
movq $0x0, 0x20(%r12)
jmp 0x2d1521
movq 0x28(%r12), %rsi
movq %r15, %rdi
callq 0x2ca2ea
testl %eax, %eax
jne 0x2d1526
movq 0x28(%r12), %rbp
movq 0x38(%rsp), %r15
movq (%r15), %rdi
movl $0x80, %esi
callq 0x283569
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0x2d1521
movq %rax, %r13
movl $0x1, 0x3c(%rax)
movq 0x18(%r12), %rsi
movq (%r15), %rdi
testq %rsi, %rsi
je 0x2d154c
callq 0x283365
jmp 0x2d155d
incl %eax
movl %eax, 0x3c(%r13)
cmpl $0x0, 0x54(%r13)
jne 0x2d1418
testb $0x4, 0x3d(%r12)
jne 0x2d150b
cmpl $0x0, 0x54(%r13)
movq 0x10(%rsp), %r15
jne 0x2d142f
cmpq $0x0, 0x18(%r13)
je 0x2d1330
movzbl 0x24(%r15), %ebp
movq 0x38(%rsp), %rdi
movq %r13, %rsi
callq 0x2d1d35
movl $0x1, %edx
testl %eax, %eax
jne 0x2d152b
cmpq $0x0, 0x18(%r13)
je 0x2d1477
movq 0x30(%rsp), %rax
testb $-0x80, 0x33(%rax)
jne 0x2d1477
movq (%r13), %rdx
movq 0x38(%rsp), %rdi
leaq 0x10fff6(%rip), %rsi    # 0x3e1466
xorl %eax, %eax
callq 0x284eb8
movl %ebp, 0x18(%rsp)
cmpl $0x0, 0x54(%r13)
je 0x2d14c0
testb $0x40, 0x3d(%r12)
je 0x2d14c0
movq 0x60(%r13), %rax
testq %rax, %rax
je 0x2d14c0
movzbl 0x1d(%rax), %eax
movq 0x30(%rsp), %rcx
movl 0x30(%rcx), %ecx
shrl $0x7, %ecx
andl $0x1, %ecx
cmpl %eax, %ecx
jae 0x2d14c0
movq (%r13), %rdx
movq 0x38(%rsp), %rdi
leaq 0x10ffcc(%rip), %rsi    # 0x3e1485
xorl %eax, %eax
callq 0x284eb8
movq 0x18(%r13), %rsi
movq 0x30(%rsp), %rdi
xorl %edx, %edx
callq 0x2cc285
movq %rax, 0x28(%r12)
movzwl 0x46(%r13), %ebp
movw $0xffff, 0x46(%r13)     # imm = 0xFFFF
movq 0x10(%rsp), %r15
movw $0x1, 0x24(%r15)
movq %r15, %rdi
movq %rax, %rsi
callq 0x2ca2ea
movl 0x18(%rsp), %eax
movw %ax, 0x24(%r15)
movw %bp, 0x46(%r13)
jmp 0x2d1330
movq 0x10(%r12), %rdx
movq %r15, %rdi
leaq 0x11009e(%rip), %rsi    # 0x3e15b8
xorl %eax, %eax
callq 0x284eb8
movq 0x10(%rsp), %r15
movl $0x1, %edx
testl $0xfffffffb, %edx       # imm = 0xFFFFFFFB
jne 0x2d0e70
incl %ebx
addq $0x70, %r12
movq 0x50(%rsp), %rax
cmpl (%rax), %ebx
jl 0x2d0f22
jmp 0x2d15b6
movl 0x10(%rbp), %edx
leaq 0x110056(%rip), %rsi    # 0x3e15ac
xorl %eax, %eax
callq 0x284f95
movq %rax, (%r13)
movq %rbp, %rax
movq 0x50(%rbp), %rbp
testq %rbp, %rbp
jne 0x2d1561
movq 0x20(%rax), %rsi
leaq 0x46(%r13), %rdx
movq %r13, %rcx
addq $0x8, %rcx
movq 0x38(%rsp), %r15
movq %r15, %rdi
callq 0x2d24b3
movw $0xffff, 0x44(%r13)     # imm = 0xFFFF
movw $0xc8, 0x4a(%r13)
orb $0x2, 0x40(%r13)
cmpl $0x0, 0x30(%r15)
movq 0x10(%rsp), %r15
movl $0x1, %edx
jne 0x2d152b
jmp 0x2d1330
movq 0x38(%rsp), %r15
cmpl $0x0, 0x30(%r15)
jne 0x2d0e70
movq 0x30(%rsp), %r12
cmpb $0x0, 0x61(%r12)
jne 0x2d0e70
movq %r15, %rdi
movq 0x70(%rsp), %r14
movq %r14, %rsi
callq 0x2d20a3
testl %eax, %eax
jne 0x2d0e70
movq 0x90(%rsp), %r13
movslq (%r13), %r10
xorl %eax, %eax
movl $0x0, %ebp
testq %r10, %r10
setg %cl
jle 0x2d1c0f
leaq 0x8(%r13), %rdx
movq %r10, %rsi
negq %rsi
xorl %ebp, %ebp
movl $0x1, %edi
movq (%rdx), %r8
movzbl (%r8), %r9d
cmpl $0x8b, %r9d
je 0x2d163a
cmpl $0xb1, %r9d
jne 0x2d1644
jmp 0x2d1667
movq 0x18(%r8), %r9
cmpb $-0x4f, (%r9)
je 0x2d1667
orl 0x4(%r8), %ebp
cmpq %r10, %rdi
setb %cl
addq $0x18, %rdx
leaq (%rsi,%rdi), %r8
incq %r8
incq %rdi
cmpq $0x1, %r8
jne 0x2d161f
jmp 0x2d1c0f
testb $0x1, %cl
je 0x2d1c0f
cmpl $0x0, (%r13)
jle 0x2d1bf0
leaq 0x8(%r13), %rax
movq %rax, 0x88(%rsp)
movq (%r15), %rax
movq 0x30(%rax), %rax
andl $0x44, %eax
movq %rax, 0x40(%rsp)
xorl %eax, %eax
movq $0x0, 0x10(%rsp)
movq %rax, 0xb8(%rsp)
leaq (%rax,%rax,2), %rax
movq 0x88(%rsp), %rcx
movq (%rcx,%rax,8), %rdx
orl 0x4(%rdx), %ebp
movzbl (%rdx), %ecx
cmpl $0xb1, %ecx
je 0x2d1744
cmpl $0x8b, %ecx
jne 0x2d16e7
movq 0x18(%rdx), %rsi
cmpb $-0x4f, (%rsi)
jne 0x2d16e7
cmpb $-0x75, %cl
jne 0x2d1744
movq 0x10(%rdx), %rax
movq 0x8(%rax), %rdx
jmp 0x2d1746
movq 0x88(%rsp), %rcx
leaq (%rcx,%rax,8), %rbx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x2bb1a3
testq %rax, %rax
je 0x2d1733
movq 0x8(%rbx), %rdx
movslq (%rax), %rcx
leaq (%rcx,%rcx,2), %rcx
movq %rdx, -0x8(%rax,%rcx,8)
movb 0x11(%rbx), %sil
andb $0x3, %sil
movb 0x1(%rax,%rcx,8), %dl
andb $-0x4, %dl
orb %sil, %dl
movb %dl, 0x1(%rax,%rcx,8)
movq $0x0, 0x8(%rbx)
movq %rax, 0x10(%rsp)
movq $0x0, (%rbx)
jmp 0x2d1bd3
xorl %edx, %edx
movq 0x50(%rsp), %rax
cmpl $0x0, (%rax)
jle 0x2d1ba7
movq %rdx, 0x68(%rsp)
movl %ebp, 0x84(%rsp)
movl $0x0, 0x4c(%rsp)
xorl %ebp, %ebp
movq 0xa0(%rsp), %r13
movq 0x18(%r13), %r10
movq 0x20(%r13), %r9
testq %r10, %r10
jne 0x2d1782
movq (%r9), %r10
movb 0x61(%r12), %al
movb %al, 0x2f(%rsp)
testb %al, %al
jne 0x2d1b5b
movq 0x28(%r13), %rcx
testq %rcx, %rcx
je 0x2d17a2
testb $0x8, 0x5(%rcx)
jne 0x2d1808
movq 0x68(%rsp), %r8
testq %r8, %r8
leaq 0x1092af(%rip), %rdi    # 0x3daa60
je 0x2d17e1
xorl %eax, %eax
movzbl (%r8,%rax), %ecx
movzbl (%r10,%rax), %edx
cmpb %dl, %cl
jne 0x2d17ca
testq %rcx, %rcx
jne 0x2d17d4
jmp 0x2d17d9
movb (%rcx,%rdi), %sil
cmpb (%rdx,%rdi), %sil
jne 0x2d17d9
incq %rax
jmp 0x2d17b5
cmpb %dl, %cl
jne 0x2d1b5b
movq 0x70(%r9), %rcx
testq %rcx, %rcx
je 0x2d1811
movq 0x20(%r12), %rdx
addq $0x18, %rdx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
incl %eax
leaq 0x20(%rdx), %rsi
cmpq %rcx, (%rdx)
movq %rsi, %rdx
jne 0x2d17f8
jmp 0x2d1816
xorl %eax, %eax
movq 0x68(%rsp), %r8
jmp 0x2d1836
movl $0xffff8000, %eax       # imm = 0xFFFF8000
testl %eax, %eax
js 0x2d182d
movq 0x20(%r12), %rcx
movl %eax, %eax
shlq $0x5, %rax
movq (%rcx,%rax), %rax
xorl %ecx, %ecx
jmp 0x2d1836
xorl %ecx, %ecx
leaq 0x1020b4(%rip), %rax    # 0x3d38ea
cmpw $0x0, 0x46(%r9)
jle 0x2d1b5b
movq %rax, 0x98(%rsp)
movq %r10, 0x78(%rsp)
testq %r8, %r8
sete %al
movq %rcx, %rdx
setne %cl
movq %rdx, 0x58(%rsp)
testq %rdx, %rdx
setne %dl
andb %cl, %dl
movb %dl, 0x60(%rsp)
cmpl $0x0, 0x4c(%rsp)
setne %cl
andb %al, %cl
movb %cl, 0xf(%rsp)
movl $0x8, %ebx
xorl %r12d, %r12d
xorl %r14d, %r14d
movq %r13, 0xc0(%rsp)
movq %r9, 0x20(%rsp)
movq 0x8(%r9), %r15
movq (%r15,%r12), %rax
movq %rax, 0x18(%rsp)
cmpb $0x0, 0x60(%rsp)
je 0x2d18cd
movq 0x58(%rsp), %rax
movq 0x20(%rax), %rdi
addq %rbx, %rdi
xorl %esi, %esi
movq 0x68(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2d0113
movq 0x20(%rsp), %r9
testl %eax, %eax
je 0x2d1b42
movq 0x70(%rsp), %rax
testb $0x2, 0x6(%rax)
jne 0x2d18e4
testb $0x2, 0x1c(%r15,%r12)
jne 0x2d1b42
cmpb $0x0, 0xf(%rsp)
je 0x2d1938
testb $0x4, 0x3c(%r13)
je 0x2d191d
movl $0x1, %ebp
movq 0x50(%rsp), %rdi
movl 0x4c(%rsp), %esi
movq 0x18(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
movl $0x1, %r9d
callq 0x2d23b8
testl %eax, %eax
jne 0x2d1b3d
movq 0x50(%r13), %rdi
movq 0x18(%rsp), %rsi
callq 0x2d244b
movl $0x1, %ebp
testl %eax, %eax
jns 0x2d1b3d
movq 0x30(%rsp), %rdi
movl $0x3b, %esi
movq 0x18(%rsp), %r13
movq %r13, %rdx
callq 0x2bb34a
movq %rax, %rbp
cmpl $0x4, 0x40(%rsp)
je 0x2d1967
movq 0x50(%rsp), %rax
cmpl $0x2, (%rax)
jl 0x2d1a1b
movq 0x30(%rsp), %r13
movq %r13, %rdi
movl $0x3b, %esi
movq 0x78(%rsp), %rdx
callq 0x2bb34a
movq 0x38(%rsp), %r15
movq %r15, %rdi
movl $0x8b, %esi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x2b6fa0
movq %rax, %rbp
movq 0x98(%rsp), %rdi
testq %rdi, %rdi
je 0x2d19ec
movq %rdi, 0xa8(%rsp)
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movl %eax, 0xb0(%rsp)
movq %r13, %rdi
movl $0x3b, %esi
leaq 0xa8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2bb38d
movq %r15, %rdi
movl $0x8b, %esi
movq %rax, %rdx
movq %rbp, %rcx
callq 0x2b6fa0
movq %rax, %rbp
cmpl $0x4, 0x40(%rsp)
movq 0x18(%rsp), %r13
jne 0x2d1a1b
movq 0x30(%rsp), %rdi
leaq 0x8c119(%rip), %rsi     # 0x35db1d
movq 0x78(%rsp), %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x284f95
movq %rax, %r13
movq %rax, %r15
jmp 0x2d1a1e
xorl %r15d, %r15d
movq 0x38(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rbp, %rdx
callq 0x2bb1a3
movq %rax, 0x10(%rsp)
movq %r13, 0xa8(%rsp)
testq %r13, %r13
movq %r13, 0x18(%rsp)
je 0x2d1a56
movq %r13, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
jmp 0x2d1a58
xorl %eax, %eax
movl %eax, 0xb0(%rsp)
movq 0x38(%rsp), %rbp
movq %rbp, %rdi
movq 0x10(%rsp), %r13
movq %r13, %rsi
leaq 0xa8(%rsp), %rdx
xorl %ecx, %ecx
callq 0x2bb245
testq %r13, %r13
movq 0xc0(%rsp), %r13
je 0x2d1b26
movq 0x70(%rsp), %rax
testb $0x8, 0x5(%rax)
je 0x2d1b26
cmpb $0x1, 0x11c(%rbp)
ja 0x2d1b26
movq 0x10(%rsp), %rcx
movslq (%rcx), %rax
leaq (%rax,%rax,2), %rbp
movq -0x8(%rcx,%rbp,8), %rsi
testq %rsi, %rsi
je 0x2d1ac7
movq 0x30(%rsp), %rdi
callq 0x28c3e7
movq 0x58(%rsp), %rax
testq %rax, %rax
je 0x2d1ae6
movq 0x20(%rax), %rax
movq 0x8(%rax,%rbx), %rsi
movq 0x30(%rsp), %rdi
callq 0x283365
jmp 0x2d1b0b
movq 0x30(%rsp), %rdi
leaq 0x10f811(%rip), %rsi    # 0x3e1303
movq 0x98(%rsp), %rdx
movq 0x78(%rsp), %rcx
movq 0x18(%rsp), %r8
xorl %eax, %eax
callq 0x284f95
movq 0x10(%rsp), %rcx
leaq (%rcx,%rbp,8), %rcx
addq $-0x10, %rcx
movq %rax, 0x8(%rcx)
movb 0x11(%rcx), %al
andb $-0x4, %al
orb $0x2, %al
movb %al, 0x11(%rcx)
movl $0x1, %ebp
testq %r15, %r15
je 0x2d1b3d
movq 0x30(%rsp), %rdi
movq %r15, %rsi
callq 0x28c3e7
movq 0x20(%rsp), %r9
incq %r14
movswq 0x46(%r9), %rax
addq $0x18, %rbx
addq $0x20, %r12
cmpq %rax, %r14
jl 0x2d1892
cmpb $0x0, 0x2f(%rsp)
movq 0x70(%rsp), %r14
movq 0x30(%rsp), %r12
jne 0x2d1b87
movl 0x4c(%rsp), %ecx
incl %ecx
addq $0x70, %r13
movq 0x50(%rsp), %rax
movl %ecx, 0x4c(%rsp)
cmpl (%rax), %ecx
jl 0x2d1772
testl %ebp, %ebp
sete %al
movq 0x38(%rsp), %r15
movq 0x90(%rsp), %r13
movl 0x84(%rsp), %ebp
movq 0x68(%rsp), %rdx
jmp 0x2d1ba9
movb $0x1, %al
testb %al, %al
je 0x2d1bd3
movq %r15, %rdi
testq %rdx, %rdx
je 0x2d1bc5
leaq 0x10f8ea(%rip), %rsi    # 0x3e14a6
xorl %eax, %eax
callq 0x284eb8
jmp 0x2d1bd3
leaq 0x10f8ec(%rip), %rsi    # 0x3e14b8
xorl %eax, %eax
callq 0x284eb8
movq 0xb8(%rsp), %rcx
incq %rcx
movslq (%r13), %rax
cmpq %rax, %rcx
movq %rcx, %rax
jl 0x2d16a1
jmp 0x2d1bf9
movq $0x0, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x2b0183
movq 0x10(%rsp), %rax
movq %rax, 0x20(%r14)
xorl %eax, %eax
movq 0x20(%r14), %rcx
testq %rcx, %rcx
je 0x2d0e75
movl (%rcx), %ecx
cmpl 0x84(%r12), %ecx
jle 0x2d1c3e
leaq 0x10f89d(%rip), %rsi    # 0x3e14cc
movq %r15, %rdi
xorl %eax, %eax
callq 0x284eb8
jmp 0x2d0e70
testl $0x200004, %ebp         # imm = 0x200004
je 0x2d0e75
orb $0x4, 0x6(%r14)
jmp 0x2d0e75