// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x148(%rdi), %rbp
testq %rbp, %rbp
je 0x2b6e09
movq %rdi, %rbx
movq (%rdi), %r12
movswl 0x46(%rbp), %eax
cmpl %eax, 0x84(%r12)
jle 0x2b6c13
movq %rdx, %r14
movq %rsi, %r13
movl 0x8(%rsi), %eax
movl 0x8(%rdx), %ecx
leal (%rax,%rcx), %esi
addl $0x2, %esi
testq %r12, %r12
je 0x2b6c36
movq %r12, %rdi
callq 0x28c518
jmp 0x2b6c3e
movq (%rbp), %rdx
leaq 0x129dd2(%rip), %rsi    # 0x3e09f0
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x284eb8
movq %rsi, %rdi
callq 0x27c381
movq %rax, %r15
testq %rax, %rax
je 0x2b6e09
cmpb $0x2, 0x11c(%rbx)
jb 0x2b6c61
movq %rbx, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2bb62e
movq (%r13), %rsi
movl 0x8(%r13), %edx
movq %r15, %rdi
callq 0x17660
movl 0x8(%r13), %eax
movb $0x0, (%r15,%rax)
movq %r15, %rdi
callq 0x2d30c7
movswl 0x46(%rbp), %eax
testl %eax, %eax
jle 0x2b6cd9
movq 0x8(%rbp), %rcx
movl %eax, %edx
xorl %esi, %esi
leaq 0x123dc7(%rip), %rdi    # 0x3daa60
movq %rsi, %r8
shlq $0x5, %r8
movq (%rcx,%r8), %r8
testq %r8, %r8
je 0x2b6cd1
xorl %r9d, %r9d
movzbl (%r15,%r9), %r10d
movzbl (%r8,%r9), %r11d
cmpb %r11b, %r10b
jne 0x2b6cc2
testq %r10, %r10
jne 0x2b6ccc
jmp 0x2b6d05
movb (%r10,%rdi), %r10b
cmpb (%r11,%rdi), %r10b
jne 0x2b6cd1
incq %r9
jmp 0x2b6cac
incq %rsi
cmpq %rdx, %rsi
jne 0x2b6c99
testb $0x7, %al
jne 0x2b6d46
movslq %eax, %rdx
movq 0x8(%rbp), %rsi
shlq $0x5, %rdx
addq $0x100, %rdx            # imm = 0x100
movq %r12, %rdi
callq 0x28c4c8
movq %rax, %r13
testq %rax, %rax
je 0x2b6d32
movq %r13, 0x8(%rbp)
jmp 0x2b6d3d
leaq 0x12ab4f(%rip), %rsi    # 0x3e185b
movq %rbx, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x284eb8
movq %r12, %rdi
movq %r15, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x28c3e7
movq %r12, %rdi
movq %r15, %rsi
callq 0x28c3e7
testq %r13, %r13
je 0x2b6e09
movq 0x8(%rbp), %rax
movswq 0x46(%rbp), %rcx
shlq $0x5, %rcx
leaq (%rax,%rcx), %r12
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rcx)
movups %xmm0, 0x10(%rax,%rcx)
movq %r15, (%rax,%rcx)
movb (%r15), %dl
testb %dl, %dl
je 0x2b6d8c
leaq 0x1(%r15), %rcx
xorl %eax, %eax
leaq 0x123ce5(%rip), %rsi    # 0x3daa60
movzbl %dl, %edx
addb (%rdx,%rsi), %al
movb (%rcx), %dl
incq %rcx
testb %dl, %dl
jne 0x2b6d7b
jmp 0x2b6d8e
xorl %eax, %eax
movb %al, 0x1b(%r12)
movl 0x8(%r14), %r13d
testq %r13, %r13
je 0x2b6df2
movq %r15, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq (%r15,%rax), %rcx
movq %rcx, (%rsp)
addq %rax, %r15
incq %r15
movq (%r14), %rsi
movq %r15, %rdi
movq %r13, %rdx
callq 0x17660
movl 0x8(%r14), %eax
movq (%rsp), %rcx
movb $0x0, 0x1(%rax,%rcx)
movq %r15, %rdi
callq 0x2d30c7
movq %r15, %rdi
movq %r12, %rsi
callq 0x2c7b4e
movb %al, 0x19(%r12)
orb $0x4, 0x1c(%r12)
jmp 0x2b6dfa
movw $0x141, 0x19(%r12)      # imm = 0x141
incw 0x46(%rbp)
incw 0x48(%rbp)
movl $0x0, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq