// File: /workspace/github_c_makefile_star2_O3/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprListAppendVector
SQLITE_PRIVATE ExprList *sqlite3ExprListAppendVector(
  Parse *pParse,         /* Parsing context */
  ExprList *pList,       /* List to which to append. Might be NULL */
  IdList *pColumns,      /* List of names of LHS of the assignment */
  Expr *pExpr            /* Vector expression to be appended. Might be NULL */
){
  sqlite3 *db = pParse->db;
  int n;
  int i;
  int iFirst = pList ? pList->nExpr : 0;
  /* pColumns can only be NULL due to an OOM but an OOM will cause an
  ** exit prior to this routine being invoked */
  if( NEVER(pColumns==0) ) goto vector_append_error;
  if( pExpr==0 ) goto vector_append_error;

  /* If the RHS is a vector, then we can immediately check to see that
  ** the size of the RHS and LHS match.  But if the RHS is a SELECT,
  ** wildcards ("*") in the result set of the SELECT must be expanded before
  ** we can do the size check, so defer the size check until code generation.
  */
  if( pExpr->op!=TK_SELECT && pColumns->nId!=(n=sqlite3ExprVectorSize(pExpr)) ){
    sqlite3ErrorMsg(pParse, "%d columns assigned %d values",
                    pColumns->nId, n);
    goto vector_append_error;
  }

  for(i=0; i<pColumns->nId; i++){
    Expr *pSubExpr = sqlite3ExprForVectorField(pParse, pExpr, i);
    assert( pSubExpr!=0 || db->mallocFailed );
    assert( pSubExpr==0 || pSubExpr->iTable==0 );
    if( pSubExpr==0 ) continue;
    pSubExpr->iTable = pColumns->nId;
    pList = sqlite3ExprListAppend(pParse, pList, pSubExpr);
    if( pList ){
      assert( pList->nExpr==iFirst+i+1 );
      pList->a[pList->nExpr-1].zEName = pColumns->a[i].zName;
      pColumns->a[i].zName = 0;
    }
  }

  if( !db->mallocFailed && pExpr->op==TK_SELECT && ALWAYS(pList!=0) ){
    Expr *pFirst = pList->a[iFirst].pExpr;
    assert( pFirst!=0 );
    assert( pFirst->op==TK_SELECT_COLUMN );

    /* Store the SELECT statement in pRight so it will be deleted when
    ** sqlite3ExprListDelete() is called */
    pFirst->pRight = pExpr;
    pExpr = 0;

    /* Remember the size of the LHS in iTable so that we can check that
    ** the RHS and LHS sizes match during code generation. */
    pFirst->iTable = pColumns->nId;
  }

vector_append_error:
  sqlite3ExprUnmapAndDelete(pParse, pExpr);
  sqlite3IdListDelete(db, pColumns);
  return pList;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %r15
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r12
testq %rsi, %rsi
je 0x2b4e41
movslq (%r14), %rsi
jmp 0x2b4e43
xorl %esi, %esi
movq (%r12), %r13
testq %rbx, %rbx
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x2b4f50
movzbl (%r15), %eax
movl 0x8(%rbx), %edx
cmpl $0x88, %eax
je 0x2b4e9c
cmpl $0xad, %eax
jne 0x2b4e74
movb 0x2(%r15), %al
movq %r15, %rcx
cmpb $-0x52, %al
je 0x2b4e8e
movzbl %al, %eax
movl $0x1, %ecx
cmpl $0x88, %eax
jne 0x2b4e94
movq 0x20(%r15), %rcx
movq 0x20(%rcx), %rax
movl (%rax), %ecx
cmpl %ecx, %edx
jne 0x2b4f3f
testl %edx, %edx
jle 0x2b4f18
movq %rsi, 0x8(%rsp)
movq %r13, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2d999f
testq %rax, %rax
je 0x2b4efe
movl 0x8(%rbx), %ecx
movl %ecx, 0x2c(%rax)
movq (%r12), %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2b1a3f
testq %rax, %rax
je 0x2b4efb
movq %rax, %r14
movq (%rbx), %rax
movq (%rax,%r13), %rcx
movslq (%r14), %rdx
leaq (%rdx,%rdx,2), %rdx
movq %rcx, -0x8(%r14,%rdx,8)
movq $0x0, (%rax,%r13)
jmp 0x2b4efe
xorl %r14d, %r14d
incq %rbp
movslq 0x8(%rbx), %rdx
addq $0x10, %r13
cmpq %rdx, %rbp
jl 0x2b4eaf
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rsi
cmpb $0x0, 0x61(%r13)
jne 0x2b4f50
cmpb $-0x78, (%r15)
jne 0x2b4f50
testq %r14, %r14
je 0x2b4f50
leaq (%rsi,%rsi,2), %rax
movq 0x8(%r14,%rax,8), %rax
movq %r15, 0x18(%rax)
movl %edx, 0x2c(%rax)
xorl %r15d, %r15d
jmp 0x2b4f50
leaq 0x122665(%rip), %rsi    # 0x3d75ab
movq %r12, %rdi
xorl %eax, %eax
callq 0x27b48d
movq %r12, %rdi
movq %r15, %rsi
callq 0x2b6bf2
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2a6536
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq