// File: 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
movq %rsp, %rbp
subq $0x20, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movq %rdx, -0x10(%rbp)
movl %ecx, -0x14(%rbp)
movq %r8, -0x20(%rbp)
cmpl $0x200, -0x4(%rbp)      # imm = 0x200
jne 0x10274
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x40, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x80, %edi
callq 0x17a20
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x196f0
movq -0x10(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0x300, %rdi            # imm = 0x300
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rsi
addq $0x400, %rsi            # imm = 0x400
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x80, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x80, %edi
callq 0x186e0
movq -0x10(%rbp), %rdi
addq $0x400, %rdi            # imm = 0x400
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0x500, %rdi            # imm = 0x500
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x196f0
movq -0x10(%rbp), %rdi
addq $0x600, %rdi            # imm = 0x600
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0x700, %rdi            # imm = 0x700
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x196f0
movq -0x10(%rbp), %rsi
addq $0x800, %rsi            # imm = 0x800
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x40, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x80, %edi
callq 0x17a20
movq -0x10(%rbp), %rdi
addq $0x800, %rdi            # imm = 0x800
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0x900, %rdi            # imm = 0x900
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x196f0
movq -0x10(%rbp), %rdi
addq $0xa00, %rdi            # imm = 0xA00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0xb00, %rdi            # imm = 0xB00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
cmpl $0x0, -0x8(%rbp)
je 0x101b9
movq -0x10(%rbp), %rsi
addq $0xc00, %rsi            # imm = 0xC00
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x40, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x80, %edi
callq 0x17a20
movq -0x10(%rbp), %rdi
addq $0xf00, %rdi            # imm = 0xF00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
jmp 0x10206
movq -0x10(%rbp), %rsi
addq $0xc00, %rsi            # imm = 0xC00
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x80, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x80, %edi
callq 0x186e0
movq -0x10(%rbp), %rdi
addq $0xf00, %rdi            # imm = 0xF00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x196f0
movq -0x10(%rbp), %rdi
addq $0xc00, %rdi            # imm = 0xC00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
movq -0x10(%rbp), %rdi
addq $0xd00, %rdi            # imm = 0xD00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x196f0
movq -0x10(%rbp), %rdi
addq $0xe00, %rdi            # imm = 0xE00
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x11f40
jmp 0x10589
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x40, %edi
callq 0x17a20
movq -0x10(%rbp), %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x80, %rdi
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1a780
movq -0x10(%rbp), %rdi
addq $0x100, %rdi            # imm = 0x100
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x180, %rdi            # imm = 0x180
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rsi
addq $0x200, %rsi            # imm = 0x200
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x40, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x40, %edi
callq 0x186e0
movq -0x10(%rbp), %rdi
addq $0x200, %rdi            # imm = 0x200
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x280, %rdi            # imm = 0x280
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1a780
movq -0x10(%rbp), %rdi
addq $0x300, %rdi            # imm = 0x300
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x380, %rdi            # imm = 0x380
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1a780
movq -0x10(%rbp), %rsi
addq $0x400, %rsi            # imm = 0x400
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x40, %edi
callq 0x17a20
movq -0x10(%rbp), %rdi
addq $0x400, %rdi            # imm = 0x400
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x480, %rdi            # imm = 0x480
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1a780
movq -0x10(%rbp), %rdi
addq $0x500, %rdi            # imm = 0x500
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x580, %rdi            # imm = 0x580
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
cmpl $0x0, -0x8(%rbp)
je 0x104d5
movq -0x10(%rbp), %rsi
addq $0x600, %rsi            # imm = 0x600
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x20, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x40, %edi
callq 0x17a20
movq -0x10(%rbp), %rdi
addq $0x780, %rdi            # imm = 0x780
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
jmp 0x10520
movq -0x10(%rbp), %rsi
addq $0x600, %rsi            # imm = 0x600
movq -0x20(%rbp), %rdx
movl -0x14(%rbp), %eax
subl $0x40, %eax
cltq
shlq $0x3, %rax
addq %rax, %rdx
movl $0x40, %edi
callq 0x186e0
movq -0x10(%rbp), %rdi
addq $0x780, %rdi            # imm = 0x780
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1a780
movq -0x10(%rbp), %rdi
addq $0x600, %rdi            # imm = 0x600
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
movq -0x10(%rbp), %rdi
addq $0x680, %rdi            # imm = 0x680
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x1a780
movq -0x10(%rbp), %rdi
addq $0x700, %rdi            # imm = 0x700
movq -0x20(%rbp), %rsi
movl -0x14(%rbp), %eax
subl $0x8, %eax
cltq
shlq $0x3, %rax
addq %rax, %rsi
callq 0x12f70
addq $0x20, %rsp
popq %rbp
retq
nop