#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 */
scalar_t__ EOF;
double atof(char *);
scalar_t__ malloc(unsigned int);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ realloc(double *, unsigned int);
scalar_t__ scanf(char *, double *);
double sqrt(double);
main(int argc, char *argv[]) {
  double *vec, x, s, *percentiles;
  int c, vecl = 1000;
  int i, index;
  double p;
  int order(int, double *);
  percentiles = (double *)malloc((unsigned)argc * sizeof(double));
  vec = (double *)malloc((unsigned)vecl * sizeof(double));
  for (i = 1; i < argc; i++) {
    percentiles[i] = atof(argv[i]);
  }
  c = 0;
  x = s = 0.0;
  while (scanf(" %lf", vec + c) != EOF) {
    x += vec[c];
    s += vec[c] * vec[c];
    c++;
    if (c >= vecl) {
      vecl += 1000;
      vec = (double *)realloc(vec, (unsigned)vecl * sizeof(double));
    }
  }
  order(c, vec);
  x /= c;
  s /= c;
  s -= x * x;
  s = sqrt(s * c / (c - 1.0));
  printf("%lf\tsd:\t%lf\tn:\t%d", x, s, c);
  for (i = 1; i < argc; i++) {
    index = percentiles[i] * c + 0.5;
    p = vec[index - 1] * (index + 0.5 - percentiles[i] * c) +
        vec[index] * (percentiles[i] * c + 0.5 - index);
    printf("\t%5.3lf", percentiles[i]);
    if (index < 1)
      printf("\t-");
    else
      printf("\t%lf", p);
  }
  printf("\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x3e8,-0x38(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x30(%rbp)
mov    -0x38(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11f0 <main+0x80>
mov    -0x10(%rbp),%rax
movslq -0x3c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <atof@plt>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    11b8 <main+0x48>
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rsi
movslq -0x34(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rsi
lea    0xdf3(%rip),%rdi
call   1080 <scanf@plt>
mov    0x2dbf(%rip),%rcx
cmp    (%rcx),%rax
je     12b0 <main+0x140>
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
addsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x34(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
movsd  -0x28(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    -0x34(%rbp),%eax
cmp    -0x38(%rbp),%eax
jl     12ab <main+0x13b>
mov    -0x38(%rbp),%eax
add    $0x3e8,%eax
mov    %eax,-0x38(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x38(%rbp),%eax
shl    $0x3,%rax
mov    %eax,%esi
call   1070 <realloc@plt>
mov    %rax,-0x18(%rbp)
jmp    1207 <main+0x97>
mov    -0x34(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <order@plt>
cvtsi2sdl -0x34(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
cvtsi2sdl -0x34(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm2
movsd  -0x28(%rbp),%xmm1
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
mulsd  %xmm1,%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
movsd  0xcd0(%rip),%xmm2
subsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
call   1090 <sqrt@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm1
mov    -0x34(%rbp),%esi
lea    0xcbf(%rip),%rdi
mov    $0x2,%al
call   1040 <printf@plt>
movl   $0x1,-0x3c(%rbp)
mov    -0x3c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1494 <main+0x324>
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x34(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xc7a(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
mov    %eax,-0x40(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x40(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsd  (%rax,%rcx,8),%xmm0
cvtsi2sdl -0x40(%rbp),%xmm1
movsd  0xc50(%rip),%xmm2
addsd  %xmm2,%xmm1
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm2
cvtsi2sdl -0x34(%rbp),%xmm3
movq   %xmm2,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm2
mulsd  %xmm3,%xmm2
addsd  %xmm1,%xmm2
mov    -0x18(%rbp),%rax
movslq -0x40(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm3
cvtsi2sdl -0x34(%rbp),%xmm4
mulsd  %xmm4,%xmm3
movsd  0xbf0(%rip),%xmm4
addsd  %xmm4,%xmm3
cvtsi2sdl -0x40(%rbp),%xmm4
subsd  %xmm4,%xmm3
mulsd  %xmm3,%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    -0x30(%rbp),%rax
movslq -0x3c(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
lea    0xbdd(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
cmpl   $0x1,-0x40(%rbp)
jge    146e <main+0x2fe>
lea    0xbcd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1481 <main+0x311>
movsd  -0x48(%rbp),%xmm0
lea    0xbb8(%rip),%rdi
mov    $0x1,%al
call   1040 <printf@plt>
jmp    1486 <main+0x316>
mov    -0x3c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x3c(%rbp)
jmp    1364 <main+0x1f4>
lea    0xb9c(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x48,%rsp
mov    %rsi,%r14
mov    %edi,%ebx
lea    0x0(,%rbx,8),%edi
call   1070 <malloc@plt>
mov    %rax,%rbp
mov    $0x1f40,%edi
call   1070 <malloc@plt>
mov    %rax,%r13
mov    %ebx,%r15d
mov    %rbx,0x28(%rsp)
cmp    $0x2,%ebx
jl     11e8 <main+0x68>
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1040 <atof@plt>
movsd  %xmm0,0x0(%rbp,%rbx,8)
add    $0x1,%rbx
cmp    %rbx,%r15
jne    11d0 <main+0x50>
mov    %rbp,0x40(%rsp)
lea    0xe24(%rip),%rdi
mov    %r13,%rsi
call   1090 <scanf@plt>
mov    0x2de5(%rip),%rcx
cmp    (%rcx),%rax
jne    1283 <main+0x103>
xor    %ebp,%ebp
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    %ebp,%edi
mov    %r13,%rsi
call   1060 <order@plt>
xorps  %xmm1,%xmm1
cvtsi2sd %ebp,%xmm1
movsd  0x8(%rsp),%xmm2
divsd  %xmm1,%xmm2
movsd  0x10(%rsp),%xmm0
divsd  %xmm1,%xmm0
movapd %xmm2,%xmm3
mulsd  %xmm2,%xmm3
subsd  %xmm3,%xmm0
mulsd  %xmm1,%xmm0
movsd  0xda5(%rip),%xmm3
movsd  %xmm1,0x38(%rsp)
addsd  %xmm1,%xmm3
divsd  %xmm3,%xmm0
ucomisd 0xd9f(%rip),%xmm0
jb     1337 <main+0x1b7>
xorps  %xmm1,%xmm1
sqrtsd %xmm0,%xmm1
jmp    134c <main+0x1cc>
mov    $0x3e8,%r14d
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
xor    %ebp,%ebp
mov    $0x8,%r12d
mov    %r13,%rbx
xorpd  %xmm0,%xmm0
movsd  %xmm0,0x10(%rsp)
jmp    12fb <main+0x17b>
nopw   0x0(%rax,%rax,1)
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
addsd  %xmm2,%xmm0
movsd  %xmm0,0x8(%rsp)
mulsd  %xmm2,%xmm2
addsd  %xmm2,%xmm1
movsd  %xmm1,0x10(%rsp)
lea    (%r12,%r13,1),%rbx
lea    0xd39(%rip),%rdi
mov    %rbx,%rsi
call   1090 <scanf@plt>
add    $0x8,%r12
mov    0x2cf6(%rip),%rcx
cmp    (%rcx),%rax
je     121e <main+0x9e>
movsd  (%rbx),%xmm2
add    $0x1,%ebp
cmp    %ebp,%r14d
jg     12b0 <main+0x130>
mov    %r14d,%ebx
add    $0x3e8,%ebx
lea    0x1f40(,%r14,8),%esi
mov    %r13,%rdi
movsd  %xmm2,0x30(%rsp)
call   1080 <realloc@plt>
movsd  0x30(%rsp),%xmm2
mov    %rax,%r13
mov    %ebx,%r14d
jmp    12b0 <main+0x130>
movsd  %xmm2,0x8(%rsp)
call   10a0 <sqrt@plt>
movsd  0x8(%rsp),%xmm2
movapd %xmm0,%xmm1
lea    0xcca(%rip),%rdi
movapd %xmm2,%xmm0
mov    %ebp,%esi
mov    $0x2,%al
call   1050 <printf@plt>
cmpl   $0x2,0x28(%rsp)
jl     144f <main+0x2cf>
mov    $0x1,%ebx
movsd  0xc90(%rip),%xmm1
lea    0xcb0(%rip),%rbp
lea    0xcb4(%rip),%r12
jmp    13e7 <main+0x267>
nopl   0x0(%rax,%rax,1)
movapd 0x10(%rsp),%xmm2
cvttpd2dq %xmm2,%xmm0
cvtdq2pd %xmm0,%xmm0
subsd  %xmm0,%xmm2
movsd  0xc5e(%rip),%xmm1
addsd  %xmm1,%xmm0
subsd  0x8(%rsp),%xmm0
movsd  0x28(%rsp),%xmm1
mulsd  %xmm0,%xmm1
movsd  0x30(%rsp),%xmm0
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    %r12,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0xc2a(%rip),%xmm1
add    $0x1,%rbx
cmp    %rbx,%r15
je     144f <main+0x2cf>
mov    0x40(%rsp),%rax
movsd  (%rax,%rbx,8),%xmm0
movapd %xmm0,%xmm2
mulsd  0x38(%rsp),%xmm2
movsd  %xmm2,0x8(%rsp)
addsd  %xmm1,%xmm2
movapd %xmm2,0x10(%rsp)
cvttsd2si %xmm2,%eax
movslq %eax,%r14
movsd  -0x8(%r13,%r14,8),%xmm1
movsd  %xmm1,0x28(%rsp)
movsd  0x0(%r13,%r14,8),%xmm1
movsd  %xmm1,0x30(%rsp)
mov    %rbp,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
test   %r14d,%r14d
jg     1390 <main+0x210>
lea    0xbf1(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    13d6 <main+0x256>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x48,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c" %lf\00"
@EOF = global i64 0
@.str.1 = [18 x i8] c"%lf\09sd:\09%lf\09n:\09%d\00"
@.str.2 = [8 x i8] c"\09%5.3lf\00"
@.str.3 = [3 x i8] c"\09-\00"
@.str.4 = [5 x i8] c"\09%lf\00"
@.str.5 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca double*
%7 = alloca double
%8 = alloca double
%9 = alloca double*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 1000, i32* %11
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
%17 = mul i64 %16, 8
%18 = trunc i64 %17 to i32
%19 = call i64 @malloc(i32 %18)
%20 = inttoptr i64 %19 to double*
store double* %20, double** %9
%21 = load i32, i32* %11
%22 = zext i32 %21 to i64
%23 = mul i64 %22, 8
%24 = trunc i64 %23 to i32
%25 = call i64 @malloc(i32 %24)
%26 = inttoptr i64 %25 to double*
store double* %26, double** %6
store i32 1, i32* %12
br label %27
27: ; preds = %42, %2
%28 = load i32, i32* %12
%29 = load i32, i32* %4
%30 = icmp slt i32 %28, %29
br i1 %30, label %31, label %45
31: ; preds = %27
%32 = load i8**, i8*** %5
%33 = load i32, i32* %12
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8*, i8** %32, i64 %34
%36 = load i8*, i8** %35
%37 = call double @atof(i8* %36)
%38 = load double*, double** %9
%39 = load i32, i32* %12
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds double, double* %38, i64 %40
store double %37, double* %41
br label %42
42: ; preds = %31
%43 = load i32, i32* %12
%44 = add nsw i32 %43, 1
store i32 %44, i32* %12
br label %27
45: ; preds = %27
store i32 0, i32* %10
store double 0.000000e+00, double* %8
store double 0.000000e+00, double* %7
br label %46
46: ; preds = %89, %45
%47 = load double*, double** %6
%48 = load i32, i32* %10
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds double, double* %47, i64 %49
%51 = call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %50)
%52 = load i64, i64* @EOF
%53 = icmp ne i64 %51, %52
br i1 %53, label %54, label %90
54: ; preds = %46
%55 = load double*, double** %6
%56 = load i32, i32* %10
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
%59 = load double, double* %58
%60 = load double, double* %7
%61 = fadd double %60, %59
store double %61, double* %7
%62 = load double*, double** %6
%63 = load i32, i32* %10
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds double, double* %62, i64 %64
%66 = load double, double* %65
%67 = load double*, double** %6
%68 = load i32, i32* %10
%69 = sext i32 %68 to i64
%70 = getelementptr inbounds double, double* %67, i64 %69
%71 = load double, double* %70
%72 = load double, double* %8
%73 = call double @llvm.fmuladd.f64(double %66, double %71, double %72)
store double %73, double* %8
%74 = load i32, i32* %10
%75 = add nsw i32 %74, 1
store i32 %75, i32* %10
%76 = load i32, i32* %10
%77 = load i32, i32* %11
%78 = icmp sge i32 %76, %77
br i1 %78, label %79, label %89
79: ; preds = %54
%80 = load i32, i32* %11
%81 = add nsw i32 %80, 1000
store i32 %81, i32* %11
%82 = load double*, double** %6
%83 = load i32, i32* %11
%84 = zext i32 %83 to i64
%85 = mul i64 %84, 8
%86 = trunc i64 %85 to i32
%87 = call i64 @realloc(double* %82, i32 %86)
%88 = inttoptr i64 %87 to double*
store double* %88, double** %6
br label %89
89: ; preds = %79, %54
br label %46
90: ; preds = %46
%91 = load i32, i32* %10
%92 = load double*, double** %6
%93 = call i32 @order(i32 %91, double* %92)
%94 = load i32, i32* %10
%95 = sitofp i32 %94 to double
%96 = load double, double* %7
%97 = fdiv double %96, %95
store double %97, double* %7
%98 = load i32, i32* %10
%99 = sitofp i32 %98 to double
%100 = load double, double* %8
%101 = fdiv double %100, %99
store double %101, double* %8
%102 = load double, double* %7
%103 = load double, double* %7
%104 = load double, double* %8
%105 = fneg double %102
%106 = call double @llvm.fmuladd.f64(double %105, double %103, double %104)
store double %106, double* %8
%107 = load double, double* %8
%108 = load i32, i32* %10
%109 = sitofp i32 %108 to double
%110 = fmul double %107, %109
%111 = load i32, i32* %10
%112 = sitofp i32 %111 to double
%113 = fsub double %112, 1.000000e+00
%114 = fdiv double %110, %113
%115 = call double @sqrt(double %114)
store double %115, double* %8
%116 = load double, double* %7
%117 = load double, double* %8
%118 = load i32, i32* %10
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %116, double %117, i32 %118)
store i32 1, i32* %12
br label %120
120: ; preds = %184, %90
%121 = load i32, i32* %12
%122 = load i32, i32* %4
%123 = icmp slt i32 %121, %122
br i1 %123, label %124, label %187
124: ; preds = %120
%125 = load double*, double** %9
%126 = load i32, i32* %12
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds double, double* %125, i64 %127
%129 = load double, double* %128
%130 = load i32, i32* %10
%131 = sitofp i32 %130 to double
%132 = call double @llvm.fmuladd.f64(double %129, double %131, double 5.000000e-01)
%133 = fptosi double %132 to i32
store i32 %133, i32* %13
%134 = load double*, double** %6
%135 = load i32, i32* %13
%136 = sub nsw i32 %135, 1
%137 = sext i32 %136 to i64
%138 = getelementptr inbounds double, double* %134, i64 %137
%139 = load double, double* %138
%140 = load i32, i32* %13
%141 = sitofp i32 %140 to double
%142 = fadd double %141, 5.000000e-01
%143 = load double*, double** %9
%144 = load i32, i32* %12
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds double, double* %143, i64 %145
%147 = load double, double* %146
%148 = load i32, i32* %10
%149 = sitofp i32 %148 to double
%150 = fneg double %147
%151 = call double @llvm.fmuladd.f64(double %150, double %149, double %142)
%152 = load double*, double** %6
%153 = load i32, i32* %13
%154 = sext i32 %153 to i64
%155 = getelementptr inbounds double, double* %152, i64 %154
%156 = load double, double* %155
%157 = load double*, double** %9
%158 = load i32, i32* %12
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds double, double* %157, i64 %159
%161 = load double, double* %160
%162 = load i32, i32* %10
%163 = sitofp i32 %162 to double
%164 = call double @llvm.fmuladd.f64(double %161, double %163, double 5.000000e-01)
%165 = load i32, i32* %13
%166 = sitofp i32 %165 to double
%167 = fsub double %164, %166
%168 = fmul double %156, %167
%169 = call double @llvm.fmuladd.f64(double %139, double %151, double %168)
store double %169, double* %14
%170 = load double*, double** %9
%171 = load i32, i32* %12
%172 = sext i32 %171 to i64
%173 = getelementptr inbounds double, double* %170, i64 %172
%174 = load double, double* %173
%175 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %174)
%176 = load i32, i32* %13
%177 = icmp slt i32 %176, 1
br i1 %177, label %178, label %180
178: ; preds = %124
%179 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %183
180: ; preds = %124
%181 = load double, double* %14
%182 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), double %181)
br label %183
183: ; preds = %180, %178
br label %184
184: ; preds = %183
%185 = load i32, i32* %12
%186 = add nsw i32 %185, 1
store i32 %186, i32* %12
br label %120
187: ; preds = %120
%188 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0))
%189 = load i32, i32* %3
ret i32 %189
}

LLVM IR (-O2):
@.str = [5 x i8] c" %lf\00"
@EOF = global i64 0
@.str.1 = [18 x i8] c"%lf\09sd:\09%lf\09n:\09%d\00"
@.str.2 = [8 x i8] c"\09%5.3lf\00"
@.str.3 = [3 x i8] c"\09-\00"
@.str.4 = [5 x i8] c"\09%lf\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = shl i32 %0, 3
%4 = tail call i64 @malloc(i32 %3)
%5 = inttoptr i64 %4 to double*
%6 = tail call i64 @malloc(i32 8000)
%7 = inttoptr i64 %6 to double*
%8 = icmp sgt i32 %0, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = zext i32 %0 to i64
br label %15
11: ; preds = %15, %2
%12 = tail call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %7)
%13 = load i64, i64* @EOF
%14 = icmp eq i64 %12, %13
br i1 %14, label %50, label %23
15: ; preds = %9, %15
%16 = phi i64 [ 1, %9 ], [ %21, %15 ]
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = tail call double @atof(i8* %18)
%20 = getelementptr inbounds double, double* %5, i64 %16
store double %19, double* %20
%21 = add nuw nsw i64 %16, 1
%22 = icmp eq i64 %21, %10
br i1 %22, label %11, label %15
23: ; preds = %11, %41
%24 = phi i64 [ %33, %41 ], [ 0, %11 ]
%25 = phi double* [ %44, %41 ], [ %7, %11 ]
%26 = phi double* [ %43, %41 ], [ %7, %11 ]
%27 = phi double [ %31, %41 ], [ 0.000000e+00, %11 ]
%28 = phi i32 [ %42, %41 ], [ 1000, %11 ]
%29 = phi double [ %32, %41 ], [ 0.000000e+00, %11 ]
%30 = load double, double* %25
%31 = fadd double %27, %30
%32 = tail call double @llvm.fmuladd.f64(double %30, double %30, double %29)
%33 = add nuw i64 %24, 1
%34 = trunc i64 %33 to i32
%35 = icmp sgt i32 %28, %34
br i1 %35, label %41, label %36
36: ; preds = %23
%37 = add nsw i32 %28, 1000
%38 = shl i32 %37, 3
%39 = tail call i64 @realloc(double* %26, i32 %38)
%40 = inttoptr i64 %39 to double*
br label %41
41: ; preds = %36, %23
%42 = phi i32 [ %37, %36 ], [ %28, %23 ]
%43 = phi double* [ %40, %36 ], [ %26, %23 ]
%44 = getelementptr inbounds double, double* %43, i64 %33
%45 = tail call i64 @scanf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), double* %44)
%46 = load i64, i64* @EOF
%47 = icmp eq i64 %45, %46
br i1 %47, label %48, label %23
48: ; preds = %41
%49 = trunc i64 %33 to i32
br label %50
50: ; preds = %48, %11
%51 = phi double [ 0.000000e+00, %11 ], [ %32, %48 ]
%52 = phi i32 [ 0, %11 ], [ %49, %48 ]
%53 = phi double [ 0.000000e+00, %11 ], [ %31, %48 ]
%54 = phi double* [ %7, %11 ], [ %43, %48 ]
%55 = tail call i32 @order(i32 %52, double* %54)
%56 = sitofp i32 %52 to double
%57 = fdiv double %53, %56
%58 = fdiv double %51, %56
%59 = fneg double %57
%60 = tail call double @llvm.fmuladd.f64(double %59, double %57, double %58)
%61 = fmul double %60, %56
%62 = fadd double %56, -1.000000e+00
%63 = fdiv double %61, %62
%64 = tail call double @sqrt(double %63)
%65 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0), double %57, double %64, i32 %52)
br i1 %8, label %66, label %97
66: ; preds = %50
%67 = zext i32 %0 to i64
br label %68
68: ; preds = %66, %94
%69 = phi i64 [ 1, %66 ], [ %95, %94 ]
%70 = getelementptr inbounds double, double* %5, i64 %69
%71 = load double, double* %70
%72 = tail call double @llvm.fmuladd.f64(double %71, double %56, double 5.000000e-01)
%73 = fptosi double %72 to i32
%74 = add nsw i32 %73, -1
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds double, double* %54, i64 %75
%77 = load double, double* %76
%78 = sitofp i32 %73 to double
%79 = sext i32 %73 to i64
%80 = getelementptr inbounds double, double* %54, i64 %79
%81 = load double, double* %80
%82 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), double %71)
%83 = icmp slt i32 %73, 1
br i1 %83, label %84, label %86
84: ; preds = %68
%85 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
br label %94
86: ; preds = %68
%87 = fneg double %71
%88 = fadd double %78, 5.000000e-01
%89 = tail call double @llvm.fmuladd.f64(double %87, double %56, double %88)
%90 = fsub double %72, %78
%91 = fmul double %81, %90
%92 = tail call double @llvm.fmuladd.f64(double %77, double %89, double %91)
%93 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), double %92)
br label %94
94: ; preds = %84, %86
%95 = add nuw nsw i64 %69, 1
%96 = icmp eq i64 %95, %67
br i1 %96, label %97, label %68
97: ; preds = %94, %50
%98 = tail call i32 @putchar(i32 10)
ret i32 0
}