#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*/ printf(char *, ...);
int /*<<< orphan*/ qd_div(double *, double *, double *);
int /*<<< orphan*/ qd_mul(double *, double *, double *);
int /*<<< orphan*/ qd_sqr(double *, double *);
int div_sqr_of_pi(void) {
  const double qd_pi_0 = 3.141592653589793116e+00;
  const double qd_pi_1 = 1.224646799147353207e-16;
  const double qd_pi_2 = -2.994769809718339666e-33;
  const double qd_pi_3 = 1.112454220863365282e-49;
  double qd_pi[4];
  double sqr_pi[4];
  double pi_times_pi[4];
  double div_of_sqr_of_pi[4];
  qd_pi[0] = qd_pi_0;
  qd_pi[1] = qd_pi_1;
  qd_pi[2] = qd_pi_2;
  qd_pi[3] = qd_pi_3;
  printf("\ntesting pi^2/pi ...\n");
  qd_sqr(qd_pi, sqr_pi);
  qd_mul(qd_pi, qd_pi, pi_times_pi);
  qd_div(sqr_pi, qd_pi, div_of_sqr_of_pi);
  printf("pi[0] = %22.14e  pi^2[0] = %22.14e\n", qd_pi[0], sqr_pi[0]);
  printf("pi[1] = %22.14e  pi^2[1] = %22.14e\n", qd_pi[1], sqr_pi[1]);
  printf("pi[2] = %22.14e  pi^2[2] = %22.14e\n", qd_pi[2], sqr_pi[2]);
  printf("pi[3] = %22.14e  pi^2[3] = %22.14e\n", qd_pi[3], sqr_pi[3]);
  printf("pi*pi[0] = %22.14e  pi^2/pi[0] = %22.14e\n", pi_times_pi[0],
         div_of_sqr_of_pi[0]);
  printf("pi*pi[1] = %22.14e  pi^2/pi[1] = %22.14e\n", pi_times_pi[1],
         div_of_sqr_of_pi[1]);
  printf("pi*pi[2] = %22.14e  pi^2/pi[2] = %22.14e\n", pi_times_pi[2],
         div_of_sqr_of_pi[2]);
  printf("pi*pi[3] = %22.14e  pi^2/pi[3] = %22.14e\n", pi_times_pi[3],
         div_of_sqr_of_pi[3]);
  return 0;
}


x86 assembly (clang, -O0):
<div_sqr_of_pi>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
movsd  0xec5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xeb0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xe9b(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe86(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe91(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe7c(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe67(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe52(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
lea    0xe66(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x40(%rbp),%rdi
lea    -0x60(%rbp),%rsi
call   1040 <qd_sqr@plt>
lea    -0x40(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0x80(%rbp),%rdx
call   1050 <qd_mul@plt>
lea    -0x60(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
call   1060 <qd_div@plt>
movsd  -0x40(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm1
lea    0xe32(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x38(%rbp),%xmm0
movsd  -0x58(%rbp),%xmm1
lea    0xe3e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x50(%rbp),%xmm1
lea    0xe4a(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x48(%rbp),%xmm1
lea    0xe56(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x80(%rbp),%xmm0
movsd  -0xa0(%rbp),%xmm1
ff
lea    0xe5f(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x78(%rbp),%xmm0
movsd  -0x98(%rbp),%xmm1
ff
lea    0xe6e(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x70(%rbp),%xmm0
movsd  -0x90(%rbp),%xmm1
ff
lea    0xe7d(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
movsd  -0x68(%rbp),%xmm0
movsd  -0x88(%rbp),%xmm1
ff
lea    0xe8c(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_sqr_of_pi>:
push   %r14
push   %rbx
sub    $0x88,%rsp
movaps 0xe9f(%rip),%xmm0
movaps %xmm0,(%rsp)
movaps 0xea4(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
lea    0xfe0(%rip),%rdi
call   1030 <puts@plt>
mov    %rsp,%rbx
lea    0x60(%rsp),%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <qd_sqr@plt>
lea    0x40(%rsp),%rdx
mov    %rbx,%rdi
mov    %rbx,%rsi
call   1060 <qd_mul@plt>
lea    0x20(%rsp),%rdx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1070 <qd_div@plt>
movsd  (%rsp),%xmm0
movsd  0x60(%rsp),%xmm1
lea    0xe5e(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x8(%rsp),%xmm0
movsd  0x68(%rsp),%xmm1
lea    0xe68(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x70(%rsp),%xmm1
lea    0xe72(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x18(%rsp),%xmm0
movsd  0x78(%rsp),%xmm1
lea    0xe7c(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x40(%rsp),%xmm0
movsd  0x20(%rsp),%xmm1
lea    0xe86(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x48(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
lea    0xe96(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x50(%rsp),%xmm0
movsd  0x30(%rsp),%xmm1
lea    0xea6(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  0x58(%rsp),%xmm0
movsd  0x38(%rsp),%xmm1
lea    0xeb6(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [22 x i8] c"\0Atesting pi^2/pi ...\0A\00"
@.str.1 = [36 x i8] c"pi[0] = %22.14e pi^2[0] = %22.14e\0A\00"
@.str.2 = [36 x i8] c"pi[1] = %22.14e pi^2[1] = %22.14e\0A\00"
@.str.3 = [36 x i8] c"pi[2] = %22.14e pi^2[2] = %22.14e\0A\00"
@.str.4 = [36 x i8] c"pi[3] = %22.14e pi^2[3] = %22.14e\0A\00"
@.str.5 = [42 x i8] c"pi*pi[0] = %22.14e pi^2/pi[0] = %22.14e\0A\00"
@.str.6 = [42 x i8] c"pi*pi[1] = %22.14e pi^2/pi[1] = %22.14e\0A\00"
@.str.7 = [42 x i8] c"pi*pi[2] = %22.14e pi^2/pi[2] = %22.14e\0A\00"
@.str.8 = [42 x i8] c"pi*pi[3] = %22.14e pi^2/pi[3] = %22.14e\0A\00"
define i32 @div_sqr_of_pi() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca [4 x double]
%6 = alloca [4 x double]
%7 = alloca [4 x double]
%8 = alloca [4 x double]
store double 0x400921FB54442D18, double* %1
store double 0x3CA1A62633145C07, double* %2
store double 0xB92F1976B7ED8FBC, double* %3
store double 0x35C4CF98E804177D, double* %4
%9 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
store double 0x400921FB54442D18, double* %9
%10 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
store double 0x3CA1A62633145C07, double* %10
%11 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
store double 0xB92F1976B7ED8FBC, double* %11
%12 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 3
store double 0x35C4CF98E804177D, double* %12
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%14 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%15 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%16 = call i32 @qd_sqr(double* %14, double* %15)
%17 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%18 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%19 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%20 = call i32 @qd_mul(double* %17, double* %18, double* %19)
%21 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%22 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%23 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%24 = call i32 @qd_div(double* %21, double* %22, double* %23)
%25 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 0
%26 = load double, double* %25
%27 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 0
%28 = load double, double* %27
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), double %26, double %28)
%30 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 1
%31 = load double, double* %30
%32 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 1
%33 = load double, double* %32
%34 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), double %31, double %33)
%35 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 2
%36 = load double, double* %35
%37 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 2
%38 = load double, double* %37
%39 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), double %36, double %38)
%40 = getelementptr inbounds [4 x double], [4 x double]* %5, i64 0, i64 3
%41 = load double, double* %40
%42 = getelementptr inbounds [4 x double], [4 x double]* %6, i64 0, i64 3
%43 = load double, double* %42
%44 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), double %41, double %43)
%45 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 0
%46 = load double, double* %45
%47 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 0
%48 = load double, double* %47
%49 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), double %46, double %48)
%50 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 1
%51 = load double, double* %50
%52 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 1
%53 = load double, double* %52
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), double %51, double %53)
%55 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 2
%56 = load double, double* %55
%57 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 2
%58 = load double, double* %57
%59 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), double %56, double %58)
%60 = getelementptr inbounds [4 x double], [4 x double]* %7, i64 0, i64 3
%61 = load double, double* %60
%62 = getelementptr inbounds [4 x double], [4 x double]* %8, i64 0, i64 3
%63 = load double, double* %62
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), double %61, double %63)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [36 x i8] c"pi[0] = %22.14e pi^2[0] = %22.14e\0A\00"
@.str.2 = [36 x i8] c"pi[1] = %22.14e pi^2[1] = %22.14e\0A\00"
@.str.3 = [36 x i8] c"pi[2] = %22.14e pi^2[2] = %22.14e\0A\00"
@.str.4 = [36 x i8] c"pi[3] = %22.14e pi^2[3] = %22.14e\0A\00"
@.str.5 = [42 x i8] c"pi*pi[0] = %22.14e pi^2/pi[0] = %22.14e\0A\00"
@.str.6 = [42 x i8] c"pi*pi[1] = %22.14e pi^2/pi[1] = %22.14e\0A\00"
@.str.7 = [42 x i8] c"pi*pi[2] = %22.14e pi^2/pi[2] = %22.14e\0A\00"
@.str.8 = [42 x i8] c"pi*pi[3] = %22.14e pi^2/pi[3] = %22.14e\0A\00"
@str = [21 x i8] c"\0Atesting pi^2/pi ...\00"
define i32 @div_sqr_of_pi() {
%1 = alloca [4 x double]
%2 = alloca [4 x double]
%3 = alloca [4 x double]
%4 = alloca [4 x double]
%5 = bitcast [4 x double]* %1 to i8*
%6 = bitcast [4 x double]* %2 to i8*
%7 = bitcast [4 x double]* %3 to i8*
%8 = bitcast [4 x double]* %4 to i8*
%9 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%10 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 1
%11 = bitcast [4 x double]* %1 to <2 x double>*
store <2 x double> <double 0x400921FB54442D18, double 0x3CA1A62633145C07>, <2 x double>* %11
%12 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 2
%13 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 3
%14 = bitcast double* %12 to <2 x double>*
store <2 x double> <double 0xB92F1976B7ED8FBC, double 0x35C4CF98E804177D>, <2 x double>* %14
%15 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%16 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%17 = call i32 @qd_sqr(double* %9, double* %16)
%18 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%19 = call i32 @qd_mul(double* %9, double* %9, double* %18)
%20 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%21 = call i32 @qd_div(double* %16, double* %9, double* %20)
%22 = load double, double* %9
%23 = load double, double* %16
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), double %22, double %23)
%25 = load double, double* %10
%26 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 1
%27 = load double, double* %26
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.2, i64 0, i64 0), double %25, double %27)
%29 = load double, double* %12
%30 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 2
%31 = load double, double* %30
%32 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.3, i64 0, i64 0), double %29, double %31)
%33 = load double, double* %13
%34 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 3
%35 = load double, double* %34
%36 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str.4, i64 0, i64 0), double %33, double %35)
%37 = load double, double* %18
%38 = load double, double* %20
%39 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.5, i64 0, i64 0), double %37, double %38)
%40 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 1
%41 = load double, double* %40
%42 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 1
%43 = load double, double* %42
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0), double %41, double %43)
%45 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 2
%46 = load double, double* %45
%47 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%48 = load double, double* %47
%49 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.7, i64 0, i64 0), double %46, double %48)
%50 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 3
%51 = load double, double* %50
%52 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 3
%53 = load double, double* %52
%54 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), double %51, double %53)
ret i32 0
}