// File: /workspace/github_c_makefile_star2_O0/pavel-demin[P]ft8d-c/pffft.c
// Function: pffft_new_setup
PFFFT_Setup *pffft_new_setup(int N, pffft_transform_t transform) {
  PFFFT_Setup *s = (PFFFT_Setup*)malloc(sizeof(PFFFT_Setup));
  int k, m;
  /* unfortunately, the fft size must be a multiple of 16 for complex FFTs
     and 32 for real FFTs -- a lot of stuff would need to be rewritten to
     handle other cases (or maybe just switch to a scalar fft, I don't know..) */
  if (transform == PFFFT_REAL) { assert((N%(2*SIMD_SZ*SIMD_SZ))==0 && N>0); }
  if (transform == PFFFT_COMPLEX) { assert((N%(SIMD_SZ*SIMD_SZ))==0 && N>0); }
  //assert((N % 32) == 0);
  s->N = N;
  s->transform = transform;
  /* nb of complex simd vectors */
  s->Ncvec = (transform == PFFFT_REAL ? N/2 : N)/SIMD_SZ;
  s->data = (v4sf*)pffft_aligned_malloc(2*s->Ncvec * sizeof(v4sf));
  s->e = (float*)s->data;
  s->twiddle = (float*)(s->data + (2*s->Ncvec*(SIMD_SZ-1))/SIMD_SZ);

  if (transform == PFFFT_REAL) {
    for (k=0; k < s->Ncvec; ++k) {
      int i = k/SIMD_SZ;
      int j = k%SIMD_SZ;
      for (m=0; m < SIMD_SZ-1; ++m) {
        float A = -2*M_PI*(m+1)*k / N;
        s->e[(2*(i*3 + m) + 0) * SIMD_SZ + j] = cos(A);
        s->e[(2*(i*3 + m) + 1) * SIMD_SZ + j] = sin(A);
      }
    }
    rffti1_ps(N/SIMD_SZ, s->twiddle, s->ifac);
  } else {
    for (k=0; k < s->Ncvec; ++k) {
      int i = k/SIMD_SZ;
      int j = k%SIMD_SZ;
      for (m=0; m < SIMD_SZ-1; ++m) {
        float A = -2*M_PI*(m+1)*k / N;
        s->e[(2*(i*3 + m) + 0)*SIMD_SZ + j] = cos(A);
        s->e[(2*(i*3 + m) + 1)*SIMD_SZ + j] = sin(A);
      }
    }
    cffti1_ps(N/SIMD_SZ, s->twiddle, s->ifac);
  }

  /* check that N is decomposable with allowed prime factors */
  for (k=0, m=1; k < s->ifac[1]; ++k) { m *= s->ifac[2+k]; }
  if (m != N/SIMD_SZ) {
    pffft_destroy_setup(s); s = 0;
  }

  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl $0x60, %edi
callq 0x1100
movq %rax, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
jne 0x61ab
movl -0x4(%rbp), %eax
movl $0x20, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x618a
cmpl $0x0, -0x4(%rbp)
jle 0x618a
jmp 0x61a9
leaq 0x125af(%rip), %rdi     # 0x18740
leaq 0x12046(%rip), %rsi     # 0x181de
movl $0x4c0, %edx            # imm = 0x4C0
leaq 0x125be(%rip), %rcx     # 0x18762
callq 0x1090
jmp 0x61ab
cmpl $0x1, -0x8(%rbp)
jne 0x61ea
movl -0x4(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
cmpl $0x0, %edx
jne 0x61c9
cmpl $0x0, -0x4(%rbp)
jle 0x61c9
jmp 0x61e8
leaq 0x125c7(%rip), %rdi     # 0x18797
leaq 0x12007(%rip), %rsi     # 0x181de
movl $0x4c1, %edx            # imm = 0x4C1
leaq 0x1257f(%rip), %rcx     # 0x18762
callq 0x1090
jmp 0x61ea
movl -0x4(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, (%rax)
movl -0x8(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x44(%rax)
cmpl $0x0, -0x8(%rbp)
jne 0x6213
movl -0x4(%rbp), %eax
movl $0x2, %ecx
cltd
idivl %ecx
movl %eax, -0x34(%rbp)
jmp 0x6219
movl -0x4(%rbp), %eax
movl %eax, -0x34(%rbp)
movl -0x34(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x4(%rax)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
shll %eax
movslq %eax, %rdi
shlq $0x4, %rdi
callq 0x2090
movq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x50(%rax)
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rcx
movq -0x10(%rbp), %rax
movl 0x4(%rax), %eax
shll %eax
imull $0x3, %eax, %eax
movl $0x4, %esi
cltd
idivl %esi
cltq
shlq $0x4, %rax
addq %rax, %rcx
movq -0x10(%rbp), %rax
movq %rcx, 0x58(%rax)
cmpl $0x0, -0x8(%rbp)
jne 0x63b6
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x638f
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x1c(%rbp)
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0x20(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jge 0x637f
movl -0x18(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x11d9e(%rip), %xmm0    # 0x18088
mulsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x24(%rbp)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x10b0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl -0x18(%rbp), %ecx
shll %ecx
addl $0x0, %ecx
shll $0x2, %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x24(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1130
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imull $0x3, -0x1c(%rbp), %ecx
addl -0x18(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
shll $0x2, %ecx
addl -0x20(%rbp), %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x62ce
jmp 0x6381
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x629b
movl -0x4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %edi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
callq 0x6550
jmp 0x64d3
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x4(%rcx), %eax
jge 0x64b1
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, -0x28(%rbp)
movl -0x14(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %edx, -0x2c(%rbp)
movl $0x0, -0x18(%rbp)
cmpl $0x3, -0x18(%rbp)
jge 0x64a1
movl -0x18(%rbp), %eax
addl $0x1, %eax
cvtsi2sd %eax, %xmm1
movsd 0x11c7c(%rip), %xmm0    # 0x18088
mulsd %xmm1, %xmm0
cvtsi2sdl -0x14(%rbp), %xmm1
mulsd %xmm1, %xmm0
cvtsi2sdl -0x4(%rbp), %xmm1
divsd %xmm1, %xmm0
cvtsd2ss %xmm0, %xmm0
movss %xmm0, -0x30(%rbp)
movss -0x30(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x10b0
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imull $0x3, -0x28(%rbp), %ecx
addl -0x18(%rbp), %ecx
shll %ecx
addl $0x0, %ecx
shll $0x2, %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movss -0x30(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
callq 0x1130
cvtsd2ss %xmm0, %xmm0
movq -0x10(%rbp), %rax
movq 0x50(%rax), %rax
imull $0x3, -0x28(%rbp), %ecx
addl -0x18(%rbp), %ecx
shll %ecx
addl $0x1, %ecx
shll $0x2, %ecx
addl -0x2c(%rbp), %ecx
movslq %ecx, %rcx
movss %xmm0, (%rax,%rcx,4)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x63f0
jmp 0x64a3
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x63bd
movl -0x4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %edi
movq -0x10(%rbp), %rax
movq 0x58(%rax), %rsi
movq -0x10(%rbp), %rdx
addq $0x8, %rdx
callq 0x2130
movl $0x0, -0x14(%rbp)
movl $0x1, -0x18(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x6510
movq -0x10(%rbp), %rax
movl -0x14(%rbp), %ecx
addl $0x2, %ecx
movslq %ecx, %rcx
movl 0x8(%rax,%rcx,4), %eax
imull -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x64e1
movl -0x18(%rbp), %eax
movl %eax, -0x38(%rbp)
movl -0x4(%rbp), %eax
movl $0x4, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x38(%rbp), %eax
cmpl %ecx, %eax
je 0x653b
movq -0x10(%rbp), %rdi
callq 0x66e0
movq $0x0, -0x10(%rbp)
movq -0x10(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)