#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 */
typedef int /*<<< orphan*/ sqlite3;

/* Variables and functions */
int _create_table(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ *_db_connect(char *);
int atoi(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ sqlite3_close(int /*<<< orphan*/ *);
int /*<<< orphan*/ stdout;
int main(int argc, char *argv[]) {
  sqlite3 *db = NULL;
  char *db_name, *tab_name;
  int sz_rec = 0, rc = 0;
  if (argc < 3) {
    fprintf(stdout, "USAGE: %s <db_name> <tab_name> <rec_size>\n", argv[0]);
    return 1;
  }
  db_name = argv[1];
  tab_name = argv[2];
  sz_rec = atoi(argv[3]);
  db = _db_connect(db_name);
  rc = _create_table(db, tab_name, sz_rec);
  sqlite3_close(db);
  return rc;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    11ae <main+0x5e>
mov    0x2e53(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    (%rax),%rdx
lea    0xe63(%rip),%rsi
call   1030 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    1205 <main+0xb5>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
call   1070 <atoi@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x20(%rbp),%rdi
call   1060 <_db_connect@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1050 <_create_table@plt>
mov    %eax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <sqlite3_close@plt>
mov    -0x30(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
cmp    $0x2,%edi
jg     1178 <main+0x28>
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
mov    (%rsi),%rdx
lea    0xe94(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%eax
jmp    11af <main+0x5f>
mov    0x8(%rsi),%rbx
mov    0x10(%rsi),%r14
mov    0x18(%rsi),%rdi
call   1070 <atoi@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1060 <_db_connect@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
call   1050 <_create_table@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1040 <sqlite3_close@plt>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [43 x i8] c"USAGE: %s <db_name> <tab_name> <rec_size>\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32* null, i32** %6
store i32 0, i32* %9
store i32 0, i32* %10
%11 = load i32, i32* %4
%12 = icmp slt i32 %11, 3
br i1 %12, label %13, label %19
13: ; preds = %2
%14 = load i32, i32* @stdout
%15 = load i8**, i8*** %5
%16 = getelementptr inbounds i8*, i8** %15, i64 0
%17 = load i8*, i8** %16
%18 = call i32 @fprintf(i32 %14, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %17)
store i32 1, i32* %3
br label %39
19: ; preds = %2
%20 = load i8**, i8*** %5
%21 = getelementptr inbounds i8*, i8** %20, i64 1
%22 = load i8*, i8** %21
store i8* %22, i8** %7
%23 = load i8**, i8*** %5
%24 = getelementptr inbounds i8*, i8** %23, i64 2
%25 = load i8*, i8** %24
store i8* %25, i8** %8
%26 = load i8**, i8*** %5
%27 = getelementptr inbounds i8*, i8** %26, i64 3
%28 = load i8*, i8** %27
%29 = call i32 @atoi(i8* %28)
store i32 %29, i32* %9
%30 = load i8*, i8** %7
%31 = call i32* @_db_connect(i8* %30)
store i32* %31, i32** %6
%32 = load i32*, i32** %6
%33 = load i8*, i8** %8
%34 = load i32, i32* %9
%35 = call i32 @_create_table(i32* %32, i8* %33, i32 %34)
store i32 %35, i32* %10
%36 = load i32*, i32** %6
%37 = call i32 @sqlite3_close(i32* %36)
%38 = load i32, i32* %10
store i32 %38, i32* %3
br label %39
39: ; preds = %19, %13
%40 = load i32, i32* %3
ret i32 %40
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [43 x i8] c"USAGE: %s <db_name> <tab_name> <rec_size>\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 3
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = load i32, i32* @stdout
%6 = load i8*, i8** %1
%7 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0), i8* %6)
br label %19
8: ; preds = %2
%9 = getelementptr inbounds i8*, i8** %1, i64 1
%10 = load i8*, i8** %9
%11 = getelementptr inbounds i8*, i8** %1, i64 2
%12 = load i8*, i8** %11
%13 = getelementptr inbounds i8*, i8** %1, i64 3
%14 = load i8*, i8** %13
%15 = tail call i32 @atoi(i8* %14)
%16 = tail call i32* @_db_connect(i8* %10)
%17 = tail call i32 @_create_table(i32* %16, i8* %12, i32 %15)
%18 = tail call i32 @sqlite3_close(i32* %16)
br label %19
19: ; preds = %8, %4
%20 = phi i32 [ 1, %4 ], [ %17, %8 ]
ret i32 %20
}