// File: /workspace/github_c_makefile_star2_O0/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
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x38(%rbp)
movq -0x8(%rbp), %rax
movq 0x238(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
jne 0x50555
jmp 0x50709
movq -0x18(%rbp), %rax
movswl 0x42(%rax), %eax
addl $0x1, %eax
movq -0x38(%rbp), %rcx
cmpl 0x70(%rcx), %eax
jle 0x50587
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq 0x5f8fc(%rip), %rsi     # 0xafe77
movb $0x0, %al
callq 0x136f0
jmp 0x50709
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x5e840
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x505a4
jmp 0x50709
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x42(%rcx), %ecx
cmpl %ecx, %eax
jge 0x50660
movq -0x28(%rbp), %rax
movzbl (%rax), %eax
movl %eax, %ecx
leaq 0x5a572(%rip), %rax     # 0xaab40
movzbl (%rax,%rcx), %eax
movq -0x18(%rbp), %rcx
movq 0x8(%rcx), %rcx
movslq -0x1c(%rbp), %rdx
imulq $0x30, %rdx, %rdx
addq %rdx, %rcx
movq (%rcx), %rcx
movzbl (%rcx), %ecx
movl %ecx, %edx
leaq 0x5a54c(%rip), %rcx     # 0xaab40
movzbl (%rcx,%rdx), %ecx
cmpl %ecx, %eax
jne 0x50650
movq -0x28(%rbp), %rdi
addq $0x1, %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rsi
addq $0x1, %rsi
callq 0xc970
cmpl $0x0, %eax
jne 0x50650
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
leaq 0x5f857(%rip), %rsi     # 0xafe8e
movb $0x0, %al
callq 0x136f0
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9cd0
jmp 0x50709
jmp 0x50652
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x505ab
movq -0x18(%rbp), %rax
movswl 0x42(%rax), %eax
andl $0x7, %eax
cmpl $0x0, %eax
jne 0x506ba
movq -0x38(%rbp), %rdi
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rsi
movq -0x18(%rbp), %rax
movswl 0x42(%rax), %eax
addl $0x8, %eax
cltq
imulq $0x30, %rax, %rax
movl %eax, %edx
callq 0x1bee0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x506ae
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0x9cd0
jmp 0x50709
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x18(%rbp), %rcx
movswq 0x42(%rcx), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
xorl %esi, %esi
movl $0x30, %edx
callq 0x8200
movq -0x28(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movq -0x30(%rbp), %rax
movb $0x62, 0x29(%rax)
movq -0x18(%rbp), %rax
movw 0x42(%rax), %cx
addw $0x1, %cx
movw %cx, 0x42(%rax)
addq $0x40, %rsp
popq %rbp
retq
nop