#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 /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ puts(char *);
void print_spectrum(char *text, int *buf, int is_pulse) {
  int i;
  int j;
  int min;
  int max;
  int max_value = 0;
  int value;
  int sum = 0;
  int counter = 0;
  double average = 0;
  double tolerance;
  puts("-----------------------------------------------------------------------"
       "--------");
  printf("%s:\n", text);
  for (i = 0; i < 256; i++) {
    if (buf[i] > max_value) {
      max_value = buf[i];
    }
  }
  for (i = 1; i < 200; i++) {
    if (buf[i] > 0) {
      printf("%3d ", i);
      value = (buf[i] * 60) / max_value;
      for (j = 0; j < value; j++) {
        putchar('o');
      }
      printf(" %d\n", buf[i]);
      sum += i * buf[i];
      counter += buf[i];
    } else {
      max = i - 1;
      if (counter > 0) {
        average = (float)sum / (float)counter;
        if (is_pulse) {
          printf("pulse ");
        } else {
          printf("pause ");
        }
        printf("avg: %4.1f=%6.1f us, ", average,
               (1000000. * average) / (float)20000);
        printf("min: %2d=%6.1f us, ", min, (1000000. * min) / (float)20000);
        printf("max: %2d=%6.1f us, ", max, (1000000. * max) / (float)20000);
        tolerance = (max - average);
        if (average - min > tolerance) {
          tolerance = average - min;
        }
        tolerance = tolerance * 100 / average;
        printf("tol: %4.1f%%\n", tolerance);
      }
      counter = 0;
      sum = 0;
      min = i + 1;
    }
  }
}


x86 assembly (clang, -O0):
<print_spectrum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x28(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x34(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
lea    0xeb1(%rip),%rdi
call   1040 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xef1(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x100,-0x18(%rbp)
jge    11c7 <print_spectrum+0x97>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
cmp    -0x28(%rbp),%eax
jle    11b4 <print_spectrum+0x84>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x28(%rbp)
jmp    11b9 <print_spectrum+0x89>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1185 <print_spectrum+0x55>
movl   $0x1,-0x18(%rbp)
cmpl   $0xc8,-0x18(%rbp)
jge    13ec <print_spectrum+0x2bc>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
cmpl   $0x0,(%rax,%rcx,4)
jle    1280 <print_spectrum+0x150>
mov    -0x18(%rbp),%esi
lea    0xe76(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
imul   $0x3c,(%rax,%rcx,4),%eax
cltd
idivl  -0x28(%rbp)
mov    %eax,-0x2c(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x2c(%rbp),%eax
jge    123c <print_spectrum+0x10c>
mov    $0x6f,%edi
call   1030 <putchar@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1218 <print_spectrum+0xe8>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xe24(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
mov    -0x18(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
imul   (%rcx,%rdx,4),%eax
add    -0x30(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
add    -0x34(%rbp),%eax
mov    %eax,-0x34(%rbp)
jmp    13d9 <print_spectrum+0x2a9>
mov    -0x18(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x34(%rbp)
jle    13c2 <print_spectrum+0x292>
cvtsi2ssl -0x30(%rbp),%xmm0
cvtsi2ssl -0x34(%rbp),%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x40(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     12c7 <print_spectrum+0x197>
lea    0xdbc(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    12d5 <print_spectrum+0x1a5>
lea    0xdb0(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movsd  -0x40(%rbp),%xmm0
movsd  0xd26(%rip),%xmm1
mulsd  -0x40(%rbp),%xmm1
movsd  0xd11(%rip),%xmm2
divsd  %xmm2,%xmm1
lea    0xd8b(%rip),%rdi
mov    $0x2,%al
call   1050 <printf@plt>
mov    -0x20(%rbp),%esi
cvtsi2sdl -0x20(%rbp),%xmm1
movsd  0xcf7(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xce3(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xd73(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
mov    -0x24(%rbp),%esi
cvtsi2sdl -0x24(%rbp),%xmm1
movsd  0xcc9(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  0xcb5(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xd59(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
cvtsi2sdl -0x24(%rbp),%xmm0
subsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
ucomisd -0x48(%rbp),%xmm0
jbe    1398 <print_spectrum+0x268>
movsd  -0x40(%rbp),%xmm0
cvtsi2sdl -0x20(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  0xc70(%rip),%xmm0
mulsd  -0x48(%rbp),%xmm0
divsd  -0x40(%rbp),%xmm0
movsd  %xmm0,-0x48(%rbp)
movsd  -0x48(%rbp),%xmm0
lea    0xd08(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movl   $0x0,-0x34(%rbp)
movl   $0x0,-0x30(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    13de <print_spectrum+0x2ae>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11ce <print_spectrum+0x9e>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_spectrum>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x28,%rsp
mov    %edx,%r14d
mov    %rsi,%r15
mov    %rdi,%rbp
lea    0xeca(%rip),%rdi
call   1040 <puts@plt>
lea    0xf0e(%rip),%rdi
xor    %ebx,%ebx
mov    %rbp,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
pxor   %xmm0,%xmm0
pxor   %xmm1,%xmm1
xchg   %ax,%ax
movdqu (%r15,%rbx,4),%xmm2
movdqu 0x10(%r15,%rbx,4),%xmm3
movdqu 0x20(%r15,%rbx,4),%xmm4
movdqu 0x30(%r15,%rbx,4),%xmm5
movdqa %xmm2,%xmm6
pcmpgtd %xmm0,%xmm6
pand   %xmm6,%xmm2
pandn  %xmm0,%xmm6
por    %xmm2,%xmm6
movdqa %xmm3,%xmm2
pcmpgtd %xmm1,%xmm2
pand   %xmm2,%xmm3
pandn  %xmm1,%xmm2
por    %xmm3,%xmm2
movdqa %xmm4,%xmm0
pcmpgtd %xmm6,%xmm0
pand   %xmm0,%xmm4
pandn  %xmm6,%xmm0
por    %xmm4,%xmm0
movdqa %xmm5,%xmm1
pcmpgtd %xmm2,%xmm1
pand   %xmm1,%xmm5
pandn  %xmm2,%xmm1
por    %xmm5,%xmm1
add    $0x10,%rbx
cmp    $0x100,%rbx
jne    1170 <print_spectrum+0x40>
movdqa %xmm0,%xmm2
pcmpgtd %xmm1,%xmm2
pand   %xmm2,%xmm0
pandn  %xmm1,%xmm2
por    %xmm0,%xmm2
pshufd $0xee,%xmm2,%xmm0
movdqa %xmm2,%xmm1
pcmpgtd %xmm0,%xmm1
pand   %xmm1,%xmm2
pandn  %xmm0,%xmm1
por    %xmm2,%xmm1
pshufd $0x55,%xmm1,%xmm0
movdqa %xmm1,%xmm2
pcmpgtd %xmm0,%xmm2
pand   %xmm2,%xmm1
pandn  %xmm0,%xmm2
por    %xmm1,%xmm2
movd   %xmm2,0x4(%rsp)
test   %r14d,%r14d
lea    0xe40(%rip),%rax
lea    0xe32(%rip),%rcx
cmove  %rax,%rcx
mov    %rcx,0x10(%rsp)
mov    $0x1,%ebx
xor    %r12d,%r12d
xor    %r13d,%r13d
jmp    128c <print_spectrum+0x15c>
nopl   0x0(%rax,%rax,1)
lea    0xe0b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15,%rbx,4),%eax
add    %eax,%r12d
imul   %ebx,%eax
add    %eax,%r13d
add    $0x1,%rbx
cmp    $0xc8,%rbx
je     13f3 <print_spectrum+0x2c3>
cmpl   $0x0,(%r15,%rbx,4)
jle    12e0 <print_spectrum+0x1b0>
lea    0xdd3(%rip),%rdi
mov    %ebx,%esi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r15,%rbx,4),%esi
imul   $0x3c,%esi,%eax
cltd
idivl  0x4(%rsp)
test   %eax,%eax
jle    1260 <print_spectrum+0x130>
mov    %eax,%r14d
cs nopw 0x0(%rax,%rax,1)
mov    $0x6f,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%r14d
jne    12c0 <print_spectrum+0x190>
mov    (%r15,%rbx,4),%esi
jmp    1260 <print_spectrum+0x130>
cs nopw 0x0(%rax,%rax,1)
test   %r12d,%r12d
jle    13da <print_spectrum+0x2aa>
xorps  %xmm0,%xmm0
cvtsi2ss %r13d,%xmm0
xorps  %xmm1,%xmm1
cvtsi2ss %r12d,%xmm1
divss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,0x8(%rsp)
mov    0x10(%rsp),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm2
movapd %xmm2,%xmm1
movsd  0xcdb(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xcd7(%rip),%xmm0
divsd  %xmm0,%xmm1
lea    0xd49(%rip),%rdi
movapd %xmm2,%xmm0
mov    $0x2,%al
call   1050 <printf@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %ebp,%xmm0
movsd  %xmm0,0x20(%rsp)
mulsd  0xca4(%rip),%xmm0
divsd  0xca4(%rip),%xmm0
lea    0xd30(%rip),%rdi
mov    %ebp,%esi
mov    $0x1,%al
call   1050 <printf@plt>
lea    -0x1(%rbx),%esi
xorps  %xmm0,%xmm0
cvtsi2sd %esi,%xmm0
movsd  %xmm0,0x18(%rsp)
mulsd  0xc74(%rip),%xmm0
divsd  0xc74(%rip),%xmm0
lea    0xd14(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
movsd  0x8(%rsp),%xmm1
movsd  0x18(%rsp),%xmm2
subsd  %xmm1,%xmm2
movapd %xmm1,%xmm0
subsd  0x20(%rsp),%xmm0
maxsd  %xmm2,%xmm0
mulsd  0xc48(%rip),%xmm0
divsd  %xmm1,%xmm0
lea    0xcf0(%rip),%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%rbx
xor    %r13d,%r13d
mov    %ebx,%ebp
xor    %r12d,%r12d
cmp    $0xc8,%rbx
jne    128c <print_spectrum+0x15c>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [80 x i8] c"-------------------------------------------------------------------------------\00"
@.str.1 = [5 x i8] c"%s:\0A\00"
@.str.2 = [5 x i8] c"%3d \00"
@.str.3 = [5 x i8] c" %d\0A\00"
@.str.4 = [7 x i8] c"pulse \00"
@.str.5 = [7 x i8] c"pause \00"
@.str.6 = [22 x i8] c"avg: %4.1f=%6.1f us, \00"
@.str.7 = [20 x i8] c"min: %2d=%6.1f us, \00"
@.str.8 = [20 x i8] c"max: %2d=%6.1f us, \00"
@.str.9 = [14 x i8] c"tol: %4.1f%%\0A\00"
define void @print_spectrum(i8* %0, i32* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca double
%16 = alloca double
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32 %2, i32* %6
store i32 0, i32* %11
store i32 0, i32* %13
store i32 0, i32* %14
store double 0.000000e+00, double* %15
%17 = call i32 @puts(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%18 = load i8*, i8** %4
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %18)
store i32 0, i32* %7
br label %20
20: ; preds = %38, %3
%21 = load i32, i32* %7
%22 = icmp slt i32 %21, 256
br i1 %22, label %23, label %41
23: ; preds = %20
%24 = load i32*, i32** %5
%25 = load i32, i32* %7
%26 = sext i32 %25 to i64
%27 = getelementptr inbounds i32, i32* %24, i64 %26
%28 = load i32, i32* %27
%29 = load i32, i32* %11
%30 = icmp sgt i32 %28, %29
br i1 %30, label %31, label %37
31: ; preds = %23
%32 = load i32*, i32** %5
%33 = load i32, i32* %7
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i32, i32* %32, i64 %34
%36 = load i32, i32* %35
store i32 %36, i32* %11
br label %37
37: ; preds = %31, %23
br label %38
38: ; preds = %37
%39 = load i32, i32* %7
%40 = add nsw i32 %39, 1
store i32 %40, i32* %7
br label %20
41: ; preds = %20
store i32 1, i32* %7
br label %42
42: ; preds = %157, %41
%43 = load i32, i32* %7
%44 = icmp slt i32 %43, 200
br i1 %44, label %45, label %160
45: ; preds = %42
%46 = load i32*, i32** %5
%47 = load i32, i32* %7
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds i32, i32* %46, i64 %48
%50 = load i32, i32* %49
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %95
52: ; preds = %45
%53 = load i32, i32* %7
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %53)
%55 = load i32*, i32** %5
%56 = load i32, i32* %7
%57 = sext i32 %56 to i64
%58 = getelementptr inbounds i32, i32* %55, i64 %57
%59 = load i32, i32* %58
%60 = mul nsw i32 %59, 60
%61 = load i32, i32* %11
%62 = sdiv i32 %60, %61
store i32 %62, i32* %12
store i32 0, i32* %8
br label %63
63: ; preds = %69, %52
%64 = load i32, i32* %8
%65 = load i32, i32* %12
%66 = icmp slt i32 %64, %65
br i1 %66, label %67, label %72
67: ; preds = %63
%68 = call i32 @putchar(i8 signext 111)
br label %69
69: ; preds = %67
%70 = load i32, i32* %8
%71 = add nsw i32 %70, 1
store i32 %71, i32* %8
br label %63
72: ; preds = %63
%73 = load i32*, i32** %5
%74 = load i32, i32* %7
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds i32, i32* %73, i64 %75
%77 = load i32, i32* %76
%78 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %77)
%79 = load i32, i32* %7
%80 = load i32*, i32** %5
%81 = load i32, i32* %7
%82 = sext i32 %81 to i64
%83 = getelementptr inbounds i32, i32* %80, i64 %82
%84 = load i32, i32* %83
%85 = mul nsw i32 %79, %84
%86 = load i32, i32* %13
%87 = add nsw i32 %86, %85
store i32 %87, i32* %13
%88 = load i32*, i32** %5
%89 = load i32, i32* %7
%90 = sext i32 %89 to i64
%91 = getelementptr inbounds i32, i32* %88, i64 %90
%92 = load i32, i32* %91
%93 = load i32, i32* %14
%94 = add nsw i32 %93, %92
store i32 %94, i32* %14
br label %156
95: ; preds = %45
%96 = load i32, i32* %7
%97 = sub nsw i32 %96, 1
store i32 %97, i32* %10
%98 = load i32, i32* %14
%99 = icmp sgt i32 %98, 0
br i1 %99, label %100, label %153
100: ; preds = %95
%101 = load i32, i32* %13
%102 = sitofp i32 %101 to float
%103 = load i32, i32* %14
%104 = sitofp i32 %103 to float
%105 = fdiv float %102, %104
%106 = fpext float %105 to double
store double %106, double* %15
%107 = load i32, i32* %6
%108 = icmp ne i32 %107, 0
br i1 %108, label %109, label %111
109: ; preds = %100
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
br label %113
111: ; preds = %100
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %113
113: ; preds = %111, %109
%114 = load double, double* %15
%115 = load double, double* %15
%116 = fmul double 1.000000e+06, %115
%117 = fdiv double %116, 2.000000e+04
%118 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), double %114, double %117)
%119 = load i32, i32* %9
%120 = load i32, i32* %9
%121 = sitofp i32 %120 to double
%122 = fmul double 1.000000e+06, %121
%123 = fdiv double %122, 2.000000e+04
%124 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %119, double %123)
%125 = load i32, i32* %10
%126 = load i32, i32* %10
%127 = sitofp i32 %126 to double
%128 = fmul double 1.000000e+06, %127
%129 = fdiv double %128, 2.000000e+04
%130 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i32 %125, double %129)
%131 = load i32, i32* %10
%132 = sitofp i32 %131 to double
%133 = load double, double* %15
%134 = fsub double %132, %133
store double %134, double* %16
%135 = load double, double* %15
%136 = load i32, i32* %9
%137 = sitofp i32 %136 to double
%138 = fsub double %135, %137
%139 = load double, double* %16
%140 = fcmp ogt double %138, %139
br i1 %140, label %141, label %146
141: ; preds = %113
%142 = load double, double* %15
%143 = load i32, i32* %9
%144 = sitofp i32 %143 to double
%145 = fsub double %142, %144
store double %145, double* %16
br label %146
146: ; preds = %141, %113
%147 = load double, double* %16
%148 = fmul double %147, 1.000000e+02
%149 = load double, double* %15
%150 = fdiv double %148, %149
store double %150, double* %16
%151 = load double, double* %16
%152 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), double %151)
br label %153
153: ; preds = %146, %95
store i32 0, i32* %14
store i32 0, i32* %13
%154 = load i32, i32* %7
%155 = add nsw i32 %154, 1
store i32 %155, i32* %9
br label %156
156: ; preds = %153, %72
br label %157
157: ; preds = %156
%158 = load i32, i32* %7
%159 = add nsw i32 %158, 1
store i32 %159, i32* %7
br label %42
160: ; preds = %42
ret void
}

LLVM IR (-O2):
@.str = [80 x i8] c"-------------------------------------------------------------------------------\00"
@.str.1 = [5 x i8] c"%s:\0A\00"
@.str.2 = [5 x i8] c"%3d \00"
@.str.3 = [5 x i8] c" %d\0A\00"
@.str.4 = [7 x i8] c"pulse \00"
@.str.5 = [7 x i8] c"pause \00"
@.str.6 = [22 x i8] c"avg: %4.1f=%6.1f us, \00"
@.str.7 = [20 x i8] c"min: %2d=%6.1f us, \00"
@.str.8 = [20 x i8] c"max: %2d=%6.1f us, \00"
@.str.9 = [14 x i8] c"tol: %4.1f%%\0A\00"
define void @print_spectrum(i8* %0, i32* nocapture %1, i32 %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %6, %3
%7 = phi i64 [ 0, %3 ], [ %31, %6 ]
%8 = phi <4 x i32> [ zeroinitializer, %3 ], [ %29, %6 ]
%9 = phi <4 x i32> [ zeroinitializer, %3 ], [ %30, %6 ]
%10 = getelementptr inbounds i32, i32* %1, i64 %7
%11 = bitcast i32* %10 to <4 x i32>*
%12 = load <4 x i32>, <4 x i32>* %11
%13 = getelementptr inbounds i32, i32* %10, i64 4
%14 = bitcast i32* %13 to <4 x i32>*
%15 = load <4 x i32>, <4 x i32>* %14
%16 = icmp sgt <4 x i32> %12, %8
%17 = icmp sgt <4 x i32> %15, %9
%18 = select <4 x i1> %16, <4 x i32> %12, <4 x i32> %8
%19 = select <4 x i1> %17, <4 x i32> %15, <4 x i32> %9
%20 = or i64 %7, 8
%21 = getelementptr inbounds i32, i32* %1, i64 %20
%22 = bitcast i32* %21 to <4 x i32>*
%23 = load <4 x i32>, <4 x i32>* %22
%24 = getelementptr inbounds i32, i32* %21, i64 4
%25 = bitcast i32* %24 to <4 x i32>*
%26 = load <4 x i32>, <4 x i32>* %25
%27 = icmp sgt <4 x i32> %23, %18
%28 = icmp sgt <4 x i32> %26, %19
%29 = select <4 x i1> %27, <4 x i32> %23, <4 x i32> %18
%30 = select <4 x i1> %28, <4 x i32> %26, <4 x i32> %19
%31 = add nuw nsw i64 %7, 16
%32 = icmp eq i64 %31, 256
br i1 %32, label %33, label %6
33: ; preds = %6
%34 = icmp sgt <4 x i32> %29, %30
%35 = select <4 x i1> %34, <4 x i32> %29, <4 x i32> %30
%36 = call i32 @llvm.vector.reduce.smax.v4i32(<4 x i32> %35)
%37 = icmp eq i32 %2, 0
%38 = select i1 %37, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0)
br label %39
39: ; preds = %33, %100
%40 = phi i64 [ 1, %33 ], [ %101, %100 ]
%41 = phi i32 [ 0, %33 ], [ %104, %100 ]
%42 = phi i32 [ 0, %33 ], [ %103, %100 ]
%43 = phi i32 [ undef, %33 ], [ %102, %100 ]
%44 = getelementptr inbounds i32, i32* %1, i64 %40
%45 = load i32, i32* %44
%46 = icmp sgt i32 %45, 0
br i1 %46, label %47, label %69
47: ; preds = %39
%48 = trunc i64 %40 to i32
%49 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i32 %48)
%50 = load i32, i32* %44
%51 = mul nsw i32 %50, 60
%52 = sdiv i32 %51, %36
%53 = icmp sgt i32 %52, 0
br i1 %53, label %54, label %61
54: ; preds = %47, %54
%55 = phi i32 [ %57, %54 ], [ 0, %47 ]
%56 = tail call i32 @putchar(i8 signext 111)
%57 = add nuw nsw i32 %55, 1
%58 = icmp eq i32 %57, %52
br i1 %58, label %59, label %54
59: ; preds = %54
%60 = load i32, i32* %44
br label %61
61: ; preds = %59, %47
%62 = phi i32 [ %60, %59 ], [ %50, %47 ]
%63 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i32 %62)
%64 = load i32, i32* %44
%65 = mul nsw i32 %64, %48
%66 = add nsw i32 %65, %42
%67 = add nsw i32 %64, %41
%68 = add nuw nsw i64 %40, 1
br label %100
69: ; preds = %39
%70 = icmp sgt i32 %41, 0
br i1 %70, label %71, label %97
71: ; preds = %69
%72 = sitofp i32 %42 to float
%73 = sitofp i32 %41 to float
%74 = fdiv float %72, %73
%75 = fpext float %74 to double
%76 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) %38)
%77 = fmul double %75, 1.000000e+06
%78 = fdiv double %77, 2.000000e+04
%79 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.6, i64 0, i64 0), double %75, double %78)
%80 = sitofp i32 %43 to double
%81 = fmul double %80, 1.000000e+06
%82 = fdiv double %81, 2.000000e+04
%83 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.7, i64 0, i64 0), i32 %43, double %82)
%84 = trunc i64 %40 to i32
%85 = add i32 %84, -1
%86 = sitofp i32 %85 to double
%87 = fmul double %86, 1.000000e+06
%88 = fdiv double %87, 2.000000e+04
%89 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.8, i64 0, i64 0), i32 %85, double %88)
%90 = fsub double %86, %75
%91 = fsub double %75, %80
%92 = fcmp ogt double %91, %90
%93 = select i1 %92, double %91, double %90
%94 = fmul double %93, 1.000000e+02
%95 = fdiv double %94, %75
%96 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0), double %95)
br label %97
97: ; preds = %71, %69
%98 = add nuw nsw i64 %40, 1
%99 = trunc i64 %98 to i32
br label %100
100: ; preds = %61, %97
%101 = phi i64 [ %68, %61 ], [ %98, %97 ]
%102 = phi i32 [ %43, %61 ], [ %99, %97 ]
%103 = phi i32 [ %66, %61 ], [ 0, %97 ]
%104 = phi i32 [ %67, %61 ], [ 0, %97 ]
%105 = icmp eq i64 %101, 200
br i1 %105, label %106, label %39
106: ; preds = %100
ret void
}