#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 pow(int, int);
double testFunctionSimplexRosenbrock(double *x) {
  return 100 * pow((x[1] - pow(x[0], 2)), 2) + pow(1 - x[0], 2);
}


x86 assembly (clang, -O0):
<testFunctionSimplexRosenbrock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
movsd  -0x18(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
imul   $0x64,%eax,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xe97(%rip),%xmm0
subsd  (%rax),%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testFunctionSimplexRosenbrock>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
movsd  0x8(%rdi),%xmm0
movsd  %xmm0,(%rsp)
cvttsd2si (%rdi),%edi
mov    $0x2,%esi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
cvttsd2si %xmm1,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
imul   $0x64,%eax,%ebp
movsd  0xea9(%rip),%xmm0
subsd  (%rbx),%xmm0
cvttsd2si %xmm0,%edi
mov    $0x2,%esi
call   1030 <pow@plt>
add    %ebp,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @testFunctionSimplexRosenbrock(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 1
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fptosi double %8 to i32
%10 = call i32 @pow(i32 %9, i32 2)
%11 = sitofp i32 %10 to double
%12 = fsub double %5, %11
%13 = fptosi double %12 to i32
%14 = call i32 @pow(i32 %13, i32 2)
%15 = mul nsw i32 100, %14
%16 = load double*, double** %2
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fsub double 1.000000e+00, %18
%20 = fptosi double %19 to i32
%21 = call i32 @pow(i32 %20, i32 2)
%22 = add nsw i32 %15, %21
%23 = sitofp i32 %22 to double
ret double %23
}

LLVM IR (-O2):
define double @testFunctionSimplexRosenbrock(double* nocapture %0) {
%2 = getelementptr inbounds double, double* %0, i64 1
%3 = load double, double* %2
%4 = load double, double* %0
%5 = fptosi double %4 to i32
%6 = tail call i32 @pow(i32 %5, i32 2)
%7 = sitofp i32 %6 to double
%8 = fsub double %3, %7
%9 = fptosi double %8 to i32
%10 = tail call i32 @pow(i32 %9, i32 2)
%11 = mul nsw i32 %10, 100
%12 = load double, double* %0
%13 = fsub double 1.000000e+00, %12
%14 = fptosi double %13 to i32
%15 = tail call i32 @pow(i32 %14, i32 2)
%16 = add nsw i32 %15, %11
%17 = sitofp i32 %16 to double
ret double %17
}