// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3ExprCodeGetColumnOfTable
SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(
  Vdbe *v,        /* Parsing context */
  Table *pTab,    /* The table containing the value */
  int iTabCur,    /* The table cursor.  Or the PK cursor for WITHOUT ROWID */
  int iCol,       /* Index of the column to extract */
  int regOut      /* Extract the value into this register */
){
  Column *pCol;
  assert( v!=0 );
  if( pTab==0 ){
    sqlite3VdbeAddOp3(v, OP_Column, iTabCur, iCol, regOut);
    return;
  }
  if( iCol<0 || iCol==pTab->iPKey ){
    sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut);
  }else{
    int op;
    int x;
    if( IsVirtual(pTab) ){
      op = OP_VColumn;
      x = iCol;
#ifndef SQLITE_OMIT_GENERATED_COLUMNS
    }else if( (pCol = &pTab->aCol[iCol])->colFlags & COLFLAG_VIRTUAL ){
      Parse *pParse = sqlite3VdbeParser(v);
      if( pCol->colFlags & COLFLAG_BUSY ){
        sqlite3ErrorMsg(pParse, "generated column loop on \"%s\"", pCol->zName);
      }else{
        int savedSelfTab = pParse->iSelfTab;
        pCol->colFlags |= COLFLAG_BUSY;
        pParse->iSelfTab = iTabCur+1;
        sqlite3ExprCodeGeneratedColumn(pParse, pCol, regOut);
        pParse->iSelfTab = savedSelfTab;
        pCol->colFlags &= ~COLFLAG_BUSY;
      }
      return;
#endif
    }else if( !HasRowid(pTab) ){
      testcase( iCol!=sqlite3TableColumnToStorage(pTab, iCol) );
      x = sqlite3TableColumnToIndex(sqlite3PrimaryKeyIndex(pTab), iCol);
      op = OP_Column;
    }else{
      x = sqlite3TableColumnToStorage(pTab,iCol);
      testcase( x!=iCol );
      op = OP_Column;
    }
    sqlite3VdbeAddOp3(v, op, iTabCur, x, regOut);
    sqlite3ColumnDefault(v, pTab, iCol, regOut);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %r8d, -0x1c(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x42e64e
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movl -0x1c(%rbp), %r8d
movl $0x59, %esi
callq 0x410130
jmp 0x42e7cc
cmpl $0x0, -0x18(%rbp)
jl 0x42e663
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movswl 0x44(%rcx), %ecx
cmpl %ecx, %eax
jne 0x42e67c
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x1c(%rbp), %ecx
movl $0x7f, %esi
callq 0x410100
jmp 0x42e7cc
movq -0x10(%rbp), %rax
cmpl $0x0, 0x54(%rax)
je 0x42e698
movl $0xa6, -0x2c(%rbp)
movl -0x18(%rbp), %eax
movl %eax, -0x30(%rbp)
jmp 0x42e7a3
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0x28(%rbp)
movzwl 0x1c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x42e750
movq -0x8(%rbp), %rdi
callq 0x42e7e0
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x1c(%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x42e6f9
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rax
movq (%rax), %rdx
leaq 0x17e306(%rip), %rsi    # 0x5ac9f6
movb $0x0, %al
callq 0x3cb660
jmp 0x42e74e
movq -0x38(%rbp), %rax
movl 0x40(%rax), %eax
movl %eax, -0x3c(%rbp)
movq -0x28(%rbp), %rax
movzwl 0x1c(%rax), %ecx
orl $0x100, %ecx            # imm = 0x100
movw %cx, 0x1c(%rax)
movl -0x14(%rbp), %ecx
addl $0x1, %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x38(%rbp), %rdi
movq -0x28(%rbp), %rsi
movl -0x1c(%rbp), %edx
callq 0x42bbb0
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, 0x40(%rax)
movq -0x28(%rbp), %rax
movzwl 0x1c(%rax), %ecx
andl $0xfffffeff, %ecx       # imm = 0xFFFFFEFF
movw %cx, 0x1c(%rax)
jmp 0x42e7cc
movq -0x10(%rbp), %rax
movl 0x40(%rax), %eax
andl $0x80, %eax
cmpl $0x0, %eax
je 0x42e785
movq -0x10(%rbp), %rdi
callq 0x3cef20
movq %rax, %rdi
movl -0x18(%rbp), %eax
movswl %ax, %esi
callq 0x42e800
cwtl
movl %eax, -0x30(%rbp)
movl $0x59, -0x2c(%rbp)
jmp 0x42e79f
movq -0x10(%rbp), %rdi
movl -0x18(%rbp), %eax
movswl %ax, %esi
callq 0x42bae0
cwtl
movl %eax, -0x30(%rbp)
movl $0x59, -0x2c(%rbp)
jmp 0x42e7a1
jmp 0x42e7a3
movq -0x8(%rbp), %rdi
movl -0x2c(%rbp), %esi
movl -0x14(%rbp), %edx
movl -0x30(%rbp), %ecx
movl -0x1c(%rbp), %r8d
callq 0x410130
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl -0x18(%rbp), %edx
movl -0x1c(%rbp), %ecx
callq 0x42e860
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)