#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 fminf(float const, float const);
void glmMin3fv(float out[3], const float x[3], const float y[3]) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = fminf(x[i], y[i]);
}


x86 assembly (clang, -O0):
<glmMin3fv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movq   $0x0,-0x20(%rbp)
cmpq   $0x3,-0x20(%rbp)
jae    1179 <glmMin3fv+0x79>
mov    -0x10(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm3
mov    -0x18(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordss %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
minss  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
mov    -0x8(%rbp),%rax
mov    -0x20(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1118 <glmMin3fv+0x18>
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmMin3fv>:
movss  (%rsi),%xmm0
movss  (%rdx),%xmm1
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
minss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movss  %xmm2,(%rdi)
movss  0x4(%rsi),%xmm0
movss  0x4(%rdx),%xmm1
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
minss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movss  %xmm2,0x4(%rdi)
movss  0x8(%rsi),%xmm0
movss  0x8(%rdx),%xmm1
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
minss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movss  %xmm2,0x8(%rdi)
ret

LLVM IR (-O0):
define void @glmMin3fv(float* %0, float* %1, float* %2) {
%4 = alloca float*
%5 = alloca float*
%6 = alloca float*
%7 = alloca i64
store float* %0, float** %4
store float* %1, float** %5
store float* %2, float** %6
store i64 0, i64* %7
br label %8
8: ; preds = %24, %3
%9 = load i64, i64* %7
%10 = icmp ult i64 %9, 3
br i1 %10, label %11, label %27
11: ; preds = %8
%12 = load float*, float** %5
%13 = load i64, i64* %7
%14 = getelementptr inbounds float, float* %12, i64 %13
%15 = load float, float* %14
%16 = load float*, float** %6
%17 = load i64, i64* %7
%18 = getelementptr inbounds float, float* %16, i64 %17
%19 = load float, float* %18
%20 = call float @llvm.minnum.f32(float %15, float %19)
%21 = load float*, float** %4
%22 = load i64, i64* %7
%23 = getelementptr inbounds float, float* %21, i64 %22
store float %20, float* %23
br label %24
24: ; preds = %11
%25 = load i64, i64* %7
%26 = add i64 %25, 1
store i64 %26, i64* %7
br label %8
27: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @glmMin3fv(float* nocapture writeonly %0, float* nocapture %1, float* nocapture %2) {
%4 = load float, float* %1
%5 = load float, float* %2
%6 = tail call float @llvm.minnum.f32(float %4, float %5)
store float %6, float* %0
%7 = getelementptr inbounds float, float* %1, i64 1
%8 = load float, float* %7
%9 = getelementptr inbounds float, float* %2, i64 1
%10 = load float, float* %9
%11 = tail call float @llvm.minnum.f32(float %8, float %10)
%12 = getelementptr inbounds float, float* %0, i64 1
store float %11, float* %12
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = getelementptr inbounds float, float* %2, i64 2
%16 = load float, float* %15
%17 = tail call float @llvm.minnum.f32(float %14, float %16)
%18 = getelementptr inbounds float, float* %0, i64 2
store float %17, float* %18
ret void
}