// File: /workspace/github_c_makefile_star2_O3/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 0x2c014c
testl %r12d, %r12d
js 0x2c013b
movq %rsi, %r15
movswl 0x44(%rsi), %eax
cmpl %r12d, %eax
jne 0x2c016f
movq %r14, %rdi
movl $0x7f, %esi
movl %ebp, %edx
movl %ebx, %ecx
xorl %r8d, %r8d
jmp 0x2c015c
movq %r14, %rdi
movl $0x59, %esi
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 0x2a83e1
movl $0xa6, %esi
cmpl $0x0, 0x54(%r15)
movl %r12d, %ecx
je 0x2c01c2
movq %r14, %rdi
movl %ebp, %edx
movl %ebx, %r8d
callq 0x2a83e1
cmpq $0x0, 0x18(%r15)
je 0x2c01fc
movl %r12d, %r13d
movq 0x8(%r15), %rax
shlq $0x5, %r13
cmpb $0x45, 0x19(%rax,%r13)
jne 0x2c02a2
cmpl $0x0, 0x54(%r15)
jne 0x2c02a2
movq %r14, %rdi
movl $0x53, %esi
movl %ebx, %edx
xorl %ecx, %ecx
jmp 0x2c0147
movq 0x8(%r15), %r13
movl %r12d, %ecx
shlq $0x5, %rcx
movzwl 0x1c(%r13,%rcx), %eax
testb $0x20, %al
jne 0x2c026b
testb $-0x80, 0x40(%r15)
jne 0x2c02b1
movswl %r12w, %esi
movq %r15, %rdi
callq 0x2be097
movswl %ax, %ecx
movl $0x59, %esi
jmp 0x2c017e
movq $0x0, (%rsp)
movq 0x8(%r15), %rax
movl %r12d, %r13d
movq %r13, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rsi
testq %rsi, %rsi
je 0x2c0195
addq %rcx, %rax
movzbl 0x19(%rax), %ecx
movq (%r14), %rdi
movzbl 0x5e(%rdi), %edx
movq %rsp, %r12
movq %r12, %r8
callq 0x2c0365
movq (%r12), %rsi
testq %rsi, %rsi
je 0x2c0195
movq (%r14), %rdi
cmpb $0x0, 0x61(%rdi)
je 0x2c032d
cmpq $0x0, 0x2d0(%rdi)
je 0x2c0358
callq 0x28fc0c
jmp 0x2c0195
addq %rcx, %r13
movq 0x18(%r14), %r14
btl $0x8, %eax
jb 0x2c02cd
movl 0x40(%r14), %r15d
orl $0x100, %eax            # imm = 0x100
movw %ax, 0x1c(%r13)
incl %ebp
movl %ebp, 0x40(%r14)
movq %r14, %rdi
movq %r13, %rsi
movl %ebx, %edx
callq 0x2be0f0
movl %r15d, 0x40(%r14)
andb $-0x2, 0x1d(%r13)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%r15), %rax
testq %rax, %rax
je 0x2c02f0
movzwl 0x63(%rax), %ecx
andl $0x3, %ecx
cmpw $0x2, %cx
je 0x2c02f2
movq 0x28(%rax), %rax
jmp 0x2c02b5
movq (%r13), %rdx
leaq 0x117284(%rip), %rsi    # 0x3d755c
movq %r14, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x27b48d
xorl %eax, %eax
movzwl 0x60(%rax), %edx
movl $0x59, %esi
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
testq %rdx, %rdx
je 0x2c017e
movq 0x8(%rax), %rax
shll $0x10, %edx
xorl %edi, %edi
cmpw %r12w, (%rax)
je 0x2c034e
addq $0x10000, %rdi          # imm = 0x10000
addq $0x2, %rax
cmpq %rdi, %rdx
jne 0x2c0312
jmp 0x2c017e
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 0x2c0195
sarl $0x10, %edi
movl %edi, %ecx
jmp 0x2c017e
movq %rsi, %rdi
callq 0x278453
jmp 0x2c0195