#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*/ grvpilo_(double *, double *, double *, double *, double *,
                            double *, double *, double *, double *);
int /*<<< orphan*/ memset(double *, int /*<<< orphan*/, int);
double sqrt(double);
void GRVpi_LO(double x, double QQ, double xF[]) {
  double ZX, ZQ, ZUV, ZDV, SEA, ZSB, ZCB, ZBB, ZGL;
  if (x > 0.99999) {
    memset(xF, 0, 6 * sizeof(double));
    return;
  }
  ZX = x;
  ZQ = sqrt(QQ);
  grvpilo_(&ZX, &ZQ, &ZUV, &ZDV, &SEA, &ZSB, &ZCB, &ZBB, &ZGL);
  xF[0] = ZGL;
  xF[1] = ZDV;
  xF[2] = SEA;
  xF[3] = ZSB;
  xF[4] = ZCB;
  xF[5] = ZBB;
}


x86 assembly (clang, -O0):
<GRVpi_LO>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xeaa(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1175 <GRVpi_LO+0x45>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
jmp    1218 <GRVpi_LO+0xe8>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
lea    -0x38(%rbp),%rcx
lea    -0x40(%rbp),%r8
lea    -0x48(%rbp),%r9
lea    -0x50(%rbp),%r11
lea    -0x58(%rbp),%r10
lea    -0x60(%rbp),%rax
mov    %r11,(%rsp)
mov    %r10,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <grvpilo_@plt>
movsd  -0x60(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,(%rax)
movsd  -0x38(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x8(%rax)
movsd  -0x40(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x10(%rax)
movsd  -0x48(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x18(%rax)
movsd  -0x50(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x20(%rax)
movsd  -0x58(%rbp),%xmm0
mov    -0x18(%rbp),%rax
movsd  %xmm0,0x28(%rax)
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GRVpi_LO>:
push   %rbx
sub    $0x50,%rsp
mov    %rdi,%rbx
ucomisd 0xec0(%rip),%xmm0
jbe    1156 <GRVpi_LO+0x26>
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x30,%edx
add    $0x50,%rsp
pop    %rbx
jmp    1040 <memset@plt>
movsd  %xmm0,0x40(%rsp)
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm1
jb     116f <GRVpi_LO+0x3f>
xorps  %xmm0,%xmm0
sqrtsd %xmm1,%xmm0
jmp    1178 <GRVpi_LO+0x48>
movapd %xmm1,%xmm0
call   1050 <sqrt@plt>
movsd  %xmm0,0x38(%rsp)
sub    $0x8,%rsp
lea    0x10(%rsp),%rax
lea    0x18(%rsp),%r10
lea    0x20(%rsp),%r11
lea    0x48(%rsp),%rdi
lea    0x40(%rsp),%rsi
lea    0x50(%rsp),%rdx
lea    0x38(%rsp),%rcx
lea    0x30(%rsp),%r8
lea    0x28(%rsp),%r9
push   %rax
push   %r10
push   %r11
call   1030 <grvpilo_@plt>
add    $0x20,%rsp
movsd  0x8(%rsp),%xmm0
movsd  %xmm0,(%rbx)
movsd  0x30(%rsp),%xmm0
movsd  %xmm0,0x8(%rbx)
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,0x10(%rbx)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,0x18(%rbx)
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x20(%rbx)
movsd  0x10(%rsp),%xmm0
movsd  %xmm0,0x28(%rbx)
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @GRVpi_LO(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
%14 = alloca double
%15 = alloca double
store double %0, double* %4
store double %1, double* %5
store double* %2, double** %6
%16 = load double, double* %4
%17 = fcmp ogt double %16, 9.999900e-01
br i1 %17, label %18, label %21
18: ; preds = %3
%19 = load double*, double** %6
%20 = call i32 @memset(double* %19, i32 0, i32 48)
br label %44
21: ; preds = %3
%22 = load double, double* %4
store double %22, double* %7
%23 = load double, double* %5
%24 = call double @sqrt(double %23)
store double %24, double* %8
%25 = call i32 @grvpilo_(double* %7, double* %8, double* %9, double* %10, double* %11, double* %12, double* %13, double* %14, double* %15)
%26 = load double, double* %15
%27 = load double*, double** %6
%28 = getelementptr inbounds double, double* %27, i64 0
store double %26, double* %28
%29 = load double, double* %10
%30 = load double*, double** %6
%31 = getelementptr inbounds double, double* %30, i64 1
store double %29, double* %31
%32 = load double, double* %11
%33 = load double*, double** %6
%34 = getelementptr inbounds double, double* %33, i64 2
store double %32, double* %34
%35 = load double, double* %12
%36 = load double*, double** %6
%37 = getelementptr inbounds double, double* %36, i64 3
store double %35, double* %37
%38 = load double, double* %13
%39 = load double*, double** %6
%40 = getelementptr inbounds double, double* %39, i64 4
store double %38, double* %40
%41 = load double, double* %14
%42 = load double*, double** %6
%43 = getelementptr inbounds double, double* %42, i64 5
store double %41, double* %43
br label %44
44: ; preds = %21, %18
ret void
}

LLVM IR (-O2):
define void @GRVpi_LO(double %0, double %1, double* %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = bitcast double* %4 to i8*
%14 = bitcast double* %5 to i8*
%15 = bitcast double* %6 to i8*
%16 = bitcast double* %7 to i8*
%17 = bitcast double* %8 to i8*
%18 = bitcast double* %9 to i8*
%19 = bitcast double* %10 to i8*
%20 = bitcast double* %11 to i8*
%21 = bitcast double* %12 to i8*
%22 = fcmp ogt double %0, 9.999900e-01
br i1 %22, label %23, label %25
23: ; preds = %3
%24 = tail call i32 @memset(double* %2, i32 0, i32 48)
br label %39
25: ; preds = %3
store double %0, double* %4
%26 = tail call double @sqrt(double %1)
store double %26, double* %5
%27 = call i32 @grvpilo_(double* %4, double* %5, double* %6, double* %7, double* %8, double* %9, double* %10, double* %11, double* %12)
%28 = load double, double* %12
store double %28, double* %2
%29 = load double, double* %7
%30 = getelementptr inbounds double, double* %2, i64 1
store double %29, double* %30
%31 = load double, double* %8
%32 = getelementptr inbounds double, double* %2, i64 2
store double %31, double* %32
%33 = load double, double* %9
%34 = getelementptr inbounds double, double* %2, i64 3
store double %33, double* %34
%35 = load double, double* %10
%36 = getelementptr inbounds double, double* %2, i64 4
store double %35, double* %36
%37 = load double, double* %11
%38 = getelementptr inbounds double, double* %2, i64 5
store double %37, double* %38
br label %39
39: ; preds = %25, %23
ret void
}