LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/manpat[P]iterator_trait/./iterator_trait/std_adaptor.h
// Function: InputIteratorAdaptor<int*, int*>::next()
Option<Item> next() {
		if (!m_begin || !m_end) return None;

		if (m_begin != m_end) {
			Option<Item> r(std::move(*m_begin));
			++m_begin;
			return r;
		}

		return None;
	}

// Assembly:
movq %rdi, %rax
movq (%rsi), %rcx
testq %rcx, %rcx
je 0x1ab5
movq 0x8(%rsi), %rdx
testq %rdx, %rdx
je 0x1ab5
cmpq %rdx, %rcx
je 0x1ab5
movl (%rcx), %edx
movl %edx, (%rax)
movb $0x1, 0x4(%rax)
addq $0x4, %rcx
movq %rcx, (%rsi)
retq
movb $0x0, 0x4(%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/manpat[P]iterator_trait/./iterator_trait/std_adaptor.h
// Function: IterEnumerate<InputIteratorAdaptor<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>::IterEnumerate(IterEnumerate<InputIteratorAdaptor<__gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, __gnu_cxx::__normal_iterator<char*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&&)
InputIteratorAdaptor(InputIteratorAdaptor&& o) : m_valid{ o.m_valid } {
		if (m_valid) {
			new (&m_begin) StdBeginIt { std::forward<StdBeginIt>(o.m_begin) };
			new (&m_end) StdEndIt { std::forward<StdEndIt>(o.m_end) };
			o.m_valid = false;
		}
	}

// Assembly:
movb 0x10(%rsi), %al
movb %al, 0x10(%rdi)
cmpb $0x1, %al
jne 0x1bea
movq (%rsi), %rax
movq %rax, (%rdi)
movq 0x8(%rsi), %rax
movq %rax, 0x8(%rdi)
movb $0x0, 0x10(%rsi)
movq 0x18(%rsi), %rax
movq %rax, 0x18(%rdi)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/manpat[P]iterator_trait/./iterator_trait/iterator.h
// Function: IterZip<InputIteratorAdaptor<char const*, char const*>, InputIteratorAdaptor<char const*, char const*>>::next()
Option<Item> next() {
		auto a = m_iter.next();
		auto b = m_iter2.next();
		if (a && b) {
			return Some(Item(a.unwrap(), b.unwrap()));
		}

		return None;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xe(%rsp), %r15
movq %r15, %rdi
callq 0x1b8c
movb 0x1(%r15), %r12b
movzbl (%r15), %ebp
addq $0x10, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1b8c
cmpb $0x1, 0x1(%r15)
jne 0x1ca4
testb %r12b, %r12b
je 0x1ca4
movzbl 0xc(%rsp), %eax
movzwl %ax, %eax
shll $0x8, %eax
movzwl %bp, %ecx
orl %eax, %ecx
movb $0x1, 0x2(%rbx)
movw %cx, (%rbx)
jmp 0x1ca8
movb $0x0, 0x2(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/manpat[P]iterator_trait/./iterator_trait/iterator.h
// Function: IterChain<InputIteratorAdaptor<char const*, char const*>, InputIteratorAdaptor<char const*, char const*>>::next()
Option<Item> next() {
		if(auto a = m_iter.next()) {
			return Some(Item(a.unwrap()));
		}

		if(auto b = m_iter2.next()) {
			return Some(Item(b.unwrap()));
		}

		return None;
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rsi, %r14
movq %rdi, %rbx
leaq 0xe(%rsp), %r15
movq %r15, %rdi
callq 0x1b8c
cmpb $0x1, 0x1(%r15)
jne 0x1ce1
movb 0xe(%rsp), %al
jmp 0x1d00
addq $0x10, %r14
leaq 0xc(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1b8c
cmpb $0x1, 0x1(%r15)
jne 0x1d08
movb 0xc(%rsp), %al
movb $0x1, 0x1(%rbx)
movb %al, (%rbx)
jmp 0x1d0c
movb $0x0, 0x1(%rbx)
movq %rbx, %rax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/brianwu02[P]ImageProcessing/convolve.cpp
// Function: allocateKernel(int, int, int)
kernelP allocateKernel(int w, int h, int s) {
    float *p;
    kernelP k;

    k = (kernelP) malloc(sizeof(kernelS));
    p = (float *) malloc(w * h * s);
    if (p == NULL) {
        cerr << "allocateKernel error, Insufficient memory" << endl;
        return ((kernelP) NULL);
    }

    k->width = w;
    k->height = h;
    k->kernel = p;

    return k;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %r15d
movl %esi, %ebp
movl %edi, %r14d
pushq $0x10
popq %rdi
callq 0x2190
movq %rax, %rbx
movl %ebp, %eax
imull %r14d, %eax
imull %r15d, %eax
movslq %eax, %rdi
callq 0x2190
testq %rax, %rax
je 0x2999
movl %r14d, (%rbx)
movl %ebp, 0x4(%rbx)
movq %rax, 0x8(%rbx)
jmp 0x29b6
movq 0x3650(%rip), %rdi      # 0x5ff0
leaq 0x167e(%rip), %rsi      # 0x4025
callq 0x2120
movq %rax, %rdi
callq 0x20c0
xorl %ebx, %ebx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/brianwu02[P]ImageProcessing/convolve.cpp
// Function: readKernelFile[abi:cxx11](char*)
std:: string readKernelFile(char *file) {
    std::string filename = file;
    std::string str;
    std::ifstream t(filename);

    t.seekg(0, std::ios::end);
    str.reserve(t.tellg());
    t.seekg(0, std::ios::beg);

    str.assign((std::istreambuf_iterator<char>(t)),
            std::istreambuf_iterator<char>());

    return str;

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rdi, %rbx
movq %rsp, %r14
leaq 0x20(%rsp), %rdx
movq %r14, %rdi
callq 0x2ad0
leaq 0x10(%rbx), %rax
movq %rax, (%rbx)
andq $0x0, 0x8(%rbx)
movb $0x0, 0x10(%rbx)
leaq 0x20(%rsp), %rdi
pushq $0x8
popq %rdx
movq %r14, %rsi
callq 0x2240
leaq 0x20(%rsp), %rdi
pushq $0x2
popq %rdx
xorl %esi, %esi
callq 0x21a0
leaq 0x20(%rsp), %rdi
callq 0x2280
movq %rbx, %rdi
movq %rax, %rsi
callq 0x2230
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
xorl %edx, %edx
callq 0x21a0
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
movq 0x108(%rsp,%rax), %rsi
pushq $-0x1
popq %rdx
movq %rbx, %rdi
xorl %ecx, %ecx
movl %edx, %r8d
callq 0x2b0c
leaq 0x20(%rsp), %rdi
callq 0x2060
movq %rsp, %rdi
callq 0x20b0
movq %rbx, %rax
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r14
retq
movq %rax, %r14
jmp 0x2a88
jmp 0x2a7b
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x2060
movq %rbx, %rdi
callq 0x20b0
movq %rsp, %rdi
callq 0x20b0
movq %r14, %rdi
callq 0x2290
// File: /workspace/github_cpp_makefile_star2_O2/dacunni[P]stlloader/stldump.cpp
// Function: main
int main(int argc, char ** argv)
{
    if(argc < 2) {
        std::cerr << "Please supply an argument\n";
        return EXIT_FAILURE;
    }
    stlloader::Mesh mesh;
    stlloader::parse_file(argv[1], mesh);
    stlloader::print(mesh);

    return EXIT_SUCCESS;
}

// Assembly:
pushq %rbx
subq $0x60, %rsp
cmpl $0x1, %edi
jg 0x33b2
movq 0x2c47(%rip), %rdi      # 0x5fe8
leaq 0xd1d(%rip), %rsi       # 0x40c5
callq 0x21f0
pushq $0x1
popq %rax
jmp 0x33fe
xorps %xmm0, %xmm0
leaq 0x28(%rsp), %rax
movaps %xmm0, -0x28(%rax)
andq $0x0, -0x18(%rax)
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
xorl %ecx, %ecx
movb %cl, (%rax)
leaq 0x48(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb %cl, (%rax)
movq 0x8(%rsi), %rdi
movq %rsp, %rsi
callq 0x2e43
movq %rsp, %rdi
callq 0x2559
movq %rsp, %rdi
callq 0x3516
xorl %eax, %eax
addq $0x60, %rsp
popq %rbx
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x3516
movq %rbx, %rdi
callq 0x2340
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/multgen.cpp
// Function: convertToString[abi:cxx11](char*, int)
string convertToString(char* a, int size)
{
  int i;
  string s = "";
  for (i = 0; i < size; i++) {
    s = s + a[i];
  }
  return s;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movl %edx, %r14d
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x3091d(%rip), %rsi     # 0x335d1
leaq -0x48(%rbp), %r12
movq %r12, %rdx
callq 0x20b0
xorl %r13d, %r13d
testl %r14d, %r14d
cmovlel %r13d, %r14d
cmpq %r13, %r14
je 0x2cf7
movsbl (%r15,%r13), %edx
movq %r12, %rdi
movq %rbx, %rsi
callq 0x11b49
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2210
movq %r12, %rdi
callq 0x20f0
incq %r13
jmp 0x2cca
movq %rbx, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x20f0
movq %r14, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/multgen.cpp
// Function: print_int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::list<int, std::allocator<int>> const&)
void print_int(string x, std::list<int> const &list)
{
  cout << x << " ";
  for (auto const &i: list) {
    std::cout << i << " ";
  }
  cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %rbx
movq %rdi, %rsi
movq 0x37f40(%rip), %r14     # 0x3efc8
movq %r14, %rdi
callq 0x2190
leaq 0x29b7d(%rip), %r15     # 0x30c14
movq %rbx, %r12
movq %rax, %rdi
movq %r15, %rsi
callq 0x21c0
movq (%r12), %r12
cmpq %rbx, %r12
je 0x70bd
movl 0x10(%r12), %esi
movq %r14, %rdi
callq 0x2320
jmp 0x709a
movq 0x37f04(%rip), %rdi     # 0x3efc8
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x2110
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/multgen.cpp
// Function: write_to_file(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&)
void write_to_file (string file_name,
                    queue<string>& verilog){

  ofstream myfile;

  myfile.open (file_name);

  int indent_count = 0;

  while(!verilog.empty()) {
    string line = verilog.front();
    if (line.compare("indent") == 0)
      indent_count++;
    else if (line.compare("outdent") == 0)
      indent_count--;
    else {
      for (int i = 0; i<indent_count; i++)
        myfile << "    ";
      myfile << line << endl;
    }
    verilog.pop();
  }

  myfile.close();

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x228, %rsp            # imm = 0x228
movq %rsi, %rbx
movq %rdi, %r14
leaq -0x250(%rbp), %r15
movq %r15, %rdi
callq 0x2310
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x2100
movl $0x0, -0x2c(%rbp)
leaq -0x50(%rbp), %r14
leaq -0x250(%rbp), %r13
leaq 0x21419(%rip), %r12     # 0x325d3
movq 0x10(%rbx), %rsi
cmpq %rsi, 0x30(%rbx)
je 0x1124a
movq %r14, %rdi
callq 0x2250
movq %r14, %rdi
leaq 0x20ade(%rip), %rsi     # 0x31cb8
callq 0x2090
testl %eax, %eax
je 0x1122d
movq %r14, %rdi
leaq 0x20b41(%rip), %rsi     # 0x31d2e
callq 0x2090
testl %eax, %eax
je 0x11232
movl -0x2c(%rbp), %eax
testl %eax, %eax
movl $0x0, %r15d
cmovgl %eax, %r15d
subl $0x1, %r15d
jb 0x11218
movq %r13, %rdi
movq %r12, %rsi
callq 0x21c0
jmp 0x11205
movq %r13, %rdi
movq %r14, %rsi
callq 0x2190
movq %rax, %rdi
callq 0x2110
jmp 0x11235
incl -0x2c(%rbp)
jmp 0x11235
decl -0x2c(%rbp)
movq %rbx, %rdi
callq 0x125d4
movq %r14, %rdi
callq 0x20f0
jmp 0x111ba
leaq -0x250(%rbp), %rdi
callq 0x2270
leaq -0x250(%rbp), %rdi
callq 0x22a0
addq $0x228, %rsp            # imm = 0x228
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x1127a
jmp 0x1127a
jmp 0x1127f
movq %rax, %rbx
jmp 0x1128b
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x20f0
leaq -0x250(%rbp), %rdi
callq 0x22a0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/pp_gen.cpp
// Function: add_extra_ones_to_pp_matrix(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>*&, int, std::__cxx11::list<int, std::allocator<int>> const&)
void add_extra_ones_to_pp_matrix (string *& last_row, int col_size, const std::list<int>& extra_ones_indices){

  last_row  = new string[col_size];

  // make sure it is empty..
  for (int i = 0; i<col_size; i++)
    last_row[i] = "";

  for (auto e : extra_ones_indices)
    if (e<col_size)
      last_row[e] = "1'b1";

  // for (int i = 0; i<col_size; i++)
  //   cout << i << " " << last_row[i] << ". ";
  // cout << endl;

  bool carry = false;
  for (int i = 0; i < col_size; i++){

    if (!carry && last_row[i] != ""){
      last_row[i] = "1'b1";
      carry = true;
    } else if (carry && last_row[i] == "") {
      last_row[i] = "1'b1";
    } else if (carry) {
      last_row[i] = "";
    }
  }

  // for (int i = 0; i<col_size; i++)
  //   cout << i << " " << last_row[i] << ". ";
  // cout << endl;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, -0x30(%rbp)
movl %esi, %r15d
movq %rdi, %rbx
movslq %esi, %r14
movq %r14, %r12
shlq $0x5, %r12
leaq 0x8(%r12), %rax
testl %r14d, %r14d
pushq $-0x1
popq %rdi
cmovnsq %rax, %rdi
callq 0x2030
leaq 0x8(%rax), %rcx
movq %r14, (%rax)
testl %r14d, %r14d
je 0x198d5
addq $0x18, %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
addq $0x20, %rax
addq $-0x20, %r12
jne 0x198bf
movq %rcx, (%rbx)
xorl %r14d, %r14d
testl %r15d, %r15d
movl $0x0, %r13d
cmovgl %r15d, %r13d
shlq $0x5, %r13
leaq 0x19cde(%rip), %r12     # 0x335d1
cmpq %r14, %r13
je 0x1990c
movq (%rbx), %rdi
addq %r14, %rdi
movq %r12, %rsi
callq 0x2350
addq $0x20, %r14
jmp 0x198f3
leaq 0x1874a(%rip), %r12     # 0x3205d
movq -0x30(%rbp), %rax
movq %rax, %r14
movq (%r14), %r14
cmpq %rax, %r14
je 0x19940
movslq 0x10(%r14), %rdi
cmpl %r15d, %edi
jge 0x1991a
shlq $0x5, %rdi
addq (%rbx), %rdi
movq %r12, %rsi
callq 0x2350
movq -0x30(%rbp), %rax
jmp 0x1991a
xorl %r12d, %r12d
leaq 0x19c87(%rip), %r14     # 0x335d1
leaq 0x1870c(%rip), %r15     # 0x3205d
xorl %eax, %eax
cmpq %r12, %r13
je 0x1999c
movq (%rbx), %rdi
addq %r12, %rdi
movq %r14, %rsi
testb $0x1, %al
je 0x19979
callq 0x11b91
movq (%rbx), %rdi
addq %r12, %rdi
testb %al, %al
jne 0x19988
movq %r14, %rsi
jmp 0x1998b
callq 0x11b84
testb %al, %al
je 0x19994
movq (%rbx), %rdi
addq %r12, %rdi
movq %r15, %rsi
callq 0x2350
movb $0x1, %al
jmp 0x19996
xorl %eax, %eax
addq $0x20, %r12
jmp 0x19953
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/dadda.cpp
// Function: get_dadda_coeffs(int, int*&, int&)
void get_dadda_coeffs (int max, int *& coeffs, int& size){

  size = 0;
  for (int i = 2; i<max; i = int(i*1.5)){
    size++;
  }

  coeffs = new int[size];

  int cnt = 0;
  for (int i = 2; i<max; i = int(i*1.5)){
    coeffs[size - ++cnt] = i;
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movl %edi, %ebx
andl $0x0, (%rdx)
pushq $0x2
popq %rcx
pushq $-0x4
popq %r15
pushq $0x1
popq %rax
cmpl %ebx, %ecx
jge 0x279f6
movl %eax, (%rdx)
cvtsi2sd %ecx, %xmm0
mulsd 0xbbde(%rip), %xmm0     # 0x335c8
cvttsd2si %xmm0, %ecx
addq $0x4, %r15
incl %eax
jmp 0x279d8
leaq 0x4(%r15), %rdi
callq 0x2030
movsd 0xbbc1(%rip), %xmm1     # 0x335c8
movq %rax, (%r14)
addq %r15, %rax
pushq $0x2
popq %rcx
cmpl %ebx, %ecx
jge 0x27a28
movl %ecx, (%rax)
cvtsi2sd %ecx, %xmm0
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %ecx
addq $-0x4, %rax
jmp 0x27a10
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/dadda.cpp
// Function: print_queue(std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, int)
void print_queue (std::queue<string>* q,
		  int size){
  
  for (int i = 0; i<size; i++){

    std::queue<string> temp;

    while (!q[i].empty()){
      cout << q[i].front() << "\t";
      temp.push(q[i].front());
      q[i].pop();
    }

    q[i] = temp;
    cout << endl;
  }

  cout << endl;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
xorl %ebx, %ebx
testl %esi, %esi
cmovlel %ebx, %esi
movq %rsi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
leaq -0x88(%rbp), %r15
movq 0x17567(%rip), %r12     # 0x3efc8
leaq 0xbb68(%rip), %r13      # 0x335d0
cmpq -0x38(%rbp), %rbx
je 0x27ad1
movq %r15, %rdi
callq 0x11e0c
imulq $0x50, %rbx, %r14
addq -0x30(%rbp), %r14
movq 0x10(%r14), %rsi
cmpq %rsi, 0x30(%r14)
je 0x27ab1
movq %r12, %rdi
callq 0x2190
movq %rax, %rdi
movq %r13, %rsi
callq 0x21c0
movq 0x10(%r14), %rsi
movq %r15, %rdi
callq 0x19602
movq %r14, %rdi
callq 0x125d4
jmp 0x27a7e
movq %r14, %rdi
movq %r15, %rsi
callq 0x28a8e
movq %r12, %rdi
callq 0x2110
movq %r15, %rdi
callq 0x11f3e
incq %rbx
jmp 0x27a68
movq 0x174f0(%rip), %rdi     # 0x3efc8
callq 0x2110
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27aee
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x11f3e
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/wallace.cpp
// Function: move_to_main_queue(std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, int)
void move_to_main_queue (queue<string>* temp,
                         queue<string>* main,
                         int size){
  for (int i = 0; i < size; i++){
    while(!temp[i].empty()){
      string cur = temp[i].front();
      temp[i].pop();
      main[i].push (cur);
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %edx, %ebx
movq %rsi, -0x38(%rbp)
movq %rdi, -0x30(%rbp)
xorl %r15d, %r15d
testl %edx, %edx
cmovlel %r15d, %ebx
leaq -0x58(%rbp), %r12
cmpq %rbx, %r15
je 0x2afd5
imulq $0x50, %r15, %r13
movq -0x30(%rbp), %rax
leaq (%rax,%r13), %r14
addq -0x38(%rbp), %r13
movq 0x10(%r14), %rsi
cmpq %rsi, 0x30(%r14)
je 0x2afd0
movq %r12, %rdi
callq 0x2250
movq %r14, %rdi
callq 0x125d4
movq %r13, %rdi
movq %r12, %rsi
callq 0x19602
movq %r12, %rdi
callq 0x20f0
jmp 0x2afa1
incq %r15
jmp 0x2af8c
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x20f0
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/wallace.cpp
// Function: print_main_queue(std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, int)
void print_main_queue (queue<string>* main,
		       int size){
  
  cout << "Printing main queue " << endl; 
  for (int i = 0; i < size; i++){
    cout << "Col " << i << ": ";
    queue<string> copyq = main[i];
    while (!copyq.empty()){
      cout << copyq.front() << " ";
      copyq.pop();
    }
    cout << endl;
  }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
movl %esi, %ebx
movq %rdi, -0x30(%rbp)
movq 0x13fb2(%rip), %r15     # 0x3efc8
leaq 0x863d(%rip), %rsi      # 0x3365a
movq %r15, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x2110
xorl %r12d, %r12d
testl %ebx, %ebx
cmovlel %r12d, %ebx
leaq -0x80(%rbp), %r13
leaq 0x5bd3(%rip), %r14      # 0x30c14
cmpq %rbx, %r12
je 0x2b0bb
movq %r15, %rdi
leaq 0x861f(%rip), %rsi      # 0x3366f
callq 0x21c0
movq %rax, %rdi
movl %r12d, %esi
callq 0x2320
movq %rax, %rdi
leaq 0x8151(%rip), %rsi      # 0x331bb
callq 0x21c0
imulq $0x50, %r12, %rsi
addq -0x30(%rbp), %rsi
movq %r13, %rdi
callq 0x2fad2
movq -0x70(%rbp), %rsi
cmpq %rsi, -0x50(%rbp)
je 0x2b0a6
movq %r15, %rdi
callq 0x2190
movq %rax, %rdi
movq %r14, %rsi
callq 0x21c0
movq %r13, %rdi
callq 0x125d4
jmp 0x2b07f
movq %r15, %rdi
callq 0x2110
movq %r13, %rdi
callq 0x11f3e
incq %r12
jmp 0x2b041
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b0cc
movq %rax, %rbx
leaq -0x80(%rbp), %rdi
callq 0x11f3e
movq %rbx, %rdi
callq 0x2330
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/wallace.cpp
// Function: get_max_queue_size(std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>*, int)
int get_max_queue_size (std::queue<string>* q, int size){

  int max=0;
  for (int i = 0; i < size; i++){
    int cur = q[i].size();
    if (max<cur)
      max = cur;
  }

  //cout << "!!! max queue size :"  <<max << endl;
  
  return max;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %esi, %ebx
movq %rdi, %r14
xorl %r15d, %r15d
testl %esi, %esi
cmovlel %r15d, %ebx
subq $0x1, %rbx
jb 0x2b116
movq %r14, %rdi
callq 0x1219a
cmpl %eax, %r15d
cmovgl %r15d, %eax
addq $0x50, %r14
movl %eax, %r15d
jmp 0x2b0f8
movl %r15d, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/temelmertcan[P]multgen/src/wallace.cpp
// Function: create_4to2tree(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>**, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, int, int, int, bool, bool, std::queue<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::deque<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>>>&, int&, bool**&)::four2twoi::add(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, 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 add(string var1,string var2,string var3,string var4){
      in1[size] = var1;
      in2[size] = var2;
      in3[size] = var3;
      in4[size] = var4;
      size++;
      
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %r8, %rbx
movq %rcx, %r15
movq %rdx, %r12
movq %rdi, %r14
movslq 0x4(%rdi), %rdi
shlq $0x5, %rdi
addq 0x28(%r14), %rdi
callq 0x2130
movslq 0x4(%r14), %rdi
shlq $0x5, %rdi
addq 0x30(%r14), %rdi
movq %r12, %rsi
callq 0x2130
movslq 0x4(%r14), %rdi
shlq $0x5, %rdi
addq 0x38(%r14), %rdi
movq %r15, %rsi
callq 0x2130
movslq 0x4(%r14), %rdi
shlq $0x5, %rdi
addq 0x40(%r14), %rdi
movq %rbx, %rsi
callq 0x2130
incl 0x4(%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/mattcha[P]sgd-svm/sgd_svm_predict.cpp
// Function: load_model(char const*, Weight&)
int load_model(const char* modelname, Weight &weight)
{
    if (modelname == NULL) {
        fprintf(stderr, "modelname is null\n");
        return -1;
    }

    double lambda = 0.0;
    uint32_t iteration = 0;
    uint32_t w_size = 0;

    ifstream fin;
    fin.open(modelname);
    fin >> lambda >> iteration >> w_size;
    for (uint32_t wi=0; wi<w_size; ++wi) {
        weight.w_vec.push_back(0.0);
    }

    uint32_t idx = 0;
    double val = 0.0;
    while (fin) {
        fin >> idx >> val;
        weight.w_vec[idx] = val;
    }
    
    fprintf(stderr, "load model succ\n");
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
testq %rdi, %rdi
jne 0x23c7
movq 0x2c2e(%rip), %rax      # 0x4fd8
movq (%rax), %rcx
leaq 0xc6c(%rip), %rdi       # 0x3020
pushq $0x12
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
pushq $-0x1
popq %rax
jmp 0x24bf
movq %rsi, %rbx
movq %rdi, %r14
andq $0x0, -0x40(%rbp)
andl $0x0, -0x38(%rbp)
andl $0x0, -0x24(%rbp)
leaq -0x248(%rbp), %r15
movq %r15, %rdi
callq 0x2140
pushq $0x8
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x20b0
leaq -0x248(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x20c0
leaq -0x38(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
leaq -0x24(%rbp), %rsi
movq %rax, %rdi
callq 0x21d0
xorl %r15d, %r15d
leaq -0x30(%rbp), %r14
cmpl -0x24(%rbp), %r15d
jae 0x2441
andq $0x0, -0x30(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x28a0
incl %r15d
jmp 0x2426
leaq -0x34(%rbp), %r14
andl $0x0, (%r14)
leaq -0x30(%rbp), %r15
andq $0x0, (%r15)
leaq -0x248(%rbp), %r12
movq -0x248(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x5, -0x228(%rbp,%rax)
jne 0x2495
movq %r12, %rdi
movq %r14, %rsi
callq 0x21d0
movq %rax, %rdi
movq %r15, %rsi
callq 0x20c0
movsd -0x30(%rbp), %xmm0
movl -0x34(%rbp), %eax
movq (%rbx), %rcx
movsd %xmm0, (%rcx,%rax,8)
jmp 0x2458
movq 0x2b3c(%rip), %rax      # 0x4fd8
movq (%rax), %rcx
leaq 0xb8d(%rip), %rdi       # 0x3033
pushq $0x10
popq %rsi
pushq $0x1
popq %rdx
callq 0x2210
leaq -0x248(%rbp), %rdi
callq 0x2040
xorl %eax, %eax
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x24d3
jmp 0x24d3
movq %rax, %rbx
leaq -0x248(%rbp), %rdi
callq 0x2040
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/mattcha[P]sgd-svm/sgd_svm_predict.cpp
// Function: main
int main(int argc, char** argv) 
{
    int ret;
    if (argc != 3) {
        fprintf(stderr, "Usage : %s modelname testfile\n", argv[0]);
        return 1;
    }

    char *modelname = argv[1];
    char *testfile = argv[2];

    Weight weight;
    ret = load_model(modelname, weight);
    if (ret != 0) {
        fprintf(stderr, "load model [%s] fail\n", modelname);
        return -1;
    }

    ret = predict(testfile, weight);
    if (ret != 0) {
        fprintf(stderr, "predict [%s] fail\n", testfile);
        return -1;
    }

    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x20, %rsp
cmpl $0x3, %edi
jne 0x27a9
movq 0x8(%rsi), %r14
movq 0x10(%rsi), %rbx
xorps %xmm0, %xmm0
leaq -0x30(%rbp), %rsi
movaps %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
movq %r14, %rdi
callq 0x238c
testl %eax, %eax
jne 0x27ca
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x24ea
xorl %r14d, %r14d
testl %eax, %eax
jne 0x27e0
leaq -0x30(%rbp), %rdi
callq 0x2862
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq 0x2828(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
movq (%rsi), %rdx
leaq 0x918(%rip), %rsi       # 0x30d5
xorl %eax, %eax
callq 0x2180
pushq $0x1
popq %r14
jmp 0x279d
movq 0x2807(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
leaq 0x919(%rip), %rsi       # 0x30f4
movq %r14, %rdx
jmp 0x27f4
movq 0x27f1(%rip), %rax      # 0x4fd8
movq (%rax), %rdi
leaq 0x919(%rip), %rsi       # 0x310a
movq %rbx, %rdx
xorl %eax, %eax
callq 0x2180
pushq $-0x1
popq %r14
jmp 0x2794
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
callq 0x2862
movq %rbx, %rdi
callq 0x21e0
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::ldn(int)
void ManchesterBaby::ldn(int operand){

	presentMnemonic = "LDN " + to_string(operand);
  //Get the value at the store
  int negativeValue = store.at(operand).getDecVector();
  //make it negative
  negativeValue = -negativeValue;
  //Add set the accumulator to the negative operand
  accumulator.setDecVector(negativeValue);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x2899(%rip), %rsi      # 0x5084
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x3c8a
movq %rax, %rdi
callq 0x46f0
negl %eax
addq $0x28, %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4714
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::sub(int)
void ManchesterBaby::sub(int operand){

	presentMnemonic = "SUB " + to_string(operand);
 
  //Get the accumulator value
  int accumulatorDec = accumulator.getDecVector();

  //Get the Store value
  int storeDec = store.at(operand).getDecVector(); 

  int result = accumulatorDec- storeDec;

  accumulator.setDecVector(result);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x26ab(%rip), %rsi      # 0x509c
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x46f0
movl %eax, %r15d
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x3c8a
movq %rax, %rdi
callq 0x46f0
subl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x4714
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::imsub(int)
void ManchesterBaby::imsub(int operand){

	presentMnemonic = "IMSUB " + to_string(operand);

  //Get the accumulator value
  int accumulatorDec = accumulator.getDecVector();

  int result = accumulatorDec - operand;
  accumulator.setDecVector(result);

}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x25b1(%rip), %rsi      # 0x509a
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
addq $0x28, %rbx
movq %rbx, %rdi
callq 0x46f0
subl %ebp, %eax
movq %rbx, %rdi
movl %eax, %esi
callq 0x4714
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::cmp()
void ManchesterBaby::cmp(){

	presentMnemonic = "CMP ";
  int accumulatorValue = accumulator.getDecVector();
  //increment the CI if the
  if(accumulatorValue<0){
    incrementCI();
  }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
addq $0x38, %rdi
leaq 0x2546(%rip), %rsi      # 0x50a1
callq 0x2350
leaq 0x28(%rbx), %rdi
callq 0x46f0
testl %eax, %eax
jns 0x2b70
incl 0x30(%rbx)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::mul(int)
void ManchesterBaby::mul(int operand) {

	presentMnemonic = "MUL " + to_string(operand);
	int accumulatorDec = accumulator.getDecVector(); 
	int storeDec = store.at(operand).getDecVector();
  //multiply the acumulator value with the value we got from the store
	int result = accumulatorDec * storeDec;
	accumulator.setDecVector(result);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x24fe(%rip), %rsi      # 0x50ad
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x46f0
movl %eax, %r15d
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x3c8a
movq %rax, %rdi
callq 0x46f0
imull %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x4714
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::immul(int)
void ManchesterBaby::immul(int operand) {

	presentMnemonic = "IMMUL " + to_string(operand);
	int accumulatorDec = accumulator.getDecVector();
  //multiply the accumulator value and the operand
  int result = accumulatorDec * operand;
  accumulator.setDecVector(result);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x3ccf
leaq 0x245b(%rip), %rsi      # 0x50ab
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0x3cab
leaq 0x38(%r14), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2240
movq %r15, %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
addq $0x28, %r14
movq %r14, %rdi
callq 0x46f0
imull %eax, %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x4714
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::ldp(int)
void ManchesterBaby::ldp(int operand){
	presentMnemonic = "LDP " + to_string(operand);

	int storeValue = store.at(operand).getDecVector();
	//Add set the accumulator to the negative operand
 	accumulator.setDecVector(storeValue);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x23e1(%rip), %rsi      # 0x50b4
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x3c8a
movq %rax, %rdi
callq 0x46f0
addq $0x28, %rbx
movq %rbx, %rdi
movl %eax, %esi
callq 0x4714
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::add(int)
void ManchesterBaby::add(int operand) {
	presentMnemonic = "ADD " + to_string(operand);

  int accumulatorDec = accumulator.getDecVector(); 
  int storeDec = store.at(operand).getDecVector(); 

  int result = accumulatorDec + storeDec; //add the two values together

  accumulator.setDecVector(result);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x48, %rsp
movl %esi, %ebp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x22e0(%rip), %rsi      # 0x50bb
leaq 0x28(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x28(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
leaq 0x8(%rsp), %rdi
callq 0x20d0
leaq 0x28(%rbx), %r14
movq %r14, %rdi
callq 0x46f0
movl %eax, %r15d
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x3c8a
movq %rax, %rdi
callq 0x46f0
addl %eax, %r15d
movq %r14, %rdi
movl %r15d, %esi
callq 0x4714
addq $0x48, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::imadd(int)
void ManchesterBaby::imadd(int operand) {

	presentMnemonic = "IMADD " + to_string(operand);

  int accumulatorDec = accumulator.getDecVector();
  int result = accumulatorDec + operand; //add the two values

  accumulator.setDecVector(result); //save it to the accumulator
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebx
movq %rdi, %r14
movq %rsp, %r15
movq %r15, %rdi
callq 0x3ccf
leaq 0x223d(%rip), %rsi      # 0x50b9
leaq 0x20(%rsp), %rdi
movq %r15, %rdx
callq 0x3cab
leaq 0x38(%r14), %rdi
leaq 0x20(%rsp), %r15
movq %r15, %rsi
callq 0x2240
movq %r15, %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
addq $0x28, %r14
movq %r14, %rdi
callq 0x46f0
addl %eax, %ebx
movq %r14, %rdi
movl %ebx, %esi
callq 0x4714
addq $0x40, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::negsto(int)
void ManchesterBaby::negsto(int operand) {

	presentMnemonic = "NEGSTO " + to_string(operand);
  int accumulatorValue = accumulator.getDecVector();
  //store the negative of the accumulator in the store
  store.at(operand).setDecVector(0-accumulatorValue);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
subq $0x40, %rsp
movl %esi, %ebp
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x3ccf
leaq 0x21c3(%rip), %rsi      # 0x50c2
leaq 0x20(%rsp), %rdi
movq %r14, %rdx
callq 0x3cab
leaq 0x38(%rbx), %rdi
leaq 0x20(%rsp), %r14
movq %r14, %rsi
callq 0x2240
movq %r14, %rdi
callq 0x20d0
movq %rsp, %rdi
callq 0x20d0
leaq 0x28(%rbx), %rdi
callq 0x46f0
movl %eax, %r14d
movslq %ebp, %rsi
movq %rbx, %rdi
callq 0x3c8a
negl %r14d
movq %rax, %rdi
movl %r14d, %esi
callq 0x4714
addq $0x40, %rsp
popq %rbx
popq %r14
popq %rbp
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::execute(int, int)
void ManchesterBaby::execute(int opcode, int operand){
	clrscr();
  //Process the opcode
  switch(opcode){
    case 0: 
    //Set CI to content of Store location
      jmp(operand);
      break;
    case 1:
    //Add content of Store location to CI
      jrp(operand);
      break;
    case 2:
    //Load Accumulator with negative form of Store contents
      ldn(operand);
      break;
    case 3:
    //Copy Accumulator to Store location
      sto(operand);
      break;
    case 4:
    //Subtract content of Store location from Accumulator
      sub(operand);
      break;
    case 5:
    //Subtract content of Store location from Accumulator
      sub(operand);
      break;
    case 6:
    //Increment CI if Accumulator value negative, otherwise do nothing
      cmp();
      break;
    case 7:
    //Halt the Baby and light the 'stop lamp'
      stp();
      break;
    case 8:
    //Multiply content of Store and Accumulator
      mul(operand);
      break;
    case 9:
    //Load Accumulator with (positive form of) Store contents
      ldp(operand);
      break;
    case 10:
    //Add content of Store and Accumulator
      add(operand);
      break;
    case 11:
    //Copy negative form of Accumulator to Store location
      negsto(operand);
      break;
    case 12:
    	inc();
    	break;
    case 13:
    	dec();
    	break;
    default:
      break;
  }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movl %edx, %ebx
movl %esi, %ebp
movq %rdi, %r14
callq 0x3110
cmpl $0xd, %ebp
ja 0x310b
movl %ebp, %eax
leaq 0x1fb0(%rip), %rcx      # 0x5004
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x29ce
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2ee0
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2a72
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2cb4
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x27cc
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2b72
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x28d4
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x25ec
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x26dc
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2a9e
movq %r14, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x2b4c
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2db8
movq %r14, %rdi
movl %ebx, %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x2b8c
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::readFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ManchesterBaby::readFromFile(string path){
  ifstream file (path); //open a file stream at path
  if(file){ //if opened successfully
    string l; 
    size_t i = 0;
    while (getline(file, l)) { //get a line to l
      Line myline(l); //call the line string constructor for this line
      store.at(i) = myline; //save this line to the store at i
      i++;
    }
  }
  else {
    cout << "Unable to open file" << endl;
  }

  file.close(); //close the file

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq %rdi, %rbx
leaq 0x50(%rsp), %r14
pushq $0x8
popq %rdx
movq %r14, %rdi
callq 0x22c0
movq (%r14), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x70(%rsp,%rax)
je 0x32fc
movq 0x5ce5(%rip), %rdi      # 0x8fc8
leaq 0x1de0(%rip), %rsi      # 0x50ca
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
jmp 0x3385
leaq 0x20(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
xorl %r14d, %r14d
leaq 0x50(%rsp), %r15
leaq 0x10(%rsp), %r12
leaq 0x30(%rsp), %r13
leaq 0x8(%rsp), %rbp
movq %r15, %rdi
movq %r12, %rsi
callq 0x2030
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x337b
movq %r13, %rdi
movq %r12, %rsi
callq 0x2270
movq %rbp, %rdi
movq %r13, %rsi
callq 0x44f4
movq %r13, %rdi
callq 0x20d0
movq %rbx, %rdi
movq %r14, %rsi
callq 0x3c8a
movq 0x8(%rsp), %rcx
movq %rcx, (%rax)
incq %r14
movq %rbp, %rdi
callq 0x45ae
jmp 0x3324
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x2040
leaq 0x50(%rsp), %rdi
callq 0x2070
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
jmp 0x33dd
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x45ae
jmp 0x33d3
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x20d0
jmp 0x33d3
jmp 0x33d0
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x20d0
leaq 0x50(%rsp), %rdi
callq 0x2070
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::runBaby(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void ManchesterBaby::runBaby(string filename) {
	readFromFile(filename); //read the file
  cin.ignore(); //clear the cin
  cin.clear();

  int instruction;
  char temp;
  do {
    incrementCI(); //increment program counter
    fetch(); //get next line and save it to the PI
    instruction = decodeInstruction(); //get the decimal opcode number
    int operand = decodeOperand();
	  bool immAddressing = decodeAddressingMode();
    addressedExecute(instruction, operand, immAddressing);
    output(); //display the store, PI, CI, acucmulator
    cin.get(temp);
  } while (instruction != 7 && temp == '\n'); //run until the decoded opcode is halt/stop

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x8(%rsp), %r14
movq %r14, %rdi
callq 0x2270
movq %rbx, %rdi
movq %r14, %rsi
callq 0x32aa
leaq 0x8(%rsp), %rdi
callq 0x20d0
movq 0x594a(%rip), %r14      # 0x8fd8
movq %r14, %rdi
callq 0x2340
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
xorl %esi, %esi
callq 0x2300
leaq 0x18(%rbx), %r15
leaq 0x7(%rsp), %r12
incl 0x30(%rbx)
movq %rbx, %rdi
callq 0x25d6
movq %r15, %rdi
callq 0x46d0
movl %eax, %ebp
movq %r15, %rdi
callq 0x46e0
movl %eax, %r13d
movq %r15, %rdi
callq 0x472a
movzbl %al, %ecx
movq %rbx, %rdi
movl %ebp, %esi
movl %r13d, %edx
callq 0x329c
movq %rbx, %rdi
callq 0x33f0
movq %r14, %rdi
movq %r12, %rsi
callq 0x2280
cmpl $0x7, %ebp
je 0x3707
cmpb $0xa, 0x7(%rsp)
je 0x36b0
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
movq %rbx, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: ManchesterBaby::getValidFile[abi:cxx11]()
string ManchesterBaby::getValidFile(){
  bool isValid=true;
  //Initalise the variable
  string filename="";
 do{
  //Display the files available to load
  cout << "\nAvailable files to load: \n" << endl;
  
  //Display
  system("ls | grep .txt | cat");
   cout << "\nPlease enter the filename: " << endl;
  
  //Store the file name
  cin >> filename;
   //Initalise variable
  ifstream infile;
  //Open file
  infile.open(filename, ios::in);
   //Open the file to prove that it exists
  if(infile.is_open() == 1)
  {
     // P0W how-to-detect-empty-file-in-c stackoverflow
    // If file is empty 
    if(infile.peek() == ifstream::traits_type::eof())
    {
       cout << "\nFILE IS EMPTY. " << endl;
      isValid=false;
      cin.clear();
      cin.ignore();
    }
     // close file
    infile.close();
   }else{
    cout << "\nError- The file ente does not exist" << endl;
    cout << "Try again: " << endl;
    isValid=false;
    cin.clear();
    cin.ignore();
  }
}while(isValid==false);
 return filename;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rdi, %rbx
leaq 0x194d(%rip), %rsi      # 0x5106
movq %rsp, %r14
movq %r14, %rdx
callq 0x3d52
movb $0x1, %r15b
movq 0x57fa(%rip), %r12      # 0x8fc8
movq 0x5803(%rip), %r13      # 0x8fd8
pushq $0x8
popq %rbp
movq %r12, %rdi
leaq 0x19b4(%rip), %rsi      # 0x5196
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
leaq 0x19bc(%rip), %rdi      # 0x51b2
callq 0x2180
movq %r12, %rdi
leaq 0x19c2(%rip), %rsi      # 0x51c7
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %r13, %rdi
movq %rbx, %rsi
callq 0x2250
movq %r14, %rdi
callq 0x2200
movq %r14, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0x2190
leaq 0x78(%rsp), %rdi
callq 0x2050
testb %al, %al
je 0x388b
movq %r14, %rdi
callq 0x20a0
cmpl $-0x1, %eax
jne 0x3881
movq %r12, %rdi
leaq 0x198d(%rip), %rsi      # 0x51e4
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2300
movq %r13, %rdi
callq 0x2340
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x2040
jmp 0x38d6
movq %r12, %rdi
leaq 0x1960(%rip), %rsi      # 0x51f5
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq %r12, %rdi
leaq 0x196e(%rip), %rsi      # 0x521a
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
movq (%r13), %rax
movq -0x18(%rax), %rdi
addq %r13, %rdi
xorl %esi, %esi
callq 0x2300
movq %r13, %rdi
callq 0x2340
xorl %r15d, %r15d
movq %r14, %rdi
callq 0x2070
testb $0x1, %r15b
je 0x37d8
movq %rbx, %rax
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x390c
movq %rax, %r14
movq %rsp, %rdi
callq 0x2070
jmp 0x390f
movq %rax, %r14
movq %rbx, %rdi
callq 0x20d0
movq %r14, %rdi
callq 0x2320
nop
// File: /workspace/github_cpp_makefile_star2_O2/czmccrory[P]ManchesterBaby/baby.cpp
// Function: main
int main(int argc, char** argv) {
  ManchesterBaby mb;
  if(argc > 2) {
  	cerr<<"Invalid use of program. Run using either \"" << argv[0]
  		<<"\" or \"" <<argv[0]<<" "<< argv[1] << "\"." <<endl;
  		return 1;
  } else if (argc == 2) {
  	mb.setParamFile(argv[1]);
  	mb.menu();
  } else {
 	mb.menu();
  }
  return 0;
}

// Assembly:
pushq %rbp
pushq %rbx
subq $0xa8, %rsp
movq %rsi, %rbx
movl %edi, %ebp
leaq 0x28(%rsp), %rdi
callq 0x24ac
cmpl $0x3, %ebp
jl 0x3b98
movq 0x54c0(%rip), %rdi      # 0x8ff0
leaq 0x17ae(%rip), %rsi      # 0x52e5
callq 0x21d0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x17c2(%rip), %rsi      # 0x5310
movq %rax, %rdi
callq 0x21d0
movq (%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x168b(%rip), %rsi      # 0x51f3
movq %rax, %rdi
callq 0x21d0
movq 0x8(%rbx), %rsi
movq %rax, %rdi
callq 0x21d0
leaq 0x1794(%rip), %rsi      # 0x5317
movq %rax, %rdi
callq 0x21d0
movq %rax, %rdi
callq 0x20e0
pushq $0x1
popq %rbx
jmp 0x3bd5
cmpl $0x2, %ebp
jne 0x3bc9
movq 0x8(%rbx), %rsi
leaq 0x8(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x3d52
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x3920
leaq 0x8(%rsp), %rdi
callq 0x20d0
xorl %ebx, %ebx
leaq 0x28(%rsp), %rdi
callq 0x3934
leaq 0x28(%rsp), %rdi
callq 0x3d98
movl %ebx, %eax
addq $0xa8, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x20d0
jmp 0x3bff
jmp 0x3bfc
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x3d98
movq %rbx, %rdi
callq 0x2320
nop