// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3AddGenerated
SQLITE_PRIVATE void sqlite3AddGenerated(Parse *pParse, Expr *pExpr, Token *pType){
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
  u8 eType = COLFLAG_VIRTUAL;
  Table *pTab = pParse->pNewTable;
  Column *pCol;
  if( pTab==0 ){
    /* generated column in an CREATE TABLE IF NOT EXISTS that already exists */
    goto generated_done;
  }
  pCol = &(pTab->aCol[pTab->nCol-1]);
  if( IN_DECLARE_VTAB ){
    sqlite3ErrorMsg(pParse, "virtual tables cannot use computed columns");
    goto generated_done;
  }
  if( pCol->pDflt ) goto generated_error;
  if( pType ){
    if( pType->n==7 && sqlite3StrNICmp("virtual",pType->z,7)==0 ){
      /* no-op */
    }else if( pType->n==6 && sqlite3StrNICmp("stored",pType->z,6)==0 ){
      eType = COLFLAG_STORED;
    }else{
      goto generated_error;
    }
  }
  if( eType==COLFLAG_VIRTUAL ) pTab->nNVCol--;
  pCol->colFlags |= eType;
  assert( TF_HasVirtual==COLFLAG_VIRTUAL );
  assert( TF_HasStored==COLFLAG_STORED );
  pTab->tabFlags |= eType;
  if( pCol->colFlags & COLFLAG_PRIMKEY ){
    makeColumnPartOfPrimaryKey(pParse, pCol); /* For the error message */
  }
  pCol->pDflt = pExpr;
  pExpr = 0;
  goto generated_done;

generated_error:
  sqlite3ErrorMsg(pParse, "error in generated column \"%s\"",
                  pCol->zName);
generated_done:
  sqlite3ExprDelete(pParse->db, pExpr);
#else
  /* Throw and error for the GENERATED ALWAYS AS clause if the
  ** SQLITE_OMIT_GENERATED_COLUMNS compile-time option is used. */
  sqlite3ErrorMsg(pParse, "generated columns not supported");
  sqlite3ExprDelete(pParse->db, pExpr);
#endif
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x148(%rdi), %r13
testq %r13, %r13
je 0x2b8c67
cmpb $0x1, 0x11c(%r14)
jne 0x2b8b89
leaq 0x1290d7(%rip), %rsi    # 0x3e1c51
movq %r14, %rdi
xorl %eax, %eax
callq 0x284eb8
jmp 0x2b8c67
movswq 0x46(%r13), %r12
shlq $0x5, %r12
addq 0x8(%r13), %r12
cmpq $0x0, -0x18(%r12)
je 0x2b8bb9
movq -0x20(%r12), %rdx
leaq 0x1290da(%rip), %rsi    # 0x3e1c84
movq %r14, %rdi
xorl %eax, %eax
callq 0x284eb8
jmp 0x2b8c67
movq %rdx, %r15
movl $0x20, %edx
movb $0x1, %al
testq %r15, %r15
je 0x2b8c19
movl 0x8(%r15), %ebp
cmpl $0x6, %ebp
je 0x2b8bfa
cmpl $0x7, %ebp
jne 0x2b8b9e
movq (%r15), %rsi
leaq 0x12909c(%rip), %rdi    # 0x3e1c7c
movl $0x7, %edx
callq 0x27e951
movl $0x20, %edx
testl %eax, %eax
movb $0x1, %al
je 0x2b8c19
cmpl $0x6, %ebp
jne 0x2b8b9e
movq (%r15), %rsi
leaq 0xc9708(%rip), %rdi     # 0x38230c
movl $0x6, %edx
callq 0x27e951
testl %eax, %eax
jne 0x2b8b9e
movl $0x40, %edx
xorl %eax, %eax
testb %al, %al
je 0x2b8c22
decw 0x48(%r13)
movzwl -0x4(%r12), %eax
movl %eax, %ecx
orl %edx, %ecx
movw %cx, -0x4(%r12)
orl %edx, 0x40(%r13)
testb $0x1, %al
je 0x2b8c60
movzwl -0x4(%r12), %eax
movl %eax, %ecx
orl $0x1, %ecx
movw %cx, -0x4(%r12)
testb $0x60, %al
je 0x2b8c60
leaq 0x128cd6(%rip), %rsi    # 0x3e192c
movq %r14, %rdi
xorl %eax, %eax
callq 0x284eb8
movq %rbx, -0x18(%r12)
xorl %ebx, %ebx
testq %rbx, %rbx
je 0x2b8c85
movq (%r14), %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2afd54
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq