// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x46(%rcx), %ecx
cmpl %ecx, %eax
jge 0x434b65
movq -0x50(%rbp), %rax
movq (%rax), %rdi
callq 0x43c3f0
addl $0x5, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x50(%rbp)
jmp 0x434b2a
movq -0x18(%rbp), %rax
movq (%rax), %rdi
callq 0x43c3f0
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
cmpl $0x32, -0x24(%rbp)
jge 0x434ba0
leaq 0x168aa4(%rip), %rax    # 0x59d628
movq %rax, -0x38(%rbp)
leaq 0x13eb64(%rip), %rax    # 0x5736f3
movq %rax, -0x40(%rbp)
leaq 0x1789e0(%rip), %rax    # 0x5ad57a
movq %rax, -0x48(%rbp)
jmp 0x434bc1
leaq 0x1789ce(%rip), %rax    # 0x5ad575
movq %rax, -0x38(%rbp)
leaq 0x1789c2(%rip), %rax    # 0x5ad574
movq %rax, -0x40(%rbp)
leaq 0x1789bc(%rip), %rax    # 0x5ad579
movq %rax, -0x48(%rbp)
movq -0x18(%rbp), %rax
movswl 0x46(%rax), %eax
imull $0x6, %eax, %eax
addl $0x23, %eax
addl -0x24(%rbp), %eax
movl %eax, -0x24(%rbp)
movslq -0x24(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edi
callq 0x3cd3a0
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x434c03
movq -0x10(%rbp), %rdi
callq 0x3c8ba0
movq $0x0, -0x8(%rbp)
jmp 0x434d51
movl -0x24(%rbp), %edi
movq -0x30(%rbp), %rsi
leaq 0x17896b(%rip), %rdx    # 0x5ad57c
movb $0x0, %al
callq 0x3c38c0
movq -0x30(%rbp), %rdi
callq 0x3c3400
movl %eax, -0x20(%rbp)
movq -0x30(%rbp), %rdi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
leaq -0x20(%rbp), %rsi
callq 0x43c440
movq -0x30(%rbp), %rax
movl -0x20(%rbp), %ecx
movl %ecx, %edx
addl $0x1, %edx
movl %edx, -0x20(%rbp)
movslq %ecx, %rcx
movb $0x28, (%rax,%rcx)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x50(%rbp)
movl $0x0, -0x1c(%rbp)
movl -0x1c(%rbp), %eax
movq -0x18(%rbp), %rcx
movswl 0x46(%rcx), %ecx
cmpl %ecx, %eax
jge 0x434d26
movl -0x24(%rbp), %edi
subl -0x20(%rbp), %edi
movq -0x30(%rbp), %rsi
movslq -0x20(%rbp), %rax
addq %rax, %rsi
movq -0x38(%rbp), %rdx
movb $0x0, %al
callq 0x3c38c0
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
callq 0x3c3400
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movq -0x40(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x30(%rbp), %rdi
movq -0x50(%rbp), %rax
movq (%rax), %rdx
leaq -0x20(%rbp), %rsi
callq 0x43c440
movq -0x50(%rbp), %rax
movsbl 0x19(%rax), %eax
subl $0x41, %eax
movslq %eax, %rcx
leaq 0x206149(%rip), %rax    # 0x63ae20
movq (%rax,%rcx,8), %rax
movq %rax, -0x60(%rbp)
movq -0x60(%rbp), %rdi
callq 0x3c3400
movl %eax, -0x54(%rbp)
movq -0x30(%rbp), %rdi
movslq -0x20(%rbp), %rax
addq %rax, %rdi
movq -0x60(%rbp), %rsi
movslq -0x54(%rbp), %rdx
callq 0x19610
movl -0x54(%rbp), %eax
addl -0x20(%rbp), %eax
movl %eax, -0x20(%rbp)
movl -0x1c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x1c(%rbp)
movq -0x50(%rbp), %rax
addq $0x20, %rax
movq %rax, -0x50(%rbp)
jmp 0x434c61
movl -0x24(%rbp), %edi
subl -0x20(%rbp), %edi
movq -0x30(%rbp), %rsi
movslq -0x20(%rbp), %rax
addq %rax, %rsi
movq -0x48(%rbp), %rcx
leaq 0x1672df(%rip), %rdx    # 0x59c021
movb $0x0, %al
callq 0x3c38c0
movq -0x30(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax,%rax)