// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: xferOptimization
static int xferOptimization(
  Parse *pParse,        /* Parser context */
  Table *pDest,         /* The table we are inserting into */
  Select *pSelect,      /* A SELECT statement to use as the data source */
  int onError,          /* How to handle constraint errors */
  int iDbDest           /* The database of pDest */
){
  sqlite3 *db = pParse->db;
  ExprList *pEList;                /* The result set of the SELECT */
  Table *pSrc;                     /* The table in the FROM clause of SELECT */
  Index *pSrcIdx, *pDestIdx;       /* Source and destination indices */
  struct SrcList_item *pItem;      /* An element of pSelect->pSrc */
  int i;                           /* Loop counter */
  int iDbSrc;                      /* The database of pSrc */
  int iSrc, iDest;                 /* Cursors from source and destination */
  int addr1, addr2;                /* Loop addresses */
  int emptyDestTest = 0;           /* Address of test for empty pDest */
  int emptySrcTest = 0;            /* Address of test for empty pSrc */
  Vdbe *v;                         /* The VDBE we are building */
  int regAutoinc;                  /* Memory register used by AUTOINC */
  int destHasUniqueIdx = 0;        /* True if pDest has a UNIQUE index */
  int regData, regRowid;           /* Registers holding data and rowid */

  if( pSelect==0 ){
    return 0;   /* Must be of the form  INSERT INTO ... SELECT ... */
  }
  if( pParse->pWith || pSelect->pWith ){
    /* Do not attempt to process this query if there are an WITH clauses
    ** attached to it. Proceeding may generate a false "no such table: xxx"
    ** error if pSelect reads from a CTE named "xxx".  */
    return 0;
  }
  if( sqlite3TriggerList(pParse, pDest) ){
    return 0;   /* tab1 must not have triggers */
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pDest->tabFlags & TF_Virtual ){
    return 0;   /* tab1 must not be a virtual table */
  }
#endif
  if( onError==OE_Default ){
    if( pDest->iPKey>=0 ) onError = pDest->keyConf;
    if( onError==OE_Default ) onError = OE_Abort;
  }
  assert(pSelect->pSrc);   /* allocated even if there is no FROM clause */
  if( pSelect->pSrc->nSrc!=1 ){
    return 0;   /* FROM clause must have exactly one term */
  }
  if( pSelect->pSrc->a[0].pSelect ){
    return 0;   /* FROM clause cannot contain a subquery */
  }
  if( pSelect->pWhere ){
    return 0;   /* SELECT may not have a WHERE clause */
  }
  if( pSelect->pOrderBy ){
    return 0;   /* SELECT may not have an ORDER BY clause */
  }
  /* Do not need to test for a HAVING clause.  If HAVING is present but
  ** there is no ORDER BY, we will get an error. */
  if( pSelect->pGroupBy ){
    return 0;   /* SELECT may not have a GROUP BY clause */
  }
  if( pSelect->pLimit ){
    return 0;   /* SELECT may not have a LIMIT clause */
  }
  assert( pSelect->pOffset==0 );  /* Must be so if pLimit==0 */
  if( pSelect->pPrior ){
    return 0;   /* SELECT may not be a compound query */
  }
  if( pSelect->selFlags & SF_Distinct ){
    return 0;   /* SELECT may not be DISTINCT */
  }
  pEList = pSelect->pEList;
  assert( pEList!=0 );
  if( pEList->nExpr!=1 ){
    return 0;   /* The result set must have exactly one column */
  }
  assert( pEList->a[0].pExpr );
  if( pEList->a[0].pExpr->op!=TK_ASTERISK ){
    return 0;   /* The result set must be the special operator "*" */
  }

  /* At this point we have established that the statement is of the
  ** correct syntactic form to participate in this optimization.  Now
  ** we have to check the semantics.
  */
  pItem = pSelect->pSrc->a;
  pSrc = sqlite3LocateTableItem(pParse, 0, pItem);
  if( pSrc==0 ){
    return 0;   /* FROM clause does not contain a real table */
  }
  if( pSrc==pDest ){
    return 0;   /* tab1 and tab2 may not be the same table */
  }
  if( HasRowid(pDest)!=HasRowid(pSrc) ){
    return 0;   /* source and destination must both be WITHOUT ROWID or not */
  }
#ifndef SQLITE_OMIT_VIRTUALTABLE
  if( pSrc->tabFlags & TF_Virtual ){
    return 0;   /* tab2 must not be a virtual table */
  }
#endif
  if( pSrc->pSelect ){
    return 0;   /* tab2 may not be a view */
  }
  if( pDest->nCol!=pSrc->nCol ){
    return 0;   /* Number of columns must be the same in tab1 and tab2 */
  }
  if( pDest->iPKey!=pSrc->iPKey ){
    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */
  }
  for(i=0; i<pDest->nCol; i++){
    Column *pDestCol = &pDest->aCol[i];
    Column *pSrcCol = &pSrc->aCol[i];
#ifdef SQLITE_ENABLE_HIDDEN_COLUMNS
    if( (db->flags & SQLITE_Vacuum)==0 
     && (pDestCol->colFlags | pSrcCol->colFlags) & COLFLAG_HIDDEN 
    ){
      return 0;    /* Neither table may have __hidden__ columns */
    }
#endif
    if( pDestCol->affinity!=pSrcCol->affinity ){
      return 0;    /* Affinity must be the same on all columns */
    }
    if( sqlite3_stricmp(pDestCol->zColl, pSrcCol->zColl)!=0 ){
      return 0;    /* Collating sequence must be the same on all columns */
    }
    if( pDestCol->notNull && !pSrcCol->notNull ){
      return 0;    /* tab2 must be NOT NULL if tab1 is */
    }
    /* Default values for second and subsequent columns need to match. */
    if( i>0
     && ((pDestCol->zDflt==0)!=(pSrcCol->zDflt==0) 
         || (pDestCol->zDflt && strcmp(pDestCol->zDflt, pSrcCol->zDflt)!=0))
    ){
      return 0;    /* Default values must be the same for all columns */
    }
  }
  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
    if( IsUniqueIndex(pDestIdx) ){
      destHasUniqueIdx = 1;
    }
    for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    }
    if( pSrcIdx==0 ){
      return 0;    /* pDestIdx has no corresponding index in pSrc */
    }
  }
#ifndef SQLITE_OMIT_CHECK
  if( pDest->pCheck && sqlite3ExprListCompare(pSrc->pCheck,pDest->pCheck,-1) ){
    return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
  }
#endif
#ifndef SQLITE_OMIT_FOREIGN_KEY
  /* Disallow the transfer optimization if the destination table constains
  ** any foreign key constraints.  This is more restrictive than necessary.
  ** But the main beneficiary of the transfer optimization is the VACUUM 
  ** command, and the VACUUM command disables foreign key constraints.  So
  ** the extra complication to make this rule less restrictive is probably
  ** not worth the effort.  Ticket [6284df89debdfa61db8073e062908af0c9b6118e]
  */
  if( (db->flags & SQLITE_ForeignKeys)!=0 && pDest->pFKey!=0 ){
    return 0;
  }
#endif
  if( (db->flags & SQLITE_CountRows)!=0 ){
    return 0;  /* xfer opt does not play well with PRAGMA count_changes */
  }

  /* If we get this far, it means that the xfer optimization is at
  ** least a possibility, though it might only work if the destination
  ** table (tab1) is initially empty.
  */
#ifdef SQLITE_TEST
  sqlite3_xferopt_count++;
#endif
  iDbSrc = sqlite3SchemaToIndex(db, pSrc->pSchema);
  v = sqlite3GetVdbe(pParse);
  sqlite3CodeVerifySchema(pParse, iDbSrc);
  iSrc = pParse->nTab++;
  iDest = pParse->nTab++;
  regAutoinc = autoIncBegin(pParse, iDbDest, pDest);
  regData = sqlite3GetTempReg(pParse);
  regRowid = sqlite3GetTempReg(pParse);
  sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);
  assert( HasRowid(pDest) || destHasUniqueIdx );
  if( (db->flags & SQLITE_Vacuum)==0 && (
      (pDest->iPKey<0 && pDest->pIndex!=0)          /* (1) */
   || destHasUniqueIdx                              /* (2) */
   || (onError!=OE_Abort && onError!=OE_Rollback)   /* (3) */
  )){
    /* In some circumstances, we are able to run the xfer optimization
    ** only if the destination table is initially empty. Unless the
    ** SQLITE_Vacuum flag is set, this block generates code to make
    ** that determination. If SQLITE_Vacuum is set, then the destination
    ** table is always empty.
    **
    ** Conditions under which the destination must be empty:
    **
    ** (1) There is no INTEGER PRIMARY KEY but there are indices.
    **     (If the destination is not initially empty, the rowid fields
    **     of index entries might need to change.)
    **
    ** (2) The destination has a unique index.  (The xfer optimization 
    **     is unable to test uniqueness.)
    **
    ** (3) onError is something other than OE_Abort and OE_Rollback.
    */
    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iDest, 0); VdbeCoverage(v);
    emptyDestTest = sqlite3VdbeAddOp0(v, OP_Goto);
    sqlite3VdbeJumpHere(v, addr1);
  }
  if( HasRowid(pSrc) ){
    sqlite3OpenTable(pParse, iSrc, iDbSrc, pSrc, OP_OpenRead);
    emptySrcTest = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0); VdbeCoverage(v);
    if( pDest->iPKey>=0 ){
      addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
      addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
      VdbeCoverage(v);
      sqlite3RowidConstraint(pParse, onError, pDest);
      sqlite3VdbeJumpHere(v, addr2);
      autoIncStep(pParse, regAutoinc, regRowid);
    }else if( pDest->pIndex==0 ){
      addr1 = sqlite3VdbeAddOp2(v, OP_NewRowid, iDest, regRowid);
    }else{
      addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
      assert( (pDest->tabFlags & TF_Autoincrement)==0 );
    }
    sqlite3VdbeAddOp2(v, OP_RowData, iSrc, regData);
    sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);
    sqlite3VdbeChangeP5(v, OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND);
    sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1); VdbeCoverage(v);
    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
  }else{
    sqlite3TableLock(pParse, iDbDest, pDest->tnum, 1, pDest->zName);
    sqlite3TableLock(pParse, iDbSrc, pSrc->tnum, 0, pSrc->zName);
  }
  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
    u8 idxInsFlags = 0;
    for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){
      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
    }
    assert( pSrcIdx );
    sqlite3VdbeAddOp3(v, OP_OpenRead, iSrc, pSrcIdx->tnum, iDbSrc);
    sqlite3VdbeSetP4KeyInfo(pParse, pSrcIdx);
    VdbeComment((v, "%s", pSrcIdx->zName));
    sqlite3VdbeAddOp3(v, OP_OpenWrite, iDest, pDestIdx->tnum, iDbDest);
    sqlite3VdbeSetP4KeyInfo(pParse, pDestIdx);
    sqlite3VdbeChangeP5(v, OPFLAG_BULKCSR);
    VdbeComment((v, "%s", pDestIdx->zName));
    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0); VdbeCoverage(v);
    sqlite3VdbeAddOp2(v, OP_RowKey, iSrc, regData);
    if( db->flags & SQLITE_Vacuum ){
      /* This INSERT command is part of a VACUUM operation, which guarantees
      ** that the destination table is empty. If all indexed columns use
      ** collation sequence BINARY, then it can also be assumed that the
      ** index will be populated by inserting keys in strictly sorted 
      ** order. In this case, instead of seeking within the b-tree as part
      ** of every OP_IdxInsert opcode, an OP_Last is added before the
      ** OP_IdxInsert to seek to the point within the b-tree where each key 
      ** should be inserted. This is faster.
      **
      ** If any of the indexed columns use a collation sequence other than
      ** BINARY, this optimization is disabled. This is because the user 
      ** might change the definition of a collation sequence and then run
      ** a VACUUM command. In that case keys may not be written in strictly
      ** sorted order.  */
      for(i=0; i<pSrcIdx->nColumn; i++){
        const char *zColl = pSrcIdx->azColl[i];
        assert( sqlite3_stricmp(sqlite3StrBINARY, zColl)!=0
                    || sqlite3StrBINARY==zColl );
        if( sqlite3_stricmp(sqlite3StrBINARY, zColl) ) break;
      }
      if( i==pSrcIdx->nColumn ){
        idxInsFlags = OPFLAG_USESEEKRESULT;
        sqlite3VdbeAddOp3(v, OP_Last, iDest, 0, -1);
      }
    }
    if( !HasRowid(pSrc) && pDestIdx->idxType==2 ){
      idxInsFlags |= OPFLAG_NCHANGE;
    }
    sqlite3VdbeAddOp3(v, OP_IdxInsert, iDest, regData, 1);
    sqlite3VdbeChangeP5(v, idxInsFlags);
    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1); VdbeCoverage(v);
    sqlite3VdbeJumpHere(v, addr1);
    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
  }
  if( emptySrcTest ) sqlite3VdbeJumpHere(v, emptySrcTest);
  sqlite3ReleaseTempReg(pParse, regRowid);
  sqlite3ReleaseTempReg(pParse, regData);
  if( emptyDestTest ){
    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, 0);
    sqlite3VdbeJumpHere(v, emptyDestTest);
    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
    return 0;
  }else{
    return 1;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xb0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl %ecx, -0x24(%rbp)
movl %r8d, -0x28(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x74(%rbp)
movl $0x0, -0x78(%rbp)
movl $0x0, -0x88(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x94874
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x10(%rbp), %rax
cmpq $0x0, 0x280(%rax)
jne 0x9488d
movq -0x20(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x94899
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7bee0
cmpq $0x0, %rax
je 0x948b8
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x18(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x948d4
movl $0x0, -0x4(%rbp)
jmp 0x952ce
cmpl $0xa, -0x24(%rbp)
jne 0x94901
movq -0x18(%rbp), %rax
movswl 0x3c(%rax), %eax
cmpl $0x0, %eax
jl 0x948f2
movq -0x18(%rbp), %rax
movzbl 0x47(%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0xa, -0x24(%rbp)
jne 0x948ff
movl $0x2, -0x24(%rbp)
jmp 0x94901
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
cmpl $0x1, (%rax)
je 0x9491a
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
cmpq $0x0, 0x30(%rax)
je 0x94935
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x9494c
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x94963
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x9497a
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
cmpq $0x0, 0x60(%rax)
je 0x94991
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
cmpq $0x0, 0x50(%rax)
je 0x949a8
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
movzwl 0xa(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x949c4
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x1, (%rax)
je 0x949e4
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rax
movzbl (%rax), %eax
cmpl $0x9e, %eax
je 0x94a05
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rax
addq $0x8, %rax
movq %rax, -0x58(%rbp)
movq -0x10(%rbp), %rdi
movq -0x58(%rbp), %rdx
xorl %esi, %esi
callq 0x78e70
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x94a3b
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x40(%rbp), %rax
cmpq -0x18(%rbp), %rax
jne 0x94a51
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x18(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movq -0x40(%rbp), %rcx
movzbl 0x46(%rcx), %ecx
andl $0x20, %ecx
cmpl $0x0, %ecx
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
je 0x94a8e
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x40(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x94aaa
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x40(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x94ac1
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x18(%rbp), %rax
movswl 0x3e(%rax), %eax
movq -0x40(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
cmpl %ecx, %eax
je 0x94ae1
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x18(%rbp), %rax
movswl 0x3c(%rax), %eax
movq -0x40(%rbp), %rcx
movswl 0x3c(%rcx), %ecx
cmpl %ecx, %eax
je 0x94b01
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x3e(%rcx), %ecx
cmpl %ecx, %eax
jge 0x94c47
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x98(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x5c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xa0(%rbp)
movq -0x98(%rbp), %rax
movsbl 0x29(%rax), %eax
movq -0xa0(%rbp), %rcx
movsbl 0x29(%rcx), %ecx
cmpl %ecx, %eax
je 0x94b75
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x98(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0xa0(%rbp), %rax
movq 0x20(%rax), %rsi
callq 0xb5c0
cmpl $0x0, %eax
je 0x94ba1
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x98(%rbp), %rax
movzbl 0x28(%rax), %eax
cmpl $0x0, %eax
je 0x94bca
movq -0xa0(%rbp), %rax
cmpb $0x0, 0x28(%rax)
jne 0x94bca
movl $0x0, -0x4(%rbp)
jmp 0x952ce
cmpl $0x0, -0x5c(%rbp)
jle 0x94c37
movq -0x98(%rbp), %rax
cmpq $0x0, 0x10(%rax)
sete %al
andb $0x1, %al
movzbl %al, %eax
movq -0xa0(%rbp), %rcx
cmpq $0x0, 0x10(%rcx)
sete %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x94c2b
movq -0x98(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x94c37
movq -0x98(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0xa0(%rbp), %rax
movq 0x10(%rax), %rsi
callq 0xb3a0
cmpl $0x0, %eax
je 0x94c37
movl $0x0, -0x4(%rbp)
jmp 0x952ce
jmp 0x94c39
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x94b08
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x94ccb
movq -0x50(%rbp), %rax
movzbl 0x62(%rax), %eax
cmpl $0x0, %eax
je 0x94c71
movl $0x1, -0x88(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x94ca8
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x95680
cmpl $0x0, %eax
je 0x94c98
jmp 0x94ca8
jmp 0x94c9a
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x94c7d
cmpq $0x0, -0x48(%rbp)
jne 0x94cbb
movl $0x0, -0x4(%rbp)
jmp 0x952ce
jmp 0x94cbd
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x94c53
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x94d01
movq -0x40(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x712b0
cmpl $0x0, %eax
je 0x94d01
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x30(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x80000, %eax          # imm = 0x80000
cmpl $0x0, %eax
je 0x94d29
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x94d29
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x30(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x94d46
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movq -0x30(%rbp), %rdi
movq -0x40(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x17ab0
movl %eax, -0x60(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6bd00
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
callq 0x72d80
movq -0x10(%rbp), %rcx
movl 0x50(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x50(%rcx)
movl %eax, -0x64(%rbp)
movq -0x10(%rbp), %rcx
movl 0x50(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x50(%rcx)
movl %eax, -0x68(%rbp)
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x952e0
movl %eax, -0x84(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6f960
movl %eax, -0x8c(%rbp)
movq -0x10(%rbp), %rdi
callq 0x6f960
movl %eax, -0x90(%rbp)
movq -0x10(%rbp), %rdi
movl -0x68(%rbp), %esi
movl -0x28(%rbp), %edx
movq -0x18(%rbp), %rcx
movl $0x38, %r8d
callq 0x6c1e0
movq -0x30(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
jne 0x94e55
movq -0x18(%rbp), %rax
movswl 0x3c(%rax), %eax
cmpl $0x0, %eax
jge 0x94e0d
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x94e22
cmpl $0x0, -0x88(%rbp)
jne 0x94e22
cmpl $0x2, -0x24(%rbp)
je 0x94e55
cmpl $0x1, -0x24(%rbp)
je 0x94e55
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl $0x6e, %esi
xorl %ecx, %ecx
callq 0x6c310
movl %eax, -0x6c(%rbp)
movq -0x80(%rbp), %rdi
movl $0xe, %esi
callq 0x6be00
movl %eax, -0x74(%rbp)
movq -0x80(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0x6be30
movq -0x40(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x94fe8
movq -0x10(%rbp), %rdi
movl -0x64(%rbp), %esi
movl -0x60(%rbp), %edx
movq -0x40(%rbp), %rcx
movl $0x37, %r8d
callq 0x6c1e0
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl $0x6e, %esi
xorl %ecx, %ecx
callq 0x6c310
movl %eax, -0x78(%rbp)
movq -0x18(%rbp), %rax
movswl 0x3c(%rax), %eax
cmpl $0x0, %eax
jl 0x94f0f
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x69, %esi
callq 0x6c310
movl %eax, -0x6c(%rbp)
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl -0x90(%rbp), %r8d
movl $0x4a, %esi
xorl %ecx, %ecx
callq 0x56c10
movl %eax, -0x70(%rbp)
movq -0x10(%rbp), %rdi
movl -0x24(%rbp), %esi
movq -0x18(%rbp), %rdx
callq 0x94720
movq -0x80(%rbp), %rdi
movl -0x70(%rbp), %esi
callq 0x6be30
movq -0x10(%rbp), %rdi
movl -0x84(%rbp), %esi
movl -0x90(%rbp), %edx
callq 0x955e0
jmp 0x94f52
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
jne 0x94f36
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x54, %esi
callq 0x6c310
movl %eax, -0x6c(%rbp)
jmp 0x94f50
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl -0x90(%rbp), %ecx
movl $0x69, %esi
callq 0x6c310
movl %eax, -0x6c(%rbp)
jmp 0x94f52
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl $0x68, %esi
callq 0x6c310
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl -0x90(%rbp), %r8d
movl $0x5f, %esi
callq 0x56c10
movq -0x80(%rbp), %rdi
movl $0xb, %esi
callq 0x17b70
movq -0x80(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x17dd0
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl -0x6c(%rbp), %ecx
movl $0x8, %esi
callq 0x6c310
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl $0x3e, %esi
xorl %ecx, %ecx
callq 0x6c310
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl $0x3e, %esi
xorl %ecx, %ecx
callq 0x6c310
jmp 0x95023
movq -0x10(%rbp), %rdi
movl -0x28(%rbp), %esi
movq -0x18(%rbp), %rax
movl 0x38(%rax), %edx
movq -0x18(%rbp), %rax
movq (%rax), %r8
movl $0x1, %ecx
callq 0x6c340
movq -0x10(%rbp), %rdi
movl -0x60(%rbp), %esi
movq -0x40(%rbp), %rax
movl 0x38(%rax), %edx
movq -0x40(%rbp), %rax
movq (%rax), %r8
xorl %ecx, %ecx
callq 0x6c340
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x95257
movb $0x0, -0xa1(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
je 0x95078
movq -0x50(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x95680
cmpl $0x0, %eax
je 0x95068
jmp 0x95078
jmp 0x9506a
movq -0x48(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x48(%rbp)
jmp 0x9504d
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movq -0x48(%rbp), %rax
movl 0x58(%rax), %ecx
movl -0x60(%rbp), %r8d
movl $0x37, %esi
callq 0x56c10
movq -0x10(%rbp), %rdi
movq -0x48(%rbp), %rsi
callq 0x6c4e0
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movq -0x50(%rbp), %rax
movl 0x58(%rax), %ecx
movl -0x28(%rbp), %r8d
movl $0x38, %esi
callq 0x56c10
movq -0x10(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x6c4e0
movq -0x80(%rbp), %rdi
movl $0x1, %esi
callq 0x17b70
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl $0x6e, %esi
xorl %ecx, %ecx
callq 0x6c310
movl %eax, -0x6c(%rbp)
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl $0x67, %esi
callq 0x6c310
movq -0x30(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x8000000, %eax        # imm = 0x8000000
cmpl $0x0, %eax
je 0x9519f
movl $0x0, -0x5c(%rbp)
movl -0x5c(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x60(%rcx), %ecx
cmpl %ecx, %eax
jge 0x9516e
movq -0x48(%rbp), %rax
movq 0x40(%rax), %rax
movslq -0x5c(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0xb0(%rbp)
movq -0xb0(%rbp), %rsi
leaq 0xde4e(%rip), %rdi      # 0xa2fa3
callq 0xb5c0
cmpl $0x0, %eax
je 0x95161
jmp 0x9516e
jmp 0x95163
movl -0x5c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x5c(%rbp)
jmp 0x95121
movl -0x5c(%rbp), %eax
movq -0x48(%rbp), %rcx
movzwl 0x60(%rcx), %ecx
cmpl %ecx, %eax
jne 0x9519d
movb $0x10, -0xa1(%rbp)
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl $0x6b, %esi
xorl %ecx, %ecx
movl $0xffffffff, %r8d       # imm = 0xFFFFFFFF
callq 0x56c10
jmp 0x9519f
movq -0x40(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x951d0
movq -0x50(%rbp), %rax
movb 0x63(%rax), %al
andb $0x3, %al
movzbl %al, %eax
cmpl $0x2, %eax
jne 0x951d0
movzbl -0xa1(%rbp), %eax
orl $0x1, %eax
movb %al, -0xa1(%rbp)
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl -0x8c(%rbp), %ecx
movl $0x70, %esi
movl $0x1, %r8d
callq 0x56c10
movq -0x80(%rbp), %rdi
movzbl -0xa1(%rbp), %esi
callq 0x17b70
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl -0x6c(%rbp), %ecx
addl $0x1, %ecx
movl $0x8, %esi
callq 0x6c310
movq -0x80(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0x6be30
movq -0x80(%rbp), %rdi
movl -0x64(%rbp), %edx
movl $0x3e, %esi
xorl %ecx, %ecx
callq 0x6c310
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl $0x3e, %esi
xorl %ecx, %ecx
callq 0x6c310
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x9502f
cmpl $0x0, -0x78(%rbp)
je 0x95269
movq -0x80(%rbp), %rdi
movl -0x78(%rbp), %esi
callq 0x6be30
movq -0x10(%rbp), %rdi
movl -0x90(%rbp), %esi
callq 0x6f9b0
movq -0x10(%rbp), %rdi
movl -0x8c(%rbp), %esi
callq 0x6f9b0
cmpl $0x0, -0x74(%rbp)
je 0x952c7
movq -0x80(%rbp), %rdi
movl $0x16, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x6c310
movq -0x80(%rbp), %rdi
movl -0x74(%rbp), %esi
callq 0x6be30
movq -0x80(%rbp), %rdi
movl -0x68(%rbp), %edx
movl $0x3e, %esi
xorl %ecx, %ecx
callq 0x6c310
movl $0x0, -0x4(%rbp)
jmp 0x952ce
movl $0x1, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xb0, %rsp
popq %rbp
retq
nopw (%rax,%rax)