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

/* Variables and functions */
struct typeEnv *AddType(struct typeEnv *, char *, int /*<<< orphan*/);
int /*<<< orphan*/ CarType();
int /*<<< orphan*/ CdrType();
int /*<<< orphan*/ ConsType();
struct typeEnv *NewEnv();
int /*<<< orphan*/ NullType();
int /*<<< orphan*/ PairType();
int /*<<< orphan*/ SuccType();
struct typeEnv *InitialEnv(void) {
  struct typeEnv *tmp;
  tmp = NewEnv();
  tmp = AddType(tmp, "cons", ConsType());
  tmp = AddType(tmp, "cdr", CdrType());
  tmp = AddType(tmp, "null", NullType());
  tmp = AddType(tmp, "car", CarType());
  tmp = AddType(tmp, "pair", PairType());
  tmp = AddType(tmp, "succ", SuccType());
  return (tmp);
}


x86 assembly (clang, -O0):
<InitialEnv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    $0x0,%al
call   1050 <NewEnv@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    $0x0,%al
call   10a0 <ConsType@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%edx
lea    0xe51(%rip),%rsi
call   1070 <AddType@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    $0x0,%al
call   1060 <CdrType@plt>
mov    -0x30(%rbp),%rdi
mov    %eax,%edx
lea    0xe31(%rip),%rsi
call   1070 <AddType@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    $0x0,%al
call   1090 <NullType@plt>
mov    -0x28(%rbp),%rdi
mov    %eax,%edx
lea    0xe10(%rip),%rsi
call   1070 <AddType@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    $0x0,%al
call   1030 <CarType@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%edx
lea    0xdf0(%rip),%rsi
call   1070 <AddType@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1040 <PairType@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%edx
lea    0xdcf(%rip),%rsi
call   1070 <AddType@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1080 <SuccType@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%edx
lea    0xdaf(%rip),%rsi
call   1070 <AddType@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InitialEnv>:
push   %rbx
xor    %eax,%eax
call   1050 <NewEnv@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   10a0 <ConsType@plt>
lea    0xe67(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1070 <AddType@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <CdrType@plt>
lea    0xe51(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1070 <AddType@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1090 <NullType@plt>
lea    0xe3a(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1070 <AddType@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <CarType@plt>
lea    0xe24(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1070 <AddType@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1040 <PairType@plt>
lea    0xe0d(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
call   1070 <AddType@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1080 <SuccType@plt>
lea    0xdf7(%rip),%rsi
mov    %rbx,%rdi
mov    %eax,%edx
pop    %rbx
jmp    1070 <AddType@plt>

LLVM IR (-O0):
%struct.typeEnv = type { i32 }
@.str = [5 x i8] c"cons\00"
@.str.1 = [4 x i8] c"cdr\00"
@.str.2 = [5 x i8] c"null\00"
@.str.3 = [4 x i8] c"car\00"
@.str.4 = [5 x i8] c"pair\00"
@.str.5 = [5 x i8] c"succ\00"
define %struct.typeEnv* @InitialEnv() {
%1 = alloca %struct.typeEnv*
%2 = call %struct.typeEnv* (...) @NewEnv()
store %struct.typeEnv* %2, %struct.typeEnv** %1
%3 = load %struct.typeEnv*, %struct.typeEnv** %1
%4 = call i32 (...) @ConsType()
%5 = call %struct.typeEnv* @AddType(%struct.typeEnv* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %4)
store %struct.typeEnv* %5, %struct.typeEnv** %1
%6 = load %struct.typeEnv*, %struct.typeEnv** %1
%7 = call i32 (...) @CdrType()
%8 = call %struct.typeEnv* @AddType(%struct.typeEnv* %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
store %struct.typeEnv* %8, %struct.typeEnv** %1
%9 = load %struct.typeEnv*, %struct.typeEnv** %1
%10 = call i32 (...) @NullType()
%11 = call %struct.typeEnv* @AddType(%struct.typeEnv* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %10)
store %struct.typeEnv* %11, %struct.typeEnv** %1
%12 = load %struct.typeEnv*, %struct.typeEnv** %1
%13 = call i32 (...) @CarType()
%14 = call %struct.typeEnv* @AddType(%struct.typeEnv* %12, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %13)
store %struct.typeEnv* %14, %struct.typeEnv** %1
%15 = load %struct.typeEnv*, %struct.typeEnv** %1
%16 = call i32 (...) @PairType()
%17 = call %struct.typeEnv* @AddType(%struct.typeEnv* %15, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %16)
store %struct.typeEnv* %17, %struct.typeEnv** %1
%18 = load %struct.typeEnv*, %struct.typeEnv** %1
%19 = call i32 (...) @SuccType()
%20 = call %struct.typeEnv* @AddType(%struct.typeEnv* %18, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %19)
store %struct.typeEnv* %20, %struct.typeEnv** %1
%21 = load %struct.typeEnv*, %struct.typeEnv** %1
ret %struct.typeEnv* %21
}

LLVM IR (-O2):
%struct.typeEnv = type { i32 }
@.str = [5 x i8] c"cons\00"
@.str.1 = [4 x i8] c"cdr\00"
@.str.2 = [5 x i8] c"null\00"
@.str.3 = [4 x i8] c"car\00"
@.str.4 = [5 x i8] c"pair\00"
@.str.5 = [5 x i8] c"succ\00"
define %struct.typeEnv* @InitialEnv() {
%1 = tail call %struct.typeEnv* (...) @NewEnv()
%2 = tail call i32 (...) @ConsType()
%3 = tail call %struct.typeEnv* @AddType(%struct.typeEnv* %1, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %2)
%4 = tail call i32 (...) @CdrType()
%5 = tail call %struct.typeEnv* @AddType(%struct.typeEnv* %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
%6 = tail call i32 (...) @NullType()
%7 = tail call %struct.typeEnv* @AddType(%struct.typeEnv* %5, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %6)
%8 = tail call i32 (...) @CarType()
%9 = tail call %struct.typeEnv* @AddType(%struct.typeEnv* %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0), i32 %8)
%10 = tail call i32 (...) @PairType()
%11 = tail call %struct.typeEnv* @AddType(%struct.typeEnv* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i32 %10)
%12 = tail call i32 (...) @SuccType()
%13 = tail call %struct.typeEnv* @AddType(%struct.typeEnv* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i32 %12)
ret %struct.typeEnv* %13
}