// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3BtreeInsert
SQLITE_PRIVATE int sqlite3BtreeInsert(
  BtCursor *pCur,                /* Insert data into the table of this cursor */
  const BtreePayload *pX,        /* Content of the row to be inserted */
  int flags,                     /* True if this is likely an append */
  int seekResult                 /* Result of prior MovetoUnpacked() call */
){
  int rc;
  int loc = seekResult;          /* -1: before desired location  +1: after */
  int szNew = 0;
  int idx;
  MemPage *pPage;
  Btree *p = pCur->pBtree;
  BtShared *pBt = p->pBt;
  unsigned char *oldCell;
  unsigned char *newCell = 0;

  assert( (flags & (BTREE_SAVEPOSITION|BTREE_APPEND))==flags );

  if( pCur->eState==CURSOR_FAULT ){
    assert( pCur->skipNext!=SQLITE_OK );
    return pCur->skipNext;
  }

  assert( cursorOwnsBtShared(pCur) );
  assert( (pCur->curFlags & BTCF_WriteFlag)!=0
              && pBt->inTransaction==TRANS_WRITE
              && (pBt->btsFlags & BTS_READ_ONLY)==0 );
  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );

  /* Assert that the caller has been consistent. If this cursor was opened
  ** expecting an index b-tree, then the caller should be inserting blob
  ** keys with no associated data. If the cursor was opened expecting an
  ** intkey table, the caller should be inserting integer keys with a
  ** blob of associated data.  */
  assert( (pX->pKey==0)==(pCur->pKeyInfo==0) );

  /* Save the positions of any other cursors open on this table.
  **
  ** In some cases, the call to btreeMoveto() below is a no-op. For
  ** example, when inserting data into a table with auto-generated integer
  ** keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the
  ** integer key to use. It then calls this function to actually insert the
  ** data into the intkey B-Tree. In this case btreeMoveto() recognizes
  ** that the cursor is already where it needs to be and returns without
  ** doing any work. To avoid thwarting these optimizations, it is important
  ** not to clear the cursor here.
  */
  if( pCur->curFlags & BTCF_Multiple ){
    rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
    if( rc ) return rc;
  }

  if( pCur->pKeyInfo==0 ){
    assert( pX->pKey==0 );
    /* If this is an insert into a table b-tree, invalidate any incrblob
    ** cursors open on the row being replaced */
    invalidateIncrblobCursors(p, pCur->pgnoRoot, pX->nKey, 0);

    /* If BTREE_SAVEPOSITION is set, the cursor must already be pointing
    ** to a row with the same key as the new entry being inserted.
    */
#ifdef SQLITE_DEBUG
    if( flags & BTREE_SAVEPOSITION ){
      assert( pCur->curFlags & BTCF_ValidNKey );
      assert( pX->nKey==pCur->info.nKey );
      assert( loc==0 );
    }
#endif

    /* On the other hand, BTREE_SAVEPOSITION==0 does not imply
    ** that the cursor is not pointing to a row to be overwritten.
    ** So do a complete check.
    */
    if( (pCur->curFlags&BTCF_ValidNKey)!=0 && pX->nKey==pCur->info.nKey ){
      /* The cursor is pointing to the entry that is to be
      ** overwritten */
      assert( pX->nData>=0 && pX->nZero>=0 );
      if( pCur->info.nSize!=0
       && pCur->info.nPayload==(u32)pX->nData+pX->nZero
      ){
        /* New entry is the same size as the old.  Do an overwrite */
        return btreeOverwriteCell(pCur, pX);
      }
      assert( loc==0 );
    }else if( loc==0 ){
      /* The cursor is *not* pointing to the cell to be overwritten, nor
      ** to an adjacent cell.  Move the cursor so that it is pointing either
      ** to the cell to be overwritten or an adjacent cell.
      */
      rc = sqlite3BtreeMovetoUnpacked(pCur, 0, pX->nKey, flags!=0, &loc);
      if( rc ) return rc;
    }
  }else{
    /* This is an index or a WITHOUT ROWID table */

    /* If BTREE_SAVEPOSITION is set, the cursor must already be pointing
    ** to a row with the same key as the new entry being inserted.
    */
    assert( (flags & BTREE_SAVEPOSITION)==0 || loc==0 );

    /* If the cursor is not already pointing either to the cell to be
    ** overwritten, or if a new cell is being inserted, if the cursor is
    ** not pointing to an immediately adjacent cell, then move the cursor
    ** so that it does.
    */
    if( loc==0 && (flags & BTREE_SAVEPOSITION)==0 ){
      if( pX->nMem ){
        UnpackedRecord r;
        r.pKeyInfo = pCur->pKeyInfo;
        r.aMem = pX->aMem;
        r.nField = pX->nMem;
        r.default_rc = 0;
        r.errCode = 0;
        r.r1 = 0;
        r.r2 = 0;
        r.eqSeen = 0;
        rc = sqlite3BtreeMovetoUnpacked(pCur, &r, 0, flags!=0, &loc);
      }else{
        rc = btreeMoveto(pCur, pX->pKey, pX->nKey, flags!=0, &loc);
      }
      if( rc ) return rc;
    }

    /* If the cursor is currently pointing to an entry to be overwritten
    ** and the new content is the same as as the old, then use the
    ** overwrite optimization.
    */
    if( loc==0 ){
      getCellInfo(pCur);
      if( pCur->info.nKey==pX->nKey ){
        BtreePayload x2;
        x2.pData = pX->pKey;
        x2.nData = pX->nKey;
        x2.nZero = 0;
        return btreeOverwriteCell(pCur, &x2);
      }
    }

  }
  assert( pCur->eState==CURSOR_VALID
       || (pCur->eState==CURSOR_INVALID && loc)
       || CORRUPT_DB );

  pPage = pCur->pPage;
  assert( pPage->intKey || pX->nKey>=0 );
  assert( pPage->leaf || !pPage->intKey );
  if( pPage->nFree<0 ){
    if( pCur->eState>CURSOR_INVALID ){
      rc = SQLITE_CORRUPT_BKPT;
    }else{
      rc = btreeComputeFreeSpace(pPage);
    }
    if( rc ) return rc;
  }

  TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n",
          pCur->pgnoRoot, pX->nKey, pX->nData, pPage->pgno,
          loc==0 ? "overwrite" : "new entry"));
  assert( pPage->isInit );
  newCell = pBt->pTmpSpace;
  assert( newCell!=0 );
  rc = fillInCell(pPage, newCell, pX, &szNew);
  if( rc ) goto end_insert;
  assert( szNew==pPage->xCellSize(pPage, newCell) );
  assert( szNew <= MX_CELL_SIZE(pBt) );
  idx = pCur->ix;
  if( loc==0 ){
    CellInfo info;
    assert( idx<pPage->nCell );
    rc = sqlite3PagerWrite(pPage->pDbPage);
    if( rc ){
      goto end_insert;
    }
    oldCell = findCell(pPage, idx);
    if( !pPage->leaf ){
      memcpy(newCell, oldCell, 4);
    }
    rc = clearCell(pPage, oldCell, &info);
    testcase( pCur->curFlags & BTCF_ValidOvfl );
    invalidateOverflowCache(pCur);
    if( info.nSize==szNew && info.nLocal==info.nPayload
     && (!ISAUTOVACUUM || szNew<pPage->minLocal)
    ){
      /* Overwrite the old cell with the new if they are the same size.
      ** We could also try to do this if the old cell is smaller, then add
      ** the leftover space to the free list.  But experiments show that
      ** doing that is no faster then skipping this optimization and just
      ** calling dropCell() and insertCell().
      **
      ** This optimization cannot be used on an autovacuum database if the
      ** new entry uses overflow pages, as the insertCell() call below is
      ** necessary to add the PTRMAP_OVERFLOW1 pointer-map entry.  */
      assert( rc==SQLITE_OK ); /* clearCell never fails when nLocal==nPayload */
      if( oldCell < pPage->aData+pPage->hdrOffset+10 ){
        return SQLITE_CORRUPT_BKPT;
      }
      if( oldCell+szNew > pPage->aDataEnd ){
        return SQLITE_CORRUPT_BKPT;
      }
      memcpy(oldCell, newCell, szNew);
      return SQLITE_OK;
    }
    dropCell(pPage, idx, info.nSize, &rc);
    if( rc ) goto end_insert;
  }else if( loc<0 && pPage->nCell>0 ){
    assert( pPage->leaf );
    idx = ++pCur->ix;
    pCur->curFlags &= ~BTCF_ValidNKey;
  }else{
    assert( pPage->leaf );
  }
  insertCell(pPage, idx, newCell, szNew, 0, 0, &rc);
  assert( pPage->nOverflow==0 || rc==SQLITE_OK );
  assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );

  /* If no error has occurred and pPage has an overflow cell, call balance()
  ** to redistribute the cells within the tree. Since balance() may move
  ** the cursor, zero the BtCursor.info.nSize and BTCF_ValidNKey
  ** variables.
  **
  ** Previous versions of SQLite called moveToRoot() to move the cursor
  ** back to the root page as balance() used to invalidate the contents
  ** of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that,
  ** set the cursor state to "invalid". This makes common insert operations
  ** slightly faster.
  **
  ** There is a subtle but important optimization here too. When inserting
  ** multiple records into an intkey b-tree using a single cursor (as can
  ** happen while processing an "INSERT INTO ... SELECT" statement), it
  ** is advantageous to leave the cursor pointing to the last entry in
  ** the b-tree if possible. If the cursor is left pointing to the last
  ** entry in the table, and the next row inserted has an integer key
  ** larger than the largest existing key, it is possible to insert the
  ** row without seeking the cursor. This can be a big performance boost.
  */
  pCur->info.nSize = 0;
  if( pPage->nOverflow ){
    assert( rc==SQLITE_OK );
    pCur->curFlags &= ~(BTCF_ValidNKey);
    rc = balance(pCur);

    /* Must make sure nOverflow is reset to zero even if the balance()
    ** fails. Internal data structure corruption will result otherwise.
    ** Also, set the cursor state to invalid. This stops saveCursorPosition()
    ** from trying to save the current position of the cursor.  */
    pCur->pPage->nOverflow = 0;
    pCur->eState = CURSOR_INVALID;
    if( (flags & BTREE_SAVEPOSITION) && rc==SQLITE_OK ){
      btreeReleaseAllCursorPages(pCur);
      if( pCur->pKeyInfo ){
        assert( pCur->pKey==0 );
        pCur->pKey = sqlite3Malloc( pX->nKey );
        if( pCur->pKey==0 ){
          rc = SQLITE_NOMEM;
        }else{
          memcpy(pCur->pKey, pX->pKey, pX->nKey);
        }
      }
      pCur->eState = CURSOR_REQUIRESEEK;
      pCur->nKey = pX->nKey;
    }
  }
  assert( pCur->iPage<0 || pCur->pPage->nOverflow==0 );

end_insert:
  return rc;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl %ecx, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl %eax, -0x28(%rbp)
movl $0x0, -0x2c(%rbp)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x48(%rbp)
movq $0x0, -0x58(%rbp)
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x4, %eax
jne 0x3fc161
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x3fc19b
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %esi
movq -0x10(%rbp), %rdx
callq 0x3e8d80
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3fc199
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
jmp 0x3fc19b
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
jne 0x3fc26e
movq -0x40(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x50(%rax), %esi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
xorl %ecx, %ecx
callq 0x4014d0
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3fc226
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x10(%rbp), %rcx
cmpq 0x30(%rcx), %rax
jne 0x3fc226
movq -0x10(%rbp), %rax
movzwl 0x46(%rax), %eax
cmpl $0x0, %eax
je 0x3fc224
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
movq -0x18(%rbp), %rcx
movl 0x24(%rcx), %ecx
movq -0x18(%rbp), %rdx
addl 0x28(%rdx), %ecx
cmpl %ecx, %eax
jne 0x3fc224
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x4035b0
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
jmp 0x3fc269
cmpl $0x0, -0x28(%rbp)
jne 0x3fc267
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
cmpl $0x0, -0x1c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %ecx
xorl %eax, %eax
movl %eax, %esi
leaq -0x28(%rbp), %r8
callq 0x3fb680
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3fc265
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
jmp 0x3fc267
jmp 0x3fc269
jmp 0x3fc38e
cmpl $0x0, -0x28(%rbp)
jne 0x3fc331
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
jne 0x3fc331
movq -0x18(%rbp), %rax
cmpw $0x0, 0x20(%rax)
je 0x3fc2f3
movq -0x10(%rbp), %rax
movq 0x80(%rax), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rax
movw 0x20(%rax), %ax
movw %ax, -0x60(%rbp)
movb $0x0, -0x5e(%rbp)
movb $0x0, -0x5d(%rbp)
movb $0x0, -0x5c(%rbp)
movb $0x0, -0x5b(%rbp)
movb $0x0, -0x5a(%rbp)
movq -0x10(%rbp), %rdi
cmpl $0x0, -0x1c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %ecx
leaq -0x70(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x28(%rbp), %r8
callq 0x3fb680
movl %eax, -0x24(%rbp)
jmp 0x3fc31e
movq -0x10(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
cmpl $0x0, -0x1c(%rbp)
setne %al
andb $0x1, %al
movzbl %al, %ecx
leaq -0x28(%rbp), %r8
callq 0x400940
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3fc32f
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
jmp 0x3fc331
cmpl $0x0, -0x28(%rbp)
jne 0x3fc38c
movq -0x10(%rbp), %rdi
callq 0x3e9390
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movq -0x18(%rbp), %rcx
cmpq 0x8(%rcx), %rax
jne 0x3fc38a
movq -0x18(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movl %eax, -0x7c(%rbp)
movl $0x0, -0x78(%rbp)
movq -0x10(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x4035b0
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
jmp 0x3fc38c
jmp 0x3fc38e
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jge 0x3fc3e1
movq -0x10(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x1, %eax
jle 0x3fc3c2
movl $0x11e2f, %edi          # imm = 0x11E2F
callq 0x3dff80
movl %eax, -0x24(%rbp)
jmp 0x3fc3ce
movq -0x38(%rbp), %rdi
callq 0x403790
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3fc3df
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
jmp 0x3fc3e1
movq -0x48(%rbp), %rax
movq 0x88(%rax), %rax
movq %rax, -0x58(%rbp)
movq -0x38(%rbp), %rdi
movq -0x58(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
callq 0x403990
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3fc413
jmp 0x3fc6d6
movq -0x10(%rbp), %rax
movzwl 0x56(%rax), %eax
movl %eax, -0x30(%rbp)
cmpl $0x0, -0x28(%rbp)
jne 0x3fc5a1
movq -0x38(%rbp), %rax
movq 0x70(%rax), %rdi
callq 0x3c6610
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x3fc443
jmp 0x3fc6d6
movq -0x38(%rbp), %rax
movq 0x50(%rax), %rax
movq -0x38(%rbp), %rcx
movzwl 0x1a(%rcx), %ecx
movq -0x38(%rbp), %rdx
movq 0x60(%rdx), %rdx
movl -0x30(%rbp), %esi
shll %esi
movslq %esi, %rsi
movzbl (%rdx,%rsi), %edx
shll $0x8, %edx
movq -0x38(%rbp), %rsi
movq 0x60(%rsi), %rsi
movl -0x30(%rbp), %edi
shll %edi
movslq %edi, %rdi
movzbl 0x1(%rsi,%rdi), %esi
orl %esi, %edx
andl %edx, %ecx
movslq %ecx, %rcx
addq %rcx, %rax
movq %rax, -0x50(%rbp)
movq -0x38(%rbp), %rax
cmpb $0x0, 0x8(%rax)
jne 0x3fc4a3
movq -0x58(%rbp), %rax
movq -0x50(%rbp), %rcx
movl (%rcx), %ecx
movl %ecx, (%rax)
movq -0x38(%rbp), %rdi
movq -0x50(%rbp), %rsi
leaq -0xb8(%rbp), %rdx
callq 0x4017b0
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
andl $-0x5, %ecx
movb %cl, 0x1(%rax)
movzwl -0xa2(%rbp), %eax
cmpl -0x2c(%rbp), %eax
jne 0x3fc57d
movzwl -0xa4(%rbp), %eax
cmpl -0xa8(%rbp), %eax
jne 0x3fc57d
movq -0x48(%rbp), %rax
cmpb $0x0, 0x21(%rax)
je 0x3fc504
movl -0x2c(%rbp), %eax
movq -0x38(%rbp), %rcx
movzwl 0x10(%rcx), %ecx
cmpl %ecx, %eax
jge 0x3fc57d
movq -0x50(%rbp), %rax
movq -0x38(%rbp), %rcx
movq 0x50(%rcx), %rcx
movq -0x38(%rbp), %rdx
movzbl 0x9(%rdx), %edx
movslq %edx, %rdx
addq %rdx, %rcx
addq $0xa, %rcx
cmpq %rcx, %rax
jae 0x3fc539
movl $0x11e5d, %edi          # imm = 0x11E5D
callq 0x3dff80
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
movq -0x50(%rbp), %rax
movslq -0x2c(%rbp), %rcx
addq %rcx, %rax
movq -0x38(%rbp), %rcx
cmpq 0x58(%rcx), %rax
jbe 0x3fc560
movl $0x11e60, %edi          # imm = 0x11E60
callq 0x3dff80
movl %eax, -0x4(%rbp)
jmp 0x3fc6dc
movq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movslq -0x2c(%rbp), %rdx
callq 0x19610
movl $0x0, -0x4(%rbp)
jmp 0x3fc6dc
movq -0x38(%rbp), %rdi
movl -0x30(%rbp), %esi
movzwl -0xa2(%rbp), %edx
leaq -0x24(%rbp), %rcx
callq 0x403e00
cmpl $0x0, -0x24(%rbp)
je 0x3fc59f
jmp 0x3fc6d6
jmp 0x3fc5de
cmpl $0x0, -0x28(%rbp)
jge 0x3fc5da
movq -0x38(%rbp), %rax
movzwl 0x18(%rax), %eax
cmpl $0x0, %eax
jle 0x3fc5da
movq -0x10(%rbp), %rcx
movw 0x56(%rcx), %ax
addw $0x1, %ax
movw %ax, 0x56(%rcx)
movzwl %ax, %eax
movl %eax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x1(%rax)
jmp 0x3fc5dc
jmp 0x3fc5dc
jmp 0x3fc5de
movq -0x38(%rbp), %rdi
movl -0x30(%rbp), %esi
movq -0x58(%rbp), %rdx
movl -0x2c(%rbp), %ecx
xorl %eax, %eax
movl %eax, %r8d
xorl %r9d, %r9d
leaq -0x24(%rbp), %rax
movq %rax, (%rsp)
callq 0x403ff0
movq -0x10(%rbp), %rax
movw $0x0, 0x46(%rax)
movq -0x38(%rbp), %rax
cmpb $0x0, 0xc(%rax)
je 0x3fc6d4
movq -0x10(%rbp), %rax
movzbl 0x1(%rax), %ecx
andl $-0x3, %ecx
movb %cl, 0x1(%rax)
movq -0x10(%rbp), %rdi
callq 0x404240
movl %eax, -0x24(%rbp)
movq -0x10(%rbp), %rax
movq 0x88(%rax), %rax
movb $0x0, 0xc(%rax)
movq -0x10(%rbp), %rax
movb $0x1, (%rax)
movl -0x1c(%rbp), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x3fc6d2
cmpl $0x0, -0x24(%rbp)
jne 0x3fc6d2
movq -0x10(%rbp), %rdi
callq 0x3e91b0
movq -0x10(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x3fc6bb
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3c0760
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
jne 0x3fc69d
movl $0x7, -0x24(%rbp)
jmp 0x3fc6b9
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x19610
jmp 0x3fc6bb
movq -0x10(%rbp), %rax
movb $0x3, (%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
jmp 0x3fc6d4
jmp 0x3fc6d6
movl -0x24(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0xc0, %rsp
popq %rbp
retq
nopl (%rax,%rax)