// File: /workspace/github_c_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movl %ecx, %r12d
movl %edx, %ebp
movq %rdi, %r14
testq %rsi, %rsi
je 0x2676e4
testl %r12d, %r12d
js 0x2676c7
movq %rsi, %r15
movswl 0x44(%rsi), %eax
cmpl %r12d, %eax
jne 0x267705
pushq $0x7f
popq %rsi
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24d51a
pushq $0x59
popq %rsi
movq %r14, %rdi
movl %ebp, %edx
movl %r12d, %ecx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x24d51f
movl $0xa6, %esi
cmpl $0x0, 0x54(%r15)
movl %r12d, %r13d
jne 0x26779f
movq 0x8(%r15), %rdx
movq %r13, %rcx
shlq $0x5, %rcx
movzwl 0x1c(%rdx,%rcx), %eax
testb $0x20, %al
jne 0x267741
testb $-0x80, 0x40(%r15)
jne 0x267784
movswl %r12w, %esi
movq %r15, %rdi
callq 0x265d66
jmp 0x267798
addq %rcx, %rdx
movq 0x18(%r14), %r14
btl $0x8, %eax
jb 0x267837
movl 0x40(%r14), %r15d
orl $0x100, %eax            # imm = 0x100
movw %ax, 0x1c(%rdx)
incl %ebp
movl %ebp, 0x40(%r14)
movq %r14, %rdi
movq %rdx, %r12
movq %rdx, %rsi
movl %ebx, %edx
callq 0x265db8
movl %r15d, 0x40(%r14)
andb $-0x2, 0x1d(%r12)
jmp 0x26780d
movq %r15, %rdi
callq 0x2293af
movswl %r12w, %esi
movq %rax, %rdi
callq 0x267859
movswl %ax, %r12d
pushq $0x59
popq %rsi
movq %r14, %rdi
movl %ebp, %edx
movl %r12d, %ecx
movl %ebx, %r8d
callq 0x24d51f
cmpq $0x0, 0x18(%r15)
jne 0x2677f6
movq %rsp, %r12
andq $0x0, (%r12)
movq (%r14), %rdi
movzbl 0x5e(%rdi), %edx
movq 0x8(%r15), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rsi
movzbl 0x19(%rax,%rcx), %ecx
movq %r12, %r8
callq 0x267878
movq (%r12), %rsi
testq %rsi, %rsi
je 0x2677f6
pushq $-0xb
popq %rdx
movq %r14, %rdi
callq 0x26495f
movq 0x8(%r15), %rax
shlq $0x5, %r13
cmpb $0x45, 0x19(%rax,%r13)
jne 0x26780d
cmpl $0x0, 0x54(%r15)
je 0x26781c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x53
popq %rsi
movq %r14, %rdi
movl %ebx, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x265d5c
movq (%rdx), %rdx
leaq 0x11013b(%rip), %rsi    # 0x37797c
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x226dce