#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 pow(double, double);
void vq_fsw(float *w_fs, int num_harm, float pitch) {
  int j;
  float w0;
  w0 = 6.28318530717958647692 / pitch;
  for (j = 0; j < num_harm; j++) {
    w_fs[j] =
        117.0 /
        (25.0 +
         75.0 *
             pow(1.0 + 1.4 * ((w0 * (j + 1) / (0.25 * 3.14159265358979323846)) *
                              (w0 * (j + 1) / (0.25 * 3.14159265358979323846))),
                 0.69));
  }
}


x86 assembly (clang, -O0):
<vq_fsw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xecb(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    120a <vq_fsw+0xfa>
movss  -0x18(%rbp),%xmm0
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xec4(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  -0x18(%rbp),%xmm1
mov    -0x14(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm2
mulss  %xmm2,%xmm1
cvtss2sd %xmm1,%xmm1
movsd  0xea1(%rip),%xmm2
divsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe81(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe7d(%rip),%xmm1
addsd  %xmm1,%xmm0
movsd  0xe61(%rip),%xmm1
call   1030 <pow@plt>
movaps %xmm0,%xmm1
movsd  0xe41(%rip),%xmm0
mulsd  %xmm0,%xmm1
movsd  0xe3d(%rip),%xmm0
addsd  %xmm0,%xmm1
movsd  0xe21(%rip),%xmm0
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1149 <vq_fsw+0x39>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vq_fsw>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    11c0 <vq_fsw+0xb0>
mov    %rdi,%r14
cvtss2sd %xmm0,%xmm0
movsd  0xed1(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,0x4(%rsp)
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
lea    0x1(%rbx),%r12
xorps  %xmm0,%xmm0
cvtsi2ss %r12d,%xmm0
mulss  0x4(%rsp),%xmm0
cvtss2sd %xmm0,%xmm0
divsd  0xe9a(%rip),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xe96(%rip),%xmm0
addsd  0xe96(%rip),%xmm0
movsd  0xe96(%rip),%xmm1
call   1030 <pow@plt>
mulsd  0xe91(%rip),%xmm0
addsd  0xe91(%rip),%xmm0
movsd  0xe91(%rip),%xmm1
divsd  %xmm0,%xmm1
xorps  %xmm0,%xmm0
cvtsd2ss %xmm1,%xmm0
movss  %xmm0,(%r14,%rbx,4)
mov    %r12,%rbx
cmp    %r12,%r15
jne    1150 <vq_fsw+0x40>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @vq_fsw(float* %0, i32 %1, float %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca float
%7 = alloca i32
%8 = alloca float
store float* %0, float** %4
store i32 %1, i32* %5
store float %2, float* %6
%9 = load float, float* %6
%10 = fpext float %9 to double
%11 = fdiv double 0x401921FB54442D18, %10
%12 = fptrunc double %11 to float
store float %12, float* %8
store i32 0, i32* %7
br label %13
13: ; preds = %42, %3
%14 = load i32, i32* %7
%15 = load i32, i32* %5
%16 = icmp slt i32 %14, %15
br i1 %16, label %17, label %45
17: ; preds = %13
%18 = load float, float* %8
%19 = load i32, i32* %7
%20 = add nsw i32 %19, 1
%21 = sitofp i32 %20 to float
%22 = fmul float %18, %21
%23 = fpext float %22 to double
%24 = fdiv double %23, 0x3FE921FB54442D18
%25 = load float, float* %8
%26 = load i32, i32* %7
%27 = add nsw i32 %26, 1
%28 = sitofp i32 %27 to float
%29 = fmul float %25, %28
%30 = fpext float %29 to double
%31 = fdiv double %30, 0x3FE921FB54442D18
%32 = fmul double %24, %31
%33 = call double @llvm.fmuladd.f64(double 1.400000e+00, double %32, double 1.000000e+00)
%34 = call double @pow(double %33, double 6.900000e-01)
%35 = call double @llvm.fmuladd.f64(double 7.500000e+01, double %34, double 2.500000e+01)
%36 = fdiv double 1.170000e+02, %35
%37 = fptrunc double %36 to float
%38 = load float*, float** %4
%39 = load i32, i32* %7
%40 = sext i32 %39 to i64
%41 = getelementptr inbounds float, float* %38, i64 %40
store float %37, float* %41
br label %42
42: ; preds = %17
%43 = load i32, i32* %7
%44 = add nsw i32 %43, 1
store i32 %44, i32* %7
br label %13
45: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @vq_fsw(float* nocapture writeonly %0, i32 %1, float %2) {
%4 = fpext float %2 to double
%5 = fdiv double 0x401921FB54442D18, %4
%6 = fptrunc double %5 to float
%7 = icmp sgt i32 %1, 0
br i1 %7, label %8, label %26
8: ; preds = %3
%9 = zext i32 %1 to i64
br label %10
10: ; preds = %8, %10
%11 = phi i64 [ 0, %8 ], [ %12, %10 ]
%12 = add nuw nsw i64 %11, 1
%13 = trunc i64 %12 to i32
%14 = sitofp i32 %13 to float
%15 = fmul float %6, %14
%16 = fpext float %15 to double
%17 = fdiv double %16, 0x3FE921FB54442D18
%18 = fmul double %17, %17
%19 = tail call double @llvm.fmuladd.f64(double %18, double 1.400000e+00, double 1.000000e+00)
%20 = tail call double @pow(double %19, double 6.900000e-01)
%21 = tail call double @llvm.fmuladd.f64(double %20, double 7.500000e+01, double 2.500000e+01)
%22 = fdiv double 1.170000e+02, %21
%23 = fptrunc double %22 to float
%24 = getelementptr inbounds float, float* %0, i64 %11
store float %23, float* %24
%25 = icmp eq i64 %12, %9
br i1 %25, label %26, label %10
26: ; preds = %10, %3
ret void
}