// File: Sleepwalking[P]world-octave/dio.cpp
// Function: (anonymous namespace)::DesignLowCutFilter(int, int, double*)
void DesignLowCutFilter(int N, int fft_size, double *low_cut_filter) {
  for (int i = 1; i <= N; ++i)
    low_cut_filter[i - 1] = 0.5 - 0.5 * cos(i * 2.0 * world::kPi / (N + 1));
  for (int i = N; i < fft_size; ++i) low_cut_filter[i] = 0.0;
  double sum_of_amplitude = 0.0;
  for (int i = 0; i < N; ++i) sum_of_amplitude += low_cut_filter[i];
  for (int i = 0; i < N; ++i)
    low_cut_filter[i] = -low_cut_filter[i] / sum_of_amplitude;
  for (int i = 0; i < (N - 1) / 2; ++i)
    low_cut_filter[fft_size - (N - 1) / 2 + i] = low_cut_filter[i];
  for (int i = 0; i < N; ++i)
    low_cut_filter[i] = low_cut_filter[i + (N - 1) / 2];
  low_cut_filter[0] += 1.0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl $0x1, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl -0x4(%rbp), %eax
jg 0x3426
cvtsi2sdl -0x14(%rbp), %xmm0
movsd 0x18c3a(%rip), %xmm1    # 0x1c008
mulsd %xmm1, %xmm0
movsd 0x18cde(%rip), %xmm1    # 0x1c0b8
mulsd %xmm1, %xmm0
movl -0x4(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
callq 0x11a0
movsd 0x18cb7(%rip), %xmm1    # 0x1c0b0
mulsd %xmm1, %xmm0
movsd 0x18c23(%rip), %xmm1    # 0x1c028
addsd %xmm1, %xmm0
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x33b9
movl -0x4(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x344f
movq -0x10(%rbp), %rax
movslq -0x18(%rbp), %rcx
xorps %xmm0, %xmm0
movsd %xmm0, (%rax,%rcx,8)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x342c
xorps %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3488
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
addsd -0x20(%rbp), %xmm0
movsd %xmm0, -0x20(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0x345e
movl $0x0, -0x28(%rbp)
movl -0x28(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x34d8
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq %xmm0, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm0
divsd -0x20(%rbp), %xmm0
movq -0x10(%rbp), %rax
movslq -0x28(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x28(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x28(%rbp)
jmp 0x348f
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x34(%rbp), %eax
cmpl %ecx, %eax
jge 0x3540
movq -0x10(%rbp), %rax
movslq -0x2c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movq %rax, -0x40(%rbp)
movl -0x8(%rbp), %ecx
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq -0x40(%rbp), %rax
subl %edx, %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x34df
movl $0x0, -0x30(%rbp)
movl -0x30(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x3590
movq -0x10(%rbp), %rax
movq %rax, -0x48(%rbp)
movl -0x30(%rbp), %ecx
movl -0x4(%rbp), %eax
subl $0x1, %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq -0x48(%rbp), %rax
addl %edx, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq -0x10(%rbp), %rax
movslq -0x30(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x30(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x30(%rbp)
jmp 0x3547
movq -0x10(%rbp), %rax
movsd 0x18a74(%rip), %xmm0    # 0x1c010
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
addq $0x50, %rsp
popq %rbp
retq
nopw (%rax,%rax)