// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3AddColumn
SQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token *pName, Token *pType){
  Table *p;
  int i;
  char *z;
  char *zType;
  Column *pCol;
  sqlite3 *db = pParse->db;
  if( (p = pParse->pNewTable)==0 ) return;
  if( p->nCol+1>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
    return;
  }
  z = sqlite3DbMallocRaw(db, pName->n + pType->n + 2);
  if( z==0 ) return;
  if( IN_RENAME_OBJECT ) sqlite3RenameTokenMap(pParse, (void*)z, pName);
  memcpy(z, pName->z, pName->n);
  z[pName->n] = 0;
  sqlite3Dequote(z);
  for(i=0; i<p->nCol; i++){
    if( sqlite3_stricmp(z, p->aCol[i].zName)==0 ){
      sqlite3ErrorMsg(pParse, "duplicate column name: %s", z);
      sqlite3DbFree(db, z);
      return;
    }
  }
  if( (p->nCol & 0x7)==0 ){
    Column *aNew;
    aNew = sqlite3DbRealloc(db,p->aCol,(p->nCol+8)*sizeof(p->aCol[0]));
    if( aNew==0 ){
      sqlite3DbFree(db, z);
      return;
    }
    p->aCol = aNew;
  }
  pCol = &p->aCol[p->nCol];
  memset(pCol, 0, sizeof(p->aCol[0]));
  pCol->zName = z;
  pCol->hName = sqlite3StrIHash(z);
  sqlite3ColumnPropertiesFromName(p, pCol);

  if( pType->n==0 ){
    /* If there is no type specified, columns have the default affinity
    ** 'BLOB' with a default size of 4 bytes. */
    pCol->affinity = SQLITE_AFF_BLOB;
    pCol->szEst = 1;
#ifdef SQLITE_ENABLE_SORTER_REFERENCES
    if( 4>=sqlite3GlobalConfig.szSorterRef ){
      pCol->colFlags |= COLFLAG_SORTERREF;
    }
#endif
  }else{
    zType = z + sqlite3Strlen30(z) + 1;
    memcpy(zType, pType->z, pType->n);
    zType[pType->n] = 0;
    sqlite3Dequote(zType);
    pCol->affinity = sqlite3AffinityType(zType, pCol);
    pCol->colFlags |= COLFLAG_HASTYPE;
  }
  p->nCol++;
  p->nNVCol++;
  pParse->constraintName.n = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x8(%rbp), %rax
movq 0x148(%rax), %rax
movq %rax, -0x20(%rbp)
cmpq $0x0, %rax
jne 0x4180f9
jmp 0x418384
movq -0x20(%rbp), %rax
movswl 0x46(%rax), %eax
addl $0x1, %eax
movq -0x48(%rbp), %rcx
cmpl 0x84(%rcx), %eax
jle 0x41812e
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq (%rax), %rdx
leaq 0x19460a(%rip), %rsi    # 0x5ac72c
movb $0x0, %al
callq 0x3cb660
jmp 0x418384
movq -0x48(%rbp), %rdi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movq -0x18(%rbp), %rcx
addl 0x8(%rcx), %eax
addl $0x2, %eax
movl %eax, %eax
movl %eax, %esi
callq 0x3cd3a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x41815c
jmp 0x418384
movq -0x8(%rbp), %rax
movzbl 0x11c(%rax), %eax
cmpl $0x2, %eax
jl 0x41817d
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rsi
movq -0x10(%rbp), %rdx
callq 0x41dae0
movq -0x30(%rbp), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x19610
movq -0x30(%rbp), %rax
movq -0x10(%rbp), %rcx
movl 0x8(%rcx), %ecx
movb $0x0, (%rax,%rcx)
movq -0x30(%rbp), %rdi
callq 0x43c5e0
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
movq -0x20(%rbp), %rcx
movswl 0x46(%rcx), %ecx
cmpl %ecx, %eax
jge 0x41821d
movq -0x30(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x24(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq (%rax), %rsi
callq 0x3c3e00
cmpl $0x0, %eax
jne 0x418210
movq -0x8(%rbp), %rdi
movq -0x30(%rbp), %rdx
leaq 0x1953a9(%rip), %rsi    # 0x5ad5a0
movb $0x0, %al
callq 0x3cb660
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3c00a0
jmp 0x418384
jmp 0x418212
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x4181b5
movq -0x20(%rbp), %rax
movswl 0x46(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x418279
movq -0x48(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x20(%rbp), %rax
movswl 0x46(%rax), %eax
addl $0x8, %eax
movslq %eax, %rdx
shlq $0x5, %rdx
callq 0x3d61d0
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x50(%rbp)
jne 0x41826d
movq -0x48(%rbp), %rdi
movq -0x30(%rbp), %rsi
callq 0x3c00a0
jmp 0x418384
movq -0x50(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x20(%rbp), %rcx
movswq 0x46(%rcx), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rdi
xorl %esi, %esi
movl $0x20, %edx
callq 0x19360
movq -0x30(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rdi
callq 0x437e20
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x1b(%rax)
movq -0x18(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x4182de
movq -0x40(%rbp), %rax
movb $0x41, 0x19(%rax)
movq -0x40(%rbp), %rax
movb $0x1, 0x1a(%rax)
jmp 0x418359
movq -0x30(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x30(%rbp), %rdi
callq 0x3c3400
movl %eax, %ecx
movq -0x58(%rbp), %rax
movslq %ecx, %rcx
addq %rcx, %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rsi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, %edx
callq 0x19610
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movl 0x8(%rcx), %ecx
movb $0x0, (%rax,%rcx)
movq -0x38(%rbp), %rdi
callq 0x43c5e0
movq -0x38(%rbp), %rdi
movq -0x40(%rbp), %rsi
callq 0x42c020
movb %al, %cl
movq -0x40(%rbp), %rax
movb %cl, 0x19(%rax)
movq -0x40(%rbp), %rax
movzwl 0x1c(%rax), %ecx
orl $0x4, %ecx
movw %cx, 0x1c(%rax)
movq -0x20(%rbp), %rax
movw 0x46(%rax), %cx
addw $0x1, %cx
movw %cx, 0x46(%rax)
movq -0x20(%rbp), %rax
movw 0x48(%rax), %cx
addw $0x1, %cx
movw %cx, 0x48(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x68(%rax)
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)