#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 /*<<< orphan*/ abort();
int /*<<< orphan*/ f(float *, float *);
float fabsf(float);
int main() {
  float dst[2], src[2];
  src[0] = 2.0f;
  src[1] = 5.0f;
  f(dst, src);
  if (fabsf(dst[0] * dst[0] + dst[1] * dst[1] - 1.0f) > 0.01f)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movss  0xed5(%rip),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  0xec4(%rip),%xmm0
movss  %xmm0,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1040 <f@plt>
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xe8a(%rip),%xmm1
subss  %xmm1,%xmm0
movaps 0xe8b(%rip),%xmm1
pand   %xmm1,%xmm0
movss  0xe6f(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11a1 <main+0x81>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movabs $0x40a0000040000000,%rax
mov    %rax,0x10(%rsp)
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1040 <f@plt>
movss  0x8(%rsp),%xmm0
movss  0xc(%rsp),%xmm1
mulss  %xmm1,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
addss  0xe9e(%rip),%xmm0
andps  0xea7(%rip),%xmm0
ucomiss 0xe94(%rip),%xmm0
ja     1179 <main+0x59>
xor    %eax,%eax
add    $0x18,%rsp
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x float]
%3 = alloca [2 x float]
store i32 0, i32* %1
%4 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float 2.000000e+00, float* %4
%5 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float 5.000000e+00, float* %5
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%7 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%8 = call i32 @f(float* %6, float* %7)
%9 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%10 = load float, float* %9
%11 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
%12 = load float, float* %11
%13 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%14 = load float, float* %13
%15 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
%16 = load float, float* %15
%17 = fmul float %14, %16
%18 = call float @llvm.fmuladd.f32(float %10, float %12, float %17)
%19 = fsub float %18, 1.000000e+00
%20 = call float @llvm.fabs.f32(float %19)
%21 = fcmp ogt float %20, 0x3F847AE140000000
br i1 %21, label %22, label %24
22: ; preds = %0
%23 = call i32 (...) @abort()
unreachable
24: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x float]
%2 = alloca [2 x float]
%3 = bitcast [2 x float]* %1 to i8*
%4 = bitcast [2 x float]* %2 to i8*
%5 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float 2.000000e+00, float* %5
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float 5.000000e+00, float* %6
%7 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 0, i64 0
%8 = call i32 @f(float* %7, float* %5)
%9 = load float, float* %7
%10 = getelementptr inbounds [2 x float], [2 x float]* %1, i64 0, i64 1
%11 = load float, float* %10
%12 = fmul float %11, %11
%13 = call float @llvm.fmuladd.f32(float %9, float %9, float %12)
%14 = fadd float %13, -1.000000e+00
%15 = call float @llvm.fabs.f32(float %14)
%16 = fcmp ogt float %15, 0x3F847AE140000000
br i1 %16, label %17, label %19
17: ; preds = %0
%18 = call i32 (...) @abort()
unreachable
19: ; preds = %0
ret i32 0
}