main(argc, argv) char **argv;
{
  double la[3];
  double max;
  getloadavg(la, 3);
  max = la[0];
  if (la[1] > max)
    max = la[1];
  if (la[2] > max)
    max = la[2];
  if (argc > 1)
    printf("1=%g, 5=%g, 15=%g, max=%g\n", la[0], la[1], la[2], max);
  if (max > 30)
    printf("100\n");
  else
    printf("0\n");
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x30(%rbp),%rdi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <getloadavg@plt>
movsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x28(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    117a <main+0x4a>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1194 <main+0x64>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    11c0 <main+0x90>
movsd  -0x30(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm2
movsd  -0x38(%rbp),%xmm3
lea    0xe4f(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  -0x38(%rbp),%xmm0
movsd  0xe33(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    11ea <main+0xba>
lea    0xe45(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    11f8 <main+0xc8>
lea    0xe34(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x30,%rsp
mov    %edi,%ebx
lea    0x10(%rsp),%rdi
mov    $0x3,%esi
xor    %eax,%eax
call   1040 <getloadavg@plt>
movsd  0x10(%rsp),%xmm0
movsd  0x18(%rsp),%xmm1
movapd %xmm1,%xmm4
maxsd  %xmm0,%xmm4
movsd  0x20(%rsp),%xmm2
movapd %xmm2,%xmm3
maxsd  %xmm4,%xmm3
cmp    $0x2,%ebx
jl     1199 <main+0x59>
lea    0xe82(%rip),%rdi
mov    $0x4,%al
movsd  %xmm3,0x8(%rsp)
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm3
ucomisd 0xe5f(%rip),%xmm3
lea    0xe7b(%rip),%rax
lea    0xe76(%rip),%rdi
cmova  %rax,%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [27 x i8] c"1=%g, 5=%g, 15=%g, max=%g\0A\00"
@.str.1 = [5 x i8] c"100\0A\00"
@.str.2 = [3 x i8] c"0\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x double]
%7 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%9 = call i32 (double*, i32, ...) bitcast (i32 (...)* @getloadavg to i32 (double*, i32, ...)*)(double* %8, i32 3)
%10 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%11 = load double, double* %10
store double %11, double* %7
%12 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%13 = load double, double* %12
%14 = load double, double* %7
%15 = fcmp ogt double %13, %14
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%18 = load double, double* %17
store double %18, double* %7
br label %19
19: ; preds = %16, %2
%20 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%21 = load double, double* %20
%22 = load double, double* %7
%23 = fcmp ogt double %21, %22
br i1 %23, label %24, label %27
24: ; preds = %19
%25 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%26 = load double, double* %25
store double %26, double* %7
br label %27
27: ; preds = %24, %19
%28 = load i32, i32* %4
%29 = icmp sgt i32 %28, 1
br i1 %29, label %30, label %39
30: ; preds = %27
%31 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 0
%32 = load double, double* %31
%33 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 1
%34 = load double, double* %33
%35 = getelementptr inbounds [3 x double], [3 x double]* %6, i64 0, i64 2
%36 = load double, double* %35
%37 = load double, double* %7
%38 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double %32, double %34, double %36, double %37)
br label %39
39: ; preds = %30, %27
%40 = load double, double* %7
%41 = fcmp ogt double %40, 3.000000e+01
br i1 %41, label %42, label %44
42: ; preds = %39
%43 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
br label %46
44: ; preds = %39
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %46
46: ; preds = %44, %42
unreachable
}

LLVM IR (-O2):
@.str = [27 x i8] c"1=%g, 5=%g, 15=%g, max=%g\0A\00"
@str = [2 x i8] c"0\00"
@str.3 = [4 x i8] c"100\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x double]
%4 = bitcast [3 x double]* %3 to i8*
%5 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 0
%6 = call i32 (double*, i32, ...) bitcast (i32 (...)* @getloadavg to i32 (double*, i32, ...)*)(double* %5, i32 3)
%7 = load double, double* %5
%8 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 1
%9 = load double, double* %8
%10 = fcmp ogt double %9, %7
%11 = select i1 %10, double %9, double %7
%12 = getelementptr inbounds [3 x double], [3 x double]* %3, i64 0, i64 2
%13 = load double, double* %12
%14 = fcmp ogt double %13, %11
%15 = select i1 %14, double %13, double %11
%16 = icmp sgt i32 %0, 1
br i1 %16, label %17, label %19
17: ; preds = %2
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), double %7, double %9, double %13, double %15)
br label %19
19: ; preds = %17, %2
%20 = fcmp ogt double %15, 3.000000e+01
%21 = select i1 %20, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0)
%22 = call i32 @puts(i8* dereferenceable(1) %21)
unreachable
}