// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3AddDefaultValue
SQLITE_PRIVATE void sqlite3AddDefaultValue(
  Parse *pParse,           /* Parsing context */
  Expr *pExpr,             /* The parsed expression of the default value */
  const char *zStart,      /* Start of the default value text */
  const char *zEnd         /* First character past end of defaut value text */
){
  Table *p;
  Column *pCol;
  sqlite3 *db = pParse->db;
  p = pParse->pNewTable;
  if( p!=0 ){
    int isInit = db->init.busy && db->init.iDb!=1;
    pCol = &(p->aCol[p->nCol-1]);
    if( !sqlite3ExprIsConstantOrFunction(pExpr, isInit) ){
      sqlite3ErrorMsg(pParse, "default value of column [%s] is not constant",
          pCol->zName);
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
    }else if( pCol->colFlags & COLFLAG_GENERATED ){
      testcase( pCol->colFlags & COLFLAG_VIRTUAL );
      testcase( pCol->colFlags & COLFLAG_STORED );
      sqlite3ErrorMsg(pParse, "cannot use DEFAULT on a generated column");
#endif
    }else{
      /* A copy of pExpr is used instead of the original, as pExpr contains
      ** tokens that point to volatile memory.
      */
      Expr x;
      sqlite3ExprDelete(db, pCol->pDflt);
      memset(&x, 0, sizeof(x));
      x.op = TK_SPAN;
      x.u.zToken = sqlite3DbSpanDup(db, zStart, zEnd);
      x.pLeft = pExpr;
      x.flags = EP_Skip;
      pCol->pDflt = sqlite3ExprDup(db, &x, EXPRDUP_REDUCE);
      sqlite3DbFree(db, x.u.zToken);
    }
  }
  if( IN_RENAME_OBJECT ){
    sqlite3RenameExprUnmap(pParse, pExpr);
  }
  sqlite3ExprDelete(db, pExpr);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdi), %r14
movq 0x148(%rdi), %rax
testq %rax, %rax
je 0x2ad381
movq %rdx, %r13
cmpb $0x0, 0xb5(%r14)
movq %rcx, 0x8(%rsp)
je 0x2ad278
xorl %ecx, %ecx
cmpb $0x1, 0xb4(%r14)
sete %cl
xorl $0x5, %ecx
jmp 0x2ad27c
movw $0x4, %cx
movswq 0x46(%rax), %r12
shlq $0x5, %r12
addq 0x8(%rax), %r12
movw %cx, 0x34(%rsp)
leaq 0x136f2(%rip), %rax     # 0x2c0987
movq %rax, 0x18(%rsp)
leaq 0x137df(%rip), %rax     # 0x2c0a80
movq %rax, 0x20(%rsp)
movl $0x0, 0x38(%rsp)
testq %rbx, %rbx
je 0x2ad2ce
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
movq %rbx, %rsi
callq 0x2c0a8c
cmpw $0x0, 0x24(%rbp)
je 0x2ad36b
testb $0x60, -0x4(%r12)
je 0x2ad2ec
leaq 0x12ae70(%rip), %rsi    # 0x3d814d
movq %r15, %rdi
xorl %eax, %eax
callq 0x27b48d
jmp 0x2ad381
movq -0x18(%r12), %rsi
testq %rsi, %rsi
je 0x2ad2fe
movq %r14, %rdi
callq 0x2a6164
xorps %xmm0, %xmm0
leaq 0x10(%rsp), %rbp
movaps %xmm0, (%rbp)
movaps %xmm0, 0x30(%rbp)
movaps %xmm0, 0x20(%rbp)
movaps %xmm0, 0x10(%rbp)
movq $0x0, 0x40(%rbp)
movb $-0x4e, (%rbp)
movq %r14, %rdi
movq %r13, %rsi
movq 0x8(%rsp), %rdx
callq 0x2c9873
movq %rax, 0x8(%rbp)
movq %rbx, 0x10(%rbp)
movl $0x1000, 0x4(%rbp)      # imm = 0x1000
movq %r14, %rdi
movq %rbp, %rsi
movl $0x1, %edx
xorl %ecx, %ecx
callq 0x2c2864
movq %rax, -0x18(%r12)
movq 0x8(%rbp), %rsi
testq %rsi, %rsi
je 0x2ad381
movq %r14, %rdi
callq 0x282904
jmp 0x2ad381
movq -0x20(%r12), %rdx
leaq 0x12ada9(%rip), %rsi    # 0x3d8120
movq %r15, %rdi
xorl %eax, %eax
callq 0x27b48d
cmpb $0x2, 0x11c(%r15)
jb 0x2ad396
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2c98e5
testq %rbx, %rbx
je 0x2ad3a6
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2a6164
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq