LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O1/danomatika[P]miditester/src/RtMidi.cpp
// Function: RtMidiOut::openMidiApi(RtMidi::Api, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void RtMidiOut :: openMidiApi( RtMidi::Api api, const std::string clientName )
{
  if ( rtapi_ )
    delete rtapi_;
  rtapi_ = 0;

#if defined(__UNIX_JACK__)
  if ( api == UNIX_JACK )
    rtapi_ = new MidiOutJack( clientName );
#endif
#if defined(__LINUX_ALSA__)
  if ( api == LINUX_ALSA )
    rtapi_ = new MidiOutAlsa( clientName );
#endif
#if defined(__WINDOWS_MM__)
  if ( api == WINDOWS_MM )
    rtapi_ = new MidiOutWinMM( clientName );
#endif
#if defined(__MACOSX_CORE__)
  if ( api == MACOSX_CORE )
    rtapi_ = new MidiOutCore( clientName );
#endif
#if defined(__RTMIDI_DUMMY__)
  if ( api == RTMIDI_DUMMY )
    rtapi_ = new MidiOutDummy( clientName );
#endif
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdx, %r15
movl %esi, %ebx
movq %rdi, %r14
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0x6dc2
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%r14)
cmpl $0x5, %ebx
jne 0x6e22
movl $0x50, %edi
callq 0x3190
movq %rax, %rbx
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x6722
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x789c
movq %rbx, 0x8(%r14)
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e22
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31a0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x6e4d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31a0
jmp 0x6e4d
movq %rax, %r14
movl $0x50, %esi
movq %rbx, %rdi
callq 0x31a0
movq %r14, %rdi
callq 0x3280
// File: /workspace/github_cpp_makefile_star2_O1/danomatika[P]miditester/src/RtMidi.cpp
// Function: MidiApi::error(RtMidiError::Type, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void MidiApi :: error( RtMidiError::Type type, std::string errorString )
{
  if ( errorCallback_ ) {

    if ( firstErrorOccurred_ )
      return;

    firstErrorOccurred_ = true;
    const std::string errorMessage = errorString;

    errorCallback_( type, errorMessage, errorCallbackUserData_);
    firstErrorOccurred_ = false;
    return;
  }

  if ( type == RtMidiError::WARNING ) {
    std::cerr << '\n' << errorString << "\n\n";
  }
  else if ( type == RtMidiError::DEBUG_WARNING ) {
#if defined(__RTMIDI_DEBUG__)
    std::cerr << '\n' << errorString << "\n\n";
#endif
  }
  else {
    std::cerr << '\n' << errorString << "\n\n";
    throw RtMidiError( errorString, type );
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
movq %rdx, %rbx
movl %esi, %ebp
cmpq $0x0, 0x38(%rdi)
je 0x71b3
movq %rdi, %r14
cmpb $0x0, 0x40(%rdi)
jne 0x71f8
movb $0x1, 0x40(%r14)
leaq 0x18(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x6722
movq 0x48(%r14), %rdx
movl %ebp, %edi
movq %rbx, %rsi
callq *0x38(%r14)
movb $0x0, 0x40(%r14)
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x71f8
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31a0
jmp 0x71f8
cmpl $0x1, %ebp
je 0x71f8
testl %ebp, %ebp
jne 0x7203
leaq 0x8(%rsp), %rsi
movb $0xa, (%rsi)
movq 0x4e25(%rip), %rdi      # 0xbff0
movl $0x1, %edx
callq 0x31b0
movq (%rbx), %rsi
movq 0x8(%rbx), %rdx
movq %rax, %rdi
callq 0x31b0
leaq 0x154d(%rip), %rsi      # 0x8738
movl $0x2, %edx
movq %rax, %rdi
callq 0x31b0
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq 0x4de6(%rip), %rdi      # 0xbff0
movl $0xa, %esi
callq 0x31c0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3160
leaq 0x1512(%rip), %rsi      # 0x8738
movq %rax, %rdi
callq 0x3180
movl $0x30, %edi
callq 0x30d0
movq %rax, %r14
movq %rax, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x7826
leaq 0x4a09(%rip), %rsi      # 0xbc58
leaq 0x616(%rip), %rdx       # 0x786c
movq %r14, %rdi
callq 0x3260
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %r15, %rdi
je 0x7278
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x31a0
movq %rbx, %rdi
callq 0x3280
// File: /workspace/github_cpp_makefile_star2_O1/danomatika[P]miditester/src/RtMidi.cpp
// Function: MidiInApi::MidiInApi(unsigned int)
MidiInApi :: MidiInApi( unsigned int queueSizeLimit )
  : MidiApi()
{
  // Allocate the MIDI queue.
  inputData_.queue.ringSize = queueSizeLimit;
  if ( inputData_.queue.ringSize > 0 )
    inputData_.queue.ring = new MidiMessage[ inputData_.queue.ringSize ];
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
xorl %eax, %eax
movq %rax, 0x8(%rdi)
movb %al, 0x10(%rdi)
leaq 0x28(%rdi), %r12
movq %r12, 0x18(%rdi)
movq %rax, 0x20(%rdi)
movb %al, 0x28(%rdi)
movq %rax, 0x38(%rdi)
movq %rax, 0x48(%rdi)
leaq 0x4876(%rip), %rcx      # 0xbb28
movq %rcx, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x50(%rdi)
movups %xmm0, 0x68(%rdi)
movups %xmm0, 0x78(%rdi)
movw $0x7, 0x88(%rdi)
movb $0x1, 0x8a(%rdi)
movq %rax, 0x90(%rdi)
movb %al, 0x98(%rdi)
movups %xmm0, 0xa0(%rdi)
movb %al, 0xb0(%rdi)
movl %esi, 0x5c(%rdi)
testl %esi, %esi
je 0x7329
movq %rdi, %rbx
leaq 0x68(%rdi), %r13
movl %esi, %ebp
movq %rbp, %r14
shlq $0x5, %r14
leaq 0x8(%r14), %rdi
callq 0x3030
movq %rax, %r15
movq %rbp, (%rax)
addq $0x8, %r15
movq %r15, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x3100
movq %r15, 0x60(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq (%r13), %rdi
testq %rdi, %rdi
je 0x7350
movq 0x78(%rbx), %rsi
subq %rdi, %rsi
callq 0x31a0
leaq 0x4779(%rip), %rax      # 0xbad0
movq %rax, (%rbx)
movq 0x18(%rbx), %rdi
cmpq %r12, %rdi
je 0x736f
movq (%r12), %rsi
incq %rsi
callq 0x31a0
movq %r14, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O1/danomatika[P]miditester/src/RtMidi.cpp
// Function: MidiInApi::setCallback(void (*)(double, std::vector<unsigned char, std::allocator<unsigned char>>*, void*), void*)
void MidiInApi :: setCallback( RtMidiIn::RtMidiCallback callback, void *userData )
{
  if ( inputData_.usingCallback ) {
    errorString_ = "MidiInApi::setCallback: a callback function is already set!";
    error( RtMidiError::WARNING, errorString_ );
    return;
  }

  if ( !callback ) {
    errorString_ = "RtMidiIn::setCallback: callback function value is invalid!";
    error( RtMidiError::WARNING, errorString_ );
    return;
  }

  inputData_.userCallback = callback;
  inputData_.userData = userData;
  inputData_.usingCallback = true;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movq %rdi, %rbx
cmpb $0x1, 0x98(%rdi)
jne 0x73ee
leaq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
leaq 0x1456(%rip), %rcx      # 0x87f4
movl $0x3b, %r8d
xorl %esi, %esi
callq 0x3210
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %r14
movq %r14, %rdi
callq 0x6722
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7140
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x7468
movq 0x30(%rsp), %rsi
jmp 0x7460
testq %rsi, %rsi
je 0x740a
movq %rsi, 0xa0(%rbx)
movq %rdx, 0xa8(%rbx)
movb $0x1, 0x98(%rbx)
jmp 0x7468
leaq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
leaq 0x1417(%rip), %rcx      # 0x8830
movl $0x3a, %r8d
xorl %esi, %esi
callq 0x3210
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x6722
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7140
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7468
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31a0
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
jmp 0x7483
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x7493
movq (%r15), %rsi
incq %rsi
callq 0x31a0
movq %rbx, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O1/danomatika[P]miditester/src/RtMidi.cpp
// Function: MidiInApi::cancelCallback()
void MidiInApi :: cancelCallback()
{
  if ( !inputData_.usingCallback ) {
    errorString_ = "RtMidiIn::cancelCallback: no callback function was set!";
    error( RtMidiError::WARNING, errorString_ );
    return;
  }

  inputData_.userCallback = 0;
  inputData_.userData = 0;
  inputData_.usingCallback = false;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
cmpb $0x0, 0x98(%rdi)
je 0x74c4
movb $0x0, 0x98(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0xa0(%rbx)
jmp 0x7522
leaq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
leaq 0x1398(%rip), %rcx      # 0x886b
movl $0x37, %r8d
xorl %esi, %esi
callq 0x3210
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x6722
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7140
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7522
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31a0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7545
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31a0
movq %rbx, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O1/danomatika[P]miditester/src/RtMidi.cpp
// Function: MidiInApi::getMessage(std::vector<unsigned char, std::allocator<unsigned char>>*)
double MidiInApi :: getMessage( std::vector<unsigned char> *message )
{
  message->clear();

  if ( inputData_.usingCallback ) {
    errorString_ = "RtMidiIn::getNextMessage: a user callback is currently set for this port.";
    error( RtMidiError::WARNING, errorString_ );
    return 0.0;
  }

  if ( inputData_.queue.size == 0 ) return 0.0;

  // Copy queued message to the vector pointer argument and then "pop" it.
  std::vector<unsigned char> *bytes = &(inputData_.queue.ring[inputData_.queue.front].bytes);
  message->assign( bytes->begin(), bytes->end() );
  double deltaTime = inputData_.queue.ring[inputData_.queue.front].timeStamp;
  inputData_.queue.size--;
  inputData_.queue.front++;
  if ( inputData_.queue.front == inputData_.queue.ringSize )
    inputData_.queue.front = 0;

  return deltaTime;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x20, %rsp
movq %rdi, %rbx
movq (%rsi), %rax
cmpq %rax, 0x8(%rsi)
je 0x7585
movq %rax, 0x8(%rsi)
cmpb $0x1, 0x98(%rbx)
jne 0x75f1
leaq 0x18(%rbx), %rdi
movq 0x20(%rbx), %rdx
leaq 0x1306(%rip), %rcx      # 0x88a3
movl $0x49, %r8d
xorl %esi, %esi
callq 0x3210
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq 0x18(%rbx), %rsi
movq 0x20(%rbx), %rdx
addq %rsi, %rdx
movq %rsp, %r14
movq %r14, %rdi
callq 0x6722
movq %rbx, %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x7140
movq (%rsp), %rdi
xorps %xmm0, %xmm0
cmpq %r15, %rdi
je 0x7640
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31a0
jmp 0x763d
cmpl $0x0, 0x58(%rbx)
je 0x763d
movq 0x60(%rbx), %rcx
movl 0x50(%rbx), %edx
shlq $0x5, %rdx
movq (%rcx,%rdx), %rax
movq 0x8(%rcx,%rdx), %rdx
movq %rsi, %rdi
movq %rax, %rsi
callq 0x7e70
movq 0x60(%rbx), %rax
movl 0x50(%rbx), %ecx
movq %rcx, %rdx
shlq $0x5, %rdx
movsd 0x18(%rax,%rdx), %xmm0
decl 0x58(%rbx)
leal 0x1(%rcx), %eax
xorl %ecx, %ecx
cmpl 0x5c(%rbx), %eax
cmovnel %eax, %ecx
movl %ecx, 0x50(%rbx)
jmp 0x7640
xorps %xmm0, %xmm0
addq $0x20, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x7663
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x31a0
movq %rbx, %rdi
callq 0x3280
nop
// File: /workspace/github_cpp_makefile_star2_O1/tomfunkhouser[P]gaps/apps/mshalign/mshalign.cpp
// Function: ReadMesh(char const*)
static R3Mesh *
ReadMesh(const char *filename)
{
  // Start statistics
  RNTime start_time;
  start_time.Read();

  // Allocate mesh
  R3Mesh *mesh = new R3Mesh();
  assert(mesh);

  // Read mesh from file
  if (!mesh->ReadFile(filename)) {
    delete mesh;
    return NULL;
  }

  // Check if mesh is valid
  assert(mesh->IsValid());

  // Print statistics
  if (print_verbose) {
    printf("Read mesh from %s ...\n", filename);
    printf("  Time = %.2f seconds\n", start_time.Elapsed());
    printf("  # Faces = %d\n", mesh->NFaces());
    printf("  # Edges = %d\n", mesh->NEdges());
    printf("  # Vertices = %d\n", mesh->NVertices());
    fflush(stdout);
  }

  // Return mesh
  return mesh;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rdi, %r14
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
callq 0x55804
movq %rbx, %rdi
xorl %esi, %esi
callq 0xc5b0
movl $0x138, %edi            # imm = 0x138
callq 0xc370
movq %rax, %rbx
movq %rax, %rdi
callq 0x22550
movq (%rbx), %rax
movq %rbx, %rdi
movq %r14, %rsi
callq *0x180(%rax)
testl %eax, %eax
je 0x10b35
cmpb $0x1, 0x6e012(%rip)     # 0x7ead8
jne 0x10b40
leaq 0x48712(%rip), %rdi     # 0x591e1
movq %r14, %rsi
xorl %eax, %eax
callq 0xc070
leaq 0x8(%rsp), %rdi
callq 0x55866
leaq 0x4870e(%rip), %rdi     # 0x591f8
movb $0x1, %al
callq 0xc070
movl 0x34(%rbx), %esi
leaq 0x48714(%rip), %rdi     # 0x5920f
xorl %eax, %eax
callq 0xc070
movl 0x24(%rbx), %esi
leaq 0x48713(%rip), %rdi     # 0x5921f
xorl %eax, %eax
callq 0xc070
movl 0x14(%rbx), %esi
leaq 0x48712(%rip), %rdi     # 0x5922f
xorl %eax, %eax
callq 0xc070
movq 0x6d45d(%rip), %rax     # 0x7df88
movq (%rax), %rdi
callq 0xc430
jmp 0x10b40
movq (%rbx), %rax
movq %rbx, %rdi
callq *0x8(%rax)
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movl $0x138, %esi            # imm = 0x138
movq %rbx, %rdi
callq 0xc380
movq %r14, %rdi
callq 0xc620
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/./assembler.h
// Function: Assembler::Assembler(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
Assembler::Assembler(string path)
{
	this -> iSet = InstructionSet();
	this -> buffer = list<string>();
	this -> sTable = SymbolTable();
	this -> filePath = path;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, 0x8(%rsp)
movq %rdi, %rbx
callq 0x2650
leaq 0x20(%rbx), %r14
movq %r14, 0x28(%rbx)
movq %r14, 0x20(%rbx)
xorl %r12d, %r12d
movq %r12, 0x30(%rbx)
leaq 0x38(%rbx), %r15
movq %r15, %rdi
callq 0x33d8
leaq 0x50(%rbx), %r13
leaq 0x60(%rbx), %rax
movq %rax, (%rsp)
movq %rax, 0x50(%rbx)
movq %r12, 0x58(%rbx)
movb $0x0, 0x60(%rbx)
leaq 0x10(%rsp), %rdi
callq 0x2650
xorps %xmm0, %xmm0
leaq 0x30(%rsp), %rdi
movaps %xmm0, (%rdi)
xorl %r12d, %r12d
movq %r12, 0x10(%rdi)
movq (%rbx), %rax
movups 0x8(%rbx), %xmm0
leaq 0x10(%rsp), %rbp
movq (%rbp), %rcx
movq %rcx, (%rbx)
movq 0x8(%rbp), %rcx
movq %rcx, 0x8(%rbx)
movq 0x10(%rbp), %rcx
movq %rcx, 0x10(%rbx)
movq (%rdi), %rcx
movq 0x8(%rdi), %rdx
movq 0x10(%rdi), %rsi
movq %rax, (%rdi)
movups %xmm0, 0x8(%rdi)
movq %rcx, (%rbp)
movq %rdx, 0x8(%rbp)
movq %rsi, 0x10(%rbp)
callq 0x5b46
movl 0x18(%rbp), %eax
movl %eax, 0x18(%rbx)
movq %rbp, %rdi
callq 0x5b46
xorps %xmm0, %xmm0
movaps %xmm0, (%rbp)
movq %r12, 0x10(%rbp)
movq %rbp, 0x8(%rbp)
movq %rbp, (%rbp)
movq %r14, %rdi
movq %rbp, %rsi
callq 0x5fb4
movq %rbp, %rdi
callq 0x5df2
leaq 0x10(%rsp), %rbp
movq %rbp, %rdi
callq 0x33d8
movq %r15, %rdi
movq %rbp, %rsi
callq 0x601e
movq %rbp, %rdi
callq 0x5e38
movq %r13, %rdi
movq 0x8(%rsp), %rsi
callq 0x2110
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2612
movq %r13, %rcx
movq %rax, %r13
movq (%rcx), %rdi
cmpq (%rsp), %rdi
je 0x2630
movq (%rsp), %rax
movq (%rax), %rsi
incq %rsi
callq 0x21f0
movq %r15, %rdi
callq 0x5e38
movq %r14, %rdi
callq 0x5df2
movq %rbx, %rdi
callq 0x5b46
movq %r13, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/./assembler.h
// Function: SymbolTable::contains(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
bool SymbolTable::contains(string label)
{
	list<SymbolNode>::iterator it;

	for(it = table.begin(); it != table.end(); ++it)
	{
		string cLabel = (*it).getLabel();

		if(label == cLabel)
		{
			return true;
		}
	}

	return false;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x18(%rsp), %r12
leaq 0x8(%rsp), %r15
movq %rdi, %r13
movq (%r13), %r13
cmpq %rbx, %r13
je 0x2dda
movq %r12, 0x8(%rsp)
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
addq %rsi, %rdx
movq %r15, %rdi
callq 0x5ee4
movq 0x8(%r14), %rdx
cmpq 0x10(%rsp), %rdx
jne 0x2db7
testq %rdx, %rdx
je 0x2dbb
movq 0x8(%rsp), %rsi
movq (%r14), %rdi
callq 0x2200
testl %eax, %eax
sete %bpl
jmp 0x2dbe
xorl %ebp, %ebp
jmp 0x2dbe
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x2dd5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
testb %bpl, %bpl
je 0x2d71
cmpq %rbx, %r13
setne %al
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/./assembler.h
// Function: SymbolTable::printTable()
void SymbolTable::printTable()
{
	list<SymbolNode>::iterator it;

	cout << "SYMBOL TABLE: " << endl;

	for(it = table.begin(); it != table.end(); ++it)
	{
		cout << "Label: " << (*it).getLabel() << "\t Address: " << (*it).getAddress() << endl;
	}
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %rbx
movq 0x71c8(%rip), %r14      # 0x9fd0
leaq 0x424b(%rip), %rsi      # 0x705a
movl $0xe, %edx
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq (%rbx), %r13
cmpq %rbx, %r13
je 0x2f48
leaq 0x38(%rsp), %r12
leaq 0x18(%rsp), %rbp
movq 0x7170(%rip), %r14      # 0x9fd0
movl $0x7, %edx
movq %r14, %rdi
leaq 0x41fa(%rip), %rsi      # 0x7069
callq 0x2230
movq %r12, 0x28(%rsp)
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %rdi
callq 0x5ee4
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %r14, %rdi
callq 0x2230
movq %rax, %r15
movl $0xb, %edx
movq %rax, %rdi
leaq 0x41bf(%rip), %rsi      # 0x7071
callq 0x2230
movq %rbp, 0x8(%rsp)
movq 0x30(%r13), %rsi
movq 0x38(%r13), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x5ee4
movq 0x8(%rsp), %rsi
movq 0x10(%rsp), %rdx
movq %r15, %rdi
callq 0x2230
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f24
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f3b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
movq (%r13), %r13
cmpq %rbx, %r13
jne 0x2e60
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2f59
movq %rax, %rbx
jmp 0x2f78
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2f78
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x28(%rsp), %rdi
cmpq %r12, %rdi
je 0x2f8f
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/./assembler.h
// Function: SymbolTable::addAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void SymbolTable::addAddress(string label, string address)
{
	if(contains(label))
	{
		list<SymbolNode>::iterator it;

		for (it = table.begin(); it != table.end(); ++it)
		{
			if ((*it).getLabel() == label)
			{
				(*it).setAddress(address);
				return;
			}
		}

	}


	cout << "error undeclared variable" << endl;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r13
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x58(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsi), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x48(%rsp), %r12
movq %r12, %rdi
callq 0x5ee4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2d50
movl %eax, %ebp
movq %r13, (%rsp)
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x3141
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21f0
testb %bpl, %bpl
je 0x3210
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %r12
movq %rbx, %r13
movq (%r13), %r13
cmpq %rbx, %r13
je 0x3210
movq %r14, 0x8(%rsp)
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5ee4
movq 0x10(%rsp), %rdx
cmpq 0x8(%r15), %rdx
jne 0x31a1
testq %rdx, %rdx
je 0x31a5
movq (%r15), %rsi
movq 0x8(%rsp), %rdi
callq 0x2200
testl %eax, %eax
sete %bpl
jmp 0x31a8
xorl %ebp, %ebp
jmp 0x31a8
movb $0x1, %bpl
movq 0x8(%rsp), %rdi
cmpq %r14, %rdi
je 0x31bf
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
testb %bpl, %bpl
je 0x3157
leaq 0x38(%rsp), %r14
movq %r14, -0x10(%r14)
movq (%rsp), %rax
movq (%rax), %rsi
movq 0x8(%rax), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r15
movq %r15, %rdi
callq 0x5ee4
leaq 0x30(%r13), %rdi
movq %r15, %rsi
callq 0x2110
movq 0x28(%rsp), %rdi
cmpq %r14, %rdi
je 0x320b
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
cmpq %rbx, %r13
jne 0x3252
movq 0x6db9(%rip), %rbx      # 0x9fd0
leaq 0x3e5f(%rip), %rsi      # 0x707d
movl $0x19, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
jmp 0x3273
movq %rax, %rbx
movq 0x48(%rsp), %rdi
cmpq %r14, %rdi
je 0x3283
movq (%r14), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/./assembler.h
// Function: SymbolTable::getAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string SymbolTable::getAddress(string label)
{
	if (contains(label))
	{
		list<SymbolNode>::iterator it;

		for(it = table.begin(); it != table.end(); ++it)
		{
			if ((*it).getLabel() == label)
			{
				return (*it).getAddress();
			}
		}
	}
	else
	{
		// return mem address 0 will be overwritten "later"
		return "000000";
	}
	//Should never get here
	return "000000";
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, (%rsp)
leaq 0x38(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x28(%rsp), %r12
movq %r12, %rdi
callq 0x5ee4
movq %r14, %rdi
movq %r12, %rsi
callq 0x2d50
movl %eax, %ebp
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x32e8
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
testb %bpl, %bpl
je 0x3384
leaq 0x18(%rsp), %rbp
leaq 0x8(%rsp), %r12
movq %r14, %r13
movq (%r13), %r13
cmpq %r14, %r13
je 0x3384
movq %rbp, 0x8(%rsp)
movq 0x10(%r13), %rsi
movq 0x18(%r13), %rdx
addq %rsi, %rdx
movq %r12, %rdi
callq 0x5ee4
movq 0x10(%rsp), %rdx
cmpq 0x8(%r15), %rdx
jne 0x3343
testq %rdx, %rdx
je 0x3347
movq (%r15), %rsi
movq 0x8(%rsp), %rdi
callq 0x2200
testl %eax, %eax
sete %bl
jmp 0x3349
xorl %ebx, %ebx
jmp 0x3349
movb $0x1, %bl
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x3360
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
testb %bl, %bl
je 0x32fe
movq (%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
movq 0x30(%r13), %rsi
movq 0x38(%r13), %rdx
addq %rsi, %rdx
callq 0x5ee4
cmpq %r14, %r13
jne 0x33a2
movq (%rsp), %rdi
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
leaq 0x3d01(%rip), %rsi      # 0x7097
leaq 0x3d00(%rip), %rdx      # 0x709d
callq 0x6088
movq (%rsp), %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq 0x28(%rsp), %rdi
cmpq %r13, %rdi
je 0x33cf
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/./assembler.h
// Function: decToBinaryString[abi:cxx11](int, int)
string decToBinaryString(int dec, int length)
{
	string bin = ""; // vector to hold binary value (in this case size 8 for rule.)
	//cout << dec << endl;

	int i;
	for ( i=length; dec>0; i--)
	{
		// take the remainder of the dec / 2 and save it to the vector
		// this value will always be 1 or 0
		int mod = (dec%2);

		if (mod == 1)
		{
			bin += "1";
		}
		else
		{
			bin += "0";
		}

		// update dec
		dec /= 2;
	}

	while (i > 0)
	{
		bin += "0";
		i--;
	}
		//cout << bin <<endl;
		return bin;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movl %esi, %r14d
movq %rdi, %rbx
leaq 0x10(%rdi), %r15
movq %r15, (%rdi)
leaq 0x3ccb(%rip), %rdx      # 0x7100
movq %rdx, %rsi
callq 0x6088
testl %r14d, %r14d
jle 0x3473
leaq 0x3c53(%rip), %r12      # 0x709c
leaq 0x3c4e(%rip), %r13      # 0x709e
testb $0x1, %r14b
movq %r13, %rsi
cmoveq %r12, %rsi
movq %rbx, %rdi
callq 0x2370
movl %r14d, %eax
shrl %eax
decl %ebp
cmpl $0x2, %r14d
movl %eax, %r14d
jae 0x3450
testl %ebp, %ebp
jle 0x3492
incl %ebp
leaq 0x3c1c(%rip), %r14      # 0x709c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2370
decl %ebp
cmpl $0x1, %ebp
jg 0x3480
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x34a6
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x34bc
movq (%r15), %rsi
incq %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/assembler.cpp
// Function: Assembler::assemble()
void Assembler::assemble()
{
	try
	{
		assembleFirstPass();
		assembleSecondPass();
		flushBufferToFile();
	}
	catch(AssemblerException e)
	{
		cout << "\033[1;31mAssembler Error: \033[0m" << e.what() << endl;
	}
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
movq %rdi, %rbx
callq 0x3570
movq %rbx, %rdi
callq 0x3888
movq %rbx, %rdi
callq 0x3afc
addq $0x30, %rsp
popq %rbx
retq
movq %rax, %rbx
cmpl $0x1, %edx
jne 0x3560
movq %rbx, %rdi
callq 0x2260
leaq 0x8(%rsp), %rdi
movq %rax, %rsi
callq 0x5c5c
movq %rbx, %rdi
callq 0x20c0
movq 0x6abd(%rip), %rdi      # 0x9fd0
leaq 0x3b86(%rip), %rsi      # 0x70a0
movl $0x1c, %edx
callq 0x2230
movq 0x10(%rsp), %rsi
movq 0x6aa0(%rip), %rdi      # 0x9fd0
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
leaq 0x8(%rsp), %rdi
callq 0x5cb8
callq 0x22f0
jmp 0x34e1
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x5cb8
callq 0x22f0
movq %rbx, %rdi
callq 0x2330
movq %rax, %rdi
callq 0x5ca7
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/assembler.cpp
// Function: Assembler::flushBufferToFile()
void Assembler::flushBufferToFile()
{
	ofstream ofs("a." + filePath);

	if (!ofs)
	{
		cerr << "Error opening file for output" << endl;
	}

	list<string>::iterator it;

	for(it = buffer.begin(); it != buffer.end(); ++it)
	{
		ofs << (*it) << endl;
	}

	ofs.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
leaq 0x50(%rdi), %rdx
leaq 0x36b7(%rip), %rsi      # 0x71cf
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x5d69
leaq 0x28(%rsp), %rdi
movq %r14, %rsi
movl $0x10, %edx
callq 0x2380
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3b52
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x28(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x48(%rsp,%rax)
je 0x3ba8
movq 0x6487(%rip), %r14      # 0x9ff0
leaq 0x3662(%rip), %rsi      # 0x71d2
movl $0x1d, %edx
movq %r14, %rdi
callq 0x2230
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq 0x6455(%rip), %rdi      # 0x9ff0
callq 0x2030
movq %rax, %rdi
callq 0x2130
addq $0x20, %rbx
leaq 0x28(%rsp), %r14
movq %rbx, %r12
movq (%r12), %r12
cmpq %rbx, %r12
je 0x3bfb
movq 0x10(%r12), %rsi
movq 0x18(%r12), %rdx
movq %r14, %rdi
callq 0x2230
movq %rax, %r15
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r15, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %r15, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
jmp 0x3bb4
leaq 0x28(%rsp), %rdi
callq 0x2270
movq 0x63bc(%rip), %rax      # 0x9fc8
movq (%rax), %rcx
movq 0x18(%rax), %rax
leaq 0x30(%rsp), %rdi
movq %rcx, -0x8(%rdi)
movq -0x18(%rcx), %rcx
movq %rax, 0x28(%rsp,%rcx)
callq 0x21a0
leaq 0x120(%rsp), %rdi
callq 0x20a0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3c6a
movq %rax, %rbx
leaq 0x18(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x3c77
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x3c77
jmp 0x3c6a
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x2290
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/assembler.cpp
// Function: Assembler::addVariableToSymbolTable(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int)
void Assembler::addVariableToSymbolTable(string label, int address)
{
	// add label (if not already defined)
	sTable.addLabel(label);

	// convert address to binary and add to symboltable
	
	string strAddress = decToBinaryString(address, 6);
	sTable.addAddress(label, strAddress);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x80, %rsp
movl %edx, %ebp
movq %rsi, %r14
movq %rdi, %rbx
addq $0x38, %rbx
leaq 0x70(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rsi), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x60(%rsp), %r15
movq %r15, %rdi
callq 0x5ee4
movq %rbx, %rdi
movq %r15, %rsi
callq 0x2f98
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x480a
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x40(%rsp), %rdi
movl %ebp, %esi
movl $0x6, %edx
callq 0x3414
leaq 0x30(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%r14), %rsi
movq 0x8(%r14), %rdx
addq %rsi, %rdx
leaq 0x20(%rsp), %rdi
callq 0x5ee4
leaq 0x10(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x40(%rsp), %rsi
movq 0x48(%rsp), %rdx
addq %rsi, %rdx
movq %rsp, %rdi
callq 0x5ee4
leaq 0x20(%rsp), %rsi
movq %rsp, %rdx
movq %rbx, %rdi
callq 0x30e2
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x487c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x4893
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x48ae
movq 0x50(%rsp), %rsi
incq %rsi
callq 0x21f0
addq $0x80, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r14, %rdi
je 0x48dc
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x48dc
movq %rax, %rbx
movq 0x20(%rsp), %rdi
cmpq %r15, %rdi
je 0x48f8
movq 0x30(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x48f8
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4927
movq 0x50(%rsp), %rsi
jmp 0x491f
movq %rax, %rbx
movq 0x60(%rsp), %rdi
cmpq %r12, %rdi
je 0x4927
movq 0x70(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/assembler.cpp
// Function: Assembler::encodeInstructionAddress(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string Assembler::encodeInstructionAddress(string mne, string label)
{
	//get opcode (make it a binary string)
	string opcode = getOpcode(mne);

	//get memory address of operand
	string operand = sTable.getAddress(label);

	//initialises templine to be 32 0s
	string tempLine = "";
	for (int i = 0; i < 32; i++)
	{
		tempLine += "0";
	}

	// 6 for 64x32 store
	// 4 for 4 bit opcode (0-15)
	tempLine.replace(0, 6, operand);

	tempLine.replace(13, 4, opcode);

	return tempLine;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rcx, %r15
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x78(%rsp), %r13
movq %r13, -0x10(%r13)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
leaq 0x68(%rsp), %r12
movq %r12, %rdi
callq 0x5ee4
leaq 0x48(%rsp), %rdi
movq %r14, %rsi
movq %r12, %rdx
callq 0x5716
movq 0x68(%rsp), %rdi
cmpq %r13, %rdi
je 0x49a7
movq 0x78(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x18(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%r15), %rsi
movq 0x8(%r15), %rdx
addq %rsi, %rdx
leaq 0x8(%rsp), %rdi
callq 0x5ee4
addq $0x38, %r14
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %r14, %rsi
callq 0x328c
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x49f2
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x10(%rbx), %r15
movq %r15, (%rbx)
leaq 0x2700(%rip), %rdx      # 0x7100
movq %rbx, %rdi
movq %rdx, %rsi
callq 0x6088
movl $0x20, %ebp
leaq 0x2685(%rip), %r14      # 0x709c
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2370
decl %ebp
jne 0x4a17
movq 0x28(%rsp), %rcx
movq 0x30(%rsp), %r8
movl $0x6, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x2220
movq 0x48(%rsp), %rcx
movq 0x50(%rsp), %r8
movl $0xd, %esi
movl $0x4, %edx
movq %rbx, %rdi
callq 0x2220
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a76
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x58(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4a91
movq 0x58(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rax
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
jmp 0x4ae6
movq %rax, %r14
movq 0x8(%rsp), %rdi
cmpq %r12, %rdi
je 0x4b01
movq 0x18(%rsp), %rsi
jmp 0x4af9
movq %rax, %r14
jmp 0x4b01
movq %rax, %r14
movq 0x68(%rsp), %rdi
jmp 0x4b0a
jmp 0x4ad0
movq %rax, %r14
movq (%rbx), %rdi
cmpq %r15, %rdi
je 0x4ae6
movq (%r15), %rsi
incq %rsi
callq 0x21f0
leaq 0x38(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x4b01
movq 0x38(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x58(%rsp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x4b1b
movq (%r13), %rsi
incq %rsi
callq 0x21f0
movq %r14, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/assembler.cpp
// Function: Assembler::getOpcode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string Assembler::getOpcode(string mne)
{
	// getOpcode as int
	int opCodeInt = iSet.getOpcode(mne);

	// convert to 4 bit binary string and return
	string strOpcode = decToBinaryString(opCodeInt, 4);

	return strOpcode;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rsp), %r12
movq %r12, -0x10(%r12)
movq (%rdx), %rsi
movq 0x8(%rdx), %rdx
addq %rsi, %rdx
movq %rsp, %r15
movq %r15, %rdi
callq 0x5ee4
movq %r14, %rdi
movq %r15, %rsi
callq 0x2be2
movl %eax, %ebp
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x576a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
movl %ebp, %esi
movl $0x4, %edx
callq 0x3414
movq %rbx, %rax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r12, %rdi
je 0x57a2
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x21f0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O1/czmccrory[P]ManchesterBaby/assembler.cpp
// Function: main
int main(int argc, char** argv)
{
	if (argc != 2)
	{
		cerr << "error please (only) enter a filename as parameter" << endl;
		return -1;
	}

	// initialises assembler with given filename and runs it
	 Assembler assembler(argv[1]);
	 assembler.assemble();

	 return 0;
	
}

// Assembly:
pushq %rbx
subq $0xa0, %rsp
cmpl $0x2, %edi
jne 0x5845
movq 0x8(%rsi), %rsi
leaq 0x10(%rsp), %rdi
leaq 0xf(%rsp), %rdx
callq 0x58d0
leaq 0x30(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x24ec
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x57f8
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x30(%rsp), %rdi
callq 0x34c4
leaq 0x90(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x5823
movq 0x90(%rsp), %rsi
incq %rsi
callq 0x21f0
leaq 0x68(%rsp), %rdi
callq 0x5e38
leaq 0x50(%rsp), %rdi
callq 0x5df2
leaq 0x30(%rsp), %rdi
callq 0x5b46
xorl %eax, %eax
jmp 0x588c
movq 0x47a4(%rip), %rbx      # 0x9ff0
leaq 0x194a(%rip), %rsi      # 0x719d
movl $0x31, %edx
movq %rbx, %rdi
callq 0x2230
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21c0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2130
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
addq $0xa0, %rsp
popq %rbx
retq
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x5d32
jmp 0x58c7
movq %rax, %rbx
leaq 0x20(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x58c7
movq 0x20(%rsp), %rsi
incq %rsi
callq 0x21f0
jmp 0x58c7
movq %rax, %rbx
movq %rbx, %rdi
callq 0x2330
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/sparsehash/test-1.cpp
// Function: test_int(unsigned int, unsigned int)
uint32_t test_int(uint32_t n, uint32_t x0)
{
	uint32_t i, x, z = 0;
	google::sparse_hash_map<uint32_t, uint32_t, Hash32> h;
	h.set_deleted_key(0xfffffffeu);
	for (i = 0, x = x0; i < n; ++i) {
		x = hash32(x);
		z += ++h[get_key(n, x)];
	}
	fprintf(stderr, "# unique keys: %ld; checksum: %u\n", h.size(), z);
	return h.size();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movl %esi, %ebp
movl %edi, %ebx
leaq 0xc(%rsp), %rax
movq %rax, (%rsp)
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0xe(%rsp), %rdx
leaq 0xd(%rsp), %rcx
leaq 0x8(%rsp), %r8
leaq 0xf(%rsp), %r9
movq %r15, %rdi
xorl %esi, %esi
callq 0x1862
movq %r15, %rdi
callq 0x20c4
movb $0x1, 0x2a(%rsp)
movl $0xfffffffe, 0x30(%rsp) # imm = 0xFFFFFFFE
testl %ebx, %ebx
je 0x17d2
movl %ebx, %r13d
shrl $0x2, %r13d
xorl %r14d, %r14d
leaq 0x10(%rsp), %r15
leaq 0x8(%rsp), %r12
movl %ebp, %eax
shll $0xf, %eax
notl %eax
addl %ebp, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ebp
shrl $0x10, %ebp
xorl %eax, %ebp
movl %ebp, %eax
xorl %edx, %edx
divl %r13d
movl %edx, %eax
shll $0xf, %eax
notl %eax
addl %edx, %eax
movl %eax, %ecx
shrl $0xa, %ecx
xorl %eax, %ecx
leal (%rcx,%rcx,8), %eax
movl %eax, %ecx
shrl $0x6, %ecx
xorl %eax, %ecx
movl %ecx, %eax
shll $0xb, %eax
notl %eax
addl %ecx, %eax
movl %eax, %ecx
shrl $0x10, %ecx
xorl %eax, %ecx
movl %ecx, 0x8(%rsp)
movq %r15, %rdi
movq %r12, %rsi
callq 0x2e14
movl 0x4(%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, 0x4(%rax)
addl %ecx, %r14d
incl %r14d
decl %ebx
jne 0x1755
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rbx
movl %r14d, %esi
movq %rbx, %rdx
callq 0x1478
movl (%rbx), %eax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x17fa
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x1810
movq %rbx, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/sparsehash/./sparsehash/internal/sparsehashtable.h
// Function: google::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SelectKey, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::squash_deleted()
void squash_deleted() {           // gets rid of any deleted entries we have
    if ( num_deleted ) {            // get rid of deleted before writing
      sparse_hashtable tmp(MoveDontGrow, *this);
      swap(tmp);                    // now we are tmp
    }
    assert(num_deleted == 0);
  }

// Assembly:
pushq %r14
pushq %rbx
subq $0x58, %rsp
movq %rdi, %rbx
cmpq $0x0, 0x28(%rdi)
je 0x2102
movq %rsp, %r14
movl $0x20, %ecx
movq %r14, %rdi
movl $0x1, %esi
movq %rbx, %rdx
callq 0x2146
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2248
leaq 0x30(%rsp), %rdi
callq 0x1810
cmpq $0x0, 0x28(%rbx)
jne 0x2111
addq $0x58, %rsp
popq %rbx
popq %r14
retq
leaq 0x2a4a(%rip), %rdi      # 0x4b62
leaq 0x1fea(%rip), %rsi      # 0x4109
leaq 0x200b(%rip), %rcx      # 0x4131
movl $0x1d3, %edx            # imm = 0x1D3
callq 0x10a0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x1810
movq %rbx, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/sparsehash/./sparsehash/internal/sparsehashtable.h
// Function: google::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SelectKey, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::clear()
void clear() {
    if (!empty() || (num_deleted != 0)) {
      table.clear();
    }
    settings.reset_thresholds(bucket_count());
    num_deleted = 0;
  }

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x28(%rdi), %rax
orq 0x50(%rdi), %rax
je 0x260b
leaq 0x30(%rbx), %rdi
callq 0x297c
movq 0x48(%rbx), %rax
testq %rax, %rax
js 0x261b
cvtsi2ss %rax, %xmm0
jmp 0x2630
movq %rax, %rcx
shrq %rcx
andl $0x1, %eax
orq %rcx, %rax
cvtsi2ss %rax, %xmm0
addss %xmm0, %xmm0
movss 0x10(%rbx), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
movss 0x19e3(%rip), %xmm2     # 0x4030
subss %xmm2, %xmm1
cvttss2si %xmm1, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, (%rbx)
mulss 0x14(%rbx), %xmm0
cvttss2si %xmm0, %rax
movq %rax, %rcx
sarq $0x3f, %rcx
subss %xmm2, %xmm0
cvttss2si %xmm0, %rdx
andq %rcx, %rdx
orq %rax, %rdx
movq %rdx, 0x8(%rbx)
movb $0x0, 0x18(%rbx)
movq $0x0, 0x28(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/sparsehash/./sparsehash/internal/sparsehashtable.h
// Function: std::pair<unsigned int const, unsigned int>& google::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SelectKey, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::find_or_insert<google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::DefaultValue>(unsigned int const&)
value_type& find_or_insert(const key_type& key) {
    // First, double-check we're not inserting delkey
    assert((!settings.use_deleted() || !equals(key, key_info.delkey))
           && "Inserting the deleted key");
    const std::pair<size_type,size_type> pos = find_position(key);
    DefaultValue default_value;
    if ( pos.first != ILLEGAL_BUCKET) {  // object was already there
      return *table.get_iter(pos.first);
    } else if (resize_delta(1)) {        // needed to rehash to make room
      // Since we resized, we can't use pos, so recalculate where to insert.
      return *insert_noresize(default_value(key)).first;
    } else {                             // no need to rehash, insert right here
      return *insert_at(default_value(key), pos.second);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x60, %rsp
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x1a(%rdi)
jne 0x2e35
movl (%r14), %eax
cmpl 0x20(%rbx), %eax
je 0x2ec0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x2ee0
cmpq $-0x1, %rax
je 0x2e63
addq $0x30, %rbx
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x2fa8
movq 0x18(%r14), %rax
jmp 0x2eb6
movq %rdx, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x30c0
testb %al, %al
je 0x2e94
movl (%r14), %eax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x3234
jmp 0x2eb2
movl (%r14), %eax
leaq 0x8(%rsp), %rdx
movq %rax, (%rdx)
leaq 0x10(%rsp), %r14
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rcx
callq 0x3312
movq 0x20(%r14), %rax
addq $0x60, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x2b0a(%rip), %rdi      # 0x59d1
leaq 0x123b(%rip), %rsi      # 0x4109
leaq 0x2b56(%rip), %rcx      # 0x5a2b
movl $0x3e4, %edx            # imm = 0x3E4
callq 0x10a0
nop
// File: /workspace/github_cpp_makefile_star2_O1/attractivechaos[P]udb2/sparsehash/./sparsehash/internal/sparsehashtable.h
// Function: google::sparse_hashtable<std::pair<unsigned int const, unsigned int>, unsigned int, Hash32, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SelectKey, google::sparse_hash_map<unsigned int, unsigned int, Hash32, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::SetKey, std::equal_to<unsigned int>, google::libc_allocator_with_realloc<std::pair<unsigned int const, unsigned int>>>::insert_noresize(std::pair<unsigned int const, unsigned int> const&)
std::pair<iterator, bool> insert_noresize(const_reference obj) {
    // First, double-check we're not inserting delkey
    assert((!settings.use_deleted() || !equals(get_key(obj), key_info.delkey))
           && "Inserting the deleted key");
    const std::pair<size_type,size_type> pos = find_position(get_key(obj));
    if ( pos.first != ILLEGAL_BUCKET) {      // object was already there
      return std::pair<iterator,bool>(iterator(this, table.get_iter(pos.first),
                                               table.nonempty_end()),
                                      false);     // false: we didn't insert
    } else {                                 // pos.second says where to put it
      return std::pair<iterator,bool>(insert_at(obj, pos.second), true);
    }
  }

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x70, %rsp
movq %rdx, %r15
movq %rsi, %r14
movq %rdi, %rbx
cmpb $0x1, 0x1a(%rsi)
jne 0x3259
movl (%r15), %eax
cmpl 0x20(%r14), %eax
je 0x32f3
movq %r14, %rdi
movq %r15, %rsi
callq 0x2ee0
cmpq $-0x1, %rax
je 0x32d1
leaq 0x30(%r14), %rsi
leaq 0x8(%rsp), %r15
movq %r15, %rdi
movq %rax, %rdx
callq 0x2fa8
movq 0x30(%r14), %rax
movq 0x38(%r14), %rcx
movups (%r15), %xmm0
movups 0x10(%r15), %xmm1
leaq 0x28(%rsp), %r15
movups %xmm1, 0x18(%r15)
movups %xmm0, 0x8(%r15)
movq %r14, (%r15)
movq %rax, 0x28(%r15)
movq %rcx, 0x30(%r15)
movq %rcx, 0x38(%r15)
movq $0x0, 0x40(%r15)
movq %r15, %rdi
callq 0x371e
movl $0x9, %ecx
movq %rbx, %rdi
movq %r15, %rsi
rep  movsq (%rsi), %es:(%rdi)
movb $0x0, 0x48(%rbx)
jmp 0x32e6
movq %rdx, %rcx
movq %rbx, %rdi
movq %r14, %rsi
movq %r15, %rdx
callq 0x3312
movb $0x1, 0x48(%rbx)
movq %rbx, %rax
addq $0x70, %rsp
popq %rbx
popq %r14
popq %r15
retq
leaq 0x375d(%rip), %rdi      # 0x6a57
leaq 0xe08(%rip), %rsi       # 0x4109
leaq 0x37b2(%rip), %rcx      # 0x6aba
movl $0x3af, %edx            # imm = 0x3AF
callq 0x10a0