#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*/ EigenSort(double *, double *, int);
int EigenTridagQLImplicit(double *, double *, int, double *);
int /*<<< orphan*/ HouseholderRealSym(double *, int, double *, double *);
int eigenRealSym(double A[], int n, double Root[], double Offdiag[]) {
  int status = 0;
  HouseholderRealSym(A, n, Root, Offdiag);
  status = EigenTridagQLImplicit(Root, Offdiag, n, A);
  EigenSort(Root, A, n);
  return (status);
}


x86 assembly (clang, -O0):
<eigenRealSym>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <HouseholderRealSym@plt>
mov    -0x18(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x8(%rbp),%rcx
call   1040 <EigenTridagQLImplicit@plt>
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1050 <EigenSort@plt>
mov    -0x24(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eigenRealSym>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%rbx
mov    %esi,%r15d
mov    %rdi,%rbp
call   1030 <HouseholderRealSym@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
mov    %rbp,%rcx
call   1040 <EigenTridagQLImplicit@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %r15d,%edx
call   1050 <EigenSort@plt>
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i32 @eigenRealSym(double* %0, i32 %1, double* %2, double* %3) {
%5 = alloca double*
%6 = alloca i32
%7 = alloca double*
%8 = alloca double*
%9 = alloca i32
store double* %0, double** %5
store i32 %1, i32* %6
store double* %2, double** %7
store double* %3, double** %8
store i32 0, i32* %9
%10 = load double*, double** %5
%11 = load i32, i32* %6
%12 = load double*, double** %7
%13 = load double*, double** %8
%14 = call i32 @HouseholderRealSym(double* %10, i32 %11, double* %12, double* %13)
%15 = load double*, double** %7
%16 = load double*, double** %8
%17 = load i32, i32* %6
%18 = load double*, double** %5
%19 = call i32 @EigenTridagQLImplicit(double* %15, double* %16, i32 %17, double* %18)
store i32 %19, i32* %9
%20 = load double*, double** %7
%21 = load double*, double** %5
%22 = load i32, i32* %6
%23 = call i32 @EigenSort(double* %20, double* %21, i32 %22)
%24 = load i32, i32* %9
ret i32 %24
}

LLVM IR (-O2):
define i32 @eigenRealSym(double* %0, i32 %1, double* %2, double* %3) {
%5 = tail call i32 @HouseholderRealSym(double* %0, i32 %1, double* %2, double* %3)
%6 = tail call i32 @EigenTridagQLImplicit(double* %2, double* %3, i32 %1, double* %0)
%7 = tail call i32 @EigenSort(double* %2, double* %0, i32 %1)
ret i32 %6
}