#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*/ display_heap();
int /*<<< orphan*/ insert(int);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ remove_from_heap();
int main(int argv, char *argc[]) {
  insert(10);
  insert(23);
  insert(1);
  insert(9);
  insert(33);
  insert(2);
  printf("Before the remove_from_heap\n");
  display_heap();
  remove_from_heap();
  printf("After the remove_from_heap\n");
  display_heap();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0xa,%edi
call   1060 <insert@plt>
mov    $0x17,%edi
call   1060 <insert@plt>
mov    $0x1,%edi
call   1060 <insert@plt>
mov    $0x9,%edi
call   1060 <insert@plt>
mov    $0x21,%edi
call   1060 <insert@plt>
mov    $0x2,%edi
call   1060 <insert@plt>
lea    0xe67(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <display_heap@plt>
mov    $0x0,%al
call   1040 <remove_from_heap@plt>
lea    0xe6a(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <display_heap@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
call   1060 <insert@plt>
mov    $0x17,%edi
call   1060 <insert@plt>
mov    $0x1,%edi
call   1060 <insert@plt>
mov    $0x9,%edi
call   1060 <insert@plt>
mov    $0x21,%edi
call   1060 <insert@plt>
mov    $0x2,%edi
call   1060 <insert@plt>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <display_heap@plt>
xor    %eax,%eax
call   1040 <remove_from_heap@plt>
lea    0xe7e(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <display_heap@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [29 x i8] c"Before the remove_from_heap\0A\00"
@.str.1 = [28 x i8] c"After the remove_from_heap\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @insert(i32 10)
%7 = call i32 @insert(i32 23)
%8 = call i32 @insert(i32 1)
%9 = call i32 @insert(i32 9)
%10 = call i32 @insert(i32 33)
%11 = call i32 @insert(i32 2)
%12 = call i32 @printf(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
%13 = call i32 (...) @display_heap()
%14 = call i32 (...) @remove_from_heap()
%15 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.1, i64 0, i64 0))
%16 = call i32 (...) @display_heap()
ret i32 0
}

LLVM IR (-O2):
@str = [28 x i8] c"Before the remove_from_heap\00"
@str.2 = [27 x i8] c"After the remove_from_heap\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @insert(i32 10)
%4 = tail call i32 @insert(i32 23)
%5 = tail call i32 @insert(i32 1)
%6 = tail call i32 @insert(i32 9)
%7 = tail call i32 @insert(i32 33)
%8 = tail call i32 @insert(i32 2)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @str, i64 0, i64 0))
%10 = tail call i32 (...) @display_heap()
%11 = tail call i32 (...) @remove_from_heap()
%12 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str.2, i64 0, i64 0))
%13 = tail call i32 (...) @display_heap()
ret i32 0
}