#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 */
double __builtin_powi(double, int);
int /*<<< orphan*/ abort();
double cbrt(double);
double volatile convert_it_1(double);
double volatile convert_it_2(double);
double volatile convert_it_3(double);
double volatile convert_it_4(double);
double fabs(double volatile);
int main(int argc, char *argv[]) {
  double values[6] = {3.0, 1.95, 2.227, 4.0, 256.0, .0008797};
  double PREC = .999999;
  unsigned i;
  for (i = 0; i < 6; i++) {
    volatile double x, y;
    x = __builtin_powi(values[i], 3);
    y = __builtin_powi(cbrt(values[i]), 1);
    if (fabs(convert_it_1(values[i]) / (x * y)) < PREC)
      abort();
    x = __builtin_powi(values[i], 3);
    y = __builtin_powi(cbrt(values[i]), 2);
    if (fabs(convert_it_2(values[i]) / (x * y)) < PREC)
      abort();
    x = __builtin_powi(values[i], -3);
    y = __builtin_powi(cbrt(values[i]), 2);
    if (fabs(convert_it_3(values[i]) / (x * y)) < PREC)
      abort();
    x = __builtin_powi(values[i], -3);
    y = __builtin_powi(cbrt(values[i]), 1);
    if (fabs(convert_it_4(values[i]) / (x * y)) < PREC)
      abort();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1060 <memset@plt>
movsd  0xe92(%rip),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  0xe7d(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xe68(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe53(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe3e(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  0xe29(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xe14(%rip),%xmm0
movsd  %xmm0,-0x48(%rbp)
movl   $0x0,-0x4c(%rbp)
cmpl   $0x6,-0x4c(%rbp)
jae    13f5 <main+0x285>
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
movaps %xmm0,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1070 <cbrt@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1040 <convert_it_1@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movaps 0xde8(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1272 <main+0x102>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
movaps %xmm0,%xmm1
mulsd  %xmm1,%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1070 <cbrt@plt>
mulsd  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1090 <convert_it_2@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movaps 0xd74(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    12e6 <main+0x176>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm1
movaps %xmm1,%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xd36(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1070 <cbrt@plt>
mulsd  %xmm0,%xmm0
movsd  %xmm0,-0x60(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1050 <convert_it_3@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movaps 0xcf4(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1366 <main+0x1f6>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm1
movaps %xmm1,%xmm0
mulsd  %xmm0,%xmm0
mulsd  %xmm0,%xmm1
movsd  0xcb6(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x58(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1070 <cbrt@plt>
movsd  %xmm0,-0x60(%rbp)
mov    -0x4c(%rbp),%eax
movsd  -0x40(%rbp,%rax,8),%xmm0
call   1080 <convert_it_4@plt>
movaps %xmm0,%xmm1
movsd  -0x58(%rbp),%xmm0
movsd  -0x60(%rbp),%xmm2
mulsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
movaps 0xc78(%rip),%xmm0
pand   %xmm0,%xmm1
movsd  -0x48(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    13e2 <main+0x272>
mov    $0x0,%al
call   1030 <abort@plt>
jmp    13e7 <main+0x277>
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    11f8 <main+0x88>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x60,%rsp
movaps 0xe94(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xe98(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xe9c(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movsd  0xeaf(%rip),%xmm0
movsd  %xmm0,0x10(%rsp)
mov    $0x1,%ebx
nopl   0x0(%rax)
movsd  0x10(%rsp),%xmm0
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,0x18(%rsp)
movsd  %xmm1,0x8(%rsp)
call   1060 <cbrt@plt>
movsd  %xmm0,0x20(%rsp)
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1040 <convert_it_1@plt>
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
divsd  %xmm1,%xmm0
movapd 0xe40(%rip),%xmm1
andpd  %xmm1,%xmm0
movsd  0xe4c(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     131a <main+0x1ba>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
mulsd  %xmm0,%xmm0
movsd  %xmm0,0x28(%rsp)
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1080 <convert_it_2@plt>
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
divsd  %xmm1,%xmm0
andpd  0xde7(%rip),%xmm0
movsd  0xdf7(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     131a <main+0x1ba>
movsd  0xded(%rip),%xmm0
divsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x18(%rsp)
movsd  %xmm0,0x8(%rsp)
movsd  0x28(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1050 <convert_it_3@plt>
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
divsd  %xmm1,%xmm0
andpd  0xd8e(%rip),%xmm0
movsd  0xd9e(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     131a <main+0x1ba>
movsd  0x18(%rsp),%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x20(%rsp),%xmm0
movsd  %xmm0,(%rsp)
movsd  0x10(%rsp),%xmm0
call   1070 <convert_it_4@plt>
movsd  0x8(%rsp),%xmm1
mulsd  (%rsp),%xmm1
divsd  %xmm1,%xmm0
andpd  0xd47(%rip),%xmm0
movsd  0xd57(%rip),%xmm1
ucomisd %xmm0,%xmm1
ja     131a <main+0x1ba>
cmp    $0x6,%rbx
je     1312 <main+0x1b2>
movsd  0x30(%rsp,%rbx,8),%xmm0
movsd  %xmm0,0x10(%rsp)
add    $0x1,%rbx
jmp    11a0 <main+0x40>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [6 x double]
%7 = alloca double
%8 = alloca i32
%9 = alloca double
%10 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = bitcast [6 x double]* %6 to i8*
%12 = bitcast i8* %11 to [6 x double]*
%13 = getelementptr inbounds [6 x double], [6 x double]* %12, i32 0, i32 0
store double 3.000000e+00, double* %13
%14 = getelementptr inbounds [6 x double], [6 x double]* %12, i32 0, i32 1
store double 1.950000e+00, double* %14
%15 = getelementptr inbounds [6 x double], [6 x double]* %12, i32 0, i32 2
store double 2.227000e+00, double* %15
%16 = getelementptr inbounds [6 x double], [6 x double]* %12, i32 0, i32 3
store double 4.000000e+00, double* %16
%17 = getelementptr inbounds [6 x double], [6 x double]* %12, i32 0, i32 4
store double 2.560000e+02, double* %17
%18 = getelementptr inbounds [6 x double], [6 x double]* %12, i32 0, i32 5
store double 8.797000e-04, double* %18
store double 0x3FEFFFFDE7210BE9, double* %7
store i32 0, i32* %8
br label %19
19: ; preds = %127, %2
%20 = load i32, i32* %8
%21 = icmp ult i32 %20, 6
br i1 %21, label %22, label %130
22: ; preds = %19
%23 = load i32, i32* %8
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %24
%26 = load double, double* %25
%27 = call double @llvm.powi.f64.i32(double %26, i32 3)
store volatile double %27, double* %9
%28 = load i32, i32* %8
%29 = zext i32 %28 to i64
%30 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %29
%31 = load double, double* %30
%32 = call double @cbrt(double %31)
%33 = call double @llvm.powi.f64.i32(double %32, i32 1)
store volatile double %33, double* %10
%34 = load i32, i32* %8
%35 = zext i32 %34 to i64
%36 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %35
%37 = load double, double* %36
%38 = call double @convert_it_1(double %37)
%39 = load volatile double, double* %9
%40 = load volatile double, double* %10
%41 = fmul double %39, %40
%42 = fdiv double %38, %41
%43 = call double @llvm.fabs.f64(double %42)
%44 = load double, double* %7
%45 = fcmp olt double %43, %44
br i1 %45, label %46, label %48
46: ; preds = %22
%47 = call i32 (...) @abort()
unreachable
48: ; preds = %22
%49 = load i32, i32* %8
%50 = zext i32 %49 to i64
%51 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %50
%52 = load double, double* %51
%53 = call double @llvm.powi.f64.i32(double %52, i32 3)
store volatile double %53, double* %9
%54 = load i32, i32* %8
%55 = zext i32 %54 to i64
%56 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %55
%57 = load double, double* %56
%58 = call double @cbrt(double %57)
%59 = call double @llvm.powi.f64.i32(double %58, i32 2)
store volatile double %59, double* %10
%60 = load i32, i32* %8
%61 = zext i32 %60 to i64
%62 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %61
%63 = load double, double* %62
%64 = call double @convert_it_2(double %63)
%65 = load volatile double, double* %9
%66 = load volatile double, double* %10
%67 = fmul double %65, %66
%68 = fdiv double %64, %67
%69 = call double @llvm.fabs.f64(double %68)
%70 = load double, double* %7
%71 = fcmp olt double %69, %70
br i1 %71, label %72, label %74
72: ; preds = %48
%73 = call i32 (...) @abort()
unreachable
74: ; preds = %48
%75 = load i32, i32* %8
%76 = zext i32 %75 to i64
%77 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %76
%78 = load double, double* %77
%79 = call double @llvm.powi.f64.i32(double %78, i32 -3)
store volatile double %79, double* %9
%80 = load i32, i32* %8
%81 = zext i32 %80 to i64
%82 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %81
%83 = load double, double* %82
%84 = call double @cbrt(double %83)
%85 = call double @llvm.powi.f64.i32(double %84, i32 2)
store volatile double %85, double* %10
%86 = load i32, i32* %8
%87 = zext i32 %86 to i64
%88 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %87
%89 = load double, double* %88
%90 = call double @convert_it_3(double %89)
%91 = load volatile double, double* %9
%92 = load volatile double, double* %10
%93 = fmul double %91, %92
%94 = fdiv double %90, %93
%95 = call double @llvm.fabs.f64(double %94)
%96 = load double, double* %7
%97 = fcmp olt double %95, %96
br i1 %97, label %98, label %100
98: ; preds = %74
%99 = call i32 (...) @abort()
unreachable
100: ; preds = %74
%101 = load i32, i32* %8
%102 = zext i32 %101 to i64
%103 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %102
%104 = load double, double* %103
%105 = call double @llvm.powi.f64.i32(double %104, i32 -3)
store volatile double %105, double* %9
%106 = load i32, i32* %8
%107 = zext i32 %106 to i64
%108 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %107
%109 = load double, double* %108
%110 = call double @cbrt(double %109)
%111 = call double @llvm.powi.f64.i32(double %110, i32 1)
store volatile double %111, double* %10
%112 = load i32, i32* %8
%113 = zext i32 %112 to i64
%114 = getelementptr inbounds [6 x double], [6 x double]* %6, i64 0, i64 %113
%115 = load double, double* %114
%116 = call double @convert_it_4(double %115)
%117 = load volatile double, double* %9
%118 = load volatile double, double* %10
%119 = fmul double %117, %118
%120 = fdiv double %116, %119
%121 = call double @llvm.fabs.f64(double %120)
%122 = load double, double* %7
%123 = fcmp olt double %121, %122
br i1 %123, label %124, label %126
124: ; preds = %100
%125 = call i32 (...) @abort()
unreachable
126: ; preds = %100
br label %127
127: ; preds = %126
%128 = load i32, i32* %8
%129 = add i32 %128, 1
store i32 %129, i32* %8
br label %19
130: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [6 x double]
%4 = alloca double
%5 = alloca double
%6 = bitcast [6 x double]* %3 to i8*
%7 = bitcast [6 x double]* %3 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 1.950000e+00>, <2 x double>* %7
%8 = getelementptr inbounds [6 x double], [6 x double]* %3, i64 0, i64 2
%9 = bitcast double* %8 to <2 x double>*
store <2 x double> <double 2.227000e+00, double 4.000000e+00>, <2 x double>* %9
%10 = getelementptr inbounds [6 x double], [6 x double]* %3, i64 0, i64 4
%11 = bitcast double* %10 to <2 x double>*
store <2 x double> <double 2.560000e+02, double 8.797000e-04>, <2 x double>* %11
%12 = bitcast double* %4 to i8*
%13 = bitcast double* %5 to i8*
br label %14
14: ; preds = %63, %2
%15 = phi double [ 3.000000e+00, %2 ], [ %65, %63 ]
%16 = phi i64 [ 0, %2 ], [ %61, %63 ]
%17 = tail call double @llvm.powi.f64.i32(double %15, i32 3)
store volatile double %17, double* %4
%18 = tail call double @cbrt(double %15)
store volatile double %18, double* %5
%19 = tail call double @convert_it_1(double %15)
%20 = load volatile double, double* %4
%21 = load volatile double, double* %5
%22 = fmul double %20, %21
%23 = fdiv double %19, %22
%24 = tail call double @llvm.fabs.f64(double %23)
%25 = fcmp olt double %24, 0x3FEFFFFDE7210BE9
br i1 %25, label %26, label %28
26: ; preds = %14
%27 = tail call i32 (...) @abort()
unreachable
28: ; preds = %14
store volatile double %17, double* %4
%29 = fmul double %18, %18
store volatile double %29, double* %5
%30 = tail call double @convert_it_2(double %15)
%31 = load volatile double, double* %4
%32 = load volatile double, double* %5
%33 = fmul double %31, %32
%34 = fdiv double %30, %33
%35 = tail call double @llvm.fabs.f64(double %34)
%36 = fcmp olt double %35, 0x3FEFFFFDE7210BE9
br i1 %36, label %37, label %39
37: ; preds = %28
%38 = tail call i32 (...) @abort()
unreachable
39: ; preds = %28
%40 = tail call double @llvm.powi.f64.i32(double %15, i32 -3)
store volatile double %40, double* %4
store volatile double %29, double* %5
%41 = tail call double @convert_it_3(double %15)
%42 = load volatile double, double* %4
%43 = load volatile double, double* %5
%44 = fmul double %42, %43
%45 = fdiv double %41, %44
%46 = tail call double @llvm.fabs.f64(double %45)
%47 = fcmp olt double %46, 0x3FEFFFFDE7210BE9
br i1 %47, label %48, label %50
48: ; preds = %39
%49 = tail call i32 (...) @abort()
unreachable
50: ; preds = %39
store volatile double %40, double* %4
store volatile double %18, double* %5
%51 = tail call double @convert_it_4(double %15)
%52 = load volatile double, double* %4
%53 = load volatile double, double* %5
%54 = fmul double %52, %53
%55 = fdiv double %51, %54
%56 = tail call double @llvm.fabs.f64(double %55)
%57 = fcmp olt double %56, 0x3FEFFFFDE7210BE9
br i1 %57, label %58, label %60
58: ; preds = %50
%59 = tail call i32 (...) @abort()
unreachable
60: ; preds = %50
%61 = add nuw nsw i64 %16, 1
%62 = icmp eq i64 %61, 6
br i1 %62, label %66, label %63
63: ; preds = %60
%64 = getelementptr inbounds [6 x double], [6 x double]* %3, i64 0, i64 %61
%65 = load double, double* %64
br label %14
66: ; preds = %60
ret i32 0
}