// File: /workspace/github_c_makefile_star2_O2/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, %r13
movq (%rdi), %rax
movq %rax, -0xb0(%rbp)
orl $-0x1, 0x2c(%r9)
movq %rcx, -0x70(%rbp)
andq $0x0, 0x40(%r9)
movq %rdx, %r9
testq %rsi, %rsi
movq %rdx, -0x60(%rbp)
movq %rdi, -0x50(%rbp)
je 0x4fd96
xorl %r12d, %r12d
testb $0x14, 0x30(%r8)
jne 0x4fd99
movq %rsi, -0x68(%rbp)
xorl %eax, %eax
movq %r8, %r12
movq -0xb0(%rbp), %rcx
movl 0x28(%rcx), %ebx
testl %ebx, %ebx
cmovlel %eax, %ebx
shlq $0x5, %rbx
addq $0x20, %rbx
xorl %ecx, %ecx
leaq 0x20(%rcx), %r14
cmpq %r14, %rbx
je 0x4fd9d
movq -0xb0(%rbp), %rax
movq 0x20(%rax), %r15
movq (%r15,%rcx), %rdi
movq -0x68(%rbp), %rsi
callq 0xa4f0
movq %r14, %rcx
testl %eax, %eax
jne 0x4fd5d
movq -0x8(%r15,%r14), %rax
movq %r12, %r8
movq %rax, %r12
movq -0x50(%rbp), %rdi
jmp 0x4fda7
xorl %r12d, %r12d
xorl %eax, %eax
jmp 0x4fdaf
movq %r12, %r8
movq -0x50(%rbp), %rdi
xorl %r12d, %r12d
movq -0x60(%rbp), %r9
movq -0x68(%rbp), %rax
movq %rax, -0x68(%rbp)
testq %rax, %rax
sete %al
testq %r9, %r9
setne %cl
andb %al, %cl
movb %cl, -0x31(%rbp)
leaq 0x1c8(%rdi), %rax
movq %rax, -0xc8(%rbp)
movl $0x0, -0x9c(%rbp)
movq $0x0, -0x48(%rbp)
movl $0x0, -0xa0(%rbp)
movq $0x0, -0x58(%rbp)
movq %r8, -0xc0(%rbp)
movq %r8, -0x80(%rbp)
movq %r13, -0x98(%rbp)
xorl %ecx, %ecx
testl %ecx, %ecx
movq -0x80(%rbp), %rax
jne 0x50395
testq %rax, %rax
je 0x50395
movq 0x8(%rax), %rcx
testq %rcx, %rcx
je 0x500f0
movl (%rcx), %edx
addq $0x8, %rcx
xorl %eax, %eax
testl %edx, %edx
movl $0x0, -0x30(%rbp)
cmovlel %eax, %edx
movl %edx, -0xb4(%rbp)
xorl %edx, %edx
movq %r12, -0x88(%rbp)
movq -0x68(%rbp), %rsi
movq -0x58(%rbp), %r14
cmpl -0xb4(%rbp), %edx
je 0x500c7
movq 0x20(%rcx), %rax
movq %rax, -0x90(%rbp)
movq %rcx, -0x40(%rbp)
movq 0x28(%rcx), %rax
testq %rax, %rax
je 0x4fe85
testb $0x4, 0xb(%rax)
jne 0x4ffb5
movq -0x40(%rbp), %rcx
testq %rsi, %rsi
je 0x4fe9b
movq -0x90(%rbp), %rax
cmpq %r12, 0x68(%rax)
jne 0x4fee9
testq %r9, %r9
je 0x4fef1
movq %r14, -0x58(%rbp)
movq %rsi, %r14
movq %r12, %r15
movq %r13, %r12
movl %edx, %r13d
movq 0x18(%rcx), %rdi
testq %rdi, %rdi
jne 0x4fec3
movq -0x90(%rbp), %rax
movq (%rax), %rdi
movq %r9, %rsi
movq %r9, %rbx
callq 0xa4f0
testl %eax, %eax
movq -0x40(%rbp), %rcx
movl %r13d, %edx
movq %r14, %rsi
movq -0x58(%rbp), %r14
je 0x4fef1
movq %rbx, %r9
movq %r12, %r13
movq %r15, %r12
movl %r14d, %eax
jmp 0x500b9
movl %edx, -0x74(%rbp)
testl %r14d, %r14d
movq -0x48(%rbp), %rax
cmoveq %rcx, %rax
movq %rax, -0x48(%rbp)
leal 0x1(%r14), %eax
movl %eax, -0xa4(%rbp)
movq -0x90(%rbp), %rax
movq 0x8(%rax), %r15
movzwl 0x3e(%rax), %eax
xorl %r12d, %r12d
testw %ax, %ax
cmovlel %r12d, %eax
movzwl %ax, %eax
movl %eax, -0x58(%rbp)
cmpl -0x58(%rbp), %r12d
je 0x50096
movq (%r15), %rdi
movq -0x70(%rbp), %rsi
callq 0xa4f0
testl %eax, %eax
jne 0x4ffa9
cmpl $0x1, -0x30(%rbp)
jne 0x50057
movq -0x40(%rbp), %rax
testb $0x4, 0x3c(%rax)
jne 0x4ffa9
movq -0x40(%rbp), %rax
movq 0x50(%rax), %rbx
testq %rbx, %rbx
je 0x50057
movl 0x8(%rbx), %r13d
testl %r13d, %r13d
movl $0x0, %eax
cmovlel %eax, %r13d
shlq $0x4, %r13
addq $0x10, %r13
xorl %ecx, %ecx
leaq 0x10(%rcx), %r14
cmpq %r14, %r13
je 0x50057
movq (%rbx), %rax
movq (%rax,%rcx), %rdi
movq -0x70(%rbp), %rsi
callq 0xa4f0
movq %r14, %rcx
testl %eax, %eax
jne 0x4ff85
incl %r12d
addq $0x30, %r15
jmp 0x4ff2c
movl %edx, -0x74(%rbp)
movq %r14, -0x58(%rbp)
movq (%rax), %r14
movl (%r14), %r15d
xorl %r12d, %r12d
testl %r15d, %r15d
cmovlel %r12d, %r15d
pushq $0x10
popq %r13
xorl %ebx, %ebx
cmpq %r12, %r15
je 0x5001e
movq 0x8(%r14), %rax
movq (%rax,%r13), %rdi
movq -0x70(%rbp), %rsi
movq -0x60(%rbp), %rdx
movq -0x68(%rbp), %rcx
callq 0x50633
testl %eax, %eax
je 0x50015
incl -0x30(%rbp)
movq -0x98(%rbp), %rax
movw %r12w, 0x30(%rax)
movq -0x40(%rbp), %rax
movq %rax, -0x48(%rbp)
pushq $0x2
popq %rax
movq %rax, -0x58(%rbp)
pushq $0x1
popq %rbx
incq %r12
addq $0x20, %r13
jmp 0x4ffd2
movq -0x60(%rbp), %r9
testq %r9, %r9
sete %al
testl %ebx, %ebx
setne %cl
orb %al, %cl
movq -0x58(%rbp), %r14
movl %r14d, %eax
movq -0x98(%rbp), %r13
movq -0x88(%rbp), %r12
movq -0x68(%rbp), %rsi
movq -0x40(%rbp), %rcx
movl -0x74(%rbp), %edx
je 0x4fe89
jmp 0x500b9
incl -0x30(%rbp)
movq -0x90(%rbp), %rax
movswl 0x3c(%rax), %eax
cmpl %eax, %r12d
movl $0xffff, %eax           # imm = 0xFFFF
cmovel %eax, %r12d
movq -0x98(%rbp), %r13
movw %r12w, 0x30(%r13)
movq -0x40(%rbp), %rcx
movq %rcx, -0x48(%rbp)
movq -0x88(%rbp), %r12
movq -0x60(%rbp), %r9
movq -0x68(%rbp), %rsi
jmp 0x500b0
movq -0x98(%rbp), %r13
movq -0x88(%rbp), %r12
movq -0x60(%rbp), %r9
movq -0x68(%rbp), %rsi
movq -0x40(%rbp), %rcx
movl -0x74(%rbp), %edx
movl -0xa4(%rbp), %eax
incl %edx
addq $0x70, %rcx
movl %eax, %r14d
jmp 0x4fe57
movq -0x48(%rbp), %rbx
testq %rbx, %rbx
je 0x50101
movl 0x44(%rbx), %eax
movl %eax, 0x2c(%r13)
movq 0x20(%rbx), %rax
movq %rax, 0x40(%r13)
testb $0x8, 0x3c(%rbx)
je 0x500ea
orb $0x10, 0x6(%r13)
movq 0x68(%rax), %r12
jmp 0x50103
movl $0x0, -0x30(%rbp)
movq -0x48(%rbp), %rbx
movq -0x58(%rbp), %r14
jmp 0x50103
xorl %ebx, %ebx
testl %r14d, %r14d
sete %al
andb -0x31(%rbp), %al
cmpb $0x1, %al
movq %rbx, -0x48(%rbp)
jne 0x502a7
movq -0xc8(%rbp), %rax
movq (%rax), %rbx
testq %rbx, %rbx
je 0x50188
movq -0x50(%rbp), %rax
movb 0x1e0(%rax), %r14b
cmpb $0x6d, %r14b
je 0x50163
leaq 0x1dd0b(%rip), %rdi     # 0x6de4a
movq %r9, %r15
movq %r9, %rsi
callq 0xa4f0
testl %eax, %eax
je 0x50198
cmpb $0x6c, %r14b
movq %r15, %r9
jne 0x50163
movq -0x48(%rbp), %rbx
xorl %r14d, %r14d
jmp 0x502a7
leaq 0x1dce4(%rip), %rdi     # 0x6de4e
movq %r9, %r15
movq %r9, %rsi
callq 0xa4f0
xorl %r14d, %r14d
testl %eax, %eax
je 0x50190
movq -0x48(%rbp), %rbx
movq %r15, %r9
jmp 0x502a7
xorl %r14d, %r14d
jmp 0x502a3
movb $0x1, %al
movq %rax, -0x40(%rbp)
jmp 0x501a6
movq $0x0, -0x40(%rbp)
pushq $0x1
popq %rax
movl %eax, %r14d
movl %r14d, 0x2c(%r13)
movq 0x8(%rbx), %r13
movq 0x68(%rbx), %rax
movq %rax, -0x88(%rbp)
movswl 0x3e(%rbx), %r14d
xorl %r12d, %r12d
testl %r14d, %r14d
movl $0x0, %r15d
cmovgl %r14d, %r15d
cmpl %r12d, %r15d
je 0x501ed
movq (%r13), %rdi
movq -0x70(%rbp), %rsi
callq 0xa4f0
testl %eax, %eax
je 0x501fd
incl %r12d
addq $0x30, %r13
jmp 0x501ce
movq -0x98(%rbp), %r13
movq -0x88(%rbp), %r12
jmp 0x50225
movswl 0x3c(%rbx), %eax
cmpl %r12d, %eax
pushq $-0x1
popq %rax
cmovel %eax, %r12d
movl %r12d, %r15d
cmpl %r14d, %r12d
movq -0x98(%rbp), %r13
movq -0x88(%rbp), %r12
movq -0x60(%rbp), %r9
jl 0x50247
movq -0x70(%rbp), %rdi
callq 0x18ad3
testl %eax, %eax
je 0x50243
movb 0x46(%rbx), %al
andb $0x40, %al
cmpb $0x1, %al
movl $0x0, %eax
sbbl %eax, %eax
orl %eax, %r15d
movq -0x60(%rbp), %r9
cmpl %r14d, %r15d
jge 0x50275
testl %r15d, %r15d
js 0x5027a
pushq $0x1
popq %rax
movl %r15d, %ecx
shll %cl, %eax
cmpl $0x20, %r15d
pushq $-0x1
popq %rcx
cmovael %ecx, %eax
cmpb $0x0, -0x40(%rbp)
je 0x50281
movq -0x50(%rbp), %rcx
orl %eax, 0x1d8(%rcx)
jmp 0x5028b
pushq $0x1
popq %rax
jmp 0x502a0
movb $0x44, 0x1(%r13)
jmp 0x5028b
movq -0x50(%rbp), %rcx
orl %eax, 0x1dc(%rcx)
incl -0x30(%rbp)
movw %r15w, 0x30(%r13)
movq %rbx, 0x40(%r13)
pushq $0x1
popq %rax
movl %eax, -0xa0(%rbp)
movl %eax, %r14d
movq -0x48(%rbp), %rbx
cmpl $0x0, -0x30(%rbp)
jne 0x502fc
cmpl $0x1, %r14d
jne 0x502fc
testq %rbx, %rbx
je 0x502fc
movl $0x0, -0x30(%rbp)
movq -0x80(%rbp), %rax
testb $0x20, 0x30(%rax)
jne 0x502fc
movq %r9, %r15
movq -0x70(%rbp), %rdi
callq 0x18ad3
testl %eax, %eax
je 0x502f9
movq 0x20(%rbx), %rax
testb $0x40, 0x46(%rax)
movq %r15, %r9
jne 0x502fc
orw $-0x1, 0x30(%r13)
movb $0x44, 0x1(%r13)
pushq $0x1
popq %rax
movl %eax, -0x30(%rbp)
jmp 0x502fc
movq %r15, %r9
movq %r14, -0x58(%rbp)
movl -0x30(%rbp), %ecx
testl %ecx, %ecx
jne 0x50319
testq %r9, %r9
jne 0x50319
movq -0x80(%rbp), %rax
movq 0x10(%rax), %rsi
testq %rsi, %rsi
jne 0x50338
testl %ecx, %ecx
jne 0x4fe0a
movq -0x80(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x80(%rbp)
incl -0x9c(%rbp)
jmp 0x4fe08
movl (%rsi), %ecx
testl %ecx, %ecx
movl $0x0, %eax
cmovlel %eax, %ecx
movq %rcx, -0x40(%rbp)
pushq $0x8
popq %r14
xorl %r15d, %r15d
movq %rsi, -0x90(%rbp)
cmpq %r15, -0x40(%rbp)
je 0x50321
movq 0x8(%rsi), %rax
movq %rax, -0x30(%rbp)
movq (%rax,%r14), %rbx
testq %rbx, %rbx
je 0x50388
movq %rbx, %rdi
movq -0x70(%rbp), %rsi
callq 0xa4f0
movq -0x90(%rbp), %rsi
testl %eax, %eax
je 0x5040c
incq %r15
addq $0x20, %r14
movq -0x60(%rbp), %r9
jmp 0x50356
movl %ecx, -0x30(%rbp)
testq %r9, %r9
movq -0xc0(%rbp), %r14
movq -0x50(%rbp), %rbx
jne 0x503c6
cmpl $0x0, -0x30(%rbp)
jne 0x503c6
testb $0x40, 0x4(%r13)
je 0x503d0
movb $0x61, (%r13)
andq $0x0, 0x40(%r13)
pushq $0x1
jmp 0x505d5
cmpl $0x1, -0x30(%rbp)
je 0x504a4
cmpl $0x0, -0x30(%rbp)
leaq 0x1da96(%rip), %rax     # 0x6de71
leaq 0x1da9e(%rip), %rdx     # 0x6de80
cmoveq %rax, %rdx
movq -0x68(%rbp), %rcx
testq %rcx, %rcx
je 0x5044e
leaq 0x1daa0(%rip), %rsi     # 0x6de96
movq %rbx, %rdi
movq %r9, %r8
movq -0x70(%rbp), %r9
xorl %eax, %eax
callq 0x1357a
jmp 0x5049c
movq -0x80(%rbp), %rax
testb $0x1, 0x30(%rax)
jne 0x50425
movq -0x30(%rbp), %rax
movq -0x8(%rax,%r14), %rax
testb $0x2, 0x4(%rax)
jne 0x5046d
leaq 0x1ec65(%rip), %r8      # 0x6f091
movq -0x50(%rbp), %rdi
movl %r15d, %edx
movq %r13, %rcx
movl -0x9c(%rbp), %r9d
callq 0x506f0
movq -0xc0(%rbp), %r14
jmp 0x50514
testq %r9, %r9
je 0x50487
leaq 0x1d2a8(%rip), %rsi     # 0x6d702
movq %rbx, %rdi
movq %r9, %rcx
movq -0x70(%rbp), %r8
xorl %eax, %eax
callq 0x1357a
jmp 0x5049c
leaq 0x1d9de(%rip), %rsi     # 0x6de52
movq -0x50(%rbp), %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x1357a
jmp 0x505d3
leaq 0x1d27e(%rip), %rsi     # 0x6d70c
movq %rbx, %rdi
movq -0x70(%rbp), %rcx
xorl %eax, %eax
callq 0x1357a
movb $0x1, 0x1d(%rbx)
incl 0x2c(%r14)
movzwl 0x30(%r13), %eax
testw %ax, %ax
movq -0x48(%rbp), %rdx
js 0x504cb
testq %rdx, %rdx
je 0x504cb
cmpw $0x3f, %ax
pushq $0x3f
popq %rcx
cmovbl %eax, %ecx
pushq $0x1
popq %rax
shlq %cl, %rax
orq %rax, 0x58(%rdx)
movq 0x10(%r13), %rsi
movq -0xb0(%rbp), %rbx
movq %rbx, %rdi
callq 0x367e7
andq $0x0, 0x10(%r13)
movq 0x18(%r13), %rsi
movq %rbx, %rdi
callq 0x367e7
andq $0x0, 0x18(%r13)
cmpl $0x0, -0xa0(%rbp)
movl $0x98, %eax
pushq $0x3e
popq %rcx
cmovel %eax, %ecx
movb %cl, (%r13)
cmpl $0x1, -0x30(%rbp)
jne 0x505d3
testb $0x40, 0x6(%r13)
jne 0x505bd
movq -0x50(%rbp), %rax
movq (%rax), %rdi
cmpq $0x0, 0x180(%rdi)
je 0x505bd
movq -0x80(%rbp), %rax
movq 0x8(%rax), %rbx
movq %r12, %rsi
callq 0x136fb
testl %eax, %eax
js 0x505bd
cmpb $0x3e, (%r13)
movq -0xc8(%rbp), %rsi
je 0x5057e
movl (%rbx), %edx
xorl %ecx, %ecx
testl %edx, %edx
cmovgl %edx, %ecx
addq $-0x48, %rbx
incq %rcx
decq %rcx
je 0x505bd
leaq 0x70(%rbx), %rsi
movl 0x2c(%r13), %edx
cmpl 0x94(%rbx), %edx
movq %rsi, %rbx
jne 0x50566
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x505bd
movswq 0x30(%r13), %rdx
testw %dx, %dx
jns 0x5059a
movswq 0x3c(%rcx), %rdx
testq %rdx, %rdx
js 0x505e8
imulq $0x30, %rdx, %rdx
addq 0x8(%rcx), %rdx
movq -0x50(%rbp), %rdi
movq (%rdx), %rdx
movq (%rcx), %rsi
movl %eax, %ecx
callq 0x50832
cmpl $0x2, %eax
jne 0x505bd
movb $0x65, (%r13)
pushq $0x1
popq %rax
movq -0x80(%rbp), %rcx
incl 0x28(%r14)
cmpq %rcx, %r14
je 0x505d6
movq 0x20(%r14), %r14
jmp 0x505c4
pushq $0x2
popq %rax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1d8b4(%rip), %rdx     # 0x6dea3
movq -0x50(%rbp), %rdi
jmp 0x505a9