// File: Sleepwalking[P]world-octave/fft.cpp
// Function: (anonymous namespace)::BackwardFFT(fft_plan)
void BackwardFFT(fft_plan p) {
  if (p.c_out == NULL) {  // c2r
    p.input[0] = p.c_in[0][0];
    p.input[1] = p.c_in[p.n / 2][0];
    for (int i = 1; i < p.n / 2; ++i) {
      p.input[i * 2]  = p.c_in[i][0];
      p.input[i * 2 + 1]  = p.c_in[i][1];
    }
    rdft(p.n, -1, p.input, p.ip, p.w);
    for (int i = 0; i < p.n; ++i) p.out[i] = p.input[i] * 2.0;
  } else {  // c2c
    for (int i = 0; i < p.n; ++i) {
      p.input[i * 2] = p.c_in[i][0];
      p.input[i * 2 + 1] = p.c_in[i][1];
    }
    cdft(p.n * 2, -1, p.input, p.ip, p.w);
    for (int i = 0; i < p.n; ++i) {
      p.c_out[i][0] = p.input[i * 2];
      p.c_out[i][1] = p.input[i * 2 + 1];
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, 0x20(%rax)
jne 0xd96d
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movsd (%rcx), %xmm0
movq 0x30(%rax), %rcx
movsd %xmm0, (%rcx)
movq 0x10(%rax), %rcx
movl (%rax), %eax
movl $0x2, %esi
cltd
idivl %esi
movl %eax, %edx
movq -0x18(%rbp), %rax
movslq %edx, %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd (%rcx), %xmm0
movq 0x30(%rax), %rax
movsd %xmm0, 0x8(%rax)
movl $0x1, -0x4(%rbp)
movq -0x18(%rbp), %rax
movl -0x4(%rbp), %ecx
movl %ecx, -0x1c(%rbp)
movl (%rax), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x1c(%rbp), %eax
cmpl %ecx, %eax
jge 0xd909
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movslq -0x4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd (%rcx), %xmm0
movq 0x30(%rax), %rcx
movl -0x4(%rbp), %edx
shll %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x10(%rax), %rcx
movslq -0x4(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd 0x8(%rcx), %xmm0
movq 0x30(%rax), %rax
movl -0x4(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0xd891
movq -0x18(%rbp), %rax
movl (%rax), %edi
movq 0x30(%rax), %rdx
movq 0x38(%rax), %rcx
movq 0x40(%rax), %r8
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xddd0
movl $0x0, -0x8(%rbp)
movq -0x18(%rbp), %rcx
movl -0x8(%rbp), %eax
cmpl (%rcx), %eax
jge 0xd968
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movslq -0x8(%rbp), %rdx
movsd 0xe6bd(%rip), %xmm0     # 0x1c008
mulsd (%rcx,%rdx,8), %xmm0
movq 0x28(%rax), %rax
movslq -0x8(%rbp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0xd92c
jmp 0xda67
movl $0x0, -0xc(%rbp)
movq -0x18(%rbp), %rcx
movl -0xc(%rbp), %eax
cmpl (%rcx), %eax
jge 0xd9da
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd (%rcx), %xmm0
movq 0x30(%rax), %rcx
movl -0xc(%rbp), %edx
shll %edx
movslq %edx, %rdx
movsd %xmm0, (%rcx,%rdx,8)
movq 0x10(%rax), %rcx
movslq -0xc(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd 0x8(%rcx), %xmm0
movq 0x30(%rax), %rax
movl -0xc(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
movslq %ecx, %rcx
movsd %xmm0, (%rax,%rcx,8)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xd974
movq -0x18(%rbp), %rax
movl (%rax), %edi
shll %edi
movq 0x30(%rax), %rdx
movq 0x38(%rax), %rcx
movq 0x40(%rax), %r8
movl $0xffffffff, %esi       # imm = 0xFFFFFFFF
callq 0xdb10
movl $0x0, -0x10(%rbp)
movq -0x18(%rbp), %rcx
movl -0x10(%rbp), %eax
cmpl (%rcx), %eax
jge 0xda65
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rcx
movl -0x10(%rbp), %edx
shll %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x20(%rax), %rcx
movslq -0x10(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rcx
movsd %xmm0, (%rcx)
movq 0x30(%rax), %rcx
movl -0x10(%rbp), %edx
shll %edx
addl $0x1, %edx
movslq %edx, %rdx
movsd (%rcx,%rdx,8), %xmm0
movq 0x20(%rax), %rax
movslq -0x10(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movsd %xmm0, 0x8(%rax)
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0xd9ff
jmp 0xda67
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)