#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*/ printf(char *, ...);
int main() {
  float lowRate, highRate,
      rates[] = {18.24, 25.63, 5.94, 33.92, 3.71, 32.84, 35.93, 18.24, 6.92};
  lowRate = rates[1];
  highRate = rates[1];
  for (int i = 0; i < 9; i++) {
    if (rates[i] <= lowRate)
      lowRate = rates[i];
    else if (rates[i] >= highRate)
      highRate = rates[i];
  }
  printf("\nThe array is: ");
  for (int i = 0; i < 9; i++) {
    printf("%.2f ", rates[i]);
  }
  printf("and \nthe array's highest number is %.2f, and the lowest %.2f.\n",
         highRate, lowRate);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x30(%rbp),%rdi
lea    0xec6(%rip),%rsi
mov    $0x24,%edx
call   1040 <memcpy@plt>
movss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x34(%rbp)
cmpl   $0x9,-0x34(%rbp)
jge    11d0 <main+0xb0>
movslq -0x34(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jb     1195 <main+0x75>
movslq -0x34(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    11bd <main+0x9d>
movslq -0x34(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     11b8 <main+0x98>
movslq -0x34(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
movss  %xmm0,-0xc(%rbp)
jmp    11bd <main+0x9d>
jmp    11c2 <main+0xa2>
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
jmp    115f <main+0x3f>
lea    0xe4d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x38(%rbp)
cmpl   $0x9,-0x38(%rbp)
jge    1219 <main+0xf9>
movslq -0x38(%rbp),%rax
movss  -0x30(%rbp,%rax,4),%xmm0
cvtss2sd %xmm0,%xmm0
lea    0xe30(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
jmp    11e5 <main+0xc5>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
lea    0xe08(%rip),%rdi
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xf28(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xf2a(%rip),%rbx
movsd  0xed2(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xec8(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xebe(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xeb4(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xeaa(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xea0(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe96(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    %rbx,%rdi
movsd  0xe51(%rip),%xmm0
mov    $0x1,%al
call   1030 <printf@plt>
movsd  0xe7a(%rip),%xmm0
mov    %rbx,%rdi
mov    $0x1,%al
call   1030 <printf@plt>
lea    0xe87(%rip),%rdi
movsd  0xe59(%rip),%xmm0
movsd  0xe41(%rip),%xmm1
mov    $0x2,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.rates = [9 x float] [float 0x40323D70A0000000, float 0x4039A147A0000000, float 0x4017C28F60000000, float 0x4040F5C280000000, float 0x400DAE1480000000, float 0x40406B8520000000, float 0x4041F70A40000000, float 0x40323D70A0000000, float 0x401BAE1480000000]
@.str = [16 x i8] c"\0AThe array is: \00"
@.str.1 = [6 x i8] c"%.2f \00"
@.str.2 = [63 x i8] c"and \0Athe array's highest number is %.2f, and the lowest %.2f.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca [9 x float]
%5 = alloca i32
%6 = alloca i32
store i32 0, i32* %1
%7 = bitcast [9 x float]* %4 to i8*
%8 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 1
%9 = load float, float* %8
store float %9, float* %2
%10 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 1
%11 = load float, float* %10
store float %11, float* %3
store i32 0, i32* %5
br label %12
12: ; preds = %41, %0
%13 = load i32, i32* %5
%14 = icmp slt i32 %13, 9
br i1 %14, label %15, label %44
15: ; preds = %12
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 %17
%19 = load float, float* %18
%20 = load float, float* %2
%21 = fcmp ole float %19, %20
br i1 %21, label %22, label %27
22: ; preds = %15
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 %24
%26 = load float, float* %25
store float %26, float* %2
br label %40
27: ; preds = %15
%28 = load i32, i32* %5
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 %29
%31 = load float, float* %30
%32 = load float, float* %3
%33 = fcmp oge float %31, %32
br i1 %33, label %34, label %39
34: ; preds = %27
%35 = load i32, i32* %5
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 %36
%38 = load float, float* %37
store float %38, float* %3
br label %39
39: ; preds = %34, %27
br label %40
40: ; preds = %39, %22
br label %41
41: ; preds = %40
%42 = load i32, i32* %5
%43 = add nsw i32 %42, 1
store i32 %43, i32* %5
br label %12
44: ; preds = %12
%45 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %6
br label %46
46: ; preds = %56, %44
%47 = load i32, i32* %6
%48 = icmp slt i32 %47, 9
br i1 %48, label %49, label %59
49: ; preds = %46
%50 = load i32, i32* %6
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds [9 x float], [9 x float]* %4, i64 0, i64 %51
%53 = load float, float* %52
%54 = fpext float %53 to double
%55 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double %54)
br label %56
56: ; preds = %49
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
store i32 %58, i32* %6
br label %46
59: ; preds = %46
%60 = load float, float* %3
%61 = fpext float %60 to double
%62 = load float, float* %2
%63 = fpext float %62 to double
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), double %61, double %63)
ret i32 0
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0AThe array is: \00"
@.str.1 = [6 x i8] c"%.2f \00"
@.str.2 = [63 x i8] c"and \0Athe array's highest number is %.2f, and the lowest %.2f.\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x40323D70A0000000)
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x4039A147A0000000)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x4017C28F60000000)
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x4040F5C280000000)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x400DAE1480000000)
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x40406B8520000000)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x4041F70A40000000)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x40323D70A0000000)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), double 0x401BAE1480000000)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.2, i64 0, i64 0), double 0x4041F70A40000000, double 0x400DAE1480000000)
ret i32 0
}