// File: /workspace/github_c_makefile_star2_O1/genometools[P]genometools/src/external/sqlite-3.33.0/sqlite3.c
// Function: createTableStmt
static char *createTableStmt(sqlite3 *db, Table *p){
  int i, k, n;
  char *zStmt;
  char *zSep, *zSep2, *zEnd;
  Column *pCol;
  n = 0;
  for(pCol = p->aCol, i=0; i<p->nCol; i++, pCol++){
    n += identLength(pCol->zName) + 5;
  }
  n += identLength(p->zName);
  if( n<50 ){
    zSep = "";
    zSep2 = ",";
    zEnd = ")";
  }else{
    zSep = "\n  ";
    zSep2 = ",\n  ";
    zEnd = "\n)";
  }
  n += 35 + 6*p->nCol;
  zStmt = sqlite3DbMallocRaw(0, n);
  if( zStmt==0 ){
    sqlite3OomFault(db);
    return 0;
  }
  sqlite3_snprintf(n, zStmt, "CREATE TABLE ");
  k = sqlite3Strlen30(zStmt);
  identPut(zStmt, &k, p->zName);
  zStmt[k++] = '(';
  for(pCol=p->aCol, i=0; i<p->nCol; i++, pCol++){
    static const char * const azType[] = {
        /* SQLITE_AFF_BLOB    */ "",
        /* SQLITE_AFF_TEXT    */ " TEXT",
        /* SQLITE_AFF_NUMERIC */ " NUM",
        /* SQLITE_AFF_INTEGER */ " INT",
        /* SQLITE_AFF_REAL    */ " REAL"
    };
    int len;
    const char *zType;

    sqlite3_snprintf(n-k, &zStmt[k], zSep);
    k += sqlite3Strlen30(&zStmt[k]);
    zSep = zSep2;
    identPut(zStmt, &k, pCol->zName);
    assert( pCol->affinity-SQLITE_AFF_BLOB >= 0 );
    assert( pCol->affinity-SQLITE_AFF_BLOB < ArraySize(azType) );
    testcase( pCol->affinity==SQLITE_AFF_BLOB );
    testcase( pCol->affinity==SQLITE_AFF_TEXT );
    testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
    testcase( pCol->affinity==SQLITE_AFF_INTEGER );
    testcase( pCol->affinity==SQLITE_AFF_REAL );

    zType = azType[pCol->affinity - SQLITE_AFF_BLOB];
    len = sqlite3Strlen30(zType);
    assert( pCol->affinity==SQLITE_AFF_BLOB
            || pCol->affinity==sqlite3AffinityType(zType, 0) );
    memcpy(&zStmt[k], zType, len);
    k += len;
    assert( k<=n );
  }
  sqlite3_snprintf(n-k, &zStmt[k], "%s", zEnd);
  return zStmt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %rbx
movq %rdi, %r12
movswl 0x46(%rsi), %eax
testl %eax, %eax
jle 0x2cdb94
movq 0x8(%rbx), %rcx
xorl %edx, %edx
xorl %r13d, %r13d
movq (%rcx), %rdi
xorl %esi, %esi
movzbl (%rdi), %r8d
cmpl $0x22, %r8d
je 0x2cdb74
testl %r8d, %r8d
jne 0x2cdb76
jmp 0x2cdb7d
incl %esi
incl %esi
incq %rdi
jmp 0x2cdb63
addl %esi, %r13d
addl $0x7, %r13d
incl %edx
addq $0x20, %rcx
cmpl %eax, %edx
jne 0x2cdb5e
addl $0x2, %r13d
jmp 0x2cdb9a
movl $0x2, %r13d
movq (%rbx), %rdx
xorl %ecx, %ecx
movzbl (%rdx), %esi
cmpl $0x22, %esi
je 0x2cdbad
testl %esi, %esi
jne 0x2cdbaf
jmp 0x2cdbb6
incl %ecx
incl %ecx
incq %rdx
jmp 0x2cdb9f
addl %ecx, %r13d
cmpl $0x32, %r13d
leaq 0xdcad5(%rip), %rcx     # 0x3aa699
leaq 0x113c64(%rip), %rdx    # 0x3e182f
cmovlq %rcx, %rdx
movq %rdx, 0x20(%rsp)
leaq 0x113c5a(%rip), %rcx    # 0x3e1835
leaq 0x113c52(%rip), %r14    # 0x3e1834
cmovlq %rcx, %r14
leal (%rax,%rax,2), %eax
leal 0x23(%r13,%rax,2), %ebp
movslq %ebp, %rdi
callq 0x27c381
testq %rax, %rax
je 0x2cdd4c
movq %rax, %r15
movq %r14, 0x10(%rsp)
leaq 0x113c29(%rip), %rdx    # 0x3e1837
movl %ebp, %edi
movq %rax, %rsi
xorl %eax, %eax
callq 0x27e570
movq %r15, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
leaq 0x8(%rsp), %r12
movl %eax, (%r12)
movq (%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2d2fbd
movslq (%r12), %rax
leal 0x1(%rax), %ecx
movl %ecx, (%r12)
movb $0x28, (%r15,%rax)
cmpw $0x0, 0x46(%rbx)
movl %ebp, %edi
jle 0x2cdd27
cmpl $0x32, %r13d
movq 0x8(%rbx), %r12
leaq 0x105c26(%rip), %rax    # 0x3d3890
leaq 0x113bbf(%rip), %rdx    # 0x3e1830
cmovlq %rax, %rdx
xorl %r14d, %r14d
movq %rbx, 0x18(%rsp)
movl %edi, 0xc(%rsp)
movslq 0x8(%rsp), %rbp
movl 0xc(%rsp), %edi
subl %ebp, %edi
movq %rbp, %r13
addq %r15, %r13
movq %r13, %rsi
xorl %eax, %eax
callq 0x27e570
movq %r13, %rdi
callq 0x172f0
movl $0x3fffffff, %ebx       # imm = 0x3FFFFFFF
andl %ebx, %eax
addl %ebp, %eax
movl %eax, 0x8(%rsp)
movq (%r12), %rdx
movq %r15, %rdi
leaq 0x8(%rsp), %rsi
callq 0x2d2fbd
movsbq 0x19(%r12), %rax
leaq 0x1f5041(%rip), %rcx    # 0x4c2d10
movq -0x208(%rcx,%rax,8), %r13
movq %r13, %rdi
callq 0x172f0
movl %eax, %ebp
andl %ebx, %ebp
movslq 0x8(%rsp), %rbx
movq %rbx, %rdi
addq %r15, %rdi
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %r13, %rsi
movq %rax, %rdx
callq 0x17660
movq 0x20(%rsp), %rdx
movl 0xc(%rsp), %edi
leal (%rbx,%rbp), %eax
movq 0x18(%rsp), %rbx
movl %eax, 0x8(%rsp)
incl %r14d
addq $0x20, %r12
movswl 0x46(%rbx), %eax
cmpl %eax, %r14d
jl 0x2cdc81
movslq 0x8(%rsp), %rax
subl %eax, %edi
movq %r15, %rsi
addq %rax, %rsi
leaq 0x104496(%rip), %rdx    # 0x3d21d1
movq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x27e570
movq %r15, %rax
jmp 0x2cdd56
movq %r12, %rdi
callq 0x2824bb
xorl %eax, %eax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq