// File: /workspace/github_c_makefile_star2_O3/barabo[P]advanced-shell-history/src/sqlite3.c
// Function: sqlite3AddColumn
SQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token *pName){
  Table *p;
  int i;
  char *z;
  Column *pCol;
  sqlite3 *db = pParse->db;
  if( (p = pParse->pNewTable)==0 ) return;
#if SQLITE_MAX_COLUMN
  if( p->nCol+1>db->aLimit[SQLITE_LIMIT_COLUMN] ){
    sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
    return;
  }
#endif
  z = sqlite3NameFromToken(db, pName);
  if( z==0 ) return;
  for(i=0; i<p->nCol; i++){
    if( STRICMP(z, p->aCol[i].zName) ){
      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;
 
  /* If there is no type specified, columns have the default affinity
  ** 'NONE'. If there is a type specified, then sqlite3AddColumnType() will
  ** be called next to set pCol->affinity correctly.
  */
  pCol->affinity = SQLITE_AFF_NONE;
  p->nCol++;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x238(%rdi), %r12
testq %r12, %r12
je 0x3a459
movq %rdi, %r15
movq (%rdi), %rdi
movswl 0x42(%r12), %eax
cmpl %eax, 0x70(%rdi)
jle 0x3a468
movq %rdi, -0x30(%rbp)
callq 0x46169
testq %rax, %rax
je 0x3a459
movq %rax, %rbx
movswl 0x42(%r12), %eax
movq %rax, -0x38(%rbp)
testl %eax, %eax
jle 0x3a3eb
movzbl (%rbx), %edx
leaq 0x3bd3e(%rip), %rax     # 0x760b0
movb (%rdx,%rax), %dl
movq 0x8(%r12), %rsi
movl -0x38(%rbp), %edi
movq %rbx, %r8
addq $0x2, %r8
xorl %r9d, %r9d
leaq (%r9,%r9,2), %r10
shlq $0x4, %r10
movq (%rsi,%r10), %r10
movzbl (%r10), %r11d
cmpb (%r11,%rax), %dl
jne 0x3a3e3
incq %r10
movb 0x1(%rbx), %r13b
testb %r13b, %r13b
je 0x3a3cd
movq %r8, %r11
movzbl %r13b, %r13d
movb (%r13,%rax), %cl
movzbl (%r10), %r14d
cmpb (%r14,%rax), %cl
jne 0x3a3d0
incq %r10
movb (%r11), %r13b
incq %r11
testb %r13b, %r13b
jne 0x3a3ac
xorl %r13d, %r13d
movb (%r13,%rax), %cl
movzbl (%r10), %r10d
cmpb (%r10,%rax), %cl
je 0x3a48b
incq %r9
cmpq %rdi, %r9
jne 0x3a387
movq 0x8(%r12), %rax
movq -0x38(%rbp), %rcx
testb $0x7, %cl
jne 0x3a428
leal (%rcx,%rcx,2), %edx
shll $0x4, %edx
addl $0x180, %edx            # imm = 0x180
movq -0x30(%rbp), %r14
movq %r14, %rdi
movq %rax, %rsi
callq 0x174d6
testq %rax, %rax
je 0x3a4a5
movq %rax, 0x8(%r12)
movzwl 0x42(%r12), %ecx
movswq %cx, %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rax,%rcx)
movups %xmm0, 0x8(%rax,%rcx)
movq $0x0, 0x28(%rax,%rcx)
movq %rbx, (%rax,%rcx)
movb $0x62, 0x29(%rax,%rcx)
incw 0x42(%r12)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq (%r12), %rdx
leaq 0x40f08(%rip), %rsi     # 0x7b37b
movq %r15, %rdi
xorl %eax, %eax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x11842
leaq 0x40f00(%rip), %rsi     # 0x7b392
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x11842
movq -0x30(%rbp), %rdi
jmp 0x3a4a8
movq %r14, %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9ca4