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

/* Variables and functions */
struct binNode *insert(struct binNode *, int);
struct binNode *buildtree() {
  struct binNode *root = NULL;
  root = insert(root, 21);
  root = insert(root, 2);
  root = insert(root, 1);
  root = insert(root, 6);
  root = insert(root, 4);
  root = insert(root, 5);
  root = insert(root, 23);
  root = insert(root, 43);
  root = insert(root, 3);
  root = insert(root, 11);
  root = insert(root, 68);
  root = insert(root, 64);
  root = insert(root, 99);
  root = insert(root, 15);
  root = insert(root, 9);
  root = insert(root, 29);
  return (root);
}


x86 assembly (clang, -O0):
<buildtree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x15,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x6,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x4,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x5,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x17,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2b,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x3,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xb,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x44,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x40,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x63,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xf,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x9,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1d,%esi
call   1030 <insert@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<buildtree>:
push   %rax
xor    %edi,%edi
mov    $0x15,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x2,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x1,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x6,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x4,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x5,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x17,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x2b,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0xb,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x44,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x40,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x63,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0xf,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x9,%esi
call   1030 <insert@plt>
mov    %rax,%rdi
mov    $0x1d,%esi
pop    %rax
jmp    1030 <insert@plt>

LLVM IR (-O0):
%struct.binNode = type { i32 }
define %struct.binNode* @buildtree() {
%1 = alloca %struct.binNode*
store %struct.binNode* null, %struct.binNode** %1
%2 = load %struct.binNode*, %struct.binNode** %1
%3 = call %struct.binNode* @insert(%struct.binNode* %2, i32 21)
store %struct.binNode* %3, %struct.binNode** %1
%4 = load %struct.binNode*, %struct.binNode** %1
%5 = call %struct.binNode* @insert(%struct.binNode* %4, i32 2)
store %struct.binNode* %5, %struct.binNode** %1
%6 = load %struct.binNode*, %struct.binNode** %1
%7 = call %struct.binNode* @insert(%struct.binNode* %6, i32 1)
store %struct.binNode* %7, %struct.binNode** %1
%8 = load %struct.binNode*, %struct.binNode** %1
%9 = call %struct.binNode* @insert(%struct.binNode* %8, i32 6)
store %struct.binNode* %9, %struct.binNode** %1
%10 = load %struct.binNode*, %struct.binNode** %1
%11 = call %struct.binNode* @insert(%struct.binNode* %10, i32 4)
store %struct.binNode* %11, %struct.binNode** %1
%12 = load %struct.binNode*, %struct.binNode** %1
%13 = call %struct.binNode* @insert(%struct.binNode* %12, i32 5)
store %struct.binNode* %13, %struct.binNode** %1
%14 = load %struct.binNode*, %struct.binNode** %1
%15 = call %struct.binNode* @insert(%struct.binNode* %14, i32 23)
store %struct.binNode* %15, %struct.binNode** %1
%16 = load %struct.binNode*, %struct.binNode** %1
%17 = call %struct.binNode* @insert(%struct.binNode* %16, i32 43)
store %struct.binNode* %17, %struct.binNode** %1
%18 = load %struct.binNode*, %struct.binNode** %1
%19 = call %struct.binNode* @insert(%struct.binNode* %18, i32 3)
store %struct.binNode* %19, %struct.binNode** %1
%20 = load %struct.binNode*, %struct.binNode** %1
%21 = call %struct.binNode* @insert(%struct.binNode* %20, i32 11)
store %struct.binNode* %21, %struct.binNode** %1
%22 = load %struct.binNode*, %struct.binNode** %1
%23 = call %struct.binNode* @insert(%struct.binNode* %22, i32 68)
store %struct.binNode* %23, %struct.binNode** %1
%24 = load %struct.binNode*, %struct.binNode** %1
%25 = call %struct.binNode* @insert(%struct.binNode* %24, i32 64)
store %struct.binNode* %25, %struct.binNode** %1
%26 = load %struct.binNode*, %struct.binNode** %1
%27 = call %struct.binNode* @insert(%struct.binNode* %26, i32 99)
store %struct.binNode* %27, %struct.binNode** %1
%28 = load %struct.binNode*, %struct.binNode** %1
%29 = call %struct.binNode* @insert(%struct.binNode* %28, i32 15)
store %struct.binNode* %29, %struct.binNode** %1
%30 = load %struct.binNode*, %struct.binNode** %1
%31 = call %struct.binNode* @insert(%struct.binNode* %30, i32 9)
store %struct.binNode* %31, %struct.binNode** %1
%32 = load %struct.binNode*, %struct.binNode** %1
%33 = call %struct.binNode* @insert(%struct.binNode* %32, i32 29)
store %struct.binNode* %33, %struct.binNode** %1
%34 = load %struct.binNode*, %struct.binNode** %1
ret %struct.binNode* %34
}

LLVM IR (-O2):
%struct.binNode = type { i32 }
define %struct.binNode* @buildtree() {
%1 = tail call %struct.binNode* @insert(%struct.binNode* null, i32 21)
%2 = tail call %struct.binNode* @insert(%struct.binNode* %1, i32 2)
%3 = tail call %struct.binNode* @insert(%struct.binNode* %2, i32 1)
%4 = tail call %struct.binNode* @insert(%struct.binNode* %3, i32 6)
%5 = tail call %struct.binNode* @insert(%struct.binNode* %4, i32 4)
%6 = tail call %struct.binNode* @insert(%struct.binNode* %5, i32 5)
%7 = tail call %struct.binNode* @insert(%struct.binNode* %6, i32 23)
%8 = tail call %struct.binNode* @insert(%struct.binNode* %7, i32 43)
%9 = tail call %struct.binNode* @insert(%struct.binNode* %8, i32 3)
%10 = tail call %struct.binNode* @insert(%struct.binNode* %9, i32 11)
%11 = tail call %struct.binNode* @insert(%struct.binNode* %10, i32 68)
%12 = tail call %struct.binNode* @insert(%struct.binNode* %11, i32 64)
%13 = tail call %struct.binNode* @insert(%struct.binNode* %12, i32 99)
%14 = tail call %struct.binNode* @insert(%struct.binNode* %13, i32 15)
%15 = tail call %struct.binNode* @insert(%struct.binNode* %14, i32 9)
%16 = tail call %struct.binNode* @insert(%struct.binNode* %15, i32 29)
ret %struct.binNode* %16
}