// File: /workspace/github_c_makefile_star2_O1/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: lookupName
static int lookupName(
  Parse *pParse,       /* The parsing context */
  const char *zDb,     /* Name of the database containing table, or NULL */
  const char *zTab,    /* Name of table containing column, or NULL */
  const char *zCol,    /* Name of the column. */
  NameContext *pNC,    /* The name context used to resolve the name */
  Expr *pExpr          /* Make this EXPR node point to the selected column */
){
  int i, j;                         /* Loop counters */
  int cnt = 0;                      /* Number of matching column names */
  int cntTab = 0;                   /* Number of matching table names */
  int nSubquery = 0;                /* How many levels of subquery */
  sqlite3 *db = pParse->db;         /* The database connection */
  struct SrcList_item *pItem;       /* Use for looping over pSrcList items */
  struct SrcList_item *pMatch = 0;  /* The matching pSrcList item */
  NameContext *pTopNC = pNC;        /* First namecontext in the list */
  Schema *pSchema = 0;              /* Schema of the expression */
  int isTrigger = 0;                /* True if resolved to a trigger column */
  Table *pTab = 0;                  /* Table hold the row */
  Column *pCol;                     /* A column of pTab */

  assert( pNC );     /* the name context cannot be NULL. */
  assert( zCol );    /* The Z in X.Y.Z cannot be NULL */
  assert( !ExprHasProperty(pExpr, EP_TokenOnly|EP_Reduced) );

  /* Initialize the node to no-match */
  pExpr->iTable = -1;
  pExpr->pTab = 0;
  ExprSetVVAProperty(pExpr, EP_NoReduce);

  /* Translate the schema name in zDb into a pointer to the corresponding
  ** schema.  If not found, pSchema will remain NULL and nothing will match
  ** resulting in an appropriate error message toward the end of this routine
  */
  if( zDb ){
    testcase( pNC->ncFlags & NC_PartIdx );
    testcase( pNC->ncFlags & NC_IsCheck );
    if( (pNC->ncFlags & (NC_PartIdx|NC_IsCheck))!=0 ){
      /* Silently ignore database qualifiers inside CHECK constraints and
      ** partial indices.  Do not raise errors because that might break
      ** legacy and because it does not hurt anything to just ignore the
      ** database name. */
      zDb = 0;
    }else{
      for(i=0; i<db->nDb; i++){
        assert( db->aDb[i].zName );
        if( sqlite3StrICmp(db->aDb[i].zName,zDb)==0 ){
          pSchema = db->aDb[i].pSchema;
          break;
        }
      }
    }
  }

  /* Start at the inner-most context and move outward until a match is found */
  while( pNC && cnt==0 ){
    ExprList *pEList;
    SrcList *pSrcList = pNC->pSrcList;

    if( pSrcList ){
      for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
        pTab = pItem->pTab;
        assert( pTab!=0 && pTab->zName!=0 );
        assert( pTab->nCol>0 );
        if( pItem->pSelect && (pItem->pSelect->selFlags & SF_NestedFrom)!=0 ){
          int hit = 0;
          pEList = pItem->pSelect->pEList;
          for(j=0; j<pEList->nExpr; j++){
            if( sqlite3MatchSpanName(pEList->a[j].zSpan, zCol, zTab, zDb) ){
              cnt++;
              cntTab = 2;
              pMatch = pItem;
              pExpr->iColumn = j;
              hit = 1;
            }
          }
          if( hit || zTab==0 ) continue;
        }
        if( zDb && pTab->pSchema!=pSchema ){
          continue;
        }
        if( zTab ){
          const char *zTabName = pItem->zAlias ? pItem->zAlias : pTab->zName;
          assert( zTabName!=0 );
          if( sqlite3StrICmp(zTabName, zTab)!=0 ){
            continue;
          }
        }
        if( 0==(cntTab++) ){
          pMatch = pItem;
        }
        for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
            /* If there has been exactly one prior match and this match
            ** is for the right-hand table of a NATURAL JOIN or is in a 
            ** USING clause, then skip this match.
            */
            if( cnt==1 ){
              if( pItem->fg.jointype & JT_NATURAL ) continue;
              if( nameInUsingClause(pItem->pUsing, zCol) ) continue;
            }
            cnt++;
            pMatch = pItem;
            /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
            pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;
            break;
          }
        }
      }
      if( pMatch ){
        pExpr->iTable = pMatch->iCursor;
        pExpr->pTab = pMatch->pTab;
        /* RIGHT JOIN not (yet) supported */
        assert( (pMatch->fg.jointype & JT_RIGHT)==0 );
        if( (pMatch->fg.jointype & JT_LEFT)!=0 ){
          ExprSetProperty(pExpr, EP_CanBeNull);
        }
        pSchema = pExpr->pTab->pSchema;
      }
    } /* if( pSrcList ) */

#ifndef SQLITE_OMIT_TRIGGER
    /* If we have not already resolved the name, then maybe 
    ** it is a new.* or old.* trigger argument reference
    */
    if( zDb==0 && zTab!=0 && cntTab==0 && pParse->pTriggerTab!=0 ){
      int op = pParse->eTriggerOp;
      assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
      if( op!=TK_DELETE && sqlite3StrICmp("new",zTab) == 0 ){
        pExpr->iTable = 1;
        pTab = pParse->pTriggerTab;
      }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){
        pExpr->iTable = 0;
        pTab = pParse->pTriggerTab;
      }else{
        pTab = 0;
      }

      if( pTab ){ 
        int iCol;
        pSchema = pTab->pSchema;
        cntTab++;
        for(iCol=0, pCol=pTab->aCol; iCol<pTab->nCol; iCol++, pCol++){
          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
            if( iCol==pTab->iPKey ){
              iCol = -1;
            }
            break;
          }
        }
        if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) && VisibleRowid(pTab) ){
          /* IMP: R-51414-32910 */
          iCol = -1;
        }
        if( iCol<pTab->nCol ){
          cnt++;
          if( iCol<0 ){
            pExpr->affinity = SQLITE_AFF_INTEGER;
          }else if( pExpr->iTable==0 ){
            testcase( iCol==31 );
            testcase( iCol==32 );
            pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
          }else{
            testcase( iCol==31 );
            testcase( iCol==32 );
            pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
          }
          pExpr->iColumn = (i16)iCol;
          pExpr->pTab = pTab;
          isTrigger = 1;
        }
      }
    }
#endif /* !defined(SQLITE_OMIT_TRIGGER) */

    /*
    ** Perhaps the name is a reference to the ROWID
    */
    if( cnt==0
     && cntTab==1
     && pMatch
     && (pNC->ncFlags & NC_IdxExpr)==0
     && sqlite3IsRowid(zCol)
     && VisibleRowid(pMatch->pTab)
    ){
      cnt = 1;
      pExpr->iColumn = -1;
      pExpr->affinity = SQLITE_AFF_INTEGER;
    }

    /*
    ** If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z
    ** might refer to an result-set alias.  This happens, for example, when
    ** we are resolving names in the WHERE clause of the following command:
    **
    **     SELECT a+b AS x FROM table WHERE x<10;
    **
    ** In cases like this, replace pExpr with a copy of the expression that
    ** forms the result set entry ("a+b" in the example) and return immediately.
    ** Note that the expression in the result set should have already been
    ** resolved by the time the WHERE clause is resolved.
    **
    ** The ability to use an output result-set column in the WHERE, GROUP BY,
    ** or HAVING clauses, or as part of a larger expression in the ORDER BY
    ** clause is not standard SQL.  This is a (goofy) SQLite extension, that
    ** is supported for backwards compatibility only. Hence, we issue a warning
    ** on sqlite3_log() whenever the capability is used.
    */
    if( (pEList = pNC->pEList)!=0
     && zTab==0
     && cnt==0
    ){
      for(j=0; j<pEList->nExpr; j++){
        char *zAs = pEList->a[j].zName;
        if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
          Expr *pOrig;
          assert( pExpr->pLeft==0 && pExpr->pRight==0 );
          assert( pExpr->x.pList==0 );
          assert( pExpr->x.pSelect==0 );
          pOrig = pEList->a[j].pExpr;
          if( (pNC->ncFlags&NC_AllowAgg)==0 && ExprHasProperty(pOrig, EP_Agg) ){
            sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
            return WRC_Abort;
          }
          resolveAlias(pParse, pEList, j, pExpr, "", nSubquery);
          cnt = 1;
          pMatch = 0;
          assert( zTab==0 && zDb==0 );
          goto lookupname_end;
        }
      } 
    }

    /* Advance to the next name context.  The loop will exit when either
    ** we have a match (cnt>0) or when we run out of name contexts.
    */
    if( cnt==0 ){
      pNC = pNC->pNext;
      nSubquery++;
    }
  }

  /*
  ** If X and Y are NULL (in other words if only the column name Z is
  ** supplied) and the value of Z is enclosed in double-quotes, then
  ** Z is a string literal if it doesn't match any column names.  In that
  ** case, we need to return right away and not make any changes to
  ** pExpr.
  **
  ** Because no reference was made to outer contexts, the pNC->nRef
  ** fields are not changed in any context.
  */
  if( cnt==0 && zTab==0 && ExprHasProperty(pExpr,EP_DblQuoted) ){
    pExpr->op = TK_STRING;
    pExpr->pTab = 0;
    return WRC_Prune;
  }

  /*
  ** cnt==0 means there was not match.  cnt>1 means there were two or
  ** more matches.  Either way, we have an error.
  */
  if( cnt!=1 ){
    const char *zErr;
    zErr = cnt==0 ? "no such column" : "ambiguous column name";
    if( zDb ){
      sqlite3ErrorMsg(pParse, "%s: %s.%s.%s", zErr, zDb, zTab, zCol);
    }else if( zTab ){
      sqlite3ErrorMsg(pParse, "%s: %s.%s", zErr, zTab, zCol);
    }else{
      sqlite3ErrorMsg(pParse, "%s: %s", zErr, zCol);
    }
    pParse->checkSchema = 1;
    pTopNC->nErr++;
  }

  /* If a column from a table in pSrcList is referenced, then record
  ** this fact in the pSrcList.a[].colUsed bitmask.  Column 0 causes
  ** bit 0 to be set.  Column 1 sets bit 1.  And so forth.  If the
  ** column number is greater than the number of bits in the bitmask
  ** then set the high-order bit of the bitmask.
  */
  if( pExpr->iColumn>=0 && pMatch!=0 ){
    int n = pExpr->iColumn;
    testcase( n==BMS-1 );
    if( n>=BMS ){
      n = BMS-1;
    }
    assert( pMatch->iCursor==pExpr->iTable );
    pMatch->colUsed |= ((Bitmask)1)<<n;
  }

  /* Clean up and return
  */
  sqlite3ExprDelete(db, pExpr->pLeft);
  pExpr->pLeft = 0;
  sqlite3ExprDelete(db, pExpr->pRight);
  pExpr->pRight = 0;
  pExpr->op = (isTrigger ? TK_TRIGGER : TK_COLUMN);
lookupname_end:
  if( cnt==1 ){
    assert( pNC!=0 );
    if( !ExprHasProperty(pExpr, EP_Alias) ){
      sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
    }
    /* Increment the nRef value on all name contexts from TopNC up to
    ** the point where the name matched. */
    for(;;){
      assert( pTopNC!=0 );
      pTopNC->nRef++;
      if( pTopNC==pNC ) break;
      pTopNC = pTopNC->pNext;
    }
    return WRC_Prune;
  } else {
    return WRC_Abort;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
movq %r9, %r14
movq %rcx, -0x68(%rbp)
movq %rdx, %rbx
movq %rdi, -0x70(%rbp)
movq (%rdi), %rax
movl $0xffffffff, 0x2c(%r9)  # imm = 0xFFFFFFFF
movq $0x0, 0x40(%r9)
movq $0x0, -0xa8(%rbp)
testq %rsi, %rsi
movq %r9, -0x48(%rbp)
movq %rdx, -0x60(%rbp)
movq %r8, -0xa0(%rbp)
movq %rax, -0xd0(%rbp)
je 0x57799
testb $0x14, 0x30(%r8)
je 0x577a6
movq $0x0, -0x78(%rbp)
xorl %r12d, %r12d
jmp 0x577fb
movq %rsi, %r12
movslq 0x28(%rax), %rbx
testq %rbx, %rbx
jle 0x577e0
movq 0x20(%rax), %r14
shlq $0x5, %rbx
movq $0x0, -0x78(%rbp)
xorl %r15d, %r15d
movq (%r14,%r15), %rdi
movq %r12, %rsi
callq 0xa3f0
testl %eax, %eax
je 0x577ea
addq $0x20, %r15
cmpq %r15, %rbx
jne 0x577c5
jmp 0x577f3
movq $0x0, -0x78(%rbp)
jmp 0x577f7
movq 0x18(%r14,%r15), %rax
movq %rax, -0x78(%rbp)
movq -0x48(%rbp), %r14
movq -0x60(%rbp), %rbx
testq %r12, %r12
sete %al
testq %rbx, %rbx
setne %cl
andb %al, %cl
movb %cl, -0x49(%rbp)
leaq 0x3(%rbx), %rax
movq %rax, -0xc0(%rbp)
movq $0x0, -0x80(%rbp)
movl $0x0, -0x94(%rbp)
xorl %r9d, %r9d
movl $0x0, -0x2c(%rbp)
movq -0xa0(%rbp), %rax
movq %rax, -0x38(%rbp)
movq %r12, -0x90(%rbp)
movq -0x38(%rbp), %rax
testq %rax, %rax
je 0x57f02
cmpl $0x0, -0x2c(%rbp)
jne 0x57f02
movq 0x8(%rax), %r15
testq %r15, %r15
je 0x57afc
movl (%r15), %esi
testl %esi, %esi
jle 0x57b09
addq $0x8, %r15
xorl %r13d, %r13d
movl $0x0, -0x2c(%rbp)
movl %r9d, %r14d
movl %esi, -0x84(%rbp)
movq 0x20(%r15), %rcx
movq 0x28(%r15), %rax
testq %rax, %rax
je 0x57952
testb $0x4, 0xb(%rax)
je 0x57952
movl %r13d, -0x88(%rbp)
movq (%rax), %rax
movslq (%rax), %r13
xorl %r12d, %r12d
testq %r13, %r13
jle 0x57932
movq %rcx, -0xb0(%rbp)
movq %r15, -0x58(%rbp)
movq 0x8(%rax), %r15
addq $0x10, %r15
xorl %ebx, %ebx
movq (%r15), %rdi
movq -0x68(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x90(%rbp), %rcx
callq 0x5820a
testl %eax, %eax
je 0x5790a
incl -0x2c(%rbp)
movq -0x48(%rbp), %rax
movw %bx, 0x30(%rax)
movl $0x1, %r12d
movl $0x2, %r14d
movq -0x58(%rbp), %rax
movq %rax, -0x80(%rbp)
incq %rbx
addq $0x20, %r15
cmpq %rbx, %r13
jne 0x578d0
testl %r12d, %r12d
setne %r12b
movq -0x60(%rbp), %rbx
movq -0x58(%rbp), %r15
movl -0x84(%rbp), %esi
movq -0xb0(%rbp), %rcx
testq %rbx, %rbx
sete %al
orb %r12b, %al
movl %r14d, %r9d
movq -0x90(%rbp), %r12
movl -0x88(%rbp), %r13d
jne 0x57ae7
testq %r12, %r12
je 0x57961
movq -0x78(%rbp), %rax
cmpq %rax, 0x68(%rcx)
jne 0x5799e
testq %rbx, %rbx
je 0x579a6
movq %r14, -0x58(%rbp)
movq %r12, %r14
movq 0x18(%r15), %rdi
testq %rdi, %rdi
jne 0x57979
movq (%rcx), %rdi
movq %rbx, %rsi
movq %rbx, %r12
movq %rcx, %rbx
callq 0xa3f0
movq %rbx, %rcx
movq %r12, %rbx
testl %eax, %eax
movq %r14, %r12
movq -0x58(%rbp), %r14
movl -0x84(%rbp), %esi
je 0x579a6
movl %r14d, %r9d
jmp 0x57ae7
leal 0x1(%r14), %r9d
testl %r14d, %r14d
movq -0x80(%rbp), %rax
cmoveq %r15, %rax
movq %rax, -0x80(%rbp)
movswl 0x3e(%rcx), %eax
movl %eax, -0xb4(%rbp)
testl %eax, %eax
jle 0x57ae7
movl %r13d, -0x88(%rbp)
movq %r15, -0x58(%rbp)
movl %r9d, -0x3c(%rbp)
movq %rcx, -0xb0(%rbp)
movq 0x8(%rcx), %r13
xorl %r14d, %r14d
movq (%r13), %rdi
movq -0x68(%rbp), %rsi
callq 0xa3f0
testl %eax, %eax
jne 0x57a77
cmpl $0x1, -0x2c(%rbp)
jne 0x57aa0
movq -0x58(%rbp), %rax
testb $0x4, 0x3c(%rax)
jne 0x57a77
movq -0x58(%rbp), %rax
movq 0x50(%rax), %rax
testq %rax, %rax
je 0x57aa0
movslq 0x8(%rax), %rcx
movq %rcx, -0xc8(%rbp)
testq %rcx, %rcx
jle 0x57aa0
movq (%rax), %r15
movq (%r15), %rdi
movq -0x68(%rbp), %rsi
callq 0xa3f0
testl %eax, %eax
je 0x57a77
addq $0x10, %r15
movq -0xc8(%rbp), %rax
leaq -0x1(%rax), %r12
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0x57aa0
movq (%r15), %rdi
movq -0x68(%rbp), %rsi
callq 0xa3f0
addq $0x10, %r15
incq %rbx
testl %eax, %eax
jne 0x57a52
cmpq -0xc8(%rbp), %rbx
jae 0x57aa0
incl %r14d
addq $0x30, %r13
cmpl -0xb4(%rbp), %r14d
jne 0x579e8
movq -0x60(%rbp), %rbx
movq -0x90(%rbp), %r12
movl -0x3c(%rbp), %r9d
movq -0x58(%rbp), %r15
jmp 0x57ada
incl -0x2c(%rbp)
movq -0xb0(%rbp), %rax
movswl 0x3c(%rax), %eax
cmpl %eax, %r14d
movl $0xffff, %eax           # imm = 0xFFFF
cmovel %eax, %r14d
movq -0x48(%rbp), %rax
movw %r14w, 0x30(%rax)
movq -0x58(%rbp), %r15
movq %r15, -0x80(%rbp)
movq -0x60(%rbp), %rbx
movq -0x90(%rbp), %r12
movl -0x3c(%rbp), %r9d
movl -0x84(%rbp), %esi
movl -0x88(%rbp), %r13d
incl %r13d
addq $0x70, %r15
movl %r9d, %r14d
cmpl %esi, %r13d
jne 0x5788b
jmp 0x57b10
movl $0x0, -0x2c(%rbp)
movq -0x80(%rbp), %r12
jmp 0x57b4d
movl $0x0, -0x2c(%rbp)
movq -0x80(%rbp), %r12
testq %r12, %r12
je 0x57b46
movl 0x44(%r12), %eax
movq -0x48(%rbp), %r14
movl %eax, 0x2c(%r14)
movq 0x20(%r12), %rax
movq %rax, 0x40(%r14)
testb $0x8, 0x3c(%r12)
je 0x57b3c
orb $0x10, 0x6(%r14)
movq 0x68(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x57b4d
xorl %r12d, %r12d
movq -0x48(%rbp), %r14
testl %r9d, %r9d
sete %al
andb -0x49(%rbp), %al
cmpb $0x1, %al
jne 0x57bb2
movq -0x70(%rbp), %rax
movq 0x1c8(%rax), %r14
xorl %r9d, %r9d
testq %r14, %r14
je 0x57bae
movb 0x1e0(%rax), %al
cmpb $0x6d, %al
jne 0x57bbb
movb $0x6f, %al
xorl %ecx, %ecx
movzbl %al, %edx
leaq 0x2278b(%rip), %rdi     # 0x7a310
movb (%rdx,%rdi), %dl
movzbl (%rbx,%rcx), %esi
cmpb (%rsi,%rdi), %dl
jne 0x57bf4
leaq 0x272b6(%rip), %rax     # 0x7ee4e
movb 0x1(%rcx,%rax), %al
incq %rcx
cmpq $0x3, %rcx
jne 0x57b7b
movq -0xc0(%rbp), %rcx
jmp 0x57bf7
movq -0x48(%rbp), %r14
movq -0x38(%rbp), %rax
jmp 0x57d49
movb $0x6e, %cl
xorl %edx, %edx
movzbl %cl, %esi
leaq 0x22747(%rip), %r8      # 0x7a310
movb (%rsi,%r8), %sil
movzbl (%rbx,%rdx), %edi
cmpb (%rdi,%r8), %sil
jne 0x57c10
leaq 0x2726c(%rip), %rcx     # 0x7ee4a
movb 0x1(%rdx,%rcx), %cl
incq %rdx
cmpq $0x3, %rdx
jne 0x57bbf
movq -0xc0(%rbp), %rdx
jmp 0x57c13
addq %rbx, %rcx
movzbl %al, %eax
leaq 0x2270f(%rip), %rsi     # 0x7a310
movb (%rax,%rsi), %al
movzbl (%rcx), %edx
xorl %ecx, %ecx
cmpb (%rdx,%rsi), %al
je 0x57c2f
jmp 0x57c40
addq %rbx, %rdx
movzbl %cl, %ecx
leaq 0x226f3(%rip), %rdi     # 0x7a310
movb (%rcx,%rdi), %sil
movzbl (%rdx), %edx
movl $0x1, %ecx
cmpb (%rdx,%rdi), %sil
jne 0x57c38
movq -0x48(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x57c43
cmpb $0x6c, %al
jne 0x57b77
xorl %r14d, %r14d
testq %r14, %r14
movq -0x38(%rbp), %rax
je 0x57c88
movq 0x68(%r14), %rcx
movq %rcx, -0x78(%rbp)
movswl 0x3e(%r14), %r15d
testl %r15d, %r15d
jle 0x57c91
movq %r12, %r13
movq 0x8(%r14), %r12
xorl %ebx, %ebx
movq (%r12), %rdi
movq -0x68(%rbp), %rsi
callq 0xa3f0
testl %eax, %eax
je 0x57c95
incl %ebx
addq $0x30, %r12
cmpl %ebx, %r15d
jne 0x57c67
movl %r15d, %ebx
jmp 0x57ca4
movq -0x48(%rbp), %r14
jmp 0x57d49
xorl %ebx, %ebx
jmp 0x57cab
movswl 0x3c(%r14), %eax
cmpl %ebx, %eax
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmovel %eax, %ebx
movq -0x38(%rbp), %rax
movq %r13, %r12
cmpl %r15d, %ebx
jl 0x57cd2
movq -0x68(%rbp), %rdi
callq 0x1ac8c
testl %eax, %eax
je 0x57cce
movb 0x46(%r14), %al
andb $0x40, %al
cmpb $0x1, %al
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %ebx
movq -0x38(%rbp), %rax
movl $0x1, %r9d
cmpl %r15d, %ebx
jge 0x57d0b
testl %ebx, %ebx
js 0x57d11
movl $0x1, %eax
movl %ebx, %ecx
shll %cl, %eax
cmpl $0x20, %ebx
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmovgel %ecx, %eax
movq -0x48(%rbp), %rcx
cmpl $0x0, 0x2c(%rcx)
je 0x57d1b
movq -0x70(%rbp), %rcx
orl %eax, 0x1dc(%rcx)
jmp 0x57d25
movq -0x48(%rbp), %r14
jmp 0x57d45
movq -0x48(%rbp), %rax
movb $0x44, 0x1(%rax)
jmp 0x57d29
movq -0x70(%rbp), %rcx
orl %eax, 0x1d8(%rcx)
movq -0x48(%rbp), %rax
incl -0x2c(%rbp)
movw %bx, 0x30(%rax)
movq %r14, 0x40(%rax)
movl $0x1, -0x94(%rbp)
movq %rax, %r14
movq -0x38(%rbp), %rax
movq -0x60(%rbp), %rbx
cmpl $0x0, -0x2c(%rbp)
movl %r9d, -0x3c(%rbp)
jne 0x57da8
cmpl $0x1, %r9d
jne 0x57da8
testq %r12, %r12
je 0x57da8
movl $0x0, -0x2c(%rbp)
testb $0x20, 0x30(%rax)
jne 0x57da8
movq -0x68(%rbp), %rdi
callq 0x1ac8c
testl %eax, %eax
je 0x57da0
movq 0x20(%r12), %rax
testb $0x40, 0x46(%rax)
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %r9d
jne 0x57da8
movw $0xffff, 0x30(%r14)     # imm = 0xFFFF
movb $0x44, 0x1(%r14)
movl $0x1, -0x2c(%rbp)
jmp 0x57da8
movq -0x38(%rbp), %rax
movl -0x3c(%rbp), %r9d
cmpl $0x0, -0x2c(%rbp)
movq %r12, -0x80(%rbp)
jne 0x57eb4
testq %rbx, %rbx
jne 0x57eb4
movq 0x10(%rax), %rcx
testq %rcx, %rcx
je 0x57eb4
cmpl $0x0, (%rcx)
jle 0x57ead
xorl %r14d, %r14d
movl $0x8, %ebx
movl $0x0, -0x2c(%rbp)
movq %rcx, -0x58(%rbp)
movq 0x8(%rcx), %r13
movq (%r13,%rbx), %r15
movb $0x1, %r12b
testq %r15, %r15
je 0x57e15
movq %r15, %rdi
movq -0x68(%rbp), %rsi
callq 0xa3f0
testl %eax, %eax
je 0x57e19
xorl %eax, %eax
movl -0x3c(%rbp), %r9d
movq -0x58(%rbp), %rcx
jmp 0x57e71
xorl %eax, %eax
jmp 0x57e71
movq -0x38(%rbp), %rax
testb $0x1, 0x30(%rax)
jne 0x57e2e
movq -0x8(%r13,%rbx), %rax
testb $0x2, 0x4(%rax)
jne 0x57e8b
movq -0x70(%rbp), %rdi
movq -0x58(%rbp), %r15
movq %r15, %rsi
movl %r14d, %edx
movq -0x48(%rbp), %rcx
leaq 0x2824a(%rip), %r8      # 0x80091
movq -0xa8(%rbp), %r9
callq 0x582ff
movq %r15, %rcx
movl $0x1, -0x2c(%rbp)
movl $0x16, %eax
movq $0x0, -0x80(%rbp)
xorl %r12d, %r12d
movl -0x3c(%rbp), %r9d
testb %r12b, %r12b
je 0x57ed8
incq %r14
movslq (%rcx), %rax
addq $0x20, %rbx
cmpq %rax, %r14
jl 0x57de8
jmp 0x57eb4
xorl %r12d, %r12d
movq -0x70(%rbp), %rdi
leaq 0x26fb9(%rip), %rsi     # 0x7ee52
movq %r15, %rdx
xorl %eax, %eax
callq 0x14804
movl $0x1, %eax
jmp 0x57e0b
movl $0x0, -0x2c(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x2c(%rbp)
jne 0x57ed8
movq -0x38(%rbp), %rcx
movq 0x20(%rcx), %rcx
movq %rcx, -0x38(%rbp)
movq -0xa8(%rbp), %rcx
incl %ecx
movq %rcx, -0xa8(%rbp)
movq -0x60(%rbp), %rbx
movq -0x90(%rbp), %r12
testl %eax, %eax
movq -0x48(%rbp), %r14
je 0x57845
cmpl $0x16, %eax
je 0x58021
movl $0x2, %eax
jmp 0x58135
testq %rbx, %rbx
jne 0x57f14
cmpl $0x0, -0x2c(%rbp)
jne 0x57f14
testb $0x40, 0x4(%r14)
jne 0x57f5a
cmpl $0x1, -0x2c(%rbp)
je 0x57fb6
cmpl $0x0, -0x2c(%rbp)
leaq 0x26f48(%rip), %rax     # 0x7ee71
leaq 0x26f50(%rip), %rdx     # 0x7ee80
cmoveq %rax, %rdx
testq %r12, %r12
je 0x57f70
leaq 0x26f56(%rip), %rsi     # 0x7ee96
movq %rbx, %r8
movq -0x70(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rcx
movq -0x68(%rbp), %r9
xorl %eax, %eax
callq 0x14804
jmp 0x57fa8
movb $0x61, (%r14)
movq $0x0, 0x40(%r14)
movl $0x1, %eax
jmp 0x58135
testq %rbx, %rbx
movq -0x70(%rbp), %rdi
je 0x57f93
leaq 0x26782(%rip), %rsi     # 0x7e702
movq %rbx, %rcx
movq -0x68(%rbp), %r8
movq %rdi, %rbx
xorl %eax, %eax
callq 0x14804
jmp 0x57fa8
leaq 0x26772(%rip), %rsi     # 0x7e70c
movq -0x68(%rbp), %rcx
movq %rdi, %rbx
xorl %eax, %eax
callq 0x14804
movb $0x1, 0x1d(%rbx)
movq -0xa0(%rbp), %rax
incl 0x2c(%rax)
movzwl 0x30(%r14), %eax
testw %ax, %ax
movq -0x80(%rbp), %rdx
js 0x57fe1
testq %rdx, %rdx
je 0x57fe1
cmpw $0x3f, %ax
movl $0x3f, %ecx
cmovbl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
orq %rax, 0x58(%rdx)
movq 0x10(%r14), %rsi
movq -0xd0(%rbp), %r15
movq %r15, %rdi
callq 0x3d8f7
xorl %ebx, %ebx
movq %rbx, 0x10(%r14)
movq 0x18(%r14), %rsi
movq %r15, %rdi
callq 0x3d8f7
movq %rbx, 0x18(%r14)
cmpl $0x0, -0x94(%rbp)
movl $0x98, %eax
movl $0x3e, %ecx
cmovel %eax, %ecx
movb %cl, (%r14)
movl $0x2, %eax
cmpl $0x1, -0x2c(%rbp)
jne 0x58135
testb $0x40, 0x6(%r14)
jne 0x5810d
movq -0x70(%rbp), %rax
movq (%rax), %rcx
cmpq $0x0, 0x180(%rcx)
je 0x5810d
cmpq $0x0, -0x78(%rbp)
je 0x58081
movl 0x28(%rcx), %eax
testl %eax, %eax
jle 0x58088
movq 0x20(%rcx), %rdx
addq $0x18, %rdx
xorl %ecx, %ecx
movq -0x78(%rbp), %rsi
cmpq %rsi, (%rdx)
je 0x5808a
incq %rcx
addq $0x20, %rdx
cmpq %rcx, %rax
jne 0x5806c
movl %eax, %ecx
jmp 0x5808a
movl $0xfff0bdc0, %ecx       # imm = 0xFFF0BDC0
jmp 0x5808a
xorl %ecx, %ecx
testl %ecx, %ecx
js 0x5810d
cmpb $0x3e, (%r14)
jne 0x580a4
movq -0x70(%rbp), %rax
leaq 0x1c8(%rax), %rdx
movq (%rdx), %rax
jmp 0x580d0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
movslq (%rdx), %rsi
testq %rsi, %rsi
jle 0x580ce
movl 0x2c(%r14), %edi
addq $0x28, %rdx
xorl %eax, %eax
cmpl 0x24(%rdx), %edi
je 0x5809f
addq $0x70, %rdx
decq %rsi
jne 0x580be
jmp 0x580d0
xorl %eax, %eax
testq %rax, %rax
je 0x5810d
movswq 0x30(%r14), %rdx
testw %dx, %dx
jns 0x580e9
movswq 0x3c(%rax), %rdx
testq %rdx, %rdx
js 0x58147
leaq (%rdx,%rdx,2), %rdx
shlq $0x4, %rdx
addq 0x8(%rax), %rdx
movq (%rdx), %rdx
movq (%rax), %rsi
movq -0x70(%rbp), %rdi
callq 0x5844a
cmpl $0x2, %eax
jne 0x5810d
movb $0x65, (%r14)
movq -0xa0(%rbp), %rdx
incl 0x28(%rdx)
movl $0x1, %eax
cmpq %rdx, -0x38(%rbp)
je 0x58135
movq %rdx, %rcx
movq -0x38(%rbp), %rdx
movq 0x20(%rcx), %rcx
incl 0x28(%rcx)
cmpq %rdx, %rcx
jne 0x58129
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x26d55(%rip), %rdx     # 0x7eea3
jmp 0x580f8