// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3RunVacuum
int sqlite3RunVacuum(
  char **pzErrMsg,        /* Write error message here */
  sqlite3 *db,            /* Database connection */
  int iDb,                /* Which attached DB to vacuum */
  sqlite3_value *pOut     /* Write results here, if not NULL. VACUUM INTO */
){
  int rc = SQLITE_OK;     /* Return code from service routines */
  Btree *pMain;           /* The database being vacuumed */
  Btree *pTemp;           /* The temporary database we vacuum into */
  u32 saved_mDbFlags;     /* Saved value of db->mDbFlags */
  u64 saved_flags;        /* Saved value of db->flags */
  int saved_nChange;      /* Saved value of db->nChange */
  int saved_nTotalChange; /* Saved value of db->nTotalChange */
  u32 saved_openFlags;    /* Saved value of db->openFlags */
  u8 saved_mTrace;        /* Saved trace settings */
  Db *pDb = 0;            /* Database to detach at end of vacuum */
  int isMemDb;            /* True if vacuuming a :memory: database */
  int nRes;               /* Bytes of reserved space at the end of each page */
  int nDb;                /* Number of attached databases */
  const char *zDbMain;    /* Schema name of database to vacuum */
  const char *zOut;       /* Name of output file */

  if( !db->autoCommit ){
    sqlite3SetString(pzErrMsg, db, "cannot VACUUM from within a transaction");
    return SQLITE_ERROR; /* IMP: R-12218-18073 */
  }
  if( db->nVdbeActive>1 ){
    sqlite3SetString(pzErrMsg, db,"cannot VACUUM - SQL statements in progress");
    return SQLITE_ERROR; /* IMP: R-15610-35227 */
  }
  saved_openFlags = db->openFlags;
  if( pOut ){
    if( sqlite3_value_type(pOut)!=SQLITE_TEXT ){
      sqlite3SetString(pzErrMsg, db, "non-text filename");
      return SQLITE_ERROR;
    }
    zOut = (const char*)sqlite3_value_text(pOut);
    db->openFlags &= ~SQLITE_OPEN_READONLY;
    db->openFlags |= SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE;
  }else{
    zOut = "";
  }

  /* Save the current value of the database flags so that it can be
  ** restored before returning. Then set the writable-schema flag, and
  ** disable CHECK and foreign key constraints.  */
  saved_flags = db->flags;
  saved_mDbFlags = db->mDbFlags;
  saved_nChange = db->nChange;
  saved_nTotalChange = db->nTotalChange;
  saved_mTrace = db->mTrace;
  db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks;
  db->mDbFlags |= DBFLAG_PreferBuiltin | DBFLAG_Vacuum;
  db->flags &= ~(u64)(SQLITE_ForeignKeys | SQLITE_ReverseOrder
                   | SQLITE_Defensive | SQLITE_CountRows);
  db->mTrace = 0;

  zDbMain = db->aDb[iDb].zDbSName;
  pMain = db->aDb[iDb].pBt;
  isMemDb = sqlite3PagerIsMemdb(sqlite3BtreePager(pMain));

  /* Attach the temporary database as 'vacuum_db'. The synchronous pragma
  ** can be set to 'off' for this file, as it is not recovered if a crash
  ** occurs anyway. The integrity of the database is maintained by a
  ** (possibly synchronous) transaction opened on the main database before
  ** sqlite3BtreeCopyFile() is called.
  **
  ** An optimisation would be to use a non-journaled pager.
  ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but
  ** that actually made the VACUUM run slower.  Very little journalling
  ** actually occurs when doing a vacuum since the vacuum_db is initially
  ** empty.  Only the journal header is written.  Apparently it takes more
  ** time to parse and run the PRAGMA to turn journalling off than it does
  ** to write the journal header file.
  */
  nDb = db->nDb;
  rc = execSqlF(db, pzErrMsg, "ATTACH %Q AS vacuum_db", zOut);
  db->openFlags = saved_openFlags;
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  assert( (db->nDb-1)==nDb );
  pDb = &db->aDb[nDb];
  assert( strcmp(pDb->zDbSName,"vacuum_db")==0 );
  pTemp = pDb->pBt;
  if( pOut ){
    sqlite3_file *id = sqlite3PagerFile(sqlite3BtreePager(pTemp));
    i64 sz = 0;
    if( id->pMethods!=0 && (sqlite3OsFileSize(id, &sz)!=SQLITE_OK || sz>0) ){
      rc = SQLITE_ERROR;
      sqlite3SetString(pzErrMsg, db, "output file already exists");
      goto end_of_vacuum;
    }
    db->mDbFlags |= DBFLAG_VacuumInto;
  }
  nRes = sqlite3BtreeGetRequestedReserve(pMain);

  sqlite3BtreeSetCacheSize(pTemp, db->aDb[iDb].pSchema->cache_size);
  sqlite3BtreeSetSpillSize(pTemp, sqlite3BtreeSetSpillSize(pMain,0));
  sqlite3BtreeSetPagerFlags(pTemp, PAGER_SYNCHRONOUS_OFF|PAGER_CACHESPILL);

  /* Begin a transaction and take an exclusive lock on the main database
  ** file. This is done before the sqlite3BtreeGetPageSize(pMain) call below,
  ** to ensure that we do not try to change the page-size on a WAL database.
  */
  rc = execSql(db, pzErrMsg, "BEGIN");
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  rc = sqlite3BtreeBeginTrans(pMain, pOut==0 ? 2 : 0, 0);
  if( rc!=SQLITE_OK ) goto end_of_vacuum;

  /* Do not attempt to change the page size for a WAL database */
  if( sqlite3PagerGetJournalMode(sqlite3BtreePager(pMain))
                                               ==PAGER_JOURNALMODE_WAL ){
    db->nextPagesize = 0;
  }

  if( sqlite3BtreeSetPageSize(pTemp, sqlite3BtreeGetPageSize(pMain), nRes, 0)
   || (!isMemDb && sqlite3BtreeSetPageSize(pTemp, db->nextPagesize, nRes, 0))
   || NEVER(db->mallocFailed)
  ){
    rc = SQLITE_NOMEM_BKPT;
    goto end_of_vacuum;
  }

#ifndef SQLITE_OMIT_AUTOVACUUM
  sqlite3BtreeSetAutoVacuum(pTemp, db->nextAutovac>=0 ? db->nextAutovac :
                                           sqlite3BtreeGetAutoVacuum(pMain));
#endif

  /* Query the schema of the main database. Create a mirror schema
  ** in the temporary database.
  */
  db->init.iDb = nDb; /* force new CREATE statements into vacuum_db */
  rc = execSqlF(db, pzErrMsg,
      "SELECT sql FROM \"%w\".sqlite_schema"
      " WHERE type='table'AND name<>'sqlite_sequence'"
      " AND coalesce(rootpage,1)>0",
      zDbMain
  );
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  rc = execSqlF(db, pzErrMsg,
      "SELECT sql FROM \"%w\".sqlite_schema"
      " WHERE type='index'",
      zDbMain
  );
  if( rc!=SQLITE_OK ) goto end_of_vacuum;
  db->init.iDb = 0;

  /* Loop through the tables in the main database. For each, do
  ** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy
  ** the contents to the temporary database.
  */
  rc = execSqlF(db, pzErrMsg,
      "SELECT'INSERT INTO vacuum_db.'||quote(name)"
      "||' SELECT*FROM\"%w\".'||quote(name)"
      "FROM vacuum_db.sqlite_schema "
      "WHERE type='table'AND coalesce(rootpage,1)>0",
      zDbMain
  );
  assert( (db->mDbFlags & DBFLAG_Vacuum)!=0 );
  db->mDbFlags &= ~DBFLAG_Vacuum;
  if( rc!=SQLITE_OK ) goto end_of_vacuum;

  /* Copy the triggers, views, and virtual tables from the main database
  ** over to the temporary database.  None of these objects has any
  ** associated storage, so all we have to do is copy their entries
  ** from the schema table.
  */
  rc = execSqlF(db, pzErrMsg,
      "INSERT INTO vacuum_db.sqlite_schema"
      " SELECT*FROM \"%w\".sqlite_schema"
      " WHERE type IN('view','trigger')"
      " OR(type='table'AND rootpage=0)",
      zDbMain
  );
  if( rc ) goto end_of_vacuum;

  /* At this point, there is a write transaction open on both the
  ** vacuum database and the main database. Assuming no error occurs,
  ** both transactions are closed by this block - the main database
  ** transaction by sqlite3BtreeCopyFile() and the other by an explicit
  ** call to sqlite3BtreeCommit().
  */
  {
    u32 meta;
    int i;

    /* This array determines which meta meta values are preserved in the
    ** vacuum.  Even entries are the meta value number and odd entries
    ** are an increment to apply to the meta value after the vacuum.
    ** The increment is used to increase the schema cookie so that other
    ** connections to the same database will know to reread the schema.
    */
    static const unsigned char aCopy[] = {
       BTREE_SCHEMA_VERSION,     1,  /* Add one to the old schema cookie */
       BTREE_DEFAULT_CACHE_SIZE, 0,  /* Preserve the default page cache size */
       BTREE_TEXT_ENCODING,      0,  /* Preserve the text encoding */
       BTREE_USER_VERSION,       0,  /* Preserve the user version */
       BTREE_APPLICATION_ID,     0,  /* Preserve the application id */
    };

    assert( 1==sqlite3BtreeIsInTrans(pTemp) );
    assert( pOut!=0 || 1==sqlite3BtreeIsInTrans(pMain) );

    /* Copy Btree meta values */
    for(i=0; i<ArraySize(aCopy); i+=2){
      /* GetMeta() and UpdateMeta() cannot fail in this context because
      ** we already have page 1 loaded into cache and marked dirty. */
      sqlite3BtreeGetMeta(pMain, aCopy[i], &meta);
      rc = sqlite3BtreeUpdateMeta(pTemp, aCopy[i], meta+aCopy[i+1]);
      if( NEVER(rc!=SQLITE_OK) ) goto end_of_vacuum;
    }

    if( pOut==0 ){
      rc = sqlite3BtreeCopyFile(pMain, pTemp);
    }
    if( rc!=SQLITE_OK ) goto end_of_vacuum;
    rc = sqlite3BtreeCommit(pTemp);
    if( rc!=SQLITE_OK ) goto end_of_vacuum;
#ifndef SQLITE_OMIT_AUTOVACUUM
    if( pOut==0 ){
      sqlite3BtreeSetAutoVacuum(pMain, sqlite3BtreeGetAutoVacuum(pTemp));
    }
#endif
  }

  assert( rc==SQLITE_OK );
  if( pOut==0 ){
    rc = sqlite3BtreeSetPageSize(pMain, sqlite3BtreeGetPageSize(pTemp), nRes,1);
  }

end_of_vacuum:
  /* Restore the original value of db->flags */
  db->init.iDb = 0;
  db->mDbFlags = saved_mDbFlags;
  db->flags = saved_flags;
  db->nChange = saved_nChange;
  db->nTotalChange = saved_nTotalChange;
  db->mTrace = saved_mTrace;
  sqlite3BtreeSetPageSize(pMain, -1, 0, 1);

  /* Currently there is an SQL level transaction open on the vacuum
  ** database. No locks are held on any other files (since the main file
  ** was committed at the btree level). So it safe to end the transaction
  ** by manually setting the autoCommit flag to true and detaching the
  ** vacuum database. The vacuum_db journal file is deleted when the pager
  ** is closed by the DETACH.
  */
  db->autoCommit = 1;

  if( pDb ){
    sqlite3BtreeClose(pDb->pBt);
    pDb->pBt = 0;
    pDb->pSchema = 0;
  }

  /* This both clears the schemas and reduces the size of the db->aDb[]
  ** array. */
  sqlite3ResetAllSchemasOfConnection(db);

  return rc;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x78, %rsp
movq %rsi, %rbx
movq %rdi, %r14
cmpb $0x0, 0x5f(%rsi)
je 0x29e50a
cmpl $0x2, 0xc0(%rbx)
jl 0x29e513
leaq 0x1385de(%rip), %rdx    # 0x3d6ae6
jmp 0x29e537
leaq 0x1385ad(%rip), %rdx    # 0x3d6abe
jmp 0x29e537
movl %edx, %ebp
movl 0x4c(%rbx), %esi
testq %rcx, %rcx
je 0x29e54c
movl 0x8(%rcx), %eax
movabsq $0x4000400040004, %rdx  # imm = 0x4000400040004
btq %rax, %rdx
jb 0x29e55e
leaq 0x1385da(%rip), %rdx    # 0x3d6b11
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a5071
movl $0x1, %ebp
jmp 0x29e81e
movl %esi, 0x30(%rsp)
movq %rcx, 0x48(%rsp)
leaq 0x12bc14(%rip), %rcx    # 0x3ca170
jmp 0x29e583
movl %esi, 0x30(%rsp)
movq %rcx, 0x48(%rsp)
movq %rcx, %rdi
movl $0x1, %esi
callq 0x278305
movq %rax, %rcx
movl 0x4c(%rbx), %eax
andl $-0x8, %eax
orl $0x6, %eax
movl %eax, 0x4c(%rbx)
movq 0x30(%rbx), %rdx
movl 0x2c(%rbx), %esi
movsd 0x74(%rbx), %xmm0
movaps %xmm0, 0x60(%rsp)
movb 0x68(%rbx), %al
movb %al, 0xf(%rsp)
movl %esi, 0x40(%rsp)
movl %esi, %eax
orl $0x6, %eax
movl %eax, 0x2c(%rbx)
movabsq $-0x110005202, %rax     # imm = 0xFFFFFFFEEFFFADFE
movq %rdx, 0x58(%rsp)
andq %rdx, %rax
orq $0x201, %rax            # imm = 0x201
movq %rax, 0x30(%rbx)
movb $0x0, 0x68(%rbx)
movq 0x20(%rbx), %rax
movslq %ebp, %r13
shlq $0x5, %r13
movq (%rax,%r13), %rdx
movq %rdx, 0x38(%rsp)
movq 0x8(%rax,%r13), %rax
movq %rax, 0x10(%rsp)
movq 0x8(%rax), %rax
movq (%rax), %rax
movb 0x10(%rax), %r15b
movslq 0x28(%rbx), %r12
leaq 0x138528(%rip), %rdx    # 0x3d6b23
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x2a751c
movl %eax, %ebp
movl 0x30(%rsp), %eax
movl %eax, 0x4c(%rbx)
testl %ebp, %ebp
je 0x29e622
xorl %r14d, %r14d
movq 0x10(%rsp), %r13
jmp 0x29e7b9
movl %r15d, %edx
movq %r14, 0x30(%rsp)
movq 0x20(%rbx), %rax
movq %r12, 0x20(%rsp)
shlq $0x5, %r12
leaq (%rax,%r12), %r14
movq 0x8(%rax,%r12), %r8
movq 0x48(%rsp), %r15
testq %r15, %r15
je 0x29e695
movq 0x8(%r8), %rcx
movq (%rcx), %rcx
movq 0x48(%rcx), %rdi
movq $0x0, 0x50(%rsp)
movq (%rdi), %rcx
testq %rcx, %rcx
movl %edx, %r12d
je 0x29e68f
movq %r8, %rbp
leaq 0x50(%rsp), %rsi
callq *0x30(%rcx)
testl %eax, %eax
jne 0x29e82f
cmpq $0x0, 0x50(%rsp)
jg 0x29e82f
movq 0x20(%rbx), %rax
movq %rbp, %r8
orb $0x8, 0x2c(%rbx)
jmp 0x29e698
movl %edx, %r12d
movq 0x10(%rsp), %rbp
movq (%rbp), %rcx
movq 0x8(%rbp), %rdx
movq %rcx, 0x8(%rdx)
movl 0x34(%rdx), %esi
subl 0x38(%rdx), %esi
movzbl 0x26(%rdx), %ecx
cmpl %ecx, %esi
cmovlel %ecx, %esi
movl %esi, 0x2c(%rsp)
movq 0x18(%rax,%r13), %rax
movslq 0x74(%rax), %rsi
movq (%r8), %rax
movq %r8, 0x18(%rsp)
movq 0x8(%r8), %rcx
movq %rax, 0x8(%rcx)
movq (%rcx), %rax
movq 0x118(%rax), %rax
movl %esi, 0x1c(%rax)
movq 0x21d047(%rip), %rcx    # 0x4bb730
movq 0x40(%rax), %rdi
testq %rsi, %rsi
jns 0x29e70f
shlq $0xa, %rsi
negq %rsi
movslq 0x24(%rax), %rdx
movslq 0x28(%rax), %r8
addq %rdx, %r8
movq %rsi, %rax
cqto
idivq %r8
movq %rax, %rsi
callq *%rcx
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
movq %rax, 0x8(%rcx)
movq (%rcx), %rax
movq 0x118(%rax), %rcx
movslq 0x1c(%rcx), %rax
testq %rax, %rax
movq %rbp, %r13
jns 0x29e74a
shlq $0xa, %rax
negq %rax
movslq 0x24(%rcx), %rdx
movslq 0x28(%rcx), %rsi
addq %rdx, %rsi
cqto
idivq %rsi
movl 0x20(%rcx), %edx
cmpl %edx, %eax
cmovgl %eax, %edx
movq 0x18(%rsp), %rbp
movq (%rbp), %rdi
movq 0x8(%rbp), %rsi
callq 0x2a75e0
movq (%rbp), %rax
movq 0x8(%rbp), %rcx
movq %rax, 0x8(%rcx)
movq (%rcx), %rax
movb $0x1, 0xb(%rax)
movl $0x0, 0xc(%rax)
andb $-0x2, 0x18(%rax)
leaq 0x1383cc(%rip), %rdx    # 0x3d6b55
movq %rbx, %rdi
movq 0x30(%rsp), %rsi
callq 0x2a76b3
testl %eax, %eax
jne 0x29e7b7
xorl %esi, %esi
testq %r15, %r15
sete %sil
addl %esi, %esi
movq %r13, %rdi
xorl %edx, %edx
callq 0x276a19
testl %eax, %eax
je 0x29e84d
movl %eax, %ebp
movb $0x0, 0xb4(%rbx)
movl 0x40(%rsp), %eax
movl %eax, 0x2c(%rbx)
movq 0x58(%rsp), %rax
movq %rax, 0x30(%rbx)
movaps 0x60(%rsp), %xmm0
movlps %xmm0, 0x74(%rbx)
movb 0xf(%rsp), %al
movb %al, 0x68(%rbx)
movq (%r13), %rdi
movq 0x8(%r13), %rsi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
movl $0x1, %r8d
callq 0x281747
movb $0x1, 0x5f(%rbx)
testq %r14, %r14
je 0x29e816
movq 0x8(%r14), %rdi
callq 0x290e57
xorl %eax, %eax
movq %rax, 0x8(%r14)
movq %rax, 0x18(%r14)
movq %rbx, %rdi
callq 0x277371
movl %ebp, %eax
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x138304(%rip), %rdx    # 0x3d6b3a
movq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0x2a5071
movl $0x1, %ebp
jmp 0x29e618
movq 0x8(%r13), %rax
movq (%rax), %rcx
cmpb $0x5, 0x9(%rcx)
jne 0x29e861
movl $0x0, 0x6c(%rbx)
movl 0x34(%rax), %edx
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movl 0x2c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x281747
movl $0x7, %ebp
testl %eax, %eax
jne 0x29e7b9
testb %r12b, %r12b
je 0x29e8d4
cmpb $0x0, 0x61(%rbx)
jne 0x29e7b9
movsbl 0x64(%rbx), %eax
testl %eax, %eax
movq 0x18(%rsp), %r8
movq 0x38(%rsp), %rcx
movq 0x20(%rsp), %rdi
movq 0x30(%rsp), %r12
jns 0x29e8fb
movq (%r13), %rdx
movq 0x8(%r13), %rax
movq %rdx, 0x8(%rax)
cmpb $0x0, 0x21(%rax)
je 0x29e8f9
cmpb $0x1, 0x22(%rax)
movl $0x2, %eax
sbbl $0x0, %eax
jmp 0x29e8fb
movl 0x6c(%rbx), %edx
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movl 0x2c(%rsp), %ecx
xorl %r8d, %r8d
callq 0x281747
testl %eax, %eax
jne 0x29e7b9
jmp 0x29e88e
xorl %eax, %eax
movq (%r8), %rdx
movq 0x8(%r8), %r8
movq %rdx, 0x8(%r8)
testb $0x2, 0x28(%r8)
je 0x29e918
testl %eax, %eax
setne %dl
cmpb %dl, 0x21(%r8)
jne 0x29e927
testl %eax, %eax
setne 0x21(%r8)
cmpl $0x2, %eax
sete 0x22(%r8)
movb %dil, 0xb4(%rbx)
leaq 0x138226(%rip), %rdx    # 0x3d6b5b
movq %rbx, %rdi
movq %r12, %rsi
xorl %eax, %eax
callq 0x2a751c
testl %eax, %eax
jne 0x29e7b7
leaq 0x138276(%rip), %rdx    # 0x3d6bc7
movq %rbx, %rdi
movq %r12, %rsi
movq 0x38(%rsp), %rcx
xorl %eax, %eax
callq 0x2a751c
testl %eax, %eax
jne 0x29e7b7
movb $0x0, 0xb4(%rbx)
leaq 0x138284(%rip), %rdx    # 0x3d6bfd
movq %rbx, %rdi
movq %r12, %rsi
movq 0x38(%rsp), %rcx
xorl %eax, %eax
callq 0x2a751c
andb $-0x5, 0x2c(%rbx)
testl %eax, %eax
jne 0x29e7b7
movq %r14, 0x20(%rsp)
leaq 0x1382f1(%rip), %rdx    # 0x3d6c94
movq %rbx, %rdi
movq %r12, %rsi
movq 0x38(%rsp), %rcx
xorl %eax, %eax
callq 0x2a751c
testl %eax, %eax
je 0x29e9c5
movl %eax, %ebp
movq 0x20(%rsp), %r14
jmp 0x29e618
movq $-0x2, %r14
leaq 0x133531(%rip), %r13    # 0x3d1f04
leaq 0x44(%rsp), %r12
movzbl 0x2(%r14,%r13), %ebp
movq 0x10(%rsp), %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x29bb39
movzbl 0x3(%r14,%r13), %ecx
addl 0x44(%rsp), %ecx
movq 0x18(%rsp), %rax
movq (%rax), %rdi
movq 0x8(%rax), %rsi
movl %ebp, %edx
callq 0x27732a
testl %eax, %eax
jne 0x29e9b9
addq $0x2, %r14
cmpq $0x7, %r14
jbe 0x29e9d8
testq %r15, %r15
je 0x29ea29
movq 0x18(%rsp), %rdi
callq 0x2a50e4
jmp 0x29e9b9
movq 0x10(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0x2a7791
testl %eax, %eax
jne 0x29e9b9
movq 0x18(%rsp), %rdi
callq 0x2a50e4
testl %eax, %eax
jne 0x29e9b9
movq 0x18(%rsp), %rax
movq (%rax), %rcx
movq 0x8(%rax), %rax
movq %rcx, 0x8(%rax)
cmpb $0x0, 0x21(%rax)
je 0x29ea76
cmpb $0x1, 0x22(%rax)
movl $0x2, %ecx
sbbl $0x0, %ecx
jmp 0x29ea78
xorl %ecx, %ecx
movq 0x10(%rsp), %rdx
movq (%rdx), %rdi
movq 0x8(%rdx), %rsi
movq %rdi, 0x8(%rsi)
testb $0x2, 0x28(%rsi)
je 0x29ea98
testl %ecx, %ecx
setne %dl
cmpb %dl, 0x21(%rsi)
jne 0x29eaa5
testl %ecx, %ecx
setne 0x21(%rsi)
cmpl $0x2, %ecx
sete 0x22(%rsi)
movl 0x34(%rax), %edx
movl 0x2c(%rsp), %ecx
movl $0x1, %r8d
callq 0x281747
jmp 0x29e9b9