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

/* Variables and functions */
struct hashmap *hashmap_new();
int /*<<< orphan*/ hashmap_set(struct hashmap *, char *, char *);
struct hashmap *setup_test(void) {
  struct hashmap *map;
  char *test1;
  char *test2;
  char *test3;
  char *expect1;
  char *expect2;
  char *expect3;
  map = hashmap_new();
  test1 = "test data 1";
  test2 = "test data 2";
  test3 = "xest data 3";
  expect1 = "THE VALUE 1";
  expect2 = "THE VALUE 2";
  expect3 = "THE VALUE 3";
  hashmap_set(map, test1, expect1);
  hashmap_set(map, test2, expect2);
  hashmap_set(map, test3, expect3);
  return map;
}


x86 assembly (clang, -O0):
<setup_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1030 <hashmap_new@plt>
mov    %rax,-0x8(%rbp)
lea    0xec6(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    0xec8(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xec9(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xecb(%rip),%rax
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x28(%rbp),%rdx
call   1040 <hashmap_set@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1040 <hashmap_set@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x38(%rbp),%rdx
call   1040 <hashmap_set@plt>
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_test>:
push   %rbx
xor    %eax,%eax
call   1030 <hashmap_new@plt>
mov    %rax,%rbx
lea    0xece(%rip),%rsi
lea    0xeeb(%rip),%rdx
mov    %rax,%rdi
call   1040 <hashmap_set@plt>
lea    0xec4(%rip),%rsi
lea    0xee1(%rip),%rdx
mov    %rbx,%rdi
call   1040 <hashmap_set@plt>
lea    0xeba(%rip),%rsi
lea    0xed7(%rip),%rdx
mov    %rbx,%rdi
call   1040 <hashmap_set@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.hashmap = type { i32 }
@.str = [12 x i8] c"test data 1\00"
@.str.1 = [12 x i8] c"test data 2\00"
@.str.2 = [12 x i8] c"xest data 3\00"
@.str.3 = [12 x i8] c"THE VALUE 1\00"
@.str.4 = [12 x i8] c"THE VALUE 2\00"
@.str.5 = [12 x i8] c"THE VALUE 3\00"
define %struct.hashmap* @setup_test() {
%1 = alloca %struct.hashmap*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = call %struct.hashmap* (...) @hashmap_new()
store %struct.hashmap* %8, %struct.hashmap** %1
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8** %4
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0), i8** %5
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0), i8** %6
store i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0), i8** %7
%9 = load %struct.hashmap*, %struct.hashmap** %1
%10 = load i8*, i8** %2
%11 = load i8*, i8** %5
%12 = call i32 @hashmap_set(%struct.hashmap* %9, i8* %10, i8* %11)
%13 = load %struct.hashmap*, %struct.hashmap** %1
%14 = load i8*, i8** %3
%15 = load i8*, i8** %6
%16 = call i32 @hashmap_set(%struct.hashmap* %13, i8* %14, i8* %15)
%17 = load %struct.hashmap*, %struct.hashmap** %1
%18 = load i8*, i8** %4
%19 = load i8*, i8** %7
%20 = call i32 @hashmap_set(%struct.hashmap* %17, i8* %18, i8* %19)
%21 = load %struct.hashmap*, %struct.hashmap** %1
ret %struct.hashmap* %21
}

LLVM IR (-O2):
%struct.hashmap = type { i32 }
@.str = [12 x i8] c"test data 1\00"
@.str.1 = [12 x i8] c"test data 2\00"
@.str.2 = [12 x i8] c"xest data 3\00"
@.str.3 = [12 x i8] c"THE VALUE 1\00"
@.str.4 = [12 x i8] c"THE VALUE 2\00"
@.str.5 = [12 x i8] c"THE VALUE 3\00"
define %struct.hashmap* @setup_test() {
%1 = tail call %struct.hashmap* (...) @hashmap_new()
%2 = tail call i32 @hashmap_set(%struct.hashmap* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.3, i64 0, i64 0))
%3 = tail call i32 @hashmap_set(%struct.hashmap* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%4 = tail call i32 @hashmap_set(%struct.hashmap* %1, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.5, i64 0, i64 0))
ret %struct.hashmap* %1
}