// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x420b55
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x4c(%rbp)
jmp 0x420b5c
xorl %eax, %eax
movl %eax, -0x4c(%rbp)
jmp 0x420b5c
movl -0x4c(%rbp), %eax
movl %eax, -0x34(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x420b6e
jmp 0x420ce0
cmpq $0x0, -0x20(%rbp)
jne 0x420b7a
jmp 0x420ce0
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x88, %eax
je 0x420bc8
movq -0x18(%rbp), %rax
movl 0x8(%rax), %eax
movl %eax, -0x50(%rbp)
movq -0x20(%rbp), %rdi
callq 0x42d4d0
movl %eax, %ecx
movl -0x50(%rbp), %eax
movl %ecx, -0x2c(%rbp)
cmpl %ecx, %eax
je 0x420bc8
movq -0x8(%rbp), %rdi
movq -0x18(%rbp), %rax
movl 0x8(%rax), %edx
movl -0x2c(%rbp), %ecx
leaq 0x18be89(%rip), %rsi    # 0x5aca45
movb $0x0, %al
callq 0x3cb660
jmp 0x420ce0
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
movq -0x18(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x420c83
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x30(%rbp), %edx
callq 0x44feb0
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x420bfc
jmp 0x420c75
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x40(%rbp), %rax
movl %ecx, 0x2c(%rax)
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x40(%rbp), %rdx
callq 0x41d3c0
movq %rax, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
je 0x420c73
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq (%rax), %rcx
movq -0x10(%rbp), %rax
addq $0x8, %rax
movq -0x10(%rbp), %rdx
movl (%rdx), %edx
subl $0x1, %edx
movslq %edx, %rdx
imulq $0x18, %rdx, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
movq (%rax), %rax
movslq -0x30(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq $0x0, (%rax)
jmp 0x420c75
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x420bcf
movq -0x28(%rbp), %rax
cmpb $0x0, 0x61(%rax)
jne 0x420cde
movq -0x20(%rbp), %rax
movzbl (%rax), %eax
cmpl $0x88, %eax
jne 0x420cde
cmpq $0x0, -0x10(%rbp)
je 0x420cde
movq -0x10(%rbp), %rax
addq $0x8, %rax
movslq -0x34(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rax
movq %rax, -0x48(%rbp)
movq -0x20(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, 0x18(%rax)
movq $0x0, -0x20(%rbp)
movq -0x18(%rbp), %rax
movl 0x8(%rax), %ecx
movq -0x48(%rbp), %rax
movl %ecx, 0x2c(%rax)
jmp 0x420ce0
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0x422b30
movq -0x28(%rbp), %rdi
movq -0x18(%rbp), %rsi
callq 0x40cbd0
movq -0x10(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)