#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 hash_table {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ hash_table_create(struct hash_table **, int);
int /*<<< orphan*/ hash_table_destroy(struct hash_table *);
char *hash_table_get(struct hash_table *, char *);
int /*<<< orphan*/ hash_table_insert(struct hash_table *, char *);
int /*<<< orphan*/ hash_table_print(struct hash_table *);
int /*<<< orphan*/ hash_table_remove(struct hash_table *, char *);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ printf(char *, char *);
int main(int argc, const char *argv[]) {
  struct hash_table *ht = NULL;
  if (hash_table_create(&ht, 3)) {
    perror("hash_table_create");
    exit(EXIT_FAILURE);
  }
  hash_table_print(ht);
  hash_table_insert(ht, "abc");
  hash_table_insert(ht, "oh");
  hash_table_insert(ht, "my");
  hash_table_insert(ht, "god");
  hash_table_insert(ht, "onotole");
  hash_table_insert(ht, "odinodin");
  hash_table_insert(ht, "getcha");
  hash_table_insert(ht, "kotenka");
  hash_table_insert(ht, "kisulenka");
  hash_table_print(ht);
  printf("abc: %s\n", hash_table_get(ht, "abc"));
  printf("my: %s\n", hash_table_get(ht, "my"));
  hash_table_remove(ht, "getcha");
  hash_table_print(ht);
  hash_table_destroy(ht);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x18(%rbp),%rdi
mov    $0x3,%esi
call   1030 <hash_table_create@plt>
cmp    $0x0,%rax
je     11e0 <main+0x50>
lea    0xe33(%rip),%rdi
call   1090 <perror@plt>
mov    0x2e07(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>
mov    -0x18(%rbp),%rdi
call   1080 <hash_table_print@plt>
mov    -0x18(%rbp),%rdi
lea    0xe1e(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xe12(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xe05(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xdf8(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xdec(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xde4(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xddd(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xdd4(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
lea    0xdcc(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    -0x18(%rbp),%rdi
call   1080 <hash_table_print@plt>
mov    -0x18(%rbp),%rdi
lea    0xd85(%rip),%rsi
call   1060 <hash_table_get@plt>
mov    %rax,%rsi
lea    0xdae(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd6d(%rip),%rsi
call   1060 <hash_table_get@plt>
mov    %rax,%rsi
lea    0xd98(%rip),%rdi
call   1040 <printf@plt>
mov    -0x18(%rbp),%rdi
lea    0xd66(%rip),%rsi
call   1050 <hash_table_remove@plt>
mov    -0x18(%rbp),%rdi
call   1080 <hash_table_print@plt>
mov    -0x18(%rbp),%rdi
call   10a0 <hash_table_destroy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
movq   $0x0,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
call   1030 <hash_table_create@plt>
test   %rax,%rax
jne    12d5 <main+0x145>
mov    0x8(%rsp),%rdi
call   1080 <hash_table_print@plt>
mov    0x8(%rsp),%rdi
lea    0xe42(%rip),%r14
mov    %r14,%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xe32(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xe24(%rip),%r15
mov    %r15,%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xe13(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xe06(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xdfd(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xdf5(%rip),%rbx
mov    %rbx,%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xde8(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
lea    0xddf(%rip),%rsi
call   1070 <hash_table_insert@plt>
mov    0x8(%rsp),%rdi
call   1080 <hash_table_print@plt>
mov    0x8(%rsp),%rdi
mov    %r14,%rsi
call   1060 <hash_table_get@plt>
lea    0xdc6(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    0x8(%rsp),%rdi
mov    %r15,%rsi
call   1060 <hash_table_get@plt>
lea    0xdb3(%rip),%rdi
mov    %rax,%rsi
call   1040 <printf@plt>
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <hash_table_remove@plt>
mov    0x8(%rsp),%rdi
call   1080 <hash_table_print@plt>
mov    0x8(%rsp),%rdi
call   10a0 <hash_table_destroy@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret
lea    0xd24(%rip),%rdi
call   1090 <perror@plt>
mov    0x2cf8(%rip),%rax
mov    (%rax),%edi
call   10b0 <exit@plt>

LLVM IR (-O0):
%struct.hash_table = type { i32 }
@.str = [18 x i8] c"hash_table_create\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [4 x i8] c"abc\00"
@.str.2 = [3 x i8] c"oh\00"
@.str.3 = [3 x i8] c"my\00"
@.str.4 = [4 x i8] c"god\00"
@.str.5 = [8 x i8] c"onotole\00"
@.str.6 = [9 x i8] c"odinodin\00"
@.str.7 = [7 x i8] c"getcha\00"
@.str.8 = [8 x i8] c"kotenka\00"
@.str.9 = [10 x i8] c"kisulenka\00"
@.str.10 = [9 x i8] c"abc: %s\0A\00"
@.str.11 = [8 x i8] c"my: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.hash_table*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store %struct.hash_table* null, %struct.hash_table** %6
%7 = call i64 @hash_table_create(%struct.hash_table** %6, i32 3)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %13
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
%14 = load %struct.hash_table*, %struct.hash_table** %6
%15 = call i32 @hash_table_print(%struct.hash_table* %14)
%16 = load %struct.hash_table*, %struct.hash_table** %6
%17 = call i32 @hash_table_insert(%struct.hash_table* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%18 = load %struct.hash_table*, %struct.hash_table** %6
%19 = call i32 @hash_table_insert(%struct.hash_table* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%20 = load %struct.hash_table*, %struct.hash_table** %6
%21 = call i32 @hash_table_insert(%struct.hash_table* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%22 = load %struct.hash_table*, %struct.hash_table** %6
%23 = call i32 @hash_table_insert(%struct.hash_table* %22, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%24 = load %struct.hash_table*, %struct.hash_table** %6
%25 = call i32 @hash_table_insert(%struct.hash_table* %24, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%26 = load %struct.hash_table*, %struct.hash_table** %6
%27 = call i32 @hash_table_insert(%struct.hash_table* %26, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%28 = load %struct.hash_table*, %struct.hash_table** %6
%29 = call i32 @hash_table_insert(%struct.hash_table* %28, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%30 = load %struct.hash_table*, %struct.hash_table** %6
%31 = call i32 @hash_table_insert(%struct.hash_table* %30, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%32 = load %struct.hash_table*, %struct.hash_table** %6
%33 = call i32 @hash_table_insert(%struct.hash_table* %32, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%34 = load %struct.hash_table*, %struct.hash_table** %6
%35 = call i32 @hash_table_print(%struct.hash_table* %34)
%36 = load %struct.hash_table*, %struct.hash_table** %6
%37 = call i8* @hash_table_get(%struct.hash_table* %36, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%38 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* %37)
%39 = load %struct.hash_table*, %struct.hash_table** %6
%40 = call i8* @hash_table_get(%struct.hash_table* %39, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%41 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8* %40)
%42 = load %struct.hash_table*, %struct.hash_table** %6
%43 = call i32 @hash_table_remove(%struct.hash_table* %42, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%44 = load %struct.hash_table*, %struct.hash_table** %6
%45 = call i32 @hash_table_print(%struct.hash_table* %44)
%46 = load %struct.hash_table*, %struct.hash_table** %6
%47 = call i32 @hash_table_destroy(%struct.hash_table* %46)
ret i32 0
}

LLVM IR (-O2):
%struct.hash_table = type { i32 }
@.str = [18 x i8] c"hash_table_create\00"
@EXIT_FAILURE = global i32 0
@.str.1 = [4 x i8] c"abc\00"
@.str.2 = [3 x i8] c"oh\00"
@.str.3 = [3 x i8] c"my\00"
@.str.4 = [4 x i8] c"god\00"
@.str.5 = [8 x i8] c"onotole\00"
@.str.6 = [9 x i8] c"odinodin\00"
@.str.7 = [7 x i8] c"getcha\00"
@.str.8 = [8 x i8] c"kotenka\00"
@.str.9 = [10 x i8] c"kisulenka\00"
@.str.10 = [9 x i8] c"abc: %s\0A\00"
@.str.11 = [8 x i8] c"my: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca %struct.hash_table*
%4 = bitcast %struct.hash_table** %3 to i8*
store %struct.hash_table* null, %struct.hash_table** %3
%5 = call i64 @hash_table_create(%struct.hash_table** %3, i32 3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %11, label %7
7: ; preds = %2
%8 = call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @EXIT_FAILURE
%10 = call i32 @exit(i32 %9)
unreachable
11: ; preds = %2
%12 = load %struct.hash_table*, %struct.hash_table** %3
%13 = call i32 @hash_table_print(%struct.hash_table* %12)
%14 = load %struct.hash_table*, %struct.hash_table** %3
%15 = call i32 @hash_table_insert(%struct.hash_table* %14, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%16 = load %struct.hash_table*, %struct.hash_table** %3
%17 = call i32 @hash_table_insert(%struct.hash_table* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%18 = load %struct.hash_table*, %struct.hash_table** %3
%19 = call i32 @hash_table_insert(%struct.hash_table* %18, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%20 = load %struct.hash_table*, %struct.hash_table** %3
%21 = call i32 @hash_table_insert(%struct.hash_table* %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%22 = load %struct.hash_table*, %struct.hash_table** %3
%23 = call i32 @hash_table_insert(%struct.hash_table* %22, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%24 = load %struct.hash_table*, %struct.hash_table** %3
%25 = call i32 @hash_table_insert(%struct.hash_table* %24, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
%26 = load %struct.hash_table*, %struct.hash_table** %3
%27 = call i32 @hash_table_insert(%struct.hash_table* %26, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%28 = load %struct.hash_table*, %struct.hash_table** %3
%29 = call i32 @hash_table_insert(%struct.hash_table* %28, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%30 = load %struct.hash_table*, %struct.hash_table** %3
%31 = call i32 @hash_table_insert(%struct.hash_table* %30, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.9, i64 0, i64 0))
%32 = load %struct.hash_table*, %struct.hash_table** %3
%33 = call i32 @hash_table_print(%struct.hash_table* %32)
%34 = load %struct.hash_table*, %struct.hash_table** %3
%35 = call i8* @hash_table_get(%struct.hash_table* %34, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
%36 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.10, i64 0, i64 0), i8* %35)
%37 = load %struct.hash_table*, %struct.hash_table** %3
%38 = call i8* @hash_table_get(%struct.hash_table* %37, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%39 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0), i8* %38)
%40 = load %struct.hash_table*, %struct.hash_table** %3
%41 = call i32 @hash_table_remove(%struct.hash_table* %40, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0))
%42 = load %struct.hash_table*, %struct.hash_table** %3
%43 = call i32 @hash_table_print(%struct.hash_table* %42)
%44 = load %struct.hash_table*, %struct.hash_table** %3
%45 = call i32 @hash_table_destroy(%struct.hash_table* %44)
ret i32 0
}