// File: /workspace/github_c_makefile_star2_O1/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 %edx, %ebp
movq %rdi, %r14
testq %rsi, %rsi
je 0x2c98be
testl %ecx, %ecx
js 0x2c98ad
movq %rsi, %r15
movswl 0x44(%rsi), %eax
cmpl %ecx, %eax
jne 0x2c98de
movq %r14, %rdi
movl $0x7f, %esi
movl %ebp, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
jmp 0x2c98cb
movq %r14, %rdi
movl $0x59, %esi
movl %ebp, %edx
movl %ebx, %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2b200c
movl $0xa6, %esi
cmpl $0x0, 0x54(%r15)
movl %ecx, %r13d
je 0x2c992e
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %r8d
callq 0x2b200c
cmpq $0x0, 0x18(%r15)
je 0x2c9967
movq 0x8(%r15), %rax
shlq $0x5, %r13
cmpb $0x45, 0x19(%rax,%r13)
jne 0x2c9a05
cmpl $0x0, 0x54(%r15)
jne 0x2c9a05
movq %r14, %rdi
movl $0x53, %esi
movl %ebx, %edx
xorl %ecx, %ecx
jmp 0x2c98b9
movq 0x8(%r15), %r12
movq %r13, %rdx
shlq $0x5, %rdx
movzwl 0x1c(%r12,%rdx), %eax
testb $0x20, %al
jne 0x2c99cc
testb $-0x80, 0x40(%r15)
jne 0x2c9a14
movswl %cx, %esi
movq %r15, %rdi
callq 0x2c77b7
movswl %ax, %ecx
movl $0x59, %esi
jmp 0x2c98ed
movq $0x0, (%rsp)
movq 0x8(%r15), %rax
movq %r13, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rsi
testq %rsi, %rsi
je 0x2c999a
addq %rcx, %rax
movzbl 0x19(%rax), %ecx
movq (%r14), %rdi
movzbl 0x5e(%rdi), %edx
movq %rsp, %r8
callq 0x2c9ac1
movq (%rsp), %rsi
testq %rsi, %rsi
je 0x2c9901
movq (%r14), %rdi
cmpb $0x0, 0x61(%rdi)
je 0x2c9a89
cmpq $0x0, 0x2d0(%rdi)
je 0x2c9aaa
callq 0x2999c0
jmp 0x2c9901
addq %rdx, %r12
movq 0x18(%r14), %r14
btl $0x8, %eax
jb 0x2c9a30
movl 0x40(%r14), %r15d
orl $0x100, %eax            # imm = 0x100
movw %ax, 0x1c(%r12)
incl %ebp
movl %ebp, 0x40(%r14)
movq %r14, %rdi
movq %r12, %rsi
movl %ebx, %edx
callq 0x2c7815
movl %r15d, 0x40(%r14)
andb $-0x2, 0x1d(%r12)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x2c9a53
movzwl 0x63(%rax), %edx
andl $0x3, %edx
cmpw $0x2, %dx
je 0x2c9a53
movq 0x28(%rax), %rax
jmp 0x2c9a18
movq (%r12), %rdx
leaq 0x117276(%rip), %rsi    # 0x3e0cb1
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x284eb8
movzwl 0x60(%rax), %edx
movl $0x59, %esi
testq %rdx, %rdx
je 0x2c9a7f
movq 0x8(%rax), %rax
shll $0x10, %edx
xorl %edi, %edi
cmpw %cx, (%rax)
je 0x2c9ab7
addq $0x10000, %rdi          # imm = 0x10000
addq $0x2, %rax
cmpq %rdi, %rdx
jne 0x2c9a6a
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
jmp 0x2c98ed
movq 0x88(%r14), %rax
movslq 0x90(%r14), %rcx
leaq (%rcx,%rcx,2), %rcx
movb $-0xb, -0x17(%rax,%rcx,8)
movq %rsi, -0x8(%rax,%rcx,8)
jmp 0x2c9901
movq %rsi, %rdi
callq 0x281de6
jmp 0x2c9901
sarl $0x10, %edi
movl %edi, %ecx
jmp 0x2c98ed