// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3DeleteFrom
SQLITE_PRIVATE void sqlite3DeleteFrom(
  Parse *pParse,         /* The parser context */
  SrcList *pTabList,     /* The table from which we should delete things */
  Expr *pWhere           /* The WHERE clause.  May be null */
){
  Vdbe *v;               /* The virtual database engine */
  Table *pTab;           /* The table from which records will be deleted */
  const char *zDb;       /* Name of database holding pTab */
  int i;                 /* Loop counter */
  WhereInfo *pWInfo;     /* Information about the WHERE clause */
  Index *pIdx;           /* For looping over indices of the table */
  int iTabCur;           /* Cursor number for the table */
  int iDataCur = 0;      /* VDBE cursor for the canonical data source */
  int iIdxCur = 0;       /* Cursor number of the first index */
  int nIdx;              /* Number of indices */
  sqlite3 *db;           /* Main database structure */
  AuthContext sContext;  /* Authorization context */
  NameContext sNC;       /* Name context to resolve expressions in */
  int iDb;               /* Database number */
  int memCnt = -1;       /* Memory cell used for change counting */
  int rcauth;            /* Value returned by authorization callback */
  int eOnePass;          /* ONEPASS_OFF or _SINGLE or _MULTI */
  int aiCurOnePass[2];   /* The write cursors opened by WHERE_ONEPASS */
  u8 *aToOpen = 0;       /* Open cursor iTabCur+j if aToOpen[j] is true */
  Index *pPk;            /* The PRIMARY KEY index on the table */
  int iPk = 0;           /* First of nPk registers holding PRIMARY KEY value */
  i16 nPk = 1;           /* Number of columns in the PRIMARY KEY */
  int iKey;              /* Memory cell holding key of row to be deleted */
  i16 nKey;              /* Number of memory cells in the row key */
  int iEphCur = 0;       /* Ephemeral table holding all primary key values */
  int iRowSet = 0;       /* Register for rowset of rows to delete */
  int addrBypass = 0;    /* Address of jump over the delete logic */
  int addrLoop = 0;      /* Top of the delete loop */
  int addrEphOpen = 0;   /* Instruction to open the Ephemeral table */
 
#ifndef SQLITE_OMIT_TRIGGER
  int isView;                  /* True if attempting to delete from a view */
  Trigger *pTrigger;           /* List of table triggers, if required */
  int bComplex;                /* True if there are either triggers or FKs */
#endif

  memset(&sContext, 0, sizeof(sContext));
  db = pParse->db;
  if( pParse->nErr || db->mallocFailed ){
    goto delete_from_cleanup;
  }
  assert( pTabList->nSrc==1 );

  /* Locate the table which we want to delete.  This table has to be
  ** put in an SrcList structure because some of the subroutines we
  ** will be calling are designed to work with multiple tables and expect
  ** an SrcList* parameter instead of just a Table* parameter.
  */
  pTab = sqlite3SrcListLookup(pParse, pTabList);
  if( pTab==0 )  goto delete_from_cleanup;

  /* Figure out if we have any triggers and if the table being
  ** deleted from is a view
  */
#ifndef SQLITE_OMIT_TRIGGER
  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
  isView = pTab->pSelect!=0;
  bComplex = pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0);
#else
# define pTrigger 0
# define isView 0
# define bComplex 0
#endif
#ifdef SQLITE_OMIT_VIEW
# undef isView
# define isView 0
#endif

  /* If pTab is really a view, make sure it has been initialized.
  */
  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
    goto delete_from_cleanup;
  }

  if( sqlite3IsReadOnly(pParse, pTab, (pTrigger?1:0)) ){
    goto delete_from_cleanup;
  }
  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
  assert( iDb<db->nDb );
  zDb = db->aDb[iDb].zName;
  rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);
  assert( rcauth==SQLITE_OK || rcauth==SQLITE_DENY || rcauth==SQLITE_IGNORE );
  if( rcauth==SQLITE_DENY ){
    goto delete_from_cleanup;
  }
  assert(!isView || pTrigger);

  /* Assign cursor numbers to the table and all its indices.
  */
  assert( pTabList->nSrc==1 );
  iTabCur = pTabList->a[0].iCursor = pParse->nTab++;
  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){
    pParse->nTab++;
  }

  /* Start the view context
  */
  if( isView ){
    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
  }

  /* Begin generating code.
  */
  v = sqlite3GetVdbe(pParse);
  if( v==0 ){
    goto delete_from_cleanup;
  }
  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
  sqlite3BeginWriteOperation(pParse, 1, iDb);

  /* If we are trying to delete from a view, realize that view into
  ** an ephemeral table.
  */
#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
  if( isView ){
    sqlite3MaterializeView(pParse, pTab, pWhere, iTabCur);
    iDataCur = iIdxCur = iTabCur;
  }
#endif

  /* Resolve the column names in the WHERE clause.
  */
  memset(&sNC, 0, sizeof(sNC));
  sNC.pParse = pParse;
  sNC.pSrcList = pTabList;
  if( sqlite3ResolveExprNames(&sNC, pWhere) ){
    goto delete_from_cleanup;
  }

  /* Initialize the counter of the number of rows deleted, if
  ** we are counting rows.
  */
  if( db->flags & SQLITE_CountRows ){
    memCnt = ++pParse->nMem;
    sqlite3VdbeAddOp2(v, OP_Integer, 0, memCnt);
  }

#ifndef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
  /* Special case: A DELETE without a WHERE clause deletes everything.
  ** It is easier just to erase the whole table. Prior to version 3.6.5,
  ** this optimization caused the row change count (the value returned by 
  ** API function sqlite3_count_changes) to be set incorrectly.  */
  if( rcauth==SQLITE_OK
   && pWhere==0
   && !bComplex
   && !IsVirtual(pTab)
  ){
    assert( !isView );
    sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
    if( HasRowid(pTab) ){
      sqlite3VdbeAddOp4(v, OP_Clear, pTab->tnum, iDb, memCnt,
                        pTab->zName, P4_STATIC);
    }
    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
      assert( pIdx->pSchema==pTab->pSchema );
      sqlite3VdbeAddOp2(v, OP_Clear, pIdx->tnum, iDb);
    }
  }else
#endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */
  {
    u16 wcf = WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK;
    wcf |= (bComplex ? 0 : WHERE_ONEPASS_MULTIROW);
    if( HasRowid(pTab) ){
      /* For a rowid table, initialize the RowSet to an empty set */
      pPk = 0;
      nPk = 1;
      iRowSet = ++pParse->nMem;
      sqlite3VdbeAddOp2(v, OP_Null, 0, iRowSet);
    }else{
      /* For a WITHOUT ROWID table, create an ephemeral table used to
      ** hold all primary keys for rows to be deleted. */
      pPk = sqlite3PrimaryKeyIndex(pTab);
      assert( pPk!=0 );
      nPk = pPk->nKeyCol;
      iPk = pParse->nMem+1;
      pParse->nMem += nPk;
      iEphCur = pParse->nTab++;
      addrEphOpen = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, iEphCur, nPk);
      sqlite3VdbeSetP4KeyInfo(pParse, pPk);
    }
  
    /* Construct a query to find the rowid or primary key for every row
    ** to be deleted, based on the WHERE clause. Set variable eOnePass
    ** to indicate the strategy used to implement this delete:
    **
    **  ONEPASS_OFF:    Two-pass approach - use a FIFO for rowids/PK values.
    **  ONEPASS_SINGLE: One-pass approach - at most one row deleted.
    **  ONEPASS_MULTI:  One-pass approach - any number of rows may be deleted.
    */
    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, 0, wcf, iTabCur+1);
    if( pWInfo==0 ) goto delete_from_cleanup;
    eOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);
    assert( IsVirtual(pTab)==0 || eOnePass!=ONEPASS_MULTI );
    assert( IsVirtual(pTab) || bComplex || eOnePass!=ONEPASS_OFF );
  
    /* Keep track of the number of rows to be deleted */
    if( db->flags & SQLITE_CountRows ){
      sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);
    }
  
    /* Extract the rowid or primary key for the current row */
    if( pPk ){
      for(i=0; i<nPk; i++){
        assert( pPk->aiColumn[i]>=0 );
        sqlite3ExprCodeGetColumnOfTable(v, pTab, iTabCur,
                                        pPk->aiColumn[i], iPk+i);
      }
      iKey = iPk;
    }else{
      iKey = pParse->nMem + 1;
      iKey = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iTabCur, iKey, 0);
      if( iKey>pParse->nMem ) pParse->nMem = iKey;
    }
  
    if( eOnePass!=ONEPASS_OFF ){
      /* For ONEPASS, no need to store the rowid/primary-key. There is only
      ** one, so just keep it in its register(s) and fall through to the
      ** delete code.  */
      nKey = nPk; /* OP_Found will use an unpacked key */
      aToOpen = sqlite3DbMallocRaw(db, nIdx+2);
      if( aToOpen==0 ){
        sqlite3WhereEnd(pWInfo);
        goto delete_from_cleanup;
      }
      memset(aToOpen, 1, nIdx+1);
      aToOpen[nIdx+1] = 0;
      if( aiCurOnePass[0]>=0 ) aToOpen[aiCurOnePass[0]-iTabCur] = 0;
      if( aiCurOnePass[1]>=0 ) aToOpen[aiCurOnePass[1]-iTabCur] = 0;
      if( addrEphOpen ) sqlite3VdbeChangeToNoop(v, addrEphOpen);
    }else{
      if( pPk ){
        /* Add the PK key for this row to the temporary table */
        iKey = ++pParse->nMem;
        nKey = 0;   /* Zero tells OP_Found to use a composite key */
        sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, iKey,
            sqlite3IndexAffinityStr(pParse->db, pPk), nPk);
        sqlite3VdbeAddOp2(v, OP_IdxInsert, iEphCur, iKey);
      }else{
        /* Add the rowid of the row to be deleted to the RowSet */
        nKey = 1;  /* OP_Seek always uses a single rowid */
        sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, iKey);
      }
    }
  
    /* If this DELETE cannot use the ONEPASS strategy, this is the 
    ** end of the WHERE loop */
    if( eOnePass!=ONEPASS_OFF ){
      addrBypass = sqlite3VdbeMakeLabel(v);
    }else{
      sqlite3WhereEnd(pWInfo);
    }
  
    /* Unless this is a view, open cursors for the table we are 
    ** deleting from and all its indices. If this is a view, then the
    ** only effect this statement has is to fire the INSTEAD OF 
    ** triggers.
    */
    if( !isView ){
      int iAddrOnce = 0;
      u8 p5 = (eOnePass==ONEPASS_OFF ? 0 : OPFLAG_FORDELETE);
      if( eOnePass==ONEPASS_MULTI ){
        iAddrOnce = sqlite3CodeOnce(pParse); VdbeCoverage(v);
      }
      testcase( IsVirtual(pTab) );
      sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, p5, iTabCur, 
                                 aToOpen, &iDataCur, &iIdxCur);
      assert( pPk || IsVirtual(pTab) || iDataCur==iTabCur );
      assert( pPk || IsVirtual(pTab) || iIdxCur==iDataCur+1 );
      if( eOnePass==ONEPASS_MULTI ) sqlite3VdbeJumpHere(v, iAddrOnce);
    }
  
    /* Set up a loop over the rowids/primary-keys that were found in the
    ** where-clause loop above.
    */
    if( eOnePass!=ONEPASS_OFF ){
      assert( nKey==nPk );  /* OP_Found will use an unpacked key */
      if( !IsVirtual(pTab) && aToOpen[iDataCur-iTabCur] ){
        assert( pPk!=0 || pTab->pSelect!=0 );
        sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);
        VdbeCoverage(v);
      }
    }else if( pPk ){
      addrLoop = sqlite3VdbeAddOp1(v, OP_Rewind, iEphCur); VdbeCoverage(v);
      sqlite3VdbeAddOp2(v, OP_RowKey, iEphCur, iKey);
      assert( nKey==0 );  /* OP_Found will use a composite key */
    }else{
      addrLoop = sqlite3VdbeAddOp3(v, OP_RowSetRead, iRowSet, 0, iKey);
      VdbeCoverage(v);
      assert( nKey==1 );
    }  
  
    /* Delete the row */
#ifndef SQLITE_OMIT_VIRTUALTABLE
    if( IsVirtual(pTab) ){
      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
      sqlite3VtabMakeWritable(pParse, pTab);
      sqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iKey, pVTab, P4_VTAB);
      sqlite3VdbeChangeP5(v, OE_Abort);
      assert( eOnePass==ONEPASS_OFF || eOnePass==ONEPASS_SINGLE );
      sqlite3MayAbort(pParse);
      if( eOnePass==ONEPASS_SINGLE && sqlite3IsToplevel(pParse) ){
        pParse->isMultiWrite = 0;
      }
    }else
#endif
    {
      int count = (pParse->nested==0);    /* True to count changes */
      int iIdxNoSeek = -1;
      if( bComplex==0 && aiCurOnePass[1]!=iDataCur ){
        iIdxNoSeek = aiCurOnePass[1];
      }
      sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
          iKey, nKey, count, OE_Default, eOnePass, iIdxNoSeek);
    }
  
    /* End of the loop over all rowids/primary-keys. */
    if( eOnePass!=ONEPASS_OFF ){
      sqlite3VdbeResolveLabel(v, addrBypass);
      sqlite3WhereEnd(pWInfo);
    }else if( pPk ){
      sqlite3VdbeAddOp2(v, OP_Next, iEphCur, addrLoop+1); VdbeCoverage(v);
      sqlite3VdbeJumpHere(v, addrLoop);
    }else{
      sqlite3VdbeGoto(v, addrLoop);
      sqlite3VdbeJumpHere(v, addrLoop);
    }     
  
    /* Close the cursors open on the table and its indexes. */
    if( !isView && !IsVirtual(pTab) ){
      if( !pPk ) sqlite3VdbeAddOp1(v, OP_Close, iDataCur);
      for(i=0, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
        sqlite3VdbeAddOp1(v, OP_Close, iIdxCur + i);
      }
    }
  } /* End non-truncate path */

  /* Update the sqlite_sequence table by storing the content of the
  ** maximum rowid counter values recorded while inserting into
  ** autoincrement tables.
  */
  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
    sqlite3AutoincrementEnd(pParse);
  }

  /* Return the number of rows that were deleted. If this routine is 
  ** generating code because of a call to sqlite3NestedParse(), do not
  ** invoke the callback function.
  */
  if( (db->flags&SQLITE_CountRows) && !pParse->nested && !pParse->pTriggerTab ){
    sqlite3VdbeAddOp2(v, OP_ResultRow, memCnt, 1);
    sqlite3VdbeSetNumCols(v, 1);
    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows deleted", SQLITE_STATIC);
  }

delete_from_cleanup:
  sqlite3AuthContextPop(&sContext);
  sqlite3SrcListDelete(db, pTabList);
  sqlite3ExprDelete(db, pWhere);
  sqlite3DbFree(db, aToOpen);
  return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x168, %rsp            # imm = 0x168
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movl $0x0, -0x58(%rbp)
movl $0x0, -0x5c(%rbp)
movl $0xffffffff, -0xb8(%rbp) # imm = 0xFFFFFFFF
movq $0x0, -0xd0(%rbp)
movl $0x0, -0xdc(%rbp)
movw $0x1, -0xde(%rbp)
movl $0x0, -0xec(%rbp)
movl $0x0, -0xf0(%rbp)
movl $0x0, -0xf4(%rbp)
movl $0x0, -0xf8(%rbp)
movl $0x0, -0xfc(%rbp)
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0xb2b0
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x10(%rbp), %rax
cmpl $0x0, 0x4c(%rax)
jne 0x61c62
movq -0x68(%rbp), %rax
movzbl 0x51(%rax), %eax
cmpl $0x0, %eax
je 0x61c67
jmp 0x62814
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x7aaf0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x61c84
jmp 0x62814
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl $0x6d, %edx
xorl %eax, %eax
movl %eax, %r8d
movq %r8, %rcx
callq 0x8f970
movq %rax, -0x108(%rbp)
movq -0x30(%rbp), %rax
cmpq $0x0, 0x18(%rax)
setne %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x100(%rbp)
movb $0x1, %al
cmpq $0x0, -0x108(%rbp)
movb %al, -0x129(%rbp)
jne 0x61ced
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
xorl %ecx, %ecx
callq 0x8fa50
cmpl $0x0, %eax
setne %al
movb %al, -0x129(%rbp)
movb -0x129(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x10c(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x78f50
cmpl $0x0, %eax
je 0x61d15
jmp 0x62814
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x108(%rbp), %rcx
xorl %edx, %edx
movl $0x1, %eax
cmpq $0x0, %rcx
cmovnel %eax, %edx
callq 0x8fb60
cmpl $0x0, %eax
je 0x61d41
jmp 0x62814
movq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x68(%rax), %rsi
callq 0x17ab0
movl %eax, -0xb4(%rbp)
movq -0x68(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0xb4(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
movq -0x38(%rbp), %r8
movl $0x9, %esi
xorl %eax, %eax
movl %eax, %ecx
callq 0x73440
movl %eax, -0xbc(%rbp)
cmpl $0x1, -0xbc(%rbp)
jne 0x61da6
jmp 0x62814
movq -0x10(%rbp), %rcx
movl 0x50(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x50(%rcx)
movq -0x18(%rbp), %rcx
movl %eax, 0x4c(%rcx)
movl %eax, -0x54(%rbp)
movl $0x0, -0x60(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x61dfd
movq -0x10(%rbp), %rax
movl 0x50(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x50(%rax)
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
movl -0x60(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x60(%rbp)
jmp 0x61dd2
cmpl $0x0, -0x100(%rbp)
je 0x61e1a
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
leaq -0x78(%rbp), %rsi
callq 0x8fc40
movq -0x10(%rbp), %rdi
callq 0x6bd00
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x61e33
jmp 0x62814
movq -0x10(%rbp), %rax
movzbl 0x1e(%rax), %eax
cmpl $0x0, %eax
jne 0x61e49
movq -0x28(%rbp), %rdi
callq 0x8fc80
movq -0x10(%rbp), %rdi
movl -0xb4(%rbp), %edx
movl $0x1, %esi
callq 0x73840
cmpl $0x0, -0x100(%rbp)
je 0x61e83
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x54(%rbp), %ecx
callq 0x8fcb0
movl -0x54(%rbp), %eax
movl %eax, -0x5c(%rbp)
movl %eax, -0x58(%rbp)
leaq -0xb0(%rbp), %rdi
xorl %esi, %esi
movl $0x38, %edx
callq 0xb2b0
movq -0x10(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x20(%rbp), %rsi
leaq -0xb0(%rbp), %rdi
callq 0x74b50
cmpl $0x0, %eax
je 0x61ec6
jmp 0x62814
movq -0x68(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x61f00
movq -0x10(%rbp), %rcx
movl 0x54(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x54(%rcx)
movl %eax, -0xb8(%rbp)
movq -0x28(%rbp), %rdi
movl -0xb8(%rbp), %ecx
movl $0x17, %esi
xorl %edx, %edx
callq 0x6c310
cmpl $0x0, -0xbc(%rbp)
jne 0x61fdc
cmpq $0x0, -0x20(%rbp)
jne 0x61fdc
cmpl $0x0, -0x10c(%rbp)
jne 0x61fdc
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x61fdc
movq -0x10(%rbp), %rdi
movl -0xb4(%rbp), %esi
movq -0x30(%rbp), %rax
movl 0x38(%rax), %edx
movq -0x30(%rbp), %rax
movq (%rax), %r8
movl $0x1, %ecx
callq 0x6c340
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x61f9b
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rax
movl 0x38(%rax), %edx
movl -0xb4(%rbp), %ecx
movl -0xb8(%rbp), %r8d
movq -0x30(%rbp), %rax
movq (%rax), %r9
movl $0x78, %esi
movl $0xfffffffe, (%rsp)     # imm = 0xFFFFFFFE
callq 0x6be70
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x61fd7
movq -0x28(%rbp), %rdi
movq -0x50(%rbp), %rax
movl 0x58(%rax), %edx
movl -0xb4(%rbp), %ecx
movl $0x78, %esi
callq 0x6c310
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x61fa7
jmp 0x62785
movw $0xc, -0x10e(%rbp)
movl -0x10c(%rbp), %edx
movl $0x2000, %ecx           # imm = 0x2000
xorl %eax, %eax
cmpl $0x0, %edx
cmovnel %eax, %ecx
movzwl -0x10e(%rbp), %eax
orl %ecx, %eax
movw %ax, -0x10e(%rbp)
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x6205a
movq $0x0, -0xd8(%rbp)
movw $0x1, -0xde(%rbp)
movq -0x10(%rbp), %rcx
movl 0x54(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x54(%rcx)
movl %eax, -0xf0(%rbp)
movq -0x28(%rbp), %rdi
movl -0xf0(%rbp), %ecx
movl $0x1a, %esi
xorl %edx, %edx
callq 0x6c310
jmp 0x620e3
movq -0x30(%rbp), %rdi
callq 0x52e70
movq %rax, -0xd8(%rbp)
movq -0xd8(%rbp), %rax
movw 0x5e(%rax), %ax
movw %ax, -0xde(%rbp)
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
addl $0x1, %eax
movl %eax, -0xdc(%rbp)
movswl -0xde(%rbp), %ecx
movq -0x10(%rbp), %rax
addl 0x54(%rax), %ecx
movl %ecx, 0x54(%rax)
movq -0x10(%rbp), %rcx
movl 0x50(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x50(%rcx)
movl %eax, -0xec(%rbp)
movq -0x28(%rbp), %rdi
movl -0xec(%rbp), %edx
movswl -0xde(%rbp), %ecx
movl $0x3a, %esi
callq 0x6c310
movl %eax, -0xfc(%rbp)
movq -0x10(%rbp), %rdi
movq -0xd8(%rbp), %rsi
callq 0x6c4e0
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
movw -0x10e(%rbp), %r9w
movl -0x54(%rbp), %eax
addl $0x1, %eax
xorl %ecx, %ecx
movl %ecx, %r8d
movq %r8, %rcx
movzwl %r9w, %r9d
movl %eax, (%rsp)
callq 0x7dfc0
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jne 0x62121
jmp 0x62814
movq -0x48(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x8fde0
movl %eax, -0xc0(%rbp)
movq -0x68(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x62161
movq -0x28(%rbp), %rdi
movl -0xb8(%rbp), %edx
movl $0x26, %esi
movl $0x1, %ecx
callq 0x6c310
cmpq $0x0, -0xd8(%rbp)
je 0x621c7
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movswl -0xde(%rbp), %ecx
cmpl %ecx, %eax
jge 0x621b9
movq -0x28(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x54(%rbp), %edx
movq -0xd8(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x3c(%rbp), %rcx
movswl (%rax,%rcx,2), %ecx
movl -0xdc(%rbp), %r8d
addl -0x3c(%rbp), %r8d
callq 0x6ff20
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x62172
movl -0xdc(%rbp), %eax
movl %eax, -0xe4(%rbp)
jmp 0x6221a
movq -0x10(%rbp), %rax
movl 0x54(%rax), %eax
addl $0x1, %eax
movl %eax, -0xe4(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movl -0x54(%rbp), %ecx
movl -0xe4(%rbp), %r8d
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %r9d, %r9d
callq 0x6dd30
movl %eax, -0xe4(%rbp)
movl -0xe4(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x54(%rcx), %eax
jle 0x62218
movl -0xe4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x54(%rax)
jmp 0x6221a
cmpl $0x0, -0xc0(%rbp)
je 0x622f1
movw -0xde(%rbp), %ax
movw %ax, -0xe6(%rbp)
movq -0x68(%rbp), %rdi
movl -0x60(%rbp), %eax
addl $0x2, %eax
movslq %eax, %rsi
callq 0x175d0
movq %rax, -0xd0(%rbp)
cmpq $0x0, -0xd0(%rbp)
jne 0x62266
movq -0x48(%rbp), %rdi
callq 0x7f7a0
jmp 0x62814
movq -0xd0(%rbp), %rdi
movl -0x60(%rbp), %eax
addl $0x1, %eax
movslq %eax, %rdx
movl $0x1, %esi
callq 0xb2b0
movq -0xd0(%rbp), %rax
movl -0x60(%rbp), %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0xc8(%rbp)
jl 0x622b4
movq -0xd0(%rbp), %rax
movl -0xc8(%rbp), %ecx
subl -0x54(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0xc4(%rbp)
jl 0x622d4
movq -0xd0(%rbp), %rax
movl -0xc4(%rbp), %ecx
subl -0x54(%rbp), %ecx
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
cmpl $0x0, -0xfc(%rbp)
je 0x622ec
movq -0x28(%rbp), %rdi
movl -0xfc(%rbp), %esi
callq 0x17f60
jmp 0x623d0
cmpq $0x0, -0xd8(%rbp)
je 0x623ab
movq -0x10(%rbp), %rcx
movl 0x54(%rcx), %eax
addl $0x1, %eax
movl %eax, 0x54(%rcx)
movl %eax, -0xe4(%rbp)
movw $0x0, -0xe6(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x140(%rbp)
movl -0xdc(%rbp), %eax
movl %eax, -0x138(%rbp)
movswl -0xde(%rbp), %eax
movl %eax, -0x134(%rbp)
movl -0xe4(%rbp), %eax
movl %eax, -0x130(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movq -0xd8(%rbp), %rsi
callq 0x8ea70
movq -0x140(%rbp), %rdi
movl -0x138(%rbp), %edx
movl -0x134(%rbp), %ecx
movl -0x130(%rbp), %r8d
movq %rax, %r9
movswl -0xde(%rbp), %eax
movl $0x32, %esi
movl %eax, (%rsp)
callq 0x6be70
movq -0x28(%rbp), %rdi
movl -0xec(%rbp), %edx
movl -0xe4(%rbp), %ecx
movl $0x70, %esi
callq 0x6c310
jmp 0x623ce
movw $0x1, -0xe6(%rbp)
movq -0x28(%rbp), %rdi
movl -0xf0(%rbp), %edx
movl -0xe4(%rbp), %ecx
movl $0x82, %esi
callq 0x6c310
jmp 0x623d0
cmpl $0x0, -0xc0(%rbp)
je 0x623ea
movq -0x28(%rbp), %rdi
callq 0x6e5a0
movl %eax, -0xf4(%rbp)
jmp 0x623f3
movq -0x48(%rbp), %rdi
callq 0x7f7a0
cmpl $0x0, -0x100(%rbp)
jne 0x6248c
movl $0x0, -0x114(%rbp)
movl -0xc0(%rbp), %edx
movl $0x8, %eax
xorl %ecx, %ecx
cmpl $0x0, %edx
cmovel %ecx, %eax
movb %al, -0x115(%rbp)
cmpl $0x2, -0xc0(%rbp)
jne 0x6243b
movq -0x10(%rbp), %rdi
callq 0x724e0
movl %eax, -0x114(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movb -0x115(%rbp), %cl
movl -0x54(%rbp), %r8d
movq -0xd0(%rbp), %r9
movl $0x38, %edx
leaq -0x58(%rbp), %r10
leaq -0x5c(%rbp), %rax
movzbl %cl, %ecx
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x8fe10
cmpl $0x2, -0xc0(%rbp)
jne 0x6248a
movq -0x28(%rbp), %rdi
movl -0x114(%rbp), %esi
callq 0x6be30
jmp 0x6248c
cmpl $0x0, -0xc0(%rbp)
je 0x624e6
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x624e4
movq -0xd0(%rbp), %rax
movl -0x58(%rbp), %ecx
subl -0x54(%rbp), %ecx
movslq %ecx, %rcx
movzbl (%rax,%rcx), %eax
cmpl $0x0, %eax
je 0x624e4
movq -0x28(%rbp), %rdi
movl -0x58(%rbp), %edx
movl -0xf4(%rbp), %ecx
movl -0xe4(%rbp), %r8d
movswl -0xe6(%rbp), %r9d
movl $0x46, %esi
callq 0x17b10
jmp 0x6254b
cmpq $0x0, -0xd8(%rbp)
je 0x62526
movq -0x28(%rbp), %rdi
movl -0xec(%rbp), %edx
movl $0x6e, %esi
callq 0x6e570
movl %eax, -0xf8(%rbp)
movq -0x28(%rbp), %rdi
movl -0xec(%rbp), %edx
movl -0xe4(%rbp), %ecx
movl $0x67, %esi
callq 0x6c310
jmp 0x62549
movq -0x28(%rbp), %rdi
movl -0xf0(%rbp), %edx
movl -0xe4(%rbp), %r8d
movl $0x83, %esi
xorl %ecx, %ecx
callq 0x56c10
movl %eax, -0xf8(%rbp)
jmp 0x6254b
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x625e5
movq -0x68(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x55e90
movq %rax, -0x120(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x90010
movq -0x28(%rbp), %rdi
movl -0xe4(%rbp), %r8d
movq -0x120(%rbp), %r9
movl $0xd, %esi
xorl %edx, %edx
movl $0x1, %ecx
movl $0xfffffff6, (%rsp)     # imm = 0xFFFFFFF6
callq 0x6be70
movq -0x28(%rbp), %rdi
movl $0x2, %esi
callq 0x17b70
movq -0x10(%rbp), %rdi
callq 0x6fdd0
cmpl $0x1, -0xc0(%rbp)
jne 0x625e0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1c0(%rax)
jne 0x625e0
movq -0x10(%rbp), %rax
movb $0x0, 0x20(%rax)
jmp 0x6268d
movq -0x10(%rbp), %rax
movzbl 0x1e(%rax), %eax
cmpl $0x0, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x124(%rbp)
movl $0xffffffff, -0x128(%rbp) # imm = 0xFFFFFFFF
cmpl $0x0, -0x10c(%rbp)
jne 0x62628
movl -0xc4(%rbp), %eax
cmpl -0x58(%rbp), %eax
je 0x62628
movl -0xc4(%rbp), %eax
movl %eax, -0x128(%rbp)
movq -0x10(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x108(%rbp), %rdx
movl -0x58(%rbp), %ecx
movl -0x5c(%rbp), %r8d
movl -0xe4(%rbp), %r9d
movw -0xe6(%rbp), %bx
movl -0x124(%rbp), %eax
movb %al, %r11b
movl -0xc0(%rbp), %eax
movb %al, %r10b
movl -0x128(%rbp), %eax
movswl %bx, %ebx
movl %ebx, (%rsp)
movzbl %r11b, %r11d
movl %r11d, 0x8(%rsp)
movl $0xa, 0x10(%rsp)
movzbl %r10b, %r10d
movl %r10d, 0x18(%rsp)
movl %eax, 0x20(%rsp)
callq 0x90120
cmpl $0x0, -0xc0(%rbp)
je 0x626b0
movq -0x28(%rbp), %rdi
movl -0xf4(%rbp), %esi
callq 0x6e780
movq -0x48(%rbp), %rdi
callq 0x7f7a0
jmp 0x62708
cmpq $0x0, -0xd8(%rbp)
je 0x626e8
movq -0x28(%rbp), %rdi
movl -0xec(%rbp), %edx
movl -0xf8(%rbp), %ecx
addl $0x1, %ecx
movl $0x8, %esi
callq 0x6c310
movq -0x28(%rbp), %rdi
movl -0xf8(%rbp), %esi
callq 0x6be30
jmp 0x62706
movq -0x28(%rbp), %rdi
movl -0xf8(%rbp), %esi
callq 0x6c1b0
movq -0x28(%rbp), %rdi
movl -0xf8(%rbp), %esi
callq 0x6be30
jmp 0x62708
cmpl $0x0, -0x100(%rbp)
jne 0x62783
movq -0x30(%rbp), %rax
movzbl 0x46(%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
jne 0x62783
cmpq $0x0, -0xd8(%rbp)
jne 0x6273c
movq -0x28(%rbp), %rdi
movl -0x58(%rbp), %edx
movl $0x3e, %esi
callq 0x6e570
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
je 0x62781
movq -0x28(%rbp), %rdi
movl -0x5c(%rbp), %edx
addl -0x3c(%rbp), %edx
movl $0x3e, %esi
callq 0x6e570
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
movq -0x50(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x50(%rbp)
jmp 0x6274f
jmp 0x62783
jmp 0x62785
movq -0x10(%rbp), %rax
movzbl 0x1e(%rax), %eax
cmpl $0x0, %eax
jne 0x627a9
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1c8(%rax)
jne 0x627a9
movq -0x10(%rbp), %rdi
callq 0x90440
movq -0x68(%rbp), %rax
movl 0x2c(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x62812
movq -0x10(%rbp), %rax
cmpb $0x0, 0x1e(%rax)
jne 0x62812
movq -0x10(%rbp), %rax
cmpq $0x0, 0x1c8(%rax)
jne 0x62812
movq -0x28(%rbp), %rdi
movl -0xb8(%rbp), %edx
movl $0x22, %esi
movl $0x1, %ecx
callq 0x6c310
movq -0x28(%rbp), %rdi
movl $0x1, %esi
callq 0x58370
movq -0x28(%rbp), %rdi
xorl %edx, %edx
leaq 0x45df9(%rip), %rcx     # 0xa85ff
xorl %eax, %eax
movl %eax, %r8d
movl %edx, %esi
callq 0x58440
jmp 0x62814
leaq -0x78(%rbp), %rdi
callq 0x90590
movq -0x68(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x53960
movq -0x68(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x536c0
movq -0x68(%rbp), %rdi
movq -0xd0(%rbp), %rsi
callq 0xd260
addq $0x168, %rsp            # imm = 0x168
popq %rbx
popq %rbp
retq
nopw %cs:(%rax,%rax)