// File: /workspace/github_c_makefile_star2_O0/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: sqlite3AutoincrementBegin
SQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){
  AutoincInfo *p;            /* Information about an AUTOINCREMENT */
  sqlite3 *db = pParse->db;  /* The database connection */
  Db *pDb;                   /* Database only autoinc table */
  int memId;                 /* Register holding max rowid */
  int addr;                  /* A VDBE address */
  Vdbe *v = pParse->pVdbe;   /* VDBE under construction */

  /* This routine is never called during trigger-generation.  It is
  ** only called from the top-level */
  assert( pParse->pTriggerTab==0 );
  assert( sqlite3IsToplevel(pParse) );

  assert( v );   /* We failed long ago if this is not so */
  for(p = pParse->pAinc; p; p = p->pNext){
    pDb = &db->aDb[p->iDb];
    memId = p->regCtr;
    assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
    sqlite3VdbeAddOp3(v, OP_Null, 0, memId, memId+1);
    addr = sqlite3VdbeCurrentAddr(v);
    sqlite3VdbeLoadString(v, memId-1, p->pTab->zName);
    sqlite3VdbeAddOp2(v, OP_Rewind, 0, addr+9); VdbeCoverage(v);
    sqlite3VdbeAddOp3(v, OP_Column, 0, 0, memId);
    sqlite3VdbeAddOp3(v, OP_Ne, memId-1, addr+7, memId); VdbeCoverage(v);
    sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
    sqlite3VdbeAddOp2(v, OP_Rowid, 0, memId+1);
    sqlite3VdbeAddOp3(v, OP_Column, 0, 1, memId);
    sqlite3VdbeGoto(v, addr+9);
    sqlite3VdbeAddOp2(v, OP_Next, 0, addr+2); VdbeCoverage(v);
    sqlite3VdbeAddOp2(v, OP_Integer, 0, memId);
    sqlite3VdbeAddOp0(v, OP_Close);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
movq 0x1b8(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x6c114
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x10(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x24(%rbp)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rcx
xorl %esi, %esi
movl $0x37, %r8d
callq 0x6c1e0
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %ecx
movl -0x24(%rbp), %r8d
addl $0x1, %r8d
movl $0x1a, %esi
xorl %edx, %edx
callq 0x56c10
movq -0x30(%rbp), %rdi
callq 0x6c2b0
movl %eax, -0x28(%rbp)
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %esi
subl $0x1, %esi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq (%rax), %rdx
callq 0x6c2d0
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %ecx
addl $0x9, %ecx
movl $0x6e, %esi
xorl %edx, %edx
callq 0x6c310
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %r8d
movl $0x30, %esi
xorl %ecx, %ecx
movl %ecx, %edx
callq 0x56c10
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %edx
subl $0x1, %edx
movl -0x28(%rbp), %ecx
addl $0x7, %ecx
movl -0x24(%rbp), %r8d
movl $0x4e, %esi
callq 0x56c10
movq -0x30(%rbp), %rdi
movl $0x10, %esi
callq 0x17b70
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %ecx
addl $0x1, %ecx
movl $0x69, %esi
xorl %edx, %edx
callq 0x6c310
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %r8d
movl $0x30, %esi
xorl %edx, %edx
movl $0x1, %ecx
callq 0x56c10
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %esi
addl $0x9, %esi
callq 0x6c1b0
movq -0x30(%rbp), %rdi
movl -0x28(%rbp), %ecx
addl $0x2, %ecx
movl $0x8, %esi
xorl %edx, %edx
callq 0x6c310
movq -0x30(%rbp), %rdi
movl -0x24(%rbp), %ecx
movl $0x17, %esi
xorl %edx, %edx
callq 0x6c310
movq -0x30(%rbp), %rdi
movl $0x3e, %esi
callq 0x6be00
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x6bfa2
addq $0x30, %rsp
popq %rbp
retq
nopw (%rax,%rax)