#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 pow(double, int);
double MAP_SINGER(double x_n, int iteration) {
  double res = (1.07 * (-13.302875 * pow(x_n, 4) + 28.75 * pow(x_n, 3) +
                        -23.31 * pow(x_n, 2) + 7.68 * x_n));
  return res;
}


x86 assembly (clang, -O0):
<MAP_SINGER>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x4,%edi
call   1030 <pow@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
movaps %xmm0,%xmm2
movsd  -0x28(%rbp),%xmm0
movsd  0xecd(%rip),%xmm1
mulsd  %xmm2,%xmm1
movsd  0xeb9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x20(%rbp),%xmm1
movsd  0xe88(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x8(%rbp),%xmm1
movsd  0xe6b(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xe53(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAP_SINGER>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
mov    $0x4,%edi
call   1030 <pow@plt>
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x3,%edi
call   1030 <pow@plt>
mulsd  0xebe(%rip),%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  0xeb8(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  %xmm0,0x8(%rsp)
movsd  0x10(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mulsd  0xe9e(%rip),%xmm0
movsd  0x10(%rsp),%xmm1
mulsd  0xe98(%rip),%xmm1
addsd  0x8(%rsp),%xmm0
addsd  %xmm1,%xmm0
mulsd  0xe8e(%rip),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @MAP_SINGER(double %0, i32 %1) {
%3 = alloca double
%4 = alloca i32
%5 = alloca double
store double %0, double* %3
store i32 %1, i32* %4
%6 = load double, double* %3
%7 = call double @pow(double %6, i32 4)
%8 = load double, double* %3
%9 = call double @pow(double %8, i32 3)
%10 = fmul double 2.875000e+01, %9
%11 = call double @llvm.fmuladd.f64(double 0xC02A9B126E978D50, double %7, double %10)
%12 = load double, double* %3
%13 = call double @pow(double %12, i32 2)
%14 = call double @llvm.fmuladd.f64(double -2.331000e+01, double %13, double %11)
%15 = load double, double* %3
%16 = call double @llvm.fmuladd.f64(double 0x401EB851EB851EB8, double %15, double %14)
%17 = fmul double 1.070000e+00, %16
store double %17, double* %5
%18 = load double, double* %5
ret double %18
}

LLVM IR (-O2):
define double @MAP_SINGER(double %0, i32 %1) {
%3 = tail call double @pow(double %0, i32 4)
%4 = tail call double @pow(double %0, i32 3)
%5 = fmul double %4, 2.875000e+01
%6 = tail call double @llvm.fmuladd.f64(double %3, double 0xC02A9B126E978D50, double %5)
%7 = tail call double @pow(double %0, i32 2)
%8 = tail call double @llvm.fmuladd.f64(double %7, double -2.331000e+01, double %6)
%9 = tail call double @llvm.fmuladd.f64(double %0, double 0x401EB851EB851EB8, double %8)
%10 = fmul double %9, 1.070000e+00
ret double %10
}