LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdx, %r9
movslq %esi, %rbx
leal (%rbx,%rbx,4), %eax
pushq $0x4
popq %rsi
cltd
idivl %esi
movslq %eax, %r15
shlq $0x3, %r15
testl %ebx, %ebx
pushq $-0x1
popq %rax
cmovsq %rax, %r15
leaq (,%rbx,4), %r12
testl %ebx, %ebx
cmovsq %rax, %r12
movq %rdi, %r14
movq %rbx, %rdi
shlq $0x3, %rdi
testl %ebx, %ebx
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%r14)
movl %ebx, (%r14)
movq %r9, 0x18(%r14)
movq %rcx, 0x20(%r14)
movl $0x1, 0x4(%r14)
cmovsq %rax, %rdi
movl %r8d, 0x8(%r14)
andq $0x0, 0x28(%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, %r15
movq %rax, 0x40(%r14)
andl $0x0, (%r12)
sarl $0x2, %ebx
movl %ebx, %edi
movq %r12, %rsi
movq %rax, %rdx
callq 0x7084
movslq %ebx, %rdi
leaq (%r15,%rdi,8), %rdx
movq %r12, %rsi
callq 0x73b0
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/Sleepwalking[P]world-octave/fft.cpp
// Function: fft_execute(fft_plan)
void fft_execute(fft_plan p) {
  if (p.sign == FFT_FORWARD) {
    ForwardFFT(p);
  } else {  // ifft
    BackwardFFT(p);
  }
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
leaq 0x30(%rsp), %rax
movl (%rax), %r14d
cmpl $0x1, 0x4(%rax)
movq 0x10(%rax), %rsi
movq 0x30(%rax), %rbx
movq 0x38(%rax), %rcx
movq 0x40(%rax), %r8
jne 0x758f
movq 0x20(%rax), %r15
xorl %r12d, %r12d
testl %r14d, %r14d
cmovgl %r14d, %r12d
testq %rsi, %rsi
je 0x7644
shlq $0x4, %r12
xorl %eax, %eax
cmpq %rax, %r12
je 0x75d0
movsd (%rsi,%rax), %xmm0
movsd %xmm0, (%rbx,%rax)
movsd 0x8(%rsi,%rax), %xmm0
movsd %xmm0, 0x8(%rbx,%rax)
addq $0x10, %rax
jmp 0x756e
movq 0x20(%rax), %r15
testq %r15, %r15
je 0x765e
xorl %eax, %eax
testl %r14d, %r14d
movl $0x0, %r12d
cmovgl %r14d, %r12d
shlq $0x4, %r12
cmpq %rax, %r12
je 0x760a
movsd (%rsi,%rax), %xmm0
movsd %xmm0, (%rbx,%rax)
movsd 0x8(%rsi,%rax), %xmm0
movsd %xmm0, 0x8(%rbx,%rax)
addq $0x10, %rax
jmp 0x75af
addl %r14d, %r14d
pushq $0x1
popq %rsi
movl %r14d, %edi
movq %rbx, %rdx
callq 0x7787
xorl %eax, %eax
cmpq %rax, %r12
je 0x7748
movsd (%rbx,%rax), %xmm0
movsd %xmm0, (%r15,%rax)
movsd 0x8(%rbx,%rax), %xmm0
movsd %xmm0, 0x8(%r15,%rax)
addq $0x10, %rax
jmp 0x75e3
addl %r14d, %r14d
pushq $-0x1
popq %rsi
movl %r14d, %edi
movq %rbx, %rdx
callq 0x7787
xorl %eax, %eax
cmpq %rax, %r12
je 0x7748
movsd (%rbx,%rax), %xmm0
movsd %xmm0, (%r15,%rax)
movsd 0x8(%rbx,%rax), %xmm0
movsd %xmm0, 0x8(%r15,%rax)
addq $0x10, %rax
jmp 0x761d
movq 0x18(%rax), %rax
xorl %edx, %edx
cmpq %rdx, %r12
je 0x76b0
movsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%rbx,%rdx,8)
incq %rdx
jmp 0x764a
movq 0x28(%rax), %r15
movsd (%rsi), %xmm0
movsd %xmm0, (%rbx)
pushq $0x2
popq %rdi
movl %r14d, %eax
cltd
idivl %edi
cltq
movq %rax, %rdx
shlq $0x4, %rdx
movsd (%rsi,%rdx), %xmm0
movsd %xmm0, 0x8(%rbx)
pushq $0x1
popq %rdx
pushq $0x18
popq %rdi
cmpq %rax, %rdx
jge 0x7703
movsd -0x8(%rsi,%rdi), %xmm0
movsd %xmm0, -0x8(%rbx,%rdi)
movsd (%rsi,%rdi), %xmm0
movsd %xmm0, (%rbx,%rdi)
incq %rdx
addq $0x10, %rdi
jmp 0x768c
pushq $0x1
popq %rsi
movl %r14d, %edi
movq %rbx, %rdx
callq 0x79c7
movsd (%rbx), %xmm0
movsd %xmm0, (%r15)
andq $0x0, 0x8(%r15)
pushq $0x2
popq %rcx
movl %r14d, %eax
cltd
idivl %ecx
cltq
pushq $0x1
popq %rcx
pushq $0x18
popq %rdx
cmpq %rax, %rcx
jge 0x7733
movsd -0x8(%rbx,%rdx), %xmm0
movsd %xmm0, -0x8(%r15,%rdx)
movsd (%rbx,%rdx), %xmm0
movsd %xmm0, (%r15,%rdx)
incq %rcx
addq $0x10, %rdx
jmp 0x76dd
pushq $-0x1
popq %rsi
movl %r14d, %edi
movq %rbx, %rdx
callq 0x79c7
xorl %eax, %eax
testl %r14d, %r14d
cmovlel %eax, %r14d
cmpq %rax, %r14
je 0x7748
movsd (%rbx,%rax,8), %xmm0
addsd %xmm0, %xmm0
movsd %xmm0, (%r15,%rax,8)
incq %rax
jmp 0x771a
movsd 0x8(%rbx), %xmm0
shlq $0x4, %rax
movsd %xmm0, (%r15,%rax)
andq $0x0, 0x8(%r15,%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7768
callq 0x1110
movq 0x38(%rbx), %rdi
testq %rdi, %rdi
je 0x7776
callq 0x1110
movq 0x40(%rbx), %rdi
testq %rdi, %rdi
je 0x7785
popq %rbx
jmp 0x1110
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x779a
movq %rdx, %rsi
movq %rcx, %rdx
movl %eax, %ecx
jmp 0x77a7
movq %rdx, %rsi
movq %rcx, %rdx
movl %eax, %ecx
jmp 0x78b7
// File: /workspace/github_cpp_makefile_star2_O2/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 0x77ff
movq %r8, %r15
movl %ecx, %r12d
cmpl $0x21, %ebp
jb 0x7819
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 0x7cd2
cmpl $0x201, %ebp            # imm = 0x201
jb 0x785a
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x84f3
jmp 0x78a2
cmpl $0x4, %ebp
je 0x7841
cmpl $0x8, %ebp
jne 0x7851
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x994f
cmpl $0x20, %ebp
jne 0x7877
movslq %r12d, %rax
leaq (%r15,%rax,8), %rsi
addq $-0x40, %rsi
movq %rbx, %rdi
callq 0x91d9
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9701
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x99b8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x81, %ebp
jb 0x7892
pushq $0x1
popq %rsi
movl %ebp, %edi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r15, %r8
callq 0x85b0
jmp 0x78a2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9786
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x992e
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x88e5
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x898b
// File: /workspace/github_cpp_makefile_star2_O2/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 0x790f
movq %r8, %r15
movl %ecx, %r12d
cmpl $0x21, %ebp
jb 0x7929
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 0x99d7
cmpl $0x201, %ebp            # imm = 0x201
jb 0x796a
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x84f3
jmp 0x79b2
cmpl $0x4, %ebp
je 0x7951
cmpl $0x8, %ebp
jne 0x7961
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xafb7
cmpl $0x20, %ebp
jne 0x7987
movslq %r12d, %rax
leaq (%r15,%rax,8), %rsi
addq $-0x40, %rsi
movq %rbx, %rdi
callq 0x91d9
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xaed5
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x99b8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
cmpl $0x81, %ebp
jb 0x79a2
pushq $0x1
popq %rsi
movl %ebp, %edi
movq %rbx, %rdx
movl %r12d, %ecx
movq %r15, %r8
callq 0x85b0
jmp 0x79b2
movq %rbx, %rdi
movq %r15, %rsi
callq 0x9786
movq %rbx, %rdi
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xaf7e
movl %ebp, %edi
movq %rbx, %rsi
movl %r12d, %edx
movq %r15, %rcx
callq 0x88e5
movl %ebp, %edi
movq %r14, %rsi
movq %rbx, %rdx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa37c
// File: /workspace/github_cpp_makefile_star2_O2/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 0x7a13
cmpl $0x5, %ebp
jl 0x7a6c
movl %ebp, %edi
movq %rbx, %rsi
movq %r12, %rdx
movl %r15d, %ecx
movq %r14, %r8
callq 0x77a7
leaq (%r14,%r15,8), %rcx
movl %ebp, %edi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x7ac1
jmp 0x7a79
movsd (%rbx), %xmm0
movapd %xmm0, %xmm1
subsd 0x8(%rbx), %xmm1
mulsd 0x5698(%rip), %xmm1     # 0xd0c0
movsd %xmm1, 0x8(%rbx)
subsd %xmm1, %xmm0
movsd %xmm0, (%rbx)
cmpl $0x5, %ebp
jl 0x7aa6
leaq (%r14,%r15,8), %rcx
movl %ebp, %edi
movq %rbx, %rsi
movl %r13d, %edx
callq 0x7b9c
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 0x78b7
cmpl $0x4, %ebp
jne 0x7a79
movq %rbx, %rdi
callq 0x99b8
movsd (%rbx), %xmm0
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 0x7a97
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x99b8
// File: /workspace/github_cpp_makefile_star2_O2/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 %edx, %r8d
movslq %edi, %r9
sarl %edi
leal (%r8,%r8), %eax
cltd
idivl %edi
cltq
movslq %r8d, %rdx
movslq %edi, %rdi
addq $-0x2, %r9
leaq (%rcx,%rax,8), %r8
shlq $0x3, %rax
shlq $0x3, %rdx
subq %rax, %rdx
addq %rcx, %rdx
movq %rax, %rcx
negq %rcx
pushq $0x2
popq %r10
movsd 0x55c0(%rip), %xmm0     # 0xd0c0
movapd 0x5558(%rip), %xmm1     # 0xd060
cmpq %rdi, %r10
jge 0x7b9b
movapd %xmm0, %xmm2
subsd (%rdx), %xmm2
movsd (%r8), %xmm3
movapd %xmm3, %xmm4
xorpd %xmm1, %xmm4
movupd (%rsi,%r10,8), %xmm5
movupd (%rsi,%r9,8), %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 (%rsi,%r9,8), %xmm3
movapd %xmm3, %xmm4
addpd %xmm2, %xmm4
subpd %xmm2, %xmm3
movsd %xmm4, %xmm3            # xmm3 = xmm4[0],xmm3[1]
movupd %xmm3, (%rsi,%r9,8)
addq $0x2, %r10
addq $-0x2, %r9
addq %rax, %r8
addq %rcx, %rdx
jmp 0x7b08
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
pushq %rbx
movabsq $0x1000000000, %rax     # imm = 0x1000000000
movq %rax, 0x8(%rsi)
movl $0x2, %eax
cmpl $0x21, %edi
jl 0x7cd0
leal (%rax,%rax), %ecx
movslq %eax, %rdx
shll $0x4, %eax
movslq %ecx, %r8
leaq (%rsi,%r8,4), %r9
leaq (%rsi,%rdx,8), %r10
cmpq %r8, %rdx
jge 0x7cc9
movl (%rsi,%rdx,4), %r11d
leal (,%r11,4), %ebx
movl %ebx, (%r10)
leal (%rax,%r11,4), %r11d
movl %r11d, (%r9,%rdx,4)
incq %rdx
addq $0x4, %r10
jmp 0x7ca4
shrl $0x2, %edi
movl %ecx, %eax
jmp 0x7c8b
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %rax
movq %rcx, %rbp
movl %edx, %r14d
movq %rsi, %rbx
movl %edi, %r15d
movl %edi, %r12d
cmpl $0x200, %r12d           # imm = 0x200
jle 0x854d
movl %r12d, %r13d
shrl $0x2, %r13d
movl %r15d, %eax
subl %r13d, %eax
cltq
leaq (%rbx,%rax,8), %rsi
shrl $0x3, %r12d
movl %r14d, %eax
subl %r12d, %eax
cltq
leaq (,%rax,8), %rdx
addq %rbp, %rdx
movl %r13d, %edi
callq 0xb020
movl %r13d, %r12d
jmp 0x850d
subl %r12d, %r15d
pushq $0x1
popq %r13
movl %r13d, %esi
movq %rbp, (%rsp)
movq %rbx, %rbp
movslq %r15d, %rbx
leaq (,%rbx,8), %rdx
addq %rbp, %rdx
movl %r12d, %edi
movl %r14d, %ecx
movq (%rsp), %r8
callq 0x85b0
testl %ebx, %ebx
jle 0x85a1
movl %r12d, %edi
movl %r15d, %esi
movl %r13d, %edx
movq %rbp, %rcx
movl %r14d, %r8d
movq (%rsp), %r9
callq 0xb3a0
movl %eax, %esi
subl %r12d, %r15d
incl %r13d
jmp 0x855e
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 0x894b
leaq (%rcx,%rax,8), %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x91d9
leaq 0x100(%rbx), %rdi
addq $-0x100, %r15
movq %r15, %rsi
callq 0xba32
leaq 0x200(%rbx), %rdi
movq %r14, %rsi
callq 0x91d9
addq $0x300, %rbx            # imm = 0x300
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x91d9
movq %rbx, %rdi
movq %r14, %rsi
callq 0x9786
leaq 0x80(%rbx), %rdi
movq %r14, %rsi
callq 0xc26c
leaq 0x100(%rbx), %rdi
movq %r14, %rsi
callq 0x9786
addq $0x180, %rbx            # imm = 0x180
movq %rbx, %rdi
movq %r14, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0x9786
// File: /workspace/github_cpp_makefile_star2_O2/Sleepwalking[P]world-octave/fft.cpp
// Function: cftf040(double*)
void cftf040(double *a) {
  double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;

  x0r = a[0] + a[4];
  x0i = a[1] + a[5];
  x1r = a[0] - a[4];
  x1i = a[1] - a[5];
  x2r = a[2] + a[6];
  x2i = a[3] + a[7];
  x3r = a[2] - a[6];
  x3i = a[3] - a[7];
  a[0] = x0r + x2r;
  a[1] = x0i + x2i;
  a[2] = x1r - x3i;
  a[3] = x1i + x3r;
  a[4] = x0r - x2r;
  a[5] = x0i - x2i;
  a[6] = x1r + x3i;
  a[7] = x1i - x3r;
}

// Assembly:
movupd (%rdi), %xmm0
movupd 0x10(%rdi), %xmm1
movupd 0x20(%rdi), %xmm2
movupd 0x30(%rdi), %xmm3
movapd %xmm0, %xmm4
addpd %xmm2, %xmm4
movapd %xmm1, %xmm5
addpd %xmm3, %xmm5
movapd %xmm4, %xmm6
addpd %xmm5, %xmm6
movupd %xmm6, (%rdi)
subpd %xmm2, %xmm0
subpd %xmm3, %xmm1
shufpd $0x1, %xmm1, %xmm1      # xmm1 = xmm1[1,0]
movapd %xmm0, %xmm2
subpd %xmm1, %xmm2
addpd %xmm0, %xmm1
movapd %xmm1, %xmm0
movsd %xmm2, %xmm0            # xmm0 = xmm2[0],xmm0[1]
movupd %xmm0, 0x10(%rdi)
subpd %xmm5, %xmm4
movupd %xmm4, 0x20(%rdi)
shufpd $0x2, %xmm2, %xmm1      # xmm1 = xmm1[0],xmm2[1]
movupd %xmm1, 0x30(%rdi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq %r9, %rbx
movl %r8d, %r14d
movq %rcx, %r15
movl %edx, %r13d
movl %esi, %r12d
movl %edi, %ebp
testb $0x3, %r13b
je 0xb3f6
subl %ebp, %r12d
movslq %r12d, %rax
leaq (%r15,%rax,8), %rsi
testb $0x1, %r13b
jne 0xb45b
subl %ebp, %r14d
movslq %r14d, %rax
leaq (%rbx,%rax,8), %rdx
movl %ebp, %edi
callq 0xb486
xorl %r13d, %r13d
jmp 0xb474
shll $0x2, %ebp
sarl $0x2, %r13d
testb $0x3, %r13b
je 0xb3ef
andl $0x1, %r13d
jne 0xb42c
cmpl $0x81, %ebp
jl 0xb3e7
movl %r12d, %eax
subl %ebp, %eax
cltq
leaq (%r15,%rax,8), %rsi
movl %r14d, %eax
subl %ebp, %eax
cltq
leaq (%rbx,%rax,8), %rdx
movl %ebp, %edi
callq 0xb486
shrl $0x2, %ebp
jmp 0xb402
cmpl $0x81, %ebp
jl 0xb474
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
leaq (%rbx,%rax,8), %rdx
movl %ebp, %edi
callq 0xb020
shrl $0x2, %ebp
jmp 0xb42c
movl %ebp, %eax
sarl %eax
subl %eax, %r14d
movslq %r14d, %rax
leaq (%rbx,%rax,8), %rdx
movl %ebp, %edi
callq 0xb020
pushq $0x1
popq %r13
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_O2/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 %edx, %r8d
movl %edx, %eax
cltd
idivl %edi
movslq %edi, %rdx
movl %edi, %r9d
sarl %r9d
movslq %eax, %r10
movslq %r8d, %rdi
movslq %r9d, %rax
decq %rdx
shlq $0x3, %rdi
leaq (,%r10,8), %r8
subq %r8, %rdi
addq %rcx, %rdi
movq %r8, %r9
negq %r9
leaq (%rcx,%r10,8), %r10
pushq $0x1
popq %r11
cmpq %rax, %r11
jge 0xc5c6
movsd (%r10), %xmm0
movsd (%rdi), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd %xmm1, %xmm0
movsd (%rsi,%r11,8), %xmm1
movsd (%rsi,%rdx,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, (%rsi,%r11,8)
movsd %xmm4, (%rsi,%rdx,8)
incq %r11
decq %rdx
addq %r9, %rdi
addq %r8, %r10
jmp 0xc56c
movsd (%rcx), %xmm0
mulsd (%rsi,%rax,8), %xmm0
movsd %xmm0, (%rsi,%rax,8)
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %edx, %r8d
movl %edx, %eax
cltd
idivl %edi
movslq %edi, %rdx
movl %edi, %r9d
sarl %r9d
movslq %eax, %r10
movslq %r8d, %rdi
movslq %r9d, %rax
decq %rdx
shlq $0x3, %rdi
leaq (,%r10,8), %r8
subq %r8, %rdi
addq %rcx, %rdi
movq %r8, %r9
negq %r9
leaq (%rcx,%r10,8), %r10
pushq $0x1
popq %r11
cmpq %rax, %r11
jge 0xc66c
movsd (%r10), %xmm0
movsd (%rdi), %xmm1
movapd %xmm0, %xmm2
subsd %xmm1, %xmm2
addsd %xmm1, %xmm0
movsd (%rsi,%rdx,8), %xmm1
movsd (%rsi,%r11,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, (%rsi,%rdx,8)
movsd %xmm4, (%rsi,%r11,8)
incq %r11
decq %rdx
addq %r9, %rdi
addq %r8, %r10
jmp 0xc612
movsd (%rcx), %xmm0
mulsd (%rsi,%rax,8), %xmm0
movsd %xmm0, (%rsi,%rax,8)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/Sleepwalking[P]world-octave/test.cpp
// Function: timeGetTime()
DWORD timeGetTime() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  DWORD ret = static_cast<DWORD>(tv.tv_usec / 1000 + tv.tv_sec * 1000);
  return ret;
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rsp, %rbx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x1160
movq 0x8(%rbx), %rax
movl $0x3e8, %ecx            # imm = 0x3E8
cqto
idivq %rcx
imull $0x3e8, (%rbx), %ecx    # imm = 0x3E8
addl %ecx, %eax
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
jne 0x2601
movq %rsi, %r14
pushq $0x20
popq %rdi
callq 0x2230
movq %rax, %rbx
movq 0x8(%r14), %rsi
movq %rax, %rdi
callq 0x4770
jmp 0x261b
cmpl $0x1, %edi
jne 0x2640
pushq $0x20
popq %rdi
callq 0x2230
movq %rax, %rbx
movq %rax, %rdi
xorl %esi, %esi
callq 0x4770
movq %rbx, %rdi
callq 0x4f2a
movq %rbx, %rdi
callq 0x5d58
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x2240
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x6989(%rip), %rdi      # 0x8fd0
leaq 0x39b6(%rip), %rsi      # 0x6004
callq 0x2210
jmp 0x2655
movq %rax, %r14
pushq $0x20
popq %rsi
movq %rbx, %rdi
callq 0x2240
movq %r14, %rdi
callq 0x23d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x39ad(%rip), %rsi      # 0x6030
callq 0x2280
movq %rax, 0x20(%rbx)
pushq $-0x1
popq %rbp
testq %rax, %rax
je 0x2760
pushq $0x10
popq %rdi
callq 0x2230
xorps %xmm0, %xmm0
movaps %xmm0, (%rax)
movq %rax, 0x58(%rbx)
movq %rbx, %rdi
movq %rax, %rsi
callq 0x276e
movq 0x58(%rbx), %rax
movl $0xffffbfff, %ecx       # imm = 0xFFFFBFFF
addl (%rax), %ecx
cmpl $0xffffdfff, %ecx       # imm = 0xFFFFDFFF
jb 0x2760
movl $0xfcdfffff, %ecx       # imm = 0xFCDFFFFF
addl 0x4(%rax), %ecx
cmpl $0xfd2fffff, %ecx       # imm = 0xFD2FFFFF
jb 0x2760
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
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
pushq $-0x1
popq %rdi
cmovnsq %rcx, %rdi
callq 0x2040
movq %rax, 0x38(%rbx)
leaq 0x40(%rbx), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4332
movq 0x38(%rbx), %rsi
movq 0x58(%rbx), %rax
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x279e
movq 0x58(%rbx), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x27e2
movq %rbx, %rdi
callq 0x2878
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::readFAT(int*, int)
void FileSys::readFAT(int *fat, int cluster) {
	int offset =  boot->clusterSize * cluster;
	if (offset < boot->size) {
		fseek(file, offset, SEEK_SET);
		fread(fat, numClusters * sizeof(int), 1, file);
	}
}

// Assembly:
movq 0x58(%rdi), %rax
imull (%rax), %edx
cmpl 0x4(%rax), %edx
jae 0x27e0
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movslq %edx, %rsi
xorl %edx, %edx
callq 0x2260
movslq 0x30(%r14), %rsi
shlq $0x2, %rsi
movq 0x20(%r14), %rcx
pushq $0x1
popq %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2320
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x4332
movslq %ebp, %rbp
movq %rbp, %rsi
imulq %r15, %rsi
movq 0x20(%r14), %rdi
xorl %edx, %edx
callq 0x2260
movslq 0x2c(%r14), %rdx
movslq %r13d, %rdi
imulq %rdx, %rdi
shlq $0x7, %rdi
addq (%rbx), %rdi
movq 0x20(%r14), %rcx
movl $0x80, %esi
callq 0x2320
movq 0x38(%r14), %rax
movl (%rax,%rbp,4), %ebp
movl %r12d, %r13d
cmpl $0xffff, %ebp           # imm = 0xFFFF
jne 0x27ff
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_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::createFileSys(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int)
int FileSys::createFileSys(string name, int fSize, int cSize) {
	int ret = -1;
	int i;

	file = fopen(name.c_str(), "w+");
	if (file != NULL) {
		boot = new BootRecord();
		boot->clusterSize = cSize * 1024;
		boot->size = fSize * 1024 * 1024;
		boot->FAT = 1;
		boot->rootDir = 2;
		
		sysName = name;
		entriesPerTable = (boot->clusterSize)/DT_ENTRY_SIZE;
		numClusters = (boot->size)/(boot->clusterSize);
		fileAllocationTable = new int[numClusters];

		fileAllocationTable[0] = 0xFFFF;
		fileAllocationTable[1] = 0xFFFF;
		fileAllocationTable[2] = 0xFFFF;
		for (i = 3; i < numClusters; i++) {
			fileAllocationTable[i] = 0x0000;
		}
		directoryTable.resize(entriesPerTable);
		for (i = 0; i < entriesPerTable; i++) {
			directoryTable[i].name[0] = 0x00;
		}

		writeBootRecord(boot);
		writeFAT(fileAllocationTable, boot->FAT);
		writeDirectoryTable(&directoryTable, boot->rootDir);

		findUsedClusterCount();

		cout << "ls" << endl;

		printDirectoryTable(directoryTable);

		ret = 0;
	}
	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
movl %ecx, %r15d
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rdi
leaq 0x3790(%rip), %rsi      # 0x6033
callq 0x2280
movq %rax, 0x20(%rbx)
testq %rax, %rax
je 0x29e7
pushq $0x10
popq %rdi
callq 0x2230
movq %rax, 0x58(%rbx)
shll $0xa, %r15d
movl %r15d, (%rax)
shll $0x14, %ebp
movl %ebp, 0x4(%rax)
movabsq $0x100000002, %rcx      # imm = 0x100000002
movq %rcx, 0x8(%rax)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2140
movq 0x58(%rbx), %rax
movl (%rax), %ecx
movl %ecx, %r15d
shrl $0x7, %r15d
movl %r15d, 0x2c(%rbx)
movl 0x4(%rax), %eax
xorl %edx, %edx
divl %ecx
movl %eax, 0x30(%rbx)
movslq %eax, %r14
leaq (,%r14,4), %rax
testl %r14d, %r14d
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2040
movq %rax, 0x38(%rbx)
movabsq $0xffff0000ffff, %rcx   # imm = 0xFFFF0000FFFF
movq %rcx, (%rax)
movl $0xffff, 0x8(%rax)      # imm = 0xFFFF
pushq $0x3
popq %rcx
cmpq %r14, %rcx
jge 0x2945
andl $0x0, (%rax,%rcx,4)
incq %rcx
jmp 0x2937
leaq 0x40(%rbx), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x4332
xorl %eax, %eax
xorl %ecx, %ecx
movslq 0x2c(%rbx), %rdx
cmpq %rdx, %rcx
jge 0x2971
movq (%r14), %rdx
movb $0x0, (%rdx,%rax)
incq %rcx
subq $-0x80, %rax
jmp 0x2958
movq 0x58(%rbx), %rsi
movq %rbx, %rdi
callq 0x2a08
movq 0x38(%rbx), %rsi
movq 0x58(%rbx), %rax
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x2a38
movq 0x58(%rbx), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a7c
movq %rbx, %rdi
callq 0x2aea
movq 0x661f(%rip), %rdi      # 0x8fd0
leaq 0x367e(%rip), %rsi      # 0x6036
callq 0x2210
movq %rax, %rdi
callq 0x2110
movq %rsp, %rbx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x4366
movq %rbx, %rsi
callq 0x2b14
movq %rsp, %rdi
callq 0x4686
xorl %eax, %eax
jmp 0x29ea
pushq $-0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4686
movq %rbx, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O2/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 0x2a7a
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x20(%rdi), %rdi
movslq %edx, %rsi
xorl %edx, %edx
callq 0x2260
movslq 0x30(%r14), %rsi
shlq $0x2, %rsi
movq 0x20(%r14), %rcx
pushq $0x1
popq %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x2420
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::writeDirectoryTable(std::vector<DirectoryTableEntry, std::allocator<DirectoryTableEntry>>*, int)
void FileSys::writeDirectoryTable(vector<DirectoryTableEntry> *table, int cluster) {
	int offset;
	int i = 0;
	int j = 0;
	int clusterSize = boot->clusterSize;

	do {
		offset =  clusterSize * cluster;
		fseek(file, offset, SEEK_SET);

		fwrite(&((*table)[i * entriesPerTable]), 128, entriesPerTable, file);
		cluster = fileAllocationTable[cluster];
		i++;
	} while(cluster != 0xFFFF);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0x58(%rdi), %rax
movslq (%rax), %r15
xorl %r12d, %r12d
movslq %edx, %r13
movq %r13, %rsi
imulq %r15, %rsi
movq 0x20(%r14), %rdi
xorl %edx, %edx
callq 0x2260
movslq 0x2c(%r14), %rdx
movslq %r12d, %r12
movq %rdx, %rdi
imulq %r12, %rdi
shlq $0x7, %rdi
addq (%rbx), %rdi
movq 0x20(%r14), %rcx
movl $0x80, %esi
callq 0x2420
movq 0x38(%r14), %rax
movl (%rax,%r13,4), %edx
incl %r12d
cmpl $0xffff, %edx           # imm = 0xFFFF
jne 0x2a95
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/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:
andl $0x0, 0x28(%rdi)
movl 0x30(%rdi), %ecx
movq 0x38(%rdi), %rdx
xorl %esi, %esi
testl %ecx, %ecx
cmovlel %esi, %ecx
xorl %eax, %eax
cmpq %rsi, %rcx
je 0x2b13
cmpl $0x0, (%rdx,%rsi,4)
je 0x2b0e
incl %eax
movl %eax, 0x28(%rdi)
incq %rsi
jmp 0x2afe
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
sarq $0x7, %rdx
xorl %eax, %eax
subq $0x1, %rdx
jb 0x2e99
movb (%rcx), %sil
decb %sil
cmpb $-0x2, %sil
adcl $0x0, %eax
subq $-0x80, %rcx
jmp 0x2e80
retq
// File: /workspace/github_cpp_makefile_star2_O2/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
movq 0x38(%rdi), %rdx
movl $0xffff, %eax           # imm = 0xFFFF
pushq $0x1
popq %rsi
cmpl $0xffff, %eax           # imm = 0xFFFF
jne 0x2ec7
cmpq %rcx, %rsi
jge 0x2ec7
cmpl $0x0, (%rdx,%rsi,4)
movl $0xffff, %eax           # imm = 0xFFFF
cmovel %esi, %eax
incq %rsi
jmp 0x2eaa
retq
// File: /workspace/github_cpp_makefile_star2_O2/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 %rdi, %r14
pushq $-0x1
popq %rbp
xorl %r15d, %r15d
xorl %r12d, %r12d
movl %ebp, %eax
cmpl $-0x1, %eax
jne 0x2f19
movq 0x40(%r14), %rdi
movq 0x48(%r14), %rcx
subq %rdi, %rcx
sarq $0x7, %rcx
cmpq %r12, %rcx
jbe 0x2f19
addq %r15, %rdi
movq %rbx, %rsi
callq 0x43b3
movl %eax, %ecx
movl %r12d, %eax
testb %cl, %cl
jne 0x2f10
movl %ebp, %eax
incq %r12
subq $-0x80, %r15
jmp 0x2ee1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::removeFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int FileSys::removeFile(string name) {
	int ret = 0;
	int i;
	int cluster;
	int oldCluster;
	int index = -1;
	for (i = directoryTable.size()-1; i >= 0 && (name == "*" || index == -1); i--) {
		if (directoryTable[i].name == name ||
			(name == "*" && (directoryTable[i].name[0] != (char)0x00 
					&& directoryTable[i].name[0] != (char)0xFF))) {
			index = i;
			if (removeFile(index) == -1) {
				ret = -1;
			}
		}
	}

	return 0;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x48(%rdi), %rax
subq 0x40(%rdi), %rax
shrq $0x7, %rax
movl %eax, %r15d
pushq $-0x1
popq %rbp
leaq 0x260f(%rip), %r12      # 0x603b
decq %r15
testl %r15d, %r15d
js 0x3a9c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x43fc
testb %al, %al
jne 0x3a48
cmpl $-0x1, %ebp
jne 0x3a9c
movl %r15d, %r13d
andl $0x7fffffff, %r13d      # imm = 0x7FFFFFFF
shlq $0x7, %r13
movq 0x40(%r14), %rdi
addq %r13, %rdi
movq %rbx, %rsi
callq 0x43b3
testb %al, %al
jne 0x3a8c
movq %rbx, %rdi
movq %r12, %rsi
callq 0x43fc
testb %al, %al
je 0x3a2c
movq 0x40(%r14), %rax
movzbl (%rax,%r13), %eax
cmpl $0xff, %eax
je 0x3a2c
testl %eax, %eax
je 0x3a2c
movq %r14, %rdi
movl %r15d, %esi
callq 0x3aae
movl %r15d, %ebp
jmp 0x3a2c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/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 0x3b26
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
leaq 0x40(%rdi), %r14
movslq %esi, %rcx
movq 0x40(%rdi), %rax
shlq $0x7, %rcx
movb $-0x1, (%rax,%rcx)
movq 0x38(%rdi), %rax
movq 0x40(%rdi), %rdx
leaq (%rdx,%rcx), %rsi
movl 0x70(%rdx,%rcx), %ecx
movslq %ecx, %rdx
movl (%rax,%rdx,4), %ecx
andl $0x0, (%rax,%rdx,4)
cmpl $0xffff, %ecx           # imm = 0xFFFF
jne 0x3add
movq %r14, %rdi
callq 0x440a
movq 0x38(%rbx), %rsi
movq 0x58(%rbx), %rax
movl 0xc(%rax), %edx
movq %rbx, %rdi
callq 0x2a38
movq 0x58(%rbx), %rax
movl 0x8(%rax), %edx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2a7c
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
pushq $-0x1
popq %rax
retq
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::moveFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, bool, bool)
int FileSys::moveFile(string source, string dest, 
						bool sourceInFileSys, bool destInFileSys) {
	int ret = -1;
	if (source != dest) {
		ret = copyFile(source, dest, sourceInFileSys, destInFileSys);
		if (ret >= 0) {
			if (sourceInFileSys) {
				ret = removeFile(source);
			} else {
				ret = remove(source.c_str());
			}
		}
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %r8d, %r12d
movl %ecx, %ebp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, %rdi
movq %rdx, %rsi
callq 0x43f2
testb %al, %al
je 0x3bde
leaq 0x28(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x22f0
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x22f0
movzbl %bpl, %ecx
movzbl %r12b, %r8d
leaq 0x28(%rsp), %r14
leaq 0x8(%rsp), %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3104
movl %eax, %r12d
leaq 0x8(%rsp), %rdi
callq 0x2100
leaq 0x28(%rsp), %rdi
callq 0x2100
testl %r12d, %r12d
js 0x3bef
testb %bpl, %bpl
je 0x3be4
leaq 0x48(%rsp), %r14
movq %r14, %rdi
movq %r15, %rsi
callq 0x22f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3a02
leaq 0x48(%rsp), %rdi
callq 0x2100
xorl %r12d, %r12d
jmp 0x3bef
pushq $-0x1
popq %r12
jmp 0x3bef
movq (%r15), %rdi
callq 0x23f0
movl %eax, %r12d
movl %r12d, %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3c12
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x2100
jmp 0x3c15
movq %rax, %rbx
movq %r14, %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x23d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::printFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int FileSys::printFile(string name) {
	int ret = -1;
	int index;
	int cluster;
	int leftOver;
	int offset;
	int clusterSize = boot->clusterSize;
	void *clusterData;

	index = findIndexForFile(name);
	if (index != -1) {
		clusterData = malloc(clusterSize);
		cluster = directoryTable[index].index;
		leftOver = directoryTable[index].size % clusterSize;

		while (fileAllocationTable[cluster] != 0xFFFF) {
			offset = clusterSize * cluster;
			fseek(file, offset, SEEK_SET);
			fread(clusterData, clusterSize, 1, file);
			cout << (char*)clusterData;
			cluster = fileAllocationTable[cluster];
		}
		offset = clusterSize * cluster;
		fseek(file, offset, SEEK_SET);
		while (leftOver > 0) {
			cout << (char)fgetc(file);
			leftOver--;
		}

		free(clusterData);
		ret = 0;
	}

	return ret;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movq 0x58(%rdi), %rax
movslq (%rax), %r15
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x22f0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2ec8
movl %eax, %ebp
movq %r14, %rdi
callq 0x2100
cmpl $-0x1, %ebp
je 0x3d2e
movq %r15, %rdi
callq 0x22e0
movq %rax, %r14
movslq %ebp, %rcx
movq 0x38(%rbx), %rax
movq 0x40(%rbx), %rdx
shlq $0x7, %rcx
addq %rdx, %rcx
addq $0x70, %rcx
movl 0x4(%rcx), %edx
movl %edx, 0x4(%rsp)
pushq $0x1
popq %r13
movq 0x5334(%rip), %rbp      # 0x8fd0
movslq (%rcx), %r12
cmpl $0xffff, (%rax,%r12,4)  # imm = 0xFFFF
je 0x3ce2
movq %r12, %rsi
imulq %r15, %rsi
movq 0x20(%rbx), %rdi
xorl %edx, %edx
callq 0x2260
movq 0x20(%rbx), %rcx
movq %r14, %rdi
movq %r15, %rsi
movq %r13, %rdx
callq 0x2320
movq %rbp, %rdi
movq %r14, %rsi
callq 0x2210
movq 0x38(%rbx), %rax
leaq (%rax,%r12,4), %rcx
jmp 0x3c9c
movl 0x4(%rsp), %eax
xorl %edx, %edx
divl %r15d
movl %edx, %ebp
imulq %r15, %r12
movq 0x20(%rbx), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x2260
movq 0x52ca(%rip), %r15      # 0x8fd0
testl %ebp, %ebp
jle 0x3d22
movq 0x20(%rbx), %rdi
callq 0x2370
movsbl %al, %esi
movq %r15, %rdi
callq 0x2270
decl %ebp
jmp 0x3d06
movq %r14, %rdi
callq 0x2290
xorl %eax, %eax
jmp 0x3d31
pushq $-0x1
popq %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/FileSys.cpp
// Function: FileSys::printInfo(int, std::vector<DirectoryTableEntry, std::allocator<DirectoryTableEntry>>*)
void FileSys::printInfo(int width, vector<DirectoryTableEntry> *table) {
	printFAT(width);
	showStructure();
	if (table != NULL) {
		printDirectoryTable(*table);
	}
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rdi, %r14
callq 0x40b2
movq %r14, %rdi
callq 0x3d40
testq %rbx, %rbx
je 0x4097
movq %rsp, %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x4366
movq %r14, %rsi
callq 0x2b14
movq %rsp, %rdi
callq 0x4686
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x4686
movq %rbx, %rdi
callq 0x23d0
// File: /workspace/github_cpp_makefile_star2_O2/emr4378[P]FAT-File-System/Shell.cpp
// Function: Shell::prompt()
void Shell::prompt() {
	char input[256];
	do {
		cout << "os1shell->";
		cin.getline(input, 256);
		runCommand(input);
		
	} while (!cin.eof());
	cout << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdi, %rbx
leaq 0x12b6(%rip), %r15      # 0x61fb
movq 0x4094(%rip), %r12      # 0x8fe0
leaq 0x30(%rsp), %r13
leaq 0x10(%rsp), %rbp
leaq 0xf(%rsp), %r14
movq 0x406e(%rip), %rdi      # 0x8fd0
movq %r15, %rsi
callq 0x2210
movl $0x100, %edx            # imm = 0x100
movq %r12, %rdi
movq %r13, %rsi
callq 0x2090
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x4444
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x4fde
movq %rbp, %rdi
callq 0x2100
movq (%r12), %rax
movq -0x18(%rax), %rax
testb $0x2, 0x20(%r12,%rax)
je 0x4f5b
movq 0x401e(%rip), %rdi      # 0x8fd0
callq 0x2110
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x2100
movq %rbx, %rdi
callq 0x23d0