#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*/ addToCache(char *, char *);
int /*<<< orphan*/ initDataTable();
int /*<<< orphan*/ initHashTable();
int /*<<< orphan*/ showCachedSites();
int main(int argc, char *argv[]) {
  initHashTable();
  initDataTable();
  addToCache("a.example.com", "A");
  addToCache("a.example.com", "A");
  addToCache("a.example.com", "A");
  addToCache("a.example.com", "A");
  addToCache("b.example.com", "B");
  addToCache("a.example.com", "A");
  addToCache("c.example.com", "C");
  addToCache("d.example.com", "D");
  addToCache("d.example.com", "D");
  addToCache("b.example.com", "B");
  addToCache("b.example.com", "B");
  addToCache("d.example.com", "D");
  addToCache("b.example.com", "B");
  addToCache("e.example.com", "E");
  showCachedSites();
  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   1040 <initHashTable@plt>
mov    $0x0,%al
call   1060 <initDataTable@plt>
lea    0xe95(%rip),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe82(%rip),%rdi
lea    0xe89(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe6f(%rip),%rdi
lea    0xe76(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe5c(%rip),%rdi
lea    0xe63(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe59(%rip),%rdi
lea    0xe60(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe36(%rip),%rdi
lea    0xe3d(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe43(%rip),%rdi
lea    0xe4a(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe40(%rip),%rdi
lea    0xe47(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe2d(%rip),%rdi
lea    0xe34(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xdfa(%rip),%rdi
lea    0xe01(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xde7(%rip),%rdi
lea    0xdee(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xdf4(%rip),%rdi
lea    0xdfb(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xdc1(%rip),%rdi
lea    0xdc8(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xdde(%rip),%rdi
lea    0xde5(%rip),%rsi
call   1030 <addToCache@plt>
mov    $0x0,%al
call   1050 <showCachedSites@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
xor    %eax,%eax
call   1040 <initHashTable@plt>
xor    %eax,%eax
call   1060 <initDataTable@plt>
lea    0xea3(%rip),%rbx
lea    0xeaa(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
lea    0xe79(%rip),%r15
lea    0xe80(%rip),%r14
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <addToCache@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
lea    0xe65(%rip),%rdi
lea    0xe6c(%rip),%rsi
call   1030 <addToCache@plt>
lea    0xe62(%rip),%rbx
lea    0xe69(%rip),%r12
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <addToCache@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <addToCache@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
call   1030 <addToCache@plt>
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <addToCache@plt>
lea    0xe22(%rip),%rdi
lea    0xe29(%rip),%rsi
call   1030 <addToCache@plt>
xor    %eax,%eax
call   1050 <showCachedSites@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [14 x i8] c"a.example.com\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [14 x i8] c"b.example.com\00"
@.str.3 = [2 x i8] c"B\00"
@.str.4 = [14 x i8] c"c.example.com\00"
@.str.5 = [2 x i8] c"C\00"
@.str.6 = [14 x i8] c"d.example.com\00"
@.str.7 = [2 x i8] c"D\00"
@.str.8 = [14 x i8] c"e.example.com\00"
@.str.9 = [2 x i8] c"E\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 (...) @initHashTable()
%7 = call i32 (...) @initDataTable()
%8 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%14 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%15 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%17 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%18 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%19 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%20 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%21 = call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%22 = call i32 (...) @showCachedSites()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"a.example.com\00"
@.str.1 = [2 x i8] c"A\00"
@.str.2 = [14 x i8] c"b.example.com\00"
@.str.3 = [2 x i8] c"B\00"
@.str.4 = [14 x i8] c"c.example.com\00"
@.str.5 = [2 x i8] c"C\00"
@.str.6 = [14 x i8] c"d.example.com\00"
@.str.7 = [2 x i8] c"D\00"
@.str.8 = [14 x i8] c"e.example.com\00"
@.str.9 = [2 x i8] c"E\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @initHashTable()
%4 = tail call i32 (...) @initDataTable()
%5 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%13 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%14 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%15 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%16 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%17 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%18 = tail call i32 @addToCache(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.9, i64 0, i64 0))
%19 = tail call i32 (...) @showCachedSites()
ret i32 0
}