LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O3/minimind[P]simple-graph/unittest/catch.hpp
// Function: Catch::SectionTracking::TestCaseTracker::leaveSection()
void leaveSection() {
            m_currentSection->leave();
            m_currentSection = m_currentSection->getParent();
            assert( m_currentSection != NULL );
            m_completedASectionThisRun = true;
        }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x60(%rdi), %r14
movq 0x40(%r14), %rax
leaq 0x30(%r14), %r15
movl $0x3, %ebp
cmpq %r15, %rax
je 0x22551
cmpl $0x3, 0x60(%rax)
jne 0x2254c
movq %rax, %rdi
callq 0x93a0
jmp 0x22537
movl $0x2, %ebp
movl %ebp, 0x20(%r14)
movq 0x58(%r14), %rax
movq %rax, 0x60(%rbx)
testq %rax, %rax
je 0x22571
movb $0x1, 0x68(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1bba3(%rip), %rdi     # 0x3e11b
leaq 0x1b1fe(%rip), %rsi     # 0x3d77d
leaq 0x1bbae(%rip), %rcx     # 0x3e134
movl $0x1308, %edx           # imm = 0x1308
callq 0x91f0
// File: /workspace/github_cpp_makefile_star2_O3/minimind[P]simple-graph/unittest/catch.hpp
// Function: Catch::XmlWriter::writeAttribute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
XmlWriter& writeAttribute( std::string const& name, std::string const& attribute ) {
            if( !name.empty() && !attribute.empty() ) {
                stream() << " " << name << "=\"";
                writeEncodedText( attribute );
                stream() << "\"";
            }
            return *this;
        }

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x256d2
movq %rdx, %r14
cmpq $0x0, 0x8(%rdx)
je 0x256d2
movq %rsi, %r15
movq 0x40(%rbx), %r12
leaq 0x1808d(%rip), %rsi     # 0x3d70f
movl $0x1, %edx
movq %r12, %rdi
callq 0x9390
movq (%r15), %rsi
movq 0x8(%r15), %rdx
movq %r12, %rdi
callq 0x9390
leaq 0x18ce1(%rip), %rsi     # 0x3e386
movl $0x2, %edx
movq %rax, %rdi
callq 0x9390
movq %rbx, %rdi
movq %r14, %rsi
callq 0x256e2
movq 0x40(%rbx), %rdi
leaq 0x18b19(%rip), %rsi     # 0x3e1e1
movl $0x1, %edx
callq 0x9390
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/minimind[P]simple-graph/unittest/catch.hpp
// Function: Catch::XmlWriter::writeText(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, bool)
XmlWriter& writeText( std::string const& text, bool indent = true ) {
            if( !text.empty() ){
                bool tagWasOpen = m_tagIsOpen;
                ensureTagClosed();
                if( tagWasOpen && indent )
                    stream() << m_indent;
                writeEncodedText( text );
                m_needsNewline = true;
            }
            return *this;
        }

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cmpq $0x0, 0x8(%rsi)
je 0x25a49
movq %rsi, %r14
cmpb $0x1, (%rbx)
jne 0x25a3a
movl %edx, %ebp
movq 0x40(%rbx), %rdi
leaq 0x17f96(%rip), %rsi     # 0x3d9ad
movl $0x2, %edx
callq 0x9390
movb $0x0, (%rbx)
testb %bpl, %bpl
je 0x25a3a
movq 0x40(%rbx), %rdi
movq 0x20(%rbx), %rsi
movq 0x28(%rbx), %rdx
callq 0x9390
movq %rbx, %rdi
movq %r14, %rsi
callq 0x256e2
movb $0x1, 0x1(%rbx)
movq %rbx, %rax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/plasma-umass[P]simplesocket/server.cpp
// Function: serve(void*)
void * serve (void * cv)
{
  // Just read exactly one string.
  auto * c = (simplesocket *) cv; 
  string buffer;
  while (true) {
    *c >> buffer;
    if (buffer == "") {
      break;
    }
    int num = messageNumber();
    cout << "[" << num << "] " << buffer << endl;
    // Now reply.
    stringstream str;
    str << "Received message " << num;
    *c << str.str();
  }
  delete c;
  return NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
movq %rdi, %r14
leaq 0x10(%rsp), %rax
movq %rax, -0x10(%rax)
movq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq %rsp, %r13
leaq 0x40(%rsp), %rbp
leaq 0x20(%rsp), %r15
movq %r14, %rdi
movq %r13, %rsi
callq 0x29fe
movq %r13, %rdi
leaq 0x1bcc(%rip), %rsi      # 0x4249
callq 0x2080
testl %eax, %eax
je 0x27a7
leaq 0x3b6f(%rip), %r12      # 0x6200
movq %r12, %rdi
callq 0x22e0
movl 0x3b5d(%rip), %ebx      # 0x61fc
leal 0x1(%rbx), %eax
movl %eax, 0x3b54(%rip)      # 0x61fc
movq %r12, %rdi
callq 0x21c0
movl $0x1, %edx
movq 0x390c(%rip), %rdi      # 0x5fc8
leaq 0x1941(%rip), %rsi      # 0x4004
callq 0x2280
movq 0x38f9(%rip), %rdi      # 0x5fc8
movl %ebx, %esi
callq 0x2350
movq %rax, %r12
movl $0x2, %edx
movq %rax, %rdi
leaq 0x191e(%rip), %rsi      # 0x4006
callq 0x2280
movq (%rsp), %rsi
movq 0x8(%rsp), %rdx
movq %r12, %rdi
callq 0x2280
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
movq %rbp, %rdi
callq 0x2180
movl $0x11, %edx
leaq 0x50(%rsp), %rdi
leaq 0x18c8(%rip), %rsi      # 0x4009
callq 0x2280
leaq 0x50(%rsp), %rdi
movl %ebx, %esi
callq 0x2350
movq %r15, %rdi
leaq 0x58(%rsp), %rsi
callq 0x2310
movq %r14, %rdi
movq %r15, %rsi
callq 0x2a6a
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2786
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2250
movq %rbp, %rdi
movq 0x3818(%rip), %rsi      # 0x5fa8
callq 0x21a0
leaq 0xc0(%rsp), %rdi
callq 0x20c0
jmp 0x2668
movq (%r14), %rax
movq %r14, %rdi
callq *0x8(%rax)
movq (%rsp), %rdi
leaq 0x10(%rsp), %rax
cmpq %rax, %rdi
je 0x27cb
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2250
xorl %eax, %eax
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x20(%rsp), %rdi
leaq 0x30(%rsp), %rax
cmpq %rax, %rdi
je 0x2807
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x2807
jmp 0x2827
jmp 0x2827
movq %rax, %rbx
movq 0x379a(%rip), %rsi      # 0x5fa8
leaq 0x40(%rsp), %rdi
callq 0x21a0
leaq 0xc0(%rsp), %rdi
callq 0x20c0
jmp 0x282a
movq %rax, %rbx
leaq 0x10(%rsp), %rax
movq (%rsp), %rdi
cmpq %rax, %rdi
je 0x2845
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x2250
movq %rbx, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O3/plasma-umass[P]simplesocket/server.cpp
// Function: main
int main (int argc, char * argv[])
{
  if (argc < 2) {
    cerr << "Usage: " << argv[0] << " <port>" << endl;
    exit (-1);
  }
  int port;
  stringstream (argv[1]) >> port;
  serversocket * s = new serversocket (port);
  cout << "Entering loop.\n" << endl;
  while (true) {
    // Create one thread per connection.
    auto c = s->accept();
    pthread_t * t = new pthread_t;
    pthread_create (t, NULL, serve, (void *) c);
  }
  // We will never get here...
  s->close();
  return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1b0, %rsp            # imm = 0x1B0
movq %rsi, %rbx
cmpl $0x1, %edi
jle 0x2964
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x3(%rsp), %rdx
callq 0x2b52
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
movl $0x18, %edx
callq 0x2320
leaq 0x28(%rsp), %rdi
leaq 0x4(%rsp), %rsi
callq 0x2150
movq 0x3706(%rip), %rsi      # 0x5fa8
leaq 0x28(%rsp), %rdi
callq 0x21a0
leaq 0xa8(%rsp), %rdi
callq 0x20c0
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x28d4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2250
movl $0x1e0, %edi            # imm = 0x1E0
callq 0x2240
movq %rax, %rbx
movl 0x4(%rsp), %esi
movq %rax, %rdi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
callq 0x2b90
movq 0x36cd(%rip), %r14      # 0x5fc8
leaq 0x1729(%rip), %rsi      # 0x402b
movl $0xf, %edx
movq %r14, %rdi
callq 0x2280
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2220
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2170
leaq -0x30a(%rip), %r14      # 0x2633
movq %rbx, %rdi
callq 0x38b0
movq %rax, %r15
movl $0x8, %edi
callq 0x2240
movq %rax, %rdi
xorl %esi, %esi
movq %r14, %rdx
movq %r15, %rcx
callq 0x2390
jmp 0x293d
movq 0x3685(%rip), %rdi      # 0x5ff0
leaq 0x16a9(%rip), %rsi      # 0x401b
callq 0x2230
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x2230
leaq 0x169a(%rip), %rsi      # 0x4023
movq %rax, %rdi
callq 0x2230
movq %rax, %rdi
callq 0x2100
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x2290
movq %rax, %r14
movl $0x1e0, %esi            # imm = 0x1E0
movq %rbx, %rdi
jmp 0x29ec
movq %rax, %r14
movq 0x35ee(%rip), %rsi      # 0x5fa8
leaq 0x28(%rsp), %rdi
callq 0x21a0
leaq 0xa8(%rsp), %rdi
callq 0x20c0
jmp 0x29d6
movq %rax, %r14
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x29f6
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x2250
jmp 0x29f6
movq %rax, %r14
movq %r14, %rdi
callq 0x2360
// File: /workspace/github_cpp_makefile_star2_O3/onai[P]npio/npio_test_c.c
// Function: test3
void test3()
{
  int i, err;
  float *data, total;
  npio_Array array;

  npio_init_array(&array);
  err = npio_load_header("test2.npy", &array);
  if (err)
  {
    fprintf(stderr, "npio_load_header: %s\n", strerror(err));
    exit(1);
  }

  err = npio_load_data(&array);
  if (err)
  {
    fprintf(stderr, "npio_load_data: %s\n", strerror(err));
    exit(1);
  }

  data = (float*) array.data;
  total = 0;
  for (i = 0; i < array.size; ++i)
    total += data[i];
  assert(fabs(total / 5005.37f - 1.0f) < 1e-6f);

  npio_free_array(&array);
  printf("test3 passed\n");
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x90, %rsp
movw $0x1, 0x8(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rsp)
movups %xmm0, 0x20(%rsp)
movups %xmm0, 0x2c(%rsp)
movaps 0x16f9(%rip), %xmm1     # 0x3010
movups %xmm1, 0x3c(%rsp)
xorl %eax, %eax
movq %rax, 0x50(%rsp)
movl $0x0, 0x58(%rsp)
movups %xmm0, 0x60(%rsp)
movups %xmm0, 0x70(%rsp)
movq %rax, 0x80(%rsp)
leaq 0x180d(%rip), %rdi      # 0x3151
xorl %esi, %esi
xorl %eax, %eax
callq 0x1180
testl %eax, %eax
js 0x199b
movl %eax, %ebp
leaq 0x8(%rsp), %r14
movl %eax, 0x50(%r14)
movl $0x1, 0x80(%r14)
movl $0x20, %edx
movl %eax, %edi
movq %r14, %rsi
callq 0x2070
movl %eax, %ebx
cmpl $0x0, 0x78(%r14)
je 0x19a2
movl %ebp, %edi
callq 0x10e0
movl $0xffffffff, 0x58(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x88(%rsp)
jmp 0x19a2
callq 0x1050
movl (%rax), %ebx
testl %ebx, %ebx
jne 0x1a8d
leaq 0x8(%rsp), %rdi
callq 0x1aba
testl %eax, %eax
jne 0x1a94
movq 0x30(%rsp), %rax
movq 0x50(%rsp), %rbx
xorps %xmm0, %xmm0
testq %rax, %rax
je 0x19dd
xorl %ecx, %ecx
addss (%rbx,%rcx,4), %xmm0
incq %rcx
cmpq %rcx, %rax
jne 0x19d0
divss 0x166b(%rip), %xmm0     # 0x3050
addss 0x1667(%rip), %xmm0     # 0x3054
andps 0x162c(%rip), %xmm0     # 0x3020
movss 0x165c(%rip), %xmm1     # 0x3058
ucomiss %xmm0, %xmm1
jbe 0x1a9b
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x1a14
callq 0x1030
movq 0x28(%rsp), %rdi
testq %rdi, %rdi
je 0x1a23
callq 0x1030
testq %rbx, %rbx
setne %al
movq 0x60(%rsp), %r14
testq %r14, %r14
sete %cl
andb %al, %cl
cmpb $0x1, %cl
jne 0x1a43
movq %rbx, %rdi
callq 0x1030
cmpl $0x0, 0x80(%rsp)
je 0x1a5a
movq 0x68(%rsp), %rsi
movq %r14, %rdi
callq 0x1170
movl 0x58(%rsp), %edi
testl %edi, %edi
js 0x1a67
callq 0x10e0
movq 0x70(%rsp), %rdi
testq %rdi, %rdi
je 0x1a76
callq 0x1030
leaq 0x182f(%rip), %rdi      # 0x32ac
addq $0x90, %rsp
popq %rbx
popq %r14
popq %rbp
jmp 0x1060
movl %ebx, %edi
callq 0x1268
movl %eax, %edi
callq 0x1294
leaq 0x16f4(%rip), %rdi      # 0x3196
leaq 0x167f(%rip), %rsi      # 0x3128
leaq 0x1736(%rip), %rcx      # 0x31e6
movl $0x79, %edx
callq 0x10d0
// File: /workspace/github_cpp_makefile_star2_O3/onai[P]npio/npio_test_c.c
// Function: test5
void test5()
{
  int fd, err;
  npio_Array array;
  size_t sz, i;
  FILE* f;
  int64_t *data, total;

  f = popen("cat test1.npy", "r");
  if (f == 0)
  {
    perror("popen");
    exit(1);
  }

  fd = fileno(f);
  npio_init_array(&array);
  if ((err = npio_load_fd(fd, &array)))
  {
    fprintf(stderr, "npio_load_fd: %s\n", strerror(err));
    exit(1);
  }

  data = (int64_t*) array.data;
  total = 0;
  for (i = 0; i < array.size; ++i)
    total += data[i];
  assert(total == 4950);

  fclose(f);
  npio_free_array(&array);
  printf("test5 passed\n");
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x88, %rsp
leaq 0x1339(%rip), %rdi      # 0x3233
leaq 0x1370(%rip), %rsi      # 0x3271
callq 0x1190
testq %rax, %rax
je 0x204d
movq %rax, %rbx
movq %rax, %rdi
callq 0x1130
movq %rsp, %rsi
movw $0x1, (%rsi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rsi)
movups %xmm0, 0x18(%rsi)
movups %xmm0, 0x24(%rsi)
movaps 0x10d8(%rip), %xmm1     # 0x3010
movups %xmm1, 0x34(%rsi)
xorl %ecx, %ecx
movq %rcx, 0x48(%rsi)
movl $0x0, 0x50(%rsi)
movups %xmm0, 0x58(%rsi)
movups %xmm0, 0x68(%rsi)
movq %rcx, 0x78(%rsi)
movl $0x20, %edx
movl %eax, %edi
callq 0x2070
testl %eax, %eax
jne 0x2027
movq %rsp, %rdi
callq 0x1aba
testl %eax, %eax
jne 0x2027
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x202e
movq 0x48(%rsp), %r14
xorl %ecx, %ecx
xorl %edx, %edx
addq (%r14,%rdx,8), %rcx
incq %rdx
cmpq %rdx, %rax
jne 0x1f90
cmpq $0x1356, %rcx           # imm = 0x1356
jne 0x202e
movq %rbx, %rdi
callq 0x1080
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x1fc0
callq 0x1030
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1fcf
callq 0x1030
movq 0x58(%rsp), %rbx
testq %rbx, %rbx
jne 0x1fe1
movq %r14, %rdi
callq 0x1030
cmpl $0x0, 0x78(%rsp)
je 0x1ff5
movq 0x60(%rsp), %rsi
movq %rbx, %rdi
callq 0x1170
movl 0x50(%rsp), %edi
testl %edi, %edi
js 0x2002
callq 0x10e0
movq 0x68(%rsp), %rdi
testq %rdi, %rdi
je 0x2011
callq 0x1030
leaq 0x12ae(%rip), %rdi      # 0x32c6
addq $0x88, %rsp
popq %rbx
popq %r14
jmp 0x1060
movl %eax, %edi
callq 0x1326
leaq 0x110e(%rip), %rdi      # 0x3143
leaq 0x10ec(%rip), %rsi      # 0x3128
leaq 0x1216(%rip), %rcx      # 0x3259
movl $0xce, %edx
callq 0x10d0
callq 0x1352
// File: /workspace/github_cpp_makefile_star2_O3/onai[P]npio/npio_test_c.c
// Function: main
int main()
{
  test1();
  test2();
  test3();
  test4();
  test5();
  return 0;
}

// Assembly:
pushq %rax
callq 0x145c
callq 0x1694
callq 0x18ec
callq 0x1c70
callq 0x1ee9
xorl %eax, %eax
popq %rcx
retq
// File: /workspace/github_cpp_makefile_star2_O3/onai[P]npio/./npio.h
// Function: npio_load_header_fd3
static inline int npio_load_header_fd3(int fd, npio_Array* array, size_t max_dim)
{
  ssize_t file_size;
  char *p;

  /* Store the file descriptor for load_data */
  if (!array->_opened)
    array->_fd = fd;

  /* Get the file size in preparation to mmap */
  file_size = lseek(fd, 0, SEEK_END);

  /* If we could not lseek, fallback on read. */
  if (file_size < 0)
    return npio_load_header_fd_read_(fd, array, max_dim);

  /* map-in the file */
  p = (char*) mmap(0, file_size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0);
  if (p == MAP_FAILED)
  {
    if (lseek(fd, 0, SEEK_SET))
      return errno;
    return npio_load_header_fd_read_(fd, array, max_dim);
  }

  array->_mmapped = 1;
  array->_buf = p;
  array->_buf_size = file_size;

  return npio_load_header_mem4(p, file_size, array, max_dim);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %r15
movq %rsi, %rbx
movl %edi, %ebp
cmpl $0x0, 0x80(%rsi)
jne 0x208b
movl %ebp, 0x50(%rbx)
movl %ebp, %edi
xorl %esi, %esi
movl $0x2, %edx
callq 0x10c0
testq %rax, %rax
js 0x2147
movq %rax, %r14
xorl %edi, %edi
movq %rax, %rsi
movl $0x3, %edx
movl $0x2, %ecx
movl %ebp, %r8d
xorl %r9d, %r9d
callq 0x10a0
cmpq $-0x1, %rax
je 0x2123
movl $0x1, 0x78(%rbx)
movq %rax, 0x58(%rbx)
movq %r14, 0x60(%rbx)
movl $0x16, %ecx
cmpq $0x10, %r14
jb 0x213a
movl $0x4d554e93, %edx       # imm = 0x4D554E93
xorl (%rax), %edx
movzwl 0x4(%rax), %esi
xorl $0x5950, %esi           # imm = 0x5950
orl %edx, %esi
jne 0x213a
movzbl 0x6(%rax), %edx
movb %dl, (%rbx)
movb 0x7(%rax), %cl
movb %cl, 0x1(%rbx)
cmpl $0x2, %edx
je 0x215b
movl $0x5f, %ecx
cmpl $0x1, %edx
jne 0x213a
movsbl 0x8(%rax), %edx
movsbl 0x9(%rax), %ecx
shll $0x8, %ecx
addl %edx, %ecx
movl $0xa, %esi
jmp 0x217f
movl %ebp, %edi
xorl %esi, %esi
xorl %edx, %edx
callq 0x10c0
testq %rax, %rax
je 0x2147
callq 0x1050
movl (%rax), %ecx
movl %ecx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl %ebp, %edi
movq %rbx, %rsi
movq %r15, %rdx
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x21a8
movsbl 0x8(%rax), %ecx
movsbl 0x9(%rax), %edx
shll $0x8, %edx
addl %ecx, %edx
movsbl 0xa(%rax), %esi
shll $0x10, %esi
movzbl 0xb(%rax), %ecx
shll $0x18, %ecx
addl %esi, %ecx
addl %edx, %ecx
movl $0xc, %esi
addq %rax, %r14
movslq %ecx, %rdx
movq %rdx, 0x8(%rbx)
addq %rax, %rsi
addq %rsi, %rdx
cmpq %r14, %rdx
cmovaeq %r14, %rdx
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x22e9
// File: /workspace/github_cpp_makefile_star2_O3/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::Constructor(int)
void Constructor(const int PE)
    {
        ClassSignature = "TurbGen: ";
        this->PE = PE;
        verbose = 1; // default verbose level
        evolfile = "TurbGen.dat";
    }

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
addq $0x8, %rdi
movq 0x10(%r14), %rdx
leaq 0x8984(%rip), %rcx      # 0xe4b8
movl $0x9, %r8d
xorl %esi, %esi
callq 0x33d0
movl %ebx, 0x150(%r14)
movl $0x1, (%r14)
movq 0x220(%r14), %rdx
addq $0x218, %r14            # imm = 0x218
leaq 0x895e(%rip), %rcx      # 0xe4c2
movl $0xb, %r8d
movq %r14, %rdi
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x33d0
// File: /workspace/github_cpp_makefile_star2_O3/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::TurbGen_printf(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ...)
void TurbGen_printf(std::string format, ...) {
        // ******************************************************
        // special printf prepends string and only lets PE=0 print
        // ******************************************************
        va_list args;
        va_start(args, format);
        std::string new_format = ClassSignature+format;
        if (PE == 0) vfprintf(stdout, new_format.c_str(), args);
        va_end(args);
    }

// Assembly:
pushq %rbx
subq $0xf0, %rsp
movq %rsi, %r10
movq %rdi, %rbx
leaq 0x40(%rsp), %rsi
movq %rdx, 0x10(%rsi)
movq %rcx, 0x18(%rsi)
movq %r8, 0x20(%rsi)
movq %r9, 0x28(%rsi)
testb %al, %al
je 0x79b2
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movq %rsi, 0x10(%rsp)
leaq 0x100(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x8(%rdi), %rsi
leaq 0x20(%rsp), %rdi
movq %r10, %rdx
callq 0xb85e
cmpl $0x0, 0x150(%rbx)
jne 0x7a03
movq 0xa5b5(%rip), %rax      # 0x11fa8
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x3360
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x7a1e
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32a0
addq $0xf0, %rsp
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::set_number_of_components()
void set_number_of_components(void) {
        // error check on user setting of ndim
        if ((ndim != 1) && (ndim != 1.5) && (ndim != 2) && (ndim != 2.5) && (ndim != 3)) {
            TurbGen_printf("ERROR: number of dimensions must be in [1, 1.5, 2, 2.5, 3].\n");
            exit(-1);
        }
        // set the number of vector field components
        if (ndim == 1) ncmp = 1;
        if (ndim == 2) ncmp = 2;
        if ((ndim == 1.5) || (ndim == 2.5) || (ndim == 3)) ncmp = 3;
    }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movsd 0x158(%rdi), %xmm0
ucomisd 0x573e(%rip), %xmm0     # 0xe028
jne 0x88ee
jnp 0x891e
ucomisd 0x577a(%rip), %xmm0     # 0xe070
jne 0x88fa
jnp 0x891e
ucomisd 0x572e(%rip), %xmm0     # 0xe030
jne 0x8906
jnp 0x891e
ucomisd 0x573a(%rip), %xmm0     # 0xe048
jne 0x8912
jnp 0x891e
ucomisd 0x5746(%rip), %xmm0     # 0xe060
jne 0x8982
jp 0x8982
ucomisd 0x5722(%rip), %xmm0     # 0xe048
jne 0x8934
jp 0x8934
movl $0x1, 0x160(%rbx)
ucomisd 0x56f4(%rip), %xmm0     # 0xe030
jne 0x894a
jp 0x894a
movl $0x2, 0x160(%rbx)
ucomisd 0x56d6(%rip), %xmm0     # 0xe028
jne 0x8956
jnp 0x896e
ucomisd 0x5702(%rip), %xmm0     # 0xe060
jne 0x8962
jnp 0x896e
ucomisd 0x5706(%rip), %xmm0     # 0xe070
jne 0x8978
jp 0x8978
movl $0x3, 0x160(%rbx)
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
leaq 0x5e9f(%rip), %rsi      # 0xe831
leaq 0x5ed4(%rip), %rdx      # 0xe86d
movq %rsp, %r14
movq %r14, %rdi
callq 0xba58
movq %rbx, %rdi
movq %r14, %rsi
xorl %eax, %eax
callq 0x794e
movq %rsp, %rdi
callq 0x3140
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x3300
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x89dc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x32a0
movq %rbx, %rdi
callq 0x3480
// File: /workspace/github_cpp_makefile_star2_O3/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::OU_noise_init()
void OU_noise_init(void) {
        // ******************************************************
        // initialize pseudo random sequence for the Ornstein-Uhlenbeck (OU) process
        // ******************************************************
        OUphases.resize(nmodes*ncmp*2);
        for (int m = 0; m < nmodes; m++) {
            for (int d = 0; d < ncmp; d++) {
                for (int ir = 0; ir < 2; ir++) {
                    OUphases[2*ncmp*m+2*d+ir] = OUvar * get_random_number();
                }
            }
        }
    }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
addq $0x120, %rdi            # imm = 0x120
movl 0x154(%rbx), %eax
imull 0x160(%rbx), %eax
addl %eax, %eax
movslq %eax, %rsi
callq 0xb8b8
movl 0x154(%rbx), %ecx
testl %ecx, %ecx
jle 0xa739
movl 0x160(%rbx), %eax
xorl %ebp, %ebp
testl %eax, %eax
jle 0xa733
xorl %r14d, %r14d
movb $0x1, %r15b
xorl %r12d, %r12d
movsd 0x1b0(%rbx), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbx, %rdi
callq 0xc294
mulsd 0x8(%rsp), %xmm0
movl 0x160(%rbx), %eax
movl %eax, %ecx
imull %ebp, %ecx
addl %r14d, %ecx
leal (%r12,%rcx,2), %ecx
movslq %ecx, %rcx
movq 0x120(%rbx), %rdx
movsd %xmm0, (%rdx,%rcx,8)
movl $0x1, %r12d
testb $0x1, %r15b
movl $0x0, %r15d
jne 0xa6d6
incl %r14d
cmpl %eax, %r14d
jl 0xa6d0
movl 0x154(%rbx), %ecx
incl %ebp
cmpl %ecx, %ebp
jl 0xa6c9
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::get_random_number()
double get_random_number(void) {
        // ******************************************************
        //  get random number; draws a number randomly from a Gaussian distribution
        //  with the standard uniform distribution function "ran1s"
        //  using the Box-Muller transformation in polar coordinates. The
        //  resulting Gaussian has unit variance.
        // ******************************************************
        double r1 = ran1s(&seed);
        double r2 = ran1s(&seed);
        double g1 = sqrt(2.0*log(1.0/r1))*cos(2*M_PI*r2);
        return g1;
    }

// Assembly:
subq $0x18, %rsp
movl 0x168(%rdi), %eax
movl %eax, %edx
negl %edx
testl %eax, %eax
movl $0x1, %ecx
cmovel %ecx, %edx
cmovgl %eax, %edx
imulq $0x69c16bd, %rdx, %rax  # imm = 0x69C16BD
shrq $0x20, %rax
movl %edx, %esi
subl %eax, %esi
shrl %esi
addl %eax, %esi
shrl $0x10, %esi
imull $0xfffe0ce3, %esi, %eax # imm = 0xFFFE0CE3
addl %edx, %eax
imull $0x41a7, %eax, %eax     # imm = 0x41A7
imull $0xfffff4ec, %esi, %edx # imm = 0xFFFFF4EC
addl %eax, %edx
movl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
leal (%rdx,%rax), %esi
testl %edx, %edx
cmovnsl %edx, %esi
cvtsi2sd %esi, %xmm2
movsd 0x1ddc(%rip), %xmm0     # 0xe0d0
mulsd %xmm0, %xmm2
movsd 0x1dc8(%rip), %xmm3     # 0xe0c8
movapd %xmm3, %xmm1
movl %esi, %edx
negl %edx
testl %esi, %esi
cmovel %ecx, %edx
cmovgl %esi, %edx
imulq $0x69c16bd, %rdx, %rcx  # imm = 0x69C16BD
shrq $0x20, %rcx
movl %edx, %esi
subl %ecx, %esi
shrl %esi
addl %ecx, %esi
shrl $0x10, %esi
imull $0xfffe0ce3, %esi, %ecx # imm = 0xFFFE0CE3
addl %edx, %ecx
imull $0x41a7, %ecx, %ecx     # imm = 0x41A7
imull $0xfffff4ec, %esi, %edx # imm = 0xFFFFF4EC
addl %ecx, %edx
addl %edx, %eax
testl %edx, %edx
cmovnsl %edx, %eax
minsd %xmm2, %xmm1
movl %eax, 0x168(%rdi)
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
mulsd %xmm0, %xmm2
minsd %xmm2, %xmm3
movsd %xmm3, 0x10(%rsp)
movsd 0x1cde(%rip), %xmm0     # 0xe048
divsd %xmm1, %xmm0
callq 0x3220
addsd %xmm0, %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xc387
sqrtsd %xmm0, %xmm0
jmp 0xc38c
callq 0x3210
movsd %xmm0, 0x8(%rsp)
movsd 0x10(%rsp), %xmm0
mulsd 0x1ce8(%rip), %xmm0     # 0xe088
callq 0x34e0
mulsd 0x8(%rsp), %xmm0
addq $0x18, %rsp
retq
// File: /workspace/github_cpp_makefile_star2_O3/chfeder[P]turbulence_generator/./TurbGen.h
// Function: TurbGen::TurbGen_printf_raw(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, ...)
void TurbGen_printf_raw(std::string format, ...) {
        // ******************************************************
        // special printf prepends string and only lets PE=0 print
        // ******************************************************
        va_list args;
        va_start(args, format);
        std::string new_format = format;
        if (PE == 0) vfprintf(stdout, new_format.c_str(), args);
        va_end(args);
    }

// Assembly:
pushq %r14
pushq %rbx
subq $0xf8, %rsp
movq %rdi, %rbx
leaq 0x40(%rsp), %rdi
movq %rdx, 0x10(%rdi)
movq %rcx, 0x18(%rdi)
movq %r8, 0x20(%rdi)
movq %r9, 0x28(%rdi)
testb %al, %al
je 0xd063
movaps %xmm0, 0x70(%rsp)
movaps %xmm1, 0x80(%rsp)
movaps %xmm2, 0x90(%rsp)
movaps %xmm3, 0xa0(%rsp)
movaps %xmm4, 0xb0(%rsp)
movaps %xmm5, 0xc0(%rsp)
movaps %xmm6, 0xd0(%rsp)
movaps %xmm7, 0xe0(%rsp)
movq %rdi, 0x10(%rsp)
leaq 0x110(%rsp), %rax
movq %rax, 0x8(%rsp)
movabsq $0x3000000010, %rax     # imm = 0x3000000010
movq %rax, (%rsp)
leaq 0x30(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rax
movq 0x8(%rsi), %rdx
addq %rax, %rdx
leaq 0x20(%rsp), %rdi
movq %rax, %rsi
callq 0xde20
cmpl $0x0, 0x150(%rbx)
jne 0xd0c3
movq 0x4ef5(%rip), %rax      # 0x11fa8
movq (%rax), %rdi
movq 0x20(%rsp), %rsi
movq %rsp, %rdx
callq 0x3360
movq 0x20(%rsp), %rdi
cmpq %r14, %rdi
je 0xd0da
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x32a0
addq $0xf8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/./thumbsim.hpp
// Function: Cache::printStats() const
void printStats() const {
         cout << dec << size << " byte cache (blocksize " << dec << blocksize
            << " bytes): " << hits << " hits, " << misses << " misses (hit rate: " 
                              << (static_cast<float>(hits) * 100.0f /
                                    static_cast<float>(hits + misses)) << "%)" << endl;
      }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x60cd(%rip), %rdi      # 0x8fd0
movq (%rdi), %rax
movq -0x18(%rax), %rax
movl 0x18(%rdi,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%rdi,%rax)
movl (%rbx), %esi
callq 0x20c0
movq %rax, %r14
leaq 0x31d8(%rip), %rsi      # 0x6101
movl $0x17, %edx
movq %rax, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x2, %ecx
movl %ecx, 0x18(%r14,%rax)
movl 0x4(%rbx), %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r14
leaq 0x31b7(%rip), %rsi      # 0x6119
movl $0x9, %edx
movq %rax, %rdi
callq 0x2170
movl 0x20(%rbx), %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r14
leaq 0x319f(%rip), %rsi      # 0x6123
movl $0x7, %edx
movq %rax, %rdi
callq 0x2170
movl 0x24(%rbx), %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r14
leaq 0x3185(%rip), %rsi      # 0x612b
movl $0x13, %edx
movq %rax, %rdi
callq 0x2170
movl 0x20(%rbx), %eax
cvtsi2ss %rax, %xmm0
movl 0x24(%rbx), %ecx
addl %eax, %ecx
cvtsi2ss %rcx, %xmm1
mulss 0x306f(%rip), %xmm0     # 0x603c
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movq %r14, %rdi
callq 0x21e0
movq %rax, %rbx
leaq 0x3158(%rip), %rsi      # 0x613f
movl $0x2, %edx
movq %rax, %rdi
callq 0x2170
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x20d0
nop
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(ALL_Types)
Thumb_Types decode (const ALL_Types data) {
  if (data.type.alu.instr.class_type.type_check == ALU_TYPE) {
    return ALU;
  }
  else if (data.type.dp.instr.class_type.type_check == DP_TYPE) {
    return DP;
  }
  else if (data.type.sp.instr.class_type.type_check == SP_TYPE) {
    return SPECIAL;
  }
  else if (data.type.uncond.instr.class_type.type_check == UNCOND_TYPE) {
    return UNCOND;
  }
  else if (data.type.bl.instr.class_type.type_check == BL_TYPE) {
    return BL;
  }
  else if (data.type.misc.instr.class_type.type_check == MISC_TYPE) {
    return MISC;
  }
  else if (data.type.cond.instr.class_type.type_check == COND_TYPE) {
    return COND;
  }
  else if (data.type.ldm.instr.class_type.type_check == LDM_TYPE) {
    return LDM;
  }
  else if (data.type.stm.instr.class_type.type_check == STM_TYPE) {
    return STM;
  }
  else if (data.type.ldrl.instr.class_type.type_check == LDRL_TYPE) {
    return LDRL;
  }
  else if (data.type.addsp.instr.class_type.type_check == ADD_SP_TYPE) {
    return ADD_SP;
  }
  else {
    if (data.type.ld_st.instr.class_type.opA == LD_ST_REG_OPA) {
    }
    else if (data.type.ld_st.instr.class_type.opA == LD_ST_IMM_OPA) {
    }
    else if (data.type.ld_st.instr.class_type.opA == LD_ST_IMMB_OPA) {
    }
    else if (data.type.ld_st.instr.class_type.opA == LD_ST_IMMH_OPA) {
    }
    else if (data.type.ld_st.instr.class_type.opA == LD_ST_IMMSP_OPA) {
    }
    else {
      cout << "NO TYPE FOUND" << endl;
      return ERROR_TYPE;
    }
    return LD_ST;
  }
}

// Assembly:
movzwl %di, %ecx
xorl %eax, %eax
cmpl $0x4000, %ecx           # imm = 0x4000
jae 0x302e
retq
movl %ecx, %eax
shrl $0xa, %eax
cmpw $0x10, %ax
je 0x3044
cmpl $0x11, %eax
jne 0x304a
movl $0x2, %eax
retq
movl $0x1, %eax
retq
movl %ecx, %eax
shrl $0xb, %eax
cmpw $0x1c, %ax
je 0x3060
cmpl $0x1e, %eax
jne 0x3066
movl $0xb, %eax
retq
movl $0x6, %eax
retq
shrl $0xc, %ecx
cmpw $0xb, %cx
je 0x307a
cmpl $0xd, %ecx
jne 0x3080
movl $0x5, %eax
retq
movl $0x4, %eax
retq
movzwl %ax, %eax
cmpl $0x17, %eax
jg 0x3098
cmpl $0x9, %eax
je 0x30f2
cmpl $0x15, %eax
jne 0x30a8
movl $0xa, %eax
retq
cmpl $0x19, %eax
je 0x30f8
cmpl $0x18, %eax
jne 0x30a8
movl $0x8, %eax
retq
movzwl %cx, %ecx
addl $-0x5, %ecx
movl $0x3, %eax
cmpw $0x5, %cx
jb 0x302d
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x5f06(%rip), %rbx      # 0x8fd0
leaq 0x310b(%rip), %rsi      # 0x61dc
movl $0xd, %edx
movq %rbx, %rdi
callq 0x2170
movq %rbx, %rdi
callq 0x2090
movl $0xc, %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
movl $0x9, %eax
retq
movl $0x7, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(DP_Type)
DP_Ops decode (const DP_Type data) {
  if (data.instr.DP_Instr.op == DP_CMP) {
    // 315: insert code here to print cmp instruction
    return DP_CMP;
  }
  else {
    cerr << "UNKNOWN DP TYPE -- Exiting" << endl;
    exit(1);
  }
}

// Assembly:
andl $0x3c0, %edi            # imm = 0x3C0
cmpl $0x280, %edi            # imm = 0x280
jne 0x33d8
movl $0xa, %eax
retq
pushq %rbp
movq %rsp, %rbp
movq 0x5c0d(%rip), %rdi      # 0x8ff0
leaq 0x2e3e(%rip), %rsi      # 0x6228
callq 0x2130
movq %rax, %rdi
callq 0x2090
movl $0x1, %edi
callq 0x2180
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(COND_Type)
int decode (const COND_Type data) {
  // complete
  if (opts.instrs) { 
    cout << "b";
    printCond(data.instr.b.cond);
    // consider calling your sign extension function here to get the 
    // printout to be consistent
    cout << " 0x" << hex << rf[15] + 2*(int)((char)(data.instr.b.imm))+2 << endl;
  }
  return COND;
}

// Assembly:
leaq 0x51c8(%rip), %rax      # 0x91d4
cmpb $0x1, 0x2(%rax)
jne 0x41d3
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movq 0x4faa(%rip), %r14      # 0x8fd0
leaq 0x229e(%rip), %rsi      # 0x62cb
movl $0x1, %edx
movq %r14, %rdi
callq 0x2170
movzwl %bx, %eax
shrl $0x8, %eax
movl %eax, %ecx
andb $0xf, %cl
cmpb $0xd, %cl
ja 0x41d9
andl $0xf, %eax
leaq 0x2130(%rip), %rcx      # 0x6188
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq 0x4f68(%rip), %rdi      # 0x8fd0
leaq 0x2277(%rip), %rsi      # 0x62e6
jmp 0x414e
movq 0x4f55(%rip), %rdi      # 0x8fd0
leaq 0x2285(%rip), %rsi      # 0x6307
jmp 0x414e
movq 0x4f42(%rip), %rdi      # 0x8fd0
leaq 0x225d(%rip), %rsi      # 0x62f2
jmp 0x414e
movq 0x4f2f(%rip), %rdi      # 0x8fd0
leaq 0x2262(%rip), %rsi      # 0x630a
jmp 0x414e
movq 0x4f1c(%rip), %rdi      # 0x8fd0
leaq 0x2246(%rip), %rsi      # 0x6301
jmp 0x414e
movq 0x4f09(%rip), %rdi      # 0x8fd0
leaq 0x221e(%rip), %rsi      # 0x62ec
jmp 0x414e
movq 0x4ef9(%rip), %rdi      # 0x8fd0
leaq 0x2211(%rip), %rsi      # 0x62ef
jmp 0x414e
movq 0x4ee9(%rip), %rdi      # 0x8fd0
leaq 0x220d(%rip), %rsi      # 0x62fb
jmp 0x414e
movq 0x4ed9(%rip), %rdi      # 0x8fd0
leaq 0x21eb(%rip), %rsi      # 0x62e9
jmp 0x414e
movq 0x4ec9(%rip), %rdi      # 0x8fd0
leaq 0x21e7(%rip), %rsi      # 0x62f5
jmp 0x414e
movq 0x4eb9(%rip), %rdi      # 0x8fd0
leaq 0x21ef(%rip), %rsi      # 0x630d
jmp 0x414e
movq 0x4ea9(%rip), %rdi      # 0x8fd0
leaq 0x21ca(%rip), %rsi      # 0x62f8
jmp 0x414e
movq 0x4e99(%rip), %rdi      # 0x8fd0
leaq 0x21c6(%rip), %rsi      # 0x6304
jmp 0x414e
movq 0x4e89(%rip), %rdi      # 0x8fd0
leaq 0x21b0(%rip), %rsi      # 0x62fe
movl $0x2, %edx
callq 0x2170
leaq 0x216f(%rip), %rsi      # 0x62ce
movl $0x3, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
leaq 0x501e(%rip), %rdi      # 0x91a8
movl $0xf, %esi
callq 0x470a
movsbl %bl, %ecx
leal (%rax,%rcx,2), %esi
addl $0x2, %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
popq %rbx
popq %r14
popq %rbp
movl $0x5, %eax
retq
movq 0x4df0(%rip), %rdi      # 0x8fd0
leaq 0x212c(%rip), %rsi      # 0x6313
xorl %edx, %edx
jmp 0x4153
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(UNCOND_Type)
int decode (const UNCOND_Type data) {
  // complete
  if (opts.instrs) { 
    // consider calling your sign extension function here to get the 
    // printout to be consistent
    cout << "b 0x" << hex << rf[15] + 2*(int)((char)(data.instr.b.imm))+2 << endl;
  }
  return UNCOND;
}

// Assembly:
leaq 0x4fdf(%rip), %rax      # 0x91d4
cmpb $0x1, 0x2(%rax)
jne 0x428a
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movq 0x4dc1(%rip), %r14      # 0x8fd0
leaq 0x20b7(%rip), %rsi      # 0x62cd
movl $0x4, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
leaq 0x4f67(%rip), %rdi      # 0x91a8
movl $0xf, %esi
callq 0x470a
movsbl %bl, %ecx
leal (%rax,%rcx,2), %esi
addl $0x2, %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
popq %rbx
popq %r14
popq %rbp
movl $0x6, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(BL_Type)
BL_Ops decode (const BL_Type data) {
  // complete
  if (opts.instrs) { 
    cout << "bl 0x" << hex << data.instr.bl_upper.imm10 << endl;
  }
  return BL_UPPER;
}

// Assembly:
leaq 0x4f3d(%rip), %rax      # 0x91d4
cmpb $0x1, 0x2(%rax)
jne 0x4317
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movq 0x4d23(%rip), %r14      # 0x8fd0
leaq 0x201e(%rip), %rsi      # 0x62d2
movl $0x5, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
andl $0x3ff, %ebx            # imm = 0x3FF
movq %r14, %rdi
movq %rbx, %rsi
callq 0x20c0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
popq %rbx
popq %r14
popq %rbp
xorl %eax, %eax
retq
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/decode.cpp
// Function: decode(ADD_SP_Type)
int decode (const ADD_SP_Type data) {
  // complete
  if (opts.instrs) { 
    cout << "add r" << data.instr.add.rd << ", sp, #" << data.instr.add.imm*4 << endl;
  }
  return ADD_SP;
}

// Assembly:
leaq 0x4e92(%rip), %rax      # 0x91d4
cmpb $0x1, 0x2(%rax)
jne 0x43d3
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
movq 0x4c74(%rip), %r14      # 0x8fd0
leaq 0x1f75(%rip), %rsi      # 0x62d8
movl $0x5, %edx
movq %r14, %rdi
callq 0x2170
movl %ebx, %esi
shrl $0x8, %esi
andl $0x7, %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r14
leaq 0x1f54(%rip), %rsi      # 0x62de
movl $0x7, %edx
movq %rax, %rdi
callq 0x2170
movzbl %bl, %esi
shll $0x2, %esi
movq %r14, %rdi
callq 0x2210
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
popq %rbx
popq %r14
popq %rbp
movl $0xa, %eax
retq
nopl (%rax)
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: Memory<Data8, Data32>::write(unsigned int, Data32)
void Memory<Data8, Data32>::write(const unsigned int addr, const Data32 data) {
  // data is in native format
  //   if little-endian, 3210 (MSB=3)
  // memory is in big-endian format (0123, MSB=0)
  int i;
  unsigned int myAddr = addr - base;
  if (size() < myAddr + 4) {
    m.resize(myAddr + 4, 0);
  }
  if (myAddr < lowest) lowest = myAddr;
  if (myAddr > highest) highest = myAddr;
  if (opts.writes) {
    cout << hex << addr << ": " << data << " ( ";
    for (i = 0 ; i < 4 ; i++) {
      cout << static_cast<unsigned int>(data.data_ubyte4(i)) << ' ';
    }
    cout << ")" << endl;
  }
  for (i = 0 ; i < 4 ; i++) {
    m[myAddr+i] = Data8(data.data_ubyte4(i));
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %r12d
movq %rdi, %rbx
movl %edx, -0x30(%rbp)
movl 0x8(%rdi), %ecx
movl %esi, %r13d
subl 0x18(%rdi), %r13d
subl (%rdi), %ecx
leal 0x4(%r13), %eax
cmpl %ecx, %eax
jbe 0x441b
movl %eax, %esi
leaq -0x2a(%rbp), %rdx
movb $0x0, (%rdx)
movq %rbx, %rdi
callq 0x4c40
cmpl 0x1c(%rbx), %r13d
jae 0x4425
movl %r13d, 0x1c(%rbx)
cmpl 0x20(%rbx), %r13d
jbe 0x442f
movl %r13d, 0x20(%rbx)
leaq 0x4d9e(%rip), %rax      # 0x91d4
cmpb $0x1, 0x3(%rax)
jne 0x450b
movq 0x4b89(%rip), %r14      # 0x8fd0
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
movl %r12d, %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r12
leaq 0x1cad(%rip), %rsi      # 0x6120
movl $0x2, %edx
movq %rax, %rdi
callq 0x2170
movl %r15d, %esi
movq %r12, %rdi
callq 0x20c0
leaq 0x1e7e(%rip), %rsi      # 0x6310
movl $0x3, %edx
movq %rax, %rdi
callq 0x2170
movl $0x4, %r12d
leaq -0x29(%rbp), %r15
movzbl -0x31(%rbp,%r12), %esi
movq %r14, %rdi
callq 0x20c0
movb $0x20, -0x29(%rbp)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
decq %r12
jne 0x44a9
leaq 0x1c69(%rip), %rsi      # 0x6140
movl $0x1, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movl $0x4, %eax
movb -0x31(%rbp,%rax), %cl
movl %r13d, %edx
movq (%rbx), %rsi
movb %cl, (%rsi,%rdx)
incl %r13d
decq %rax
jne 0x4510
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: Memory<Data16, Data16>::write(unsigned int, Data16)
void Memory<Data16, Data16>::write(const unsigned int addr, const Data16 data) {
  // data is in native format
  int i;
  unsigned short myAddr = addr - base;
  if (size() < myAddr + 2) {
    m.resize(myAddr + 2, 0);
  }
  if (myAddr < lowest) lowest = myAddr;
  if (myAddr > highest) highest = myAddr;
  if (opts.writes) {
    cout << hex << addr << ": " << data << " ( ";
    for (i = 0 ; i < 2 ; i++) {
      cout << static_cast<unsigned int>(data.data_ubyte2(i)) << ' ';
    }
    cout << ")" << endl;
  }

  m[myAddr] = data;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, %r15d
movq %rdi, %rbx
movl %esi, %r12d
subl 0x18(%rdi), %r12d
movl %edx, -0x30(%rbp)
movq 0x8(%rdi), %rcx
subq (%rdi), %rcx
shrq %rcx
andl $0xffff, %r12d          # imm = 0xFFFF
leal 0x2(%r12), %eax
cmpl %ecx, %eax
jbe 0x4582
movl %eax, %esi
leaq -0x32(%rbp), %rdx
movw $0x0, (%rdx)
movq %rbx, %rdi
callq 0x4c76
cmpl 0x1c(%rbx), %r12d
jae 0x458c
movl %r12d, 0x1c(%rbx)
cmpl 0x20(%rbx), %r12d
jbe 0x4596
movl %r12d, 0x20(%rbx)
leaq 0x4c37(%rip), %rax      # 0x91d4
cmpb $0x1, 0x3(%rax)
jne 0x4695
movl -0x30(%rbp), %eax
movzbl %ah, %ecx
movq %rcx, -0x40(%rbp)
movl %eax, %r13d
movq 0x4a15(%rip), %r14      # 0x8fd0
movq (%r14), %rax
movq -0x18(%rax), %rax
movl 0x18(%r14,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r14,%rax)
movl %r15d, %esi
movq %r14, %rdi
callq 0x20c0
movq %rax, %r15
leaq 0x1b39(%rip), %rsi      # 0x6120
movl $0x2, %edx
movq %rax, %rdi
callq 0x2170
movzwl %r13w, %esi
movq %r15, %rdi
callq 0x20c0
leaq 0x1d09(%rip), %rsi      # 0x6310
movl $0x3, %edx
movq %rax, %rdi
callq 0x2170
movq %r14, %rdi
movq -0x40(%rbp), %rsi
callq 0x20c0
movb $0x20, %cl
leaq -0x29(%rbp), %r15
movb %cl, (%r15)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
movzbl %r13b, %esi
movq %r14, %rdi
callq 0x20c0
movb $0x20, %cl
movb %cl, (%r15)
movl $0x1, %edx
movq %rax, %rdi
movq %r15, %rsi
callq 0x2170
leaq 0x1adf(%rip), %rsi      # 0x6140
movl $0x1, %edx
movq %r14, %rdi
callq 0x2170
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
movq (%rbx), %rax
movl %r12d, %ecx
movl -0x30(%rbp), %edx
movw %dx, (%rax,%rcx,2)
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/thumbsim_driver.cpp
// Function: Memory<Data8, Data32>::dump(DataType) const
void Memory<Data8, Data32>::dump(DataType dt) const {
  Data32 d(0);
  unsigned int addr;
  for (addr = lowest ; addr <= highest + 3 ; addr++) {
    unsigned int byte = addr & 0x3;
    d.set_data_ubyte4(byte, m[addr]);
    if ((byte == 0x3) && (dt == INSTRUCTIONS)) {
      cout << hex << d << endl;
    } else if ((byte == 0x3) && (dt == DATA) && (d.data_uint() != 0)) {
      cout << hex << addr - 3 + getBase() << ": " << d << endl;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movl %esi, -0x30(%rbp)
movl $0x0, -0x2c(%rbp)
movl 0x1c(%rdi), %r12d
movl 0x20(%rdi), %eax
addl $0x3, %eax
cmpl %eax, %r12d
ja 0x4832
movq %rdi, %r14
movq 0x487e(%rip), %r15      # 0x8fd0
movl -0x30(%rbp), %eax
xorl $0x1, %eax
movl %eax, -0x34(%rbp)
movl %r12d, %eax
andl $0x3, %eax
movl %r12d, %ecx
movq (%r14), %rdx
movb (%rdx,%rcx), %cl
movq %rax, %rdx
xorq $0x3, %rdx
movb %cl, -0x2c(%rbp,%rdx)
xorl $0x3, %eax
movl -0x30(%rbp), %ecx
orl %eax, %ecx
jne 0x479e
movq (%r15), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r15,%rax)
movl -0x2c(%rbp), %ebx
movq %r15, %r13
jmp 0x47eb
orl -0x34(%rbp), %eax
jne 0x481f
movl -0x2c(%rbp), %ebx
testl %ebx, %ebx
je 0x481f
movq (%r15), %rax
movq -0x18(%rax), %rax
movl 0x18(%r15,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, 0x18(%r15,%rax)
movl 0x18(%r14), %eax
leal (%r12,%rax), %esi
addl $-0x3, %esi
movq %r15, %rdi
callq 0x20c0
movq %rax, %r13
movl $0x2, %edx
movq %rax, %rdi
leaq 0x193a(%rip), %rsi      # 0x6120
callq 0x2170
movl %ebx, %esi
movq %r13, %rdi
callq 0x20c0
movq %rax, %r13
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %r13, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20d0
incl %r12d
movl 0x20(%r14), %eax
addl $0x3, %eax
cmpl %eax, %r12d
jbe 0x475b
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O3/Lupo-CalPoly[P]cpe315-thumbsim/parse.cpp
// Function: parse(char const*)
void parse(const char * file) {
  ifstream in(file);
  string s;
  unsigned int addr;
  in >> hex;                    // in takes hex numbers
  in >> s;
  if (s != "PC") {
    exit(1);
  }
  in >> addr;
  pc = addr;
  parseMem(in, "instruction");
  parseMem(in, "data");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x278, %rsp            # imm = 0x278
movq %rdi, %rsi
leaq -0x288(%rbp), %rbx
movq %rbx, %rdi
movl $0x8, %edx
callq 0x2250
leaq -0x70(%rbp), %r14
movq %r14, -0x10(%r14)
movq $0x0, -0x8(%r14)
movb $0x0, (%r14)
movq (%rbx), %rax
movq -0x18(%rax), %rax
movl -0x270(%rbp,%rax), %ecx
andl $-0x4b, %ecx
orl $0x8, %ecx
movl %ecx, -0x270(%rbp,%rax)
leaq -0x80(%rbp), %rsi
movq %rbx, %rdi
callq 0x2190
leaq 0xf7b(%rip), %rsi       # 0x646e
leaq -0x80(%rbp), %rdi
callq 0x2060
testl %eax, %eax
jne 0x55d7
leaq -0x288(%rbp), %rdi
leaq -0x1c(%rbp), %rsi
callq 0x2220
movl -0x1c(%rbp), %eax
leaq 0x3cb2(%rip), %rcx      # 0x91d0
movl %eax, (%rcx)
leaq -0x50(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xee7(%rip), %rsi       # 0x6416
leaq 0xeeb(%rip), %rdx       # 0x6421
leaq -0x60(%rbp), %rdi
callq 0x563e
leaq -0x288(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x5198
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x5564
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2150
leaq -0x30(%rbp), %r15
movq %r15, -0x10(%r15)
leaq 0xe87(%rip), %rsi       # 0x63fa
leaq 0xe84(%rip), %rdx       # 0x63fe
leaq -0x40(%rbp), %rdi
callq 0x563e
leaq -0x288(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x5198
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x55a8
movq -0x30(%rbp), %rsi
incq %rsi
callq 0x2150
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x55bd
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2150
leaq -0x288(%rbp), %rdi
callq 0x2050
addq $0x278, %rsp            # imm = 0x278
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movl $0x1, %edi
callq 0x2180
movq %rax, %rbx
movq -0x40(%rbp), %rdi
cmpq %r15, %rdi
je 0x5614
movq -0x30(%rbp), %rsi
jmp 0x5605
jmp 0x5611
movq %rax, %rbx
movq -0x60(%rbp), %rdi
cmpq %r15, %rdi
je 0x5614
movq -0x50(%rbp), %rsi
incq %rsi
callq 0x2150
jmp 0x5614
jmp 0x5611
movq %rax, %rbx
movq -0x80(%rbp), %rdi
cmpq %r14, %rdi
je 0x5629
movq -0x70(%rbp), %rsi
incq %rsi
callq 0x2150
leaq -0x288(%rbp), %rdi
callq 0x2050
movq %rbx, %rdi
callq 0x2230
nop