#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*/ gsl_test_rel(double const, double const, double const,
                                char *, char const *, char const *);
void osborne_checksol(const double x[], const double sumsq, const double epsrel,
                      const char *sname, const char *pname) {
  const double sumsq_exact = 5.464894697482687e-05;
  const double osborne_x[5] = {3.754100521058740e-01, -99999.0, -99999.0,
                               -99999.0, -99999.0};
  gsl_test_rel(sumsq, sumsq_exact, epsrel, "%s/%s sumsq", sname, pname);
  gsl_test_rel(x[0], osborne_x[0], epsrel, "%s/%s i=0", sname, pname);
}


x86 assembly (clang, -O0):
<osborne_checksol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
mov    %rsi,-0x20(%rbp)
mov    %rdx,-0x28(%rbp)
movsd  0xeba(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    -0x60(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movsd  0xead(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
movsd  0xe98(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe8b(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe7e(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe71(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
movsd  0xe4a(%rip),%xmm1
lea    0xe5b(%rip),%rdi
call   1030 <gsl_test_rel@plt>
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  -0x60(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
mov    -0x20(%rbp),%rsi
mov    -0x28(%rbp),%rdx
lea    0xe41(%rip),%rdi
call   1030 <gsl_test_rel@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<osborne_checksol>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %rsi,%rbx
movaps %xmm1,%xmm2
movsd  %xmm1,0x8(%rsp)
mov    %rdi,%r15
lea    0xede(%rip),%rdi
movsd  0xec6(%rip),%xmm1
call   1030 <gsl_test_rel@plt>
movsd  (%r15),%xmm0
lea    0xed1(%rip),%rdi
movsd  0xeb5(%rip),%xmm1
movsd  0x8(%rsp),%xmm2
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <gsl_test_rel@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"%s/%s sumsq\00"
@.str.1 = [10 x i8] c"%s/%s i=0\00"
define void @osborne_checksol(double* %0, double %1, double %2, i8* %3, i8* %4) {
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca double
%12 = alloca [5 x double]
store double* %0, double** %6
store double %1, double* %7
store double %2, double* %8
store i8* %3, i8** %9
store i8* %4, i8** %10
store double 0x3F0CA6DB85280299, double* %11
%13 = bitcast [5 x double]* %12 to i8*
%14 = bitcast i8* %13 to [5 x double]*
%15 = getelementptr inbounds [5 x double], [5 x double]* %14, i32 0, i32 0
store double 0x3FD806B7E21899C3, double* %15
%16 = getelementptr inbounds [5 x double], [5 x double]* %14, i32 0, i32 1
store double -9.999900e+04, double* %16
%17 = getelementptr inbounds [5 x double], [5 x double]* %14, i32 0, i32 2
store double -9.999900e+04, double* %17
%18 = getelementptr inbounds [5 x double], [5 x double]* %14, i32 0, i32 3
store double -9.999900e+04, double* %18
%19 = getelementptr inbounds [5 x double], [5 x double]* %14, i32 0, i32 4
store double -9.999900e+04, double* %19
%20 = load double, double* %7
%21 = load double, double* %8
%22 = load i8*, i8** %9
%23 = load i8*, i8** %10
%24 = call i32 @gsl_test_rel(double %20, double 0x3F0CA6DB85280299, double %21, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %22, i8* %23)
%25 = load double*, double** %6
%26 = getelementptr inbounds double, double* %25, i64 0
%27 = load double, double* %26
%28 = getelementptr inbounds [5 x double], [5 x double]* %12, i64 0, i64 0
%29 = load double, double* %28
%30 = load double, double* %8
%31 = load i8*, i8** %9
%32 = load i8*, i8** %10
%33 = call i32 @gsl_test_rel(double %27, double %29, double %30, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %31, i8* %32)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"%s/%s sumsq\00"
@.str.1 = [10 x i8] c"%s/%s i=0\00"
define void @osborne_checksol(double* nocapture %0, double %1, double %2, i8* %3, i8* %4) {
%6 = tail call i32 @gsl_test_rel(double %1, double 0x3F0CA6DB85280299, double %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%7 = load double, double* %0
%8 = tail call i32 @gsl_test_rel(double %7, double 0x3FD806B7E21899C3, double %2, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i8* %3, i8* %4)
ret void
}