// File: /workspace/github_c_makefile_star2_O0/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3_backup_step
SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
  int rc;
  int destMode;       /* Destination journal mode */
  int pgszSrc = 0;    /* Source page size */
  int pgszDest = 0;   /* Destination page size */

  sqlite3_mutex_enter(p->pSrcDb->mutex);
  sqlite3BtreeEnter(p->pSrc);
  if( p->pDestDb ){
    sqlite3_mutex_enter(p->pDestDb->mutex);
  }

  rc = p->rc;
  if( !isFatalError(rc) ){
    Pager * const pSrcPager = sqlite3BtreePager(p->pSrc);     /* Source pager */
    Pager * const pDestPager = sqlite3BtreePager(p->pDest);   /* Dest pager */
    int ii;                            /* Iterator variable */
    int nSrcPage = -1;                 /* Size of source db in pages */
    int bCloseTrans = 0;               /* True if src db requires unlocking */

    /* If the source pager is currently in a write-transaction, return
    ** SQLITE_BUSY immediately.
    */
    if( p->pDestDb && p->pSrc->pBt->inTransaction==TRANS_WRITE ){
      rc = SQLITE_BUSY;
    }else{
      rc = SQLITE_OK;
    }

    /* Lock the destination database, if it is not locked already. */
    if( SQLITE_OK==rc && p->bDestLocked==0
     && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2)) 
    ){
      p->bDestLocked = 1;
      sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
    }

    /* If there is no open read-transaction on the source database, open
    ** one now. If a transaction is opened here, then it will be closed
    ** before this function exits.
    */
    if( rc==SQLITE_OK && 0==sqlite3BtreeIsInReadTrans(p->pSrc) ){
      rc = sqlite3BtreeBeginTrans(p->pSrc, 0);
      bCloseTrans = 1;
    }

    /* Do not allow backup if the destination database is in WAL mode
    ** and the page sizes are different between source and destination */
    pgszSrc = sqlite3BtreeGetPageSize(p->pSrc);
    pgszDest = sqlite3BtreeGetPageSize(p->pDest);
    destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest));
    if( SQLITE_OK==rc && destMode==PAGER_JOURNALMODE_WAL && pgszSrc!=pgszDest ){
      rc = SQLITE_READONLY;
    }
  
    /* Now that there is a read-lock on the source database, query the
    ** source pager for the number of pages in the database.
    */
    nSrcPage = (int)sqlite3BtreeLastPage(p->pSrc);
    assert( nSrcPage>=0 );
    for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
      const Pgno iSrcPg = p->iNext;                 /* Source page number */
      if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
        DbPage *pSrcPg;                             /* Source page object */
        rc = sqlite3PagerAcquire(pSrcPager, iSrcPg, &pSrcPg,
                                 PAGER_GET_READONLY);
        if( rc==SQLITE_OK ){
          rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg), 0);
          sqlite3PagerUnref(pSrcPg);
        }
      }
      p->iNext++;
    }
    if( rc==SQLITE_OK ){
      p->nPagecount = nSrcPage;
      p->nRemaining = nSrcPage+1-p->iNext;
      if( p->iNext>(Pgno)nSrcPage ){
        rc = SQLITE_DONE;
      }else if( !p->isAttached ){
        attachBackupObject(p);
      }
    }
  
    /* Update the schema version field in the destination database. This
    ** is to make sure that the schema-version really does change in
    ** the case where the source and destination databases have the
    ** same schema version.
    */
    if( rc==SQLITE_DONE ){
      if( nSrcPage==0 ){
        rc = sqlite3BtreeNewDb(p->pDest);
        nSrcPage = 1;
      }
      if( rc==SQLITE_OK || rc==SQLITE_DONE ){
        rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1);
      }
      if( rc==SQLITE_OK ){
        if( p->pDestDb ){
          sqlite3ResetAllSchemasOfConnection(p->pDestDb);
        }
        if( destMode==PAGER_JOURNALMODE_WAL ){
          rc = sqlite3BtreeSetVersion(p->pDest, 2);
        }
      }
      if( rc==SQLITE_OK ){
        int nDestTruncate;
        /* Set nDestTruncate to the final number of pages in the destination
        ** database. The complication here is that the destination page
        ** size may be different to the source page size. 
        **
        ** If the source page size is smaller than the destination page size, 
        ** round up. In this case the call to sqlite3OsTruncate() below will
        ** fix the size of the file. However it is important to call
        ** sqlite3PagerTruncateImage() here so that any pages in the 
        ** destination file that lie beyond the nDestTruncate page mark are
        ** journalled by PagerCommitPhaseOne() before they are destroyed
        ** by the file truncation.
        */
        assert( pgszSrc==sqlite3BtreeGetPageSize(p->pSrc) );
        assert( pgszDest==sqlite3BtreeGetPageSize(p->pDest) );
        if( pgszSrc<pgszDest ){
          int ratio = pgszDest/pgszSrc;
          nDestTruncate = (nSrcPage+ratio-1)/ratio;
          if( nDestTruncate==(int)PENDING_BYTE_PAGE(p->pDest->pBt) ){
            nDestTruncate--;
          }
        }else{
          nDestTruncate = nSrcPage * (pgszSrc/pgszDest);
        }
        assert( nDestTruncate>0 );

        if( pgszSrc<pgszDest ){
          /* If the source page-size is smaller than the destination page-size,
          ** two extra things may need to happen:
          **
          **   * The destination may need to be truncated, and
          **
          **   * Data stored on the pages immediately following the 
          **     pending-byte page in the source database may need to be
          **     copied into the destination database.
          */
          const i64 iSize = (i64)pgszSrc * (i64)nSrcPage;
          sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);
          Pgno iPg;
          int nDstPage;
          i64 iOff;
          i64 iEnd;

          assert( pFile );
          assert( nDestTruncate==0 
              || (i64)nDestTruncate*(i64)pgszDest >= iSize || (
                nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
             && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+pgszDest
          ));

          /* This block ensures that all data required to recreate the original
          ** database has been stored in the journal for pDestPager and the
          ** journal synced to disk. So at this point we may safely modify
          ** the database file in any way, knowing that if a power failure
          ** occurs, the original database will be reconstructed from the 
          ** journal file.  */
          sqlite3PagerPagecount(pDestPager, &nDstPage);
          for(iPg=nDestTruncate; rc==SQLITE_OK && iPg<=(Pgno)nDstPage; iPg++){
            if( iPg!=PENDING_BYTE_PAGE(p->pDest->pBt) ){
              DbPage *pPg;
              rc = sqlite3PagerGet(pDestPager, iPg, &pPg);
              if( rc==SQLITE_OK ){
                rc = sqlite3PagerWrite(pPg);
                sqlite3PagerUnref(pPg);
              }
            }
          }
          if( rc==SQLITE_OK ){
            rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 1);
          }

          /* Write the extra pages and truncate the database file as required */
          iEnd = MIN(PENDING_BYTE + pgszDest, iSize);
          for(
            iOff=PENDING_BYTE+pgszSrc; 
            rc==SQLITE_OK && iOff<iEnd; 
            iOff+=pgszSrc
          ){
            PgHdr *pSrcPg = 0;
            const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
            rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
            if( rc==SQLITE_OK ){
              u8 *zData = sqlite3PagerGetData(pSrcPg);
              rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
            }
            sqlite3PagerUnref(pSrcPg);
          }
          if( rc==SQLITE_OK ){
            rc = backupTruncateFile(pFile, iSize);
          }

          /* Sync the database file to disk. */
          if( rc==SQLITE_OK ){
            rc = sqlite3PagerSync(pDestPager);
          }
        }else{
          sqlite3PagerTruncateImage(pDestPager, nDestTruncate);
          rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 0);
        }
    
        /* Finish committing the transaction to the destination database. */
        if( SQLITE_OK==rc
         && SQLITE_OK==(rc = sqlite3BtreeCommitPhaseTwo(p->pDest, 0))
        ){
          rc = SQLITE_DONE;
        }
      }
    }
  
    /* If bCloseTrans is true, then this function opened a read transaction
    ** on the source database. Close the read transaction here. There is
    ** no need to check the return values of the btree methods here, as
    ** "committing" a read-only transaction cannot fail.
    */
    if( bCloseTrans ){
      TESTONLY( int rc2 );
      TESTONLY( rc2  = ) sqlite3BtreeCommitPhaseOne(p->pSrc, 0);
      TESTONLY( rc2 |= ) sqlite3BtreeCommitPhaseTwo(p->pSrc, 0);
      assert( rc2==SQLITE_OK );
    }
  
    if( rc==SQLITE_IOERR_NOMEM ){
      rc = SQLITE_NOMEM;
    }
    p->rc = rc;
  }
  if( p->pDestDb ){
    sqlite3_mutex_leave(p->pDestDb->mutex);
  }
  sqlite3BtreeLeave(p->pSrc);
  sqlite3_mutex_leave(p->pSrcDb->mutex);
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xe0f0
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xda59
jmp 0xda59
movq -0x8(%rbp), %rax
movl 0x30(%rax), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %edi
callq 0xe110
cmpl $0x0, %eax
jne 0xe0ca
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x98f0
movq %rax, -0x28(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x98f0
movq %rax, -0x30(%rbp)
movl $0xffffffff, -0x38(%rbp) # imm = 0xFFFFFFFF
movl $0x0, -0x3c(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdacc
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rax
movq 0x8(%rax), %rax
movzbl 0x24(%rax), %eax
cmpl $0x2, %eax
jne 0xdacc
movl $0x5, -0x10(%rbp)
jmp 0xdad3
movl $0x0, -0x10(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jne 0xdb26
movq -0x8(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0xdb26
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x2, %esi
callq 0xe150
movl %eax, %ecx
movl %ecx, -0x10(%rbp)
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xdb26
movq -0x8(%rbp), %rax
movl $0x1, 0x14(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rdx
addq $0x10, %rdx
movl $0x1, %esi
callq 0xe510
cmpl $0x0, -0x10(%rbp)
jne 0xdb5a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xe570
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xdb5a
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %esi, %esi
callq 0xe150
movl %eax, -0x10(%rbp)
movl $0x1, -0x3c(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xe590
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xe590
movl %eax, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x98f0
movq %rax, %rdi
callq 0xe5b0
movl %eax, -0x14(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jne 0xdbae
cmpl $0x5, -0x14(%rbp)
jne 0xdbae
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
je 0xdbae
movl $0x8, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0xe5d0
movl %eax, -0x38(%rbp)
movl $0x0, -0x34(%rbp)
cmpl $0x0, -0xc(%rbp)
jl 0xdbdb
movl -0x34(%rbp), %ecx
xorl %eax, %eax
cmpl -0xc(%rbp), %ecx
movb %al, -0x99(%rbp)
jge 0xdbfe
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
xorl %eax, %eax
cmpl -0x38(%rbp), %ecx
movb %al, -0x99(%rbp)
ja 0xdbfe
cmpl $0x0, -0x10(%rbp)
setne %al
xorb $-0x1, %al
movb %al, -0x99(%rbp)
movb -0x99(%rbp), %al
testb $0x1, %al
jne 0xdc0d
jmp 0xdcc1
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
movl %eax, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0xa0(%rbp)
movl 0xc2caa(%rip), %eax     # 0xd08d0
movq -0x8(%rbp), %rcx
movq 0x28(%rcx), %rcx
movq 0x8(%rcx), %rcx
xorl %edx, %edx
divl 0x30(%rcx)
movl %eax, %ecx
movl -0xa0(%rbp), %eax
addl $0x1, %ecx
cmpl %ecx, %eax
je 0xdca6
movq -0x28(%rbp), %rdi
movl -0x40(%rbp), %esi
leaq -0x48(%rbp), %rdx
movl $0x2, %ecx
callq 0xe5f0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xdca4
movq -0x8(%rbp), %rax
movq %rax, -0xb0(%rbp)
movl -0x40(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq -0x48(%rbp), %rdi
callq 0xec10
movq -0xb0(%rbp), %rdi
movl -0xa4(%rbp), %esi
movq %rax, %rdx
xorl %ecx, %ecx
callq 0xe9e0
movl %eax, -0x10(%rbp)
movq -0x48(%rbp), %rdi
callq 0xec30
jmp 0xdca6
movq -0x8(%rbp), %rax
movl 0x18(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x18(%rax)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0xdbc5
cmpl $0x0, -0x10(%rbp)
jne 0xdd11
movl -0x38(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x38(%rax)
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movq -0x8(%rbp), %rax
subl 0x18(%rax), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x34(%rax)
movq -0x8(%rbp), %rax
movl 0x18(%rax), %eax
cmpl -0x38(%rbp), %eax
jbe 0xdcfa
movl $0x65, -0x10(%rbp)
jmp 0xdd0f
movq -0x8(%rbp), %rax
cmpl $0x0, 0x3c(%rax)
jne 0xdd0d
movq -0x8(%rbp), %rdi
callq 0xec90
jmp 0xdd0f
jmp 0xdd11
cmpl $0x65, -0x10(%rbp)
jne 0xe08a
cmpl $0x0, -0x38(%rbp)
jne 0xdd38
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0xece0
movl %eax, -0x10(%rbp)
movl $0x1, -0x38(%rbp)
cmpl $0x0, -0x10(%rbp)
je 0xdd44
cmpl $0x65, -0x10(%rbp)
jne 0xdd63
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %edx
addl $0x1, %edx
movl $0x1, %esi
callq 0xed20
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xdd9c
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xdd7f
movq -0x8(%rbp), %rax
movq (%rax), %rdi
callq 0xedb0
cmpl $0x5, -0x14(%rbp)
jne 0xdd9a
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x2, %esi
callq 0xee40
movl %eax, -0x10(%rbp)
jmp 0xdd9c
cmpl $0x0, -0x10(%rbp)
jne 0xe088
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xde02
movl -0x1c(%rbp), %eax
cltd
idivl -0x18(%rbp)
movl %eax, -0x50(%rbp)
movl -0x38(%rbp), %eax
addl -0x50(%rbp), %eax
subl $0x1, %eax
cltd
idivl -0x50(%rbp)
movl %eax, -0x4c(%rbp)
movl -0x4c(%rbp), %eax
movl %eax, -0xb4(%rbp)
movl 0xc2af9(%rip), %eax     # 0xd08d0
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rcx
xorl %edx, %edx
divl 0x30(%rcx)
movl %eax, %ecx
movl -0xb4(%rbp), %eax
addl $0x1, %ecx
cmpl %ecx, %eax
jne 0xde00
movl -0x4c(%rbp), %eax
addl $-0x1, %eax
movl %eax, -0x4c(%rbp)
jmp 0xde20
movl -0x38(%rbp), %eax
movl %eax, -0xb8(%rbp)
movl -0x18(%rbp), %eax
cltd
idivl -0x1c(%rbp)
movl %eax, %ecx
movl -0xb8(%rbp), %eax
imull %ecx, %eax
movl %eax, -0x4c(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x1c(%rbp), %eax
jge 0xe040
movslq -0x18(%rbp), %rax
movslq -0x38(%rbp), %rcx
imulq %rcx, %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
callq 0xef40
movq %rax, -0x60(%rbp)
movq -0x30(%rbp), %rdi
leaq -0x68(%rbp), %rsi
callq 0xef60
movl -0x4c(%rbp), %eax
movl %eax, -0x64(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x10(%rbp)
movb %al, -0xb9(%rbp)
jne 0xde79
movl -0x64(%rbp), %eax
cmpl -0x68(%rbp), %eax
setbe %al
movb %al, -0xb9(%rbp)
movb -0xb9(%rbp), %al
testb $0x1, %al
jne 0xde85
jmp 0xdef6
movl -0x64(%rbp), %eax
movl %eax, -0xc0(%rbp)
movl 0xc2a3c(%rip), %eax     # 0xd08d0
movq -0x8(%rbp), %rcx
movq 0x8(%rcx), %rcx
movq 0x8(%rcx), %rcx
xorl %edx, %edx
divl 0x30(%rcx)
movl %eax, %ecx
movl -0xc0(%rbp), %eax
addl $0x1, %ecx
cmpl %ecx, %eax
je 0xdee6
movq -0x30(%rbp), %rdi
movl -0x64(%rbp), %esi
leaq -0x80(%rbp), %rdx
xorl %ecx, %ecx
callq 0xe5f0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xdee4
movq -0x80(%rbp), %rdi
callq 0xef80
movl %eax, -0x10(%rbp)
movq -0x80(%rbp), %rdi
callq 0xec30
jmp 0xdee6
jmp 0xdee8
movl -0x64(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x64(%rbp)
jmp 0xde5c
cmpl $0x0, -0x10(%rbp)
jne 0xdf11
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0xf1e0
movl %eax, -0x10(%rbp)
movl 0xc29b9(%rip), %eax     # 0xd08d0
addl -0x1c(%rbp), %eax
cltq
cmpq -0x58(%rbp), %rax
jge 0xdf36
movl 0xc29a8(%rip), %eax     # 0xd08d0
addl -0x1c(%rbp), %eax
cltq
movq %rax, -0xc8(%rbp)
jmp 0xdf41
movq -0x58(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq -0xc8(%rbp), %rax
movq %rax, -0x78(%rbp)
movl 0xc297e(%rip), %eax     # 0xd08d0
addl -0x18(%rbp), %eax
cltq
movq %rax, -0x70(%rbp)
xorl %eax, %eax
cmpl $0x0, -0x10(%rbp)
movb %al, -0xc9(%rbp)
jne 0xdf7a
movq -0x70(%rbp), %rax
cmpq -0x78(%rbp), %rax
setl %al
movb %al, -0xc9(%rbp)
movb -0xc9(%rbp), %al
testb $0x1, %al
jne 0xdf89
jmp 0xe016
movq $0x0, -0x88(%rbp)
movq -0x70(%rbp), %rax
movslq -0x18(%rbp), %rcx
cqto
idivq %rcx
addq $0x1, %rax
movl %eax, -0x8c(%rbp)
movq -0x28(%rbp), %rdi
movl -0x8c(%rbp), %esi
leaq -0x88(%rbp), %rdx
xorl %ecx, %ecx
callq 0xe5f0
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xdff9
movq -0x88(%rbp), %rdi
callq 0xec10
movq %rax, -0x98(%rbp)
movq -0x60(%rbp), %rdi
movq -0x98(%rbp), %rsi
movl -0x18(%rbp), %edx
movq -0x70(%rbp), %rcx
callq 0xf430
movl %eax, -0x10(%rbp)
movq -0x88(%rbp), %rdi
callq 0xec30
movslq -0x18(%rbp), %rax
addq -0x70(%rbp), %rax
movq %rax, -0x70(%rbp)
jmp 0xdf5b
cmpl $0x0, -0x10(%rbp)
jne 0xe02c
movq -0x60(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0xf470
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xe03e
movq -0x30(%rbp), %rdi
callq 0xf4c0
movl %eax, -0x10(%rbp)
jmp 0xe05e
movq -0x30(%rbp), %rdi
movl -0x4c(%rbp), %esi
callq 0xf540
movq -0x30(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
xorl %edx, %edx
callq 0xf1e0
movl %eax, -0x10(%rbp)
xorl %eax, %eax
cmpl -0x10(%rbp), %eax
jne 0xe086
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdi
xorl %esi, %esi
callq 0xf560
movl %eax, %ecx
movl %ecx, -0x10(%rbp)
xorl %eax, %eax
cmpl %ecx, %eax
jne 0xe086
movl $0x65, -0x10(%rbp)
jmp 0xe088
jmp 0xe08a
cmpl $0x0, -0x3c(%rbp)
je 0xe0b0
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0xf600
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
xorl %esi, %esi
callq 0xf560
cmpl $0xc0a, -0x10(%rbp)     # imm = 0xC0A
jne 0xe0c0
movl $0x7, -0x10(%rbp)
movl -0x10(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, 0x30(%rax)
movq -0x8(%rbp), %rax
cmpq $0x0, (%rax)
je 0xe0d6
jmp 0xe0d6
movl -0x10(%rbp), %eax
addq $0xd0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)