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


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xed8(%rip),%xmm0
subsd  (%rax),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
movsd  -0x28(%rbp),%xmm0
cvtsi2sd %eax,%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x18(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
imul   $0x64,%ecx,%ecx
add    %ecx,%eax
cvtsi2sd %eax,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
sub    $0x10,%rsp
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  %xmm1,(%rsp)
movsd  0xed5(%rip),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rsp)
mov    $0x2,%edi
call   1030 <pow@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
movsd  (%rsp),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
movsd  0x8(%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
mov    %eax,%ebx
movsd  (%rsp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
imul   $0x64,%eax,%eax
add    %ebx,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbx
ret

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

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