#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 Distance(int, int, float **);
float Reduction4(int a, float la, int b, float lb, int i, float lamda,
                 float **delta) {
  float Dui;
  Dui = lamda * (Distance(a, i, delta) - la) +
        (1 - lamda) * (Distance(b, i, delta) - lb);
  return (Dui);
}


x86 assembly (clang, -O0):
<Reduction4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
movss  %xmm0,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movss  %xmm2,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <Distance@plt>
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  0xea1(%rip),%xmm0
subss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x30(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x14(%rbp),%esi
mov    -0x20(%rbp),%rdx
call   1030 <Distance@plt>
movss  -0x30(%rbp),%xmm1
movss  -0x2c(%rbp),%xmm2
movaps %xmm0,%xmm3
movss  -0x28(%rbp),%xmm0
subss  -0x10(%rbp),%xmm3
mulss  %xmm3,%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Reduction4>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rcx,%rbx
movss  %xmm2,0x4(%rsp)
mov    %edx,%ebp
movss  %xmm1,0xc(%rsp)
mov    %esi,%r14d
movss  %xmm0,(%rsp)
mov    %edx,%esi
mov    %rcx,%rdx
call   1030 <Distance@plt>
subss  (%rsp),%xmm0
movss  %xmm0,(%rsp)
movss  0xeb3(%rip),%xmm0
subss  0x4(%rsp),%xmm0
movss  %xmm0,0x8(%rsp)
mov    %r14d,%edi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1030 <Distance@plt>
subss  0xc(%rsp),%xmm0
mulss  0x8(%rsp),%xmm0
movss  (%rsp),%xmm1
mulss  0x4(%rsp),%xmm1
addss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define float @Reduction4(i32 %0, float %1, i32 %2, float %3, i32 %4, float %5, float** %6) {
%8 = alloca i32
%9 = alloca float
%10 = alloca i32
%11 = alloca float
%12 = alloca i32
%13 = alloca float
%14 = alloca float**
%15 = alloca float
store i32 %0, i32* %8
store float %1, float* %9
store i32 %2, i32* %10
store float %3, float* %11
store i32 %4, i32* %12
store float %5, float* %13
store float** %6, float*** %14
%16 = load float, float* %13
%17 = load i32, i32* %8
%18 = load i32, i32* %12
%19 = load float**, float*** %14
%20 = call float @Distance(i32 %17, i32 %18, float** %19)
%21 = load float, float* %9
%22 = fsub float %20, %21
%23 = load float, float* %13
%24 = fsub float 1.000000e+00, %23
%25 = load i32, i32* %10
%26 = load i32, i32* %12
%27 = load float**, float*** %14
%28 = call float @Distance(i32 %25, i32 %26, float** %27)
%29 = load float, float* %11
%30 = fsub float %28, %29
%31 = fmul float %24, %30
%32 = call float @llvm.fmuladd.f32(float %16, float %22, float %31)
store float %32, float* %15
%33 = load float, float* %15
ret float %33
}

LLVM IR (-O2):
define float @Reduction4(i32 %0, float %1, i32 %2, float %3, i32 %4, float %5, float** %6) {
%8 = tail call float @Distance(i32 %0, i32 %4, float** %6)
%9 = fsub float %8, %1
%10 = fsub float 1.000000e+00, %5
%11 = tail call float @Distance(i32 %2, i32 %4, float** %6)
%12 = fsub float %11, %3
%13 = fmul float %10, %12
%14 = tail call float @llvm.fmuladd.f32(float %5, float %9, float %13)
ret float %14
}