// File: /workspace/github_c_makefile_star2_O1/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 0x39def
movq %rdi, %r15
movq (%rdi), %rdi
movswl 0x42(%r12), %eax
cmpl %eax, 0x70(%rdi)
jle 0x39d5b
movq %rdi, -0x30(%rbp)
callq 0x45df3
testq %rax, %rax
je 0x39def
movq %rax, %rbx
movswl 0x42(%r12), %eax
movq %rax, -0x38(%rbp)
testl %eax, %eax
jle 0x39d23
movzbl (%rbx), %edx
leaq 0x3c3b0(%rip), %rcx     # 0x76060
movb (%rdx,%rcx), %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,%rcx), %dl
jne 0x39d1b
incq %r10
movb 0x1(%rbx), %r11b
testb %r11b, %r11b
je 0x39d0a
movq %r8, %r13
movzbl %r11b, %eax
movb (%rax,%rcx), %al
movzbl (%r10), %r14d
cmpb (%r14,%rcx), %al
jne 0x39d0a
incq %r10
movb (%r13), %r11b
incq %r13
testb %r11b, %r11b
jne 0x39cea
movzbl %r11b, %eax
movb (%rax,%rcx), %al
movzbl (%r10), %r10d
cmpb (%r10,%rcx), %al
je 0x39d7e
incq %r9
cmpq %rdi, %r9
jne 0x39cc5
movq -0x38(%rbp), %rax
testb $0x7, %al
jne 0x39dbc
movq 0x8(%r12), %rsi
leal (%rax,%rax,2), %edx
shll $0x4, %edx
addl $0x180, %edx            # imm = 0x180
movq -0x30(%rbp), %r14
movq %r14, %rdi
callq 0x174d4
movq %rax, %r15
testq %rax, %rax
je 0x39dac
movq %r15, 0x8(%r12)
jmp 0x39db7
movq (%r12), %rdx
leaq 0x41615(%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 0x11724
leaq 0x4160d(%rip), %rsi     # 0x7b392
movq %r15, %rdi
movq %rbx, %rdx
xorl %eax, %eax
callq 0x11724
movq -0x30(%rbp), %rdi
movq %rbx, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x9c3a
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9c3a
testq %r15, %r15
je 0x39def
movq 0x8(%r12), %rax
movswq 0x42(%r12), %rcx
leaq (%rcx,%rcx,2), %rcx
shlq $0x4, %rcx
xorps %xmm0, %xmm0
movups %xmm0, (%rax,%rcx)
movups %xmm0, 0x20(%rax,%rcx)
movups %xmm0, 0x10(%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