#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 */
double DBL_MAX;
double DBL_MIN;
double atof(char *);
int /*<<< orphan*/ free(double *);
double *malloc(int);
int /*<<< orphan*/ putchar(int);
scalar_t__ round(double);
int main(int argc, char *ac[]) {
  int i, count = argc - 1;
  double *dvalues = malloc(01 - 01 + count * sizeof(double) + 1);
  double mi = DBL_MAX, ran = .0, ma = DBL_MIN;
  for (i = 00; argc > 1 && i < count; i = i + 8 - 7) {
    double val = atof(ac[i + 1]);
    if (23 && val < mi)
      mi = val;
    if (val > ma)
      ma = val;
    dvalues[i] = val;
  }
  ran = ma - mi;
  for (i = 0; i < count; ++i) {
    double t = 6. * (dvalues[i] - mi) / (ran);
    putchar(0342);
    putchar(0226);
    putchar(0201 + (int)round(t));
    putchar(040);
  }
  putchar(012);
  free(dvalues);
  return 0;
}


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)
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x18(%rbp)
movslq -0x18(%rbp),%rax
shl    $0x3,%rax
add    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1060 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    0x2e4f(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    0x2e2f(%rip),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x38(%rbp)
movl   $0x0,-0x14(%rbp)
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0x49(%rbp)
jle    11d4 <main+0x84>
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setl   %al
mov    %al,-0x49(%rbp)
mov    -0x49(%rbp),%al
test   $0x1,%al
jne    11e4 <main+0x94>
jmp    125a <main+0x10a>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,8),%rdi
call   1050 <atof@plt>
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    121d <main+0xcd>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x40(%rbp),%xmm0
ucomisd -0x38(%rbp),%xmm0
jbe    1237 <main+0xe7>
movsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x38(%rbp)
movsd  -0x40(%rbp),%xmm0
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  %xmm0,(%rax,%rcx,8)
mov    -0x14(%rbp),%eax
add    $0x8,%eax
sub    $0x7,%eax
mov    %eax,-0x14(%rbp)
jmp    11b9 <main+0x69>
movsd  -0x38(%rbp),%xmm0
subsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12e7 <main+0x197>
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm1
subsd  -0x28(%rbp),%xmm1
movsd  0xd6a(%rip),%xmm0
mulsd  %xmm1,%xmm0
divsd  -0x30(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
mov    $0xe2,%edi
call   1040 <putchar@plt>
mov    $0x96,%edi
call   1040 <putchar@plt>
movsd  -0x48(%rbp),%xmm0
call   1070 <round@plt>
mov    %eax,%edi
add    $0x81,%edi
call   1040 <putchar@plt>
mov    $0x20,%edi
call   1040 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1270 <main+0x120>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%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    $0x18,%rsp
mov    %rsi,%r13
mov    %edi,%r14d
lea    -0x7(,%r14,8),%edi
ff
call   1060 <malloc@plt>
mov    %rax,%r15
cmp    $0x2,%r14d
jl     1254 <main+0x104>
lea    -0x1(%r14),%eax
mov    0x2e57(%rip),%rcx
movsd  (%rcx),%xmm0
mov    0x2e44(%rip),%rcx
movsd  (%rcx),%xmm1
mov    %eax,%r12d
xor    %ebx,%ebx
nopl   (%rax)
movsd  %xmm0,0x8(%rsp)
movsd  %xmm1,(%rsp)
lea    0x1(%rbx),%rbp
mov    0x8(%r13,%rbx,8),%rdi
call   1050 <atof@plt>
movapd %xmm0,%xmm1
minsd  (%rsp),%xmm1
movsd  %xmm0,(%r15,%rbx,8)
maxsd  0x8(%rsp),%xmm0
mov    %rbp,%rbx
cmp    %r12,%rbp
jb     11a0 <main+0x50>
cmp    $0x2,%r14d
jl     1254 <main+0x104>
subsd  %xmm1,%xmm0
xor    %ebx,%ebx
movsd  %xmm0,(%rsp)
movsd  %xmm1,0x10(%rsp)
nopl   (%rax)
movsd  (%r15,%rbx,8),%xmm2
subsd  %xmm1,%xmm2
mulsd  0xdfe(%rip),%xmm2
divsd  %xmm0,%xmm2
movsd  %xmm2,0x8(%rsp)
mov    $0xe2,%edi
call   1040 <putchar@plt>
mov    $0x96,%edi
call   1040 <putchar@plt>
movsd  0x8(%rsp),%xmm0
call   1070 <round@plt>
lea    0x81(%rax),%edi
call   1040 <putchar@plt>
mov    $0x20,%edi
call   1040 <putchar@plt>
movsd  0x10(%rsp),%xmm1
movsd  (%rsp),%xmm0
add    $0x1,%rbx
cmp    %rbx,%r12
jne    11f0 <main+0xa0>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %r15,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@DBL_MAX = global double 0.000000e+00
@DBL_MIN = global double 0.000000e+00
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
%13 = alloca double
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%14 = load i32, i32* %4
%15 = sub nsw i32 %14, 1
store i32 %15, i32* %7
%16 = load i32, i32* %7
%17 = sext i32 %16 to i64
%18 = mul i64 %17, 8
%19 = add i64 0, %18
%20 = add i64 %19, 1
%21 = trunc i64 %20 to i32
%22 = call double* @malloc(i32 %21)
store double* %22, double** %8
%23 = load double, double* @DBL_MAX
store double %23, double* %9
store double 0.000000e+00, double* %10
%24 = load double, double* @DBL_MIN
store double %24, double* %11
store i32 0, i32* %6
br label %25
25: ; preds = %59, %2
%26 = load i32, i32* %4
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %32
28: ; preds = %25
%29 = load i32, i32* %6
%30 = load i32, i32* %7
%31 = icmp slt i32 %29, %30
br label %32
32: ; preds = %28, %25
%33 = phi i1 [ false, %25 ], [ %31, %28 ]
br i1 %33, label %34, label %63
34: ; preds = %32
%35 = load i8**, i8*** %5
%36 = load i32, i32* %6
%37 = add nsw i32 %36, 1
%38 = sext i32 %37 to i64
%39 = getelementptr inbounds i8*, i8** %35, i64 %38
%40 = load i8*, i8** %39
%41 = call double @atof(i8* %40)
store double %41, double* %12
%42 = load double, double* %12
%43 = load double, double* %9
%44 = fcmp olt double %42, %43
br i1 %44, label %45, label %47
45: ; preds = %34
%46 = load double, double* %12
store double %46, double* %9
br label %47
47: ; preds = %45, %34
%48 = load double, double* %12
%49 = load double, double* %11
%50 = fcmp ogt double %48, %49
br i1 %50, label %51, label %53
51: ; preds = %47
%52 = load double, double* %12
store double %52, double* %11
br label %53
53: ; preds = %51, %47
%54 = load double, double* %12
%55 = load double*, double** %8
%56 = load i32, i32* %6
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds double, double* %55, i64 %57
store double %54, double* %58
br label %59
59: ; preds = %53
%60 = load i32, i32* %6
%61 = add nsw i32 %60, 8
%62 = sub nsw i32 %61, 7
store i32 %62, i32* %6
br label %25
63: ; preds = %32
%64 = load double, double* %11
%65 = load double, double* %9
%66 = fsub double %64, %65
store double %66, double* %10
store i32 0, i32* %6
br label %67
67: ; preds = %90, %63
%68 = load i32, i32* %6
%69 = load i32, i32* %7
%70 = icmp slt i32 %68, %69
br i1 %70, label %71, label %93
71: ; preds = %67
%72 = load double*, double** %8
%73 = load i32, i32* %6
%74 = sext i32 %73 to i64
%75 = getelementptr inbounds double, double* %72, i64 %74
%76 = load double, double* %75
%77 = load double, double* %9
%78 = fsub double %76, %77
%79 = fmul double 6.000000e+00, %78
%80 = load double, double* %10
%81 = fdiv double %79, %80
store double %81, double* %13
%82 = call i32 @putchar(i32 226)
%83 = call i32 @putchar(i32 150)
%84 = load double, double* %13
%85 = call i64 @round(double %84)
%86 = trunc i64 %85 to i32
%87 = add nsw i32 129, %86
%88 = call i32 @putchar(i32 %87)
%89 = call i32 @putchar(i32 32)
br label %90
90: ; preds = %71
%91 = load i32, i32* %6
%92 = add nsw i32 %91, 1
store i32 %92, i32* %6
br label %67
93: ; preds = %67
%94 = call i32 @putchar(i32 10)
%95 = load double*, double** %8
%96 = call i32 @free(double* %95)
ret i32 0
}

LLVM IR (-O2):
@DBL_MAX = global double 0.000000e+00
@DBL_MIN = global double 0.000000e+00
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add nsw i32 %0, -1
%4 = shl i32 %3, 3
%5 = or i32 %4, 1
%6 = tail call double* @malloc(i32 %5)
%7 = icmp sgt i32 %0, 1
br i1 %7, label %8, label %46
8: ; preds = %2
%9 = load double, double* @DBL_MIN
%10 = load double, double* @DBL_MAX
%11 = zext i32 %3 to i64
br label %12
12: ; preds = %8, %12
%13 = phi i64 [ 0, %8 ], [ %16, %12 ]
%14 = phi double [ %10, %8 ], [ %21, %12 ]
%15 = phi double [ %9, %8 ], [ %23, %12 ]
%16 = add nuw nsw i64 %13, 1
%17 = getelementptr inbounds i8*, i8** %1, i64 %16
%18 = load i8*, i8** %17
%19 = tail call double @atof(i8* %18)
%20 = fcmp olt double %19, %14
%21 = select i1 %20, double %19, double %14
%22 = fcmp ogt double %19, %15
%23 = select i1 %22, double %19, double %15
%24 = getelementptr inbounds double, double* %6, i64 %13
store double %19, double* %24
%25 = icmp ult i64 %16, %11
br i1 %25, label %12, label %26
26: ; preds = %12
%27 = fsub double %23, %21
br i1 %7, label %28, label %46
28: ; preds = %26
%29 = zext i32 %3 to i64
br label %30
30: ; preds = %28, %30
%31 = phi i64 [ 0, %28 ], [ %44, %30 ]
%32 = getelementptr inbounds double, double* %6, i64 %31
%33 = load double, double* %32
%34 = fsub double %33, %21
%35 = fmul double %34, 6.000000e+00
%36 = fdiv double %35, %27
%37 = tail call i32 @putchar(i32 226)
%38 = tail call i32 @putchar(i32 150)
%39 = tail call i64 @round(double %36)
%40 = trunc i64 %39 to i32
%41 = add nsw i32 %40, 129
%42 = tail call i32 @putchar(i32 %41)
%43 = tail call i32 @putchar(i32 32)
%44 = add nuw nsw i64 %31, 1
%45 = icmp eq i64 %44, %29
br i1 %45, label %46, label %30
46: ; preds = %30, %2, %26
%47 = tail call i32 @putchar(i32 10)
%48 = tail call i32 @free(double* %6)
ret i32 0
}