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

/* Variables and functions */
struct node *bst_insert(struct node *, int);
int /*<<< orphan*/ inorder(struct node *);
int main() {
  struct node *root = NULL;
  root = bst_insert(root, 5);
  root = bst_insert(root, 3);
  root = bst_insert(root, 10);
  root = bst_insert(root, 24);
  root = bst_insert(root, 4);
  root = bst_insert(root, 3);
  root = bst_insert(root, 99);
  root = bst_insert(root, 8);
  inorder(root);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0xa,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x18,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x4,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x63,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x8,%esi
call   1040 <bst_insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <inorder@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
mov    $0x5,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0xa,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0x18,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0x4,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0x3,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0x63,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
mov    $0x8,%esi
call   1040 <bst_insert@plt>
mov    %rax,%rdi
call   1030 <inorder@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.node = type { i32 }
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.node*
store i32 0, i32* %1
store %struct.node* null, %struct.node** %2
%3 = load %struct.node*, %struct.node** %2
%4 = call %struct.node* @bst_insert(%struct.node* %3, i32 5)
store %struct.node* %4, %struct.node** %2
%5 = load %struct.node*, %struct.node** %2
%6 = call %struct.node* @bst_insert(%struct.node* %5, i32 3)
store %struct.node* %6, %struct.node** %2
%7 = load %struct.node*, %struct.node** %2
%8 = call %struct.node* @bst_insert(%struct.node* %7, i32 10)
store %struct.node* %8, %struct.node** %2
%9 = load %struct.node*, %struct.node** %2
%10 = call %struct.node* @bst_insert(%struct.node* %9, i32 24)
store %struct.node* %10, %struct.node** %2
%11 = load %struct.node*, %struct.node** %2
%12 = call %struct.node* @bst_insert(%struct.node* %11, i32 4)
store %struct.node* %12, %struct.node** %2
%13 = load %struct.node*, %struct.node** %2
%14 = call %struct.node* @bst_insert(%struct.node* %13, i32 3)
store %struct.node* %14, %struct.node** %2
%15 = load %struct.node*, %struct.node** %2
%16 = call %struct.node* @bst_insert(%struct.node* %15, i32 99)
store %struct.node* %16, %struct.node** %2
%17 = load %struct.node*, %struct.node** %2
%18 = call %struct.node* @bst_insert(%struct.node* %17, i32 8)
store %struct.node* %18, %struct.node** %2
%19 = load %struct.node*, %struct.node** %2
%20 = call i32 @inorder(%struct.node* %19)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* @bst_insert(%struct.node* null, i32 5)
%2 = tail call %struct.node* @bst_insert(%struct.node* %1, i32 3)
%3 = tail call %struct.node* @bst_insert(%struct.node* %2, i32 10)
%4 = tail call %struct.node* @bst_insert(%struct.node* %3, i32 24)
%5 = tail call %struct.node* @bst_insert(%struct.node* %4, i32 4)
%6 = tail call %struct.node* @bst_insert(%struct.node* %5, i32 3)
%7 = tail call %struct.node* @bst_insert(%struct.node* %6, i32 99)
%8 = tail call %struct.node* @bst_insert(%struct.node* %7, i32 8)
%9 = tail call i32 @inorder(%struct.node* %8)
ret i32 0
}