LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/shisharka[P]interactive_deduction/naturaldeduction.cpp
// Function: operator<<(std::ostream&, std::deque<std::pair<std::vector<std::shared_ptr<BaseFormula>, std::allocator<std::shared_ptr<BaseFormula>>>, std::shared_ptr<BaseFormula>>, std::allocator<std::pair<std::vector<std::shared_ptr<BaseFormula>, std::allocator<std::shared_ptr<BaseFormula>>>, std::shared_ptr<BaseFormula>>>> const&)
ostream & operator << (ostream & ostr, const Goals & goals) {
  ostr << endl << "Goals:" << endl;
  for(unsigned i = 0; i < goals.size(); i++) {
    ostr << i + 1 << ". ";
    for(unsigned j = 0; j < goals[i].first.size(); j++) {
      ostr << goals[i].first[j];
      if(j < goals[i].first.size() - 1)
        ostr << " , ";
    };
    ostr << " |-- ";
    ostr << goals[i].second << endl;
  };
  
  return ostr;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0x30c0
leaq 0x1b38(%rip), %rsi      # 0xa1cd
movq %rax, %rdi
callq 0x3160
movq %rax, %rdi
callq 0x30c0
movq %r14, (%rsp)
leaq 0x10(%r14), %r15
xorl %r12d, %r12d
leaq 0x1b20(%rip), %r13      # 0xa1d7
movl %r12d, %ebp
movq (%rsp), %rdi
callq 0x48ca
cmpq %rbp, %rax
jbe 0x8789
leal 0x1(%rbp), %r12d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x3100
movq %rax, %rdi
leaq 0x1aef(%rip), %rsi      # 0xa1d4
callq 0x3160
xorl %r14d, %r14d
movl %r14d, %r14d
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6192
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
cmpq %r14, %rcx
jbe 0x8756
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6192
movq %r14, %rsi
shlq $0x4, %rsi
addq (%rax), %rsi
movq %rbx, %rdi
callq 0x7164
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6192
movq 0x8(%rax), %rcx
subq (%rax), %rcx
sarq $0x4, %rcx
decq %rcx
cmpq %r14, %rcx
jbe 0x8751
movq %rbx, %rdi
movq %r13, %rsi
callq 0x3160
incl %r14d
jmp 0x86ed
movq %rbx, %rdi
leaq 0x1a7b(%rip), %rsi      # 0xa1db
callq 0x3160
movq %r15, %rdi
movq %rbp, %rsi
callq 0x6192
leaq 0x18(%rax), %rsi
movq %rbx, %rdi
callq 0x7164
movq %rax, %rdi
callq 0x30c0
jmp 0x86b7
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/include/part1.h
// Function: part1::calc_distance(part1::Point const&, part1::Point const&)
float calc_distance(const Point &p1, const Point &p2)
{
    const float dx = p1.x - p2.x;
    const float dy = p1.y - p2.y;
    const float dz = p1.z - p2.z;

    return std::sqrt(dx*dx + dy*dy + dz*dz);
}

// Assembly:
movss (%rdi), %xmm0
movss 0x4(%rdi), %xmm1
subss (%rsi), %xmm0
subss 0x4(%rsi), %xmm1
movss 0x8(%rdi), %xmm2
subss 0x8(%rsi), %xmm2
mulss %xmm1, %xmm1
mulss %xmm0, %xmm0
addss %xmm1, %xmm0
mulss %xmm2, %xmm2
addss %xmm0, %xmm2
sqrtss %xmm2, %xmm0
retq
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/include/part1.h
// Function: part1::create_random_points(int, float)
auto create_random_points(int n, float sz=50.0)
{
    auto points = std::vector<Point>(n);

    for (int i=0; i<n; ++i)
    {
        points[i] = Point(sz * detail::distribution(detail::generator),
                          sz * detail::distribution(detail::generator),
                          sz * detail::distribution(detail::generator) );
    }

    return points;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x40, %rsp
movss %xmm0, 0x8(%rsp)
movq %rdi, %rbx
movslq %esi, %r14
leaq 0x7(%rsp), %rdx
movq %r14, %rsi
callq 0x2dbc
cvtss2sd 0x8(%rsp), %xmm0
xorl %r12d, %r12d
testl %r14d, %r14d
cmovlel %r12d, %r14d
movaps %xmm0, 0x20(%rsp)
movlhps %xmm0, %xmm0            # xmm0 = xmm0[0,0]
movaps %xmm0, 0x10(%rsp)
imulq $0xc, %r14, %r13
leaq 0x3d81(%rip), %r14      # 0x6130
leaq 0x3d72(%rip), %r15      # 0x6128
cmpq %r12, %r13
je 0x241f
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e0e
movsd %xmm0, 0x8(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e0e
movaps %xmm0, 0x30(%rsp)
movq %r14, %rdi
movq %r15, %rsi
callq 0x2e0e
movsd 0x8(%rsp), %xmm1
mulsd 0x20(%rsp), %xmm1
cvtsd2ss %xmm1, %xmm1
movaps 0x30(%rsp), %xmm2
movlhps %xmm0, %xmm2            # xmm2 = xmm2[0],xmm0[0]
mulpd 0x10(%rsp), %xmm2
movq (%rbx), %rax
movss %xmm1, (%rax,%r12)
cvtpd2ps %xmm2, %xmm0
movlpd %xmm0, 0x4(%rax,%r12)
addq $0xc, %r12
jmp 0x23b6
movq %rbx, %rax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x3054
movq %r14, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/energy.cpp
// Function: mapreduce_energy(std::vector<part1::Point, std::allocator<part1::Point>> const&, std::vector<part1::Point, std::allocator<part1::Point>> const&)
double mapreduce_energy(const std::vector<Point> &group1,
                        const std::vector<Point> &group2)
{
    return parallel::mapReduce( [=](const Point &point1)
                      {
                          return mapReduce([=](const Point &point2)
                          {
                              return calculate_energy(point1, point2);
                          },
                          std::plus<double>(), group2 );
                      },
                      std::plus<double>(), group1 );
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x110, %rsp            # imm = 0x110
movq %rdi, %r14
leaq 0x58(%rsp), %r15
movq %r15, %rdi
callq 0x2e16
movq 0x8(%r14), %rax
subq (%r14), %rax
pushq $0xc
popq %rcx
cqto
idivq %rcx
movq %rax, %rbx
leaq 0x70(%rsp), %rax
andq $0x0, (%rax)
leaq 0x6(%rsp), %rcx
leaq 0x78(%rsp), %rdx
movq %rcx, (%rdx)
movq %r15, 0x8(%rdx)
movq %r14, 0x10(%rdx)
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %rcx, 0x28(%rsp)
andq $0x0, 0x30(%rsp)
leaq 0x90(%rsp), %rdi
pushq $0x4
popq %rsi
callq 0x2e74
testl %ebx, %ebx
jle 0x25f2
andq $0x0, 0x38(%rsp)
movl $0x1, 0x40(%rsp)
pushq $0x1
popq %rax
movq %rax, 0x48(%rsp)
movq %rax, 0x50(%rsp)
leaq 0x10(%rsp), %rdi
andq $0x0, (%rdi)
movl $0x80, %esi
callq 0x2040
movq %rax, %r14
xorps %xmm0, %xmm0
movups %xmm0, 0x28(%rax)
movups %xmm0, 0x18(%rax)
andq $0x0, 0x38(%rax)
movups %xmm0, 0x8(%rax)
leaq 0x37a3(%rip), %rax      # 0x5d38
movq %rax, (%r14)
movl %ebx, 0x40(%r14)
andl $0x0, 0x44(%r14)
movq $0x1, 0x48(%r14)
leaq 0x18(%rsp), %rax
movq %rax, 0x50(%r14)
movq %r14, %rdi
addq $0x60, %rdi
leaq 0x7(%rsp), %rsi
callq 0x2ea8
leaq 0x48(%rsp), %rdx
movq 0x10(%rsp), %rax
movq %rax, 0x70(%r14)
movb $0x0, 0x78(%r14)
leaq 0x38(%rsp), %rax
movq %rax, 0x58(%r14)
leaq 0x90(%rsp), %rcx
movq %r14, %rdi
movq %rcx, %rsi
callq 0x2150
leaq 0x90(%rsp), %rdi
callq 0x2e80
movsd 0x30(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x3054
movsd 0x8(%rsp), %xmm0
addq $0x110, %rsp            # imm = 0x110
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
jmp 0x263d
movq %rax, %rbx
leaq 0x90(%rsp), %rdi
callq 0x2e80
leaq 0x58(%rsp), %rdi
callq 0x3054
movq %rbx, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O2/willprice[P]parallel-cpp-workshop/energy.cpp
// Function: main
int main(int argc, char **argv)
{
    auto group_a = create_random_points(20000);
    auto group_b = create_random_points(20000);

    auto t0 = tbb::tick_count::now();
    auto energy = calculate_energy(group_a, group_b);
    auto t1 = tbb::tick_count::now();

    std::cout << "Total energy = " << energy << std::endl;
    std::cout << "Took = " << (t1-t0).seconds() << " seconds" << std::endl;

    t0 = tbb::tick_count::now();
    energy = mapreduce_energy(group_a, group_b);
    t1 = tbb::tick_count::now();

    std::cout << "Map/Reduce energy = " << energy << std::endl;
    std::cout << "Took = " << (t1-t0).seconds() << " seconds" << std::endl;

    return 0;    
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x38, %rsp
leaq 0x20(%rsp), %rdi
movss 0x19c5(%rip), %xmm0     # 0x4028
movl $0x4e20, %esi           # imm = 0x4E20
callq 0x2361
leaq 0x8(%rsp), %rdi
movl $0x4e20, %esi           # imm = 0x4E20
movss 0x19a9(%rip), %xmm0     # 0x4028
callq 0x2361
callq 0x2140
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x2463
movsd %xmm0, (%rsp)
callq 0x2140
movq %rax, %r14
movq 0x3929(%rip), %rdi      # 0x5fd8
leaq 0x19aa(%rip), %rsi      # 0x4060
callq 0x20f0
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x2180
movq %rax, %rdi
callq 0x2080
movq 0x3901(%rip), %rdi      # 0x5fd8
leaq 0x1992(%rip), %rsi      # 0x4070
callq 0x20f0
subq %rbx, %r14
cvtsi2sd %r14, %xmm0
divsd 0x1925(%rip), %xmm0     # 0x4018
movq %rax, %rdi
callq 0x2180
leaq 0x1976(%rip), %rsi      # 0x4078
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x2080
callq 0x2140
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x24d0
movsd %xmm0, (%rsp)
callq 0x2140
movq %rax, %r14
movq 0x389b(%rip), %rdi      # 0x5fd8
leaq 0x193d(%rip), %rsi      # 0x4081
callq 0x20f0
movq %rax, %rdi
movsd (%rsp), %xmm0
callq 0x2180
movq %rax, %rdi
callq 0x2080
movq 0x3873(%rip), %rdi      # 0x5fd8
leaq 0x1904(%rip), %rsi      # 0x4070
callq 0x20f0
subq %rbx, %r14
cvtsi2sd %r14, %xmm0
divsd 0x1897(%rip), %xmm0     # 0x4018
movq %rax, %rdi
callq 0x2180
leaq 0x18e8(%rip), %rsi      # 0x4078
movq %rax, %rdi
callq 0x20f0
movq %rax, %rdi
callq 0x2080
leaq 0x8(%rsp), %rdi
callq 0x3054
leaq 0x20(%rsp), %rdi
callq 0x3054
xorl %eax, %eax
addq $0x38, %rsp
popq %rbx
popq %r14
retq
movq %rax, %rbx
jmp 0x27d4
jmp 0x27c7
jmp 0x27c7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x3054
leaq 0x20(%rsp), %rdi
callq 0x3054
movq %rbx, %rdi
callq 0x21a0
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/main.cpp
// Function: usage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void usage(string strName){

  printf("%s Version %s - %s\n", strName.c_str(), version, AppDescription);
  printf("USAGE:\n");
  printf(" -i <input file>      Picoblaze source file\n");
  printf(" [-t <template file>] verilog/VHDL template file.\n" 
	 "                      Default = %s\n"
	 "                      Extension determines verilog/VHDL processing\n"
	 "                      \"%s\" = verilog, otherwise VHDL\n", 
	 LA_PICOASM_DEF_TPL, LA_PICOASM_VERILOG_EXT);
  printf(" [-m <module name>]   Verilog module or VHDL entity name.\n"
	 "                      Default = input file base name\n");  
  printf(" [-d <directory>]     Output file directory.\n"
	 "                      Default = input file directory\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq (%rdi), %rsi
leaq 0x17c82e(%rip), %rdi    # 0x581004
leaq 0x17cbd3(%rip), %rdx    # 0x5813b0
leaq 0x17cbdc(%rip), %rcx    # 0x5813c0
xorl %eax, %eax
callq 0x4d4250
leaq 0x17cab3(%rip), %rdi    # 0x5812a5
callq 0x4e3a80
leaq 0x17caae(%rip), %rdi    # 0x5812ac
callq 0x4e3a80
leaq 0x17c80e(%rip), %rdi    # 0x581018
leaq 0x17c8d5(%rip), %rsi    # 0x5810e6
leaq 0x17c8d6(%rip), %rdx    # 0x5810ee
xorl %eax, %eax
callq 0x4d4250
leaq 0x17cab2(%rip), %rdi    # 0x5812d8
callq 0x4e3a80
leaq 0x17cb15(%rip), %rdi    # 0x581347
popq %rbp
jmp 0x4e3a80
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: toUpper(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string toUpper( string str )
{
	string upperStr ;
	unsigned int i ; 
	
	upperStr = "" ;
	for ( i = 0 ; i < str.length() ; i++ )
		upperStr += toupper( str[ i ] ) ;

	return upperStr ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x10(%rdi), %rax
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movb $0x0, 0x10(%rdi)
leaq 0x19c7c3(%rip), %rsi    # 0x5a19f2
callq 0x47c970
xorl %r15d, %r15d
movl %r15d, %r15d
cmpq %r15, 0x8(%r14)
jbe 0x40525d
movq (%r14), %rax
movsbl (%rax,%r15), %edi
callq 0x4c2210
movsbl %al, %esi
movq %rbx, %rdi
callq 0x47c050
incl %r15d
jmp 0x405237
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x40526d
movq %rax, %r14
movq %rbx, %rdi
callq 0x47b9c0
movq %r14, %rdi
callq 0x4ad3d0
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::error(unsigned int, char const*)
void CAssembler::error( unsigned int line, const char *description )
{
  cout << "ERROR line: " << line+1 << ": " << description << endl ; 
  
// RDC 12/31/2007 - comment out
//   if ( m_messageList ) {
//     char str[ 128 ] ;
//     sprintf( str, "%u", line + 1 ) ;
//     QListViewItem *item = new QListViewItem( m_messageList, m_messageList->lastChild() ) ;
    
//     if ( line != NO_LINE_NR )
//       item->setText( 0, str ) ;
//     item->setText( 1, description ) ;
//   }

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %rbx
movl %esi, %r14d
movq $0x5f5580, %rdi         # imm = 0x5F5580
leaq 0x17c1e0(%rip), %rsi    # 0x58150d
callq 0x4755f0
incl %r14d
movq %rax, %rdi
movq %r14, %rsi
callq 0x4759c0
leaq 0x17cb13(%rip), %rsi    # 0x581e5a
movq %rax, %rdi
callq 0x4755f0
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4755f0
movq %rax, %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x474ed0
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::getInstruction(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
int CAssembler::getInstruction( string name )
{
	unsigned int i ;
	string str = toUpper( name ) ;
	for ( i = 0 ; i < sizeof( instructions ) / sizeof( char *); i++ )
		if ( str == instructions[ i ] )
			return i ;
	return -1 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x40, %rsp
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x47e0a0
leaq -0x60(%rbp), %rdi
movq %rbx, %rsi
callq 0x405208
leaq -0x40(%rbp), %rdi
callq 0x47b9c0
leaq 0x1ecd55(%rip), %r12    # 0x5f2160
xorl %r15d, %r15d
pushq $-0x1
popq %rbx
leaq -0x60(%rbp), %r14
cmpq $0x1f, %r15
je 0x405437
movq (%r12), %rsi
movq %r14, %rdi
callq 0x407845
testb %al, %al
jne 0x405434
incq %r15
addq $0x8, %r12
jmp 0x405415
movl %r15d, %ebx
leaq -0x60(%rbp), %rdi
callq 0x47b9c0
movl %ebx, %eax
addq $0x40, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x40(%rbp), %rdi
callq 0x47b9c0
movq %rbx, %rdi
callq 0x4ad3d0
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::translateRegister(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string CAssembler::translateRegister( string name )
{
	list<CNamereg*>::iterator it1 ;
	for ( it1 = m_registerTable.begin() ; it1 != m_registerTable.end() ; it1++ ) {
		if ( (*it1)->name == name )
			return (*it1)->reg ;
	}
	
	return name ;

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
addq $0x18, %r15
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x405de8
movq 0x10(%r12), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x4078b6
testb %al, %al
je 0x405dbb
movq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x47e0a0
jmp 0x405df3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47b910
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::translateConstant(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string CAssembler::translateConstant( string name )
{
	list<CConstant*>::iterator it1 ;
	for ( it1 = m_constantTable.begin() ; it1 != m_constantTable.end() ; it1++ ) {
		if ( (*it1)->name == name )
			return (*it1)->value ;
	}
	
	return name ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
addq $0x30, %r15
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x405e48
movq 0x10(%r12), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x4078b6
testb %al, %al
je 0x405e1b
movq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x47e0a0
jmp 0x405e53
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47b910
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::translateLabel(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string CAssembler::translateLabel( string label )
{
	list<CLabel*>::iterator it1 ;
	for ( it1 = m_labelTable.begin() ; it1 != m_labelTable.end() ; it1++ ) {
		if ( (*it1)->name == label )
			return (*it1)->value ;
	}
	
	return label ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
addq $0x48, %r15
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x405ea8
movq 0x10(%r12), %rdi
addq $0x20, %rdi
movq %r14, %rsi
callq 0x4078b6
testb %al, %al
je 0x405e7b
movq 0x10(%r12), %rsi
movq %rbx, %rdi
callq 0x47e0a0
jmp 0x405eb3
movq %rbx, %rdi
movq %r14, %rsi
callq 0x47b910
movq %rbx, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::createOpcodes()
bool CAssembler::createOpcodes()
{
	list<CSourceLine*>::iterator it ;
	int columnOffset ; 
	
	for ( it = m_source.begin() ; it != m_source.end() ; it++ ) {
		if ( (*it)->m_type == CSourceLine::stNamereg || 
		     (*it)->m_type == CSourceLine::stConstant || 
			 (*it)->m_type == CSourceLine::stAddress )
			continue ;
			
		if ( (*it)->m_type == CSourceLine::stLabel )
			columnOffset = 2 ;
		else 
			columnOffset = 0 ;	

		if ( !(*it)->isColumn( columnOffset + 0 ) )						// just a label
			continue ;
								
		int instr = getInstruction( (*it)->getColumn( columnOffset + 0 ) ) ;
		
		if ( instr < 0  ) {
			error( (*it)->m_lineNr, "Unknown instruction" ) ;
			return FALSE ;
		}
		
		
		if ( addInstruction( (instrNumber) instr, **it, columnOffset )  == FALSE )
			return FALSE ;
			
	} 
	return TRUE ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rdi, %r12
leaq -0x48(%rbp), %r15
movq %rdi, %rbx
movq (%rbx), %rbx
cmpq %r12, %rbx
je 0x407499
movq 0x10(%rbx), %rsi
movl 0x24(%rsi), %eax
leal -0x2(%rax), %ecx
cmpl $0x3, %ecx
jb 0x4073f3
xorl %r13d, %r13d
cmpl $0x1, %eax
sete %r13b
addl %r13d, %r13d
movq 0x10(%rsi), %rax
subq 0x8(%rsi), %rax
sarq $0x5, %rax
cmpq %r13, %rax
jbe 0x4073f3
movq %r15, %rdi
movl %r13d, %edx
callq 0x407856
movq %r15, %rsi
callq 0x4053d4
movl %eax, %r14d
movq %r15, %rdi
callq 0x47b9c0
movq 0x10(%rbx), %rsi
testl %r14d, %r14d
js 0x40748b
leaq -0x70(%rbp), %r15
movq %r15, %rdi
callq 0x407a42
movq %r12, %rdi
movl %r14d, %esi
movq %r15, %rdx
movl %r13d, %ecx
callq 0x405ec0
movl %eax, %r14d
leaq -0x68(%rbp), %rdi
callq 0x407cf6
testb %r14b, %r14b
leaq -0x48(%rbp), %r15
jne 0x4073f3
jmp 0x407499
movl (%rsi), %esi
leaq 0x17a2a0(%rip), %rdx    # 0x581734
callq 0x405312
cmpq %r12, %rbx
sete %al
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x407cf6
jmp 0x4074c8
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x47b9c0
movq %rbx, %rdi
callq 0x4ad3d0
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::assemble()
bool CAssembler::assemble( )
{
	if ( loadFile() == FALSE )
		return FALSE ;

	if ( buildSymbolTable() == FALSE )
		return FALSE ;
	// Check that the CONSTANT table and the NAMEREG table do not collide
       list<CConstant*>::iterator it0 ;

       list<CNamereg*>::iterator it1 ;

       for ( it1 = m_registerTable.begin() ; it1 != m_registerTable.end() ; it1++ ) {
	 for ( it0 = m_constantTable.begin() ; it0 != m_constantTable.end() ; it0++ ) {
	   if( (*it1)->name == (*it0)->name ) {
	     cout << "ERROR :: NAMEREG alias:(" << (*it1)->name << ") conflicts with CONSTANT: (" << (*it0)->name<<")\n";
	     return FALSE;
	   }
	 }
       }

	if ( createOpcodes() == FALSE )
		return FALSE ;
	return TRUE ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
callq 0x4075b2
testb %al, %al
je 0x40758a
movq %rbx, %rdi
callq 0x405464
testb %al, %al
je 0x40758a
leaq 0x18(%rbx), %r12
leaq 0x30(%rbx), %r13
movq %r12, %r15
movq (%r15), %r15
cmpq %r12, %r15
je 0x40759b
movq %r13, %r14
movq (%r14), %r14
cmpq %r13, %r14
je 0x407509
movq 0x10(%r15), %rdi
addq $0x20, %rdi
movq 0x10(%r14), %rsi
addq $0x20, %rsi
callq 0x4078b6
testb %al, %al
je 0x407518
movq $0x5f5580, %rdi         # imm = 0x5F5580
leaq 0x17a297(%rip), %rsi    # 0x5817de
callq 0x4755f0
movq 0x10(%r15), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x47e340
leaq 0x17a294(%rip), %rsi    # 0x5817f7
movq %rax, %rdi
callq 0x4755f0
movq 0x10(%r14), %rsi
addq $0x20, %rsi
movq %rax, %rdi
callq 0x47e340
leaq 0x18bed7(%rip), %rsi    # 0x593459
movq %rax, %rdi
callq 0x4755f0
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4073d8
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::loadFile()
bool CAssembler::loadFile()
{
	FILE *f ;

	f = fopen( m_filename.c_str(), "r" ) ;

	if ( f == NULL ) {
		string str =  "Unable to load file '" + m_filename + "'";
		error( NO_LINE_NR, str.c_str() ) ;							// No linenumber information
		return FALSE ;
	}
	char buf[ 256 ] ;
	int linenr = 0 ;
	while( fgets( buf, sizeof( buf ), f ) ) {
		CSourceLine *sourceLine = formatLine( linenr++, buf ) ;
		if ( sourceLine != NULL )
			m_source.push_back( sourceLine ) ;
	}

	list<CSourceLine*>::iterator it ;

	// RDC 01/31/2007 - don't print parsed info
// 	for ( it = m_source.begin() ; it != m_source.end() ; it++ ) {
// 		cout << "(" << (*it)->m_lineNr << ")" ;
// 		int j = 0 ;
// 		while ( (*it)->isColumn( j ) )
// 			 cout << "[" << (*it)->getColumn( j++ ) << "]";
// 		cout << endl ;
// 	}
		
// 	cout << "File " << m_filename << " succesfully loaded" << endl ;

	return TRUE ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x128, %rsp            # imm = 0x128
movq %rdi, %r14
movq 0x60(%rdi), %rdi
leaq 0x17ef8b(%rip), %rsi    # 0x58655f
callq 0x4e3010
movq %rax, %rbx
testq %rax, %rax
je 0x407628
xorl %r15d, %r15d
leaq -0x150(%rbp), %r12
leaq -0x48(%rbp), %r13
movq %r12, %rdi
movl $0x100, %esi            # imm = 0x100
movq %rbx, %rdx
callq 0x4e2d60
testq %rax, %rax
je 0x40767c
movl %r15d, %esi
movq %r12, %rdx
callq 0x40775c
movq %rax, -0x48(%rbp)
testq %rax, %rax
je 0x407623
movq %r14, %rdi
movq %r13, %rsi
callq 0x407a6e
incl %r15d
jmp 0x4075ef
addq $0x60, %r14
leaq 0x179b98(%rip), %rsi    # 0x5811cb
leaq -0x48(%rbp), %r15
movq %r15, %rdi
movq %r14, %rdx
callq 0x4079cb
leaq 0x179b96(%rip), %rdx    # 0x5811df
leaq -0x150(%rbp), %rdi
movq %r15, %rsi
callq 0x4078e2
leaq -0x48(%rbp), %rdi
callq 0x47b9c0
movq -0x150(%rbp), %rdx
pushq $-0x1
popq %rsi
callq 0x405312
leaq -0x150(%rbp), %rdi
callq 0x47b9c0
testq %rbx, %rbx
setne %al
addq $0x128, %rsp            # imm = 0x128
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
jmp 0x4076a7
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x47b9c0
movq %rbx, %rdi
callq 0x4ad3d0
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::getWord(char*, char*)
char * CAssembler::getWord( char *s, char *word ) {
	char *start, *end ;
	
	*word = '\0' ;
	
	while ( *s == ' ' || *s == '\t' )							// skip whitespaces
		s++ ;
	
	start = s ;
	
	if ( *start == '\0' || *start == '\r' || *start == '\n' || *start == ';' )	// end of line
		return NULL ;
		
	while ( *s != ' ' && *s != '\t' && *s != '\0' && *s != '\r' && *s != '\n' && 
	        *s != ';'  && *s != ',' && *s != ':' && *s != '(' && *s != ')' )
		s++ ;
	
	end = s ;
	
	if ( start != end ) {
		while ( start < end )
			*word++ = *start++ ;
		*word = '\0' ;
		return end ;
	} else if ( *s == ',' || *s == ':' || *s == '(' || *s == ')' ) {
		*word++ = *s ;
		*word = '\0' ;
		return end + 1 ;
	} else
		return NULL ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movb $0x0, (%rdx)
movabsq $0x100000200, %rax      # imm = 0x100000200
movzbl (%rsi), %ecx
cmpq $0x3b, %rcx
ja 0x4076ed
btq %rcx, %rax
jae 0x4076d9
incq %rsi
jmp 0x4076c5
movabsq $0x800000000002401, %rax # imm = 0x800000000002401
btq %rcx, %rax
jae 0x4076ed
xorl %eax, %eax
popq %rbp
retq
xorl %eax, %eax
movabsq $0xc00130100002601, %rdi # imm = 0xC00130100002601
cmpb $0x3b, %cl
ja 0x407708
movzbl %cl, %r8d
btq %r8, %rdi
jb 0x407711
movb 0x1(%rsi,%rax), %cl
incq %rax
jmp 0x4076f9
testq %rax, %rax
je 0x407736
addq %rsi, %rax
xorl %ecx, %ecx
leaq (%rsi,%rcx), %rdi
cmpq %rax, %rdi
jae 0x407730
movb (%rdi), %dil
movb %dil, (%rdx,%rcx)
incq %rcx
jmp 0x40771b
movb $0x0, (%rdx,%rcx)
jmp 0x4076eb
xorl %eax, %eax
cmpb $0x3a, %cl
ja 0x4076eb
movabsq $0x400130000000000, %rdi # imm = 0x400130000000000
btq %r8, %rdi
jae 0x4076eb
movb %cl, (%rdx)
movb $0x0, 0x1(%rdx)
incq %rsi
movq %rsi, %rax
jmp 0x4076eb
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cassembler.cpp
// Function: CAssembler::formatLine(int, char*)
CSourceLine * CAssembler::formatLine( int lineNr, char *s )
{
	CSourceLine *sourceLine = new CSourceLine( lineNr ) ;
	char *next, word[ 256 ] ;
	
	next = getWord( s, word ) ; 
	if ( word[ 0 ] == '\0' ) {			// empty line
		delete sourceLine ;
		return NULL ;
	}
	
	do {
		sourceLine->addColumn( word ) ;
		next = getWord( next, word ) ;	
		if ( word[ 0 ] == '\0' )
			break ;
	} while ( next != NULL ) ;
	
	return sourceLine ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x138, %rsp            # imm = 0x138
movq %rdx, %rbx
movl %esi, %r14d
pushq $0x28
popq %rdi
callq 0x40ce70
movq %rax, %r13
movl %r14d, (%rax)
leaq 0x8(%rax), %r14
xorps %xmm0, %xmm0
andq $0x0, 0x18(%rax)
movups %xmm0, 0x8(%rax)
andl $0x0, 0x24(%rax)
leaq -0x160(%rbp), %r12
movq %rbx, %rsi
movq %r12, %rdx
callq 0x4076b4
cmpb $0x0, (%r12)
je 0x40780a
movq %rax, %r15
movq %r13, -0x38(%rbp)
leaq -0x58(%rbp), %r12
leaq -0x160(%rbp), %r13
leaq -0x29(%rbp), %rbx
movq %r12, %rdi
movq %r13, %rsi
movq %rbx, %rdx
callq 0x40512e
movq %r14, %rdi
movq %r12, %rsi
callq 0x407d22
movq %r12, %rdi
callq 0x47b9c0
movq %r15, %rsi
movq %r13, %rdx
callq 0x4076b4
testq %rax, %rax
je 0x407804
movq %rax, %r15
cmpb $0x0, -0x160(%rbp)
jne 0x4077c7
movq -0x38(%rbp), %rax
jmp 0x40781f
movq %r14, %rdi
callq 0x407cf6
pushq $0x28
popq %rsi
movq %r13, %rdi
callq 0x40bfd0
xorl %eax, %eax
addq $0x138, %rsp            # imm = 0x138
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x47b9c0
movq %rbx, %rdi
callq 0x4ad3d0
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/./cassembler.h
// Function: CSourceLine::getColumn[abi:cxx11](int)
string getColumn( int index ) 
		{ 
			if ( !isColumn( index ) ) 
				return "" ; 
			else 
				return m_line[index] ; 
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rsi, %rax
movq %rdi, %rbx
movq 0x8(%rsi), %rsi
movq 0x10(%rax), %rax
subq %rsi, %rax
sarq $0x5, %rax
movl %edx, %ecx
cmpq %rcx, %rax
jbe 0x40788c
movslq %edx, %rax
shlq $0x5, %rax
addq %rax, %rsi
movq %rbx, %rdi
callq 0x47e0a0
jmp 0x40789f
leaq 0x19a15f(%rip), %rsi    # 0x5a19f2
leaq -0x9(%rbp), %rdx
movq %rbx, %rdi
callq 0x40512e
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: CInstruction::CInstruction(CPicoBlaze*, unsigned int)
CInstruction::CInstruction( CPicoBlaze *cpu, uint32_t opcode )
{
	m_cpu = cpu ;

	sX = ( opcode & 0x0f00 ) >> 8 ;
	sY = ( opcode & 0x00f0 ) >> 4 ;
	kk = ( opcode & 0x00ff ) >> 0 ;
	pp = ( opcode & 0x00ff ) >> 0 ;
	ss = ( opcode & 0x003f ) >> 0 ;
	address = ( opcode & 0x03ff ) >> 0 ;
	
	hexcode = opcode ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x1e1eff(%rip), %rax    # 0x5ea1c8
movq %rax, (%rdi)
movq %rsi, 0x8(%rdi)
movl %edx, %eax
shrl $0x8, %eax
andl $0xf, %eax
movw %ax, 0x10(%rdi)
movl %edx, %eax
shrl $0x4, %eax
andl $0xf, %eax
movw %ax, 0x12(%rdi)
movzbl %dl, %eax
movw %ax, 0x18(%rdi)
movw %ax, 0x16(%rdi)
movl %edx, %eax
andl $0x3f, %eax
movw %ax, 0x14(%rdi)
movl %edx, %eax
andl $0x3ff, %eax            # imm = 0x3FF
movw %ax, 0x1a(%rdi)
movl %edx, 0x1c(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: ADD_SX_KK::Execute()
void ADD_SX_KK::Execute() 
{
	uint16_t val = m_cpu->s[ sX ] + kk ;
	
	m_cpu->flags.carry = ( val > 255 ) ;
	m_cpu->flags.zero = ( val == 0 ) || ( val == 256 ) ;
	
	m_cpu->s[ sX ] = val ; 
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movzbl (%rax,%rcx), %edx
addw 0x18(%rdi), %dx
cmpw $0x100, %dx             # imm = 0x100
setae 0x11(%rax)
testw $0xfeff, %dx            # imm = 0xFEFF
sete 0x10(%rax)
movb %dl, (%rax,%rcx)
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: ADDCY_SX_KK::Execute()
void ADDCY_SX_KK::Execute()
{
	uint16_t val = m_cpu->s[ sX ] + 1 + kk ;
	
	if ( m_cpu->flags.carry ) 
		val = m_cpu->s[ sX ] + 1 + kk ;
	else
		val = m_cpu->s[ sX ] + kk ;
	
	m_cpu->s[ sX ] = val ;
	m_cpu->flags.carry = (val > 255)  ;
	m_cpu->flags.zero = (val == 0) || (val == 256) ;
		
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movzbl (%rax,%rcx), %edx
addw 0x18(%rdi), %dx
movzbl 0x11(%rax), %esi
addl %esi, %edx
movb %dl, (%rax,%rcx)
cmpw $0x100, %dx             # imm = 0x100
movq 0x8(%rdi), %rax
setae 0x11(%rax)
testw $0xfeff, %dx            # imm = 0xFEFF
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: ADDCY_SX_SY::Execute()
void ADDCY_SX_SY::Execute()
{
	uint16_t val ;

	if ( m_cpu->flags.carry ) 
		val = m_cpu->s[ sX ] + 1 + m_cpu->s[ sY ] ;
	else
		val = m_cpu->s[ sX ] + m_cpu->s[ sY ] ;
	
	m_cpu->s[ sX ] = val ;
	m_cpu->flags.carry = (val > 255)  ;
	m_cpu->flags.zero = (val == 0) || (val == 256) ;
		
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movzbl (%rax,%rcx), %edx
cmpb $0x1, 0x11(%rax)
jne 0x408519
movzwl %dx, %edx
movzwl 0x12(%rdi), %esi
movzbl (%rax,%rsi), %esi
addl %esi, %edx
incl %edx
jmp 0x408526
movzwl 0x12(%rdi), %esi
movzbl (%rax,%rsi), %esi
movzwl %dx, %edx
addl %esi, %edx
movb %dl, (%rax,%rcx)
cmpw $0x100, %dx             # imm = 0x100
movq 0x8(%rdi), %rax
setae 0x11(%rax)
testw $0x2ff, %dx             # imm = 0x2FF
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: CALLC::Execute()
void CALLC::Execute()
{
	if ( m_cpu->flags.carry ) {
		m_cpu->stack->Push( m_cpu->pc->Get() ) ;
		m_cpu->pc->Set( address ) ;
	} else
		m_cpu->pc->Next() ;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpb $0x1, 0x11(%rax)
jne 0x408783
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rax), %rdi
movq 0x28(%rax), %r14
callq 0x40a308
movzwl %ax, %esi
movq %r14, %rdi
callq 0x40a352
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdi
movzwl 0x1a(%rbx), %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x40a2f8
movq 0x18(%rax), %rdi
jmp 0x40a2e4
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: CALLNC::Execute()
void CALLNC::Execute()
{
	if ( !m_cpu->flags.carry ) {
		m_cpu->stack->Push( m_cpu->pc->Get() ) ;
		m_cpu->pc->Set( address ) ;
	} else
		m_cpu->pc->Next() ;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpb $0x0, 0x11(%rax)
je 0x4087cd
movq 0x18(%rax), %rdi
jmp 0x40a2e4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rax), %rdi
movq 0x28(%rax), %r14
callq 0x40a308
movzwl %ax, %esi
movq %r14, %rdi
callq 0x40a352
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdi
movzwl 0x1a(%rbx), %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x40a2f8
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: CALLNZ::Execute()
void CALLNZ::Execute()
{
	if ( !m_cpu->flags.zero ) {
		m_cpu->stack->Push( m_cpu->pc->Get() ) ;
		m_cpu->pc->Set( address ) ;
	} else
		m_cpu->pc->Next() ;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpb $0x0, 0x10(%rax)
je 0x408845
movq 0x18(%rax), %rdi
jmp 0x40a2e4
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rax), %rdi
movq 0x28(%rax), %r14
callq 0x40a308
movzwl %ax, %esi
movq %r14, %rdi
callq 0x40a352
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdi
movzwl 0x1a(%rbx), %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x40a2f8
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: CALLZ::Execute()
void CALLZ::Execute()
{
	if ( m_cpu->flags.zero ) {
		m_cpu->stack->Push( m_cpu->pc->Get() ) ;
		m_cpu->pc->Set( address ) ;
	} else
		m_cpu->pc->Next() ;
}

// Assembly:
movq 0x8(%rdi), %rax
cmpb $0x1, 0x10(%rax)
jne 0x4088eb
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x18(%rax), %rdi
movq 0x28(%rax), %r14
callq 0x40a308
movzwl %ax, %esi
movq %r14, %rdi
callq 0x40a352
movq 0x8(%rbx), %rax
movq 0x18(%rax), %rdi
movzwl 0x1a(%rbx), %esi
popq %rbx
popq %r14
popq %rbp
jmp 0x40a2f8
movq 0x18(%rax), %rdi
jmp 0x40a2e4
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: JUMPC::Execute()
void JUMPC::Execute()
{
	if ( m_cpu->flags.carry )
		m_cpu->pc->Set( address ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq 0x8(%rdi), %rcx
movq 0x18(%rcx), %rdi
cmpb $0x1, 0x11(%rcx)
jne 0x408d47
movzwl 0x1a(%rax), %esi
popq %rbp
jmp 0x40a2f8
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: JUMPNC::Execute()
void JUMPNC::Execute()
{
	if ( !m_cpu->flags.carry )
		m_cpu->pc->Set( address ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq 0x8(%rdi), %rcx
movq 0x18(%rcx), %rdi
cmpb $0x0, 0x11(%rcx)
je 0x408d97
popq %rbp
jmp 0x40a2e4
movzwl 0x1a(%rax), %esi
popq %rbp
jmp 0x40a2f8
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: JUMPNZ::Execute()
void JUMPNZ::Execute()
{
	if ( !m_cpu->flags.zero )
		m_cpu->pc->Set( address ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq 0x8(%rdi), %rcx
movq 0x18(%rcx), %rdi
cmpb $0x0, 0x10(%rcx)
je 0x408deb
popq %rbp
jmp 0x40a2e4
movzwl 0x1a(%rax), %esi
popq %rbp
jmp 0x40a2f8
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: JUMPZ::Execute()
void JUMPZ::Execute()
{
	if ( m_cpu->flags.zero )
		m_cpu->pc->Set( address ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, %rax
movq 0x8(%rdi), %rcx
movq 0x18(%rcx), %rdi
cmpb $0x1, 0x10(%rcx)
jne 0x408e43
movzwl 0x1a(%rax), %esi
popq %rbp
jmp 0x40a2f8
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RETURNC::Execute()
void RETURNC::Execute()
{
	if ( m_cpu->flags.carry )
		m_cpu->pc->Set( m_cpu->stack->Pop() ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rbx
cmpb $0x1, 0x11(%rax)
jne 0x40923c
movq 0x28(%rax), %rdi
callq 0x40a3a6
movzwl %ax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2f8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2e4
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RETURNNC::Execute()
void RETURNNC::Execute()
{
	if ( !m_cpu->flags.carry )
		m_cpu->pc->Set( m_cpu->stack->Pop() ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rbx
cmpb $0x0, 0x11(%rax)
je 0x409284
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2e4
movq 0x28(%rax), %rdi
callq 0x40a3a6
movzwl %ax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2f8
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RETURNNZ::Execute()
void RETURNNZ::Execute()
{
	if ( !m_cpu->flags.zero )
		m_cpu->pc->Set( m_cpu->stack->Pop() ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rbx
cmpb $0x0, 0x10(%rax)
je 0x4092d8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2e4
movq 0x28(%rax), %rdi
callq 0x40a3a6
movzwl %ax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2f8
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RETURNZ::Execute()
void RETURNZ::Execute()
{
	if ( m_cpu->flags.zero )
		m_cpu->pc->Set( m_cpu->stack->Pop() ) ;
	else
		m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rbx
cmpb $0x1, 0x10(%rax)
jne 0x409338
movq 0x28(%rax), %rdi
callq 0x40a3a6
movzwl %ax, %esi
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2f8
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a2e4
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RETURNI_DISABLE::Execute()
void RETURNI_DISABLE::Execute()
{
	m_cpu->pc->Set( m_cpu->stack->Pop() ) ;
	m_cpu->flags.carry = m_cpu->flags.preserved_carry ;
	m_cpu->flags.zero = m_cpu->flags.preserved_zero ;
	m_cpu->flags.interrupt_enable = false ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x18(%rax), %r14
movq 0x28(%rax), %rdi
callq 0x40a3a6
movzwl %ax, %esi
movq %r14, %rdi
callq 0x40a2f8
movq 0x8(%rbx), %rax
movzwl 0x13(%rax), %ecx
movw %cx, 0x10(%rax)
movb $0x0, 0x12(%rax)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RL_SX::Execute()
void RL_SX::Execute()
{
	m_cpu->flags.carry = ( m_cpu->s[ sX ] & 0x80 ) != 0 ;

	m_cpu->s[ sX ] <<= 1 ;
	if ( m_cpu->flags.carry )
		m_cpu->s[ sX ] |= 1 ;

	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movb (%rax,%rcx), %dl
shrb $0x7, %dl
movb %dl, 0x11(%rax)
shlb (%rax,%rcx)
movq 0x8(%rdi), %rax
cmpb $0x1, 0x11(%rax)
jne 0x409434
movzwl 0x10(%rdi), %ecx
orb $0x1, (%rax,%rcx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
cmpb $0x0, (%rax,%rcx)
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: SLA_SX::Execute()
void SLA_SX::Execute()
{
	bool c ;

	c = m_cpu->flags.carry ;

	m_cpu->flags.carry = ( m_cpu->s[ sX ] & 0x80 ) != 0 ;

	m_cpu->s[ sX ] <<= 1 ;
	if ( c )
		m_cpu->s[ sX ] |= 1 ;
	
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movb 0x11(%rax), %cl
movzwl 0x10(%rdi), %edx
movb (%rax,%rdx), %sil
shrb $0x7, %sil
movb %sil, 0x11(%rax)
shlb (%rax,%rdx)
cmpb $0x1, %cl
jne 0x4095e5
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
orb $0x1, (%rax,%rcx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
cmpb $0x0, (%rax,%rcx)
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: SLX_SX::Execute()
void SLX_SX::Execute()
{
	m_cpu->flags.carry = ( m_cpu->s[ sX ] & 0x80 ) != 0 ;

	m_cpu->s[ sX ] <<= 1 ;
	if ( m_cpu->s[ sX ] & 0x02 )
		m_cpu->s[ sX ] |= 1 ;
	
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movb (%rax,%rcx), %dl
shrb $0x7, %dl
movb %dl, 0x11(%rax)
shlb (%rax,%rcx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %edx
movb (%rax,%rdx), %cl
testb $0x2, %cl
je 0x409667
orb $0x1, %cl
movb %cl, (%rax,%rdx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movb (%rax,%rcx), %cl
testb %cl, %cl
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: SRA_SX::Execute()
void SRA_SX::Execute()
{
	bool c = m_cpu->flags.carry ;
	m_cpu->flags.carry = m_cpu->s[ sX ] & 0x01 ;
	m_cpu->s[ sX ] >>= 1 ;
	if ( c )
		m_cpu->s[ sX ] |= 0x80 ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movb 0x11(%rax), %cl
movzwl 0x10(%rdi), %edx
movb (%rax,%rdx), %sil
andb $0x1, %sil
movb %sil, 0x11(%rax)
shrb (%rax,%rdx)
cmpb $0x1, %cl
jne 0x4097a1
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
orb $-0x80, (%rax,%rcx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
cmpb $0x0, (%rax,%rcx)
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: SRX_SX::Execute()
void SRX_SX::Execute()
{
	m_cpu->flags.carry = m_cpu->s[ sX ] & 0x01 ;
	m_cpu->s[ sX ] >>= 1 ;
	if ( m_cpu->s[ sX ] & 0x40  )
		m_cpu->s[ sX ] |= 0x80 ;
	m_cpu->flags.zero = m_cpu->s[ sX ] == 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movb (%rax,%rcx), %dl
andb $0x1, %dl
movb %dl, 0x11(%rax)
shrb (%rax,%rcx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %edx
movb (%rax,%rdx), %cl
testb $0x40, %cl
je 0x409823
orb $-0x80, %cl
movb %cl, (%rax,%rdx)
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movb (%rax,%rcx), %cl
testb %cl, %cl
sete 0x10(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: TEST_SX_KK::Execute()
void TEST_SX_KK::Execute()
{
	uint8_t and_test = ( m_cpu->s[ sX ] & kk ) ;
	m_cpu->flags.zero = and_test == 0 ;

	int i ;

	uint8_t xor_test = 0, b ;

	for ( i = 0 ; i < 8 ; i++ ) {
		b = ( and_test & ( 1 << i ) ) != 0 ; 
		xor_test = b ^ xor_test ;	
	}

	m_cpu->flags.carry = xor_test != 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movzbl (%rax,%rcx), %edx
movzbl 0x18(%rdi), %ecx
andl %edx, %ecx
sete 0x10(%rax)
xorl %edx, %edx
xorl %esi, %esi
cmpl $0x8, %esi
je 0x409b95
btl %esi, %ecx
setb %dil
xorb %dil, %dl
incl %esi
jmp 0x409b82
pushq %rbp
movq %rsp, %rbp
testb %dl, %dl
setne 0x11(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: TEST_SX_SY::Execute()
void TEST_SX_SY::Execute()
{
	uint8_t and_test = ( m_cpu->s[ sX ] & m_cpu->s[ sY ] ) ;
	m_cpu->flags.zero = and_test == 0 ;

	int i ;

	uint8_t xor_test = 0, b ;

	for ( i = 0 ; i < 8 ; i++ ) {
		b = ( and_test & ( 1 << i ) ) != 0 ; 
		xor_test = b ^ xor_test ;	
	}

	m_cpu->flags.carry = xor_test != 0 ;
	m_cpu->pc->Next() ;
}

// Assembly:
movq 0x8(%rdi), %rax
movzwl 0x10(%rdi), %ecx
movzbl (%rax,%rcx), %edx
movzwl 0x12(%rdi), %ecx
movzbl (%rax,%rcx), %ecx
andl %edx, %ecx
sete 0x10(%rax)
xorl %edx, %edx
xorl %esi, %esi
cmpl $0x8, %esi
je 0x409c25
btl %esi, %ecx
setb %dil
xorb %dil, %dl
incl %esi
jmp 0x409c12
pushq %rbp
movq %rsp, %rbp
testb %dl, %dl
setne 0x11(%rax)
movq 0x18(%rax), %rdi
popq %rbp
jmp 0x40a2e4
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: RESET_EVENT::Execute()
void RESET_EVENT::Execute() 
{
	m_cpu->pc->Set( 0 ) ;
	m_cpu->flags.interrupt_enable = false ;
	m_cpu->flags.zero = false ;
	m_cpu->flags.carry = false ;
	m_cpu->stack->Reset() ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq 0x18(%rax), %rdi
xorl %esi, %esi
callq 0x40a2f8
movq 0x8(%rbx), %rax
movb $0x0, 0x12(%rax)
andw $0x0, 0x10(%rax)
movq 0x28(%rax), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x40a3f4
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cinstruction.cpp
// Function: INTERRUPT_EVENT::Execute()
void INTERRUPT_EVENT::Execute()
{
	if ( m_cpu->flags.interrupt_enable ) {
		m_cpu->flags.interrupt_enable = false ;
		m_cpu->stack->Push( m_cpu->pc->Get() ) ;
		m_cpu->flags.preserved_carry = m_cpu->flags.carry ;
		m_cpu->flags.preserved_zero = m_cpu->flags.zero ;
		m_cpu->pc->Set( 0x3FF ) ;	
	}
}

// Assembly:
movq 0x8(%rdi), %rax
cmpb $0x1, 0x12(%rax)
jne 0x409e16
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movb $0x0, 0x12(%rax)
movq 0x18(%rax), %rdi
movq 0x28(%rax), %r14
callq 0x40a308
movzwl %ax, %esi
movq %r14, %rdi
callq 0x40a352
movq 0x8(%rbx), %rax
movzwl 0x10(%rax), %ecx
movw %cx, 0x13(%rax)
movq 0x18(%rax), %rdi
movl $0x3ff, %esi            # imm = 0x3FF
popq %rbx
popq %r14
popq %rbp
jmp 0x40a2f8
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CStack::CStack()
CStack::CStack()
{
	int i ;
	for ( i = 0 ; i < STACK_DEPTH ; i++ )
		stack[ i ] = 0 ;
	ptr = 0 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
xorl %eax, %eax
cmpq $0x1f, %rax
je 0x40a346
andw $0x0, (%rdi,%rax,2)
incq %rax
jmp 0x40a336
movb $0x0, 0x3e(%rdi)
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CStack::Push(unsigned short)
void CStack::Push( uint16_t data )
{	
	data &= 0x3FF ;
	if ( ptr == STACK_DEPTH - 1 )
	  cout << ">>>>Stack overflow!<<<<" << endl ;
		
	stack[ ptr ] = data ;
	ptr = ( ptr + 1 ) % STACK_DEPTH ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %esi, %r14d
movq %rdi, %rbx
movb 0x3e(%rdi), %al
cmpb $0x1e, %al
jne 0x40a384
movq $0x5f5580, %rdi         # imm = 0x5F5580
leaq 0x177a38(%rip), %rsi    # 0x581dac
callq 0x4755f0
movq %rax, %rdi
callq 0x474ed0
movb 0x3e(%rbx), %al
andl $0x3ff, %r14d           # imm = 0x3FF
movzbl %al, %eax
movw %r14w, (%rbx,%rax,2)
incl %eax
movw $0x1f, %cx
xorl %edx, %edx
divw %cx
movb %dl, 0x3e(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CStack::Pop()
uint16_t CStack::Pop()
{
	if ( ptr == 0 )
	  cout << ">>>>Stack underflow!<<<<" << endl ;
		
	ptr = ( ptr - 1 ) % STACK_DEPTH ;
	return stack[ ptr ] ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movb 0x3e(%rdi), %al
testb %al, %al
jne 0x40a3d4
movq $0x5f5580, %rdi         # imm = 0x5F5580
leaq 0x177a00(%rip), %rsi    # 0x581dc4
callq 0x4755f0
movq %rax, %rdi
callq 0x474ed0
movb 0x3e(%rbx), %al
movzbl %al, %eax
decl %eax
movw $0x1f, %cx
cwtd
idivw %cx
movb %dl, 0x3e(%rbx)
movzbl %dl, %eax
movzwl (%rbx,%rax,2), %eax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPort::PortIn()
uint8_t CPort::PortIn()
{
	// find appropiate port 
	list<CIOPort*>::iterator i ;
	
	for ( i = portList.begin() ; i != portList.end() ; i++ ) 
		if ( (*i)->getID() == portid && (*i)->isReadable() )
			return (*i)->In() ;
	
	
	// Nothing found return zero
	return 0 ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movzwl (%rdi), %ecx
addq $0x8, %rdi
movq %rdi, %rdx
movq (%rdx), %rdx
cmpq %rdi, %rdx
je 0x40a4b3
movq 0x10(%rdx), %rax
movzbl 0x8(%rax), %esi
cmpw %si, %cx
jne 0x40a48e
testb $0x1, 0xc(%rax)
je 0x40a48e
movq (%rax), %rcx
movq %rax, %rdi
popq %rbp
jmpq *0x8(%rcx)
xorl %eax, %eax
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/stacksmith[P]picoasm/cpicoblaze.cpp
// Function: CPort::PortOut(unsigned char)
void CPort::PortOut( uint8_t data )
{
	// find appropiate port 
	list<CIOPort*>::iterator i ;
	
	for ( i = portList.begin() ; i != portList.end() ; i++ ) 
		if ( (*i)->getID() == portid && (*i)->isWriteable() )
			(*i)->Out( data ) ;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdi, %rbx
leaq 0x8(%rdi), %r15
movzbl %sil, %r14d
movq %r15, %r12
movq (%r12), %r12
cmpq %r15, %r12
je 0x40a4f8
movq 0x10(%r12), %rdi
movzbl 0x8(%rdi), %eax
cmpw %ax, (%rbx)
jne 0x40a4d1
testb $0x2, 0xc(%rdi)
je 0x40a4d1
movq (%rdi), %rax
movl %r14d, %esi
callq *(%rax)
jmp 0x40a4d1
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop