// File: /workspace/github_c_makefile_star2_O0/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
subq $0xf0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
movq %r9, -0x38(%rbp)
movl $0x0, -0x44(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x4c(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x58(%rbp)
movq $0x0, -0x68(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x70(%rbp)
movq $0x0, -0x78(%rbp)
movl $0x0, -0x7c(%rbp)
movq $0x0, -0x88(%rbp)
movq -0x38(%rbp), %rax
movl $0xffffffff, 0x2c(%rax) # imm = 0xFFFFFFFF
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
cmpq $0x0, -0x18(%rbp)
je 0x75b8a
movq -0x30(%rbp), %rax
movzwl 0x30(%rax), %eax
andl $0x14, %eax
cmpl $0x0, %eax
je 0x75b25
movq $0x0, -0x18(%rbp)
jmp 0x75b88
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movq -0x58(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x75b86
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movq -0x18(%rbp), %rsi
callq 0xb5c0
cmpl $0x0, %eax
jne 0x75b79
movq -0x58(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x3c(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x18(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x75b86
jmp 0x75b7b
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x75b2c
jmp 0x75b88
jmp 0x75b8a
jmp 0x75b8c
xorl %eax, %eax
cmpq $0x0, -0x30(%rbp)
movb %al, -0xd5(%rbp)
je 0x75ba8
cmpl $0x0, -0x44(%rbp)
sete %al
movb %al, -0xd5(%rbp)
movb -0xd5(%rbp), %al
testb $0x1, %al
jne 0x75bb7
jmp 0x76342
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0xa0(%rbp)
cmpq $0x0, -0xa0(%rbp)
je 0x75ed8
movl $0x0, -0x3c(%rbp)
movq -0xa0(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x60(%rbp)
movl -0x3c(%rbp), %eax
movq -0xa0(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x75e81
movq -0x60(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x88(%rbp)
movq -0x60(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x75ce9
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movzwl 0xa(%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x75ce9
movl $0x0, -0xa4(%rbp)
movq -0x60(%rbp), %rax
movq 0x28(%rax), %rax
movq (%rax), %rax
movq %rax, -0x98(%rbp)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x75cd2
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x10(%rax), %rdi
movq -0x28(%rbp), %rsi
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
callq 0x76700
cmpl $0x0, %eax
je 0x75cc5
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movl $0x2, -0x48(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x40(%rbp), %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x30(%rax)
movl $0x1, -0xa4(%rbp)
jmp 0x75cc7
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x75c57
cmpl $0x0, -0xa4(%rbp)
jne 0x75ce2
cmpq $0x0, -0x20(%rbp)
jne 0x75ce7
jmp 0x75e67
jmp 0x75ce9
cmpq $0x0, -0x18(%rbp)
je 0x75d06
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
cmpq -0x78(%rbp), %rax
je 0x75d06
jmp 0x75e67
cmpq $0x0, -0x20(%rbp)
je 0x75d64
movq -0x60(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x75d29
movq -0x60(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0xe0(%rbp)
jmp 0x75d3a
movq -0x88(%rbp), %rax
movq (%rax), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xb5c0
cmpl $0x0, %eax
je 0x75d62
jmp 0x75e67
jmp 0x75d64
movl -0x48(%rbp), %ecx
movl %ecx, %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x75d7d
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movl $0x0, -0x40(%rbp)
movq -0x88(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movl -0x40(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x75e65
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xb5c0
cmpl $0x0, %eax
jne 0x75e43
cmpl $0x1, -0x44(%rbp)
jne 0x75df6
movq -0x60(%rbp), %rax
movzbl 0x3c(%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x75ddc
jmp 0x75e45
movq -0x60(%rbp), %rax
movq 0x50(%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0x76880
cmpl $0x0, %eax
je 0x75df4
jmp 0x75e45
jmp 0x75df6
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
movq -0x60(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x40(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
jne 0x75e26
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xe4(%rbp)
jmp 0x75e30
movl -0x40(%rbp), %eax
cwtl
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x30(%rax)
jmp 0x75e65
jmp 0x75e45
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
movq -0x90(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x90(%rbp)
jmp 0x75d96
jmp 0x75e67
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x60(%rbp), %rax
addq $0x70, %rax
movq %rax, -0x60(%rbp)
jmp 0x75bea
cmpq $0x0, -0x68(%rbp)
je 0x75ed6
movq -0x68(%rbp), %rax
movl 0x44(%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x40(%rax)
movq -0x68(%rbp), %rax
movzbl 0x3c(%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x75ec6
movq -0x38(%rbp), %rax
movl 0x4(%rax), %ecx
orl $0x100000, %ecx         # imm = 0x100000
movl %ecx, 0x4(%rax)
movq -0x38(%rbp), %rax
movq 0x40(%rax), %rax
movq 0x68(%rax), %rax
movq %rax, -0x78(%rbp)
jmp 0x75ed8
cmpq $0x0, -0x18(%rbp)
jne 0x76186
cmpq $0x0, -0x20(%rbp)
je 0x76186
cmpl $0x0, -0x48(%rbp)
jne 0x76186
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1c8(%rax)
je 0x76186
movq -0x10(%rbp), %rax
movzbl 0x1e0(%rax), %eax
movl %eax, -0xb4(%rbp)
cmpl $0x6d, -0xb4(%rbp)
je 0x75f58
movq -0x20(%rbp), %rsi
leaq 0x31869(%rip), %rdi     # 0xa7798
callq 0xb5c0
cmpl $0x0, %eax
jne 0x75f58
movq -0x38(%rbp), %rax
movl $0x1, 0x2c(%rax)
movq -0x10(%rbp), %rax
movq 0x1c8(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x75fa2
cmpl $0x6c, -0xb4(%rbp)
je 0x75f95
movq -0x20(%rbp), %rsi
leaq 0x31830(%rip), %rdi     # 0xa779c
callq 0xb5c0
cmpl $0x0, %eax
jne 0x75f95
movq -0x38(%rbp), %rax
movl $0x0, 0x2c(%rax)
movq -0x10(%rbp), %rax
movq 0x1c8(%rax), %rax
movq %rax, -0x88(%rbp)
jmp 0x75fa0
movq $0x0, -0x88(%rbp)
jmp 0x75fa2
cmpq $0x0, -0x88(%rbp)
je 0x76184
movq -0x88(%rbp), %rax
movq 0x68(%rax), %rax
movq %rax, -0x78(%rbp)
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
movl $0x0, -0xb8(%rbp)
movq -0x88(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x90(%rbp)
movl -0xb8(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x76057
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movq -0x28(%rbp), %rsi
callq 0xb5c0
cmpl $0x0, %eax
jne 0x76032
movl -0xb8(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
jne 0x76030
movl $0xffffffff, -0xb8(%rbp) # imm = 0xFFFFFFFF
jmp 0x76057
jmp 0x76034
movl -0xb8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xb8(%rbp)
movq -0x90(%rbp), %rax
addq $0x30, %rax
movq %rax, -0x90(%rbp)
jmp 0x75fe4
movl -0xb8(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
cmpl %ecx, %eax
jl 0x76097
movq -0x28(%rbp), %rdi
callq 0x1f880
cmpl $0x0, %eax
je 0x76097
movq -0x88(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x76097
movl $0xffffffff, -0xb8(%rbp) # imm = 0xFFFFFFFF
movl -0xb8(%rbp), %eax
movq -0x88(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x76182
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
cmpl $0x0, -0xb8(%rbp)
jge 0x760cf
movq -0x38(%rbp), %rax
movb $0x44, 0x1(%rax)
jmp 0x7615b
movq -0x38(%rbp), %rax
cmpl $0x0, 0x2c(%rax)
jne 0x7611a
cmpl $0x20, -0xb8(%rbp)
jl 0x760ef
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xe8(%rbp)
jmp 0x76102
movl -0xb8(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0xe8(%rbp)
movl -0xe8(%rbp), %ecx
movq -0x10(%rbp), %rax
orl 0x1d8(%rax), %ecx
movl %ecx, 0x1d8(%rax)
jmp 0x76159
cmpl $0x20, -0xb8(%rbp)
jl 0x76130
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
movl %eax, -0xec(%rbp)
jmp 0x76143
movl -0xb8(%rbp), %ecx
movl $0x1, %eax
shll %cl, %eax
movl %eax, -0xec(%rbp)
movl -0xec(%rbp), %ecx
movq -0x10(%rbp), %rax
orl 0x1dc(%rax), %ecx
movl %ecx, 0x1dc(%rax)
jmp 0x7615b
movl -0xb8(%rbp), %eax
movw %ax, %cx
movq -0x38(%rbp), %rax
movw %cx, 0x30(%rax)
movq -0x88(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x40(%rax)
movl $0x1, -0x7c(%rbp)
jmp 0x76184
jmp 0x76186
cmpl $0x0, -0x44(%rbp)
jne 0x761e4
cmpl $0x1, -0x48(%rbp)
jne 0x761e4
cmpq $0x0, -0x68(%rbp)
je 0x761e4
movq -0x30(%rbp), %rax
movzwl 0x30(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x761e4
movq -0x28(%rbp), %rdi
callq 0x1f880
cmpl $0x0, %eax
je 0x761e4
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rax
movzbl 0x46(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
jne 0x761e4
movl $0x1, -0x44(%rbp)
movq -0x38(%rbp), %rax
movw $0xffff, 0x30(%rax)     # imm = 0xFFFF
movq -0x38(%rbp), %rax
movb $0x44, 0x1(%rax)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x98(%rbp)
cmpq $0x0, %rax
je 0x76322
cmpq $0x0, -0x20(%rbp)
jne 0x76322
cmpl $0x0, -0x44(%rbp)
jne 0x76322
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movq -0x98(%rbp), %rcx
cmpl (%rcx), %eax
jge 0x76320
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, -0xc0(%rbp)
je 0x76310
movq -0xc0(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xb5c0
cmpl $0x0, %eax
jne 0x76310
movq -0x98(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x40(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0xc8(%rbp)
movq -0x30(%rbp), %rax
movzwl 0x30(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
jne 0x762da
movq -0xc8(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x762da
movq -0x10(%rbp), %rdi
movq -0xc0(%rbp), %rdx
leaq 0x314d9(%rip), %rsi     # 0xa77a0
movb $0x0, %al
callq 0x17840
movl $0x2, -0x4(%rbp)
jmp 0x76544
movq -0x10(%rbp), %rdi
movq -0x98(%rbp), %rsi
movl -0x40(%rbp), %edx
movq -0x38(%rbp), %rcx
movl -0x4c(%rbp), %r9d
leaq 0x326e8(%rip), %r8      # 0xa89df
callq 0x76900
movl $0x1, -0x44(%rbp)
movq $0x0, -0x68(%rbp)
jmp 0x764db
jmp 0x76312
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x76219
jmp 0x76322
cmpl $0x0, -0x44(%rbp)
jne 0x7633d
movq -0x30(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x30(%rbp)
movl -0x4c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0x75b8c
cmpl $0x0, -0x44(%rbp)
jne 0x7637d
cmpq $0x0, -0x20(%rbp)
jne 0x7637d
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x40, %eax
cmpl $0x0, %eax
je 0x7637d
movq -0x38(%rbp), %rax
movb $0x61, (%rax)
movq -0x38(%rbp), %rax
movq $0x0, 0x40(%rax)
movl $0x1, -0x4(%rbp)
jmp 0x76544
cmpl $0x1, -0x44(%rbp)
je 0x76432
movl -0x44(%rbp), %edx
leaq 0x3143d(%rip), %rax     # 0xa77ce
leaq 0x31427(%rip), %rcx     # 0xa77bf
cmpl $0x0, %edx
cmoveq %rcx, %rax
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x763d4
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rdx
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %r8
movq -0x28(%rbp), %r9
leaq 0x31419(%rip), %rsi     # 0xa77e4
movb $0x0, %al
callq 0x17840
jmp 0x7641d
cmpq $0x0, -0x20(%rbp)
je 0x763fe
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rdx
movq -0x20(%rbp), %rcx
movq -0x28(%rbp), %r8
leaq 0x30c52(%rip), %rsi     # 0xa7047
movb $0x0, %al
callq 0x17840
jmp 0x7641b
movq -0x10(%rbp), %rdi
movq -0xd0(%rbp), %rdx
movq -0x28(%rbp), %rcx
leaq 0x30c3d(%rip), %rsi     # 0xa7051
movb $0x0, %al
callq 0x17840
jmp 0x7641d
movq -0x10(%rbp), %rax
movb $0x1, 0x1d(%rax)
movq -0x70(%rbp), %rax
movl 0x2c(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x2c(%rax)
movq -0x38(%rbp), %rax
movswl 0x30(%rax), %eax
cmpl $0x0, %eax
jl 0x76486
cmpq $0x0, -0x68(%rbp)
je 0x76486
movq -0x38(%rbp), %rax
movswl 0x30(%rax), %eax
movl %eax, -0xd4(%rbp)
cmpl $0x40, -0xd4(%rbp)
jl 0x76467
movl $0x3f, -0xd4(%rbp)
movl -0xd4(%rbp), %eax
movl %eax, %ecx
movl $0x1, %eax
shlq %cl, %rax
movq %rax, %rcx
movq -0x68(%rbp), %rax
orq 0x58(%rax), %rcx
movq %rcx, 0x58(%rax)
movq -0x58(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0x536c0
movq -0x38(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x58(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x18(%rax), %rsi
callq 0x536c0
movq -0x38(%rbp), %rax
movq $0x0, 0x18(%rax)
movl -0x7c(%rbp), %edx
movl $0x98, %eax
movl $0x3e, %ecx
cmpl $0x0, %edx
cmovnel %ecx, %eax
movb %al, %cl
movq -0x38(%rbp), %rax
movb %cl, (%rax)
cmpl $0x1, -0x44(%rbp)
jne 0x7653d
movq -0x38(%rbp), %rax
movl 0x4(%rax), %eax
andl $0x400000, %eax         # imm = 0x400000
cmpl $0x0, %eax
jne 0x7650b
movq -0x10(%rbp), %rdi
movq -0x38(%rbp), %rsi
movq -0x78(%rbp), %rdx
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rcx
callq 0x76a40
jmp 0x7650d
movq -0x70(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movq -0x70(%rbp), %rax
cmpq -0x30(%rbp), %rax
jne 0x76526
jmp 0x76534
movq -0x70(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x70(%rbp)
jmp 0x7650d
movl $0x1, -0x4(%rbp)
jmp 0x76544
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xf0, %rsp
popq %rbp
retq