#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
struct sqlConnection {
  int dummy;
};
typedef int /*<<< orphan*/ query;

/* Variables and functions */
int /*<<< orphan*/ sqlRemakeTable(struct sqlConnection *, char *, char *);
int /*<<< orphan*/ sqlSafef(char *, int, char *, char *);
void gtexGeneBedCreateTable(struct sqlConnection *conn, char *table) {
  char query[1024];
  sqlSafef(query, sizeof(query),
           "CREATE TABLE %s (\n"
           "   chrom varchar(255) not null,	# Reference sequence "
           "chromosome or scaffold\n"
           "   chromStart int unsigned not null,	# Start position in "
           "chromosome\n"
           "   chromEnd int unsigned not null,	# End position in chromosome\n"
           "   name varchar(255) not null,	# Gene symbol\n"
           "   score int unsigned not null,	# Score from 0-1000\n"
           "   strand char(1) not null,	# + or - for strand\n"
           "   geneId varchar(255) not null,	# Ensembl gene ID, referenced "
           "in GTEx data tables\n"
           "   geneType varchar(255) not null,	# GENCODE gene biotype\n"
           "   expCount int unsigned not null,	# Number of experiment values\n"
           "   expScores longblob not null,	# Comma separated list of "
           "experiment scores\n"
           "#Indices\n"
           "   PRIMARY KEY(chrom,geneId)\n"
           "   INDEX(geneId)\n"
           "   INDEX(chrom,chromStart)\n"
           ")\n",
           table);
  sqlRemakeTable(conn, table, query);
}


x86 assembly (clang, -O0):
<gtexGeneBedCreateTable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x400,%esi
lea    0xeb6(%rip),%rdx
call   1040 <sqlSafef@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x410(%rbp),%rdx
call   1030 <sqlRemakeTable@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtexGeneBedCreateTable>:
push   %r15
push   %r14
push   %rbx
sub    $0x400,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0xec7(%rip),%rdx
mov    %rsp,%r15
mov    %r15,%rdi
mov    $0x400,%esi
mov    %rbx,%rcx
call   1040 <sqlSafef@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
call   1030 <sqlRemakeTable@plt>
add    $0x400,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%struct.sqlConnection = type { i32 }
@.str = [738 x i8] c"CREATE TABLE %s (\0A chrom varchar(255) not null,\09# Reference sequence chromosome or scaffold\0A chromStart int unsigned not null,\09# Start position in chromosome\0A chromEnd int unsigned not null,\09# End position in chromosome\0A name varchar(255) not null,\09# Gene symbol\0A score int unsigned not null,\09# Score from 0-1000\0A strand char(1) not null,\09# + or - for strand\0A geneId varchar(255) not null,\09# Ensembl gene ID, referenced in GTEx data tables\0A geneType varchar(255) not null,\09# GENCODE gene biotype\0A expCount int unsigned not null,\09# Number of experiment values\0A expScores longblob not null,\09# Comma separated list of experiment scores\0A#Indices\0A PRIMARY KEY(chrom,geneId)\0A INDEX(geneId)\0A INDEX(chrom,chromStart)\0A)\0A\00"
define void @gtexGeneBedCreateTable(%struct.sqlConnection* %0, i8* %1) {
%3 = alloca %struct.sqlConnection*
%4 = alloca i8*
%5 = alloca [1024 x i8]
store %struct.sqlConnection* %0, %struct.sqlConnection** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %4
%8 = call i32 @sqlSafef(i8* %6, i32 1024, i8* getelementptr inbounds ([738 x i8], [738 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load %struct.sqlConnection*, %struct.sqlConnection** %3
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %5, i64 0, i64 0
%12 = call i32 @sqlRemakeTable(%struct.sqlConnection* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.sqlConnection = type { i32 }
@.str = [738 x i8] c"CREATE TABLE %s (\0A chrom varchar(255) not null,\09# Reference sequence chromosome or scaffold\0A chromStart int unsigned not null,\09# Start position in chromosome\0A chromEnd int unsigned not null,\09# End position in chromosome\0A name varchar(255) not null,\09# Gene symbol\0A score int unsigned not null,\09# Score from 0-1000\0A strand char(1) not null,\09# + or - for strand\0A geneId varchar(255) not null,\09# Ensembl gene ID, referenced in GTEx data tables\0A geneType varchar(255) not null,\09# GENCODE gene biotype\0A expCount int unsigned not null,\09# Number of experiment values\0A expScores longblob not null,\09# Comma separated list of experiment scores\0A#Indices\0A PRIMARY KEY(chrom,geneId)\0A INDEX(geneId)\0A INDEX(chrom,chromStart)\0A)\0A\00"
define void @gtexGeneBedCreateTable(%struct.sqlConnection* %0, i8* %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = call i32 @sqlSafef(i8* %4, i32 1024, i8* getelementptr inbounds ([738 x i8], [738 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = call i32 @sqlRemakeTable(%struct.sqlConnection* %0, i8* %1, i8* %4)
ret void
}