// File: /workspace/github_c_makefile_star2_O3/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 %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x148(%rdi), %rax
testq %rax, %rax
je 0x2aefe1
cmpb $0x1, 0x11c(%r14)
jne 0x2aefb8
leaq 0x129550(%rip), %rsi    # 0x3d84fc
movq %r14, %rdi
xorl %eax, %eax
callq 0x27b48d
jmp 0x2aefe1
movswq 0x46(%rax), %r15
shlq $0x5, %r15
addq 0x8(%rax), %r15
cmpq $0x0, -0x18(%r15)
je 0x2aeffa
movq -0x20(%r15), %rdx
leaq 0x129558(%rip), %rsi    # 0x3d852f
movq %r14, %rdi
xorl %eax, %eax
callq 0x27b48d
testq %rbx, %rbx
je 0x2af085
movq (%r14), %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x2a6164
testq %rdx, %rdx
je 0x2af045
movl 0x8(%rdx), %ecx
cmpl $0x6, %ecx
je 0x2af08b
cmpl $0x7, %ecx
jne 0x2aefcc
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x2aefcc
xorl %edx, %edx
leaq 0x129506(%rip), %rsi    # 0x3d8527
leaq 0x1222b8(%rip), %rdi    # 0x3d12e0
movzbl (%rdx,%rsi), %r8d
movb (%r8,%rdi), %r8b
movzbl (%rcx,%rdx), %r9d
cmpb (%r9,%rdi), %r8b
jne 0x2aefcc
incq %rdx
cmpq $0x7, %rdx
jne 0x2af028
decw 0x48(%rax)
movl $0x20, %ecx
movzwl -0x4(%r15), %edx
movl %edx, %esi
orl %ecx, %esi
movw %si, -0x4(%r15)
orl %ecx, 0x40(%rax)
testb $0x1, %dl
sete %al
testb $0x60, %sil
sete %cl
orb %al, %cl
jne 0x2af081
leaq 0x129160(%rip), %rsi    # 0x3d81d7
movq %r14, %rdi
xorl %eax, %eax
callq 0x27b48d
movq %rbx, -0x18(%r15)
popq %rbx
popq %r14
popq %r15
retq
movq (%rdx), %rcx
testq %rcx, %rcx
je 0x2aefcc
xorl %edx, %edx
leaq 0xc9f4e(%rip), %rsi     # 0x378fee
leaq 0x122239(%rip), %rdi    # 0x3d12e0
movzbl (%rdx,%rsi), %r8d
movb (%r8,%rdi), %r8b
movzbl (%rcx,%rdx), %r9d
cmpb (%r9,%rdi), %r8b
jne 0x2aefcc
incq %rdx
cmpq $0x6, %rdx
jne 0x2af0a7
movl $0x40, %ecx
jmp 0x2af04e