#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 *, char, float);
int /*<<< orphan*/ putchar(char);
void horizontal(float cn[], float maxcn) {
  int i, j;
  int len;
  for (i = 0; i < 26; ++i) {
    printf("%c %.0f \t", 'a' + i, cn[i]);
    len = (int)40 * (cn[i] / maxcn);
    for (j = 0; j < len; ++j)
      putchar('|');
    putchar('\n');
  }
  for (i = 0; i < 26; ++i) {
    printf("%c %.0f \t", 'A' + i, cn[i + 26]);
    len = (int)40 * (cn[i + 26] / maxcn);
    for (j = 0; j < len; ++j)
      putchar('|');
    putchar('\n');
  }
}


x86 assembly (clang, -O0):
<horizontal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x1a,-0x10(%rbp)
jge    11cc <horizontal+0xac>
mov    -0x10(%rbp),%eax
add    $0x61,%eax
mov    -0x8(%rbp),%rcx
movslq -0x10(%rbp),%rdx
movss  (%rcx,%rdx,4),%xmm0
lea    0xea8(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm1
divss  -0xc(%rbp),%xmm1
movss  0xe82(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    11b4 <horizontal+0x94>
mov    $0x7c,%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1190 <horizontal+0x70>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1138 <horizontal+0x18>
movl   $0x0,-0x10(%rbp)
cmpl   $0x1a,-0x10(%rbp)
jge    1271 <horizontal+0x151>
mov    -0x10(%rbp),%eax
add    $0x41,%eax
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%edx
add    $0x1a,%edx
movslq %edx,%rdx
movss  (%rcx,%rdx,4),%xmm0
lea    0xe08(%rip),%rdi
movsbl %al,%esi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1a,%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm1
divss  -0xc(%rbp),%xmm1
movss  0xddd(%rip),%xmm0
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %eax,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    1259 <horizontal+0x139>
mov    $0x7c,%edi
call   1030 <putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1235 <horizontal+0x115>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11d3 <horizontal+0xb3>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<horizontal>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
movss  %xmm0,0x4(%rsp)
mov    %rdi,%r15
xor    %ebx,%ebx
lea    0xecb(%rip),%r14
jmp    1154 <horizontal+0x34>
nopl   0x0(%rax,%rax,1)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x1a,%rbx
je     11a1 <horizontal+0x81>
lea    0x61(%rbx),%eax
movss  (%r15,%rbx,4),%xmm0
movsbl %al,%esi
mov    %r14,%rdi
call   1040 <printf@plt>
movss  (%r15,%rbx,4),%xmm0
divss  0x4(%rsp),%xmm0
mulss  0xe84(%rip),%xmm0
cvttss2si %xmm0,%ebp
test   %ebp,%ebp
jle    1140 <horizontal+0x20>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x7c,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1190 <horizontal+0x70>
jmp    1140 <horizontal+0x20>
xor    %ebx,%ebx
lea    0xe5a(%rip),%r14
jmp    11c4 <horizontal+0xa4>
nopl   0x0(%rax)
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%rbx
cmp    $0x1a,%rbx
je     1211 <horizontal+0xf1>
lea    0x41(%rbx),%eax
movss  0x68(%r15,%rbx,4),%xmm0
movsbl %al,%esi
mov    %r14,%rdi
call   1040 <printf@plt>
movss  0x68(%r15,%rbx,4),%xmm0
divss  0x4(%rsp),%xmm0
mulss  0xe12(%rip),%xmm0
cvttss2si %xmm0,%ebp
test   %ebp,%ebp
jle    11b0 <horizontal+0x90>
cs nopw 0x0(%rax,%rax,1)
mov    $0x7c,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    1200 <horizontal+0xe0>
jmp    11b0 <horizontal+0x90>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%c %.0f \09\00"
define void @horizontal(float* %0, float %1) {
%3 = alloca float*
%4 = alloca float
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store float* %0, float** %3
store float %1, float* %4
store i32 0, i32* %5
br label %8
8: ; preds = %41, %2
%9 = load i32, i32* %5
%10 = icmp slt i32 %9, 26
br i1 %10, label %11, label %44
11: ; preds = %8
%12 = load i32, i32* %5
%13 = add nsw i32 97, %12
%14 = trunc i32 %13 to i8
%15 = load float*, float** %3
%16 = load i32, i32* %5
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds float, float* %15, i64 %17
%19 = load float, float* %18
%20 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %14, float %19)
%21 = load float*, float** %3
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds float, float* %21, i64 %23
%25 = load float, float* %24
%26 = load float, float* %4
%27 = fdiv float %25, %26
%28 = fmul float 4.000000e+01, %27
%29 = fptosi float %28 to i32
store i32 %29, i32* %7
store i32 0, i32* %6
br label %30
30: ; preds = %36, %11
%31 = load i32, i32* %6
%32 = load i32, i32* %7
%33 = icmp slt i32 %31, %32
br i1 %33, label %34, label %39
34: ; preds = %30
%35 = call i32 @putchar(i8 signext 124)
br label %36
36: ; preds = %34
%37 = load i32, i32* %6
%38 = add nsw i32 %37, 1
store i32 %38, i32* %6
br label %30
39: ; preds = %30
%40 = call i32 @putchar(i8 signext 10)
br label %41
41: ; preds = %39
%42 = load i32, i32* %5
%43 = add nsw i32 %42, 1
store i32 %43, i32* %5
br label %8
44: ; preds = %8
store i32 0, i32* %5
br label %45
45: ; preds = %80, %44
%46 = load i32, i32* %5
%47 = icmp slt i32 %46, 26
br i1 %47, label %48, label %83
48: ; preds = %45
%49 = load i32, i32* %5
%50 = add nsw i32 65, %49
%51 = trunc i32 %50 to i8
%52 = load float*, float** %3
%53 = load i32, i32* %5
%54 = add nsw i32 %53, 26
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds float, float* %52, i64 %55
%57 = load float, float* %56
%58 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %51, float %57)
%59 = load float*, float** %3
%60 = load i32, i32* %5
%61 = add nsw i32 %60, 26
%62 = sext i32 %61 to i64
%63 = getelementptr inbounds float, float* %59, i64 %62
%64 = load float, float* %63
%65 = load float, float* %4
%66 = fdiv float %64, %65
%67 = fmul float 4.000000e+01, %66
%68 = fptosi float %67 to i32
store i32 %68, i32* %7
store i32 0, i32* %6
br label %69
69: ; preds = %75, %48
%70 = load i32, i32* %6
%71 = load i32, i32* %7
%72 = icmp slt i32 %70, %71
br i1 %72, label %73, label %78
73: ; preds = %69
%74 = call i32 @putchar(i8 signext 124)
br label %75
75: ; preds = %73
%76 = load i32, i32* %6
%77 = add nsw i32 %76, 1
store i32 %77, i32* %6
br label %69
78: ; preds = %69
%79 = call i32 @putchar(i8 signext 10)
br label %80
80: ; preds = %78
%81 = load i32, i32* %5
%82 = add nsw i32 %81, 1
store i32 %82, i32* %5
br label %45
83: ; preds = %45
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c %.0f \09\00"
define void @horizontal(float* nocapture %0, float %1) {
br label %3
3: ; preds = %2, %20
%4 = phi i64 [ 0, %2 ], [ %22, %20 ]
%5 = trunc i64 %4 to i8
%6 = add nuw nsw i8 %5, 97
%7 = getelementptr inbounds float, float* %0, i64 %4
%8 = load float, float* %7
%9 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %6, float %8)
%10 = load float, float* %7
%11 = fdiv float %10, %1
%12 = fmul float %11, 4.000000e+01
%13 = fptosi float %12 to i32
%14 = icmp sgt i32 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %3, %15
%16 = phi i32 [ %18, %15 ], [ 0, %3 ]
%17 = tail call i32 @putchar(i8 signext 124)
%18 = add nuw nsw i32 %16, 1
%19 = icmp eq i32 %18, %13
br i1 %19, label %20, label %15
20: ; preds = %15, %3
%21 = tail call i32 @putchar(i8 signext 10)
%22 = add nuw nsw i64 %4, 1
%23 = icmp eq i64 %22, 26
br i1 %23, label %24, label %3
24: ; preds = %20, %42
%25 = phi i64 [ %44, %42 ], [ 0, %20 ]
%26 = trunc i64 %25 to i8
%27 = add nuw nsw i8 %26, 65
%28 = add nuw nsw i64 %25, 26
%29 = getelementptr inbounds float, float* %0, i64 %28
%30 = load float, float* %29
%31 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %27, float %30)
%32 = load float, float* %29
%33 = fdiv float %32, %1
%34 = fmul float %33, 4.000000e+01
%35 = fptosi float %34 to i32
%36 = icmp sgt i32 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %24, %37
%38 = phi i32 [ %40, %37 ], [ 0, %24 ]
%39 = tail call i32 @putchar(i8 signext 124)
%40 = add nuw nsw i32 %38, 1
%41 = icmp eq i32 %40, %35
br i1 %41, label %42, label %37
42: ; preds = %37, %24
%43 = tail call i32 @putchar(i8 signext 10)
%44 = add nuw nsw i64 %25, 1
%45 = icmp eq i64 %44, 26
br i1 %45, label %46, label %24
46: ; preds = %42
ret void
}