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

/* Variables and functions */
struct cache *init_cache(int);
struct hash *init_hash();
int /*<<< orphan*/ reference(struct hash *, struct cache *, int);
void main() {
  struct cache *c = init_cache(4);
  struct hash *h = init_hash();
  reference(h, c, 4);
  reference(h, c, 5);
  reference(h, c, 1);
  reference(h, c, 4);
  reference(h, c, 6);
  reference(h, c, 3);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x4,%edi
call   1040 <init_cache@plt>
mov    %rax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <init_hash@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1050 <reference@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x5,%edx
call   1050 <reference@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x1,%edx
call   1050 <reference@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x4,%edx
call   1050 <reference@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x6,%edx
call   1050 <reference@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    $0x3,%edx
call   1050 <reference@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0x4,%edi
call   1040 <init_cache@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1030 <init_hash@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1050 <reference@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x5,%edx
call   1050 <reference@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1050 <reference@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1050 <reference@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x6,%edx
call   1050 <reference@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x3,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <reference@plt>

LLVM IR (-O0):
%struct.cache = type { i32 }
%struct.hash = type { i32 }
define void @main() {
%1 = alloca %struct.cache*
%2 = alloca %struct.hash*
%3 = call %struct.cache* @init_cache(i32 4)
store %struct.cache* %3, %struct.cache** %1
%4 = call %struct.hash* (...) @init_hash()
store %struct.hash* %4, %struct.hash** %2
%5 = load %struct.hash*, %struct.hash** %2
%6 = load %struct.cache*, %struct.cache** %1
%7 = call i32 @reference(%struct.hash* %5, %struct.cache* %6, i32 4)
%8 = load %struct.hash*, %struct.hash** %2
%9 = load %struct.cache*, %struct.cache** %1
%10 = call i32 @reference(%struct.hash* %8, %struct.cache* %9, i32 5)
%11 = load %struct.hash*, %struct.hash** %2
%12 = load %struct.cache*, %struct.cache** %1
%13 = call i32 @reference(%struct.hash* %11, %struct.cache* %12, i32 1)
%14 = load %struct.hash*, %struct.hash** %2
%15 = load %struct.cache*, %struct.cache** %1
%16 = call i32 @reference(%struct.hash* %14, %struct.cache* %15, i32 4)
%17 = load %struct.hash*, %struct.hash** %2
%18 = load %struct.cache*, %struct.cache** %1
%19 = call i32 @reference(%struct.hash* %17, %struct.cache* %18, i32 6)
%20 = load %struct.hash*, %struct.hash** %2
%21 = load %struct.cache*, %struct.cache** %1
%22 = call i32 @reference(%struct.hash* %20, %struct.cache* %21, i32 3)
ret void
}

LLVM IR (-O2):
%struct.cache = type { i32 }
%struct.hash = type { i32 }
define void @main() {
%1 = tail call %struct.cache* @init_cache(i32 4)
%2 = tail call %struct.hash* (...) @init_hash()
%3 = tail call i32 @reference(%struct.hash* %2, %struct.cache* %1, i32 4)
%4 = tail call i32 @reference(%struct.hash* %2, %struct.cache* %1, i32 5)
%5 = tail call i32 @reference(%struct.hash* %2, %struct.cache* %1, i32 1)
%6 = tail call i32 @reference(%struct.hash* %2, %struct.cache* %1, i32 4)
%7 = tail call i32 @reference(%struct.hash* %2, %struct.cache* %1, i32 6)
%8 = tail call i32 @reference(%struct.hash* %2, %struct.cache* %1, i32 3)
ret void
}