// File: /workspace/github_c_makefile_star2_O2/skeeto[P]flappy/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;          /* VDBE cursor for the canonical data source */
  int iIdxCur;           /* 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 okOnePass;         /* True for one-pass algorithm without the FIFO */
  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 addrDelete = 0;    /* Jump directly to the delete logic */
  int addrEphOpen = 0;   /* Instruction to open the Ephermeral table */
 
#ifndef SQLITE_OMIT_TRIGGER
  int isView;                  /* True if attempting to delete from a view */
  Trigger *pTrigger;           /* List of table triggers, if required */
#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;
#else
# define pTrigger 0
# define isView 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
  ** a 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 && !pTrigger && !IsVirtual(pTab) 
   && 0==sqlite3FkRequired(pParse, pTab, 0, 0)
  ){
    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 */
  {
    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 ephermeral 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.
    */
    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, 0, 0, 
                               WHERE_ONEPASS_DESIRED|WHERE_DUPLICATES_OK,
                               iTabCur+1);
    if( pWInfo==0 ) goto delete_from_cleanup;
    okOnePass = sqlite3WhereOkOnePass(pWInfo, aiCurOnePass);
  
    /* 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++){
        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( okOnePass ){
      /* 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);
      addrDelete = sqlite3VdbeAddOp0(v, OP_Goto); /* Jump to DELETE logic */
    }else if( pPk ){
      /* Construct a composite key for the row to be deleted and remember it */
      iKey = ++pParse->nMem;
      nKey = 0;   /* Zero tells OP_Found to use a composite key */
      sqlite3VdbeAddOp4(v, OP_MakeRecord, iPk, nPk, iKey,
                        sqlite3IndexAffinityStr(v, pPk), P4_TRANSIENT);
      sqlite3VdbeAddOp2(v, OP_IdxInsert, iEphCur, iKey);
    }else{
      /* Get the rowid of the row to be deleted and remember it in the RowSet */
      nKey = 1;  /* OP_Seek always uses a single rowid */
      sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, iKey);
    }
  
    /* End of the WHERE loop */
    sqlite3WhereEnd(pWInfo);
    if( okOnePass ){
      /* Bypass the delete logic below if the WHERE loop found zero rows */
      addrBypass = sqlite3VdbeMakeLabel(v);
      sqlite3VdbeAddOp2(v, OP_Goto, 0, addrBypass);
      sqlite3VdbeJumpHere(v, addrDelete);
    }
  
    /* 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 ){
      sqlite3OpenTableAndIndices(pParse, pTab, OP_OpenWrite, iTabCur, aToOpen,
                                 &iDataCur, &iIdxCur);
      assert( pPk || iDataCur==iTabCur );
      assert( pPk || iIdxCur==iDataCur+1 );
    }
  
    /* Set up a loop over the rowids/primary-keys that were found in the
    ** where-clause loop above.
    */
    if( okOnePass ){
      /* Just one row.  Hence the top-of-loop is a no-op */
      assert( nKey==nPk ); /* OP_Found will use an unpacked key */
      if( aToOpen[iDataCur-iTabCur] ){
        assert( pPk!=0 );
        sqlite3VdbeAddOp4Int(v, OP_NotFound, iDataCur, addrBypass, iKey, nKey);
      }
    }else if( pPk ){
      addrLoop = sqlite3VdbeAddOp1(v, OP_Rewind, iEphCur);
      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);
      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);
      sqlite3MayAbort(pParse);
    }else
#endif
    {
      int count = (pParse->nested==0);    /* True to count changes */
      sqlite3GenerateRowDelete(pParse, pTab, pTrigger, iDataCur, iIdxCur,
                               iKey, nKey, count, OE_Default, okOnePass);
    }
  
    /* End of the loop over all rowids/primary-keys. */
    if( okOnePass ){
      sqlite3VdbeResolveLabel(v, addrBypass);
    }else if( pPk ){
      sqlite3VdbeAddOp2(v, OP_Next, iEphCur, addrLoop+1);
      sqlite3VdbeJumpHere(v, addrLoop);
    }else{
      sqlite3VdbeAddOp2(v, OP_Goto, 0, 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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movq %rsi, %r15
movq (%rdi), %rbx
cmpl $0x0, 0x50(%rdi)
movq %rdx, 0x78(%rsp)
jne 0x3ceec
cmpb $0x0, 0x50(%rbx)
je 0x3cf23
xorl %ebp, %ebp
movq %rbx, %rdi
movq %r15, %rsi
callq 0x305d6
movq %rbx, %rdi
movq 0x78(%rsp), %rsi
callq 0x3044f
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x9805
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdi, %r12
movq %r15, %rsi
callq 0x4bcea
testq %rax, %rax
je 0x3ceec
movq %rax, %r13
xorl %ebp, %ebp
pushq $0x6b
popq %rdx
movq %r12, %rdi
movq %rax, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x55469
movq %rax, %r14
movq 0x18(%r13), %rax
movq %rax, 0x98(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x4b03d
testl %eax, %eax
jne 0x3ceee
xorl %edx, %edx
testq %r14, %r14
setne %dl
movq %r12, %rdi
movq %r13, %rsi
callq 0x554e7
testl %eax, %eax
jne 0x3ceec
movq 0x70(%r13), %rsi
movq %rbx, %rdi
callq 0x10cd8
movq 0x20(%rbx), %rdx
movl %eax, 0x38(%rsp)
movslq %eax, %rcx
shlq $0x5, %rcx
movq (%rdx,%rcx), %r8
movq (%r13), %rdx
xorl %ebp, %ebp
pushq $0x9
popq %rsi
movq %r12, %rdi
xorl %ecx, %ecx
callq 0x4810e
cmpl $0x1, %eax
je 0x3ceee
movl %eax, 0x58(%rsp)
movq %r14, 0x90(%rsp)
movl 0x54(%r12), %edx
leal 0x1(%rdx), %eax
movl %eax, 0x34(%rsp)
movl %eax, 0x54(%r12)
movl %edx, 0x44(%r15)
movq %r13, 0x40(%rsp)
movq %r13, %rax
addq $0x10, %rax
pushq $0x2
popq %r13
pushq $0x1
popq %r14
movq %rax, 0xb0(%rsp)
movq (%rax), %rax
testq %rax, %rax
je 0x3d019
leal (%rdx,%r13), %ecx
movl %ecx, 0x54(%r12)
addq $0x28, %rax
incl %r13d
incq %r14
jmp 0x3cffc
movq %rdx, 0x50(%rsp)
cmpq $0x0, 0x98(%rsp)
je 0x3d053
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq 0x250(%r12), %rcx
movq %rcx, 0xb8(%rsp)
movq %rax, 0x250(%r12)
movq %r12, 0xc0(%rsp)
jmp 0x3d06b
movq $0x0, 0xc0(%rsp)
movq $0x0, 0xb8(%rsp)
movq %r12, %rdi
callq 0x43f1b
testq %rax, %rax
je 0x3d101
cmpb $0x0, 0x1e(%r12)
jne 0x3d08b
orb $0x10, 0x9a(%rax)
movq %rax, 0x28(%rsp)
pushq $0x1
popq %rsi
movq %r12, %rdi
movl 0x38(%rsp), %edx
callq 0x482d6
cmpq $0x0, 0x98(%rsp)
movq 0x78(%rsp), %rbp
movq %r14, 0x68(%rsp)
je 0x3d0d6
movq %r12, %rdi
movq 0x40(%rsp), %rsi
movq %rbp, %rdx
movq 0x50(%rsp), %r14
movl %r14d, %ecx
callq 0x55569
movl %r14d, 0x74(%rsp)
movl %r14d, 0x64(%rsp)
xorps %xmm0, %xmm0
leaq 0xd0(%rsp), %rdi
andq $0x0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movq %r12, (%rdi)
movq %r15, 0x8(%rdi)
movq %rbp, %rsi
callq 0x48812
testl %eax, %eax
je 0x3d128
xorl %ebp, %ebp
movq 0xc0(%rsp), %rax
testq %rax, %rax
je 0x3ceee
movq 0xb8(%rsp), %rcx
movq %rcx, 0x250(%rax)
jmp 0x3ceee
testb $-0x80, 0x2c(%rbx)
movq 0x28(%rsp), %rdi
jne 0x3d13c
pushq $-0x1
popq %rax
movl %eax, 0x60(%rsp)
jmp 0x3d156
movl 0x58(%r12), %ecx
incl %ecx
movl %ecx, 0x58(%r12)
pushq $0x17
popq %rsi
xorl %edx, %edx
movl %ecx, 0x60(%rsp)
callq 0x43f64
movq 0x78(%rsp), %rdx
cmpq $0x0, 0x90(%rsp)
setne %al
cmpl $0x0, 0x58(%rsp)
setne %cl
testq %rdx, %rdx
setne %dl
orb %cl, %dl
orb %al, %dl
movq 0x40(%rsp), %rcx
movb 0x48(%rcx), %bpl
movl %ebp, %eax
andb $0x10, %al
shrb $0x4, %al
orb %dl, %al
jne 0x3d1ab
movq %r12, %rdi
movq 0x40(%rsp), %rsi
xorl %edx, %edx
xorl %ecx, %ecx
callq 0x55658
movq 0x40(%rsp), %rsi
testl %eax, %eax
je 0x3d479
testb $0x20, %bpl
jne 0x3d1fc
movl 0x58(%r12), %ecx
incl %ecx
movl %ecx, 0x58(%r12)
pushq $0x1a
popq %rsi
movq $0x0, 0xa8(%rsp)
movq 0x28(%rsp), %rdi
xorl %edx, %edx
movl %ecx, 0x70(%rsp)
callq 0x43f64
movw $0x1, %ax
movl %eax, 0x4c(%rsp)
movl $0x0, 0x38(%rsp)
xorl %r14d, %r14d
movl $0x0, 0x84(%rsp)
jmp 0x3d267
movq 0x40(%rsp), %rdi
callq 0x30033
movq %rax, %rbp
movzwl 0x5e(%rax), %ecx
movl 0x54(%r12), %r14d
movl 0x58(%r12), %eax
leal 0x1(%rax), %edx
movl %edx, 0x38(%rsp)
movl %ecx, 0x4c(%rsp)
movswl %cx, %ecx
addl %ecx, %eax
movl %eax, 0x58(%r12)
leal 0x1(%r14), %eax
movl %eax, 0x54(%r12)
pushq $0x35
popq %rsi
movq 0x28(%rsp), %rdi
movl %r14d, %edx
callq 0x43f64
movl %eax, 0x84(%rsp)
movq %r12, %rdi
movq %rbp, 0xa8(%rsp)
movq %rbp, %rsi
callq 0x441fe
movl $0x0, 0x70(%rsp)
movl 0x34(%rsp), %eax
movl %eax, (%rsp)
xorl %ebp, %ebp
pushq $0xc
popq %r9
movq %r12, %rdi
movq %r15, %rsi
movq 0x78(%rsp), %rdx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x4cc2b
testq %rax, %rax
je 0x3d103
movq %r14, 0x88(%rsp)
movl 0x38(%rsp), %ecx
movq %rcx, 0x38(%rsp)
movq 0x4c(%rax), %rcx
movq %rcx, 0xc8(%rsp)
movq %rax, 0xa0(%rsp)
movb 0x35(%rax), %al
movb %al, 0x34(%rsp)
testb $-0x80, 0x2c(%rbx)
movq 0x28(%rsp), %rbp
je 0x3d2db
pushq $0x22
popq %rsi
pushq $0x1
popq %rcx
movq %rbp, %rdi
movl 0x60(%rsp), %edx
callq 0x43f64
movq 0xa8(%rsp), %r14
testq %r14, %r14
je 0x3d33e
xorl %ebp, %ebp
movl 0x4c(%rsp), %ecx
testw %cx, %cx
movl $0x0, %eax
cmovgl %ecx, %eax
movzwl %ax, %eax
movq %rax, 0x58(%rsp)
cmpq %rbp, 0x58(%rsp)
je 0x3d332
movq 0x8(%r14), %rax
movswl (%rax,%rbp,2), %ecx
movq 0x38(%rsp), %rax
leal (%rax,%rbp), %r8d
movq 0x28(%rsp), %rdi
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rdx
callq 0x4666b
incq %rbp
jmp 0x3d301
movq 0x38(%rsp), %rax
movq 0x28(%rsp), %rbp
jmp 0x3d36a
movl 0x58(%r12), %r8d
incl %r8d
pushq $-0x1
popq %rdx
movq %r12, %rdi
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rcx
xorl %r9d, %r9d
callq 0x453f3
cmpl 0x58(%r12), %eax
jle 0x3d36a
movl %eax, 0x58(%r12)
cmpb $0x0, 0x34(%rsp)
je 0x3d407
movl %eax, 0x38(%rsp)
movq %rbx, %rdi
movl %r13d, %esi
callq 0x10a37
testq %rax, %rax
je 0x3d4f1
movq %rax, %rbp
pushq $0x1
popq %rsi
movq %rax, %rdi
movq 0x68(%rsp), %r13
movq %r13, %rdx
callq 0x7190
movb $0x0, (%rbp,%r13)
movq 0xc8(%rsp), %rcx
testl %ecx, %ecx
js 0x3d3c2
movl %ecx, %eax
subl 0x50(%rsp), %eax
cltq
movb $0x0, (%rbp,%rax)
testq %rcx, %rcx
movb 0x34(%rsp), %r13b
js 0x3d3dc
shrq $0x20, %rcx
subl 0x50(%rsp), %ecx
movslq %ecx, %rax
movb $0x0, (%rbp,%rax)
movl 0x84(%rsp), %esi
testl %esi, %esi
je 0x3d3f1
movq 0x28(%rsp), %rdi
callq 0x10ed2
pushq $0x10
popq %rsi
movq 0x28(%rsp), %rdi
callq 0x43f5b
movl %eax, 0x68(%rsp)
jmp 0x3d52f
testq %r14, %r14
je 0x3d503
movl 0x58(%r12), %r13d
incl %r13d
movl %r13d, 0x58(%r12)
movswl 0x4c(%rsp), %eax
movl %eax, 0x58(%rsp)
movq %rbp, %rdi
movq %r14, %rsi
callq 0x4c5f6
andl $0x0, (%rsp)
pushq $0x2d
popq %rsi
movq %rbp, %rdi
movq 0x38(%rsp), %rdx
movl 0x58(%rsp), %ecx
movl %r13d, %r8d
movq %rax, %r9
callq 0x43fe6
pushq $0x69
popq %rsi
movq %rbp, %rdi
movq 0x88(%rsp), %rdx
movl %r13d, 0x38(%rsp)
movl %r13d, %ecx
callq 0x43f64
xorl %ebp, %ebp
movl $0x0, 0x4c(%rsp)
jmp 0x3d522
movl 0x3c(%rsi), %edx
movq (%rsi), %r8
pushq $0x1
popq %rcx
movq %r12, %rdi
movl 0x38(%rsp), %r14d
movq %rsi, %r13
movl %r14d, %esi
callq 0x4410c
testb $0x20, 0x48(%r13)
jne 0x3d4c0
movl 0x3c(%r13), %edx
movq (%r13), %r9
movl $0xfffffffe, (%rsp)     # imm = 0xFFFFFFFE
pushq $0x6f
popq %rsi
movq 0x28(%rsp), %rdi
movl %r14d, %ecx
movl 0x60(%rsp), %r8d
callq 0x43fe6
xorl %ebp, %ebp
movq 0xb0(%rsp), %r13
movq (%r13), %r13
testq %r13, %r13
je 0x3d856
movl 0x58(%r13), %edx
movq 0x28(%rsp), %rdi
pushq $0x6f
popq %rsi
movl %r14d, %ecx
callq 0x43f64
addq $0x28, %r13
jmp 0x3d4ca
movq 0xa0(%rsp), %rdi
callq 0x4fb43
jmp 0x3d101
pushq $0x78
popq %rsi
movq %rbp, %rdi
movl 0x70(%rsp), %edx
movl %eax, 0x38(%rsp)
movl %eax, %ecx
callq 0x43f64
xorl %ebp, %ebp
movw $0x1, %ax
movl %eax, 0x4c(%rsp)
movl $0x0, 0x68(%rsp)
movb 0x34(%rsp), %r13b
movq 0xa0(%rsp), %rdi
callq 0x4fb43
testb %r13b, %r13b
je 0x3d58b
movq 0x28(%rsp), %r13
movq %r13, %rdi
callq 0x4595f
pushq $0x10
popq %rsi
movq %r13, %rdi
xorl %edx, %edx
movl %eax, 0x58(%rsp)
movl %eax, %ecx
callq 0x43f64
movl 0x68(%rsp), %edx
testl %edx, %edx
js 0x3d584
movl 0x34(%r13), %eax
cmpl %edx, %eax
jbe 0x3d584
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rcx
movl %edx, %edx
imulq $0x18, %rdx, %rdx
movl %eax, 0x8(%rcx,%rdx)
movb 0x34(%rsp), %r13b
jmp 0x3d593
movl $0x0, 0x58(%rsp)
cmpq $0x0, 0x98(%rsp)
jne 0x3d5c4
leaq 0x74(%rsp), %rax
movq %rax, (%rsp)
pushq $0x33
popq %rdx
leaq 0x64(%rsp), %r9
movq %r12, %rdi
movq 0x40(%rsp), %rsi
movq 0x50(%rsp), %rcx
movq %rbp, %r8
callq 0x556fe
movswl 0x4c(%rsp), %r9d
testb %r13b, %r13b
movl %r9d, 0x68(%rsp)
je 0x3d608
movl 0x64(%rsp), %edx
movl %edx, %eax
subl 0x50(%rsp), %eax
cltq
movq $0x0, 0x50(%rsp)
cmpb $0x0, (%rbp,%rax)
je 0x3d660
pushq $0x3f
popq %rsi
movq 0x28(%rsp), %rdi
movl 0x58(%rsp), %ecx
movl 0x38(%rsp), %r8d
callq 0x441d6
jmp 0x3d660
testq %r14, %r14
je 0x3d643
pushq $0x67
popq %rsi
movq 0x28(%rsp), %r13
movq %r13, %rdi
movq 0x88(%rsp), %rdx
callq 0x457e7
movq %rax, 0x50(%rsp)
pushq $0x60
popq %rsi
movq %r13, %rdi
movq 0x88(%rsp), %rdx
movl 0x38(%rsp), %ecx
callq 0x43f64
jmp 0x3d660
pushq $0x79
popq %rsi
movq 0x28(%rsp), %rdi
movl 0x70(%rsp), %edx
xorl %ecx, %ecx
movl 0x38(%rsp), %r8d
callq 0x43f69
movq %rax, 0x50(%rsp)
movq 0x40(%rsp), %r13
testb $0x10, 0x48(%r13)
jne 0x3d6bd
xorl %eax, %eax
cmpb $0x0, 0x1e(%r12)
sete %al
movl 0x64(%rsp), %ecx
movl 0x74(%rsp), %r8d
movzbl 0x34(%rsp), %edx
movl %edx, 0x18(%rsp)
movl %eax, 0x8(%rsp)
movl 0x68(%rsp), %eax
movl %eax, (%rsp)
movl $0xa, 0x10(%rsp)
movq %r12, %rdi
movq %r13, %rsi
movq 0x90(%rsp), %rdx
movl 0x38(%rsp), %r9d
callq 0x558d6
movb 0x34(%rsp), %al
movq %r13, %rsi
jmp 0x3d73b
movq %rbx, %rdi
movq %r13, %rsi
callq 0x318fb
movq %rax, 0x90(%rsp)
movq %r12, %rdi
movq %r13, %rsi
callq 0x5584e
movl $0xfffffff6, (%rsp)     # imm = 0xFFFFFFF6
pushq $0xf
popq %rsi
pushq $0x1
popq %rcx
movq 0x28(%rsp), %r13
movq %r13, %rdi
xorl %edx, %edx
movl 0x38(%rsp), %r8d
movq 0x90(%rsp), %r9
callq 0x43fe6
movq 0x8(%r13), %rax
testq %rax, %rax
je 0x3d71f
movq 0x28(%rsp), %rcx
movslq 0x34(%rcx), %rcx
imulq $0x18, %rcx, %rcx
movb $0x2, -0x15(%rax,%rcx)
movq 0x1e0(%r12), %rax
testq %rax, %rax
cmoveq %r12, %rax
movb $0x1, 0x24(%rax)
movq 0x40(%rsp), %rsi
movb 0x34(%rsp), %al
testb %al, %al
je 0x3d774
cmpl $0x0, 0x58(%rsp)
jns 0x3d7fe
movq 0x28(%rsp), %rax
movq 0x40(%rax), %rax
testq %rax, %rax
je 0x3d7fe
movl 0x58(%rsp), %edx
notl %edx
movq 0x28(%rsp), %rcx
movl 0x34(%rcx), %ecx
movl %edx, %edx
movl %ecx, (%rax,%rdx,4)
jmp 0x3d7fe
testq %r14, %r14
je 0x3d7bc
movq 0x50(%rsp), %r13
leal 0x1(%r13), %ecx
pushq $0x9
popq %rsi
movq 0x28(%rsp), %rdi
movq 0x88(%rsp), %rdx
callq 0x43f64
movq %r13, %rdx
testl %edx, %edx
movq 0x40(%rsp), %rsi
js 0x3d7fe
movq 0x28(%rsp), %rax
movl 0x34(%rax), %eax
cmpl %edx, %eax
jbe 0x3d7fe
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rcx
movl %edx, %edx
jmp 0x3d7f6
pushq $0x10
popq %rsi
movq 0x28(%rsp), %rdi
xorl %edx, %edx
movq 0x50(%rsp), %r13
movl %r13d, %ecx
callq 0x43f64
testl %r13d, %r13d
movq 0x40(%rsp), %rsi
js 0x3d7fe
movq 0x28(%rsp), %rax
movl 0x34(%rax), %eax
cmpl %r13d, %eax
jbe 0x3d7fe
movq 0x28(%rsp), %rcx
movq 0x8(%rcx), %rcx
movl %r13d, %edx
imulq $0x18, %rdx, %rdx
movl %eax, 0x8(%rcx,%rdx)
cmpq $0x0, 0x98(%rsp)
jne 0x3d856
testb $0x10, 0x48(%rsi)
jne 0x3d856
testq %r14, %r14
jne 0x3d825
movl 0x64(%rsp), %edx
pushq $0x38
popq %rsi
movq 0x28(%rsp), %rdi
callq 0x457e7
xorl %r14d, %r14d
movq 0xb0(%rsp), %r13
movq (%r13), %r13
testq %r13, %r13
je 0x3d856
movl 0x74(%rsp), %edx
addl %r14d, %edx
movq 0x28(%rsp), %rdi
pushq $0x38
popq %rsi
callq 0x457e7
incl %r14d
addq $0x28, %r13
jmp 0x3d830
cmpb $0x0, 0x1e(%r12)
jne 0x3d871
cmpq $0x0, 0x1e8(%r12)
jne 0x3d871
movq %r12, %rdi
callq 0x55b58
testb $-0x80, 0x2c(%rbx)
je 0x3d103
cmpb $0x0, 0x1e(%r12)
jne 0x3d103
cmpq $0x0, 0x1e8(%r12)
jne 0x3d103
pushq $0x20
popq %rsi
pushq $0x1
popq %r12
movq 0x28(%rsp), %r13
movq %r13, %rdi
movl 0x60(%rsp), %edx
movl %r12d, %ecx
callq 0x43f64
movq %r13, %rdi
movl %r12d, %esi
callq 0x32cab
leaq 0x283aa(%rip), %rcx     # 0x65c6d
movq %r13, %rdi
xorl %esi, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x32d0d
jmp 0x3d103