LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: ChristalC[P]Online-Outlier-Detection/thread_org.cpp
// Function: lof_thread_func(void*)
void* lof_thread_func(void* ws) {
  int ws_int = *(int*)ws;
  Lof lof_data(ws_int);
  
  list<vector<double>> new_points;

  while (true) {
    new_points.clear();
    // Wait for new point come to shared data
    pthread_mutex_lock(&lock);
    if (shared_data.empty()) {
      pthread_cond_wait(&has_new, &lock);
    }
    new_points.swap(shared_data);
    pthread_mutex_unlock(&lock);

    auto it = new_points.begin();
    for (; it != new_points.end(); it++) {
      vector<double> new_point_pos = *it;
      // Check if the first element of new_point_pos is -1
      // If yes, all data is processed, return the thread
      if (new_point_pos[0] == -1) {
        return NULL;
      }
      // Add the new point to all_points list
      lof_data.addPoint(new_point_pos);
    }
    
  }
  return NULL;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x14(%rbp), %esi
leaq -0x48(%rbp), %rdi
callq 0x5e70
leaq -0x60(%rbp), %rdi
callq 0xb850
jmp 0xb67f
leaq -0x60(%rbp), %rdi
callq 0xb990
leaq 0x8c29(%rip), %rdi      # 0x142b8
callq 0x33b0
leaq 0x8c45(%rip), %rdi      # 0x142e0
callq 0xb9c0
testb $0x1, %al
jne 0xb6a6
jmp 0xb6ce
leaq 0x8bdb(%rip), %rdi      # 0x14288
leaq 0x8c04(%rip), %rsi      # 0x142b8
callq 0x33d0
jmp 0xb6bb
jmp 0xb6ce
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb832
leaq -0x60(%rbp), %rdi
leaq 0x8c07(%rip), %rsi      # 0x142e0
callq 0xb9e0
leaq 0x8bd3(%rip), %rdi      # 0x142b8
callq 0x31e0
leaq -0x60(%rbp), %rdi
callq 0xba80
movq %rax, -0x78(%rbp)
leaq -0x60(%rbp), %rdi
callq 0xbae0
movq %rax, -0x80(%rbp)
leaq -0x78(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xbab0
testb $0x1, %al
jne 0xb71a
jmp 0xb80e
leaq -0x78(%rbp), %rdi
callq 0xbb10
movq %rax, %rsi
leaq -0x98(%rbp), %rdi
callq 0x6820
jmp 0xb734
leaq -0x98(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x41e0
movsd (%rax), %xmm0
movsd 0x19e0(%rip), %xmm1     # 0xd130
ucomisd %xmm1, %xmm0
jne 0xb76c
jp 0xb76c
movq $0x0, -0x8(%rbp)
movl $0x1, -0x9c(%rbp)
jmp 0xb7a9
leaq -0xb8(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x6820
jmp 0xb781
leaq -0x48(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x5f60
jmp 0xb793
leaq -0xb8(%rbp), %rdi
callq 0x3fa0
movl $0x0, -0x9c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x3fa0
movl -0x9c(%rbp), %eax
testl %eax, %eax
jne 0xb813
jmp 0xb7c1
jmp 0xb7c3
leaq -0x78(%rbp), %rdi
xorl %esi, %esi
callq 0xbb30
movq %rax, -0xc0(%rbp)
jmp 0xb6f7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xb800
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x3fa0
leaq -0x98(%rbp), %rdi
callq 0x3fa0
jmp 0xb832
jmp 0xb67d
leaq -0x60(%rbp), %rdi
callq 0xb870
leaq -0x48(%rbp), %rdi
callq 0x5ec0
movq -0x8(%rbp), %rax
addq $0xc0, %rsp
popq %rbp
retq
leaq -0x60(%rbp), %rdi
callq 0xb870
leaq -0x48(%rbp), %rdi
callq 0x5ec0
movq -0x68(%rbp), %rdi
callq 0x3450
nopl (%rax)
// File: ChristalC[P]Online-Outlier-Detection/p2.cpp
// Function: main
int main() {
  // Read input from stdin to get window size, host and port
  int ws;
  string host_str, port_str;

  if (!readInput(ws, host_str, port_str)) {
    cout << "Invalid Input. The program is ended!" << endl;
    exit(1);
  }

  const char* host = host_str.c_str();
  const char* port = port_str.c_str();

  thread_org_func(ws, host, port);

  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movl $0x0, -0x4(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0x80(%rbp)
callq 0x3370
leaq -0x48(%rbp), %rdi
movq %rdi, -0x78(%rbp)
callq 0x3370
movq -0x80(%rbp), %rsi
movq -0x78(%rbp), %rdx
leaq -0x8(%rbp), %rdi
callq 0x93e0
movb %al, -0x69(%rbp)
jmp 0xc6f2
movb -0x69(%rbp), %al
testb $0x1, %al
jne 0xc756
jmp 0xc6fb
movq 0x78c6(%rip), %rdi      # 0x13fc8
leaq 0xb56(%rip), %rsi       # 0xd25f
callq 0x3280
movq %rax, -0x88(%rbp)
jmp 0xc717
movq -0x88(%rbp), %rdi
movq 0x788b(%rip), %rsi      # 0x13fb0
callq 0x32d0
jmp 0xc72c
movl $0x1, %edi
callq 0x3300
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x31a0
leaq -0x28(%rbp), %rdi
callq 0x31a0
jmp 0xc7a7
leaq -0x28(%rbp), %rdi
callq 0x30f0
movq %rax, -0x60(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x30f0
movq %rax, -0x68(%rbp)
movl -0x8(%rbp), %edi
movq -0x60(%rbp), %rsi
movq -0x68(%rbp), %rdx
callq 0xaea0
jmp 0xc782
movl $0x0, -0x4(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x31a0
leaq -0x28(%rbp), %rdi
callq 0x31a0
movl -0x4(%rbp), %eax
addq $0x90, %rsp
popq %rbp
retq
movq -0x50(%rbp), %rdi
callq 0x3450
// File: bitwiseshiftleft[P]crandom/test_random.cpp
// Function: print_features(unsigned int)
void print_features(unsigned int features) {
  printf("   w/%s%s%s%s%s\n",
         (features) ? "" : "??",
         (features & SSE2)  ? " SSE2"  : "",
         (features & SSSE3) ? " SSSE3" : "",
         (features & AESNI) ? " AESNI" : "",
         (features & XOP)   ? " XOP"   : "");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl -0x4(%rbp), %ecx
leaq 0x5df0(%rip), %rsi      # 0x7055
leaq 0x5fee(%rip), %rax      # 0x725a
cmpl $0x0, %ecx
cmovneq %rax, %rsi
movl -0x4(%rbp), %ecx
andl $0x2, %ecx
leaq 0x5fda(%rip), %rdx      # 0x725a
leaq 0x5dd1(%rip), %rax      # 0x7058
cmpl $0x0, %ecx
cmovneq %rax, %rdx
movl -0x4(%rbp), %edi
andl $0x4, %edi
leaq 0x5fbf(%rip), %rcx      # 0x725a
leaq 0x5dbc(%rip), %rax      # 0x705e
cmpl $0x0, %edi
cmovneq %rax, %rcx
movl -0x4(%rbp), %edi
andl $0x8, %edi
leaq 0x5fa4(%rip), %r8       # 0x725a
leaq 0x5da8(%rip), %rax      # 0x7065
cmpl $0x0, %edi
cmovneq %rax, %r8
movl -0x4(%rbp), %edi
andl $0x10, %edi
leaq 0x5f89(%rip), %r9       # 0x725a
leaq 0x5d94(%rip), %rax      # 0x706c
cmpl $0x0, %edi
cmovneq %rax, %r9
leaq 0x5d5e(%rip), %rdi      # 0x7044
movb $0x0, %al
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: bitwiseshiftleft[P]crandom/test_random.cpp
// Function: test_rand(int)
void test_rand(int n) {
  int i;
  double start=now();
  for (i=0; i<n; i++) {
    rand();
  }
  start = now() - start;
  
  printf("%0.1f ME (%0.1f MB) / %0.3f sec = %0.1f MB/sec",
         i / 1000000.0,
         i * sizeof(int) / 1000000.0,
         start,
         i * sizeof(int) / 1000000.0 / start);
  printf("\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
callq 0x13d0
movsd %xmm0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1334
callq 0x1040
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x131c
callq 0x13d0
movsd -0x10(%rbp), %xmm1
subsd %xmm1, %xmm0
movsd %xmm0, -0x10(%rbp)
movslq -0x8(%rbp), %rax
movl %eax, %ecx
cvtsi2sd %ecx, %xmm0
movsd 0x5caf(%rip), %xmm2     # 0x7008
divsd %xmm2, %xmm0
shlq $0x2, %rax
movq %rax, %xmm3
movaps 0x5cb3(%rip), %xmm1     # 0x7020
punpckldq %xmm1, %xmm3    # xmm3 = xmm3[0],xmm1[0],xmm3[1],xmm1[1]
movapd 0x5cb7(%rip), %xmm1     # 0x7030
subpd %xmm1, %xmm3
movaps %xmm3, %xmm1
unpckhpd %xmm3, %xmm3            # xmm3 = xmm3[1,1]
addsd %xmm1, %xmm3
movaps %xmm3, %xmm1
divsd %xmm2, %xmm1
movsd -0x10(%rbp), %xmm2
movsd 0x5c6c(%rip), %xmm4     # 0x7008
divsd %xmm4, %xmm3
divsd -0x10(%rbp), %xmm3
leaq 0x5cc5(%rip), %rdi      # 0x7071
movb $0x4, %al
callq 0x1030
leaq 0x5e9e(%rip), %rdi      # 0x7258
movb $0x0, %al
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: bitwiseshiftleft[P]crandom/test_random.cpp
// Function: test_drand48(int)
void test_drand48(int n) {
  int i;
  double start=now();
  for (i=0; i<n; i++) {
    drand48();
  }
  start = now() - start;
  
  printf("%0.1f ME (%0.1f MB) / %0.3f sec = %0.1f MB/sec",
         i / 1000000.0,
         i * 6 / 1000000.0,
         start,
         i * 6 / 1000000.0 / start);
  printf("\n\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
callq 0x13d0
movsd %xmm0, -0x10(%rbp)
movl $0x0, -0x8(%rbp)
movl -0x8(%rbp), %eax
cmpl -0x4(%rbp), %eax
jge 0x1514
callq 0x10d0
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x14fc
callq 0x13d0
subsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x10(%rbp)
cvtsi2sdl -0x8(%rbp), %xmm0
movsd 0x5ad8(%rip), %xmm1     # 0x7008
divsd %xmm1, %xmm0
imull $0x6, -0x8(%rbp), %eax
cvtsi2sd %eax, %xmm1
movsd 0x5ac4(%rip), %xmm2     # 0x7008
divsd %xmm2, %xmm1
movsd -0x10(%rbp), %xmm2
imull $0x6, -0x8(%rbp), %eax
cvtsi2sd %eax, %xmm3
movsd 0x5aab(%rip), %xmm4     # 0x7008
divsd %xmm4, %xmm3
divsd -0x10(%rbp), %xmm3
leaq 0x5b04(%rip), %rdi      # 0x7071
movb $0x4, %al
callq 0x1030
leaq 0x5cdd(%rip), %rdi      # 0x7258
movb $0x0, %al
callq 0x1030
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: bitwiseshiftleft[P]crandom/./intrinsics.h
// Function: HAVE(unsigned int)
static inline int HAVE(unsigned int feature) {
  if (!MIGHT_HAVE(feature)) return 0;
  if (MUST_HAVE(feature))   return 1;
  if (unlikely(!crandom_features))
    crandom_features = crandom_detect_features();
  return likely((crandom_features & feature) == feature);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x8(%rbp)
movl -0x8(%rbp), %eax
andl $0x2, %eax
cmpl -0x8(%rbp), %eax
je 0x196f
movl $0x0, -0x4(%rbp)
jmp 0x19c2
movl -0x8(%rbp), %eax
andl $0x0, %eax
cmpl -0x8(%rbp), %eax
jne 0x1983
movl $0x1, -0x4(%rbp)
jmp 0x19c2
leaq 0x8b56(%rip), %rax      # 0xa4e0
cmpl $0x0, (%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x1998
jmp 0x19a8
callq 0x6890
movl %eax, %ecx
leaq 0x8b3a(%rip), %rax      # 0xa4e0
movl %ecx, (%rax)
leaq 0x8b31(%rip), %rax      # 0xa4e0
movl (%rax), %eax
andl -0x8(%rbp), %eax
cmpl -0x8(%rbp), %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: bitwiseshiftleft[P]crandom/./crandom.hpp
// Function: unsigned int crandom::generator_base::random<unsigned int>()
inline
  T random() {
    // T out; randomize(out); return out;
    //   Clang optimizes memcpy to a couple movs, but it still insists on
    //   copying through memory.  Therefore this is faster:
    if (unlikely(!fill)) refill();
    if (likely(fill >= sizeof(T))) {
      fill -= sizeof(T);
      T out = *(T*)(buffer+fill);
      bzero(buffer+fill, sizeof(T));
      return out;
    } else {
      T out;
      randomize_slow_case((unsigned char *)&out, sizeof(T));
      return out;
    }
  }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x0, 0x14(%rax)
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x2d03
jmp 0x2d0d
movq -0x20(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x20(%rbp), %rax
movl 0x14(%rax), %eax
cmpq $0x4, %rax
jb 0x2d53
movq -0x20(%rbp), %rax
movl 0x14(%rax), %ecx
subq $0x4, %rcx
movl %ecx, 0x14(%rax)
movq 0x18(%rax), %rcx
movl 0x14(%rax), %edx
movl (%rcx,%rdx), %ecx
movl %ecx, -0x14(%rbp)
movq 0x18(%rax), %rdi
movl 0x14(%rax), %eax
addq %rax, %rdi
xorl %esi, %esi
movl $0x4, %edx
callq 0x1090
movl -0x14(%rbp), %eax
movl %eax, -0x4(%rbp)
jmp 0x2d6b
movq -0x20(%rbp), %rdi
leaq -0x18(%rbp), %rsi
movl $0x4, %edx
callq 0x3490
movl -0x18(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: bitwiseshiftleft[P]crandom/crandom.cpp
// Function: crandom::generator_base::stir(unsigned char const*, unsigned long)
void generator_base::stir
(const unsigned char *entropy, size_t n) {
  unsigned char *k = key();
  size_t i;
  while (n > 0) {
    for (i=0; i<n && i<key_size; i++) {
      k[i] ^= entropy[i];
    }
    n -= i;
    entropy += i;
    refill();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x30(%rbp)
callq 0x2bd0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x33e9
movq $0x0, -0x28(%rbp)
movq -0x28(%rbp), %rcx
xorl %eax, %eax
cmpq -0x18(%rbp), %rcx
movb %al, -0x31(%rbp)
jae 0x338b
movq -0x30(%rbp), %rcx
movq -0x28(%rbp), %rax
movl 0xc(%rcx), %ecx
cmpq %rcx, %rax
setb %al
movb %al, -0x31(%rbp)
movb -0x31(%rbp), %al
testb $0x1, %al
jne 0x3394
jmp 0x33bf
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %esi
movq -0x20(%rbp), %rax
movq -0x28(%rbp), %rcx
movzbl (%rax,%rcx), %edx
xorl %esi, %edx
movb %dl, (%rax,%rcx)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0x3368
movq -0x30(%rbp), %rdi
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
subq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x28(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x3355
addq $0x40, %rsp
popq %rbp
retq
nop
// File: bitwiseshiftleft[P]crandom/crandom.cpp
// Function: crandom::generator_base::randomize_slow_case(unsigned char*, unsigned long)
void generator_base::randomize_slow_case
(unsigned char *output, size_t n) {
  while (n>0) {
    if (!fill) refill();
  
    size_t transfer = (n > fill) ? fill : n;
    
    fill -= transfer;
    n -= transfer;
    
    memcpy(output, buffer + fill, transfer);
    bzero(buffer + fill, transfer);
    
    output += transfer;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x18(%rbp)
jbe 0x3559
movq -0x28(%rbp), %rax
cmpl $0x0, 0x14(%rax)
jne 0x34cb
movq -0x28(%rbp), %rdi
movq (%rdi), %rax
callq *0x8(%rax)
movq -0x28(%rbp), %rcx
movq -0x18(%rbp), %rax
movl 0x14(%rcx), %ecx
cmpq %rcx, %rax
jbe 0x34e8
movq -0x28(%rbp), %rax
movl 0x14(%rax), %eax
movq %rax, -0x30(%rbp)
jmp 0x34f0
movq -0x18(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x28(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, -0x20(%rbp)
movq -0x20(%rbp), %rdx
movl 0x14(%rax), %ecx
subq %rdx, %rcx
movl %ecx, 0x14(%rax)
movq -0x20(%rbp), %rdx
movq -0x18(%rbp), %rcx
subq %rdx, %rcx
movq %rcx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq 0x18(%rax), %rsi
movl 0x14(%rax), %eax
addq %rax, %rsi
movq -0x20(%rbp), %rdx
callq 0x10c0
movq -0x28(%rbp), %rax
movq 0x18(%rax), %rdi
movl 0x14(%rax), %eax
addq %rax, %rdi
movq -0x20(%rbp), %rdx
xorl %esi, %esi
callq 0x1090
movq -0x20(%rbp), %rax
addq -0x10(%rbp), %rax
movq %rax, -0x10(%rbp)
jmp 0x34ac
addq $0x30, %rsp
popq %rbp
retq
nop
// File: bitwiseshiftleft[P]crandom/crandom.cpp
// Function: crandom::dev_random_handle::~dev_random_handle()
dev_random_handle::~dev_random_handle() {
  // FIXME it doesn't...
  if (!--(*ref)) {
    close(fd);
    delete ref;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x10(%rbp)
movq 0x8(%rax), %rcx
movl (%rcx), %eax
addl $-0x1, %eax
movl %eax, (%rcx)
cmpl $0x0, %eax
jne 0x3673
movq -0x10(%rbp), %rax
movl (%rax), %edi
callq 0x1140
jmp 0x3651
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, %rax
je 0x3671
movq -0x18(%rbp), %rdi
movl $0x4, %esi
callq 0x10f0
jmp 0x3673
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x4980
nopw %cs:(%rax,%rax)
// File: bitwiseshiftleft[P]crandom/crandom.cpp
// Function: signed char crandom::generator_base::random<signed char>(signed char, signed char)
T generator_base::random(T min, T max) {
  if (min > max) {
    // todo
    throw 0;
  } else {
    T mask = prec_mask(max-min), x;
    do {
      x = (random<T>() & mask) + min;
    } while (x < min || x > max);
    return x;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movb %dl, %al
movb %sil, %cl
movq %rdi, -0x8(%rbp)
movb %cl, -0x9(%rbp)
movb %al, -0xa(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movsbl -0x9(%rbp), %eax
movsbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
jle 0x37de
movl $0x4, %edi
callq 0x1070
movq %rax, %rdi
movl $0x0, (%rdi)
movq 0x67fb(%rip), %rsi      # 0x9fd0
xorl %eax, %eax
movl %eax, %edx
callq 0x1120
movsbl -0xa(%rbp), %edi
movsbl -0x9(%rbp), %eax
subl %eax, %edi
callq 0x3010
movb %al, -0xb(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3840
movsbl %al, %eax
movsbl -0xb(%rbp), %ecx
andl %ecx, %eax
movsbl -0x9(%rbp), %ecx
addl %ecx, %eax
movb %al, -0xc(%rbp)
movsbl -0xc(%rbp), %ecx
movsbl -0x9(%rbp), %edx
movb $0x1, %al
cmpl %edx, %ecx
movb %al, -0x19(%rbp)
jl 0x382c
movsbl -0xc(%rbp), %eax
movsbl -0xa(%rbp), %ecx
cmpl %ecx, %eax
setg %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x37f0
movb -0xc(%rbp), %al
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: bitwiseshiftleft[P]crandom/crandom.cpp
// Function: void crandom::generator_base::permutation<signed char>(signed char*, unsigned int)
void
generator_base::permutation(integer *elements, u_int32_t n) {
  u_int32_t i;
  for (i=0; i<n; i++) elements[i] = i;
  for (i=1; i<n; i++) {
    u_int32_t j = random<u_int32_t>(0,i);
    integer tmp = elements[i];
    elements[i] = elements[j];
    elements[j] = tmp;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x4444
movl -0x18(%rbp), %eax
movb %al, %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x4422
movl $0x1, -0x18(%rbp)
movl -0x18(%rbp), %eax
cmpl -0x14(%rbp), %eax
jae 0x449d
movq -0x28(%rbp), %rdi
movl -0x18(%rbp), %edx
xorl %esi, %esi
callq 0x3eb0
movl %eax, -0x1c(%rbp)
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movb (%rax,%rcx), %al
movb %al, -0x1d(%rbp)
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movl -0x18(%rbp), %ecx
movb %dl, (%rax,%rcx)
movb -0x1d(%rbp), %dl
movq -0x10(%rbp), %rax
movl -0x1c(%rbp), %ecx
movb %dl, (%rax,%rcx)
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x444b
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: bitwiseshiftleft[P]crandom/chacha.c
// Function: quarter_round
static inline void
quarter_round(u_int32_t *a, u_int32_t *b, u_int32_t *c, u_int32_t *d) {
  *a = *a + *b; *d = rotate(16, *d^*a);
  *c = *c + *d; *b = rotate(12, *b^*c);
  *a = *a + *b; *d = rotate(8,  *d^*a);
  *c = *c + *d; *b = rotate(7,  *b^*c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x28(%rbp)
movq %rsi, -0x30(%rbp)
movq %rdx, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x30(%rbp), %rax
addl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
xorl (%rcx), %eax
movl $0x10, -0x4(%rbp)
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl -0x4(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x50(%rbp)
movl -0x8(%rbp), %eax
movl $0x20, %ecx
subl -0x4(%rbp), %ecx
shrl %cl, %eax
movl -0x50(%rbp), %ecx
xorl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movl (%rax), %ecx
movq -0x40(%rbp), %rax
addl (%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
xorl (%rcx), %eax
movl $0xc, -0xc(%rbp)
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x4c(%rbp)
movl -0x10(%rbp), %eax
movl $0x20, %ecx
subl -0xc(%rbp), %ecx
shrl %cl, %eax
movl -0x4c(%rbp), %ecx
xorl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
movq -0x28(%rbp), %rax
movl (%rax), %ecx
movq -0x30(%rbp), %rax
addl (%rax), %ecx
movq -0x28(%rbp), %rax
movl %ecx, (%rax)
movq -0x40(%rbp), %rax
movl (%rax), %eax
movq -0x28(%rbp), %rcx
xorl (%rcx), %eax
movl $0x8, -0x14(%rbp)
movl %eax, -0x18(%rbp)
movl -0x18(%rbp), %eax
movl -0x14(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x48(%rbp)
movl -0x18(%rbp), %eax
movl $0x20, %ecx
subl -0x14(%rbp), %ecx
shrl %cl, %eax
movl -0x48(%rbp), %ecx
xorl %eax, %ecx
movq -0x40(%rbp), %rax
movl %ecx, (%rax)
movq -0x38(%rbp), %rax
movl (%rax), %ecx
movq -0x40(%rbp), %rax
addl (%rax), %ecx
movq -0x38(%rbp), %rax
movl %ecx, (%rax)
movq -0x30(%rbp), %rax
movl (%rax), %eax
movq -0x38(%rbp), %rcx
xorl (%rcx), %eax
movl $0x7, -0x1c(%rbp)
movl %eax, -0x20(%rbp)
movl -0x20(%rbp), %eax
movl -0x1c(%rbp), %ecx
shll %cl, %eax
movl %eax, -0x44(%rbp)
movl -0x20(%rbp), %eax
movl $0x20, %ecx
subl -0x1c(%rbp), %ecx
shrl %cl, %eax
movl -0x44(%rbp), %ecx
xorl %eax, %ecx
movq -0x30(%rbp), %rax
movl %ecx, (%rax)
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: bitwiseshiftleft[P]crandom/aes.c
// Function: T
static inline u_int32_t T(int table, u_int8_t x) {
  if (USE_SMALL_TABLES) {
    u_int32_t y = crandom_aes_tbox[x];
    if (table) {
      return rotate(32-8*table, y);
    } else {
      return y;
    }
  } else {
    return crandom_aes_tbox[table*256 + x];
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movb %sil, %al
movl %edi, -0x8(%rbp)
movb %al, -0x9(%rbp)
movzbl -0x9(%rbp), %eax
movl %eax, %ecx
leaq 0x3972(%rip), %rax      # 0xa0e0
movl (%rax,%rcx,4), %eax
movl %eax, -0x10(%rbp)
cmpl $0x0, -0x8(%rbp)
je 0x6794
movl -0x8(%rbp), %eax
shll $0x3, %eax
movl $0x20, %edi
subl %eax, %edi
movl -0x10(%rbp), %esi
callq 0x6860
movl %eax, -0x4(%rbp)
jmp 0x679a
movl -0x10(%rbp), %eax
movl %eax, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: bitwiseshiftleft[P]crandom/aes.c
// Function: fill_t_tables
static void
fill_t_tables() {
  int i,j;
  for (i=0; i<256; i++) {
    u_int32_t si = crandom_aes_sbox[i], dsi = (si<<1) ^ (si>>7)*283;
    u_int32_t tt = si * 0x10101ul ^ dsi * 0x1010000ul;
    for (j=0; j < (USE_SMALL_TABLES ? 1 : 4); j++, tt = tt<<24 ^ tt>>8)
      crandom_aes_tbox[j*256 + i] = tt;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movl $0x0, -0x4(%rbp)
cmpl $0x100, -0x4(%rbp)      # imm = 0x100
jge 0x685c
movslq -0x4(%rbp), %rcx
leaq 0xb2d(%rip), %rax       # 0x7300
movzbl (%rax,%rcx), %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
shll %eax
movl -0xc(%rbp), %ecx
shrl $0x7, %ecx
imull $0x11b, %ecx, %ecx      # imm = 0x11B
xorl %ecx, %eax
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
imulq $0x10101, %rax, %rax    # imm = 0x10101
movl -0x10(%rbp), %ecx
imulq $0x1010000, %rcx, %rcx  # imm = 0x1010000
xorq %rcx, %rax
movl %eax, -0x14(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x1, -0x8(%rbp)
jge 0x684c
movl -0x14(%rbp), %edx
movl -0x8(%rbp), %eax
shll $0x8, %eax
addl -0x4(%rbp), %eax
movslq %eax, %rcx
leaq 0x38b3(%rip), %rax      # 0xa0e0
movl %edx, (%rax,%rcx,4)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
movl -0x14(%rbp), %eax
shll $0x18, %eax
movl -0x14(%rbp), %ecx
shrl $0x8, %ecx
xorl %ecx, %eax
movl %eax, -0x14(%rbp)
jmp 0x6811
jmp 0x684e
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x67bb
popq %rbp
retq
nop
// File: bitwiseshiftleft[P]crandom/intrinsics.c
// Function: crandom_detect_features
unsigned int crandom_detect_features() {
  unsigned int out = GEN;
  
# if (defined(__i386__) || defined(__x86_64__))
    u_int32_t a,b,c,d;
    
    a=1; asm("cpuid" : "+a"(a), "=b"(b), "=c"(c), "=d"(d));
    out |= GEN;
    if (d & 1<<26) out |= SSE2;
    if (d & 1<< 9) out |= SSSE3;
    if (c & 1<<25) out |= AESNI;
    
    a=0x80000001; asm("cpuid" : "+a"(a), "=b"(b), "=c"(c), "=d"(d));
    if (c & 1<<11) out |= XOP;
# endif
  
  return out;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
movl $0x1, -0xc(%rbp)
movl $0x1, -0x10(%rbp)
movl -0x10(%rbp), %eax
cpuid
movl %eax, -0x10(%rbp)
movl %ebx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0xc(%rbp), %eax
orl $0x1, %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
andl $0x4000000, %eax        # imm = 0x4000000
cmpl $0x0, %eax
je 0x68d3
movl -0xc(%rbp), %eax
orl $0x2, %eax
movl %eax, -0xc(%rbp)
movl -0x1c(%rbp), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x68e9
movl -0xc(%rbp), %eax
orl $0x4, %eax
movl %eax, -0xc(%rbp)
movl -0x18(%rbp), %eax
andl $0x2000000, %eax        # imm = 0x2000000
cmpl $0x0, %eax
je 0x68ff
movl -0xc(%rbp), %eax
orl $0x8, %eax
movl %eax, -0xc(%rbp)
movl $0x80000001, -0x10(%rbp) # imm = 0x80000001
movl -0x10(%rbp), %eax
cpuid
movl %eax, -0x10(%rbp)
movl %ebx, -0x14(%rbp)
movl %ecx, -0x18(%rbp)
movl %edx, -0x1c(%rbp)
movl -0x18(%rbp), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x692d
movl -0xc(%rbp), %eax
orl $0x10, %eax
movl %eax, -0xc(%rbp)
movl -0xc(%rbp), %eax
popq %rbx
popq %rbp
retq
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: transferImap(unsigned int*)
void transferImap(block_num * imap_data)
{
    for(int i = 0; i < 256; i++)
    {
        if(imap_data[i] == 0) return;
        g_imap.list[g_imap.idx++] = imap_data[i];
       // cout << "imap_data: "<< i << " " << g_imap.list[g_imap.idx-1] << "\n";
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
cmpl $0x100, -0xc(%rbp)      # imm = 0x100
jge 0x373c
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
cmpl $0x0, (%rax,%rcx,4)
jne 0x3708
jmp 0x373c
movq -0x8(%rbp), %rax
movslq -0xc(%rbp), %rcx
movl (%rax,%rcx,4), %edx
movl 0x17804f(%rip), %eax    # 0x17b768
movl %eax, %ecx
addl $0x1, %ecx
movl %ecx, 0x178044(%rip)    # 0x17b768
movslq %eax, %rcx
leaq 0x16e03a(%rip), %rax    # 0x171768
movl %edx, (%rax,%rcx,4)
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0x36ef
popq %rbp
retq
nop
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: readImaps()
void readImaps()
{
    for(int i = 0; i < 40; i++)
    {
        if((Checkpoint_Region.imaps[i]) == 0){
            Checkpoint_Region_counter = i;
            break;

        }
        int block_number = Checkpoint_Region.imaps[i];
        int seg_idx = block_number/1024;
        int seg_block = block_number % 1024;

        if(seg_idx == current_segment){
            //cout << current_segment<< "\n";
            transferImap(wbuffer.getBlock(seg_block-1)->getBlockData());
        }else{
            string seg_path = "DRIVE/SEGMENT" + to_string(seg_idx+1);
            FILE * fp;
            fp = fopen(seg_path.c_str(),"r");
            block_num tmpB[BLOCK_SZ/4];
            fseek(fp, (BLOCK_SZ * (seg_block-1)), SEEK_SET);
            fread(tmpB, sizeof(block_num), BLOCK_SZ/4, fp);
            fclose(fp);
            transferImap(tmpB);
        } 
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x480, %rsp            # imm = 0x480
movl $0x0, -0x4(%rbp)
cmpl $0x28, -0x4(%rbp)
jge 0x38d4
movslq -0x4(%rbp), %rcx
leaq 0x16df3d(%rip), %rax    # 0x1716a4
cmpl $0x0, (%rax,%rcx,4)
jne 0x377b
movl -0x4(%rbp), %eax
movl %eax, 0x16dfee(%rip)    # 0x171764
jmp 0x38d4
movslq -0x4(%rbp), %rcx
leaq 0x16df1e(%rip), %rax    # 0x1716a4
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x109ae3(%rip), %eax    # 0x10d294
jne 0x37da
movl -0x10(%rbp), %esi
subl $0x1, %esi
leaq 0x177fb0(%rip), %rdi    # 0x17b770
callq 0x38f0
movq %rax, %rdi
callq 0x6980
movq %rax, %rdi
callq 0x36e0
jmp 0x38c4
movl -0xc(%rbp), %esi
incl %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x478(%rbp)
callq 0x69f0
movq -0x478(%rbp), %rdx
leaq 0x5807(%rip), %rsi      # 0x9004
leaq -0x30(%rbp), %rdi
callq 0x69a0
jmp 0x3808
leaq -0x50(%rbp), %rdi
callq 0x3170
leaq -0x30(%rbp), %rdi
callq 0x30e0
movq %rax, %rdi
leaq 0x57ee(%rip), %rsi      # 0x9012
callq 0x3290
movq %rax, -0x480(%rbp)
jmp 0x3832
movq -0x480(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rdi
movl -0x10(%rbp), %eax
shll $0xa, %eax
addl $0xfffffc00, %eax       # imm = 0xFFFFFC00
movslq %eax, %rsi
xorl %edx, %edx
callq 0x3280
jmp 0x3858
movq -0x68(%rbp), %rcx
leaq -0x470(%rbp), %rdi
movl $0x4, %esi
movl $0x100, %edx            # imm = 0x100
callq 0x3380
jmp 0x3874
movq -0x68(%rbp), %rdi
callq 0x3230
jmp 0x387f
leaq -0x470(%rbp), %rdi
callq 0x36e0
leaq -0x30(%rbp), %rdi
callq 0x3170
jmp 0x38c4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3170
jmp 0x38dd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x3170
jmp 0x38dd
jmp 0x38c6
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x3752
addq $0x480, %rsp            # imm = 0x480
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: writeImaps()
void writeImaps(){
    for(int i = 0; i < 10240; i+=(BLOCK_SZ/4))
    {
        if(g_imap.list[i] == 0) break;
        Block * imap_block = new Block(2);
        imap_block->addInodeData(i);
    } 
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movl $0x0, -0x4(%rbp)
cmpl $0x2800, -0x4(%rbp)     # imm = 0x2800
jge 0x3993
movslq -0x4(%rbp), %rcx
leaq 0x16de35(%rip), %rax    # 0x171768
cmpl $0x0, (%rax,%rcx,4)
jne 0x393b
jmp 0x3993
movl $0x1f10, %edi           # imm = 0x1F10
callq 0x3240
movq %rax, %rdi
movq %rdi, %rax
movq %rax, -0x28(%rbp)
movl $0x2, %esi
callq 0x6b10
jmp 0x395b
movq -0x28(%rbp), %rax
movq %rax, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movl -0x4(%rbp), %esi
callq 0x39b0
movl -0x4(%rbp), %eax
addl $0x100, %eax            # imm = 0x100
movl %eax, -0x4(%rbp)
jmp 0x391f
movq -0x28(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x18(%rbp)
movl %eax, -0x1c(%rbp)
callq 0x3200
jmp 0x3999
addq $0x30, %rsp
popq %rbp
retq
movq -0x18(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
// File: jasperandrew[P]cs350-project2/./classes.cpp
// Function: Block::addInodeData(int)
void Block::addInodeData(int start_index)
{
    int iter = start_index;
    for(; iter < start_index+256; iter++)
    {
        if(g_imap.list[iter] == 0) break;
        block_data[iter-start_index] = g_imap.list[iter];
        cout <<"input value: " <<g_imap.list[iter] << "\n";
    }
    wbuffer.addBlock(this);
    addToCheckpointRegion();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movl -0xc(%rbp), %eax
movl %eax, -0x10(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
addl $0x100, %ecx            # imm = 0x100
cmpl %ecx, %eax
jge 0x3a58
movslq -0x10(%rbp), %rcx
leaq 0x16dd80(%rip), %rax    # 0x171768
cmpl $0x0, (%rax,%rcx,4)
jne 0x39f0
jmp 0x3a58
movq -0x18(%rbp), %rax
movslq -0x10(%rbp), %rdx
leaq 0x16dd69(%rip), %rcx    # 0x171768
movl (%rcx,%rdx,4), %edx
movl -0x10(%rbp), %ecx
subl -0xc(%rbp), %ecx
movslq %ecx, %rcx
movl %edx, 0x708(%rax,%rcx,4)
movq 0x95af(%rip), %rdi      # 0xcfc8
leaq 0x57cb(%rip), %rsi      # 0x91eb
callq 0x3220
movq %rax, %rdi
movslq -0x10(%rbp), %rcx
leaq 0x16dd35(%rip), %rax    # 0x171768
movl (%rax,%rcx,4), %esi
callq 0x3410
movq %rax, %rdi
leaq 0x5907(%rip), %rsi      # 0x934c
callq 0x3220
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x39cd
movq -0x18(%rbp), %rsi
leaq 0x177d0d(%rip), %rdi    # 0x17b770
callq 0x4a60
movq -0x18(%rbp), %rdi
callq 0x5d50
addq $0x20, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: writeCheckpoint()
void writeCheckpoint()
{
    writeImaps();
    FILE * checkpoint_file;
    Checkpoint_Region.liveBits[current_segment] = 1;
    checkpoint_file =  fopen("DRIVE/CHECKPOINT_REGION", "w");
    if(checkpoint_file != NULL)
    {
        fwrite(&Checkpoint_Region,sizeof(Checkpoint_Region), 1, checkpoint_file);
        fclose(checkpoint_file);
    }
    else perror("File Open Failed: ");
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
callq 0x3910
movslq 0x109660(%rip), %rcx    # 0x10d294
leaq 0x16da69(%rip), %rax    # 0x1716a4
movb $0x1, 0xa0(%rax,%rcx)
leaq 0x53ca(%rip), %rdi      # 0x9014
leaq 0x53f0(%rip), %rsi      # 0x9041
callq 0x3290
movq %rax, -0x8(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x3c86
movq -0x8(%rbp), %rcx
leaq 0x16da38(%rip), %rdi    # 0x1716a4
movl $0xc0, %esi
movl $0x1, %edx
callq 0x3490
movq -0x8(%rbp), %rdi
callq 0x3230
jmp 0x3c92
leaq 0x53b6(%rip), %rdi      # 0x9043
callq 0x31d0
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: lookForFreeSpots(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void lookForFreeSpots(string lfs_filename)
{
    bool found = false;
    for(int i = 0; i < 10240; i++)
    {
        if(g_imap.list[i] == UINT_MAX)
        {
            g_filemap[g_filemap_ctr].num = i;
            g_filemap[g_filemap_ctr].name = lfs_filename;
						g_filemap_ctr++;
						
            g_imap.list[i] = BLOCK_SZ * current_segment + wbuffer.getNumBlocks();
            found = true;
        }
    }
    if(!found) cout << "YER OUTTER SPACE!\n";
    return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x18(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movl $0x0, -0x10(%rbp)
cmpl $0x2800, -0x10(%rbp)    # imm = 0x2800
jge 0x3d63
movslq -0x10(%rbp), %rcx
leaq 0x16da95(%rip), %rax    # 0x171768
cmpl $-0x1, (%rax,%rcx,4)
jne 0x3d53
movq -0x18(%rbp), %rsi
movl -0x10(%rbp), %ecx
movslq 0x16d9b9(%rip), %rdx    # 0x1716a0
leaq 0x1099b2(%rip), %rax    # 0x10d6a0
imulq $0x28, %rdx, %rdx
addq %rdx, %rax
movl %ecx, (%rax)
movslq 0x16d9a2(%rip), %rax    # 0x1716a0
leaq 0x10999b(%rip), %rdi    # 0x10d6a0
imulq $0x28, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
callq 0x3030
movl 0x16d985(%rip), %eax    # 0x1716a0
addl $0x1, %eax
movl %eax, 0x16d97c(%rip)    # 0x1716a0
movl 0x10956a(%rip), %eax    # 0x10d294
shll $0xa, %eax
movl %eax, -0x1c(%rbp)
leaq 0x177a39(%rip), %rdi    # 0x17b770
callq 0x3d90
movl -0x1c(%rbp), %edx
addl %eax, %edx
movslq -0x10(%rbp), %rcx
leaq 0x16da1c(%rip), %rax    # 0x171768
movl %edx, (%rax,%rcx,4)
movb $0x1, -0x9(%rbp)
jmp 0x3d55
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x3cbb
testb $0x1, -0x9(%rbp)
jne 0x3d7c
movq 0x9258(%rip), %rdi      # 0xcfc8
leaq 0x52df(%rip), %rsi      # 0x9056
callq 0x3220
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: readFileMap()
void readFileMap()
{
	ifstream filemap("DRIVE/FILE_MAP", ios::in);
	if(DBG) cout << "Reading from FILE_MAP\n";
	g_filemap_ctr = 0;
	string line;
	while(getline(filemap,line))
	{
		stringstream s(line);
		s >> g_filemap[g_filemap_ctr].num >> g_filemap[g_filemap_ctr].name;
		g_filemap_ctr++;
	}
	filemap.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x3e0, %rsp            # imm = 0x3E0
leaq 0x52a7(%rip), %rsi      # 0x9069
leaq -0x208(%rbp), %rdi
movl $0x8, %edx
callq 0x3450
movq 0x91ee(%rip), %rdi      # 0xcfc8
leaq 0x5297(%rip), %rsi      # 0x9078
callq 0x3220
jmp 0x3de8
movl $0x0, 0x16d8ae(%rip)    # 0x1716a0
leaq -0x238(%rbp), %rdi
callq 0x3330
leaq -0x208(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x3060
movq %rax, -0x3c8(%rbp)
jmp 0x3e1a
movq -0x3c8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x32c0
movb %al, -0x3c9(%rbp)
jmp 0x3e38
movb -0x3c9(%rbp), %al
testb $0x1, %al
jne 0x3e47
jmp 0x3f31
movl $0x10, %edi
movl $0x8, %esi
callq 0x6c00
movl %eax, -0x3d0(%rbp)
jmp 0x3e5e
movl -0x3d0(%rbp), %edx
leaq -0x3c0(%rbp), %rdi
leaq -0x238(%rbp), %rsi
callq 0x33b0
jmp 0x3e79
movslq 0x16d820(%rip), %rax    # 0x1716a0
leaq (%rax,%rax,4), %rcx
leaq 0x109815(%rip), %rax    # 0x10d6a0
leaq (%rax,%rcx,8), %rsi
leaq -0x3c0(%rbp), %rdi
callq 0x3160
movq %rax, -0x3d8(%rbp)
jmp 0x3ea4
movq -0x3d8(%rbp), %rdi
movslq 0x16d7ee(%rip), %rax    # 0x1716a0
leaq (%rax,%rax,4), %rcx
leaq 0x1097e3(%rip), %rax    # 0x10d6a0
leaq 0x8(%rax,%rcx,8), %rsi
callq 0x32f0
jmp 0x3ec9
movl 0x16d7d1(%rip), %eax    # 0x1716a0
addl $0x1, %eax
movl %eax, 0x16d7c8(%rip)    # 0x1716a0
leaq -0x3c0(%rbp), %rdi
callq 0x31a0
jmp 0x3dfe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0x3f6c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
jmp 0x3f60
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x210(%rbp)
movl %eax, -0x214(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x31a0
jmp 0x3f60
leaq -0x208(%rbp), %rdi
callq 0x3070
jmp 0x3f3f
leaq -0x238(%rbp), %rdi
callq 0x3170
leaq -0x208(%rbp), %rdi
callq 0x3090
addq $0x3e0, %rsp            # imm = 0x3E0
popq %rbp
retq
leaq -0x238(%rbp), %rdi
callq 0x3170
leaq -0x208(%rbp), %rdi
callq 0x3090
movq -0x210(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: writeFileMap()
void writeFileMap()
{
	ofstream filemap("DRIVE/FILE_MAP", ios::out);
	if(DBG) cout << "Writing to FILE_MAP\n";
	for(int i = 0; i < g_filemap_ctr; i++){
		filemap << g_filemap[i].num << "\t" << g_filemap[i].name << "\n";
	} 
	filemap.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x230, %rsp            # imm = 0x230
leaq 0x50c7(%rip), %rsi      # 0x9069
leaq -0x200(%rbp), %rdi
movl $0x10, %edx
callq 0x3270
movq 0x900e(%rip), %rdi      # 0xcfc8
leaq 0x50ce(%rip), %rsi      # 0x908f
callq 0x3220
jmp 0x3fc8
movl $0x0, -0x210(%rbp)
movl -0x210(%rbp), %eax
cmpl 0x16d6c2(%rip), %eax    # 0x1716a0
jge 0x40a1
movslq -0x210(%rbp), %rax
leaq (%rax,%rax,4), %rcx
leaq 0x1096aa(%rip), %rax    # 0x10d6a0
movl (%rax,%rcx,8), %esi
leaq -0x200(%rbp), %rdi
callq 0x3410
movq %rax, -0x218(%rbp)
jmp 0x400e
movq -0x218(%rbp), %rdi
leaq 0x5088(%rip), %rsi      # 0x90a4
callq 0x3220
movq %rax, -0x220(%rbp)
jmp 0x402a
movq -0x220(%rbp), %rdi
movslq -0x210(%rbp), %rax
leaq (%rax,%rax,4), %rcx
leaq 0x10965d(%rip), %rax    # 0x10d6a0
leaq 0x8(%rax,%rcx,8), %rsi
callq 0x31f0
movq %rax, -0x228(%rbp)
jmp 0x4056
movq -0x228(%rbp), %rdi
leaq 0x52e8(%rip), %rsi      # 0x934c
callq 0x3220
jmp 0x406b
jmp 0x406d
movl -0x210(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x210(%rbp)
jmp 0x3fd2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x208(%rbp)
movl %eax, -0x20c(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x3370
jmp 0x40c4
leaq -0x200(%rbp), %rdi
callq 0x3340
jmp 0x40af
leaq -0x200(%rbp), %rdi
callq 0x3370
addq $0x230, %rsp            # imm = 0x230
popq %rbp
retq
movq -0x208(%rbp), %rdi
callq 0x3430
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: readInode(int)
inode readInode(int inode_num)
{
    int inode_block = g_imap.list[inode_num];
    int seg_idx = inode_block/BLOCK_SZ;
    int seg_block = inode_block % BLOCK_SZ;
		inode tmp_inode;

    if(seg_idx == current_segment){
        tmp_inode = wbuffer.getBlock(seg_block-1)->getInode();
    }else{
        string seg_path = "DRIVE/SEGMENT" + to_string(seg_idx+1);
        ifstream segment(seg_path, ios::in | ios::binary);
        segment.seekg(BLOCK_SZ * (seg_block-1));

        char tmp[sizeof(inode)];
        segment.read(tmp, sizeof(inode));
        segment.close();

        memcpy(&tmp_inode, tmp, sizeof(inode));
		}
    return tmp_inode;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x8b0, %rsp            # imm = 0x8B0
movq %rdi, -0x8a0(%rbp)
movq %rdi, -0x898(%rbp)
movl %esi, -0x4(%rbp)
movslq -0x4(%rbp), %rcx
leaq 0x16d671(%rip), %rax    # 0x171768
movl (%rax,%rcx,4), %eax
movl %eax, -0x8(%rbp)
movl -0x8(%rbp), %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %eax, -0xc(%rbp)
movl -0x8(%rbp), %eax
movl $0x400, %ecx            # imm = 0x400
cltd
idivl %ecx
movl %edx, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x109172(%rip), %eax    # 0x10d294
jne 0x4162
movl -0x10(%rbp), %esi
subl $0x1, %esi
leaq 0x17763f(%rip), %rdi    # 0x17b770
callq 0x38f0
movq %rax, %rsi
leaq -0x314(%rbp), %rdi
callq 0x6c20
movq -0x8a0(%rbp), %rdi
leaq -0x314(%rbp), %rsi
movl $0x304, %edx            # imm = 0x304
callq 0x31c0
jmp 0x42c6
movl -0xc(%rbp), %esi
incl %esi
leaq -0x358(%rbp), %rdi
movq %rdi, -0x8a8(%rbp)
callq 0x69f0
movq -0x8a8(%rbp), %rdx
leaq 0x4e7c(%rip), %rsi      # 0x9004
leaq -0x338(%rbp), %rdi
callq 0x69a0
jmp 0x4196
leaq -0x358(%rbp), %rdi
callq 0x3170
movl $0x8, %edi
movl $0x4, %esi
callq 0x6c00
movl %eax, -0x8ac(%rbp)
jmp 0x41b9
movl -0x8ac(%rbp), %edx
leaq -0x570(%rbp), %rdi
leaq -0x338(%rbp), %rsi
callq 0x33d0
jmp 0x41d4
movl -0x10(%rbp), %eax
shll $0xa, %eax
addl $0xfffffc00, %eax       # imm = 0xFFFFFC00
movslq %eax, %rsi
leaq -0x580(%rbp), %rdi
callq 0x6c60
jmp 0x41f0
movq -0x580(%rbp), %rsi
movq -0x578(%rbp), %rdx
leaq -0x570(%rbp), %rdi
callq 0x32e0
jmp 0x420c
leaq -0x570(%rbp), %rdi
leaq -0x890(%rbp), %rsi
movl $0x304, %edx            # imm = 0x304
callq 0x32d0
jmp 0x4226
leaq -0x570(%rbp), %rdi
callq 0x3070
jmp 0x4234
movq -0x8a0(%rbp), %rdi
leaq -0x890(%rbp), %rsi
movl $0x304, %edx            # imm = 0x304
callq 0x31c0
leaq -0x570(%rbp), %rdi
callq 0x3090
leaq -0x338(%rbp), %rdi
callq 0x3170
jmp 0x42c6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x360(%rbp)
movl %eax, -0x364(%rbp)
leaq -0x358(%rbp), %rdi
callq 0x3170
jmp 0x42d6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x360(%rbp)
movl %eax, -0x364(%rbp)
jmp 0x42b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x360(%rbp)
movl %eax, -0x364(%rbp)
leaq -0x570(%rbp), %rdi
callq 0x3090
leaq -0x338(%rbp), %rdi
callq 0x3170
jmp 0x42d6
movq -0x898(%rbp), %rax
addq $0x8b0, %rsp            # imm = 0x8B0
popq %rbp
retq
movq -0x360(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: readData(unsigned int)
void readData(block_num num)
{
		for(int i = 0; i < BLOCK_SZ; i++) block_buffer[i] = 0;
	
    int seg_idx = num/BLOCK_SZ;
    int seg_block = num % BLOCK_SZ;

    if(seg_idx == current_segment){
        memcpy(block_buffer, wbuffer.getBlock(seg_block-1)->getData(), BLOCK_SZ);
    }else{
        string seg_path = "DRIVE/SEGMENT" + to_string(seg_idx+1);
        ifstream segment(seg_path, ios::in | ios::binary);
        segment.seekg(BLOCK_SZ * (seg_block-1));

				segment.read(block_buffer, BLOCK_SZ);
        segment.close();
		}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x290, %rsp            # imm = 0x290
movl %edi, -0x4(%rbp)
movl $0x0, -0x8(%rbp)
cmpl $0x400, -0x8(%rbp)      # imm = 0x400
jge 0x4328
movslq -0x8(%rbp), %rcx
leaq 0x108f87(%rip), %rax    # 0x10d2a0
movb $0x0, (%rax,%rcx)
movl -0x8(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x8(%rbp)
jmp 0x4305
movl -0x4(%rbp), %eax
shrl $0xa, %eax
movl %eax, -0xc(%rbp)
movl -0x4(%rbp), %eax
andl $0x3ff, %eax            # imm = 0x3FF
movl %eax, -0x10(%rbp)
movl -0xc(%rbp), %eax
cmpl 0x108f4f(%rip), %eax    # 0x10d294
jne 0x437a
movl -0x10(%rbp), %esi
subl $0x1, %esi
leaq 0x17741c(%rip), %rdi    # 0x17b770
callq 0x38f0
movq %rax, %rdi
callq 0x6ca0
movq %rax, %rsi
leaq 0x108f35(%rip), %rdi    # 0x10d2a0
movl $0x400, %edx            # imm = 0x400
callq 0x31c0
jmp 0x449f
movl -0xc(%rbp), %esi
incl %esi
leaq -0x50(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x69f0
movq -0x280(%rbp), %rdx
leaq 0x4c67(%rip), %rsi      # 0x9004
leaq -0x30(%rbp), %rdi
callq 0x69a0
jmp 0x43a8
leaq -0x50(%rbp), %rdi
callq 0x3170
movl $0x8, %edi
movl $0x4, %esi
callq 0x6c00
movl %eax, -0x284(%rbp)
jmp 0x43c8
movl -0x284(%rbp), %edx
leaq -0x268(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x33d0
jmp 0x43e0
movl -0x10(%rbp), %eax
shll $0xa, %eax
addl $0xfffffc00, %eax       # imm = 0xFFFFFC00
movslq %eax, %rsi
leaq -0x278(%rbp), %rdi
callq 0x6c60
jmp 0x43fc
movq -0x278(%rbp), %rsi
movq -0x270(%rbp), %rdx
leaq -0x268(%rbp), %rdi
callq 0x32e0
jmp 0x4418
leaq 0x108e81(%rip), %rsi    # 0x10d2a0
leaq -0x268(%rbp), %rdi
movl $0x400, %edx            # imm = 0x400
callq 0x32d0
jmp 0x4432
leaq -0x268(%rbp), %rdi
callq 0x3070
jmp 0x4440
leaq -0x268(%rbp), %rdi
callq 0x3090
leaq -0x30(%rbp), %rdi
callq 0x3170
jmp 0x449f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x3170
jmp 0x44a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
jmp 0x4494
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x268(%rbp), %rdi
callq 0x3090
leaq -0x30(%rbp), %rdi
callq 0x3170
jmp 0x44a8
addq $0x290, %rsp            # imm = 0x290
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0x3430
nopw %cs:(%rax,%rax)
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: remove(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void remove(string filename)
{
	bool removed = false;
	unsigned int remove_block;
	for(int i = 0; i < g_filemap_ctr; i++){
		if(g_filemap[i].name == filename){
			remove_block = g_filemap[i].num;
			g_filemap[i].num = -1;
			removed = true;
			if(DBG) cout << "Removed " << filename << "\n";
		}
	}
	if(!removed)
	{
	cout << "File '" << filename << "' does not exist!\n";
	return;
	}
	g_imap.list[remove_block] = UINT_MAX;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x20(%rbp)
movq %rdi, -0x8(%rbp)
movb $0x0, -0x9(%rbp)
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x16cb4c(%rip), %eax    # 0x1716a0
jge 0x4bf0
movq -0x20(%rbp), %rsi
movslq -0x14(%rbp), %rax
leaq 0x108b37(%rip), %rdi    # 0x10d6a0
imulq $0x28, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
callq 0x6cc0
testb $0x1, %al
jne 0x4b7f
jmp 0x4be0
movslq -0x14(%rbp), %rcx
leaq 0x108b16(%rip), %rax    # 0x10d6a0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %eax
movl %eax, -0x10(%rbp)
movslq -0x14(%rbp), %rcx
leaq 0x108aff(%rip), %rax    # 0x10d6a0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl $0xffffffff, (%rax)     # imm = 0xFFFFFFFF
movb $0x1, -0x9(%rbp)
movq 0x840f(%rip), %rdi      # 0xcfc8
leaq 0x4513(%rip), %rsi      # 0x90d3
callq 0x3220
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
leaq 0x4771(%rip), %rsi      # 0x934c
callq 0x3220
jmp 0x4be2
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x4b4b
testb $0x1, -0x9(%rbp)
jne 0x4c26
movq 0x83cb(%rip), %rdi      # 0xcfc8
leaq 0x44b5(%rip), %rsi      # 0x90b9
callq 0x3220
movq -0x20(%rbp), %rsi
movq %rax, %rdi
callq 0x31f0
movq %rax, %rdi
leaq 0x44a1(%rip), %rsi      # 0x90c0
callq 0x3220
jmp 0x4c39
movl -0x10(%rbp), %eax
movl %eax, %ecx
leaq 0x16cb36(%rip), %rax    # 0x171768
movl $0xffffffff, (%rax,%rcx,4) # imm = 0xFFFFFFFF
addq $0x20, %rsp
popq %rbp
retq
nop
// File: jasperandrew[P]cs350-project2/./lab7.h
// Function: list()
void list()
{
	cout << "\nFile List\n----------------------------\n";
	for(int i = 0; i < g_filemap_ctr;i++){
		cout << g_filemap[i].name << " (";
		cout << readInode(g_filemap[i].num).filesize << " bytes)\n";
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x310, %rsp            # imm = 0x310
movq 0x7e96(%rip), %rdi      # 0xcfc8
leaq 0x3fa3(%rip), %rsi      # 0x90dc
callq 0x3220
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
cmpl 0x16c552(%rip), %eax    # 0x1716a0
jge 0x51d4
movslq -0x4(%rbp), %rax
leaq 0x108541(%rip), %rsi    # 0x10d6a0
imulq $0x28, %rax, %rax
addq %rax, %rsi
addq $0x8, %rsi
movq 0x7e57(%rip), %rdi      # 0xcfc8
callq 0x31f0
movq %rax, %rdi
leaq 0x3f85(%rip), %rsi      # 0x9105
callq 0x3220
movslq -0x4(%rbp), %rcx
leaq 0x108510(%rip), %rax    # 0x10d6a0
imulq $0x28, %rcx, %rcx
addq %rcx, %rax
movl (%rax), %esi
leaq -0x308(%rbp), %rdi
callq 0x40d0
movl -0x208(%rbp), %esi
movq 0x7e16(%rip), %rdi      # 0xcfc8
callq 0x3410
movq %rax, %rdi
leaq 0x3f47(%rip), %rsi      # 0x9108
callq 0x3220
movl -0x4(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x4(%rbp)
jmp 0x5145
addq $0x310, %rsp            # imm = 0x310
popq %rbp
retq
nopl (%rax)