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

/* Variables and functions */
int /*<<< orphan*/ assert(int);
scalar_t__ strcmp(char const *, char const *);
int /*<<< orphan*/ zz_dict_destroy(struct zz_dict *);
struct zz_dict *zz_dict_insert(struct zz_dict *, char const *, char const **);
int zz_dict_lookup(struct zz_dict *, char const *, char const **);
void insert_vals(void) {
  struct zz_dict *dict;
  static const char c1[] = "This is a string";
  static const char c2[] = "Insert this in the dict";
  static const char c3[] = "I'm made of characters";
  static const char c4[] = "I'm a sequence";
  const char *s1, *s2, *s3, *s4, *s;
  dict = NULL;
  dict = zz_dict_insert(dict, c1, &s1);
  dict = zz_dict_insert(dict, c2, &s2);
  dict = zz_dict_insert(dict, c3, &s3);
  dict = zz_dict_insert(dict, c4, &s4);
  assert(c1 != s1);
  assert(strcmp(c1, s1) == 0);
  assert(zz_dict_lookup(dict, c1, &s) == 1);
  assert(s == s1);
  assert(c2 != s2);
  assert(strcmp(c2, s2) == 0);
  assert(zz_dict_lookup(dict, c2, &s) == 1);
  assert(s == s2);
  assert(c3 != s3);
  assert(strcmp(c3, s3) == 0);
  assert(zz_dict_lookup(dict, c3, &s) == 1);
  assert(s == s3);
  assert(c4 != s4);
  assert(strcmp(c4, s4) == 0);
  assert(zz_dict_lookup(dict, c4, &s) == 1);
  assert(s == s4);
  zz_dict_destroy(dict);
}


x86 assembly (clang, -O0):
<insert_vals>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <zz_dict_insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe9d(%rip),%rsi
lea    -0x18(%rbp),%rdx
call   1030 <zz_dict_insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea5(%rip),%rsi
lea    -0x20(%rbp),%rdx
call   1030 <zz_dict_insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xea4(%rip),%rsi
lea    -0x28(%rbp),%rdx
call   1030 <zz_dict_insert@plt>
mov    %rax,-0x8(%rbp)
lea    0xe39(%rip),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x10(%rbp),%rsi
lea    0xe1d(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
lea    0xdfc(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <zz_dict_lookup@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x30(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xde7(%rip),%rax
cmp    -0x18(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x18(%rbp),%rsi
lea    0xdcb(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
lea    0xdaa(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <zz_dict_lookup@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x30(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd95(%rip),%rax
cmp    -0x20(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x20(%rbp),%rsi
lea    0xd79(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
lea    0xd58(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <zz_dict_lookup@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x30(%rbp),%rax
cmp    -0x20(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
lea    0xd3a(%rip),%rax
cmp    -0x28(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x28(%rbp),%rsi
lea    0xd1e(%rip),%rdi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
lea    0xcfd(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1040 <zz_dict_lookup@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x30(%rbp),%rax
cmp    -0x28(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1070 <zz_dict_destroy@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<insert_vals>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
lea    0xe9b(%rip),%rbp
lea    0x20(%rsp),%rdx
xor    %edi,%edi
mov    %rbp,%rsi
call   1030 <zz_dict_insert@plt>
lea    0xea5(%rip),%r13
lea    0x18(%rsp),%rdx
mov    %rax,%rdi
mov    %r13,%rsi
call   1030 <zz_dict_insert@plt>
lea    0xeae(%rip),%r12
lea    0x10(%rsp),%rdx
mov    %rax,%rdi
mov    %r12,%rsi
call   1030 <zz_dict_insert@plt>
lea    0xeae(%rip),%r14
lea    0x8(%rsp),%rdx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <zz_dict_insert@plt>
mov    %rax,%rbx
xor    %edi,%edi
cmp    %rbp,0x20(%rsp)
setne  %dil
call   1060 <assert@plt>
mov    0x20(%rsp),%rsi
mov    %rbp,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
call   1040 <zz_dict_lookup@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    (%rsp),%rax
xor    %edi,%edi
cmp    0x20(%rsp),%rax
sete   %dil
call   1060 <assert@plt>
xor    %edi,%edi
cmp    %r13,0x18(%rsp)
setne  %dil
call   1060 <assert@plt>
mov    0x18(%rsp),%rsi
mov    %r13,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r13,%rsi
mov    %r15,%rdx
call   1040 <zz_dict_lookup@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    (%rsp),%rax
xor    %edi,%edi
cmp    0x18(%rsp),%rax
sete   %dil
call   1060 <assert@plt>
xor    %edi,%edi
cmp    %r12,0x10(%rsp)
setne  %dil
call   1060 <assert@plt>
mov    0x10(%rsp),%rsi
mov    %r12,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1040 <zz_dict_lookup@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    (%rsp),%rax
xor    %edi,%edi
cmp    0x10(%rsp),%rax
sete   %dil
call   1060 <assert@plt>
xor    %edi,%edi
cmp    %r14,0x8(%rsp)
setne  %dil
call   1060 <assert@plt>
mov    0x8(%rsp),%rsi
mov    %r14,%rdi
call   1050 <strcmp@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rdx
call   1040 <zz_dict_lookup@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
call   1060 <assert@plt>
mov    (%rsp),%rax
xor    %edi,%edi
cmp    0x8(%rsp),%rax
sete   %dil
call   1060 <assert@plt>
mov    %rbx,%rdi
call   1070 <zz_dict_destroy@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.zz_dict = type { i32 }
@insert_vals.c1 = internal constant [17 x i8] c"This is a string\00"
@insert_vals.c2 = internal constant [24 x i8] c"Insert this in the dict\00"
@insert_vals.c3 = internal constant [23 x i8] c"I'm made of characters\00"
@insert_vals.c4 = internal constant [15 x i8] c"I'm a sequence\00"
define void @insert_vals() {
%1 = alloca %struct.zz_dict*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store %struct.zz_dict* null, %struct.zz_dict** %1
%7 = load %struct.zz_dict*, %struct.zz_dict** %1
%8 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %7, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), i8** %2)
store %struct.zz_dict* %8, %struct.zz_dict** %1
%9 = load %struct.zz_dict*, %struct.zz_dict** %1
%10 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), i8** %3)
store %struct.zz_dict* %10, %struct.zz_dict** %1
%11 = load %struct.zz_dict*, %struct.zz_dict** %1
%12 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %11, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), i8** %4)
store %struct.zz_dict* %12, %struct.zz_dict** %1
%13 = load %struct.zz_dict*, %struct.zz_dict** %1
%14 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), i8** %5)
store %struct.zz_dict* %14, %struct.zz_dict** %1
%15 = load i8*, i8** %2
%16 = icmp ne i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %2
%20 = call i64 @strcmp(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), i8* %19)
%21 = icmp eq i64 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = load %struct.zz_dict*, %struct.zz_dict** %1
%25 = call i32 @zz_dict_lookup(%struct.zz_dict* %24, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), i8** %6)
%26 = icmp eq i32 %25, 1
%27 = zext i1 %26 to i32
%28 = call i32 @assert(i32 %27)
%29 = load i8*, i8** %6
%30 = load i8*, i8** %2
%31 = icmp eq i8* %29, %30
%32 = zext i1 %31 to i32
%33 = call i32 @assert(i32 %32)
%34 = load i8*, i8** %3
%35 = icmp ne i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), %34
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = load i8*, i8** %3
%39 = call i64 @strcmp(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), i8* %38)
%40 = icmp eq i64 %39, 0
%41 = zext i1 %40 to i32
%42 = call i32 @assert(i32 %41)
%43 = load %struct.zz_dict*, %struct.zz_dict** %1
%44 = call i32 @zz_dict_lookup(%struct.zz_dict* %43, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), i8** %6)
%45 = icmp eq i32 %44, 1
%46 = zext i1 %45 to i32
%47 = call i32 @assert(i32 %46)
%48 = load i8*, i8** %6
%49 = load i8*, i8** %3
%50 = icmp eq i8* %48, %49
%51 = zext i1 %50 to i32
%52 = call i32 @assert(i32 %51)
%53 = load i8*, i8** %4
%54 = icmp ne i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), %53
%55 = zext i1 %54 to i32
%56 = call i32 @assert(i32 %55)
%57 = load i8*, i8** %4
%58 = call i64 @strcmp(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), i8* %57)
%59 = icmp eq i64 %58, 0
%60 = zext i1 %59 to i32
%61 = call i32 @assert(i32 %60)
%62 = load %struct.zz_dict*, %struct.zz_dict** %1
%63 = call i32 @zz_dict_lookup(%struct.zz_dict* %62, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), i8** %6)
%64 = icmp eq i32 %63, 1
%65 = zext i1 %64 to i32
%66 = call i32 @assert(i32 %65)
%67 = load i8*, i8** %6
%68 = load i8*, i8** %4
%69 = icmp eq i8* %67, %68
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = load i8*, i8** %5
%73 = icmp ne i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), %72
%74 = zext i1 %73 to i32
%75 = call i32 @assert(i32 %74)
%76 = load i8*, i8** %5
%77 = call i64 @strcmp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), i8* %76)
%78 = icmp eq i64 %77, 0
%79 = zext i1 %78 to i32
%80 = call i32 @assert(i32 %79)
%81 = load %struct.zz_dict*, %struct.zz_dict** %1
%82 = call i32 @zz_dict_lookup(%struct.zz_dict* %81, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), i8** %6)
%83 = icmp eq i32 %82, 1
%84 = zext i1 %83 to i32
%85 = call i32 @assert(i32 %84)
%86 = load i8*, i8** %6
%87 = load i8*, i8** %5
%88 = icmp eq i8* %86, %87
%89 = zext i1 %88 to i32
%90 = call i32 @assert(i32 %89)
%91 = load %struct.zz_dict*, %struct.zz_dict** %1
%92 = call i32 @zz_dict_destroy(%struct.zz_dict* %91)
ret void
}

LLVM IR (-O2):
%struct.zz_dict = type { i32 }
@insert_vals.c1 = internal constant [17 x i8] c"This is a string\00"
@insert_vals.c2 = internal constant [24 x i8] c"Insert this in the dict\00"
@insert_vals.c3 = internal constant [23 x i8] c"I'm made of characters\00"
@insert_vals.c4 = internal constant [15 x i8] c"I'm a sequence\00"
define void @insert_vals() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = bitcast i8** %1 to i8*
%7 = bitcast i8** %2 to i8*
%8 = bitcast i8** %3 to i8*
%9 = bitcast i8** %4 to i8*
%10 = bitcast i8** %5 to i8*
%11 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* null, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), i8** %1)
%12 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %11, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), i8** %2)
%13 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %12, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), i8** %3)
%14 = call %struct.zz_dict* @zz_dict_insert(%struct.zz_dict* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), i8** %4)
%15 = load i8*, i8** %1
%16 = icmp ne i8* %15, getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0)
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8*, i8** %1
%20 = call i64 @strcmp(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), i8* %19)
%21 = icmp eq i64 %20, 0
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = call i32 @zz_dict_lookup(%struct.zz_dict* %14, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @insert_vals.c1, i64 0, i64 0), i8** %5)
%25 = icmp eq i32 %24, 1
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
%28 = load i8*, i8** %5
%29 = load i8*, i8** %1
%30 = icmp eq i8* %28, %29
%31 = zext i1 %30 to i32
%32 = call i32 @assert(i32 %31)
%33 = load i8*, i8** %2
%34 = icmp ne i8* %33, getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0)
%35 = zext i1 %34 to i32
%36 = call i32 @assert(i32 %35)
%37 = load i8*, i8** %2
%38 = call i64 @strcmp(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), i8* %37)
%39 = icmp eq i64 %38, 0
%40 = zext i1 %39 to i32
%41 = call i32 @assert(i32 %40)
%42 = call i32 @zz_dict_lookup(%struct.zz_dict* %14, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @insert_vals.c2, i64 0, i64 0), i8** %5)
%43 = icmp eq i32 %42, 1
%44 = zext i1 %43 to i32
%45 = call i32 @assert(i32 %44)
%46 = load i8*, i8** %5
%47 = load i8*, i8** %2
%48 = icmp eq i8* %46, %47
%49 = zext i1 %48 to i32
%50 = call i32 @assert(i32 %49)
%51 = load i8*, i8** %3
%52 = icmp ne i8* %51, getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0)
%53 = zext i1 %52 to i32
%54 = call i32 @assert(i32 %53)
%55 = load i8*, i8** %3
%56 = call i64 @strcmp(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), i8* %55)
%57 = icmp eq i64 %56, 0
%58 = zext i1 %57 to i32
%59 = call i32 @assert(i32 %58)
%60 = call i32 @zz_dict_lookup(%struct.zz_dict* %14, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @insert_vals.c3, i64 0, i64 0), i8** %5)
%61 = icmp eq i32 %60, 1
%62 = zext i1 %61 to i32
%63 = call i32 @assert(i32 %62)
%64 = load i8*, i8** %5
%65 = load i8*, i8** %3
%66 = icmp eq i8* %64, %65
%67 = zext i1 %66 to i32
%68 = call i32 @assert(i32 %67)
%69 = load i8*, i8** %4
%70 = icmp ne i8* %69, getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0)
%71 = zext i1 %70 to i32
%72 = call i32 @assert(i32 %71)
%73 = load i8*, i8** %4
%74 = call i64 @strcmp(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), i8* %73)
%75 = icmp eq i64 %74, 0
%76 = zext i1 %75 to i32
%77 = call i32 @assert(i32 %76)
%78 = call i32 @zz_dict_lookup(%struct.zz_dict* %14, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @insert_vals.c4, i64 0, i64 0), i8** %5)
%79 = icmp eq i32 %78, 1
%80 = zext i1 %79 to i32
%81 = call i32 @assert(i32 %80)
%82 = load i8*, i8** %5
%83 = load i8*, i8** %4
%84 = icmp eq i8* %82, %83
%85 = zext i1 %84 to i32
%86 = call i32 @assert(i32 %85)
%87 = call i32 @zz_dict_destroy(%struct.zz_dict* %14)
ret void
}