// File: /workspace/github_c_makefile_star2_O0/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: sqlite3IndexAffinityStr
SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(sqlite3 *db, Index *pIdx){
  if( !pIdx->zColAff ){
    /* The first time a column affinity string for a particular index is
    ** required, it is allocated and populated here. It is then stored as
    ** a member of the Index structure for subsequent use.
    **
    ** The column affinity string will eventually be deleted by
    ** sqliteDeleteIndex() when the Index structure itself is cleaned
    ** up.
    */
    int n;
    Table *pTab = pIdx->pTable;
    pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+1);
    if( !pIdx->zColAff ){
      sqlite3OomFault(db);
      return 0;
    }
    for(n=0; n<pIdx->nColumn; n++){
      i16 x = pIdx->aiColumn[n];
      char aff;
      if( x>=0 ){
        aff = pTab->aCol[x].affinity;
      }else if( x==XN_ROWID ){
        aff = SQLITE_AFF_INTEGER;
      }else{
        assert( x==XN_EXPR );
        assert( pIdx->aColExpr!=0 );
        aff = sqlite3ExprAffinity(pIdx->aColExpr->a[n].pExpr);
      }
      if( aff<SQLITE_AFF_BLOB ) aff = SQLITE_AFF_BLOB;
      if( aff>SQLITE_AFF_NUMERIC) aff = SQLITE_AFF_NUMERIC;
      pIdx->zColAff[n] = aff;
    }
    pIdx->zColAff[n] = 0;
  }

  return pIdx->zColAff;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x43e02e
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rax
movq %rax, -0x28(%rbp)
movq -0x18(%rbp), %rax
movzwl 0x60(%rax), %eax
addl $0x1, %eax
movslq %eax, %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x3cd3a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
jne 0x43df5e
movq -0x10(%rbp), %rdi
callq 0x3c8ba0
movq $0x0, -0x8(%rbp)
jmp 0x43e03a
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movzwl 0x60(%rcx), %ecx
cmpl %ecx, %eax
jge 0x43e01e
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movslq -0x1c(%rbp), %rcx
movw (%rax,%rcx,2), %ax
movw %ax, -0x2a(%rbp)
movswl -0x2a(%rbp), %eax
cmpl $0x0, %eax
jl 0x43dfb1
movq -0x28(%rbp), %rax
movq 0x8(%rax), %rax
movswq -0x2a(%rbp), %rcx
shlq $0x5, %rcx
addq %rcx, %rax
movb 0x19(%rax), %al
movb %al, -0x2b(%rbp)
jmp 0x43dfe4
movswl -0x2a(%rbp), %eax
cmpl $-0x1, %eax
jne 0x43dfc0
movb $0x44, -0x2b(%rbp)
jmp 0x43dfe2
movq -0x18(%rbp), %rax
movq 0x50(%rax), %rax
addq $0x8, %rax
movslq -0x1c(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
callq 0x42f230
movb %al, -0x2b(%rbp)
jmp 0x43dfe4
movsbl -0x2b(%rbp), %eax
cmpl $0x41, %eax
jge 0x43dff1
movb $0x41, -0x2b(%rbp)
movsbl -0x2b(%rbp), %eax
cmpl $0x43, %eax
jle 0x43dffe
movb $0x43, -0x2b(%rbp)
movb -0x2b(%rbp), %dl
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movb %dl, (%rax,%rcx)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
jmp 0x43df65
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x1c(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)