void results(Tp, c, a) double *Tp;
char *c;
double *a;
{
  int i;
  double max, min;
  max = a[0];
  min = a[0];
  for (i = 0; i < 4; ++i, *Tp++) {
    if (a[i] <= min)
      min = a[i];
    if (a[i] > max)
      max = a[i];
    *Tp = a[i];
  }
  *Tp = (a[0] + a[1] + a[2] + a[3]) / 4;
  *Tp++;
  *Tp = max - min;
}


x86 assembly (clang, -O0):
<results>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    11c2 <results+0xc2>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
movsd  -0x30(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1169 <results+0x69>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1193 <results+0x93>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
jmp    1131 <results+0x31>
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
addsd  0x18(%rax),%xmm0
movsd  0xe13(%rip),%xmm1
divsd  %xmm1,%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
add    $0x8,%rax
mov    %rax,-0x8(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x30(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<results>:
movsd  (%rdx),%xmm0
movsd  %xmm0,(%rdi)
movsd  0x8(%rdx),%xmm1
movapd %xmm1,%xmm2
cmplesd %xmm0,%xmm2
movapd %xmm2,%xmm3
andpd  %xmm1,%xmm3
andnpd %xmm0,%xmm2
orpd   %xmm3,%xmm2
movsd  %xmm1,0x8(%rdi)
maxsd  %xmm0,%xmm1
movsd  0x10(%rdx),%xmm0
movapd %xmm0,%xmm3
cmplesd %xmm2,%xmm3
movapd %xmm3,%xmm4
andnpd %xmm2,%xmm4
andpd  %xmm0,%xmm3
orpd   %xmm4,%xmm3
movsd  %xmm0,0x10(%rdi)
maxsd  %xmm1,%xmm0
movsd  0x18(%rdx),%xmm1
movapd %xmm1,%xmm2
cmplesd %xmm3,%xmm2
movapd %xmm2,%xmm4
andnpd %xmm3,%xmm4
andpd  %xmm1,%xmm2
orpd   %xmm4,%xmm2
movsd  %xmm1,0x18(%rdi)
movsd  (%rdx),%xmm3
addsd  0x8(%rdx),%xmm3
addsd  0x10(%rdx),%xmm3
addsd  0x18(%rdx),%xmm3
mulsd  0xe6c(%rip),%xmm3
maxsd  %xmm0,%xmm1
movsd  %xmm3,0x20(%rdi)
subsd  %xmm2,%xmm1
movsd  %xmm1,0x28(%rdi)
ret

LLVM IR (-O0):
define void @results(double* %0, i8* %1, double* %2) {
%4 = alloca double*
%5 = alloca i8*
%6 = alloca double*
%7 = alloca i32
%8 = alloca double
%9 = alloca double
store double* %0, double** %4
store i8* %1, i8** %5
store double* %2, double** %6
%10 = load double*, double** %6
%11 = getelementptr inbounds double, double* %10, i64 0
%12 = load double, double* %11
store double %12, double* %8
%13 = load double*, double** %6
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
store double %15, double* %9
store i32 0, i32* %7
br label %16
16: ; preds = %54, %3
%17 = load i32, i32* %7
%18 = icmp slt i32 %17, 4
br i1 %18, label %19, label %60
19: ; preds = %16
%20 = load double*, double** %6
%21 = load i32, i32* %7
%22 = sext i32 %21 to i64
%23 = getelementptr inbounds double, double* %20, i64 %22
%24 = load double, double* %23
%25 = load double, double* %9
%26 = fcmp ole double %24, %25
br i1 %26, label %27, label %33
27: ; preds = %19
%28 = load double*, double** %6
%29 = load i32, i32* %7
%30 = sext i32 %29 to i64
%31 = getelementptr inbounds double, double* %28, i64 %30
%32 = load double, double* %31
store double %32, double* %9
br label %33
33: ; preds = %27, %19
%34 = load double*, double** %6
%35 = load i32, i32* %7
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds double, double* %34, i64 %36
%38 = load double, double* %37
%39 = load double, double* %8
%40 = fcmp ogt double %38, %39
br i1 %40, label %41, label %47
41: ; preds = %33
%42 = load double*, double** %6
%43 = load i32, i32* %7
%44 = sext i32 %43 to i64
%45 = getelementptr inbounds double, double* %42, i64 %44
%46 = load double, double* %45
store double %46, double* %8
br label %47
47: ; preds = %41, %33
%48 = load double*, double** %6
%49 = load i32, i32* %7
%50 = sext i32 %49 to i64
%51 = getelementptr inbounds double, double* %48, i64 %50
%52 = load double, double* %51
%53 = load double*, double** %4
store double %52, double* %53
br label %54
54: ; preds = %47
%55 = load i32, i32* %7
%56 = add nsw i32 %55, 1
store i32 %56, i32* %7
%57 = load double*, double** %4
%58 = getelementptr inbounds double, double* %57, i32 1
store double* %58, double** %4
%59 = load double, double* %57
br label %16
60: ; preds = %16
%61 = load double*, double** %6
%62 = getelementptr inbounds double, double* %61, i64 0
%63 = load double, double* %62
%64 = load double*, double** %6
%65 = getelementptr inbounds double, double* %64, i64 1
%66 = load double, double* %65
%67 = fadd double %63, %66
%68 = load double*, double** %6
%69 = getelementptr inbounds double, double* %68, i64 2
%70 = load double, double* %69
%71 = fadd double %67, %70
%72 = load double*, double** %6
%73 = getelementptr inbounds double, double* %72, i64 3
%74 = load double, double* %73
%75 = fadd double %71, %74
%76 = fdiv double %75, 4.000000e+00
%77 = load double*, double** %4
store double %76, double* %77
%78 = load double*, double** %4
%79 = getelementptr inbounds double, double* %78, i32 1
store double* %79, double** %4
%80 = load double, double* %78
%81 = load double, double* %8
%82 = load double, double* %9
%83 = fsub double %81, %82
%84 = load double*, double** %4
store double %83, double* %84
ret void
}

LLVM IR (-O2):
define void @results(double* nocapture writeonly %0, i8* nocapture readnone %1, double* nocapture %2) {
%4 = load double, double* %2
store double %4, double* %0
%5 = getelementptr inbounds double, double* %0, i64 1
%6 = getelementptr inbounds double, double* %2, i64 1
%7 = load double, double* %6
%8 = fcmp ole double %7, %4
%9 = select i1 %8, double %7, double %4
%10 = fcmp ogt double %7, %4
%11 = select i1 %10, double %7, double %4
store double %7, double* %5
%12 = getelementptr inbounds double, double* %0, i64 2
%13 = getelementptr inbounds double, double* %2, i64 2
%14 = load double, double* %13
%15 = fcmp ole double %14, %9
%16 = select i1 %15, double %14, double %9
%17 = fcmp ogt double %14, %11
%18 = select i1 %17, double %14, double %11
store double %14, double* %12
%19 = getelementptr inbounds double, double* %0, i64 3
%20 = getelementptr inbounds double, double* %2, i64 3
%21 = load double, double* %20
%22 = fcmp ole double %21, %16
%23 = select i1 %22, double %21, double %16
%24 = fcmp ogt double %21, %18
%25 = select i1 %24, double %21, double %18
store double %21, double* %19
%26 = getelementptr inbounds double, double* %0, i64 4
%27 = load double, double* %2
%28 = load double, double* %6
%29 = fadd double %27, %28
%30 = load double, double* %13
%31 = fadd double %29, %30
%32 = load double, double* %20
%33 = fadd double %31, %32
%34 = fmul double %33, 2.500000e-01
store double %34, double* %26
%35 = getelementptr inbounds double, double* %0, i64 5
%36 = fsub double %25, %23
store double %36, double* %35
ret void
}