#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 */
float init_newtonf(float, float, float, float, float);
float babl_pow_24f(float x) {
  float y =
      init_newtonf(x, -1.f / 5, 0.9953189663f, 0.9594345146f, 0.6742970332f);
  int i;
  for (i = 0; i < 3; i++)
    y = (1.f + 1.f / 5) * y - ((1. / 5) * x * (y * y)) * ((y * y) * (y * y));
  x *= y;
  return x * x * x;
}


x86 assembly (clang, -O0):
<babl_pow_24f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xed6(%rip),%xmm1
movss  0xed2(%rip),%xmm2
movss  0xece(%rip),%xmm3
movss  0xeca(%rip),%xmm4
call   1030 <init_newtonf@plt>
movss  %xmm0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x3,-0xc(%rbp)
jge    11e7 <babl_pow_24f+0xd7>
movss  0xeab(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe99(%rip),%xmm0
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
mulss  -0x8(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
mulsd  %xmm2,%xmm0
movss  -0x8(%rbp),%xmm2
mulss  -0x8(%rbp),%xmm2
movss  -0x8(%rbp),%xmm3
mulss  -0x8(%rbp),%xmm3
mulss  %xmm3,%xmm2
cvtss2sd %xmm2,%xmm2
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <babl_pow_24f+0x43>
movss  -0x8(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<babl_pow_24f>:
push   %rax
movss  %xmm0,0x4(%rsp)
movss  0xee1(%rip),%xmm1
movss  0xedd(%rip),%xmm2
movss  0xed9(%rip),%xmm3
movss  0xed5(%rip),%xmm4
call   1030 <init_newtonf@plt>
movss  0x4(%rsp),%xmm5
xorps  %xmm1,%xmm1
cvtss2sd %xmm5,%xmm1
mulsd  0xec7(%rip),%xmm1
movss  0xeb7(%rip),%xmm2
movaps %xmm0,%xmm3
mulss  %xmm2,%xmm3
cvtss2sd %xmm3,%xmm3
mulss  %xmm0,%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm0,%xmm4
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
xorps  %xmm0,%xmm0
cvtsd2ss %xmm4,%xmm0
movaps %xmm0,%xmm3
mulss  %xmm2,%xmm3
cvtss2sd %xmm3,%xmm3
mulss  %xmm0,%xmm0
xorps  %xmm4,%xmm4
cvtss2sd %xmm0,%xmm4
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm4
mulsd  %xmm0,%xmm4
addsd  %xmm3,%xmm4
xorps  %xmm0,%xmm0
cvtsd2ss %xmm4,%xmm0
mulss  %xmm0,%xmm2
cvtss2sd %xmm2,%xmm2
mulss  %xmm0,%xmm0
xorps  %xmm3,%xmm3
cvtss2sd %xmm0,%xmm3
mulss  %xmm0,%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm3
mulsd  %xmm0,%xmm3
addsd  %xmm2,%xmm3
xorps  %xmm1,%xmm1
cvtsd2ss %xmm3,%xmm1
mulss  %xmm5,%xmm1
movaps %xmm1,%xmm0
mulss  %xmm1,%xmm0
mulss  %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @babl_pow_24f(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %2
%5 = load float, float* %2
%6 = call float @init_newtonf(float %5, float 0xBFC99999A0000000, float 0x3FEFD9A720000000, float 0x3FEEB3B000000000, float 0x3FE593D760000000)
store float %6, float* %3
store i32 0, i32* %4
br label %7
7: ; preds = %33, %1
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %36
10: ; preds = %7
%11 = load float, float* %3
%12 = fmul float 0x3FF3333340000000, %11
%13 = fpext float %12 to double
%14 = load float, float* %2
%15 = fpext float %14 to double
%16 = fmul double 2.000000e-01, %15
%17 = load float, float* %3
%18 = load float, float* %3
%19 = fmul float %17, %18
%20 = fpext float %19 to double
%21 = fmul double %16, %20
%22 = load float, float* %3
%23 = load float, float* %3
%24 = fmul float %22, %23
%25 = load float, float* %3
%26 = load float, float* %3
%27 = fmul float %25, %26
%28 = fmul float %24, %27
%29 = fpext float %28 to double
%30 = fneg double %21
%31 = call double @llvm.fmuladd.f64(double %30, double %29, double %13)
%32 = fptrunc double %31 to float
store float %32, float* %3
br label %33
33: ; preds = %10
%34 = load i32, i32* %4
%35 = add nsw i32 %34, 1
store i32 %35, i32* %4
br label %7
36: ; preds = %7
%37 = load float, float* %3
%38 = load float, float* %2
%39 = fmul float %38, %37
store float %39, float* %2
%40 = load float, float* %2
%41 = load float, float* %2
%42 = fmul float %40, %41
%43 = load float, float* %2
%44 = fmul float %42, %43
ret float %44
}

LLVM IR (-O2):
define float @babl_pow_24f(float %0) {
%2 = tail call float @init_newtonf(float %0, float 0xBFC99999A0000000, float 0x3FEFD9A720000000, float 0x3FEEB3B000000000, float 0x3FE593D760000000)
%3 = fpext float %0 to double
%4 = fmul double %3, -2.000000e-01
%5 = fmul float %2, 0x3FF3333340000000
%6 = fpext float %5 to double
%7 = fmul float %2, %2
%8 = fpext float %7 to double
%9 = fmul float %7, %7
%10 = fpext float %9 to double
%11 = fmul double %4, %8
%12 = tail call double @llvm.fmuladd.f64(double %11, double %10, double %6)
%13 = fptrunc double %12 to float
%14 = fmul float %13, 0x3FF3333340000000
%15 = fpext float %14 to double
%16 = fmul float %13, %13
%17 = fpext float %16 to double
%18 = fmul float %16, %16
%19 = fpext float %18 to double
%20 = fmul double %4, %17
%21 = tail call double @llvm.fmuladd.f64(double %20, double %19, double %15)
%22 = fptrunc double %21 to float
%23 = fmul float %22, 0x3FF3333340000000
%24 = fpext float %23 to double
%25 = fmul float %22, %22
%26 = fpext float %25 to double
%27 = fmul float %25, %25
%28 = fpext float %27 to double
%29 = fmul double %4, %26
%30 = tail call double @llvm.fmuladd.f64(double %29, double %28, double %24)
%31 = fptrunc double %30 to float
%32 = fmul float %31, %0
%33 = fmul float %32, %32
%34 = fmul float %32, %33
ret float %34
}