// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, -0x38(%rbp)
movq 0x1b8(%rdi), %r13
testq %r13, %r13
je 0x50a7e
movq -0x38(%rbp), %rax
movq 0x10(%rax), %r14
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x20(%rax), %rax
movslq 0x10(%r13), %rdx
movl 0x14(%r13), %r15d
movq %rdx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq 0x68(%rax), %rcx
movq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0x37, %r8d
callq 0x50ae2
leal 0x1(%r15), %r8d
movq %r14, %rdi
movl $0x1a, %esi
xorl %edx, %edx
movl %r15d, %ecx
movl %r8d, -0x30(%rbp)
callq 0x3fa9e
movl 0x3c(%r14), %r12d
leal -0x1(%r15), %ecx
movl %ecx, -0x2c(%rbp)
movq 0x8(%r13), %rax
movq (%rax), %rbx
movq %r14, %rdi
movl $0x61, %esi
xorl %edx, %edx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movl %eax, %esi
movq %rbx, %rdx
xorl %ecx, %ecx
callq 0x14ab9
leal 0x9(%r12), %ebx
movq %r14, %rdi
movl $0x6e, %esi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movl $0x30, %esi
xorl %edx, %edx
xorl %ecx, %ecx
movl %r15d, %r8d
callq 0x3fa9e
leal 0x7(%r12), %ecx
movq %r14, %rdi
movl $0x4e, %esi
movl -0x2c(%rbp), %edx
movl %r15d, %r8d
callq 0x3fa9e
movq (%r14), %rax
cmpb $0x0, 0x51(%rax)
leaq 0x44b13(%rip), %rax     # 0x954e8
jne 0x509eb
movslq 0x3c(%r14), %rax
movq 0x8(%r14), %rcx
leaq (%rax,%rax,2), %rax
leaq (%rcx,%rax,8), %rax
addq $-0x18, %rax
movb $0x10, 0x3(%rax)
movq %r14, %rdi
movl $0x69, %esi
xorl %edx, %edx
movl -0x30(%rbp), %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movl $0x30, %esi
xorl %edx, %edx
movl $0x1, %ecx
movl %r15d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movl $0xe, %esi
xorl %edx, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
addl $0x2, %r12d
movq %r14, %rdi
movl $0x8, %esi
xorl %edx, %edx
movl %r12d, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movl $0x17, %esi
xorl %edx, %edx
movl %r15d, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq %r14, %rdi
movl $0x3e, %esi
xorl %edx, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x3fa9e
movq (%r13), %r13
testq %r13, %r13
jne 0x50904
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq