// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x418507
movq -0x38(%rbp), %rax
movzbl 0xb5(%rax), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x89(%rbp)
je 0x4183ff
movq -0x38(%rbp), %rax
movzbl 0xb4(%rax), %eax
cmpl $0x1, %eax
setne %al
movb %al, -0x89(%rbp)
movb -0x89(%rbp), %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x28(%rbp), %rcx
movswl 0x46(%rcx), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rdi
movl -0x3c(%rbp), %eax
movzbl %al, %esi
callq 0x43c6d0
cmpl $0x0, %eax
jne 0x418460
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
leaq 0x195166(%rip), %rsi    # 0x5ad5ba
movb $0x0, %al
callq 0x3cb660
jmp 0x418505
movq -0x30(%rbp), %rax
movzwl 0x1c(%rax), %eax
andl $0x60, %eax
cmpl $0x0, %eax
je 0x418484
movq -0x8(%rbp), %rdi
leaq 0x19516c(%rip), %rsi    # 0x5ad5e7
movb $0x0, %al
callq 0x3cb660
jmp 0x418503
movq -0x38(%rbp), %rdi
movq -0x30(%rbp), %rax
movq 0x8(%rax), %rsi
callq 0x40c670
leaq -0x88(%rbp), %rdi
xorl %esi, %esi
movl $0x48, %edx
callq 0x19360
movb $-0x4e, -0x88(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x43c700
movq %rax, -0x80(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x78(%rbp)
movl $0x1000, -0x84(%rbp)    # imm = 0x1000
movq -0x38(%rbp), %rdi
leaq -0x88(%rbp), %rsi
movl $0x1, %edx
callq 0x42dee0
movq %rax, %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rdi
movq -0x80(%rbp), %rsi
callq 0x3c00a0
jmp 0x418505
jmp 0x418507
movq -0x8(%rbp), %rax
movzbl 0x11c(%rax), %eax
cmpl $0x2, %eax
jl 0x418524
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x43c7b0
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x40c670
addq $0x90, %rsp
popq %rbp
retq
nopw (%rax,%rax)