// File: /workspace/github_c_makefile_star2_O3/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 0x2c4451
movq 0x8(%rbx), %rcx
xorl %edx, %edx
xorl %r13d, %r13d
movq (%rcx), %rdi
xorl %esi, %esi
movzbl (%rdi), %r8d
cmpl $0x22, %r8d
je 0x2c4431
testl %r8d, %r8d
jne 0x2c4433
jmp 0x2c443a
incl %esi
incl %esi
incq %rdi
jmp 0x2c4420
addl %esi, %r13d
addl $0x7, %r13d
incl %edx
addq $0x20, %rcx
cmpl %eax, %edx
jne 0x2c441b
addl $0x2, %r13d
jmp 0x2c4457
movl $0x2, %r13d
movq (%rbx), %rdx
xorl %ecx, %ecx
movzbl (%rdx), %esi
cmpl $0x22, %esi
je 0x2c446a
testl %esi, %esi
jne 0x2c446c
jmp 0x2c4473
incl %ecx
incl %ecx
incq %rdx
jmp 0x2c445c
addl %ecx, %r13d
cmpl $0x32, %r13d
leaq 0xdccbb(%rip), %rcx     # 0x3a113c
leaq 0x113c52(%rip), %rdx    # 0x3d80da
cmovlq %rcx, %rdx
movq %rdx, 0x20(%rsp)
leaq 0x113c48(%rip), %rcx    # 0x3d80e0
leaq 0x113c40(%rip), %r14    # 0x3d80df
cmovlq %rcx, %r14
leal (%rax,%rax,2), %eax
leal 0x23(%r13,%rax,2), %ebp
movslq %ebp, %rdi
callq 0x272ae6
movq %rax, %r15
testq %rax, %rax
je 0x2c4601
movq %r14, 0x10(%rsp)
leaq 0x113c17(%rip), %rdx    # 0x3d80e2
movl %ebp, %edi
movq %r15, %rsi
xorl %eax, %eax
callq 0x274c41
movq %r15, %rdi
callq 0x172f0
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %rsp, %r12
movl %eax, (%r12)
movq (%rbx), %rdx
movq %r15, %rdi
movq %r12, %rsi
callq 0x2c971e
movslq (%r12), %rcx
leal 0x1(%rcx), %eax
movb $0x28, (%r15,%rcx)
cmpw $0x0, 0x46(%rbx)
movq %r15, 0x8(%rsp)
jle 0x2c45db
cmpl $0x32, %r13d
movq 0x8(%rbx), %r12
leaq 0x105c4c(%rip), %rcx    # 0x3ca170
leaq 0x113bb0(%rip), %rdx    # 0x3d80db
cmovlq %rcx, %rdx
xorl %r14d, %r14d
movl %ebp, 0x4(%rsp)
movq %rbx, 0x18(%rsp)
movq 0x8(%rsp), %r15
movl %ebp, %edi
subl %eax, %edi
movslq %eax, %rbp
leaq (%r15,%rbp), %r13
movq %r13, %rsi
xorl %eax, %eax
callq 0x274c41
movq %r13, %rdi
callq 0x172f0
movl $0x3fffffff, %ebx       # imm = 0x3FFFFFFF
andl %ebx, %eax
addl %eax, %ebp
movl %ebp, (%rsp)
movq (%r12), %rdx
movq %r15, %rdi
movq %rsp, %rsi
callq 0x2c971e
movsbq 0x19(%r12), %rax
leaq 0x1f377b(%rip), %rcx    # 0x4b7d00
movq -0x208(%rcx,%rax,8), %r13
movq %r13, %rdi
callq 0x172f0
movl %eax, %ebp
andl %ebx, %ebp
movslq (%rsp), %rbx
movq %rbx, %rdi
addq %r15, %rdi
andl $0x3fffffff, %eax       # imm = 0x3FFFFFFF
movq %r13, %rsi
movq %rax, %rdx
callq 0x17660
leal (%rbx,%rbp), %eax
movl 0x4(%rsp), %ebp
movq 0x18(%rsp), %rbx
movl %eax, (%rsp)
incl %r14d
addq $0x20, %r12
movswl 0x46(%rbx), %ecx
movq 0x20(%rsp), %rdx
cmpl %ecx, %r14d
jl 0x2c4540
subl %eax, %ebp
cltq
movq 0x8(%rsp), %r15
movq %r15, %rsi
addq %rax, %rsi
leaq 0x1044b8(%rip), %rdx    # 0x3c8aa9
movl %ebp, %edi
movq 0x10(%rsp), %rcx
xorl %eax, %eax
callq 0x274c41
jmp 0x2c4609
movq %r12, %rdi
callq 0x278b1c
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq