// File: /workspace/github_c_makefile_star2_O2/shifengbin[P]bishe/Output/../Persistence/sqlite3.c
// Function: generateColumnNames
static void generateColumnNames(
  Parse *pParse,      /* Parser context */
  SrcList *pTabList,  /* List of tables */
  ExprList *pEList    /* Expressions defining the result set */
){
  Vdbe *v = pParse->pVdbe;
  int i, j;
  sqlite3 *db = pParse->db;
  int fullNames, shortNames;

#ifndef SQLITE_OMIT_EXPLAIN
  /* If this is an EXPLAIN, skip this step */
  if( pParse->explain ){
    return;
  }
#endif

  if( pParse->colNamesSet || db->mallocFailed ) return;
  assert( v!=0 );
  assert( pTabList!=0 );
  pParse->colNamesSet = 1;
  fullNames = (db->flags & SQLITE_FullColNames)!=0;
  shortNames = (db->flags & SQLITE_ShortColNames)!=0;
  sqlite3VdbeSetNumCols(v, pEList->nExpr);
  for(i=0; i<pEList->nExpr; i++){
    Expr *p;
    p = pEList->a[i].pExpr;
    if( NEVER(p==0) ) continue;
    if( pEList->a[i].zName ){
      char *zName = pEList->a[i].zName;
      sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);
    }else if( p->op==TK_COLUMN || p->op==TK_AGG_COLUMN ){
      Table *pTab;
      char *zCol;
      int iCol = p->iColumn;
      for(j=0; ALWAYS(j<pTabList->nSrc); j++){
        if( pTabList->a[j].iCursor==p->iTable ) break;
      }
      assert( j<pTabList->nSrc );
      pTab = pTabList->a[j].pTab;
      if( iCol<0 ) iCol = pTab->iPKey;
      assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
      if( iCol<0 ){
        zCol = "rowid";
      }else{
        zCol = pTab->aCol[iCol].zName;
      }
      if( !shortNames && !fullNames ){
        sqlite3VdbeSetColName(v, i, COLNAME_NAME, 
            sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);
      }else if( fullNames ){
        char *zName = 0;
        zName = sqlite3MPrintf(db, "%s.%s", pTab->zName, zCol);
        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);
      }else{
        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zCol, SQLITE_TRANSIENT);
      }
    }else{
      const char *z = pEList->a[i].zSpan;
      z = z==0 ? sqlite3MPrintf(db, "column%d", i+1) : sqlite3DbStrDup(db, z);
      sqlite3VdbeSetColName(v, i, COLNAME_NAME, z, SQLITE_DYNAMIC);
    }
  }
  generateColumnTypes(pParse, pTabList, pEList);
}

// Assembly:
cmpb $0x0, 0x1ed(%rdi)
je 0x57646
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movq %rdi, %r14
cmpb $0x0, 0x1c(%rdi)
jne 0x57669
movq (%r14), %rax
cmpb $0x0, 0x51(%rax)
je 0x57678
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rdx, %rbx
movq %rsi, %r15
movq 0x10(%r14), %r13
movb $0x1, 0x1c(%r14)
movq %rax, -0x30(%rbp)
movl 0x2c(%rax), %eax
movl %eax, -0x34(%rbp)
movl (%rdx), %esi
movq %r13, %rdi
callq 0x39091
leaq 0x8(%r15), %rax
movq %rax, -0x48(%rbp)
leaq 0x4c(%r15), %rax
movq %rax, -0x40(%rbp)
xorl %r12d, %r12d
movslq (%rbx), %rax
cmpq %rax, %r12
jge 0x577dc
movq 0x8(%rbx), %rax
movq %r12, %rdx
shlq $0x5, %rdx
movq (%rax,%rdx), %rdi
testq %rdi, %rdi
je 0x577d4
leaq (%rax,%rdx), %rsi
movq 0x8(%rsi), %rcx
testq %rcx, %rcx
je 0x576f0
movq %r13, %rdi
movl %r12d, %esi
xorl %edx, %edx
pushq $-0x1
popq %r8
jmp 0x577cf
movzbl (%rdi), %ecx
orl $0x2, %ecx
cmpl $0x9a, %ecx
jne 0x5772f
movzwl 0x30(%rdi), %esi
movl (%r15), %ecx
testl %ecx, %ecx
movl $0x0, %r8d
cmovlel %r8d, %ecx
movq -0x40(%rbp), %r9
xorl %r8d, %r8d
cmpq %r8, %rcx
je 0x57754
movl (%r9), %r10d
cmpl 0x2c(%rdi), %r10d
je 0x57751
incq %r8
addq $0x70, %r9
jmp 0x57718
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
jne 0x577b4
leal 0x1(%r12), %edx
movq -0x30(%rbp), %rdi
leaq 0x174b1(%rip), %rsi     # 0x6ebf9
xorl %eax, %eax
callq 0x13638
jmp 0x577bd
movq %r8, %rcx
imulq $0x70, %rcx, %rcx
movq -0x48(%rbp), %rdi
movq 0x20(%rdi,%rcx), %rdi
testw %si, %si
jns 0x57776
movzwl 0x3c(%rdi), %esi
leaq 0x155bf(%rip), %rcx     # 0x6cd30
testw %si, %si
js 0x57785
movzwl %si, %ecx
movq 0x8(%rdi), %rsi
imulq $0x30, %rcx, %rcx
movq (%rsi,%rcx), %rcx
movl -0x34(%rbp), %esi
testb $0x60, %sil
je 0x577af
testb $0x20, %sil
je 0x576df
movq (%rdi), %rdx
movq -0x30(%rbp), %rdi
leaq 0x14a33(%rip), %rsi     # 0x6c1d9
xorl %eax, %eax
callq 0x13638
jmp 0x577bd
movq 0x10(%rax,%rdx), %rsi
movq -0x30(%rbp), %rdi
callq 0x11f6d
movq %r13, %rdi
movl %r12d, %esi
xorl %edx, %edx
movq %rax, %rcx
leaq -0x4b4e3(%rip), %r8     # 0xc2ec
callq 0x3910e
incq %r12
jmp 0x576ae
movq 0x10(%r14), %r12
leaq -0x80(%rbp), %rcx
movq %r15, 0x8(%rcx)
movq %r14, (%rcx)
xorl %r14d, %r14d
pushq $-0x1
popq %r15
xorl %r13d, %r13d
cltq
cmpq %rax, %r13
jge 0x57669
movq 0x8(%rbx), %rax
movq (%rax,%r14), %rsi
leaq -0x80(%rbp), %rdi
xorl %edx, %edx
callq 0x5272e
movq %r12, %rdi
movl %r13d, %esi
pushq $0x1
popq %rdx
movq %rax, %rcx
movq %r15, %r8
callq 0x3910e
incq %r13
movl (%rbx), %eax
addq $0x20, %r14
jmp 0x577f5