// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: autoIncrementEnd
static SQLITE_NOINLINE void autoIncrementEnd(Parse *pParse){
  AutoincInfo *p;
  Vdbe *v = pParse->pVdbe;
  sqlite3 *db = pParse->db;

  assert( v );
  for(p = pParse->pAinc; p; p = p->pNext){
    static const int iLn = VDBE_OFFSET_LINENO(2);
    static const VdbeOpList autoIncEnd[] = {
      /* 0 */ {OP_NotNull,     0, 2, 0},
      /* 1 */ {OP_NewRowid,    0, 0, 0},
      /* 2 */ {OP_MakeRecord,  0, 2, 0},
      /* 3 */ {OP_Insert,      0, 0, 0},
      /* 4 */ {OP_Close,       0, 0, 0}
    };
    VdbeOp *aOp;
    Db *pDb = &db->aDb[p->iDb];
    int iRec;
    int memId = p->regCtr;

    iRec = sqlite3GetTempReg(pParse);
    assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
    sqlite3VdbeAddOp3(v, OP_Le, memId+2, sqlite3VdbeCurrentAddr(v)+7, memId);
    VdbeCoverage(v);
    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
    aOp = sqlite3VdbeAddOpList(v, ArraySize(autoIncEnd), autoIncEnd, iLn);
    if( aOp==0 ) break;
    aOp[0].p1 = memId+1;
    aOp[1].p2 = memId+1;
    aOp[2].p1 = memId-1;
    aOp[2].p3 = iRec;
    aOp[3].p2 = iRec;
    aOp[3].p3 = memId+1;
    aOp[3].p5 = OPFLAG_APPEND;
    sqlite3ReleaseTempReg(pParse, iRec);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq 0x98(%rax), %rax
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x45e0c8
movq -0x20(%rbp), %rax
movq 0x20(%rax), %rax
movq -0x10(%rbp), %rcx
movslq 0x10(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movl 0x14(%rax), %eax
movl %eax, -0x38(%rbp)
movq -0x8(%rbp), %rdi
callq 0x42f190
movl %eax, -0x34(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x38(%rbp), %eax
addl $0x2, %eax
movl %eax, -0x3c(%rbp)
movq -0x18(%rbp), %rdi
callq 0x430ae0
movq -0x48(%rbp), %rdi
movl -0x3c(%rbp), %edx
movl %eax, %ecx
addl $0x7, %ecx
movl -0x38(%rbp), %r8d
movl $0x37, %esi
callq 0x410130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x10(%rax), %edx
movq -0x30(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x68(%rax), %rcx
xorl %esi, %esi
movl $0x61, %r8d
callq 0x429e70
movq -0x18(%rbp), %rdi
movl $0x5, %esi
leaq 0x14c7ca(%rip), %rdx    # 0x5aa810
xorl %ecx, %ecx
callq 0x3cba40
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x45e05a
jmp 0x45e0c8
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x4(%rax)
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x20(%rax)
movl -0x38(%rbp), %ecx
subl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x34(%rax)
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x3c(%rax)
movl -0x34(%rbp), %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x50(%rax)
movl -0x38(%rbp), %ecx
addl $0x1, %ecx
movq -0x28(%rbp), %rax
movl %ecx, 0x54(%rax)
movq -0x28(%rbp), %rax
movw $0x8, 0x4a(%rax)
movq -0x8(%rbp), %rdi
movl -0x34(%rbp), %esi
callq 0x42e560
movq -0x10(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x10(%rbp)
jmp 0x45dfa2
addq $0x50, %rsp
popq %rbp
retq
nop