// File: Sleepwalking[P]world-octave/synthesis.cpp
// Function: (anonymous namespace)::GetTemporalParametersForTimeBase(double*, int, int, int, double, double*, double*, double*, double*)
void GetTemporalParametersForTimeBase(double *f0, int f0_length, int fs,
    int y_length, double frame_period, double *time_axis,
    double *coarse_time_axis, double *coarse_f0, double *coarse_vuv) {
  for (int i = 0; i < y_length; ++i)
    time_axis[i] = i / static_cast<double>(fs);
  for (int i = 0; i < f0_length + 1; ++i)
    coarse_time_axis[i] = i * frame_period;
  for (int i = 0; i < f0_length + 1; ++i)
    coarse_f0[i] = f0[i];
  coarse_f0[f0_length] = coarse_f0[f0_length - 1] * 2 -
    coarse_f0[f0_length - 2];
  for (int i = 0; i < f0_length + 1; ++i)
    coarse_vuv[i] = f0[i] == 0.0 ? 0.0 : 1.0;
  coarse_vuv[f0_length] = coarse_vuv[f0_length - 1] * 2 -
    coarse_vuv[f0_length - 2];
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x18(%rbp), %rax
movq 0x10(%rbp), %rax
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movsd %xmm0, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq %r9, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
cmpl -0x14(%rbp), %eax
jge 0x598b
cvtsi2sdl -0x34(%rbp), %xmm0
cvtsi2sdl -0x10(%rbp), %xmm1
divsd %xmm1, %xmm0
movq -0x28(%rbp), %rax
movslq -0x34(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x595d
movl $0x0, -0x38(%rbp)
movl -0x38(%rbp), %eax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x59c1
cvtsi2sdl -0x38(%rbp), %xmm0
mulsd -0x20(%rbp), %xmm0
movq -0x30(%rbp), %rax
movslq -0x38(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x38(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x38(%rbp)
jmp 0x5992
movl $0x0, -0x3c(%rbp)
movl -0x3c(%rbp), %eax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x59fa
movq -0x8(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x10(%rbp), %rax
movslq -0x3c(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x3c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x3c(%rbp)
jmp 0x59c8
movq 0x10(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x10(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq 0x10(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl $0x0, -0x40(%rbp)
movl -0x40(%rbp), %eax
movl -0xc(%rbp), %ecx
addl $0x1, %ecx
cmpl %ecx, %eax
jge 0x5aa2
movq -0x8(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd (%rax,%rcx,8), %xmm0
xorps %xmm3, %xmm3
movsd 0x1659a(%rip), %xmm2    # 0x1c010
cmpeqsd %xmm3, %xmm0
movaps %xmm0, %xmm1
andpd %xmm3, %xmm1
andnpd %xmm2, %xmm0
orpd %xmm1, %xmm0
movq 0x18(%rbp), %rax
movslq -0x40(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x40(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x40(%rbp)
jmp 0x5a51
movq 0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x1, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x18(%rbp), %rax
movl -0xc(%rbp), %ecx
subl $0x2, %ecx
movslq %ecx, %rcx
movsd (%rax,%rcx,8), %xmm1
movq %xmm1, %rax
movabsq $-0x8000000000000000, %rcx # imm = 0x8000000000000000
xorq %rcx, %rax
movq %rax, %xmm1
addsd %xmm0, %xmm0
addsd %xmm1, %xmm0
movq 0x18(%rbp), %rax
movslq -0xc(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
popq %rbp
retq
nopw %cs:(%rax,%rax)