#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 */

/* Variables and functions */
int /*<<< orphan*/ create_drop(char *, char *, char *);
int /*<<< orphan*/ init();
int /*<<< orphan*/ show(char *, char *);
int /*<<< orphan*/ use(char *, char *);
int main(int argc, char *argv[]) {
  init();
  create_drop("create", "database", "test");
  create_drop("create", "table", "test");
  use("use", "test");
  create_drop("create", "table", "test");
  show("show", "databases");
  show("show", "tables");
  create_drop("drop", "table", "test");
  show("show", "tables");
  create_drop("drop", "database", "test");
  show("show", "databases");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <init@plt>
lea    0xe9c(%rip),%rdi
lea    0xe9c(%rip),%rsi
lea    0xe9e(%rip),%rdx
call   1060 <create_drop@plt>
lea    0xe82(%rip),%rdi
lea    0xe90(%rip),%rsi
lea    0xe84(%rip),%rdx
call   1060 <create_drop@plt>
lea    0xe83(%rip),%rdi
lea    0xe71(%rip),%rsi
call   1030 <use@plt>
lea    0xe55(%rip),%rdi
lea    0xe63(%rip),%rsi
lea    0xe57(%rip),%rdx
call   1060 <create_drop@plt>
lea    0xe5a(%rip),%rdi
lea    0xe58(%rip),%rsi
call   1040 <show@plt>
lea    0xe47(%rip),%rdi
lea    0xe4f(%rip),%rsi
call   1040 <show@plt>
lea    0xe4a(%rip),%rdi
lea    0xe23(%rip),%rsi
lea    0xe17(%rip),%rdx
call   1060 <create_drop@plt>
lea    0xe1a(%rip),%rdi
lea    0xe22(%rip),%rsi
call   1040 <show@plt>
lea    0xe1d(%rip),%rdi
lea    0xde8(%rip),%rsi
lea    0xdea(%rip),%rdx
call   1060 <create_drop@plt>
lea    0xded(%rip),%rdi
lea    0xdeb(%rip),%rsi
call   1040 <show@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1050 <init@plt>
lea    0xea7(%rip),%r12
lea    0xea7(%rip),%rsi
lea    0xea9(%rip),%rbx
mov    %r12,%rdi
mov    %rbx,%rdx
call   1060 <create_drop@plt>
lea    0xe9c(%rip),%r15
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1060 <create_drop@plt>
lea    0xe8d(%rip),%rdi
mov    %rbx,%rsi
call   1030 <use@plt>
mov    %r12,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1060 <create_drop@plt>
lea    0xe74(%rip),%r12
lea    0xe72(%rip),%r13
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <show@plt>
lea    0xe6a(%rip),%rbp
mov    %r12,%rdi
mov    %rbp,%rsi
call   1040 <show@plt>
lea    0xe5f(%rip),%r14
mov    %r14,%rdi
mov    %r15,%rsi
mov    %rbx,%rdx
call   1060 <create_drop@plt>
mov    %r12,%rdi
mov    %rbp,%rsi
call   1040 <show@plt>
mov    %r14,%rdi
lea    0xe0e(%rip),%rsi
mov    %rbx,%rdx
call   1060 <create_drop@plt>
mov    %r12,%rdi
mov    %r13,%rsi
call   1040 <show@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"create\00"
@.str.1 = [9 x i8] c"database\00"
@.str.2 = [5 x i8] c"test\00"
@.str.3 = [6 x i8] c"table\00"
@.str.4 = [4 x i8] c"use\00"
@.str.5 = [5 x i8] c"show\00"
@.str.6 = [10 x i8] c"databases\00"
@.str.7 = [7 x i8] c"tables\00"
@.str.8 = [5 x i8] c"drop\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 (...) @init()
%7 = call i32 @create_drop(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @create_drop(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%9 = call i32 @use(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%10 = call i32 @create_drop(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%13 = call i32 @create_drop(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%14 = call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%15 = call i32 @create_drop(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%16 = call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"create\00"
@.str.1 = [9 x i8] c"database\00"
@.str.2 = [5 x i8] c"test\00"
@.str.3 = [6 x i8] c"table\00"
@.str.4 = [4 x i8] c"use\00"
@.str.5 = [5 x i8] c"show\00"
@.str.6 = [10 x i8] c"databases\00"
@.str.7 = [7 x i8] c"tables\00"
@.str.8 = [5 x i8] c"drop\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @init()
%4 = tail call i32 @create_drop(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @create_drop(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @use(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%7 = tail call i32 @create_drop(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
%9 = tail call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%10 = tail call i32 @create_drop(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%12 = tail call i32 @create_drop(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%13 = tail call i32 @show(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.6, i64 0, i64 0))
ret i32 0
}