#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 gtexSampleCreateTable(struct sqlConnection *conn, char *table) {
  char query[1024];
  sqlSafef(
      query, sizeof(query),
      "CREATE TABLE %s (\n"
      "    sampleId varchar(255) not null,   # GTEx sample identifier\n"
      "    tissue varchar(255) not null,     # Tissue name\n"
      "    donor varchar(255) not null,      # GTEx subject identifier\n"
      "    autolysisScore int not null default '-1',	# Level of tissue "
      "self-digestion (0-3; none,mild,moderate,severe, -1 if unknown)\n"
      "    ischemicTime varchar(255) not null default 'unknown',	# Time "
      "from tissue removal to preservation, in 4hr intervals\n"
      "    rin float not null default '0.0',	# RNA Integrity Number\n"
      "    collectionSites varchar(255) not null,	# GTEx Biospecimen "
      "Source Site list\n"
      "    batchId varchar(255) not null,	# Nucleic acid isolation batch "
      "ID\n"
      "    isolationType varchar(255) not null,	# Type of nucleic acid "
      "isolation\n"
      "    isolationDate varchar(255) not null,	# Date of nucleic acid "
      "isolation\n"
      "    pathNotes varchar(1024) not null default '',	# Pathology report "
      "notes\n"
      "              #Indices\n"
      "    PRIMARY KEY(sampleId)\n"
      ")\n",
      table);
  sqlRemakeTable(conn, table, query);
}


x86 assembly (clang, -O0):
<gtexSampleCreateTable>:
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):
<gtexSampleCreateTable>:
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 = [926 x i8] c"CREATE TABLE %s (\0A sampleId varchar(255) not null, # GTEx sample identifier\0A tissue varchar(255) not null, # Tissue name\0A donor varchar(255) not null, # GTEx subject identifier\0A autolysisScore int not null default '-1',\09# Level of tissue self-digestion (0-3; none,mild,moderate,severe, -1 if unknown)\0A ischemicTime varchar(255) not null default 'unknown',\09# Time from tissue removal to preservation, in 4hr intervals\0A rin float not null default '0.0',\09# RNA Integrity Number\0A collectionSites varchar(255) not null,\09# GTEx Biospecimen Source Site list\0A batchId varchar(255) not null,\09# Nucleic acid isolation batch ID\0A isolationType varchar(255) not null,\09# Type of nucleic acid isolation\0A isolationDate varchar(255) not null,\09# Date of nucleic acid isolation\0A pathNotes varchar(1024) not null default '',\09# Pathology report notes\0A #Indices\0A PRIMARY KEY(sampleId)\0A)\0A\00"
define void @gtexSampleCreateTable(%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 ([926 x i8], [926 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 = [926 x i8] c"CREATE TABLE %s (\0A sampleId varchar(255) not null, # GTEx sample identifier\0A tissue varchar(255) not null, # Tissue name\0A donor varchar(255) not null, # GTEx subject identifier\0A autolysisScore int not null default '-1',\09# Level of tissue self-digestion (0-3; none,mild,moderate,severe, -1 if unknown)\0A ischemicTime varchar(255) not null default 'unknown',\09# Time from tissue removal to preservation, in 4hr intervals\0A rin float not null default '0.0',\09# RNA Integrity Number\0A collectionSites varchar(255) not null,\09# GTEx Biospecimen Source Site list\0A batchId varchar(255) not null,\09# Nucleic acid isolation batch ID\0A isolationType varchar(255) not null,\09# Type of nucleic acid isolation\0A isolationDate varchar(255) not null,\09# Date of nucleic acid isolation\0A pathNotes varchar(1024) not null default '',\09# Pathology report notes\0A #Indices\0A PRIMARY KEY(sampleId)\0A)\0A\00"
define void @gtexSampleCreateTable(%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 ([926 x i8], [926 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = call i32 @sqlRemakeTable(%struct.sqlConnection* %0, i8* %1, i8* %4)
ret void
}