// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3TableAffinity
SQLITE_PRIVATE void sqlite3TableAffinity(Vdbe *v, Table *pTab, int iReg){
  int i, j;
  char *zColAff = pTab->zColAff;
  if( zColAff==0 ){
    sqlite3 *db = sqlite3VdbeDb(v);
    zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
    if( !zColAff ){
      sqlite3OomFault(db);
      return;
    }

    for(i=j=0; i<pTab->nCol; i++){
      assert( pTab->aCol[i].affinity!=0 );
      if( (pTab->aCol[i].colFlags & COLFLAG_VIRTUAL)==0 ){
        zColAff[j++] = pTab->aCol[i].affinity;
      }
    }
    do{
      zColAff[j--] = 0;
    }while( j>=0 && zColAff[j]<=SQLITE_AFF_BLOB );
    pTab->zColAff = zColAff;
  }
  assert( zColAff!=0 );
  i = sqlite3Strlen30NN(zColAff);
  if( i ){
    if( iReg ){
      sqlite3VdbeAddOp4(v, OP_Affinity, iReg, i, 0, zColAff, i);
    }else{
      sqlite3VdbeChangeP4(v, -1, zColAff, i);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x434a96
movq -0x8(%rbp), %rdi
callq 0x411fc0
movq %rax, -0x30(%rbp)
movq -0x10(%rbp), %rax
movswl 0x46(%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x3cd3a0
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x4349d7
movq -0x30(%rbp), %rdi
callq 0x3c8ba0
jmp 0x434aee
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq -0x10(%rbp), %rcx
movswl 0x46(%rcx), %ecx
cmpl %ecx, %eax
jge 0x434a4b
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movzwl 0x1c(%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
jne 0x434a3e
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x18(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movb 0x19(%rax), %dl
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %esi
addl $0x1, %esi
movl %esi, -0x1c(%rbp)
movslq %ecx, %rcx
movb %dl, (%rax,%rcx)
jmp 0x434a40
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4349e5
jmp 0x434a4d
movq -0x28(%rbp), %rax
movl -0x1c(%rbp), %ecx
movl %ecx, %edx
addl $-0x1, %edx
movl %edx, -0x1c(%rbp)
movslq %ecx, %rcx
movb $0x0, (%rax,%rcx)
xorl %eax, %eax
cmpl $0x0, -0x1c(%rbp)
movb %al, -0x31(%rbp)
jl 0x434a83
movq -0x28(%rbp), %rax
movslq -0x1c(%rbp), %rcx
movsbl (%rax,%rcx), %eax
cmpl $0x41, %eax
setle %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x434a4d
movq -0x28(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x28(%rbp), %rdi
callq 0x192b0
andq $0x3fffffff, %rax       # imm = 0x3FFFFFFF
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x434aee
cmpl $0x0, -0x14(%rbp)
je 0x434ad7
movq -0x8(%rbp), %rdi
movl -0x14(%rbp), %edx
movl -0x18(%rbp), %ecx
movq -0x28(%rbp), %r9
movl -0x18(%rbp), %eax
movl $0x5a, %esi
xorl %r8d, %r8d
movl %eax, (%rsp)
callq 0x429aa0
jmp 0x434aec
movq -0x8(%rbp), %rdi
movq -0x28(%rbp), %rdx
movl -0x18(%rbp), %ecx
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0x3cbc30
jmp 0x434aee
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)