#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*/ CloseStringDestination(void *, char *);
int /*<<< orphan*/ OpenStringDestination(void *, char *, char *, size_t);
int /*<<< orphan*/ PrintActivation(void *, char *, void *);
void EnvGetActivationPPForm(void *theEnv, char *buffer, size_t bufferLength,
                            void *theActivation) {
  OpenStringDestination(theEnv, "ActPPForm", buffer, bufferLength);
  PrintActivation(theEnv, "ActPPForm", (void *)theActivation);
  CloseStringDestination(theEnv, "ActPPForm");
}


x86 assembly (clang, -O0):
<EnvGetActivationPPForm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xea5(%rip),%rsi
call   1040 <OpenStringDestination@plt>
mov    -0x8(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xe91(%rip),%rsi
call   1030 <PrintActivation@plt>
mov    -0x8(%rbp),%rdi
lea    0xe81(%rip),%rsi
call   1050 <CloseStringDestination@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EnvGetActivationPPForm>:
push   %r15
push   %r14
push   %rbx
mov    %rcx,%r14
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rbx
lea    0xeb8(%rip),%r15
mov    %r15,%rsi
call   1040 <OpenStringDestination@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <PrintActivation@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
pop    %rbx
pop    %r14
pop    %r15
jmp    1050 <CloseStringDestination@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"ActPPForm\00"
define void @EnvGetActivationPPForm(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i64 %2, i64* %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i64, i64* %7
%12 = call i32 @OpenStringDestination(i8* %9, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %10, i64 %11)
%13 = load i8*, i8** %5
%14 = load i8*, i8** %8
%15 = call i32 @PrintActivation(i8* %13, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = load i8*, i8** %5
%17 = call i32 @CloseStringDestination(i8* %16, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"ActPPForm\00"
define void @EnvGetActivationPPForm(i8* %0, i8* %1, i64 %2, i8* %3) {
%5 = tail call i32 @OpenStringDestination(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %1, i64 %2)
%6 = tail call i32 @PrintActivation(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %3)
%7 = tail call i32 @CloseStringDestination(i8* %0, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
ret void
}