#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_add(double *, double *, double *);
int /*<<< orphan*/ qd_sub(double *, double *, double *);
int add_sub_of_pi_e(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];
  const double qd_e_0 = 2.718281828459045091e+00;
  const double qd_e_1 = 1.445646891729250158e-16;
  const double qd_e_2 = -2.127717108038176765e-33;
  const double qd_e_3 = 1.515630159841218954e-49;
  double qd_e[4];
  double pi_and_e[4];
  double pi_and_e_minus_pi[4];
  printf("\ntesting pi + e - pi ...\n");
  qd_pi[0] = qd_pi_0;
  qd_pi[1] = qd_pi_1;
  qd_pi[2] = qd_pi_2;
  qd_pi[3] = qd_pi_3;
  qd_e[0] = qd_e_0;
  qd_e[1] = qd_e_1;
  qd_e[2] = qd_e_2;
  qd_e[3] = qd_e_3;
  printf("pi[0] = %22.14e  e[0] = %22.14e\n", qd_pi[0], qd_e[0]);
  printf("pi[1] = %22.14e  e[1] = %22.14e\n", qd_pi[1], qd_e[1]);
  printf("pi[2] = %22.14e  e[2] = %22.14e\n", qd_pi[2], qd_e[2]);
  printf("pi[3] = %22.14e  e[3] = %22.14e\n", qd_pi[3], qd_e[3]);
  qd_add(qd_pi, qd_e, pi_and_e);
  qd_sub(pi_and_e, qd_pi, pi_and_e_minus_pi);
  printf("pi+e[0] = %22.14e  pi+e-pi[0] = %22.14e\n", pi_and_e[0],
         pi_and_e_minus_pi[0]);
  printf("pi+e[1] = %22.14e  pi+e-pi[1] = %22.14e\n", pi_and_e[1],
         pi_and_e_minus_pi[1]);
  printf("pi+e[2] = %22.14e  pi+e-pi[2] = %22.14e\n", pi_and_e[2],
         pi_and_e_minus_pi[2]);
  printf("pi+e[3] = %22.14e  pi+e-pi[3] = %22.14e\n", pi_and_e[3],
         pi_and_e_minus_pi[3]);
  return 0;
}


x86 assembly (clang, -O0):
<add_sub_of_pi_e>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
movsd  0xef5(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecb(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb6(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xea1(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xe8c(%rip),%xmm0
movsd  %xmm0,-0x50(%rbp)
movsd  0xe77(%rip),%xmm0
movsd  %xmm0,-0x58(%rbp)
movsd  0xe62(%rip),%xmm0
movsd  %xmm0,-0x60(%rbp)
lea    0xe96(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movsd  0xe7f(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe6a(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe55(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe40(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe2b(%rip),%xmm0
movsd  %xmm0,-0x80(%rbp)
movsd  0xe16(%rip),%xmm0
movsd  %xmm0,-0x78(%rbp)
movsd  0xe01(%rip),%xmm0
movsd  %xmm0,-0x70(%rbp)
movsd  0xdec(%rip),%xmm0
movsd  %xmm0,-0x68(%rbp)
movsd  -0x40(%rbp),%xmm0
movsd  -0x80(%rbp),%xmm1
lea    0xe30(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x38(%rbp),%xmm0
movsd  -0x78(%rbp),%xmm1
lea    0xe39(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x70(%rbp),%xmm1
lea    0xe42(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x28(%rbp),%xmm0
movsd  -0x68(%rbp),%xmm1
lea    0xe4b(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
lea    -0x40(%rbp),%rdi
lea    -0x80(%rbp),%rsi
lea    -0xa0(%rbp),%rdx
call   1050 <qd_add@plt>
lea    -0xa0(%rbp),%rdi
lea    -0x40(%rbp),%rsi
lea    -0xc0(%rbp),%rdx
call   1030 <qd_sub@plt>
movsd  -0xa0(%rbp),%xmm0
ff
movsd  -0xc0(%rbp),%xmm1
ff
lea    0xe23(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x98(%rbp),%xmm0
ff
movsd  -0xb8(%rbp),%xmm1
ff
lea    0xe2e(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x90(%rbp),%xmm0
ff
movsd  -0xb0(%rbp),%xmm1
ff
lea    0xe39(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movsd  -0x88(%rbp),%xmm0
ff
movsd  -0xa8(%rbp),%xmm1
ff
lea    0xe44(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_sub_of_pi_e>:
push   %r14
push   %rbx
sub    $0x88,%rsp
lea    0x1057(%rip),%rdi
call   1040 <puts@plt>
movaps 0xea3(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xea7(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xeab(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xeaf(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
lea    0xef3(%rip),%rdi
movsd  0xeab(%rip),%xmm0
movsd  0xeab(%rip),%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
lea    0xef6(%rip),%rdi
movsd  0xe9d(%rip),%xmm0
movsd  0xe9d(%rip),%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
lea    0xef9(%rip),%rdi
movsd  0xe8f(%rip),%xmm0
movsd  0xe8f(%rip),%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
lea    0xefc(%rip),%rdi
movsd  0xe81(%rip),%xmm0
movsd  0xe81(%rip),%xmm1
mov    $0x2,%al
call   1050 <printf@plt>
lea    0x60(%rsp),%r14
lea    0x40(%rsp),%rsi
lea    0x20(%rsp),%rbx
mov    %r14,%rdi
mov    %rbx,%rdx
call   1060 <qd_add@plt>
mov    %rsp,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <qd_sub@plt>
movsd  0x20(%rsp),%xmm0
movsd  (%rsp),%xmm1
lea    0xecc(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x28(%rsp),%xmm0
movsd  0x8(%rsp),%xmm1
lea    0xedb(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x30(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
lea    0xeea(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
movsd  0x38(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
lea    0xef9(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x88,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str.1 = [33 x i8] c"pi[0] = %22.14e e[0] = %22.14e\0A\00"
@.str.2 = [33 x i8] c"pi[1] = %22.14e e[1] = %22.14e\0A\00"
@.str.3 = [33 x i8] c"pi[2] = %22.14e e[2] = %22.14e\0A\00"
@.str.4 = [33 x i8] c"pi[3] = %22.14e e[3] = %22.14e\0A\00"
@.str.5 = [41 x i8] c"pi+e[0] = %22.14e pi+e-pi[0] = %22.14e\0A\00"
@.str.6 = [41 x i8] c"pi+e[1] = %22.14e pi+e-pi[1] = %22.14e\0A\00"
@.str.7 = [41 x i8] c"pi+e[2] = %22.14e pi+e-pi[2] = %22.14e\0A\00"
@.str.8 = [41 x i8] c"pi+e[3] = %22.14e pi+e-pi[3] = %22.14e\0A\00"
@str = [25 x i8] c"\0Atesting pi + e - pi ...\00"
define i32 @add_sub_of_pi_e() {
%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 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%10 = getelementptr inbounds [4 x double], [4 x double]* %1, i64 0, i64 0
%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 = bitcast double* %12 to <2 x double>*
store <2 x double> <double 0xB92F1976B7ED8FBC, double 0x35C4CF98E804177D>, <2 x double>* %13
%14 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 0
%15 = bitcast [4 x double]* %2 to <2 x double>*
store <2 x double> <double 0x4005BF0A8B145769, double 0x3CA4D57EE2B1013A>, <2 x double>* %15
%16 = getelementptr inbounds [4 x double], [4 x double]* %2, i64 0, i64 2
%17 = bitcast double* %16 to <2 x double>*
store <2 x double> <double 0xB92618713A31D3E2, double 0x35CC5A6D2B53C26C>, <2 x double>* %17
%18 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0), double 0x400921FB54442D18, double 0x4005BF0A8B145769)
%19 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), double 0x3CA1A62633145C07, double 0x3CA4D57EE2B1013A)
%20 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.3, i64 0, i64 0), double 0xB92F1976B7ED8FBC, double 0xB92618713A31D3E2)
%21 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.4, i64 0, i64 0), double 0x35C4CF98E804177D, double 0x35CC5A6D2B53C26C)
%22 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 0
%23 = call i32 @qd_add(double* %10, double* %14, double* %22)
%24 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 0
%25 = call i32 @qd_sub(double* %22, double* %10, double* %24)
%26 = load double, double* %22
%27 = load double, double* %24
%28 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.5, i64 0, i64 0), double %26, double %27)
%29 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 1
%30 = load double, double* %29
%31 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 1
%32 = load double, double* %31
%33 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.6, i64 0, i64 0), double %30, double %32)
%34 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 2
%35 = load double, double* %34
%36 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 2
%37 = load double, double* %36
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.7, i64 0, i64 0), double %35, double %37)
%39 = getelementptr inbounds [4 x double], [4 x double]* %3, i64 0, i64 3
%40 = load double, double* %39
%41 = getelementptr inbounds [4 x double], [4 x double]* %4, i64 0, i64 3
%42 = load double, double* %41
%43 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.8, i64 0, i64 0), double %40, double %42)
ret i32 0
}