// File: /workspace/github_c_makefile_star2_O1/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 0x2be5c5
movslq (%r14), %rsi
jmp 0x2be5c7
xorl %esi, %esi
movq (%r12), %r13
testq %rbx, %rbx
sete %al
testq %r15, %r15
sete %cl
orb %al, %cl
jne 0x2be6ca
movb (%r15), %al
cmpb $-0x78, %al
je 0x2be619
cmpb $-0x53, %al
jne 0x2be5ee
movb 0x2(%r15), %al
movl 0x8(%rbx), %edx
movq %r15, %rcx
cmpb $-0x52, %al
je 0x2be60b
movzbl %al, %eax
movl $0x1, %ecx
cmpl $0x88, %eax
jne 0x2be611
movq 0x20(%r15), %rcx
movq 0x20(%rcx), %rax
movl (%rax), %ecx
cmpl %ecx, %edx
jne 0x2be6b9
movl 0x8(%rbx), %eax
testl %eax, %eax
jle 0x2be692
movq %rsi, 0x8(%rsp)
movq %r13, 0x10(%rsp)
xorl %r13d, %r13d
xorl %ebp, %ebp
movq %r12, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0x2e2de6
testq %rax, %rax
je 0x2be678
movl 0x8(%rbx), %ecx
movl %ecx, 0x2c(%rax)
movq %r12, %rdi
movq %r14, %rsi
movq %rax, %rdx
callq 0x2bb1a3
movq %rax, %r14
testq %rax, %rax
je 0x2be678
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)
incq %rbp
movslq 0x8(%rbx), %rax
addq $0x10, %r13
cmpq %rax, %rbp
jl 0x2be62f
movq 0x10(%rsp), %r13
movq 0x8(%rsp), %rsi
cmpb $0x0, 0x61(%r13)
jne 0x2be6ca
cmpb $-0x78, (%r15)
jne 0x2be6ca
testq %r14, %r14
je 0x2be6ca
leaq (%rsi,%rsi,2), %rcx
movq 0x8(%r14,%rcx,8), %rcx
movq %r15, 0x18(%rcx)
movl %eax, 0x2c(%rcx)
xorl %r15d, %r15d
jmp 0x2be6ca
leaq 0x122640(%rip), %rsi    # 0x3e0d00
movq %r12, %rdi
xorl %eax, %eax
callq 0x284eb8
movq %r12, %rdi
movq %r15, %rsi
callq 0x2c03d4
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2b0119
movq %r14, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq