LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/matlabfunctions.cpp
// Function: histc(double*, int, double*, int, int*)
void histc(double *x, int x_length, double *edges, int edges_length,
    int *index) {
  int count = 1;

  int i = 0;
  for (; i < edges_length; ++i) {
    index[i] = 1;
    if (edges[i] >= x[0]) break;
  }
  for (; i < edges_length; ++i) {
    if (edges[i] < x[count]) {
      index[i] = count;
    } else {
      index[i--] = count++;
    }
    if (count == x_length) break;
  }
  count--;
  for (i++; i < edges_length; ++i) index[i] = count;
}

// Assembly:
xorl %eax, %eax
movl $0x0, %r9d
testl %ecx, %ecx
jle 0x45f4
movl %ecx, %r10d
movsd (%rdi), %xmm0
xorl %r9d, %r9d
movl $0x1, (%r8,%r9,4)
movsd (%rdx,%r9,8), %xmm1
ucomisd %xmm0, %xmm1
jae 0x45f4
incq %r9
cmpq %r9, %r10
jne 0x45d1
xorl %eax, %eax
movl %r10d, %r9d
jmp 0x4633
cmpl %ecx, %r9d
jge 0x4633
movl $0x1, %eax
movslq %r9d, %r9
movl %eax, %r10d
movsd (%rdi,%r10,8), %xmm0
xorl %r10d, %r10d
ucomisd (%rdx,%r9,8), %xmm0
setbe %r10b
movl %eax, (%r8,%r9,4)
addl %r10d, %eax
subl %r10d, %r9d
cmpl %esi, %eax
je 0x462f
incl %r9d
cmpl %ecx, %r9d
jl 0x45fe
jmp 0x4631
movl %esi, %eax
decl %eax
leal 0x1(%r9), %edx
cmpl %ecx, %edx
jge 0x4732
movslq %r9d, %rsi
subl %r9d, %ecx
addl $-0x2, %ecx
leaq 0x4(%rcx), %rdx
andq $-0x4, %rdx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leaq (%r8,%rsi,4), %rcx
addq $0x10, %rcx
xorl %esi, %esi
movdqa 0xaaf4(%rip), %xmm1     # 0xf160
movdqa 0xa9ec(%rip), %xmm2     # 0xf060
movdqa 0xa9f4(%rip), %xmm3     # 0xf070
pxor %xmm3, %xmm0
pcmpeqd %xmm4, %xmm4
movq %rsi, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
movdqa %xmm5, %xmm6
por %xmm2, %xmm6
pxor %xmm3, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %edi
notl %edi
testb $0x1, %dil
je 0x46cb
movl %eax, -0xc(%rcx,%rsi,4)
pxor %xmm4, %xmm6
pextrw $0x4, %xmm6, %edi
testb $0x1, %dil
je 0x46de
movl %eax, -0x8(%rcx,%rsi,4)
por %xmm1, %xmm5
pxor %xmm3, %xmm5
movdqa %xmm5, %xmm6
pcmpgtd %xmm0, %xmm6
pcmpeqd %xmm0, %xmm5
pshufd $0xf5, %xmm5, %xmm7     # xmm7 = xmm5[1,1,3,3]
pand %xmm6, %xmm7
pshufd $0xf5, %xmm6, %xmm5     # xmm5 = xmm6[1,1,3,3]
por %xmm7, %xmm5
pxor %xmm4, %xmm5
pextrw $0x0, %xmm5, %edi
testb $0x1, %dil
je 0x4717
movl %eax, -0x4(%rcx,%rsi,4)
pextrw $0x4, %xmm5, %edi
testb $0x1, %dil
je 0x4725
movl %eax, (%rcx,%rsi,4)
addq $0x4, %rsi
cmpq %rsi, %rdx
jne 0x4684
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/matlabfunctions.cpp
// Function: interp1(double*, double*, int, double*, int, double*)
void interp1(double *x, double *y, int x_length, double *xi, int xi_length,
    double *yi) {
  double *h = new double[x_length - 1];
  double *p = new double[xi_length];
  double *s = new double[xi_length];
  int *k = new int[xi_length];

  for (int i = 0; i < x_length - 1; ++i) h[i] = x[i + 1] - x[i];
  for (int i = 0; i < xi_length; ++i) {
    p[i] = i;
    k[i] = 0;
  }

  histc(x, x_length, xi, xi_length, k);

  for (int i = 0; i < xi_length; ++i)
    s[i] = (xi[i] - x[k[i] - 1]) / h[k[i] - 1];

  for (int i = 0; i < xi_length; ++i)
    yi[i] = y[k[i] - 1] + s[i] * (y[k[i]] - y[k[i] - 1]);

  delete[] k;
  delete[] s;
  delete[] p;
  delete[] h;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %r9, 0x20(%rsp)
movl %r8d, %ebp
movq %rcx, 0x8(%rsp)
movl %edx, %r15d
movq %rsi, 0x18(%rsp)
movq %rdi, %r14
leal -0x1(%r15), %r13d
leaq (,%r13,8), %rdi
testl %edx, %edx
movq $-0x1, %r12
cmovleq %r12, %rdi
callq 0x1030
movq %rax, %rbx
movl %ebp, 0x4(%rsp)
movslq %ebp, %rax
leaq (,%rax,8), %rdi
testl %eax, %eax
cmovsq %r12, %rdi
leaq (,%rax,4), %rbp
cmovsq %r12, %rbp
callq 0x1030
movq %rax, %r12
movq %rbp, %rdi
callq 0x1030
movq %rax, %rbp
movq %r15, 0x10(%rsp)
cmpl $0x2, %r15d
jl 0x47e4
movsd (%r14), %xmm0
xorl %eax, %eax
movsd 0x8(%r14,%rax,8), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, (%rbx,%rax,8)
leaq 0x1(%rax), %rcx
movapd %xmm1, %xmm0
movq %rcx, %rax
cmpq %rcx, %r13
jne 0x47c0
movl 0x4(%rsp), %ecx
testl %ecx, %ecx
jle 0x488c
movl %ecx, %r13d
leaq (,%r13,4), %rdx
xorl %r15d, %r15d
movq %rbp, %rdi
xorl %esi, %esi
callq 0x1080
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movl 0x4(%rsp), %ecx
movq %rbp, %r8
callq 0x45bb
movq 0x8(%rsp), %rcx
movsd (%rcx,%r15,8), %xmm0
movslq (%rbp,%r15,4), %rax
subsd -0x8(%r14,%rax,8), %xmm0
divsd -0x8(%rbx,%rax,8), %xmm0
movsd %xmm0, (%r12,%r15,8)
incq %r15
cmpq %r15, %r13
jne 0x4826
cmpl $0x0, 0x4(%rsp)
movq 0x20(%rsp), %rdx
movq 0x18(%rsp), %rsi
jle 0x48a1
xorl %eax, %eax
movslq (%rbp,%rax,4), %rcx
movsd -0x8(%rsi,%rcx,8), %xmm0
movsd (%rsi,%rcx,8), %xmm1
subsd %xmm0, %xmm1
mulsd (%r12,%rax,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%rdx,%rax,8)
incq %rax
cmpq %rax, %r13
jne 0x485f
jmp 0x48a1
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %rbp, %r8
callq 0x45bb
movq %rbp, %rdi
callq 0x1110
movq %r12, %rdi
callq 0x1110
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1110
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/matlabfunctions.cpp
// Function: interp1Q(double, double, double*, int, double*, int, double*)
void interp1Q(double x, double shift, double *y, int x_length, double *xi,
    int xi_length, double *yi) {
  double *xi_fraction = new double[xi_length];
  double *delta_y = new double[x_length];
  int *xi_base = new int[xi_length];

  double delta_x = shift;
  for (int i = 0; i < xi_length; ++i) {
    xi_base[i] = static_cast<int>((xi[i] - x) / delta_x);
    xi_fraction[i] = (xi[i] - x) / delta_x - xi_base[i];
  }
  diff(y, x_length, delta_y);
  delta_y[x_length - 1] = 0.0;

  for (int i = 0; i < xi_length; ++i)
    yi[i] = y[xi_base[i]] + delta_y[xi_base[i]] * xi_fraction[i];

  // Bug was fixed at 2013/07/14 by M. Morise
  delete[] xi_fraction;
  delete[] xi_base;
  delete[] delta_y;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %r8, 0x30(%rsp)
movl %ecx, 0xc(%rsp)
movq %rdx, %rbx
movl %esi, %r13d
movq %rdi, %r14
movsd %xmm1, 0x20(%rsp)
movsd %xmm0, 0x18(%rsp)
movslq %ecx, %rax
movq %rax, 0x10(%rsp)
leaq (,%rax,8), %rdi
leaq (,%rax,4), %rbp
testl %eax, %eax
movq $-0x1, %rax
cmovsq %rax, %rdi
movslq %esi, %r12
cmovsq %rax, %rbp
callq 0x1030
movq %rax, %r15
leaq (,%r12,8), %rdi
movq %r12, 0x28(%rsp)
testl %r12d, %r12d
movq $-0x1, %rax
cmovsq %rax, %rdi
callq 0x1030
movq %rax, %r12
movq %rbp, %rdi
callq 0x1030
movsd 0x18(%rsp), %xmm3
movsd 0x20(%rsp), %xmm2
movl 0xc(%rsp), %esi
movq %rax, %rbp
movl %esi, %eax
cmpl $0x0, 0x10(%rsp)
jle 0x4ca8
xorl %ecx, %ecx
movsd (%rbx,%rcx,8), %xmm0
subsd %xmm3, %xmm0
divsd %xmm2, %xmm0
cvttsd2si %xmm0, %edx
movl %edx, (%rbp,%rcx,4)
cvttpd2dq %xmm0, %xmm1
cvtdq2pd %xmm1, %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, (%r15,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x4c79
cmpl $0x2, %r13d
jl 0x4cdd
decl %r13d
movsd (%r14), %xmm0
xorl %ecx, %ecx
movsd 0x8(%r14,%rcx,8), %xmm1
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, (%r12,%rcx,8)
leaq 0x1(%rcx), %rdx
movapd %xmm1, %xmm0
movq %rdx, %rcx
cmpq %rdx, %r13
jne 0x4cb8
movq 0x28(%rsp), %rcx
movq $0x0, -0x8(%r12,%rcx,8)
testl %esi, %esi
movq 0x30(%rsp), %rsi
jle 0x4d1a
xorl %ecx, %ecx
movslq (%rbp,%rcx,4), %rdx
movsd (%r12,%rdx,8), %xmm0
mulsd (%r15,%rcx,8), %xmm0
addsd (%r14,%rdx,8), %xmm0
movsd %xmm0, (%rsi,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x4cf6
movq %r15, %rdi
callq 0x1110
movq %rbp, %rdi
callq 0x1110
movq %r12, %rdi
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1110
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/matlabfunctions.cpp
// Function: randn()
double randn(void) {
  static unsigned int x = 123456789;
  static unsigned int y = 362436069;
  static unsigned int z = 521288629;
  static unsigned int w = 88675123;
  unsigned int t;
  t = x ^ (x << 11);
  x = y;
  y = z;
  z = w;

  unsigned int tmp = 0;
  for (int i = 0; i < 12; ++i) {
    t = x ^ (x << 11);
    x = y;
    y = z;
    z = w;
    w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
    tmp += w >> 4;
  }
  return tmp / 268435456.0 - 6.0;
}

// Assembly:
movl 0xd3b1(%rip), %r9d      # 0x120f8
movl 0xd3af(%rip), %ecx      # 0x120fc
xorl %eax, %eax
movl $0xc, %edx
movl 0xd3a5(%rip), %r10d     # 0x12100
movl %r10d, %esi
movl %esi, %edi
movl %r10d, %r8d
movl %r9d, %esi
shll $0xb, %esi
xorl %r9d, %esi
movl %edi, %r9d
shrl $0x13, %r9d
xorl %esi, %r9d
shrl $0x8, %esi
xorl %r9d, %esi
xorl %edi, %esi
movl %esi, %r9d
shrl $0x4, %r9d
addl %r9d, %eax
movl %ecx, %r9d
movl %r10d, %ecx
movl %edi, %r10d
decl %edx
jne 0x4d5e
movl %r8d, 0xd35c(%rip)      # 0x120f8
movl %edi, 0xd35a(%rip)      # 0x120fc
movl %eax, %eax
cvtsi2sd %rax, %xmm0
mulsd 0xa3cf(%rip), %xmm0     # 0xf180
movl %esi, 0xd349(%rip)      # 0x12100
addsd 0xa3c9(%rip), %xmm0     # 0xf188
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/matlabfunctions.cpp
// Function: matlab_std(double*, int)
double matlab_std(double *x, int x_length) {
  double average = 0.0;
  for (int i = 0; i < x_length; ++i) average += x[i];
  average /= x_length;

  double s = 0.0;
  for (int i = 0; i < x_length; ++i) s += pow(x[i] - average, 2.0);
  s /= (x_length - 1);

  return sqrt(s);
}

// Assembly:
xorpd %xmm1, %xmm1
xorpd %xmm0, %xmm0
testl %esi, %esi
jle 0x506a
movl %esi, %eax
xorpd %xmm2, %xmm2
xorl %ecx, %ecx
addsd (%rdi,%rcx,8), %xmm2
incq %rcx
cmpq %rcx, %rax
jne 0x5029
testl %esi, %esi
jle 0x5066
xorps %xmm0, %xmm0
cvtsi2sd %esi, %xmm0
divsd %xmm0, %xmm2
xorpd %xmm0, %xmm0
xorl %ecx, %ecx
movsd (%rdi,%rcx,8), %xmm3
subsd %xmm2, %xmm3
mulsd %xmm3, %xmm3
addsd %xmm3, %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x504b
jmp 0x506a
xorpd %xmm0, %xmm0
decl %esi
xorps %xmm2, %xmm2
cvtsi2sd %esi, %xmm2
divsd %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jb 0x1090
sqrtsd %xmm0, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: fft_plan_dft_1d(int, double (*) [2], double (*) [2], int, unsigned int)
fft_plan fft_plan_dft_1d(int n, fft_complex *in, fft_complex *out, int sign,
    unsigned int flags) {
  void makewt(int nw, int *ip, double *w);

  fft_plan output = {0};
  output.n = n;
  output.in = NULL;
  output.c_in = in;
  output.out = NULL;
  output.c_out = out;
  output.sign = sign;
  output.flags = flags;
  output.input = new double[n * 2];
  output.ip = new int[n];
  output.w = new double[n * 5 / 4];

  output.ip[0] = 0;
  makewt(output.n >> 1, output.ip, output.w);
  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %esi, %ebx
leal (%rbx,%rbx,4), %eax
leal (%rbx,%rbx,4), %esi
addl $0x3, %esi
testl %eax, %eax
cmovnsl %eax, %esi
sarl $0x2, %esi
movslq %esi, %r15
shlq $0x3, %r15
testl %ebx, %ebx
movl %ebx, %r12d
movq $-0x1, %rax
cmovsq %rax, %r15
shlq $0x2, %r12
testl %ebx, %ebx
cmovsq %rax, %r12
movq %rdi, %r14
leal (%rbx,%rbx), %esi
movslq %esi, %rdi
shlq $0x3, %rdi
testl %ebx, %ebx
cmovsq %rax, %rdi
xorl %eax, %eax
movq %rax, 0x8(%r14)
movl %ebx, (%r14)
movq %rax, 0x18(%r14)
movq %rdx, 0x10(%r14)
movq %rax, 0x28(%r14)
movq %rcx, 0x20(%r14)
movl %r8d, 0x4(%r14)
movl %r9d, 0x8(%r14)
callq 0x1030
movq %rax, 0x30(%r14)
movq %r12, %rdi
callq 0x1030
movq %rax, %r12
movq %rax, 0x38(%r14)
movq %r15, %rdi
callq 0x1030
movq %rax, 0x40(%r14)
movl $0x0, (%r12)
sarl %ebx
movl %ebx, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x82e6
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: fft_plan_dft_c2r_1d(int, double (*) [2], double*, unsigned int)
fft_plan fft_plan_dft_c2r_1d(int n, fft_complex *in, double *out,
    unsigned int flags) {
  void makewt(int nw, int *ip, double *w);
  void makect(int nc, int *ip, double *c);

  fft_plan output = {0};
  output.n = n;
  output.in = NULL;
  output.c_in = in;
  output.out = out;
  output.c_out = NULL;
  output.sign = FFT_BACKWARD;
  output.flags = flags;
  output.input = new double[n];
  output.ip = new int[n];
  output.w = new double[n * 5 / 4];

  output.ip[0] = 0;
  makewt(output.n >> 2, output.ip, output.w);
  makect(output.n >> 2, output.ip, output.w + (output.n >> 2));
  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
leal (%r14,%r14,4), %eax
leal (%r14,%r14,4), %esi
addl $0x3, %esi
testl %eax, %eax
cmovnsl %eax, %esi
sarl $0x2, %esi
movslq %esi, %r15
shlq $0x3, %r15
testl %r14d, %r14d
movq $-0x1, %rax
cmovsq %rax, %r15
leaq (,%r14,4), %r12
testl %r14d, %r14d
cmovsq %rax, %r12
movq %r14, %rdi
shlq $0x3, %rdi
testl %r14d, %r14d
movq $0x0, 0x8(%rbx)
movl %r14d, (%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rbx)
movq %rdx, 0x10(%rbx)
movq %rcx, 0x28(%rbx)
movl $0x2, 0x4(%rbx)
movl %r8d, 0x8(%rbx)
cmovsq %rax, %rdi
callq 0x1030
movq %rax, 0x30(%rbx)
movq %r12, %rdi
callq 0x1030
movq %rax, %r12
movq %rax, 0x38(%rbx)
movq %r15, %rdi
callq 0x1030
movq %rax, %r15
movq %rax, 0x40(%rbx)
movl $0x0, (%r12)
sarl $0x2, %r14d
movl %r14d, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x82e6
movslq %r14d, %rdi
leaq (%r15,%rdi,8), %rdx
movq %r12, %rsi
callq 0x85f7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: makect(int, int*, double*)
void makect(int nc, int *ip, double *c) {
  int j, nch;
  double delta;

  ip[1] = nc;
  if (nc > 1) {
    nch = nc >> 1;
    delta = atan(1.0) / nch;
    c[0] = cos(delta * nch);
    c[nch] = 0.5 * c[0];
    for (j = 1; j < nch; j++) {
      c[j] = 0.5 * cos(delta * j);
      c[nc - j] = 0.5 * sin(delta * j);
    }
  }
}

// Assembly:
movl %edi, 0x4(%rsi)
cmpl $0x2, %edi
jl 0x86ba
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdx, %rbx
movl %edi, %ebp
movl %edi, %r14d
shrl %r14d
cvtsi2sd %r14d, %xmm0
movsd 0x6ec9(%rip), %xmm1     # 0xf4f0
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
mulsd %xmm1, %xmm0
callq 0x11b0
movsd %xmm0, (%rbx)
mulsd 0x6acb(%rip), %xmm0     # 0xf110
movsd %xmm0, (%rbx,%r14,8)
cmpl $0x4, %ebp
jb 0x86ae
movl %ebp, %eax
leaq (%rbx,%rax,8), %r15
addq $-0x8, %r15
movl $0x1, %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
callq 0x11b0
movsd 0x6a90(%rip), %xmm1     # 0xf110
mulsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%r12,8)
movsd 0x8(%rsp), %xmm0
callq 0x1060
mulsd 0x6a73(%rip), %xmm0     # 0xf110
movsd %xmm0, (%r15)
incq %r12
addq $-0x8, %r15
cmpq %r12, %r14
jne 0x8660
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: fft_plan_dft_r2c_1d(int, double*, double (*) [2], unsigned int)
fft_plan fft_plan_dft_r2c_1d(int n, double *in, fft_complex *out,
    unsigned int flags) {
  void makewt(int nw, int *ip, double *w);
  void makect(int nc, int *ip, double *c);

  fft_plan output = {0};
  output.n = n;
  output.in = in;
  output.c_in = NULL;
  output.out = NULL;
  output.c_out = out;
  output.sign = FFT_FORWARD;
  output.flags = flags;
  output.input = new double[n];
  output.ip = new int[n];
  output.w = new double[n * 5 / 4];

  output.ip[0] = 0;
  makewt(output.n >> 2, output.ip, output.w);
  makect(output.n >> 2, output.ip, output.w + (output.n >> 2));
  return output;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
movslq %esi, %r14
leal (%r14,%r14,4), %eax
leal (%r14,%r14,4), %esi
addl $0x3, %esi
testl %eax, %eax
cmovnsl %eax, %esi
sarl $0x2, %esi
movslq %esi, %r15
shlq $0x3, %r15
testl %r14d, %r14d
movq $-0x1, %rax
cmovsq %rax, %r15
leaq (,%r14,4), %r12
testl %r14d, %r14d
cmovsq %rax, %r12
movq %r14, %rdi
shlq $0x3, %rdi
testl %r14d, %r14d
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rbx)
movl %r14d, (%rbx)
movq %rdx, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
movq %rcx, 0x20(%rbx)
movl $0x1, 0x4(%rbx)
movl %r8d, 0x8(%rbx)
cmovsq %rax, %rdi
callq 0x1030
movq %rax, 0x30(%rbx)
movq %r12, %rdi
callq 0x1030
movq %rax, %r12
movq %rax, 0x38(%rbx)
movq %r15, %rdi
callq 0x1030
movq %rax, %r15
movq %rax, 0x40(%rbx)
movl $0x0, (%r12)
sarl $0x2, %r14d
movl %r14d, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x82e6
movslq %r14d, %rdi
leaq (%r15,%rdi,8), %rdx
movq %r12, %rsi
callq 0x85f7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: fft_destroy_plan(fft_plan)
void fft_destroy_plan(fft_plan p) {
  p.n = 0;
  p.in = NULL;
  p.c_in = NULL;
  p.out = NULL;
  p.c_out = NULL;
  p.sign = 0;
  p.flags = 0;
  delete[] p.input;
  delete[] p.ip;
  delete[] p.w;
}

// Assembly:
pushq %rbx
leaq 0x10(%rsp), %rbx
movq 0x30(%rbx), %rdi
testq %rdi, %rdi
je 0x8a3e
callq 0x1110
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x8a4c
callq 0x1110
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x8a5b
popq %rbx
jmp 0x1110
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cdft(int, int, double*, int*, double*)
void cdft(int n, int isgn, double *a, int *ip, double *w) {
  void cftfsub(int n, double *a, int *ip, int nw, double *w);
  void cftbsub(int n, double *a, int *ip, int nw, double *w);
  int nw;

  nw = ip[0];
  if (isgn >= 0) {
    cftfsub(n, a, ip, nw, w);
  } else {
    cftbsub(n, a, ip, nw, w);
  }
}

// Assembly:
movl (%rcx), %eax
testl %esi, %esi
js 0x8a70
movq %rdx, %rsi
movq %rcx, %rdx
movl %eax, %ecx
jmp 0x8a7d
movq %rdx, %rsi
movq %rcx, %rdx
movl %eax, %ecx
jmp 0x8bb5
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cftfsub(int, double*, int*, int, double*)
void cftfsub(int n, double *a, int *ip, int nw, double *w) {
  void bitrv2(int n, int *ip, double *a);
  void bitrv216(double *a);
  void bitrv208(double *a);
  void cftf1st(int n, double *a, double *w);
  void cftrec4(int n, double *a, int nw, double *w);
  void cftleaf(int n, int isplt, double *a, int nw, double *w);
  void cftfx41(int n, double *a, int nw, double *w);
  void cftf161(double *a, double *w);
  void cftf081(double *a, double *w);
  void cftf040(double *a);
  void cftx020(double *a);

  if (n > 8) {
    if (n > 32) {
      cftf1st(n, a, &w[nw - (n >> 2)]);
    if (n > 512) {
      cftrec4(n, a, nw, w);
    } else if (n > 128) {
      cftleaf(n, 1, a, nw, w);
    } else {
      cftfx41(n, a, nw, w);
    }
      bitrv2(n, ip, a);
    } else if (n == 32) {
      cftf161(a, &w[nw - 8]);
      bitrv216(a);
    } else {
      cftf081(a, w);
      bitrv208(a);
    }
  } else if (n == 8) {
    cftf040(a);
  } else if (n == 4) {
    cftx020(a);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x9, %edi
jl 0x8ad5
movq %r8, %r15
movl %ecx, %r12d
cmpl $0x21, %ebp
jb 0x8af3
movq %rdx, %r14
movl %ebp, %eax
shrl $0x2, %eax
movl %r12d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq (%r15,%rax,8), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0x9051
movl %ebp, %edi
cmpl $0x201, %ebp            # imm = 0x201
jb 0x8b3b
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x98ce
jmp 0x8ba0
cmpl $0x4, %ebp
je 0x8b1b
cmpl $0x8, %ebp
jne 0x8b89
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xaf43
cmpl $0x20, %ebp
jne 0x8b58
movslq %r12d, %rax
leaq (%r15,%rax,8), %rsi
addq $-0x40, %rsi
movq %rbx, %rdi
callq 0xa7cd
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xacf5
movupd (%rbx), %xmm0
movupd 0x10(%rbx), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rbx)
jmp 0x8b89
cmpl $0x81, %ebp
jb 0x8b92
movl $0x1, %esi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r15, %r8
callq 0x99e0
jmp 0x8ba0
movq %rbx, %rdi
movq %r15, %rsi
callq 0xad7a
movupd 0x10(%rbx), %xmm0
movupd 0x30(%rbx), %xmm1
movupd 0x40(%rbx), %xmm2
movups 0x60(%rbx), %xmm3
movupd %xmm2, 0x10(%rbx)
movupd %xmm0, 0x40(%rbx)
movups %xmm3, 0x30(%rbx)
movupd %xmm1, 0x60(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x9d1b
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9dc1
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cftbsub(int, double*, int*, int, double*)
void cftbsub(int n, double *a, int *ip, int nw, double *w) {
  void bitrv2conj(int n, int *ip, double *a);
  void bitrv216neg(double *a);
  void bitrv208neg(double *a);
  void cftb1st(int n, double *a, double *w);
  void cftrec4(int n, double *a, int nw, double *w);
  void cftleaf(int n, int isplt, double *a, int nw, double *w);
  void cftfx41(int n, double *a, int nw, double *w);
  void cftf161(double *a, double *w);
  void cftf081(double *a, double *w);
  void cftb040(double *a);
  void cftx020(double *a);

  if (n > 8) {
    if (n > 32) {
      cftb1st(n, a, &w[nw - (n >> 2)]);
      if (n > 512) {
        cftrec4(n, a, nw, w);
      } else if (n > 128) {
        cftleaf(n, 1, a, nw, w);
      } else {
        cftfx41(n, a, nw, w);
      }
      bitrv2conj(n, ip, a);
    } else if (n == 32) {
      cftf161(a, &w[nw - 8]);
      bitrv216neg(a);
    } else {
      cftf081(a, w);
      bitrv208neg(a);
    }
  } else if (n == 8) {
    cftb040(a);
  } else if (n == 4) {
    cftx020(a);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x9, %edi
jl 0x8c0d
movq %r8, %r15
movl %ecx, %r12d
cmpl $0x21, %ebp
jb 0x8c27
movq %rdx, %r14
movl %ebp, %eax
shrl $0x2, %eax
movl %r12d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq (%r15,%rax,8), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq 0xafcb
movl %ebp, %edi
cmpl $0x201, %ebp            # imm = 0x201
jb 0x8c76
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x98ce
jmp 0x8cbc
cmpl $0x4, %ebp
je 0x8c4f
cmpl $0x8, %ebp
jne 0x8c6d
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc711
cmpl $0x20, %ebp
jne 0x8c93
movslq %r12d, %rax
leaq (%r15,%rax,8), %rsi
addq $-0x40, %rsi
movq %rbx, %rdi
callq 0xa7cd
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc62f
movupd (%rbx), %xmm0
movupd 0x10(%rbx), %xmm1
movapd %xmm0, %xmm2
addpd %xmm1, %xmm2
movupd %xmm2, (%rbx)
subpd %xmm1, %xmm0
movupd %xmm0, 0x10(%rbx)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x81, %ebp
jb 0x8cae
movl $0x1, %esi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r15, %r8
callq 0x99e0
jmp 0x8cbc
movq %rbx, %rdi
movq %r15, %rsi
callq 0xad7a
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xc6d8
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x9d1b
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xb996
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: rdft(int, int, double*, int*, double*)
void rdft(int n, int isgn, double *a, int *ip, double *w) {
  void cftfsub(int n, double *a, int *ip, int nw, double *w);
  void cftbsub(int n, double *a, int *ip, int nw, double *w);
  void rftfsub(int n, double *a, int nc, double *c);
  void rftbsub(int n, double *a, int nc, double *c);
  double xi;

  int nw = ip[0];
  int nc = ip[1];

  if (isgn >= 0) {
    if (n > 4) {
      cftfsub(n, a, ip, nw, w);
      rftfsub(n, a, nc, w + nw);
    } else if (n == 4) {
      cftfsub(n, a, ip, nw, w);
    }
    xi = a[0] - a[1];
    a[0] += a[1];
    a[1] = xi;
  } else {
    a[1] = 0.5 * (a[0] - a[1]);
    a[0] -= a[1];
    if (n > 4) {
      rftbsub(n, a, nc, w + nw);
      cftbsub(n, a, ip, nw, w);
    } else if (n == 4) {
      cftbsub(n, a, ip, nw, w);
    }
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r14
movq %rcx, %r12
movq %rdx, %rbx
movl %edi, %ebp
movslq (%rcx), %r15
movl 0x4(%rcx), %r13d
testl %esi, %esi
js 0x8d28
cmpl $0x5, %ebp
jl 0x8d85
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
movl %r15d, %ecx
movq %r14, %r8
callq 0x8a7d
leaq (%r14,%r15,8), %rcx
movl %ebp, %edi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x8e08
movsd (%rbx), %xmm0
jmp 0x8dba
movsd (%rbx), %xmm0
movapd %xmm0, %xmm1
subsd 0x8(%rbx), %xmm1
mulsd 0x63d3(%rip), %xmm1     # 0xf110
movsd %xmm1, 0x8(%rbx)
subsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
cmpl $0x5, %ebp
jl 0x8de3
leaq (%r14,%r15,8), %rcx
movl %ebp, %edi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x8ef0
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
movl %r15d, %ecx
movq %r14, %r8
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x8bb5
movsd (%rbx), %xmm0
cmpl $0x4, %ebp
jne 0x8dba
movsd 0x8(%rbx), %xmm1
movupd 0x10(%rbx), %xmm2
movapd %xmm0, %xmm3
unpcklpd %xmm1, %xmm3            # xmm3 = xmm3[0],xmm1[0]
subpd %xmm2, %xmm3
addsd %xmm2, %xmm0
unpckhpd %xmm2, %xmm2            # xmm2 = xmm2[1,1]
addsd %xmm1, %xmm2
movsd %xmm2, 0x8(%rbx)
movupd %xmm3, 0x10(%rbx)
movsd 0x8(%rbx), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
movsd %xmm2, 0x8(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x4, %ebp
jne 0x8dd4
movupd 0x10(%rbx), %xmm2
unpcklpd %xmm1, %xmm0            # xmm0 = xmm0[0],xmm1[0]
movapd %xmm0, %xmm1
addpd %xmm2, %xmm1
movupd %xmm1, (%rbx)
subpd %xmm2, %xmm0
movupd %xmm0, 0x10(%rbx)
jmp 0x8dd4
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: rftfsub(int, double*, int, double*)
void rftfsub(int n, double *a, int nc, double *c) {
  int j, k, kk, ks, m;
  double wkr, wki, xr, xi, yr, yi;

  m = n >> 1;
  ks = 2 * nc / m;
  kk = 0;
  for (j = 2; j < m; j += 2) {
    k = n - j;
    kk += ks;
    wkr = 0.5 - c[nc - kk];
    wki = c[kk];
    xr = a[j] - a[k];
    xi = a[j + 1] + a[k + 1];
    yr = wkr * xr - wki * xi;
    yi = wkr * xi + wki * xr;
    a[j] -= yr;
    a[j + 1] -= yi;
    a[k] += yr;
    a[k + 1] -= yi;
  }
}

// Assembly:
movl %edi, %r9d
sarl %r9d
cmpl $0x3, %r9d
jl 0x8eef
movl %edx, %r8d
leal (%r8,%r8), %eax
cltd
idivl %r9d
movl %edi, %r10d
movl %r9d, %edx
cltq
movslq %r8d, %rdi
leaq (%rcx,%rax,8), %r8
shlq $0x3, %rax
shlq $0x3, %rdi
subq %rax, %rdi
addq %rcx, %rdi
movq %rax, %rcx
negq %rcx
leaq (%rsi,%r10,8), %r9
addq $-0x10, %r9
movl $0x2, %r10d
movsd 0x62b4(%rip), %xmm0     # 0xf110
movapd 0x622c(%rip), %xmm1     # 0xf090
movapd %xmm0, %xmm2
subsd (%rdi), %xmm2
movsd (%r8), %xmm3
movapd %xmm3, %xmm4
xorpd %xmm1, %xmm4
movupd (%rsi,%r10,8), %xmm5
movupd (%r9), %xmm6
movapd %xmm5, %xmm7
subpd %xmm6, %xmm7
addpd %xmm5, %xmm6
movapd %xmm6, %xmm8
movsd %xmm7, %xmm8            # xmm8 = xmm7[0],xmm8[1]
shufpd $0x1, %xmm7, %xmm6      # xmm6 = xmm6[1],xmm7[0]
unpcklpd %xmm3, %xmm4            # xmm4 = xmm4[0],xmm3[0]
mulpd %xmm6, %xmm4
unpcklpd %xmm2, %xmm2            # xmm2 = xmm2[0,0]
mulpd %xmm8, %xmm2
addpd %xmm4, %xmm2
subpd %xmm2, %xmm5
movupd %xmm5, (%rsi,%r10,8)
movupd (%r9), %xmm3
movapd %xmm3, %xmm4
addpd %xmm2, %xmm4
subpd %xmm2, %xmm3
movsd %xmm4, %xmm3            # xmm3 = xmm4[0],xmm3[1]
movupd %xmm3, (%r9)
addq $0x2, %r10
addq %rax, %r8
addq %rcx, %rdi
addq $-0x10, %r9
cmpq %rdx, %r10
jb 0x8e64
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: makeipt(int, int*)
void makeipt(int nw, int *ip) {
  int j, l, m, m2, p, q;

  ip[2] = 0;
  ip[3] = 16;
  m = 2;
  for (l = nw; l > 32; l >>= 2) {
    m2 = m << 1;
    q = m2 << 3;
    for (j = m; j < m2; j++) {
      p = ip[j] << 2;
      ip[m + j] = p;
      ip[m2 + j] = p + q;
    }
    m = m2;
  }
}

// Assembly:
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, 0x8(%rsi)
cmpl $0x21, %edi
jl 0x9050
pushq %rbp
pushq %rbx
movl $0x2, %eax
leal (%rax,%rax), %ecx
cmpl %ecx, %eax
jge 0x903d
movslq %eax, %r11
shll $0x4, %eax
movslq %ecx, %rdx
leaq (%rsi,%r11,4), %r8
leaq (,%rdx,4), %r9
leaq (%r9,%r11,4), %r9
addq %rsi, %r9
leaq (%rsi,%r11,8), %r10
subq %r11, %rdx
xorl %r11d, %r11d
movl (%r8,%r11,4), %ebx
leal (,%rbx,4), %ebp
movl %ebp, (%r10,%r11,4)
leal (%rax,%rbx,4), %ebx
movl %ebx, (%r9,%r11,4)
incq %r11
cmpq %r11, %rdx
jne 0x901f
movl %edi, %edx
shrl $0x2, %edx
movl %ecx, %eax
cmpl $0x83, %edi
movl %edx, %edi
ja 0x8ff2
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cftrec4(int, double*, int, double*)
void cftrec4(int n, double *a, int nw, double *w) {
  int cfttree(int n, int j, int k, double *a, int nw, double *w);
  void cftleaf(int n, int isplt, double *a, int nw, double *w);
  void cftmdl1(int n, double *a, double *w);
  int isplt, j, k, m;

  m = n;
  while (m > 512) {
    m >>= 2;
    cftmdl1(m, &a[n - m], &w[nw - (m >> 1)]);
  }
  cftleaf(m, 1, &a[n - m], nw, w);
  k = 0;
  for (j = n - m; j > 0; j -= m) {
    k++;
    isplt = cfttree(m, j, k, a, nw, w);
    cftleaf(m, isplt, &a[j - m], nw, w);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rcx, %rbp
movl %edx, %r14d
movq %rsi, %r13
movl %edi, %r15d
movl %edi, %r12d
cmpl $0x201, %edi            # imm = 0x201
jl 0x993b
movl %r15d, %ebx
movl %r15d, %r12d
shrl $0x2, %r12d
movl %r15d, %eax
subl %r12d, %eax
cltq
leaq (,%rax,8), %rsi
addq %r13, %rsi
movl %ebx, %eax
shrl $0x3, %eax
movl %r14d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
leaq (,%rax,8), %rdx
addq %rbp, %rdx
movl %r12d, %edi
callq 0xc77a
cmpl $0x803, %ebx            # imm = 0x803
movl %r12d, %ebx
ja 0x98f9
movq %rbp, %r8
movq %r13, %rbp
movl %r15d, %r13d
subl %r12d, %r13d
movslq %r13d, %rax
movq %rax, 0x8(%rsp)
leaq (,%rax,8), %rdx
addq %rbp, %rdx
movl $0x1, %ebx
movl %r12d, %edi
movl $0x1, %esi
movl %r14d, %ecx
movq %r8, 0x10(%rsp)
callq 0x99e0
cmpl $0x0, 0x8(%rsp)
jle 0x99d1
subl %r12d, %r15d
subl %r12d, %r15d
movq %rbp, (%rsp)
movl %r12d, %edi
movl %r13d, %esi
movl %ebx, %edx
movq %rbp, %rcx
movl %r14d, %r8d
movl %r14d, %ebp
movq 0x10(%rsp), %r14
movq %r14, %r9
callq 0xcb1c
subl %r12d, %r13d
movslq %r15d, %r15
movq (%rsp), %rcx
leaq (%rcx,%r15,8), %rdx
movl %r12d, %edi
movl %eax, %esi
movl %ebp, %ecx
movq %r14, %r8
movl %ebp, %r14d
movq (%rsp), %rbp
callq 0x99e0
incl %ebx
subl %r12d, %r15d
testl %r13d, %r13d
jg 0x9985
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cftfx41(int, double*, int, double*)
void cftfx41(int n, double *a, int nw, 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 == 128) {
    cftf161(a, &w[nw - 8]);
    cftf162(&a[32], &w[nw - 32]);
    cftf161(&a[64], &w[nw - 8]);
    cftf161(&a[96], &w[nw - 8]);
  } else {
    cftf081(a, &w[nw - 8]);
    cftf082(&a[16], &w[nw - 8]);
    cftf081(&a[32], &w[nw - 8]);
    cftf081(&a[48], &w[nw - 8]);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movslq %edx, %rax
leaq (%rcx,%rax,8), %r14
addq $-0x40, %r14
cmpl $0x80, %edi
jne 0x9d81
leaq (%rcx,%rax,8), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0xa7cd
leaq 0x100(%rbx), %rdi
addq $-0x100, %r15
movq %r15, %rsi
callq 0xd20d
leaq 0x200(%rbx), %rdi
movq %r14, %rsi
callq 0xa7cd
addq $0x300, %rbx            # imm = 0x300
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xa7cd
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
addq $0x180, %rbx            # imm = 0x180
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xad7a
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: cfttree(int, int, int, double*, int, double*)
int cfttree(int n, int j, int k, double *a, int nw, double *w) {
  void cftmdl1(int n, double *a, double *w);
  void cftmdl2(int n, double *a, double *w);
  int i, isplt, m;

  if ((k & 3) != 0) {
    isplt = k & 1;
    if (isplt != 0) {
      cftmdl1(n, &a[j - n], &w[nw - (n >> 1)]);
    } else {
      cftmdl2(n, &a[j - n], &w[nw - n]);
    }
  } else {
    m = n;
    for (i = k; (i & 3) == 0; i >>= 2) {
      m <<= 2;
    }
    isplt = i & 1;
    if (isplt != 0) {
      while (m > 128) {
        cftmdl1(m, &a[j - m], &w[nw - (m >> 1)]);
        m >>= 2;
      }
    } else {
      while (m > 128) {
        cftmdl2(m, &a[j - m], &w[nw - m]);
        m >>= 2;
      }
    }
  }
  return isplt;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r13d
movl %esi, %r12d
movl %edi, %ebp
testb $0x3, %r13b
je 0xcb5e
subl %ebp, %r12d
movslq %r12d, %rax
leaq (%r15,%rax,8), %rsi
testb $0x1, %r13b
jne 0xcbba
subl %ebp, %r14d
movslq %r14d, %rax
leaq (%r9,%rax,8), %rdx
movl %ebp, %edi
callq 0xcc2e
jmp 0xcbb6
movl %r13d, %eax
shll $0x2, %ebp
sarl $0x2, %r13d
testb $0xc, %al
je 0xcb5e
andl $0x1, %r13d
jne 0xcbd6
xorl %eax, %eax
cmpl $0x81, %ebp
jl 0xcc1f
movl %ebp, %ebx
movq %r9, %r13
movl %r12d, %eax
subl %ebp, %eax
cltq
leaq (%r15,%rax,8), %rsi
movl %r14d, %eax
subl %ebp, %eax
cltq
leaq (,%rax,8), %rdx
addq %r13, %rdx
movl %ebp, %edi
callq 0xcc2e
shrl $0x2, %ebx
cmpl $0x203, %ebp            # imm = 0x203
movl %ebx, %ebp
ja 0xcb85
xorl %eax, %eax
jmp 0xcc1f
movl %ebp, %eax
sarl %eax
subl %eax, %r14d
movslq %r14d, %rax
leaq (%r9,%rax,8), %rdx
movl %ebp, %edi
callq 0xc77a
movl $0x1, %eax
jmp 0xcc1f
movl $0x1, %eax
cmpl $0x81, %ebp
jl 0xcc1f
movl %ebp, %ebx
movq %r9, (%rsp)
movl %r12d, %eax
subl %ebp, %eax
cltq
leaq (%r15,%rax,8), %rsi
movl %ebp, %eax
shrl %eax
movl %r14d, %ecx
subl %eax, %ecx
movslq %ecx, %rax
movq (%rsp), %rcx
leaq (%rcx,%rax,8), %rdx
movl %ebp, %edi
callq 0xc77a
shrl $0x2, %ebx
cmpl $0x203, %ebp            # imm = 0x203
movl %ebx, %ebp
ja 0xcbe9
movl %r13d, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: dctsub(int, double*, int, double*)
void dctsub(int n, double *a, int nc, double *c) {
  int j, k, kk, ks, m;
  double wkr, wki, xr;

  m = n >> 1;
  ks = nc / n;
  kk = 0;
  for (j = 1; j < m; j++) {
    k = n - j;
    kk += ks;
    wkr = c[kk] - c[nc - kk];
    wki = c[kk] + c[nc - kk];
    xr = wki * a[j] - wkr * a[k];
    a[j] = wkr * a[j] + wki * a[k];
    a[k] = xr;
  }
  a[m] *= c[0];
}

// Assembly:
movl %edi, %r9d
sarl %r9d
cmpl $0x2, %r9d
jl 0xddb0
pushq %rbx
movl %edx, %r8d
movl %edx, %eax
cltd
idivl %edi
movl %edi, %r11d
movslq %eax, %r10
movslq %r8d, %rax
movl %r9d, %edx
shlq $0x3, %rax
leaq (,%r10,8), %rdi
subq %rdi, %rax
addq %rcx, %rax
movq %rdi, %r8
negq %r8
leaq (%rcx,%r10,8), %r10
leaq (%rsi,%r11,8), %r11
addq $-0x8, %r11
movl $0x1, %ebx
movsd (%r10), %xmm0
movsd (%rax), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd %xmm1, %xmm0
movsd (%rsi,%rbx,8), %xmm1
movsd (%r11), %xmm3
movapd %xmm0, %xmm4
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm3
mulsd %xmm1, %xmm4
subsd %xmm3, %xmm4
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, (%rsi,%rbx,8)
movsd %xmm4, (%r11)
incq %rbx
addq %r8, %rax
addq %rdi, %r10
addq $-0x8, %r11
cmpq %rbx, %rdx
jne 0xdd58
popq %rbx
movsd (%rcx), %xmm0
movslq %r9d, %rax
mulsd (%rsi,%rax,8), %xmm0
movsd %xmm0, (%rsi,%rax,8)
retq
// File: /workspace/github_cpp_makefile_star2_O3/Sleepwalking[P]world-octave/fft.cpp
// Function: dstsub(int, double*, int, double*)
void dstsub(int n, double *a, int nc, double *c) {
  int j, k, kk, ks, m;
  double wkr, wki, xr;

  m = n >> 1;
  ks = nc / n;
  kk = 0;
  for (j = 1; j < m; j++) {
    k = n - j;
    kk += ks;
    wkr = c[kk] - c[nc - kk];
    wki = c[kk] + c[nc - kk];
    xr = wki * a[k] - wkr * a[j];
    a[k] = wkr * a[k] + wki * a[j];
    a[j] = xr;
  }
  a[m] *= c[0];
}

// Assembly:
movl %edi, %r9d
sarl %r9d
cmpl $0x2, %r9d
jl 0xde68
pushq %rbx
movl %edx, %r8d
movl %edx, %eax
cltd
idivl %edi
movl %edi, %r11d
movslq %eax, %r10
movslq %r8d, %rax
movl %r9d, %edx
shlq $0x3, %rax
leaq (,%r10,8), %rdi
subq %rdi, %rax
addq %rcx, %rax
movq %rdi, %r8
negq %r8
leaq (%rcx,%r10,8), %r10
leaq (%rsi,%r11,8), %r11
addq $-0x8, %r11
movl $0x1, %ebx
movsd (%r10), %xmm0
movsd (%rax), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd %xmm1, %xmm0
movsd (%r11), %xmm1
movsd (%rsi,%rbx,8), %xmm3
movapd %xmm0, %xmm4
mulsd %xmm3, %xmm0
mulsd %xmm2, %xmm3
mulsd %xmm1, %xmm4
subsd %xmm3, %xmm4
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
movsd %xmm2, (%r11)
movsd %xmm4, (%rsi,%rbx,8)
incq %rbx
addq %r8, %rax
addq %rdi, %r10
addq $-0x8, %r11
cmpq %rbx, %rdx
jne 0xde10
popq %rbx
movsd (%rcx), %xmm0
movslq %r9d, %rax
mulsd (%rsi,%rax,8), %xmm0
movsd %xmm0, (%rsi,%rax,8)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/main.cpp
// Function: main
int main( int argc, char ** argv) {
	Shell *shell;
	if (argc == 1) {
		//no filesystem given
		shell = new Shell(NULL);
		shell->prompt();
	} else if (argc == 2) {
		//filesystem given
		shell = new Shell(argv[1]);
		shell->prompt();
	} else {
		cout << "usage: os1shell [file-system-name]\n";
	}
	delete shell;
	return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x2, %edi
je 0x2603
cmpl $0x1, %edi
jne 0x2646
movl $0x20, %edi
callq 0x21e0
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x5164
jmp 0x261f
movq %rsi, %r14
movl $0x20, %edi
callq 0x21e0
movq %rax, %rbx
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x5164
movq %rbx, %rdi
callq 0x5c94
movq %rbx, %rdi
callq 0x7262
movl $0x20, %esi
movq %rbx, %rdi
callq 0x21f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
callq 0x2450
jmp 0x264d
movq %rax, %r14
movl $0x20, %esi
movq %rbx, %rdi
callq 0x21f0
movq %r14, %rdi
callq 0x23b0
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::openFileSys(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int FileSys::openFileSys(string name) {
	int ret = -1;
	int i;
	file = fopen(name.c_str(), "r+");
	if (file != NULL) {
		boot = new BootRecord();
		readBootRecord(boot);

		if ((boot->clusterSize < (MIN_CLUSTER_SIZE * 1024) 
			|| boot->clusterSize > (MAX_CLUSTER_SIZE * 1024)
			|| boot->size < (MIN_FILE_SIZE * 1024 * 1024)
			|| boot->size > (MAX_FILE_SIZE * 1024 * 1024)
			|| boot->size < boot->clusterSize)) {
			ret = -1;
		} else {
			sysName = name;
			entriesPerTable = (boot->clusterSize)/DT_ENTRY_SIZE;
			numClusters = (boot->size)/(boot->clusterSize);
			fileAllocationTable = new int[numClusters];
			directoryTable.resize(entriesPerTable);

			readFAT(fileAllocationTable, boot->FAT);
			readDirectoryTable(&directoryTable, boot->rootDir);

			printInfo();
			ret = 0; 
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x59b0(%rip), %rsi      # 0x8030
callq 0x2250
movq %rax, 0x20(%rbx)
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
testq %rax, %rax
je 0x278a
movq %rax, %r15
movl $0x10, %edi
callq 0x21e0
movq %rax, %r12
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, 0x58(%rbx)
movq %r15, %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x2220
movq 0x20(%rbx), %rcx
movl $0x10, %esi
movl $0x1, %edx
movq %r12, %rdi
callq 0x22e0
movq 0x58(%rbx), %rax
movl $0xffffbfff, %ecx       # imm = 0xFFFFBFFF
addl (%rax), %ecx
cmpl $0xffffdfff, %ecx       # imm = 0xFFFFDFFF
jb 0x278a
movl $0xfcdfffff, %ecx       # imm = 0xFCDFFFFF
addl 0x4(%rax), %ecx
cmpl $0xfd2fffff, %ecx       # imm = 0xFD2FFFFF
jb 0x278a
movq %rbx, %rdi
movq %r14, %rsi
callq 0x20f0
movq 0x58(%rbx), %rax
movl (%rax), %ecx
movl %ecx, %r14d
shrl $0x7, %r14d
movl %r14d, 0x2c(%rbx)
movl 0x4(%rax), %eax
xorl %ebp, %ebp
xorl %edx, %edx
divl %ecx
movl %eax, 0x30(%rbx)
cltq
leaq (,%rax,4), %rcx
testl %eax, %eax
movq $-0x1, %rdi
cmovnsq %rcx, %rdi
callq 0x2040
movq %rax, 0x38(%rbx)
leaq 0x40(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4d8a
movq 0x38(%rbx), %rsi
movq 0x58(%rbx), %rax
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x27ca
movq 0x58(%rbx), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2810
movq %rbx, %rdi
movl $0x6, %esi
movq %r15, %rdx
callq 0x4960
movl %ebp, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::readDirectoryTable(std::vector<DirectoryTableEntry, std::allocator<DirectoryTableEntry>>*, int)
int FileSys::readDirectoryTable(vector<DirectoryTableEntry> *table, int cluster) {
	int offset;
	int i = 0;
	int j = 0;
	int clusterSize = boot->clusterSize;

	do {
		table->resize((i + 1)*entriesPerTable);
		offset =  clusterSize * cluster;
		fseek(file, offset, SEEK_SET);
		fread(&((*table)[i * entriesPerTable]), 128, entriesPerTable, file);
		cluster = fileAllocationTable[cluster];
		i++;
	} while(cluster  != 0xFFFF);
	return table->size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rax
movslq (%rax), %r15
xorl %r13d, %r13d
leal 0x1(%r13), %r12d
movslq 0x2c(%r14), %rax
movslq %r12d, %rsi
imulq %rax, %rsi
movq %rbx, %rdi
callq 0x4d8a
movslq %ebp, %rbp
movq %rbp, %rsi
imulq %r15, %rsi
movq 0x20(%r14), %rdi
xorl %edx, %edx
callq 0x2220
movslq 0x2c(%r14), %rdx
movslq %r13d, %rdi
imulq %rdx, %rdi
shlq $0x7, %rdi
addq (%rbx), %rdi
movq 0x20(%r14), %rcx
movl $0x80, %esi
callq 0x22e0
movq 0x38(%r14), %rax
movl (%rax,%rbp,4), %ebp
movl %r12d, %r13d
cmpl $0xffff, %ebp           # imm = 0xFFFF
jne 0x282d
movq 0x8(%rbx), %rax
subq (%rbx), %rax
shrq $0x7, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::writeFAT(int*, int)
void FileSys::writeFAT(int *fat, int cluster) {
	int offset =  boot->clusterSize * cluster;
	if (offset < boot->size) {
		fseek(file, offset, SEEK_SET);
		fwrite(fat, numClusters * sizeof(int), 1, file);
	}
}

// Assembly:
movq 0x58(%rdi), %rax
imull (%rax), %edx
cmpl 0x4(%rax), %edx
jae 0x2b5c
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movslq %edx, %rsi
xorl %edx, %edx
callq 0x2220
movslq 0x30(%r14), %rsi
shlq $0x2, %rsi
movq 0x20(%r14), %rcx
movl $0x1, %edx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2410
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::findUsedClusterCount()
int FileSys::findUsedClusterCount() {
	int i;
	usedClusters = 0;

	for (i = 0; i < numClusters; i++) {
		if (fileAllocationTable[i] != 0x0000) {
			usedClusters++;
		}
	}

	return usedClusters;
}

// Assembly:
movl $0x0, 0x28(%rdi)
movslq 0x30(%rdi), %rcx
testq %rcx, %rcx
jle 0x2bf8
movq 0x38(%rdi), %rdx
xorl %esi, %esi
xorl %eax, %eax
cmpl $0x0, (%rdx,%rsi,4)
je 0x2bef
incl %eax
movl %eax, 0x28(%rdi)
incq %rsi
cmpq %rsi, %rcx
jne 0x2be4
retq
xorl %eax, %eax
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::getDirectoryFileCount(std::vector<DirectoryTableEntry, std::allocator<DirectoryTableEntry>>)
int FileSys::getDirectoryFileCount(vector<DirectoryTableEntry> table) {
	int ret = 0;
	int i;
	for (i = 0; i < table.size(); i++) {
		if (table[i].name[0] != (char)0x00 && table[i].name[0] != (char)0xFF) {
			ret++;
		}
	}

	return ret;
}

// Assembly:
movq (%rsi), %rcx
movq 0x8(%rsi), %rdx
subq %rcx, %rdx
je 0x30ff
sarq $0x7, %rdx
cmpq $0x1, %rdx
adcq $0x0, %rdx
xorl %eax, %eax
movb (%rcx), %sil
decb %sil
cmpb $-0x2, %sil
adcl $0x0, %eax
subq $-0x80, %rcx
decq %rdx
jne 0x30e8
retq
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::findNextFreeCluster()
int FileSys::findNextFreeCluster() {
	int i;
	int ret = 0xFFFF;

	for (i = 1; i < numClusters && ret == 0xFFFF; i++) {
		if (fileAllocationTable[i] == 0x0000) {
			ret = i;
		}
	}

	return ret;
}

// Assembly:
movslq 0x30(%rdi), %rcx
movl $0xffff, %eax           # imm = 0xFFFF
cmpq $0x2, %rcx
jl 0x3136
movq 0x38(%rdi), %rdx
movl $0x1, %esi
cmpl $0x0, (%rdx,%rsi,4)
movl %esi, %eax
je 0x3127
movl $0xffff, %eax           # imm = 0xFFFF
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x3136
incq %rsi
cmpq %rcx, %rsi
jb 0x311a
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::findIndexForFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int FileSys::findIndexForFile(string name) {
	int i;
	int index = -1;
	for (i = 0; i < directoryTable.size() && index == -1; i++) {
		if (directoryTable[i].name == name) {
			index = i;
		}
	}
	return index;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq 0x40(%rdi), %rsi
cmpq %rsi, 0x48(%rdi)
je 0x3198
movq %rdi, %r14
movl $0xffffffff, %ebp       # imm = 0xFFFFFFFF
movl $0x1, %r15d
xorl %r12d, %r12d
addq %r12, %rsi
movq %rbx, %rdi
callq 0x2070
incl %ebp
testl %eax, %eax
je 0x318e
movq 0x40(%r14), %rsi
movq 0x48(%r14), %rcx
subq %rsi, %rcx
sarq $0x7, %rcx
subq $-0x80, %r12
leaq 0x1(%r15), %rdx
cmpq %r15, %rcx
movq %rdx, %r15
ja 0x315e
xorl %ecx, %ecx
negl %eax
sbbl %ecx, %ecx
orl %ebp, %ecx
jmp 0x319d
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
movl %ecx, %eax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::removeFile(int)
int FileSys::removeFile(int index) {
	int ret = -1;
	int cluster;
	int oldCluster;
	if (index != -1) {
		directoryTable[index].name[0] = 0xFF;

		cluster = directoryTable[index].index;
		do {
			oldCluster = cluster;
			cluster = fileAllocationTable[oldCluster];
			fileAllocationTable[oldCluster] = 0x0000;
		} while(cluster != 0xFFFF);

		directoryTable.erase(directoryTable.begin() + index);
		writeFAT(fileAllocationTable, boot->FAT);
		writeDirectoryTable(&directoryTable, boot->rootDir);
		ret = 0;
	}

	return ret;
}

// Assembly:
cmpl $-0x1, %esi
je 0x4213
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movslq %esi, %rax
movq 0x40(%rdi), %rcx
shlq $0x7, %rax
movb $-0x1, (%rcx,%rax)
movq 0x38(%rdi), %rsi
movq 0x40(%rdi), %rcx
leaq (%rcx,%rax), %rdi
movl 0x70(%rcx,%rax), %eax
movslq %eax, %rcx
movl (%rsi,%rcx,4), %eax
movl $0x0, (%rsi,%rcx,4)
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x41a9
leaq 0x80(%rdi), %rax
movq 0x48(%rbx), %rdx
cmpq %rdx, %rax
je 0x41e0
subq %rax, %rdx
movq %rax, %rsi
callq 0x2360
movq 0x38(%rbx), %rsi
movq 0x48(%rbx), %rdx
addq $-0x80, %rdx
movq %rdx, 0x48(%rbx)
movq 0x58(%rbx), %rax
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x2b18
movq 0x58(%rbx), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2b5e
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
retq
nop