// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movb $0x20, -0x19(%rbp)
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x41a7d3
jmp 0x41a913
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 -0x8(%rbp), %rax
movzbl 0x11c(%rax), %eax
cmpl $0x1, %eax
jne 0x41a81b
movq -0x8(%rbp), %rdi
leaq 0x193187(%rip), %rsi    # 0x5ad996
movb $0x0, %al
callq 0x3cb660
jmp 0x41a913
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x41a82b
jmp 0x41a8fa
cmpq $0x0, -0x18(%rbp)
je 0x41a88e
movq -0x18(%rbp), %rax
cmpl $0x7, 0x8(%rax)
jne 0x41a85b
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq 0x193177(%rip), %rdi    # 0x5ad9c1
movl $0x7, %edx
callq 0x3c3ef0
cmpl $0x0, %eax
jne 0x41a85b
jmp 0x41a88c
movq -0x18(%rbp), %rax
cmpl $0x6, 0x8(%rax)
jne 0x41a888
movq -0x18(%rbp), %rax
movq (%rax), %rsi
leaq 0x130a99(%rip), %rdi    # 0x54b30c
movl $0x6, %edx
callq 0x3c3ef0
cmpl $0x0, %eax
jne 0x41a888
movb $0x40, -0x19(%rbp)
jmp 0x41a88a
jmp 0x41a8fa
jmp 0x41a88c
jmp 0x41a88e
movzbl -0x19(%rbp), %eax
cmpl $0x20, %eax
jne 0x41a8a7
movq -0x28(%rbp), %rax
movw 0x48(%rax), %cx
addw $-0x1, %cx
movw %cx, 0x48(%rax)
movzbl -0x19(%rbp), %edx
movq -0x30(%rbp), %rax
movzwl 0x1c(%rax), %ecx
orl %edx, %ecx
movw %cx, 0x1c(%rax)
movzbl -0x19(%rbp), %ecx
movq -0x28(%rbp), %rax
orl 0x40(%rax), %ecx
movl %ecx, 0x40(%rax)
movq -0x30(%rbp), %rax
movzwl 0x1c(%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x41a8e4
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x43cc70
movq -0x10(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x10(%rbp)
jmp 0x41a913
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rax
movq (%rax), %rdx
leaq 0x1930bd(%rip), %rsi    # 0x5ad9c9
movb $0x0, %al
callq 0x3cb660
movq -0x8(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x40c670
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)