#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 */
int /*<<< orphan*/ inorder(struct node *);
struct node *insert(struct node *, int);
int main() {
  struct node *root = NULL;
  root = insert(root, 50);
  insert(root, 30);
  insert(root, 20);
  insert(root, 40);
  insert(root, 70);
  insert(root, 60);
  insert(root, 80);
  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    $0x32,%esi
call   1040 <insert@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1e,%esi
call   1040 <insert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%esi
call   1040 <insert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x28,%esi
call   1040 <insert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x46,%esi
call   1040 <insert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x3c,%esi
call   1040 <insert@plt>
mov    -0x10(%rbp),%rdi
mov    $0x50,%esi
call   1040 <insert@plt>
mov    -0x10(%rbp),%rdi
call   1030 <inorder@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
mov    $0x32,%esi
call   1040 <insert@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x1e,%esi
call   1040 <insert@plt>
mov    %rbx,%rdi
mov    $0x14,%esi
call   1040 <insert@plt>
mov    %rbx,%rdi
mov    $0x28,%esi
call   1040 <insert@plt>
mov    %rbx,%rdi
mov    $0x46,%esi
call   1040 <insert@plt>
mov    %rbx,%rdi
mov    $0x3c,%esi
call   1040 <insert@plt>
mov    %rbx,%rdi
mov    $0x50,%esi
call   1040 <insert@plt>
mov    %rbx,%rdi
call   1030 <inorder@plt>
xor    %eax,%eax
pop    %rbx
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* @insert(%struct.node* %3, i32 50)
store %struct.node* %4, %struct.node** %2
%5 = load %struct.node*, %struct.node** %2
%6 = call %struct.node* @insert(%struct.node* %5, i32 30)
%7 = load %struct.node*, %struct.node** %2
%8 = call %struct.node* @insert(%struct.node* %7, i32 20)
%9 = load %struct.node*, %struct.node** %2
%10 = call %struct.node* @insert(%struct.node* %9, i32 40)
%11 = load %struct.node*, %struct.node** %2
%12 = call %struct.node* @insert(%struct.node* %11, i32 70)
%13 = load %struct.node*, %struct.node** %2
%14 = call %struct.node* @insert(%struct.node* %13, i32 60)
%15 = load %struct.node*, %struct.node** %2
%16 = call %struct.node* @insert(%struct.node* %15, i32 80)
%17 = load %struct.node*, %struct.node** %2
%18 = call i32 @inorder(%struct.node* %17)
ret i32 0
}

LLVM IR (-O2):
%struct.node = type { i32 }
define i32 @main() {
%1 = tail call %struct.node* @insert(%struct.node* null, i32 50)
%2 = tail call %struct.node* @insert(%struct.node* %1, i32 30)
%3 = tail call %struct.node* @insert(%struct.node* %1, i32 20)
%4 = tail call %struct.node* @insert(%struct.node* %1, i32 40)
%5 = tail call %struct.node* @insert(%struct.node* %1, i32 70)
%6 = tail call %struct.node* @insert(%struct.node* %1, i32 60)
%7 = tail call %struct.node* @insert(%struct.node* %1, i32 80)
%8 = tail call i32 @inorder(%struct.node* %1)
ret i32 0
}