#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*/ freeMemoryBlocks(int, void **);
int /*<<< orphan*/ printLine(char *, int, int);
int /*<<< orphan*/ printNewLineCharacter();
void deallocateMemory(int memory_amount, void **memory_pointer) {
  printLine("Press enter to attempt deallocation...", 0, 1);
  printNewLineCharacter();
  printLine("Freeing allocated memory blocks...", 1, 0);
  freeMemoryBlocks(memory_amount, memory_pointer);
  printLine("Success!", 1, 0);
  return;
}


x86 assembly (clang, -O0):
<deallocateMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeba(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <printLine@plt>
mov    $0x0,%al
call   1050 <printNewLineCharacter@plt>
lea    0xec7(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <printLine@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1030 <freeMemoryBlocks@plt>
lea    0xecb(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <printLine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deallocateMemory>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
xor    %esi,%esi
mov    $0x1,%edx
call   1040 <printLine@plt>
xor    %eax,%eax
call   1050 <printNewLineCharacter@plt>
lea    0xece(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
call   1040 <printLine@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1030 <freeMemoryBlocks@plt>
lea    0xed4(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <printLine@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"Press enter to attempt deallocation...\00"
@.str.1 = [35 x i8] c"Freeing allocated memory blocks...\00"
@.str.2 = [9 x i8] c"Success!\00"
define void @deallocateMemory(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printLine(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%6 = call i32 (...) @printNewLineCharacter()
%7 = call i32 @printLine(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0)
%8 = load i32, i32* %3
%9 = load i8**, i8*** %4
%10 = call i32 @freeMemoryBlocks(i32 %8, i8** %9)
%11 = call i32 @printLine(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"Press enter to attempt deallocation...\00"
@.str.1 = [35 x i8] c"Freeing allocated memory blocks...\00"
@.str.2 = [9 x i8] c"Success!\00"
define void @deallocateMemory(i32 %0, i8** %1) {
%3 = tail call i32 @printLine(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i32 0, i32 1)
%4 = tail call i32 (...) @printNewLineCharacter()
%5 = tail call i32 @printLine(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str.1, i64 0, i64 0), i32 1, i32 0)
%6 = tail call i32 @freeMemoryBlocks(i32 %0, i8** %1)
%7 = tail call i32 @printLine(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0), i32 1, i32 0)
ret void
}