#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*/ printf(char *);
void help(void) {
  printf("\n"
         "tdbtool: \n"
         "  create    dbname     : create a database\n"
         "  open      dbname     : open an existing database\n"
         "  erase                : erase the database\n"
         "  dump                 : dump the database as strings\n"
         "  keys                 : dump the database keys as strings\n"
         "  hexkeys              : dump the database keys as hex values\n"
         "  info                 : print summary info about the database\n"
         "  insert    key  data  : insert a record\n"
         "  move      key  file  : move a record to a destination tdb\n"
         "  store     key  data  : store a record (replace)\n"
         "  show      key        : show a record by key\n"
         "  delete    key        : delete a record by key\n"
         "  list                 : print the database hash table and freelist\n"
         "  free                 : print the database freelist\n"
         "  ! command            : execute system command\n"
         "  1 | first            : print the first record\n"
         "  n | next             : print the next record\n"
         "  q | quit             : terminate\n"
         "  \\n                   : repeat 'next' command\n"
         "\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
lea    0xee9(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [980 x i8] c"\0Atdbtool: \0A create dbname : create a database\0A open dbname : open an existing database\0A erase : erase the database\0A dump : dump the database as strings\0A keys : dump the database keys as strings\0A hexkeys : dump the database keys as hex values\0A info : print summary info about the database\0A insert key data : insert a record\0A move key file : move a record to a destination tdb\0A store key data : store a record (replace)\0A show key : show a record by key\0A delete key : delete a record by key\0A list : print the database hash table and freelist\0A free : print the database freelist\0A ! command : execute system command\0A 1 | first : print the first record\0A n | next : print the next record\0A q | quit : terminate\0A \\n : repeat 'next' command\0A\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([980 x i8], [980 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [979 x i8] c"\0Atdbtool: \0A create dbname : create a database\0A open dbname : open an existing database\0A erase : erase the database\0A dump : dump the database as strings\0A keys : dump the database keys as strings\0A hexkeys : dump the database keys as hex values\0A info : print summary info about the database\0A insert key data : insert a record\0A move key file : move a record to a destination tdb\0A store key data : store a record (replace)\0A show key : show a record by key\0A delete key : delete a record by key\0A list : print the database hash table and freelist\0A free : print the database freelist\0A ! command : execute system command\0A 1 | first : print the first record\0A n | next : print the next record\0A q | quit : terminate\0A \\n : repeat 'next' command\0A\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([979 x i8], [979 x i8]* @str, i64 0, i64 0))
ret void
}