// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cftleaf(int, int, double*, int, double*)
void cftleaf(int n, int isplt, double *a, int nw, double *w) {
  void cftmdl1(int n, double *a, double *w);
  void cftmdl2(int n, double *a, double *w);
  void cftf161(double *a, double *w);
  void cftf162(double *a, double *w);
  void cftf081(double *a, double *w);
  void cftf082(double *a, double *w);

  if (n == 512) {
    cftmdl1(128, a, &w[nw - 64]);
    cftf161(a, &w[nw - 8]);
    cftf162(&a[32], &w[nw - 32]);
    cftf161(&a[64], &w[nw - 8]);
    cftf161(&a[96], &w[nw - 8]);
    cftmdl2(128, &a[128], &w[nw - 128]);
    cftf161(&a[128], &w[nw - 8]);
    cftf162(&a[160], &w[nw - 32]);
    cftf161(&a[192], &w[nw - 8]);
    cftf162(&a[224], &w[nw - 32]);
    cftmdl1(128, &a[256], &w[nw - 64]);
    cftf161(&a[256], &w[nw - 8]);
    cftf162(&a[288], &w[nw - 32]);
    cftf161(&a[320], &w[nw - 8]);
    cftf161(&a[352], &w[nw - 8]);
    if (isplt != 0) {
      cftmdl1(128, &a[384], &w[nw - 64]);
      cftf161(&a[480], &w[nw - 8]);
    } else {
      cftmdl2(128, &a[384], &w[nw - 128]);
      cftf162(&a[480], &w[nw - 32]);
    }
    cftf161(&a[384], &w[nw - 8]);
    cftf162(&a[416], &w[nw - 32]);
    cftf161(&a[448], &w[nw - 8]);
  } else {
    cftmdl1(64, a, &w[nw - 32]);
    cftf081(a, &w[nw - 8]);
    cftf082(&a[16], &w[nw - 8]);
    cftf081(&a[32], &w[nw - 8]);
    cftf081(&a[48], &w[nw - 8]);
    cftmdl2(64, &a[64], &w[nw - 64]);
    cftf081(&a[64], &w[nw - 8]);
    cftf082(&a[80], &w[nw - 8]);
    cftf081(&a[96], &w[nw - 8]);
    cftf082(&a[112], &w[nw - 8]);
    cftmdl1(64, &a[128], &w[nw - 32]);
    cftf081(&a[128], &w[nw - 8]);
    cftf082(&a[144], &w[nw - 8]);
    cftf081(&a[160], &w[nw - 8]);
    cftf081(&a[176], &w[nw - 8]);
    if (isplt != 0) {
      cftmdl1(64, &a[192], &w[nw - 32]);
      cftf081(&a[240], &w[nw - 8]);
    } else {
      cftmdl2(64, &a[192], &w[nw - 64]);
      cftf082(&a[240], &w[nw - 8]);
    }
    cftf081(&a[192], &w[nw - 8]);
    cftf082(&a[208], &w[nw - 8]);
    cftf081(&a[224], &w[nw - 8]);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movl %esi, 0xc(%rsp)
movslq %ecx, %rax
leaq (%r8,%rax,8), %r15
leaq (%r8,%rax,8), %r14
addq $-0x40, %r14
cmpl $0x200, %edi            # imm = 0x200
jne 0x9b4b
leaq -0x200(%r15), %rbp
movl $0x80, %edi
movq %rbx, %rsi
movq %rbp, %rdx
callq 0xc77a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x100(%rbx), %rdi
leaq -0x100(%r15), %r12
movq %r12, %rsi
callq 0xd20d
leaq 0x200(%rbx), %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x300(%rbx), %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x400(%rbx), %r13
addq $-0x400, %r15           # imm = 0xFC00
movl $0x80, %edi
movq %r13, %rsi
movq %r15, %rdx
callq 0xcc2e
movq %r13, %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x500(%rbx), %rdi
movq %r12, %rsi
callq 0xd20d
leaq 0x600(%rbx), %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x700(%rbx), %rdi
movq %r12, %rsi
callq 0xd20d
leaq 0x800(%rbx), %r13
movl $0x80, %edi
movq %r13, %rsi
movq %rbp, 0x10(%rsp)
movq %rbp, %rdx
callq 0xc77a
movq %r13, %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x900(%rbx), %rdi
movq %r12, %rsi
callq 0xd20d
leaq 0xa00(%rbx), %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0xb00(%rbx), %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0xc00(%rbx), %rbp
leaq 0xf00(%rbx), %r13
cmpl $0x0, 0xc(%rsp)
je 0x9c71
movl $0x80, %edi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
callq 0xc77a
movq %r13, %rdi
movq %r14, %rsi
callq 0xa7cd
jmp 0x9c8c
leaq -0x100(%r15), %r12
movl $0x40, %edi
movq %rbx, %rsi
movq %r12, %rdx
callq 0xc77a
movq %rbx, %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x80(%rbx), %rdi
movq %r14, %rsi
callq 0xda47
leaq 0x100(%rbx), %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x180(%rbx), %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x200(%rbx), %r13
addq $-0x200, %r15           # imm = 0xFE00
movl $0x40, %edi
movq %r13, %rsi
movq %r15, %rdx
callq 0xcc2e
movq %r13, %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x280(%rbx), %rdi
movq %r14, %rsi
callq 0xda47
leaq 0x300(%rbx), %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x380(%rbx), %rdi
movq %r14, %rsi
callq 0xda47
leaq 0x400(%rbx), %r13
movl $0x40, %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0xc77a
movq %r13, %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x480(%rbx), %rdi
movq %r14, %rsi
callq 0xda47
leaq 0x500(%rbx), %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x580(%rbx), %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x600(%rbx), %r13
leaq 0x780(%rbx), %rbp
cmpl $0x0, 0xc(%rsp)
je 0x9cc6
movl $0x40, %edi
movq %r13, %rsi
movq %r12, %rdx
callq 0xc77a
movq %rbp, %rdi
movq %r14, %rsi
callq 0xad7a
jmp 0x9ce1
movl $0x80, %edi
movq %rbp, %rsi
movq %r15, %rdx
callq 0xcc2e
movq %r13, %rdi
movq %r12, %rsi
callq 0xd20d
movq %rbp, %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0xd00(%rbx), %rdi
movq %r12, %rsi
callq 0xd20d
addq $0xe00, %rbx            # imm = 0xE00
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa7cd
movl $0x40, %edi
movq %r13, %rsi
movq %r15, %rdx
callq 0xcc2e
movq %rbp, %rdi
movq %r14, %rsi
callq 0xda47
movq %r13, %rdi
movq %r14, %rsi
callq 0xad7a
leaq 0x680(%rbx), %rdi
movq %r14, %rsi
callq 0xda47
addq $0x700, %rbx            # imm = 0x700
movq %rbx, %rdi
movq %r14, %rsi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xad7a