// File: /workspace/github_c_makefile_star2_O1/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 0x2b6f6c
movq %rcx, %rbp
movq %rdx, %r13
cmpb $0x0, 0xb5(%r14)
je 0x2b6e61
xorl %ecx, %ecx
cmpb $0x1, 0xb4(%r14)
sete %cl
xorl $0x5, %ecx
jmp 0x2b6e65
movw $0x4, %cx
movswq 0x46(%rax), %r12
shlq $0x5, %r12
addq 0x8(%rax), %r12
movw %cx, 0x34(%rsp)
leaq 0x132a5(%rip), %rax     # 0x2ca123
movq %rax, 0x18(%rsp)
leaq 0x1337b(%rip), %rax     # 0x2ca205
movq %rax, 0x20(%rsp)
movl $0x0, 0x38(%rsp)
testq %rbx, %rbx
je 0x2b6ea9
leaq 0x10(%rsp), %rdi
movq %rbx, %rsi
callq 0x2ca211
cmpw $0x0, 0x34(%rsp)
je 0x2b6ecf
testb $0x60, -0x4(%r12)
je 0x2b6eea
leaq 0x12a9e2(%rip), %rsi    # 0x3e18a2
movq %r15, %rdi
xorl %eax, %eax
callq 0x284eb8
jmp 0x2b6f6c
movq -0x20(%r12), %rdx
leaq 0x12a99a(%rip), %rsi    # 0x3e1875
movq %r15, %rdi
xorl %eax, %eax
callq 0x284eb8
jmp 0x2b6f6c
movq %rbp, 0x8(%rsp)
movq -0x18(%r12), %rsi
testq %rsi, %rsi
je 0x2b6f01
movq %r14, %rdi
callq 0x2afd54
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 0x2d311d
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 0x2cbf97
movq %rax, -0x18(%r12)
movq 0x8(%rbp), %rsi
testq %rsi, %rsi
je 0x2b6f6c
movq %r14, %rdi
callq 0x28c3e7
cmpb $0x2, 0x11c(%r15)
jb 0x2b6f81
movq %r15, %rdi
movq %rbx, %rsi
callq 0x2d318f
testq %rbx, %rbx
je 0x2b6f91
movq %r14, %rdi
movq %rbx, %rsi
callq 0x2afd54
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq