#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*/ computeMaximalMean(struct Node *);
int /*<<< orphan*/ computeSolution(double *, struct Node *);
int /*<<< orphan*/ deleteTree(struct Node *);
int /*<<< orphan*/ initializeRoot(struct Node **, char *, double *, int, int);
void orderTree(double *x, char *FileName, double *u, int rootNum, int n) {
  struct Node *root;
  initializeRoot(&root, FileName, u, rootNum, n);
  computeMaximalMean(root);
  computeSolution(x, root);
  deleteTree(root);
}


x86 assembly (clang, -O0):
<orderTree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
lea    -0x28(%rbp),%rdi
call   1030 <initializeRoot@plt>
mov    -0x28(%rbp),%rdi
call   1050 <computeMaximalMean@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
call   1060 <computeSolution@plt>
mov    -0x28(%rbp),%rdi
call   1040 <deleteTree@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<orderTree>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
call   1030 <initializeRoot@plt>
mov    0x8(%rsp),%rdi
call   1050 <computeMaximalMean@plt>
mov    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1060 <computeSolution@plt>
mov    0x8(%rsp),%rdi
call   1040 <deleteTree@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.Node = type { i32 }
define void @orderTree(double* %0, i8* %1, double* %2, i32 %3, i32 %4) {
%6 = alloca double*
%7 = alloca i8*
%8 = alloca double*
%9 = alloca i32
%10 = alloca i32
%11 = alloca %struct.Node*
store double* %0, double** %6
store i8* %1, i8** %7
store double* %2, double** %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i8*, i8** %7
%13 = load double*, double** %8
%14 = load i32, i32* %9
%15 = load i32, i32* %10
%16 = call i32 @initializeRoot(%struct.Node** %11, i8* %12, double* %13, i32 %14, i32 %15)
%17 = load %struct.Node*, %struct.Node** %11
%18 = call i32 @computeMaximalMean(%struct.Node* %17)
%19 = load double*, double** %6
%20 = load %struct.Node*, %struct.Node** %11
%21 = call i32 @computeSolution(double* %19, %struct.Node* %20)
%22 = load %struct.Node*, %struct.Node** %11
%23 = call i32 @deleteTree(%struct.Node* %22)
ret void
}

LLVM IR (-O2):
%struct.Node = type { i32 }
define void @orderTree(double* %0, i8* %1, double* %2, i32 %3, i32 %4) {
%6 = alloca %struct.Node*
%7 = bitcast %struct.Node** %6 to i8*
%8 = call i32 @initializeRoot(%struct.Node** %6, i8* %1, double* %2, i32 %3, i32 %4)
%9 = load %struct.Node*, %struct.Node** %6
%10 = call i32 @computeMaximalMean(%struct.Node* %9)
%11 = load %struct.Node*, %struct.Node** %6
%12 = call i32 @computeSolution(double* %0, %struct.Node* %11)
%13 = load %struct.Node*, %struct.Node** %6
%14 = call i32 @deleteTree(%struct.Node* %13)
ret void
}