#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*/ exit(int);
double pow(double, double);
int /*<<< orphan*/ printf(char *, ...);
void main() {
  int i, j;
  double temp;
  double data[128];
  printf("double __MIDI_To_Pitch[128] = {");
  for (i = 0; i < 128; i++) {
    if (i % 8 == 0)
      printf("\n");
    temp = 220.0 * pow(2.0, ((double)i - 57) / 12.0);
    printf("%.2lf,", temp);
  }
  printf("};\n");
  exit(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
cmpl   $0x80,-0x4(%rbp)
jge    11de <main+0xae>
mov    -0x4(%rbp),%eax
mov    $0x8,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    117f <main+0x4f>
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cvtsi2sdl -0x4(%rbp),%xmm1
movsd  0xe8c(%rip),%xmm0
subsd  %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xe64(%rip),%xmm0
call   1040 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe4c(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe77(%rip),%rdi
mov    $0x1,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1150 <main+0x20>
lea    0xe62(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xffffffc7,%ebx
lea    0xec2(%rip),%r14
jmp    119e <main+0x4e>
xorps  %xmm0,%xmm0
cvtsi2sd %ebx,%xmm0
divsd  0xe81(%rip),%xmm0
call   1060 <exp2@plt>
mulsd  0xe7c(%rip),%xmm0
mov    %r14,%rdi
mov    $0x1,%al
call   1050 <printf@plt>
add    $0x1,%ebx
cmp    $0x47,%ebx
je     11b1 <main+0x61>
lea    0x39(%rbx),%eax
test   $0x7,%al
jne    1170 <main+0x20>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    1170 <main+0x20>
lea    0xe7f(%rip),%rdi
call   1040 <puts@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"double __MIDI_To_Pitch[128] = {\00"
@.str.1 = [2 x i8] c"\0A\00"
@.str.2 = [7 x i8] c"%.2lf,\00"
@.str.3 = [4 x i8] c"};\0A\00"
define void @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
%4 = alloca [128 x double]
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %1
br label %6
6: ; preds = %24, %0
%7 = load i32, i32* %1
%8 = icmp slt i32 %7, 128
br i1 %8, label %9, label %27
9: ; preds = %6
%10 = load i32, i32* %1
%11 = srem i32 %10, 8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %9
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %15
15: ; preds = %13, %9
%16 = load i32, i32* %1
%17 = sitofp i32 %16 to double
%18 = fsub double %17, 5.700000e+01
%19 = fdiv double %18, 1.200000e+01
%20 = call double @pow(double 2.000000e+00, double %19)
%21 = fmul double 2.200000e+02, %20
store double %21, double* %3
%22 = load double, double* %3
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %22)
br label %24
24: ; preds = %15
%25 = load i32, i32* %1
%26 = add nsw i32 %25, 1
store i32 %26, i32* %1
br label %6
27: ; preds = %6
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%29 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [32 x i8] c"double __MIDI_To_Pitch[128] = {\00"
@.str.2 = [7 x i8] c"%.2lf,\00"
@str = [3 x i8] c"};\00"
define void @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %8
%3 = phi i32 [ 0, %0 ], [ %15, %8 ]
%4 = and i32 %3, 7
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %2
%7 = tail call i32 @putchar(i32 10)
br label %8
8: ; preds = %6, %2
%9 = add nsw i32 %3, -57
%10 = sitofp i32 %9 to double
%11 = fdiv double %10, 1.200000e+01
%12 = tail call double @exp2(double %11)
%13 = fmul double %12, 2.200000e+02
%14 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), double %13)
%15 = add nuw nsw i32 %3, 1
%16 = icmp eq i32 %15, 128
br i1 %16, label %17, label %2
17: ; preds = %8
%18 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @str, i64 0, i64 0))
%19 = tail call i32 @exit(i32 1)
unreachable
}