#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 *, double, double);
int /*<<< orphan*/ stat(double *, double *, double *, int);
int main() {
  double minPos;
  double maxPos;
  double a[] = {0.0, 1.0, 2.0, 3.0, 4.0};
  stat(&minPos, &maxPos, a, 5);
  printf("minPos = %f, maxPos = %f\n", minPos, maxPos);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x28,%edx
call   1040 <memset@plt>
movsd  0xec1(%rip),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  0xeac(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  0xe97(%rip),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  0xe82(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
lea    -0x40(%rbp),%rdx
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x5,%ecx
call   1050 <stat@plt>
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
lea    0xe76(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
xorps  %xmm0,%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movups %xmm0,0x18(%rsp)
movaps 0xed1(%rip),%xmm0
movups %xmm0,0x28(%rsp)
lea    0x8(%rsp),%rdi
mov    %rsp,%rsi
lea    0x10(%rsp),%rdx
mov    $0x5,%ecx
call   1040 <stat@plt>
movsd  (%rsp),%xmm1
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [26 x i8] c"minPos = %f, maxPos = %f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca [5 x double]
store i32 0, i32* %1
%5 = bitcast [5 x double]* %4 to i8*
%6 = bitcast i8* %5 to [5 x double]*
%7 = getelementptr inbounds [5 x double], [5 x double]* %6, i32 0, i32 1
store double 1.000000e+00, double* %7
%8 = getelementptr inbounds [5 x double], [5 x double]* %6, i32 0, i32 2
store double 2.000000e+00, double* %8
%9 = getelementptr inbounds [5 x double], [5 x double]* %6, i32 0, i32 3
store double 3.000000e+00, double* %9
%10 = getelementptr inbounds [5 x double], [5 x double]* %6, i32 0, i32 4
store double 4.000000e+00, double* %10
%11 = getelementptr inbounds [5 x double], [5 x double]* %4, i64 0, i64 0
%12 = call i32 @stat(double* %2, double* %3, double* %11, i32 5)
%13 = load double, double* %2
%14 = load double, double* %3
%15 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double %13, double %14)
ret i32 0
}

LLVM IR (-O2):
@.str = [26 x i8] c"minPos = %f, maxPos = %f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca [5 x double]
%4 = bitcast double* %1 to i8*
%5 = bitcast double* %2 to i8*
%6 = bitcast [5 x double]* %3 to i8*
%7 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 1
%8 = bitcast double* %7 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 2.000000e+00>, <2 x double>* %8
%9 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 3
%10 = bitcast double* %9 to <2 x double>*
store <2 x double> <double 3.000000e+00, double 4.000000e+00>, <2 x double>* %10
%11 = getelementptr inbounds [5 x double], [5 x double]* %3, i64 0, i64 0
%12 = call i32 @stat(double* %1, double* %2, double* %11, i32 5)
%13 = load double, double* %2
%14 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), double undef, double %13)
ret i32 0
}