LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/map.hpp
// Function: bool ft::operator<<char, int, ft::less<char>, std::allocator<ft::pair<char const, int>>>(ft::map<char, int, ft::less<char>, std::allocator<ft::pair<char const, int>>> const&, ft::map<char, int, ft::less<char>, std::allocator<ft::pair<char const, int>>> const&)
bool
	operator<(map<Key, T, Compare, Alloc> const& lhs, map<Key, T, Compare, Alloc> const& rhs)
	{
		return lexicographical_compare(lhs.begin(),
										lhs.end(),
										rhs.begin(),
										rhs.end());
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x88, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq -0xa8(%rbp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x134be
leaq -0x88(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x134f2
leaq -0x68(%rbp), %r14
movq %r14, %rdi
movq %rbx, %rsi
callq 0x134be
leaq -0x48(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x134f2
movq %r15, %rdi
movq %r12, %rsi
movq %r14, %rdx
movq %r13, %rcx
callq 0x15a34
addq $0x88, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/map.hpp
// Function: ft::map<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int, ft::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, std::allocator<ft::pair<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const, int>>>::at(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
mapped_type&
		at(key_type const& k)
		{
			node_pointer position = this->find_helper(k, this->_root);

			// Match
			if (position)
				return position->data.second;
			// No match
			else
				throw std::out_of_range("at:: out of range index");
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x28, %rsp
leaq 0x8(%rdi), %rdx
callq 0x1879a
testq %rax, %rax
je 0x17ac0
addq $0x20, %rax
addq $0x28, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
pushq $0x10
popq %rdi
callq 0x50d0
movq %rax, %rbx
leaq 0x170b3(%rip), %rsi     # 0x2eb85
leaq -0x40(%rbp), %rdi
leaq -0x19(%rbp), %rdx
callq 0x5090
movb $0x1, %r15b
leaq -0x40(%rbp), %rsi
movq %rbx, %rdi
callq 0x5230
xorl %r15d, %r15d
movq 0x2f4b0(%rip), %rsi     # 0x46fa8
movq 0x2f499(%rip), %rdx     # 0x46f98
movq %rbx, %rdi
callq 0x52b0
movq %rax, %r14
leaq -0x40(%rbp), %rdi
callq 0x51d0
testb %r15b, %r15b
jne 0x17b25
jmp 0x17b2d
movq %rax, %rdi
callq 0x5d57
movq %rax, %r14
movq %rbx, %rdi
callq 0x5120
movq %r14, %rdi
callq 0x52d0
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<int, std::allocator<int>>::vector(unsigned long, int const&, std::allocator<int> const&)
explicit
		vector(size_type n,
				value_type const& val = value_type(),
				allocator_type const& alloc = allocator_type()) :
			_start(NULL),
			_allocator(alloc),
			_size(0),
			_capacity(0)
		{
			reserve(n);

			for (size_type i = 0; i < n; i++)
				_allocator.construct(_start + i, val);

			_size = n;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rdi, %r15
leaq 0x25a48(%rip), %rax     # 0x460e0
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
movq %rsi, %r14
leaq 0x18(%rdi), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
callq 0x1068c
movq 0x8(%r15), %rax
xorl %ecx, %ecx
cmpq %rcx, %r14
je 0x206c8
movl (%rbx), %edx
movl %edx, (%rax,%rcx,4)
incq %rcx
jmp 0x206b9
movq %r14, (%r12)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: bool ft::operator<<int, std::allocator<int>>(ft::vector<int, std::allocator<int>> const&, ft::vector<int, std::allocator<int>> const&)
bool
	operator<(vector<T, A> const& lhs, vector<T, A> const& rhs)
	{
		return lexicographical_compare(lhs.begin(),
										lhs.end(),
										rhs.begin(),
										rhs.end());

	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq 0x8(%rdi), %rcx
leaq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq 0x18(%rdi), %rdx
leaq (%rcx,%rdx,4), %rcx
leaq -0x18(%rbp), %r8
movq %rcx, (%r8)
movq 0x8(%rsi), %rcx
leaq -0x10(%rbp), %rdx
movq %rcx, (%rdx)
movq 0x18(%rsi), %rsi
leaq (%rcx,%rsi,4), %rsi
leaq -0x8(%rbp), %rcx
movq %rsi, (%rcx)
movq %rax, %rdi
movq %r8, %rsi
callq 0x20fb9
addq $0x20, %rsp
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/tester/containers/vector/test_vector_capacity.cpp
// Function: test_vector_capacity_reserve_smaller_capacity()
void
test_vector_capacity_reserve_smaller_capacity()
{
	ft::vector<int> vec(6, 42);

	print_vec_info(vec);
	vec.reserve(-1);
	print_vec_info(vec);
	vec.reserve(1);
	print_vec_info(vec);
	vec.reserve(6);
	print_vec_info(vec);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
subq $0x38, %rsp
leaq -0x10(%rbp), %rdx
movl $0x2a, (%rdx)
leaq -0x38(%rbp), %rbx
pushq $0x6
popq %rsi
leaq -0x9(%rbp), %rcx
movq %rbx, %rdi
callq 0x20680
movq %rbx, %rdi
callq 0x223e3
leaq -0x38(%rbp), %rdi
pushq $-0x1
popq %rsi
callq 0x1068c
leaq -0x38(%rbp), %rdi
callq 0x223e3
leaq -0x38(%rbp), %rdi
pushq $0x1
popq %rsi
callq 0x1068c
leaq -0x38(%rbp), %rdi
callq 0x223e3
leaq -0x38(%rbp), %rdi
pushq $0x6
popq %rsi
callq 0x1068c
leaq -0x38(%rbp), %rdi
callq 0x223e3
leaq -0x38(%rbp), %rdi
callq 0x10202
addq $0x38, %rsp
popq %rbx
popq %rbp
retq
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x10202
movq %rbx, %rdi
callq 0x52d0
movq %rax, %rdi
callq 0x5d57
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<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>>>>::resize(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void
		resize(size_type n, value_type val = value_type())
		{
			// Reduced content to its first n elements
			if (n < _size)
			{
				// We also need to destroy items beyond size
				// Destroy doesn't deallocate item so we don't need to
				// change _capacity (or destroy beyond _size)
				for (size_type i = n; i < _size; i++)
					_allocator.destroy(&_start[i]);
				_size = n;
			}
			else if (n > _size)
			{
				if (n > _capacity)
					reserve(get_new_capacity(n));
				for (size_type i = _size; i < n; i++)
					_allocator.construct(&_start[i], val);
				_size = n;
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r15
movq %rdi, %rbx
movq %rsi, -0x30(%rbp)
movq 0x18(%rdi), %r12
cmpq %rsi, %r12
jbe 0x232ed
movq %r15, %r14
shlq $0x5, %r14
movq %r15, %r13
cmpq %r12, %r13
jae 0x2333b
movq 0x8(%rbx), %rdi
addq %r14, %rdi
callq 0x51d0
incq %r13
movq 0x18(%rbx), %r12
addq $0x20, %r14
jmp 0x232cf
jae 0x2333f
movq %rdx, %r14
cmpq %r15, 0x20(%rbx)
jae 0x23313
leaq -0x30(%rbp), %rsi
movq %rbx, %rdi
callq 0x2336e
movq %rbx, %rdi
movq %rax, %rsi
callq 0x225fc
movq 0x18(%rbx), %r12
movq %r12, %r13
shlq $0x5, %r13
movq -0x30(%rbp), %r15
cmpq %r15, %r12
jae 0x2333b
movq 0x8(%rbx), %rdi
addq %r13, %rdi
movq %r14, %rsi
callq 0x51f0
incq %r12
addq $0x20, %r13
jmp 0x2331a
movq %r15, 0x18(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<int, std::allocator<int>>::vector<ft::random_access_iterator<int>>(ft::random_access_iterator<int>, ft::random_access_iterator<int>, std::allocator<int> const&, ft::enable_if<!ft::is_integral<ft::random_access_iterator<int>>::value, ft::random_access_iterator<int>>::type*)
vector(InputIterator first,
				InputIterator last,
				allocator_type const& alloc = allocator_type(),
				typename ft::enable_if<!ft::is_integral<InputIterator>::value,
										InputIterator>::type* = NULL) :
			_start(NULL),
			_allocator(alloc),
			_size(0),
			_capacity(0)
		{
			reserve(ft::distance(first, last));

			for (iterator it_arg = first; it_arg != last; it_arg++)
			{
				_allocator.construct(_start + _size, *it_arg);
				_size++;
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
leaq 0x21ae8(%rip), %rax     # 0x460e0
movq %rax, (%rdi)
andq $0x0, 0x8(%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movq (%rsi), %rax
movq %rax, -0x30(%rbp)
movq (%rdx), %r12
leaq 0x21b28(%rip), %rdi     # 0x46140
leaq 0x21b39(%rip), %rsi     # 0x46158
callq 0x10962
testb %al, %al
jne 0x24690
leaq 0x18(%rbx), %r13
leaq 0x21b0d(%rip), %rdi     # 0x46140
movq %rdi, %rsi
callq 0x10962
subq -0x30(%rbp), %r12
movq %r12, %rcx
sarq $0x2, %rcx
shrq $0x2, %r12
testb %al, %al
cmovneq %rcx, %r12
movq %rbx, %rdi
movq %r12, %rsi
callq 0x1068c
movq (%r15), %rax
movq (%r14), %rcx
movq 0x8(%rbx), %rdx
movq 0x18(%rbx), %rsi
incq %rsi
cmpq %rcx, %rax
je 0x24681
movl (%rax), %edi
movl %edi, -0x4(%rdx,%rsi,4)
movq %rsi, (%r13)
addq $0x4, %rax
jmp 0x24669
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
pushq $0x8
popq %rdi
callq 0x50d0
movq 0x228e9(%rip), %rcx     # 0x46f88
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x22913(%rip), %rsi     # 0x46fc0
movq 0x2293c(%rip), %rdx     # 0x46ff0
movq %rax, %rdi
callq 0x52b0
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<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>>>>::assign(unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void
		assign(size_type n, value_type const& val)
		{
			// Destroy existing elements
			clear();

			// Make sure there is enough or just enough space for the new data
			reserve(n);

			// Setting new elements
			insert(begin(), n, val);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq %rsi, %r14
movq %rdi, %r15
callq 0x1057a
movq %r15, %rdi
movq %r14, %rsi
callq 0x225fc
movq 0x8(%r15), %rax
leaq -0x20(%rbp), %rsi
movq %rax, (%rsi)
movq %r15, %rdi
movq %r14, %rdx
movq %rbx, %rcx
callq 0x295ec
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<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>>>>::erase(ft::random_access_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
iterator
		erase(iterator position)
		{
			// Destroy the element at position
			_allocator.destroy(&*position);

			// Offset all the elements by one to fill the gap
			for (iterator it = position; it + 1 != end(); it++)
			{
				_allocator.construct(&*it, *(it + 1));
				_allocator.destroy(&*(it + 1));
			}

			_size--;

			return position;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
movq (%rdx), %rdi
callq 0x51d0
movq (%rbx), %rdi
leaq 0x20(%rdi), %r12
movq 0x18(%r15), %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq 0x8(%r15), %rcx
cmpq %rcx, %r12
je 0x29cae
movq %r12, %rsi
callq 0x51f0
movq %r12, %rdi
callq 0x51d0
movq %r12, %rdi
jmp 0x29c81
decq %rax
movq %rax, 0x18(%r15)
movq (%rbx), %rax
movq %rax, (%r14)
movq %r14, %rax
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/DimitriDaSilva[P]42_ft_containers/containers/vector.hpp
// Function: ft::vector<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>>>>::erase(ft::random_access_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>, ft::random_access_iterator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>>)
iterator
		erase(iterator first, iterator last)
		{
			difference_type	distance = ft::distance(first, last);
			iterator save_first = first;

			// Destroy the range of elements
			while (first != last)
				_allocator.destroy(&*first++);

			// Offset all the elements by distance to fill the gap
			for (iterator it = save_first; it + distance != end(); it++)
			{
				_allocator.construct(&*it, *(it + distance));
				_allocator.destroy(&*(it + distance));
			}

			_size -= distance;

			return save_first;
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %r13
movq %rdx, %r14
movq %rsi, %rbx
movq %rdi, %r15
movq (%rdx), %rax
leaq -0x48(%rbp), %rdi
movq %rax, (%rdi)
movq (%rcx), %rax
leaq -0x40(%rbp), %rsi
movq %rax, (%rsi)
callq 0x29071
movq %rax, -0x30(%rbp)
movq (%r14), %r12
movq %r15, -0x38(%rbp)
movq %r12, (%r15)
movq %r12, %rdi
cmpq (%r13), %rdi
je 0x29db8
leaq 0x20(%rdi), %rax
movq %rax, (%r14)
callq 0x51d0
movq (%r14), %rdi
jmp 0x29da1
movq -0x30(%rbp), %r15
movq %r15, %r13
shlq $0x5, %r13
leaq (%r12,%r13), %r14
movq 0x18(%rbx), %rax
movq %rax, %rcx
shlq $0x5, %rcx
addq 0x8(%rbx), %rcx
cmpq %rcx, %r14
je 0x29df4
movq %r12, %rdi
movq %r14, %rsi
callq 0x51f0
movq %r14, %rdi
callq 0x51d0
addq $0x20, %r12
jmp 0x29dc3
subq %r15, %rax
movq %rax, 0x18(%rbx)
movq -0x38(%rbp), %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/arithmancy.cpp
// Function: SumDigits(int)
int SumDigits(int n)
{
    while(n > 9)
    {
        int tmp = 0;
        while(n > 0)
        {
            tmp += n % 10;
            n /= 10;
        }
        n = tmp;
    }
    return n;
}

// Assembly:
movl %edi, %eax
pushq $0xa
popq %rcx
cmpl $0xa, %eax
jl 0x27f4
xorl %esi, %esi
testl %eax, %eax
je 0x27f0
xorl %edx, %edx
divl %ecx
addl %edx, %esi
jmp 0x27e4
movl %esi, %eax
jmp 0x27dd
retq
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/arithmancy.cpp
// Function: GetDigitalRootOfSpell(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
int GetDigitalRootOfSpell(const string & spellName)
{
    int root = 0;
    for(char c : spellName)
    {
        if(c >= 'a' && c <= 'z')
        {
            root += LETTERVALUES[c - 'a'];
        }
        else if(c >= 'A' && c <= 'Z')
        {
            root += LETTERVALUES[c - 'A'];
        }
    }
    return SumDigits(root);
}

// Assembly:
movl $0xffffff9f, %r8d       # imm = 0xFFFFFF9F
movq (%rdi), %rax
movq 0x8(%rdi), %rcx
xorl %edx, %edx
leaq 0x28d5(%rip), %rsi      # 0x50e0
addq $0x20, %r8
xorl %edi, %edi
cmpq %rdx, %rcx
je 0x27d8
movsbq (%rax,%rdx), %r9
leal -0x61(%r9), %r11d
movl $0xffffff9f, %r10d      # imm = 0xFFFFFF9F
cmpb $0x1a, %r11b
jb 0x283c
leal -0x41(%r9), %r11d
movq %r8, %r10
cmpb $0x19, %r11b
ja 0x2843
addl %r9d, %r10d
addl (%rsi,%r10,4), %edi
incq %rdx
jmp 0x2811
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/dices.cpp
// Function: DiceRoller::RollDices(std::__cxx11::list<std::pair<int, int>, std::allocator<std::pair<int, int>>> const&)
RollResult DiceRoller::RollDices(const list<pair<int, int>> & dices)
{
    RollResult rollResult;
    for(pair<int, int> group : dices)
    {
        for(int i = 0; i < group.first; ++i)
        {
            rollResult.AddDiceResult(RollDice(group.second));
        }
    }
    return rollResult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rdx, %r14
andl $0x0, 0x18(%rdi)
movq %rsi, %r15
leaq 0x10(%rsp), %r12
movq %rdx, 0x8(%rsp)
movq (%r14), %r14
cmpq 0x8(%rsp), %r14
je 0x2a31
movl 0x10(%r14), %r13d
movl 0x14(%r14), %ebp
testl %r13d, %r13d
movl $0x0, %eax
cmovlel %eax, %r13d
subl $0x1, %r13d
jb 0x29f1
movq %r15, %rdi
movl %ebp, %esi
callq 0x2994
movq %rax, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x28ac
jmp 0x2a0f
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0x2c00
movq %r14, %rdi
callq 0x2260
// File: /workspace/github_cpp_makefile_star2_O2/pokorj54[P]Pathfinder-utilities/src/dices.cpp
// Function: DiceRoller::ParseDiceString(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
RollResult DiceRoller::ParseDiceString(const std::string & diceString)
{
    RollResult rollResult;
    stringstream ss(diceString);
    int amount, sides;
    ss >> amount;
    while(!ss.fail())
    {
        char c = 0;
        ss >> c;
        if(c == 'd')
        {
            ss >> sides;
            for(int i = 0; i < amount; ++i)
            {
                rollResult.AddDiceResult(RollDice(sides));
            }
            ss >> c;
        }
        else
        {
            rollResult.AddModifier(amount);
        }
        ss >> amount;
    }
    return rollResult;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1a8, %rsp            # imm = 0x1A8
movq %rdi, %rbx
movq %rdi, 0x8(%rdi)
movq %rdi, (%rdi)
andq $0x0, 0x10(%rdi)
movq %rsi, %r14
andl $0x0, 0x18(%rdi)
leaq 0x20(%rsp), %rdi
pushq $0x18
popq %rax
movq %rdx, %rsi
movl %eax, %edx
callq 0x2210
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x20f0
leaq 0x20(%rsp), %r15
leaq 0x18(%rsp), %rbp
leaq 0x10(%rsp), %r12
movq 0x20(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x40(%rsp,%rax)
jne 0x2b34
movb $0x0, 0xf(%rsp)
movq %r15, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21b0
cmpb $0x64, 0xf(%rsp)
jne 0x2b0e
movq %r15, %rdi
leaq 0x14(%rsp), %rsi
callq 0x20f0
xorl %r13d, %r13d
cmpl 0x10(%rsp), %r13d
jge 0x2b17
movl 0x14(%rsp), %esi
movq %r14, %rdi
callq 0x2994
movq %rax, 0x18(%rsp)
movq %rbx, %rdi
movq %rbp, %rsi
callq 0x28ac
incl %r13d
jmp 0x2ae6
movl 0x10(%rsp), %eax
addl %eax, 0x18(%rbx)
jmp 0x2b24
movq %r15, %rdi
leaq 0xf(%rsp), %rsi
callq 0x21b0
movq %r15, %rdi
movq %r12, %rsi
callq 0x20f0
jmp 0x2aad
leaq 0x20(%rsp), %rdi
callq 0x2110
movq %rbx, %rax
addq $0x1a8, %rsp            # imm = 0x1A8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2b5c
movq %rax, %r14
jmp 0x2b69
jmp 0x2b5c
movq %rax, %r14
leaq 0x20(%rsp), %rdi
callq 0x2110
movq %rbx, %rdi
callq 0x2c00
movq %r14, %rdi
callq 0x2260
nop
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/nrt2xml.cpp
// Function: help()
void help()
{
    cerr << "Copyright (C) 2005-2018 Javier Gutierrez <https://github.com/tap3edit>\n";
    cerr << "Usage: nrt2xml -x|-a inputfile [outputfile]\n";
    cerr << "  -x: ASN -> XML\n";
    cerr << "  -a: XML -> ASN\n";
    exit(1);
}

// Assembly:
pushq %rbx
movq 0x14676(%rip), %rbx     # 0x19ff0
leaq 0xb82c(%rip), %rsi      # 0x111ad
movq %rbx, %rdi
callq 0x4290
leaq 0xb865(%rip), %rsi      # 0x111f5
movq %rbx, %rdi
callq 0x4290
leaq 0xb883(%rip), %rsi      # 0x11222
movq %rbx, %rdi
callq 0x4290
leaq 0xb886(%rip), %rsi      # 0x11234
movq %rbx, %rdi
callq 0x4290
pushq $0x1
popq %rdi
callq 0x4340
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/nrt2xml.cpp
// Function: get_specfilename[abi:cxx11](NrtInfo*)
string get_specfilename(NrtInfo *nrtinfo)
{
    ostringstream    spec_filename;

    spec_filename << nrtinfo->type();
    spec_filename << setw(2) << setfill('0') << nrtinfo->version();
    spec_filename << setw(2) << setfill('0') << nrtinfo->release();
    spec_filename << ".asn";

    return get_specdir(spec_filename.str());
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x1a0, %rsp            # imm = 0x1A0
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4400
leaq 0x8(%rsp), %rdi
movq %r14, %rsi
callq 0x697e
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x4250
leaq 0x8(%rsp), %rdi
callq 0x4150
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x38(%rsp,%rax)
pushq $0x30
popq %rsi
callq 0x44b0
movq %rax, %r15
movq %r14, %rdi
callq 0x6976
movq %r15, %rdi
movl %eax, %esi
callq 0x4540
leaq 0x28(%rsp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
movq $0x2, 0x38(%rsp,%rax)
pushq $0x30
popq %rsi
callq 0x44b0
movq %rax, %r15
movq %r14, %rdi
callq 0x697a
movq %r15, %rdi
movl %eax, %esi
callq 0x4540
leaq 0xb60e(%rip), %rsi      # 0x11079
leaq 0x28(%rsp), %rdi
callq 0x4290
leaq 0x30(%rsp), %rsi
leaq 0x8(%rsp), %rdi
callq 0x44c0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x5adf
leaq 0x8(%rsp), %rdi
callq 0x4150
leaq 0x28(%rsp), %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x1a0, %rsp            # imm = 0x1A0
popq %rbx
popq %r14
popq %r15
retq
jmp 0x5ab9
jmp 0x5aca
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4150
jmp 0x5acd
jmp 0x5aca
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/nrt2xml.cpp
// Function: get_specdir(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string get_specdir(const string &filename)
{

    vector<string>::iterator    vii;
    FILE *tmp;

    for (vii=specdir_list.begin();vii!=specdir_list.end();vii++)
    {
        if ((tmp=fopen(((*vii)+"/"+filename).c_str(),"rb")) != NULL)
        {
            fclose(tmp);
            return ((*vii)+"/"+filename);
        }
    }

    return string (filename);

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x48, %rsp
movq %rsi, %r14
movq %rdi, (%rsp)
movq 0x14885(%rip), %r15     # 0x1a380
leaq 0x28(%rsp), %r13
leaq 0x8(%rsp), %rbp
leaq 0xb73a(%rip), %rbx      # 0x11246
cmpq 0x14875(%rip), %r15     # 0x1a388
je 0x5b60
movq %r13, %rdi
movq %r15, %rsi
leaq 0xd697(%rip), %rdx      # 0x131b9
callq 0x5d04
movq %rbp, %rdi
movq %r13, %rsi
movq %r14, %rdx
callq 0x5d8f
movq 0x8(%rsp), %rdi
movq %rbx, %rsi
callq 0x4320
movq %rax, %r12
movq %rbp, %rdi
callq 0x4150
movq %r13, %rdi
callq 0x4150
testq %r12, %r12
jne 0x5b71
addq $0x20, %r15
jmp 0x5b0c
movq (%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x4420
jmp 0x5bac
movq %r12, %rdi
callq 0x42a0
leaq 0xd639(%rip), %rdx      # 0x131b9
leaq 0x8(%rsp), %rbx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x5d04
movq (%rsp), %r15
movq %r15, %rdi
movq %rbx, %rsi
movq %r14, %rdx
callq 0x5d8f
leaq 0x8(%rsp), %rdi
callq 0x4150
movq %r15, %rax
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
jmp 0x5bd0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x4150
movq %rbx, %rdi
callq 0x4560
nop
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/NrtInfo.cpp
// Function: NrtInfo::_findtreeversion(treenode*, int)
void NrtInfo::_findtreeversion(treenode *tree, int depth)
{
    vector<treenode *>::iterator    vii;
    int                 i;

    if (depth>2)
        return;

    pair<string, string> types[] =
    {
        pair<string,string>("Nrtrde",          "NRT")       /* Nrt file */
    };

    pair<string, int *> version[] =
    {
        pair<string,int *>("specificationVersionNumber",    &_version),
        pair<string,int *>("releaseVersionNumber",          &_release)
    };

    for (i=0;i<1;i++)
    {
        if (tree->tagname==types[i].first)
        {
            _type=types[i].second;
        }
    }

    if (tree->children!=NULL)
    {
        for (vii=tree->children->begin();vii!=tree->children->end();vii++)
        {
            for (i=0;i<2;i++)
            {
                if ((*vii)->tagname==version[i].first)
                    if ( (*vii)->value!=NULL )
                        *(version[i].second)=atoi((*(*vii)->value).c_str());
            }
        }
    }

    if (_version<0)
    {
        if (tree->children!=NULL)
        {
            _findtreeversion((*tree->children)[0],depth+1);
        }
    }


    return;

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xa8, %rsp
cmpl $0x2, %edx
jg 0x68ec
movl %edx, %ebx
movq %rsi, %r15
movq %rdi, %r14
leaq 0xa9bd(%rip), %rsi      # 0x111a6
leaq 0xaaa0(%rip), %rdx      # 0x11290
leaq 0x60(%rsp), %rdi
callq 0x6a7e
leaq 0x8(%r14), %r12
leaq 0x8(%rsp), %rdx
movq %r12, (%rdx)
leaq 0xaa95(%rip), %rsi      # 0x112a2
leaq 0x10(%rsp), %rdi
callq 0x6abe
leaq 0x38(%rsp), %rdi
leaq 0xc(%r14), %rax
movq %rsp, %rdx
movq %rax, (%rdx)
leaq 0xaa90(%rip), %rsi      # 0x112bd
callq 0x6ae2
leaq 0x60(%rsp), %rsi
movq %r15, %rdi
callq 0x6a30
testb %al, %al
je 0x6854
leaq 0x80(%rsp), %rsi
leaq 0x10(%r14), %rdi
callq 0x4180
movq 0x50(%r15), %rax
testq %rax, %rax
je 0x68c8
movq (%rax), %r13
cmpq 0x8(%rax), %r13
je 0x68af
xorl %ebp, %ebp
cmpq $0x50, %rbp
je 0x68a5
movq (%r13), %rdi
leaq (%rsp,%rbp), %rsi
addq $0x10, %rsi
callq 0x6a30
testb %al, %al
je 0x689f
movq (%r13), %rax
movq 0x48(%rax), %rax
testq %rax, %rax
je 0x689f
movq (%rax), %rdi
callq 0x44a0
movq 0x30(%rsp,%rbp), %rcx
movl %eax, (%rcx)
addq $0x28, %rbp
jmp 0x6868
addq $0x8, %r13
movq 0x50(%r15), %rax
jmp 0x6860
cmpl $0x0, (%r12)
jns 0x68c8
movq (%rax), %rax
movq (%rax), %rsi
incl %ebx
movq %r14, %rdi
movl %ebx, %edx
callq 0x67c0
pushq $0x28
popq %rbx
leaq (%rsp,%rbx), %rdi
addq $0x10, %rdi
callq 0x4150
addq $-0x28, %rbx
cmpq $-0x28, %rbx
jne 0x68cb
leaq 0x60(%rsp), %rdi
callq 0x6a1a
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
pushq $0x28
popq %r14
leaq (%rsp,%r14), %rdi
addq $0x10, %rdi
callq 0x4150
addq $-0x28, %r14
cmpq $-0x28, %r14
jne 0x6905
jmp 0x6930
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4150
jmp 0x6930
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0x6a1a
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/asn1_parser.cpp
// Function: yy_stack_print(short*, short*)
static void
yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop)
{
  YYFPRINTF (stderr, "Stack now");
  for (; yybottom <= yytop; yybottom++)
    {
      int yybot = *yybottom;
      YYFPRINTF (stderr, " %d", yybot);
    }
  YYFPRINTF (stderr, "\n");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq 0x11749(%rip), %r12     # 0x19fd0
movq (%r12), %rcx
leaq 0x9a6d(%rip), %rdi      # 0x122ff
pushq $0x9
popq %rsi
pushq $0x1
popq %rdx
callq 0x45c0
leaq 0x9a65(%rip), %r15      # 0x12309
cmpq %rbx, %r14
ja 0x88c1
movswl (%r14), %edx
movq (%r12), %rdi
movq %r15, %rsi
xorl %eax, %eax
callq 0x4450
addq $0x2, %r14
jmp 0x88a4
movq (%r12), %rsi
pushq $0xa
popq %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
jmp 0x4370
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/asn1_parser.cpp
// Function: yytnamerr(char*, char const*)
static YYSIZE_T
yytnamerr (char *yyres, const char *yystr)
{
  if (*yystr == '"')
    {
      YYSIZE_T yyn = 0;
      char const *yyp = yystr;

      for (;;)
        switch (*++yyp)
          {
          case '\'':
          case ',':
            goto do_not_strip_quotes;

          case '\\':
            if (*++yyp != '\\')
              goto do_not_strip_quotes;
            /* Fall through.  */
          default:
            if (yyres)
              yyres[yyn] = *yyp;
            yyn++;
            break;

          case '"':
            if (yyres)
              yyres[yyn] = '\0';
            return yyn;
          }
    do_not_strip_quotes: ;
    }

  if (! yyres)
    return yystrlen (yystr);

  return yystpcpy (yyres, yystr) - yyres;
}

// Assembly:
cmpb $0x22, (%rsi)
jne 0x8bc0
xorl %eax, %eax
movq %rsi, %rcx
movzbl 0x1(%rcx), %edx
cmpl $0x5c, %edx
je 0x8ba9
cmpl $0x22, %edx
je 0x8bdd
cmpl $0x27, %edx
je 0x8bc0
cmpl $0x2c, %edx
je 0x8bc0
incq %rcx
jmp 0x8bb3
cmpb $0x5c, 0x2(%rcx)
jne 0x8bc0
addq $0x2, %rcx
testq %rdi, %rdi
je 0x8bbb
movb %dl, (%rdi,%rax)
incq %rax
jmp 0x8b8c
testq %rdi, %rdi
je 0x8bd8
pushq $-0x1
popq %rax
movb 0x1(%rsi,%rax), %cl
movb %cl, 0x1(%rdi,%rax)
incq %rax
testb %cl, %cl
jne 0x8bc8
retq
movq %rsi, %rdi
jmp 0x8be7
testq %rdi, %rdi
je 0x8bd7
movb $0x0, (%rdi,%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: bcd2dec(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string bcd2dec(const string &str)
{
    ostringstream value_str;
    unsigned long long value=0;
    /* int sign; */

    string::const_iterator cii;

    /* sign=str.at(0)>>7 ? -1 : 1; */

    for (cii=str.begin();cii!=str.end();cii++)
    {
        value<<=8;
        value+=(int)(uchar)*cii;
        
    }

    /* We'll skip there's no sign on TAP/NRT
    if (sign == -1)
        value-=(int)(0x01<<(8*str.size()));

    */

    value_str << value;

    return value_str.str();
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x4400
movq (%r14), %rax
movq 0x8(%r14), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rdx, %rcx
je 0xac00
shlq $0x8, %rsi
movzbl (%rax,%rdx), %edi
orq %rdi, %rsi
incq %rdx
jmp 0xabeb
movq %rsp, %rdi
callq 0x41c0
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: dec2bcd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string dec2bcd(const string &str)
{
    ostringstream bcd, rbcd;
    unsigned long long intstr, msb;
    string bcd_str;


    /* Note: For the moment we will not support numbers bigger than 2**31 */

    intstr=atoll(str.c_str());

    do
    {

        bcd << (uchar)(intstr&0xFF);
        msb=intstr&0x80;
        intstr>>=8;
        
    } while (intstr>0);

    if (msb && ( atoll(str.c_str()) > 0))
        bcd << (uchar)0x00;

    if (!msb && ( atoll(str.c_str()) < 0))
        bcd << (uchar)0xFF;

    bcd_str=bcd.str();
    
    string::reverse_iterator rii=bcd_str.rbegin();
    while (rii!=bcd_str.rend())
    {
        rbcd << *rii++;
    }

    return rbcd.str();
    
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x338, %rsp            # imm = 0x338
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x48(%rsp), %rdi
callq 0x4400
leaq 0x1c0(%rsp), %rdi
callq 0x4400
leaq 0x18(%rsp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
movq (%r14), %rdi
callq 0x4220
leaq 0x48(%rsp), %r15
movq %rax, %r12
movsbl %r12b, %esi
movq %r15, %rdi
callq 0x4310
movq %r12, %rax
shrq $0x8, %rax
cmpq $0xff, %r12
ja 0xac87
movq (%r14), %rdi
callq 0x4220
cmpq $0x80, %r12
jae 0xacc0
testq %rax, %rax
jns 0xacd4
movb $-0x1, %al
jmp 0xacc7
testq %rax, %rax
jle 0xacd4
xorl %eax, %eax
movsbl %al, %esi
leaq 0x48(%rsp), %rdi
callq 0x4310
leaq 0x50(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0x44c0
leaq 0x8(%rsp), %r14
leaq 0x28(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x4360
movq %r15, %rdi
callq 0x4150
movq (%r14), %r15
addq 0x8(%r14), %r15
leaq 0x1c0(%rsp), %r14
cmpq 0x8(%rsp), %r15
je 0xad28
movsbl -0x1(%r15), %esi
decq %r15
movq %r14, %rdi
callq 0x4310
jmp 0xad0f
leaq 0x1c8(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
leaq 0x8(%rsp), %rdi
callq 0x4150
leaq 0x1c0(%rsp), %rdi
callq 0x40a0
leaq 0x48(%rsp), %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x338, %rsp            # imm = 0x338
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0xad78
jmp 0xad78
jmp 0xad78
movq %rax, %rbx
jmp 0xad92
jmp 0xad78
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x4150
leaq 0x1c0(%rsp), %rdi
callq 0x40a0
leaq 0x48(%rsp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: bcd2hexa(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string bcd2hexa(const string &str)
{

    ostringstream value;


    string::const_iterator cii;
    for (cii=str.begin();cii!=str.end();cii++)
    {
        value << hex << setw(2) << setfill('0') << (int)(uchar)*cii;
    }


    return value.str();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x4400
movq (%r14), %rax
pushq $0x30
popq %rbp
movq %rax, %r12
addq 0x8(%r14), %rax
cmpq %rax, %r12
je 0xae1b
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rcx
movl 0x20(%rsp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x20(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x18(%rsp,%rax)
movq %r15, %rdi
movl %ebp, %esi
callq 0x44b0
movzbl (%r12), %esi
movq %rax, %rdi
callq 0x4540
incq %r12
movq (%r14), %rax
jmp 0xadcf
leaq 0x10(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
leaq 0x8(%rsp), %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x180, %rsp            # imm = 0x180
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0xae47
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: hexa2bcd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string hexa2bcd(const string &str)
{
    ostringstream bcd;
    int i;

    for (i=0; i<(int)str.size();i+=2)
        bcd << (uchar)strtol((str.substr(i,2).size()==1 ? str.substr(i,2)+"F" : str.substr(i,2)).c_str(),NULL, 16);

    return bcd.str();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x60(%rsp), %rdi
callq 0x4400
xorl %r12d, %r12d
leaq 0x40(%rsp), %r13
movslq 0x8(%r14), %rax
cmpq %rax, %r12
jge 0xaf33
movq %r13, %rbp
movq %r13, %rdi
movq %r14, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0x42d0
movq 0x48(%rsp), %r13
cmpq $0x1, %r13
jne 0xaedb
leaq 0x20(%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0x42d0
movq %rsp, %rdi
movq %r15, %rsi
leaq 0x7319(%rip), %rdx      # 0x121ed
callq 0x5ce5
jmp 0xaeec
movq %rsp, %rdi
movq %r14, %rsi
movq %r12, %rdx
pushq $0x2
popq %rcx
callq 0x42d0
movq (%rsp), %rdi
xorl %esi, %esi
pushq $0x10
popq %rdx
callq 0x4430
movsbl %al, %esi
leaq 0x60(%rsp), %rdi
callq 0x4310
movq %rsp, %rdi
callq 0x4150
cmpq $0x1, %r13
jne 0xaf1f
leaq 0x20(%rsp), %rdi
callq 0x4150
movq %rbp, %r13
movq %rbp, %rdi
callq 0x4150
addq $0x2, %r12
jmp 0xae85
leaq 0x68(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
leaq 0x60(%rsp), %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x1d8, %rsp            # imm = 0x1D8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xaf92
movq %rax, %r14
jmp 0xaf86
movq %rax, %r14
movq %rsp, %rdi
callq 0x4150
jmp 0xaf76
movq %rax, %r14
cmpq $0x1, %r13
jne 0xaf86
leaq 0x20(%rsp), %rdi
callq 0x4150
leaq 0x40(%rsp), %rdi
callq 0x4150
jmp 0xaf95
movq %rax, %r14
leaq 0x60(%rsp), %rdi
callq 0x40a0
movq %r14, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: bcd2hexa_no_f(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string bcd2hexa_no_f(const string &str)
{

    ostringstream value;


    string::const_iterator cii;
    for (cii=str.begin();cii!=str.end();cii++)
    {
        if (cii+1 == str.end() && (int)(uchar)(*cii & 0x0F) == 15) /* 15 = ascii of 'f' */
        {
            value << hex << setw(1) << (int)(uchar)((*cii >> 4) & 0x0F); /* Remove the last byte */
        } 
        else
        {
            value << hex << setw(2) << setfill('0') << (int)(uchar)*cii;
        }
    }


    return value.str();

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %r15
movq %r15, %rdi
callq 0x4400
movq (%r14), %rax
pushq $0x30
popq %rbp
movq %rax, %r13
addq 0x8(%r14), %rax
cmpq %rax, %r13
je 0xb068
leaq 0x1(%r13), %r12
cmpq %rax, %r12
jne 0xb021
movb (%r13), %al
notb %al
testb $0xf, %al
jne 0xb021
movq (%rsp), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rsp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x1, 0x10(%rsp,%rax)
movb (%r13), %cl
shrb $0x4, %cl
movq %r15, %rax
jmp 0xb052
movq (%rsp), %rax
movq -0x18(%rax), %rcx
movl 0x18(%rsp,%rcx), %edx
andl $-0x4b, %edx
orl $0x8, %edx
movl %edx, 0x18(%rsp,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x10(%rsp,%rax)
movq %r15, %rdi
movl %ebp, %esi
callq 0x44b0
movb (%r13), %cl
movzbl %cl, %esi
movq %rax, %rdi
callq 0x4540
movq (%r14), %rax
movq %r12, %r13
jmp 0xafd2
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb094
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
nop
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: treenode::_tree_dump(treenode*, int)
void treenode::_tree_dump(treenode *tree, int depth)
{
    vector<treenode *>::iterator    vii;
    (void)depth;

    if (tree!=NULL)
    {
        cout << "tagname:   " << tree->tagname << endl;
        cout << "cl:        " << tree->cl << endl;
        if (tree->value!=NULL)
        {
            cout << "value:     " <<  tree->value << endl;
        }
        cout << endl;

        if (tree->children!=NULL)
        {
            for (vii=tree->children->begin();vii!=tree->children->end();vii++)
            {
                _tree_dump(*vii, 0);
            }

        }

    }

}

// Assembly:
testq %rsi, %rsi
je 0xb179
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
movq 0xeefd(%rip), %r15      # 0x19fc8
leaq 0x7909(%rip), %rsi      # 0x129db
movq %r15, %rdi
callq 0x4290
movq %rax, %rdi
movq %rbx, %rsi
callq 0x4250
movq %rax, %rdi
callq 0x4160
leaq 0x78f3(%rip), %rsi      # 0x129e7
movq %r15, %rdi
callq 0x4290
movzwl 0x20(%rbx), %esi
andl $0x3, %esi
movq %rax, %rdi
callq 0x4520
movq %rax, %rdi
callq 0x4160
cmpq $0x0, 0x48(%rbx)
je 0xb141
movq 0xeea7(%rip), %rdi      # 0x19fc8
leaq 0x78cb(%rip), %rsi      # 0x129f3
callq 0x4290
movq 0x48(%rbx), %rsi
movq %rax, %rdi
callq 0x4200
movq %rax, %rdi
callq 0x4160
movq 0xee80(%rip), %rdi      # 0x19fc8
callq 0x4160
movq 0x50(%rbx), %rax
testq %rax, %rax
je 0xb174
movq (%rax), %r15
cmpq 0x8(%rax), %r15
je 0xb174
movq (%r15), %rsi
movq %r14, %rdi
callq 0xb0b0
addq $0x8, %r15
movq 0x50(%rbx), %rax
jmp 0xb159
popq %rbx
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: bcd2int(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string bcd2int(const string &str)
{
    ostringstream value_str;

    int value=0;
    string::const_iterator cii;

    for (cii=str.begin();cii!=str.end();cii++)
    {
        value+=(int)(uchar)*cii;
    }

    value_str << value;

    return value_str.str();

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %r14
movq %rdi, %rbx
movq %rsp, %rdi
callq 0x4400
movq (%r14), %rax
movq 0x8(%r14), %rcx
xorl %edx, %edx
xorl %esi, %esi
cmpq %rdx, %rcx
je 0xb1fe
movzbl (%rax,%rdx), %edi
addl %edi, %esi
incq %rdx
jmp 0xb1ee
movq %rsp, %rdi
callq 0x4540
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r14
retq
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: int2bcd(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
string int2bcd(const string &str)
{

    ostringstream bcd;
    int intstr;


    intstr=atoi(str.c_str());


    while (intstr>0)
    {
        intstr>255 
            ? bcd << (uchar)255
            : bcd << (uchar)(intstr&0xFF);
        intstr-=255;
    }

    return bcd.str();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x178, %rsp            # imm = 0x178
movq %rsi, %r15
movq %rdi, %rbx
movq %rsp, %r14
movq %r14, %rdi
callq 0x4400
movq (%r15), %rdi
callq 0x44a0
movl %eax, %ebp
movl $0xff, %r15d
testl %ebp, %ebp
jle 0xb28c
cmpl %r15d, %ebp
movl $0xff, %eax
cmovbl %ebp, %eax
movsbl %al, %esi
movq %r14, %rdi
callq 0x4310
addl $0xffffff01, %ebp       # imm = 0xFFFFFF01
jmp 0xb26a
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x44c0
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rax
addq $0x178, %rsp            # imm = 0x178
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xb2b4
movq %rax, %rbx
movq %rsp, %rdi
callq 0x40a0
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: remove_xml_rules(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
string remove_xml_rules(string str)
{
    int pos, i;


    string repl_items[][2]={
         { "&lt;",      "<" }
        ,{ "&gt;",      ">" }
        ,{ "&amp;",     "&" }
        ,{ "&apos;",    "'" }
        ,{ "&quot;",    "\"" }
    };

    for (i=0;i<5;i++)
    {
        while ((pos=str.find(repl_items[i][0])) != (int)string::npos)
        {
            str.replace(str.find(repl_items[i][0]),repl_items[i][0].size(),repl_items[i][1]);
        }
    }

    return str;

}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x150, %rsp            # imm = 0x150
movq %rsi, %r12
movq %rdi, %r14
leaq 0x74ca(%rip), %rsi      # 0x12a85
leaq 0x10(%rsp), %rbx
leaq 0xf(%rsp), %rdx
movq %rbx, %rdi
callq 0x5caa
leaq 0x30(%rsp), %rdi
leaq 0x7438(%rip), %rsi      # 0x12a11
leaq 0xe(%rsp), %rdx
callq 0x5caa
leaq 0x50(%rsp), %r15
leaq 0x749b(%rip), %rsi      # 0x12a8a
leaq 0xd(%rsp), %rdx
movq %r15, %rdi
callq 0x5caa
leaq 0x70(%rsp), %rdi
leaq 0x7906(%rip), %rsi      # 0x12f0e
leaq 0xc(%rsp), %rdx
callq 0x5caa
leaq 0x90(%rsp), %r15
leaq 0x746e(%rip), %rsi      # 0x12a8f
leaq 0xb(%rsp), %rdx
movq %r15, %rdi
callq 0x5caa
leaq 0xb0(%rsp), %rdi
leaq 0x7424(%rip), %rsi      # 0x12a61
leaq 0xa(%rsp), %rdx
callq 0x5caa
leaq 0xd0(%rsp), %r15
leaq 0x743f(%rip), %rsi      # 0x12a95
leaq 0x9(%rsp), %rdx
movq %r15, %rdi
callq 0x5caa
leaq 0xf0(%rsp), %rdi
leaq 0x73c5(%rip), %rsi      # 0x12a37
leaq 0x8(%rsp), %rdx
callq 0x5caa
leaq 0x110(%rsp), %r15
leaq 0x7411(%rip), %rsi      # 0x12a9c
leaq 0x7(%rsp), %rdx
movq %r15, %rdi
callq 0x5caa
leaq 0x130(%rsp), %rdi
leaq 0x776e(%rip), %rsi      # 0x12e15
leaq 0x6(%rsp), %rdx
callq 0x5caa
xorl %r13d, %r13d
cmpq $0x5, %r13
je 0xb709
movq %r13, %rax
shlq $0x6, %rax
leaq (%rsp,%rax), %rbx
addq $0x10, %rbx
leaq (%rsp,%rax), %r15
addq $0x30, %r15
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x45f0
cmpl $-0x1, %eax
je 0xb704
movq %r12, %rdi
movq %rbx, %rsi
xorl %edx, %edx
callq 0x45f0
movq 0x8(%rbx), %rdx
movq %r12, %rdi
movq %rax, %rsi
movq %r15, %rcx
callq 0x4100
jmp 0xb6d1
incq %r13
jmp 0xb6b4
movq %r14, %rdi
movq %r12, %rsi
callq 0x43b0
movl $0x120, %ebx            # imm = 0x120
leaq (%rsp,%rbx), %rdi
addq $0x10, %rdi
callq 0x4150
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0xb719
movq %r14, %rax
addq $0x150, %rsp            # imm = 0x150
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0xb750
jmp 0xb75d
jmp 0xb750
jmp 0xb75d
jmp 0xb750
jmp 0xb75d
movq %rax, %r14
movq %r15, %rdi
callq 0x4150
jmp 0xb760
movq %rax, %r14
addq $-0x20, %r15
movq %r15, %rdi
callq 0x4150
cmpq %rbx, %r15
jne 0xb760
jmp 0xb7a1
movq %rax, %r14
leaq 0x10(%rsp), %rdi
callq 0x4150
jmp 0xb7a1
movq %rax, %r14
movl $0x120, %ebx            # imm = 0x120
leaq (%rsp,%rbx), %rdi
addq $0x10, %rdi
callq 0x4150
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0xb78a
movq %r14, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/global.cpp
// Function: free_treenode(treenode*)
void free_treenode(treenode *tree)
{
    vector<treenode *>::iterator    vii;

    if (tree!=NULL)
    {
        if (tree->value!=NULL)
        {
            delete tree->value;
        }

        if (tree->children!=NULL)
        {
            for (vii=tree->children->begin();vii!=tree->children->end();vii++)
            {
                free_treenode(*vii);
            }

            delete tree->children;
        }

        delete tree;
    }
}

// Assembly:
testq %rdi, %rdi
je 0xb821
pushq %r15
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x48(%rdi), %r14
testq %r14, %r14
je 0xb7d2
movq %r14, %rdi
callq 0x4150
pushq $0x20
popq %rsi
movq %r14, %rdi
callq 0x42c0
movq 0x50(%rbx), %r14
testq %r14, %r14
je 0xb809
movq (%r14), %r15
cmpq 0x8(%r14), %r15
je 0xb7f6
movq (%r15), %rdi
callq 0xb7a9
addq $0x8, %r15
movq 0x50(%rbx), %r14
jmp 0xb7de
movq %r14, %rdi
callq 0xb8d0
pushq $0x18
popq %rsi
movq %r14, %rdi
callq 0x42c0
movq %rbx, %rdi
callq 0x4150
pushq $0x58
popq %rsi
movq %rbx, %rdi
popq %rbx
popq %r14
popq %r15
jmp 0x42c0
retq
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/Buffin.cpp
// Function: Buffin::set_pos(long const&)
void  Buffin::set_pos(const long &pos)
{
    if (pos > this->get_end())
    {
        cerr << "Trying to read beyond the end of file. Pos: " << pos << " End: " << this->get_end() << endl;
        err_trace(__FILE__, __LINE__);
    }

    _pos=pos;
    if (!_mode)
    {
        _file_in.seekg(pos);
    }
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
cmpq 0x228(%rdi), %rax
jle 0xbc98
movq 0xe3ce(%rip), %rdi      # 0x19ff0
leaq 0x6eb5(%rip), %rsi      # 0x12ade
callq 0x4290
movq (%r14), %rsi
movq %rax, %rdi
callq 0x4280
leaq 0x6ecb(%rip), %rsi      # 0x12b0b
movq %rax, %rdi
callq 0x4290
movq 0x228(%rbx), %rsi
movq %rax, %rdi
callq 0x4280
movq %rax, %rdi
callq 0x4160
leaq 0x6e53(%rip), %rsi      # 0x12ab9
leaq 0x10(%rsp), %r15
leaq 0xb(%rsp), %rdx
movq %r15, %rdi
callq 0x5caa
leaq 0xc(%rsp), %rsi
movl $0x92, (%rsi)
movq %r15, %rdi
callq 0xb17a
leaq 0x10(%rsp), %rdi
callq 0x4150
movq (%r14), %rax
movq %rax, 0x220(%rbx)
cmpl $0x0, 0x230(%rbx)
jne 0xbcb9
addq $0x18, %rbx
movq (%r14), %rsi
movq %rbx, %rdi
xorl %edx, %edx
callq 0x4390
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4150
movq %rbx, %rdi
callq 0x4560
// File: /workspace/github_cpp_makefile_star2_O2/tap3edit[P]tap3xml/Buffin.cpp
// Function: Buffin::read(long)
void  Buffin::read(const long len)
{

    /* 1. Allocation of memory */

    if (_curbuf != NULL)
        delete [] _curbuf;
    
    _curbuf=new uchar[len];


    /* 2. Reading into current buffer */

    if(_mode)
    {
        ;
    } 
    else 
    {
        if (this->get_pos() + len <= this->get_end())
            memcpy(_curbuf, _buffin+this->get_pos(), len);
        else
        {
            cerr << "Trying to read " << len << " bytes beyond end of file from position "<<this->get_pos();
            cerr << ". File might be corrupted." << endl;
            err_trace( __FILE__, __LINE__) ;
        }

    }

    _curbuf_len=len;


    /* 3. Update position */

    this->set_pos(this->get_pos()+len);
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rsi, %r14
movq %rdi, %rbx
movq 0x8(%rdi), %rdi
testq %rdi, %rdi
je 0xbcfd
callq 0x43a0
movq %r14, %rdi
callq 0x4030
movq %rax, 0x8(%rbx)
cmpl $0x0, 0x230(%rbx)
jne 0xbdca
movq 0x220(%rbx), %rsi
leaq (%rsi,%r14), %rcx
cmpq 0x228(%rbx), %rcx
jle 0xbdbc
movq 0xe2bb(%rip), %r15      # 0x19ff0
leaq 0x6dd6(%rip), %rsi      # 0x12b12
movq %r15, %rdi
callq 0x4290
movq %rax, %rdi
movq %r14, %rsi
callq 0x4280
leaq 0x6dcc(%rip), %rsi      # 0x12b22
movq %rax, %rdi
callq 0x4290
movq 0x220(%rbx), %rsi
movq %rax, %rdi
callq 0x4280
leaq 0x6dd7(%rip), %rsi      # 0x12b4b
movq %r15, %rdi
callq 0x4290
movq %rax, %rdi
callq 0x4160
leaq 0x6d2e(%rip), %rsi      # 0x12ab9
leaq 0x10(%rsp), %r15
leaq 0xb(%rsp), %rdx
movq %r15, %rdi
callq 0x5caa
leaq 0xc(%rsp), %rsi
movl $0xba, (%rsi)
movq %r15, %rdi
callq 0xb17a
leaq 0x10(%rsp), %rdi
callq 0x4150
jmp 0xbdca
addq (%rbx), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x4230
movq %r14, 0x10(%rbx)
addq 0x220(%rbx), %r14
leaq 0x10(%rsp), %rsi
movq %r14, (%rsi)
movq %rbx, %rdi
callq 0xbc00
addq $0x30, %rsp
popq %rbx
popq %r14
popq %r15
retq
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4150
movq %rbx, %rdi
callq 0x4560