LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/rbtree.h
// Function: ezSTL::rbtree<int, ezSTL::less<int>, ezSTL::allocator<ezSTL::__rbtree_node<int>>>::insert_fixup(ezSTL::__rbtree_node<int>*)
void rbtree<T, Compare, Alloc>::insert_fixup(link_type now) {
		while (now != root() && now->parent->color == __rbtree_red) {
			if (now->parent == now->parent->parent->left) {
				link_type uncle = now->parent->parent->right;
				// if  parent and uncle are both red, case 1
				if (uncle && uncle->color == __rbtree_red) {
					now->parent->color = __rbtree_black;
					uncle->color = __rbtree_black;
					now->parent->parent->color = __rbtree_red;
					now = now->parent->parent;
				}
				// if no uncle or uncle is black
				else {
					// if now is a right child, case 2
					if (now == now->parent->right) {
						now = now->parent;
						left_rotate(now);
					}
					// if now is a left child, case 3
					now->parent->color = __rbtree_black;
					now->parent->parent->color = __rbtree_red;
					right_rotate(now->parent->parent);
				}
			}
			else {
				link_type uncle = now->parent->parent->left;
				// if  parent and uncle are both red
				if (uncle && uncle->color == __rbtree_red) {
					now->parent->color = __rbtree_black;
					uncle->color = __rbtree_black;
					now->parent->parent->color = __rbtree_red;
					now = now->parent->parent;
				}
				// if no uncle or uncle is black
				else {
					// if now is a left child
					if (now == now->parent->left) {
						now = now->parent;
						right_rotate(now);
					}
					now->parent->color = __rbtree_black;
					now->parent->parent->color = __rbtree_red;
					left_rotate(now->parent->parent);
				}
			}
		}
		// root is always black
		root()->color = __rbtree_black;
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movb $0x1, %bpl
movq 0x8(%rbx), %rax
movq 0x8(%rax), %rax
cmpq %rax, %r14
je 0x8be0
movq 0x8(%r14), %r15
cmpb $0x0, (%r15)
jne 0x8be0
movq 0x8(%r15), %rsi
movq 0x10(%rsi), %rax
cmpq %rax, %r15
je 0x8b67
testq %rax, %rax
je 0x8b5c
cmpb $0x0, (%rax)
je 0x8b80
cmpq 0x10(%r15), %r14
je 0x8b8e
movq %r15, %rax
jmp 0x8ba4
movq 0x18(%rsi), %rax
testq %rax, %rax
je 0x8b75
cmpb $0x0, (%rax)
je 0x8b80
cmpq 0x18(%r15), %r14
je 0x8bb7
movq %r15, %rax
jmp 0x8bcd
movb %bpl, (%r15)
movb %bpl, (%rax)
movb $0x0, (%rsi)
movq %rsi, %r14
jmp 0x8b26
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8c40
movq 0x8(%r15), %rax
movq 0x8(%rax), %rsi
movq %r15, %r14
movb $0x1, (%rax)
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x8bee
jmp 0x8b26
movq %rbx, %rdi
movq %r15, %rsi
callq 0x8bee
movq 0x8(%r15), %rax
movq 0x8(%rax), %rsi
movq %r15, %r14
movb $0x1, (%rax)
movb $0x0, (%rsi)
movq %rbx, %rdi
callq 0x8c40
jmp 0x8b26
movb $0x1, (%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/rbtree.h
// Function: ezSTL::rbtree<int, ezSTL::less<int>, ezSTL::allocator<ezSTL::__rbtree_node<int>>>::left_rotate(ezSTL::__rbtree_node<int>*)
void rbtree<T, Compare, Alloc>::left_rotate(link_type z) {
		link_type y = z->right;
		z->right = y->left;
		if (y->left)
			y->left->parent = z;
		y->parent = z->parent;
		// change root
		if (z == root())
			header.node->parent = y;
		else if (z == z->parent->left)
			z->parent->left = y;
		else if (z == z->parent->right)
			z->parent->right = y;
		y->left = z;
		z->parent = y;
	}

// Assembly:
movq 0x18(%rsi), %rax
movq 0x10(%rax), %rcx
movq %rcx, 0x18(%rsi)
testq %rcx, %rcx
je 0x8c03
movq %rsi, 0x8(%rcx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rdi), %rdx
cmpq %rsi, 0x8(%rdx)
je 0x8c27
cmpq %rsi, 0x10(%rcx)
je 0x8c2d
cmpq %rsi, 0x18(%rcx)
jne 0x8c37
addq $0x18, %rcx
jmp 0x8c31
addq $0x8, %rdx
jmp 0x8c34
addq $0x10, %rcx
movq %rcx, %rdx
movq %rax, (%rdx)
movq %rsi, 0x10(%rax)
movq %rax, 0x8(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/rbtree.h
// Function: ezSTL::rbtree<int, ezSTL::less<int>, ezSTL::allocator<ezSTL::__rbtree_node<int>>>::right_rotate(ezSTL::__rbtree_node<int>*)
void rbtree<T, Compare, Alloc>::right_rotate(link_type z) {
		link_type y = z->left;
		z->left = y->right;
		if (y->right)
			y->right->parent = z;
		y->parent = z->parent;
		// change root
		if (z == root())
			header.node->parent = y;
		else if (z == z->parent->left)
			z->parent->left = y;
		else if (z == z->parent->right)
			z->parent->right = y;
		y->right = z;
		z->parent = y;
	}

// Assembly:
movq 0x10(%rsi), %rax
movq 0x18(%rax), %rcx
movq %rcx, 0x10(%rsi)
testq %rcx, %rcx
je 0x8c55
movq %rsi, 0x8(%rcx)
movq 0x8(%rsi), %rcx
movq %rcx, 0x8(%rax)
movq 0x8(%rdi), %rdx
cmpq %rsi, 0x8(%rdx)
je 0x8c79
cmpq %rsi, 0x10(%rcx)
je 0x8c7f
cmpq %rsi, 0x18(%rcx)
jne 0x8c89
addq $0x18, %rcx
jmp 0x8c83
addq $0x8, %rdx
jmp 0x8c86
addq $0x10, %rcx
movq %rcx, %rdx
movq %rax, (%rdx)
movq %rsi, 0x18(%rax)
movq %rax, 0x8(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/rbtree.h
// Function: ezSTL::__rbtree_iterator<int>::operator--()
self& operator--() {
			// present node is header
			if (node->color == __rbtree_red && node->parent->parent == node)
				node = node->right;
			// if node has left child
			else if (node->left != nullptr) {
				node = node->left;
				while (node->right != nullptr)
					node = node->right;
			}
			else {
				link_type parent_node = node->parent;
				while (node == parent_node->left) {
					node = parent_node;
					parent_node = parent_node->parent;
				}
				node = parent_node;
			}
			return *this;
		}

// Assembly:
movq %rdi, %rax
movq (%rdi), %rcx
cmpb $0x0, (%rcx)
jne 0x8e5d
movq 0x8(%rcx), %rdx
cmpq %rcx, 0x8(%rdx)
je 0x8e86
movq 0x10(%rcx), %rdx
testq %rdx, %rdx
je 0x8e77
movq %rdx, %rcx
movq 0x18(%rdx), %rdx
testq %rdx, %rdx
jne 0x8e66
jmp 0x8e8a
movq %rcx, (%rax)
movq %rcx, %rdx
movq 0x8(%rcx), %rcx
cmpq 0x10(%rcx), %rdx
je 0x8e74
jmp 0x8e8a
movq 0x18(%rcx), %rcx
movq %rcx, (%rax)
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/vector.h
// Function: ezSTL::vector<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*, ezSTL::allocator<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*>>::allocate_and_fill(unsigned int, ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>* const&)
iterator allocate_and_fill(size_type n, const_reference value) {
			iterator result = allocate(n);
			for (size_type i = 0; i < n; ++i)
				construct(result++, value);
			return result - n;
		}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rdx, %r14
movl %esi, %r15d
leaq (,%r15,8), %rbx
movq %rbx, %rdi
callq 0x21e0
movq (%r14), %rcx
xorl %edx, %edx
cmpl %edx, %r15d
je 0x9536
movq %rcx, (%rax,%rdx,8)
addq $-0x8, %rbx
incq %rdx
jmp 0x9524
subq %rbx, %rax
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/unordered_map.h
// Function: ezSTL::unordered_map<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>>::begin() const
iterator begin() const {
				// find the first pair
				for (size_type i = 0; i < buckets.size(); ++i)
					if (buckets[i]) {
						iterator temp;
						temp.list_iterator = buckets[i]->begin();
						temp.list_pointer = buckets[i];
						temp.um_pointer = const_cast<unordered_map<Key, Value, Hash, KeyEqual>*>(this);
						temp.bucket = i;
						return temp;
					}
				return end();
			}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
movq (%rsi), %rax
movq 0x8(%rsi), %rcx
subq %rax, %rcx
shrq $0x3, %rcx
movl %ecx, %ecx
xorl %r12d, %r12d
cmpq %r12, %rcx
je 0x9582
movq (%rax,%r12,8), %rsi
testq %rsi, %rsi
jne 0x959b
incq %r12
jmp 0x956f
movups 0x20(%r14), %xmm0
movups %xmm0, (%rbx)
movq 0x30(%r14), %rax
movq %rax, 0x10(%rbx)
movl 0x38(%r14), %eax
movl %eax, 0x18(%rbx)
jmp 0x95c5
movq %rsp, %r15
movq %r15, %rdi
callq 0x9660
cmpq %rbx, %r15
je 0x95b2
movq (%rsp), %rax
movq %rax, (%rbx)
movq (%r14), %rax
movq (%rax,%r12,8), %rax
movq %rax, 0x8(%rbx)
movq %r14, 0x10(%rbx)
movl %r12d, 0x18(%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/unordered_map.h
// Function: ezSTL::__unordered_map_iterator<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>>::operator++()
self& operator++() {
				// if the next node in the same list
				if (list_iterator + 1 != list_pointer->end())
					++list_iterator;
				// if the next node not in the same list
				else {
					list_pointer = um_pointer->buckets[++bucket];
					// go to next bucket until the next bucket is not empty or overranging
					while (bucket < um_pointer->buckets.size() && list_pointer == nullptr)
						list_pointer = um_pointer->buckets[++bucket];
					// if it is not overanging
					if (bucket < um_pointer->buckets.size())
						list_iterator = list_pointer->begin();
				}
				return *this;
			}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq %rsp, %r14
pushq $0x1
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x9672
movq 0x8(%rbx), %rax
movq (%r14), %rcx
cmpq (%rax), %rcx
je 0x9604
movq (%rbx), %rax
movq 0x8(%rax), %rax
movq %rax, (%rbx)
jmp 0x9654
movq 0x10(%rbx), %rdx
movl 0x18(%rbx), %eax
leal 0x1(%rax), %ecx
movl %ecx, 0x18(%rbx)
movq (%rdx), %rdi
movq 0x8(%rdx), %rdx
subq %rdi, %rdx
shrq $0x3, %rdx
addl $0x2, %eax
movq (%rdi,%rcx,8), %rsi
movq %rsi, 0x8(%rbx)
cmpl %edx, %ecx
jae 0x963d
testq %rsi, %rsi
jne 0x963d
movl %eax, 0x18(%rbx)
incq %rcx
incl %eax
jmp 0x9622
cmpl %edx, %ecx
jae 0x9654
movq %r14, %rdi
callq 0x9660
cmpq %rbx, %r14
je 0x9654
movq (%rsp), %rax
jmp 0x95ff
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r14
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/unordered_map.h
// Function: ezSTL::__unordered_map_iterator<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>>::operator==(ezSTL::__unordered_map_iterator<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>> const&) const
bool operator== (const self& x) const {
				// if *this and x are both end()
				if (bucket >= um_pointer->buckets.size() && x.bucket >= x.um_pointer->buckets.size())
					return true;
				return list_iterator == x.list_iterator && bucket == x.bucket;
			}

// Assembly:
movq 0x10(%rdi), %rax
movq 0x8(%rax), %r8
subq (%rax), %r8
movl 0x18(%rdi), %ecx
shrq $0x3, %r8
movl 0x18(%rsi), %edx
cmpl %r8d, %ecx
jb 0x96de
movq 0x10(%rsi), %rax
movq 0x8(%rax), %r8
subq (%rax), %r8
shrq $0x3, %r8
movb $0x1, %al
cmpl %r8d, %edx
jae 0x96f0
movq (%rdi), %rax
cmpq (%rsi), %rax
sete %sil
cmpl %edx, %ecx
sete %al
andb %sil, %al
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/vector.h
// Function: ezSTL::vector<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*, ezSTL::allocator<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*>>::resize(unsigned int)
void vector<T, Alloc>::resize(size_type n) {
		size_type old_size = size();
		// if old size is bigger than n
		if (old_size >= n) {
			for (; old_size > n; --old_size) {
				pop_back();
			}
		}
		else {
			// allocate more space
			iterator new_start = allocate(n);
			for (size_type i = 0; i < n; ++i) {
				if(i < size()) construct(new_start + i, (*this)[i]);
				else construct(new_start + i, T());
			}
			clear();
			start = new_start;
			finish = start + n;
			end_of_storage = finish;
		}
	}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x8(%rdi), %rax
movq %rax, %rcx
subq (%rdi), %rcx
shrq $0x3, %rcx
cmpl %esi, %ecx
jae 0x97c6
movl %esi, %r14d
leaq (,%r14,8), %rdi
callq 0x21e0
movq (%rbx), %rcx
movq 0x8(%rbx), %rdx
subq %rcx, %rdx
shrq $0x3, %rdx
movl %edx, %edx
xorl %esi, %esi
cmpq %rsi, %r14
je 0x97d6
cmpq %rdx, %rsi
jae 0x97bb
movq (%rcx,%rsi,8), %rdi
jmp 0x97bd
xorl %edi, %edi
movq %rdi, (%rax,%rsi,8)
incq %rsi
jmp 0x97ab
addq $-0x8, %rax
cmpl %esi, %ecx
jbe 0x97e5
movq %rax, 0x8(%rbx)
decl %ecx
jmp 0x97c6
movq %rax, (%rbx)
leaq (%rax,%r14,8), %rax
movq %rax, 0x8(%rbx)
movq %rax, 0x10(%rbx)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/functional.h
// Function: ezSTL::_Hash_seq(unsigned char const*, unsigned int)
inline unsigned int _Hash_seq(const unsigned char* str, unsigned int count) {
		const unsigned int FNV_offset_basis = 2166136261U;
		const unsigned int FNV_prime = 16777619U;

		unsigned int result = FNV_offset_basis;
		for (unsigned int next = 0; next < count; ++next) {
			result ^= (unsigned int)str[next];
			result *= FNV_prime;
		}
		return result;
	}

// Assembly:
movl %esi, %ecx
movl $0x811c9dc5, %eax       # imm = 0x811C9DC5
xorl %edx, %edx
cmpq %rdx, %rcx
je 0x980c
movzbl (%rdi,%rdx), %esi
xorl %esi, %eax
imull $0x1000193, %eax, %eax  # imm = 0x1000193
incq %rdx
jmp 0x97f6
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/vector.h
// Function: ezSTL::vector<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*, ezSTL::allocator<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*>>::operator=(ezSTL::vector<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*, ezSTL::allocator<ezSTL::list<ezSTL::pair<int, int>, ezSTL::allocator<ezSTL::__list_node<ezSTL::pair<int, int>>>>*>>&&)
vector<T, Alloc>& vector<T, Alloc>::operator= (vector<T, Alloc>&& v) noexcept {
		if (this == &v) return *this;
		else {
			start = v.start;
			finish = v.finish;
			end_of_storage = v.end_of_storage;
			v.start = nullptr;
			v.finish = nullptr;
			v.end_of_storage = nullptr;
			return *this;
		}
	}

// Assembly:
movq %rdi, %rax
cmpq %rsi, %rdi
je 0x99e7
movups (%rsi), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rax)
xorps %xmm0, %xmm0
movups %xmm0, (%rsi)
andq $0x0, 0x10(%rsi)
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/unordered_map.h
// Function: ezSTL::__unordered_map_iterator<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>>::operator=(ezSTL::__unordered_map_iterator<int, int, ezSTL::hash<int>, ezSTL::equal_to<int>> const&)
self& operator= (const iterator& x) {
				if (this != &x) {
					list_iterator = x.list_iterator;
					list_pointer = x.list_pointer;
					um_pointer = x.um_pointer;
					bucket = x.bucket;
				}
				return *this;
			}

// Assembly:
movq %rdi, %rax
cmpq %rsi, %rdi
je 0x9a04
movups (%rsi), %xmm0
movups %xmm0, (%rax)
movq 0x10(%rsi), %rcx
movq %rcx, 0x10(%rax)
movl 0x18(%rsi), %ecx
movl %ecx, 0x18(%rax)
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/algorithm.h
// Function: void ezSTL::__merge_sort<ezSTL::pair<unsigned int, unsigned int>*, ezSTL::less<ezSTL::pair<unsigned int, unsigned int>>>(ezSTL::pair<unsigned int, unsigned int>*, ezSTL::pair<unsigned int, unsigned int>*, ezSTL::less<ezSTL::pair<unsigned int, unsigned int>>)
inline void __merge_sort(Iterator First, Iterator Last, Compare cmp) {
		unsigned int count = Last - First;
		if (count < 2)
			return;
		// if < insertion_threshold, use insertion sort
		else if (count <= insertion_threshold)
			__insertion_sort(First, Last, cmp);
		else {
			Iterator Medium = First + (Last - First) / 2;
			__merge_sort(First, Medium, cmp);
			__merge_sort(Medium, Last, cmp);
			__merge(First, Medium, Last, cmp);
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
movq %rsi, %rax
subq %rdi, %rax
sarq $0x3, %rax
cmpl $0x2, %eax
jae 0xab3b
popq %rbx
popq %r14
popq %r15
retq
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x14, %eax
ja 0xab56
movq %r14, %rdi
movq %rbx, %rsi
popq %rbx
popq %r14
popq %r15
jmp 0xab8b
pushq $0x2
popq %rcx
cqto
idivq %rcx
leaq (%r14,%rax,8), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0xab21
movq %r15, %rdi
movq %rbx, %rsi
callq 0xab21
movq %r14, %rdi
movq %r15, %rsi
movq %rbx, %rdx
popq %rbx
popq %r14
popq %r15
jmp 0xabeb
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/algorithm.h
// Function: void ezSTL::__insertion_sort<ezSTL::pair<unsigned int, unsigned int>*, ezSTL::less<ezSTL::pair<unsigned int, unsigned int>>>(ezSTL::pair<unsigned int, unsigned int>*, ezSTL::pair<unsigned int, unsigned int>*, ezSTL::less<ezSTL::pair<unsigned int, unsigned int>>)
inline void __insertion_sort(Iterator First, Iterator Last, Compare cmp) {
		auto next = First;
		auto value = *First;
		for (auto ite = First + 1; ite != Last; ++ite) {
			next = ite;
			value = *ite;
			if (cmp(value, *First)) {
				__copy_to_next(First, ite);
				*First = value;
			}
			else {
				// unguarded linear insertion
				while (cmp(value, *(next - 1))) {
					*next = *(next - 1);
					--next;
				}
				*next = value;
			}
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %rbx
movq %rdi, %r14
movq %rdi, %r15
addq $0x8, %r15
cmpq %rbx, %r15
je 0xabdf
movq (%r15), %r12
movq %r15, %rax
cmpl (%r14), %r12d
jae 0xabc9
movq %r14, %rdi
movq %r15, %rsi
callq 0xac95
movq %r14, %rax
movq %r12, %xmm0
movq %xmm0, (%rax)
jmp 0xab9c
movl -0x8(%rax), %ecx
cmpl %ecx, %r12d
jae 0xabbe
movl %ecx, (%rax)
movl -0x4(%rax), %ecx
movl %ecx, 0x4(%rax)
addq $-0x8, %rax
jmp 0xabc9
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/algorithm.h
// Function: void ezSTL::__merge<ezSTL::pair<unsigned int, unsigned int>*, ezSTL::less<ezSTL::pair<unsigned int, unsigned int>>>(ezSTL::pair<unsigned int, unsigned int>*, ezSTL::pair<unsigned int, unsigned int>*, ezSTL::pair<unsigned int, unsigned int>*, ezSTL::less<ezSTL::pair<unsigned int, unsigned int>>)
inline void __merge(Iterator First, Iterator Medium, Iterator Last, Compare cmp) {
		vector<typename remove_reference<decltype(*First)>::type> v(Medium - First);
		auto ite1 = First;
		auto ite2 = v.begin();
		// copy from {First, Medium) to vector v
		while (ite1 != Medium)
			*ite2++ = *ite1++;
		ite2 = v.begin();
		// merge
		for (auto ite = First; ite != Last; ++ite) {
			if (ite2 != v.end() && (ite1 == Last || !cmp(*ite1, *ite2)))
				*ite = *ite2++;
			else
				*ite = *ite1++;
		}
	}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdx, %rbx
movq %rsi, %r15
movq %rdi, %r14
subq %rdi, %rsi
shrq $0x3, %rsi
movq %rsp, %r12
movq %r12, %rdi
callq 0xaca8
movq (%r12), %rax
movq %rax, %rdx
movq %r14, %rsi
movq %rsi, %rcx
cmpq %r15, %rsi
je 0xac3b
movq %rdx, %rdi
leaq 0x8(%rcx), %rsi
addq $0x8, %rdx
cmpq %rdi, %rcx
je 0xac1b
movq (%rcx), %rcx
movq %rcx, (%rdi)
jmp 0xac1b
movq 0x8(%rsp), %rdx
cmpq %rbx, %r14
je 0xac81
cmpq %rdx, %rax
je 0xac55
cmpq %rbx, %rcx
je 0xac70
movl (%rcx), %esi
cmpl (%rax), %esi
jae 0xac70
movq %rcx, %rsi
leaq 0x8(%rcx), %rdi
cmpq %rcx, %r14
movq %rdi, %rcx
je 0xac6a
movq (%rsi), %rsi
movq %rsi, (%r14)
addq $0x8, %r14
jmp 0xac40
movq %rax, %rsi
leaq 0x8(%rax), %rdi
cmpq %rax, %r14
movq %rdi, %rax
jne 0xac64
jmp 0xac6a
movq %rsp, %rdi
callq 0x84ae
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/algorithm.h
// Function: void ezSTL::__intro_sort_loop<unsigned int*, ezSTL::less<unsigned int>>(unsigned int*, unsigned int*, unsigned int, ezSTL::less<unsigned int>)
void __intro_sort_loop(Iterator First, Iterator Last, unsigned int depth, Compare cmp) {
		unsigned int count;
		while ((count = Last - First) > insertion_threshold && depth > 0) {
			--depth;
			Iterator Medium = __quick_sort_partition(First, Last, cmp);
			if (Medium - First < Last - Medium) {
				__intro_sort_loop(First, Medium, depth, cmp);
				First = Medium;
			}
			else {
				__intro_sort_loop(Medium, Last, depth, cmp);
				Last = Medium;
			}
		}
		// if exceed recursive depth limitation
		if (depth <= 0)
			__heap_sort(First, Last, cmp);
		// if < insertion_threshold, change to insertion sort
		else if (count >= 2)
			__insertion_sort(First, Last, cmp);
	}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %rbx
movq %rdi, %r14
decl %ebp
movq %rbx, %rax
subq %r14, %rax
shrq $0x2, %rax
cmpl $0x15, %eax
jb 0xad87
cmpl $-0x1, %ebp
je 0xad87
movq %r14, %rdi
movq %rbx, %rsi
callq 0xadd4
movq %rax, %r15
movq %rbx, %rax
subq %r15, %rax
movq %r15, %rcx
subq %r14, %rcx
cmpq %rax, %rcx
jge 0xad75
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %edx
callq 0xad1d
decl %ebp
movq %r15, %r14
jmp 0xad2e
movq %r15, %rdi
movq %rbx, %rsi
movl %ebp, %edx
callq 0xad1d
movq %r15, %rbx
jmp 0xad2c
cmpl $-0x1, %ebp
je 0xada6
cmpl $0x2, %eax
jb 0xadbb
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xaf95
movq %r14, %rdi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xae8d
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/cjc12[P]ezSTL/src/../include/algorithm.h
// Function: unsigned int* ezSTL::__quick_sort_partition<unsigned int*, ezSTL::less<unsigned int>>(unsigned int*, unsigned int*, ezSTL::less<unsigned int>)
inline Iterator __quick_sort_partition(Iterator First, Iterator Last, Compare cmp) {
		Iterator Medium = First + (Last - First) / 2;
		// get the medial value of First, Medium, Last - 1
		if ((cmp(*Medium, *First) && cmp(*(Last - 1), *Medium)) || (cmp(*Medium, *(Last - 1)) && cmp(*First, *Medium)))
			swap(*First, *Medium);
		else if ((cmp(*First, *(Last - 1)) && cmp(*(Last - 1), *Medium)) || (cmp(*Medium, *(Last - 1)) && cmp(*(Last - 1), *First)))
			swap(*First, *(Last - 1));
		auto pivot = *First;
		// partition according the value of pivot
		while (First < Last - 1) {
			while (First < Last - 1 && !cmp(*(Last - 1), pivot))
				--Last;
			*First = *(Last - 1);
			while (First < Last - 1 && !cmp(pivot, *First))
				++First;
			*(Last - 1) = *First;
		}
		*First = pivot;
		return First;
	}

// Assembly:
movq %rsi, %rax
subq %rdi, %rax
sarq $0x2, %rax
pushq $0x2
popq %rcx
cqto
idivq %rcx
leaq (%rdi,%rax,4), %rcx
movl (%rcx), %edx
movl (%rdi), %eax
cmpl %eax, %edx
setb %r9b
movl -0x4(%rsi), %r8d
cmpl %edx, %r8d
setb %r10b
testb %r10b, %r9b
jne 0xae16
cmpl %r8d, %edx
setb %r9b
cmpl %edx, %eax
setb %r10b
testb %r9b, %r10b
je 0xae5a
movl %edx, (%rdi)
movl %eax, (%rcx)
movl (%rdi), %eax
leaq -0x4(%rsi), %rcx
cmpq %rcx, %rdi
jae 0xae54
movq %rsi, %rcx
movl -0x4(%rcx), %edx
addq $-0x4, %rcx
cmpq %rcx, %rdi
jae 0xae38
cmpl %eax, %edx
jae 0xae28
movl %edx, (%rdi)
leaq 0x4(%rcx), %rsi
cmpq %rcx, %rdi
jae 0xae50
cmpl %edx, %eax
jb 0xae50
movl 0x4(%rdi), %edx
addq $0x4, %rdi
jmp 0xae3e
movl %edx, (%rcx)
jmp 0xae1c
movl %eax, (%rdi)
movq %rdi, %rax
retq
cmpl %r8d, %edx
setb %r9b
leaq -0x4(%rsi), %rcx
cmpl %r8d, %eax
setb %r11b
cmpl %edx, %r8d
setb %dl
cmpl %eax, %r8d
setb %r10b
testb %dl, %r11b
jne 0xae88
movl %r8d, %edx
andb %r10b, %r9b
je 0xae1a
jmp 0xae16
movl %r8d, %edx
jmp 0xae16
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/sort.cpp
// Function: readFromFile(char*)
std::vector<int> readFromFile(char* filename) {
    std::vector<int> values = std::vector<int>();
    
    /* Open input file */
    std::ifstream in(filename);
    
    /* Read all integers from file */
    if(in) {
        int v;
        while(in >> v) {
            values.push_back(v);
        }
    }
    
    in.close();
    
    return values;
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x210, %rsp            # imm = 0x210
movq %rdi, %rbx
xorps %xmm0, %xmm0
movups %xmm0, (%rdi)
andq $0x0, 0x10(%rdi)
leaq 0x8(%rsp), %rdi
pushq $0x8
popq %rdx
callq 0x1180
movq 0x8(%rsp), %rax
movq -0x18(%rax), %rax
testb $0x5, 0x28(%rsp,%rax)
je 0x1351
leaq 0x8(%rsp), %rdi
callq 0x1040
leaq 0x8(%rsp), %rdi
callq 0x1050
movq %rbx, %rax
addq $0x210, %rsp            # imm = 0x210
popq %rbx
popq %r14
popq %r15
retq
leaq 0x8(%rsp), %r14
leaq 0x4(%rsp), %r15
movq %r14, %rdi
movq %r15, %rsi
callq 0x10b0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x132d
movq %rbx, %rdi
movq %r15, %rsi
callq 0x1558
jmp 0x135b
jmp 0x1388
movq %rax, %r14
jmp 0x1395
movq %rax, %r14
leaq 0x8(%rsp), %rdi
callq 0x1050
movq %rbx, %rdi
callq 0x1582
movq %r14, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/sort.cpp
// Function: writeToFile(char*, std::vector<int, std::allocator<int>>&)
void writeToFile(char* filename, std::vector<int> &values) {
    /* Open output file */
    std::ofstream out;
    out.open(filename, std::ofstream::out);
    
    /* Write all integers to file */
    for(int v : values) {
        out << v << "\n";
    }
    
    out.close();
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x208, %rsp            # imm = 0x208
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x8(%rsp), %r15
movq %r15, %rdi
callq 0x1150
pushq $0x10
popq %rdx
movq %r15, %rdi
movq %r14, %rsi
callq 0x1030
movq (%rbx), %r15
movq 0x8(%rbx), %r12
leaq 0x8(%rsp), %rbx
leaq 0xc34(%rip), %r14       # 0x201b
cmpq %r12, %r15
je 0x1408
movl (%r15), %esi
movq %rbx, %rdi
callq 0x1160
movq %rax, %rdi
movq %r14, %rsi
callq 0x10e0
addq $0x4, %r15
jmp 0x13e7
leaq 0x8(%rsp), %rdi
callq 0x1110
leaq 0x8(%rsp), %rdi
callq 0x1120
addq $0x208, %rsp            # imm = 0x208
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x142d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x1120
movq %rbx, %rdi
callq 0x1170
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/sort.cpp
// Function: sortHelper(std::vector<int, std::allocator<int>>&, int, int)
void sortHelper(std::vector<int> &values, int start, int end) {
    /* Check if already sorted */
    if(end - start <= 1) return;

    /* Pick the first element as the pivot,
       we already know the elements are random
       so this is as good as a random pivot */
    int pivot = values[start];

    int swapIndex = start + 1;
    for(int index = start + 1; index < end; index++) {
        /* Move elements smaller than pivot value to the front
           of the list */
        if(values[index] < pivot) {
            swap(values, index, swapIndex);
            swapIndex++;
        }
    }

    /* Swap pivot to appropriate point in list,
       since elements to the left of the pivot are smaller,
       and the pivot is at the zeroth position,
       it should swap with a smaller value, i.e. swapIndex - 1 */
    swap(values, start, swapIndex - 1);

    /* Sort sublists */
    sortHelper(values, start, swapIndex);
    sortHelper(values, swapIndex, end);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rdi, %r14
movslq %edx, %r15
movl %ebx, %eax
subl %esi, %eax
cmpl $0x2, %eax
jl 0x14c1
movslq %esi, %rax
movq (%r14), %rcx
movl (%rcx,%rax,4), %edi
leal 0x1(%rsi), %ebp
movslq %ebp, %r8
movslq %ebp, %rdx
cmpq %r15, %r8
jge 0x14a5
movl (%rcx,%r8,4), %r9d
cmpl %edi, %r9d
jge 0x14a0
movl (%rcx,%rdx,4), %r10d
movl %r10d, (%rcx,%r8,4)
movl %r9d, (%rcx,%rdx,4)
incl %edx
movl %edx, %ebp
incq %r8
jmp 0x147f
movl (%rcx,%rax,4), %edi
movl -0x4(%rcx,%rdx,4), %r8d
movl %r8d, (%rcx,%rax,4)
movl %edi, -0x4(%rcx,%rdx,4)
movq %r14, %rdi
callq 0x1458
movl %ebp, %esi
jmp 0x1467
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/nicluo[P]sorting-numbers/sort.cpp
// Function: main
int main(int argc, char *argv[]) {
    /* Must provide -f */
    if (argc != 3 || strncmp(argv[1], "-f", 3) != 0) {
        printUsage(argv[0]);
        return 1;
    }
    
    std::vector<int> values = readFromFile(argv[2]);
    sort(values);
    writeToFile(argv[2], values);
    
    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
cmpl $0x3, %edi
jne 0x1502
movq 0x8(%rbx), %rax
cmpb $0x2d, (%rax)
jne 0x1502
cmpb $0x66, 0x1(%rax)
jne 0x1502
cmpb $0x0, 0x2(%rax)
je 0x1515
movq (%rbx), %rdi
callq 0x12bc
pushq $0x1
popq %rax
addq $0x18, %rsp
popq %rbx
popq %r14
retq
movq 0x10(%rbx), %rsi
movq %rsp, %r14
movq %r14, %rdi
callq 0x12f6
movq %r14, %rdi
callq 0x14cc
movq 0x10(%rbx), %rdi
movq %r14, %rsi
callq 0x13a5
movq %rsp, %rdi
callq 0x1582
xorl %eax, %eax
jmp 0x150d
movq %rax, %rbx
movq %rsp, %rdi
callq 0x1582
movq %rbx, %rdi
callq 0x1170
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_arc.cc
// Function: Interp::arc_data_comp_r(int, int, int, double, double, double, double, double, double, double*, double*, int*, double)
int Interp::arc_data_comp_r(int move,    //!< either G_2 (cw arc) or G_3 (ccw arc)
                            int plane,
                           int side,    //!< either RIGHT or LEFT
                           double tool_radius,  //!< radius of the tool
                           double current_x,    //!< first coordinate of current point
                           double current_y,    //!< second coordinate of current point
                           double end_x,        //!< first coordinate of arc end point
                           double end_y,        //!< second coordinate of arc end point
                           double big_radius,   //!< radius of arc
                           double *center_x,    //!< pointer to first coordinate of center of arc
                           double *center_y,    //!< pointer to second coordinate of center of arc
                           int *turn,           //!< pointer to number of full or partial circles CCW
                           double tolerance)    //!< tolerance of differing radii
{
  double abs_radius;            // absolute value of big_radius

  abs_radius = fabs(big_radius);
  CHKS(((abs_radius <= tool_radius) && (((side == LEFT) && (move == G_3)) ||
                                       ((side == RIGHT) && (move == G_2)))),
      NCE_TOOL_RADIUS_NOT_LESS_THAN_ARC_RADIUS_WITH_COMP);

  return arc_data_r(move, plane, current_x, current_y, end_x, end_y, big_radius, 
             center_x, center_y, turn, tolerance);

}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
movq %rdi, %rbx
movq 0x10(%rbp), %rax
movapd 0x21455(%rip), %xmm7    # 0x2e020
andpd %xmm5, %xmm7
ucomisd %xmm7, %xmm0
jae 0xcbff
movq %rbx, %rdi
movaps %xmm1, %xmm0
movaps %xmm2, %xmm1
movaps %xmm3, %xmm2
movaps %xmm4, %xmm3
movapd %xmm5, %xmm4
movq %r8, %rcx
movq %r9, %r8
movq %rax, %r9
movaps %xmm6, %xmm5
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0xbd50
movl %ecx, %edx
xorl $0x2, %edx
movl %esi, %edi
xorl $0x1e, %edi
orl %edx, %edi
je 0xcc19
xorl $0x1, %ecx
movl %esi, %edx
xorl $0x14, %edx
orl %ecx, %edx
jne 0xcbd5
leaq 0x21551(%rip), %rdi     # 0x2e171
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x30327(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x2156f(%rip), %rsi     # 0x2e1b6
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_check.cc
// Function: Interp::check_items(block_struct*, setup_struct*)
int Interp::check_items(block_pointer block,     //!< pointer to a block to be checked
                       setup_pointer settings)  //!< pointer to machine settings
{

  CHP(check_g_codes(block, settings));
  CHP(check_m_codes(block));
  CHP(check_other_codes(block));
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %r15
callq 0xb1c0
testl %eax, %eax
jne 0xd2b7
movq %r15, %rdi
movq %r14, %rsi
callq 0xc110
testl %eax, %eax
jne 0xd2b7
movq %r15, %rdi
movq %r14, %rsi
callq 0xb3d0
testl %eax, %eax
je 0xd324
movl %eax, %ebx
movq 0x2fca0(%rip), %rax     # 0x3cf60
movslq 0xd670(%rax), %rcx
cmpq $0x30, %rcx
jg 0xd317
imulq $0x50, %rcx, %rcx
leaq (%rax,%rcx), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0x22ac7(%rip), %rsi     # 0x2fdaa
pushq $0x50
popq %rdx
callq 0xb940
movq 0x2fc6e(%rip), %rax     # 0x3cf60
movslq 0xd670(%rax), %rcx
imulq $0x50, %rcx, %rdx
xorl %esi, %esi
movb %sil, 0xc71f(%rax,%rdx)
incl %ecx
movl %ecx, 0xd670(%rax)
movb %sil, 0xc720(%rax,%rdx)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
xorl %ebx, %ebx
jmp 0xd317
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::comp_set_current(setup_struct*, double, double, double)
int Interp::comp_set_current(setup_pointer settings, double x, double y, double z) {
    switch(settings->plane) {
    case CANON_PLANE_XY:
        settings->current_x = x;
        settings->current_y = y;
        settings->current_z = z;
        break;
    case CANON_PLANE_XZ:
        settings->current_x = y;
        settings->current_y = z;
        settings->current_z = x;
        break;
    default:
        ERS("BUG: Invalid plane in comp_set_current");
    }
    return INTERP_OK;
}

// Assembly:
movl 0xc67c(%rsi), %eax
cmpl $0x3, %eax
je 0xd97e
cmpl $0x1, %eax
jne 0xd999
movsd %xmm0, 0x600(%rsi)
movsd %xmm1, 0x608(%rsi)
movsd %xmm2, 0x610(%rsi)
jmp 0xd996
movsd %xmm1, 0x600(%rsi)
movsd %xmm2, 0x608(%rsi)
movsd %xmm0, 0x610(%rsi)
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x231b5(%rip), %rsi     # 0x30b5b
xorl %eax, %eax
callq 0xb8e0
movq 0x2f5ac(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x2268b(%rip), %rsi     # 0x3004d
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::comp_set_programmed(setup_struct*, double, double, double)
int Interp::comp_set_programmed(setup_pointer settings, double x, double y, double z) {
    switch(settings->plane) {
    case CANON_PLANE_XY:
        settings->program_x = x;
        settings->program_y = y;
        settings->program_z = z;
        break;
    case CANON_PLANE_XZ:
        settings->program_x = y;
        settings->program_y = z;
        settings->program_z = x;
        break;
    default:
        ERS("BUG: Invalid plane in comp_set_programmed");
    }
    return INTERP_OK;
}

// Assembly:
movl 0xc67c(%rsi), %eax
cmpl $0x3, %eax
je 0xdab0
cmpl $0x1, %eax
jne 0xdacb
movsd %xmm0, 0xc690(%rsi)
movsd %xmm1, 0xc698(%rsi)
movsd %xmm2, 0xc6a0(%rsi)
jmp 0xdac8
movsd %xmm1, 0xc690(%rsi)
movsd %xmm2, 0xc698(%rsi)
movsd %xmm0, 0xc6a0(%rsi)
xorl %eax, %eax
retq
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x230d4(%rip), %rsi     # 0x30bac
xorl %eax, %eax
callq 0xb8e0
movq 0x2f47a(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x225fb(%rip), %rsi     # 0x300ef
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_control_mode(int, double, double, setup_struct*)
int Interp::convert_control_mode(int g_code,     //!< g_code being executed (G_61, G61_1, || G_64)
				double tolerance,    //tolerance for the path following in G64
				double naivecam_tolerance,    //tolerance for the naivecam
                                setup_pointer settings) //!< pointer to machine settings                 
{
  CHKS((settings->cutter_comp_side != OFF),
       (_("Cannot change control mode with cutter radius compensation on")));
  if (g_code == G_61) {
    SET_MOTION_CONTROL_MODE(CANON_EXACT_PATH, 0);
    settings->control_mode = CANON_EXACT_PATH;
  } else if (g_code == G_61_1) {
    SET_MOTION_CONTROL_MODE(CANON_EXACT_STOP, 0);
    settings->control_mode = CANON_EXACT_STOP;
  } else if (g_code == G_64) {
	if (tolerance >= 0) {
	    SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, tolerance);
	} else {
	    SET_MOTION_CONTROL_MODE(CANON_CONTINUOUS, 0);
	}
	if (naivecam_tolerance >= 0) {
	    SET_NAIVECAM_TOLERANCE(naivecam_tolerance);
	} else if (tolerance >= 0) {
	    SET_NAIVECAM_TOLERANCE(tolerance);   // if no naivecam_tolerance specified use same for both
	} else {
	    SET_NAIVECAM_TOLERANCE(0);
	}
    settings->control_mode = CANON_CONTINUOUS;
  } else 
    ERS(NCE_BUG_CODE_NOT_G61_G61_1_OR_G64);
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rdi, %r14
cmpl $0x0, 0x624(%rdx)
je 0x11211
leaq 0x2034e(%rip), %rdi     # 0x31516
callq 0xb220
movq %r14, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x2bd7f(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1f0e6(%rip), %rsi     # 0x302d5
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rax
jmp 0x112ca
movq %rdx, %rbx
cmpl $0x280, %esi            # imm = 0x280
je 0x1125f
cmpl $0x263, %esi            # imm = 0x263
je 0x11247
cmpl $0x262, %esi            # imm = 0x262
jne 0x1128f
pushq $0x2
popq %rdi
xorpd %xmm0, %xmm0
callq 0xb0e0
movl $0x2, 0x5f8(%rbx)
jmp 0x112c8
pushq $0x1
popq %rdi
xorpd %xmm0, %xmm0
callq 0xb0e0
movl $0x1, 0x5f8(%rbx)
jmp 0x112c8
movsd %xmm1, -0x18(%rbp)
xorpd %xmm1, %xmm1
pushq $0x3
popq %rdi
ucomisd %xmm1, %xmm0
jae 0x1129b
xorpd %xmm0, %xmm0
callq 0xb0e0
movsd -0x18(%rbp), %xmm0
ucomisd 0x1ec49(%rip), %xmm0    # 0x2fed0
jae 0x112b9
xorpd %xmm0, %xmm0
jmp 0x112b9
leaq 0x202be(%rip), %rdi     # 0x31554
jmp 0x111c8
movsd %xmm0, -0x20(%rbp)
callq 0xb0e0
movsd -0x18(%rbp), %xmm0
ucomisd 0x1ec1e(%rip), %xmm0    # 0x2fed0
jae 0x112b9
movsd -0x20(%rbp), %xmm0
callq 0xba00
movl $0x3, 0x5f8(%rbx)
xorl %eax, %eax
addq $0x10, %rsp
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::rotate(double*, double*, double)
void Interp::rotate(double *x, double *y, double theta) {
    double xx, yy;
    double t = D2R(theta);
    xx = *x * cos(t) - *y * sin(t); 
    yy = *x * sin(t) + *y * cos(t);
    *x = xx;
    *y = yy;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
subq $0x30, %rsp
movq %rdx, %rbx
mulsd 0x1ebee(%rip), %xmm0    # 0x2fed8
movq %rsi, %r14
divsd 0x1ebeb(%rip), %xmm0    # 0x2fee0
movsd %xmm0, -0x30(%rbp)
movsd (%rsi), %xmm1
movsd %xmm1, -0x20(%rbp)
callq 0xc6c0
movsd %xmm0, -0x28(%rbp)
movsd (%rbx), %xmm0
movsd %xmm0, -0x18(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xb200
mulsd -0x18(%rbp), %xmm0
movsd -0x28(%rbp), %xmm1
mulsd -0x20(%rbp), %xmm1
subsd %xmm0, %xmm1
movsd %xmm1, -0x28(%rbp)
movsd (%r14), %xmm0
movsd %xmm0, -0x20(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xb200
movsd %xmm0, -0x18(%rbp)
movsd (%rbx), %xmm0
movsd %xmm0, -0x38(%rbp)
movsd -0x30(%rbp), %xmm0
callq 0xc6c0
mulsd -0x38(%rbp), %xmm0
movsd -0x18(%rbp), %xmm1
mulsd -0x20(%rbp), %xmm1
addsd %xmm0, %xmm1
movsd -0x28(%rbp), %xmm0
movsd %xmm0, (%r14)
movsd %xmm1, (%rbx)
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_cutter_compensation(int, block_struct*, setup_struct*)
int Interp::convert_cutter_compensation(int g_code,      //!< must be G_40, G_41, or G_42             
                                       block_pointer block,     //!< pointer to a block of RS274 instructions
                                       setup_pointer settings)  //!< pointer to machine settings             
{

  if (g_code == G_40) {
    CHP(convert_cutter_compensation_off(settings));
  } else if (g_code == G_41) {
    CHP(convert_cutter_compensation_on(LEFT, block, settings));
  } else if (g_code == G_42) {
    CHP(convert_cutter_compensation_on(RIGHT, block, settings));
  } else if (g_code == G_41_1) {
    CHP(convert_cutter_compensation_on(LEFT, block, settings));
  } else if (g_code == G_42_1) {
    CHP(convert_cutter_compensation_on(RIGHT, block, settings));
  } else
    ERS("BUG: Code not G40, G41, G41.1, G42, G42.2");

  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
cmpl $0x1a5, %esi            # imm = 0x1A5
je 0x1185a
cmpl $0x19a, %esi            # imm = 0x19A
je 0x11856
cmpl $0x19b, %esi            # imm = 0x19B
je 0x11856
cmpl $0x1a4, %esi            # imm = 0x1A4
je 0x1185a
cmpl $0x190, %esi            # imm = 0x190
jne 0x118c8
movq %rcx, %rsi
callq 0xc0a0
jmp 0x11862
pushq $0x2
jmp 0x1185c
pushq $0x1
popq %rsi
callq 0xb290
testl %eax, %eax
je 0x118c4
movl %eax, %ebx
movq 0x2b6f1(%rip), %r15     # 0x3cf60
movslq 0xd670(%r15), %rax
cmpq $0x30, %rax
jg 0x11914
imulq $0x50, %rax, %rax
leaq (%r15,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0x1eae1(%rip), %rsi     # 0x30377
pushq $0x50
popq %rdx
callq 0xb940
movslq 0xd670(%r15), %rax
imulq $0x50, %rax, %rcx
leaq (%r15,%rcx), %r14
addq $0xc720, %r14           # imm = 0xC720
movb $0x0, -0x1(%r14)
incl %eax
movl %eax, 0xd670(%r15)
jmp 0x11910
xorl %ebx, %ebx
jmp 0x11914
leaq 0x1fd3f(%rip), %rsi     # 0x3160e
xorl %eax, %eax
callq 0xb8e0
movq 0x2b683(%rip), %r14     # 0x3cf60
leaq 0xc6d0(%r14), %rdi
leaq 0x1ea8c(%rip), %rsi     # 0x30377
pushq $0x50
popq %rdx
callq 0xb940
movb $0x0, 0xc71f(%r14)
movl $0x1, 0xd670(%r14)
addq $0xc720, %r14           # imm = 0xC720
pushq $0x5
popq %rbx
movb $0x0, (%r14)
movl %ebx, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_cutter_compensation_off(setup_struct*)
int Interp::convert_cutter_compensation_off(setup_pointer settings)      //!< pointer to machine settings
{
#ifdef DEBUG_EMC
  enqueue_COMMENT("interpreter: cutter radius compensation off");
#endif
  if(settings->cutter_comp_side != OFF && settings->cutter_comp_radius > 0.0) {
      double cx, cy, cz;
      comp_get_current(settings, &cx, &cy, &cz);
      CHP(move_endpoint_and_flush(settings, cx, cy));
      dequeue_canons(settings);
      settings->current_x = settings->program_x;
      settings->current_y = settings->program_y;
      settings->current_z = settings->program_z;
      settings->arc_not_allowed = ON;
  }
  settings->cutter_comp_side = OFF;
  settings->cutter_comp_firstmove = ON;
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x20, %rsp
movq %rsi, %rbx
movq %rdi, %r14
leaq 0x1fcfa(%rip), %rdi     # 0x31638
callq 0xc4d0
cmpl $0x0, 0x624(%rbx)
je 0x11a2a
movsd 0x618(%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0x11a2a
leaq -0x38(%rbp), %r15
leaq -0x30(%rbp), %r12
leaq -0x28(%rbp), %r8
movq %r14, %rdi
movq %rbx, %rsi
movq %r15, %rdx
movq %r12, %rcx
callq 0xc820
movsd (%r15), %xmm0
movsd (%r12), %xmm1
movq %r14, %rdi
movq %rbx, %rsi
callq 0xb7c0
testl %eax, %eax
je 0x119fb
movl %eax, %r14d
movq 0x2b5b9(%rip), %rbx     # 0x3cf60
movslq 0xd670(%rbx), %rax
cmpq $0x30, %rax
jg 0x11a3b
imulq $0x50, %rax, %rax
leaq (%rbx,%rax), %rdi
addq $0xc6d0, %rdi           # imm = 0xC6D0
leaq 0x1e9fa(%rip), %rsi     # 0x303c8
pushq $0x50
popq %rdx
callq 0xb940
movslq 0xd670(%rbx), %rax
imulq $0x50, %rax, %rcx
xorl %edx, %edx
movb %dl, 0xc71f(%rbx,%rcx)
incl %eax
movl %eax, 0xd670(%rbx)
movb %dl, 0xc720(%rbx,%rcx)
jmp 0x11a3b
movq %rbx, %rdi
callq 0xb340
movsd 0xc690(%rbx), %xmm0
movsd %xmm0, 0x600(%rbx)
movupd 0xc698(%rbx), %xmm0
movupd %xmm0, 0x608(%rbx)
movb $0x1, 0x110(%rbx)
andl $0x0, 0x624(%rbx)
movb $0x1, 0xc689(%rbx)
xorl %r14d, %r14d
movl %r14d, %eax
addq $0x20, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_distance_mode(int, setup_struct*)
int Interp::convert_distance_mode(int g_code,    //!< g_code being executed (must be G_90 or G_91)
                                 setup_pointer settings)        //!< pointer to machine settings                 
{
  if (g_code == G_90) {
    if (settings->distance_mode != MODE_ABSOLUTE) {
#ifdef DEBUG_EMC
      enqueue_COMMENT("interpreter: distance mode changed to absolute");
#endif
      settings->distance_mode = MODE_ABSOLUTE;
    }
  } else if (g_code == G_91) {
    if (settings->distance_mode != MODE_INCREMENTAL) {
#ifdef DEBUG_EMC
      enqueue_COMMENT("interpreter: distance mode changed to incremental");
#endif
      settings->distance_mode = MODE_INCREMENTAL;
    }
  } else
    ERS(NCE_BUG_CODE_NOT_G90_OR_G91);
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
cmpl $0x38e, %esi            # imm = 0x38E
je 0x11dfa
cmpl $0x384, %esi            # imm = 0x384
jne 0x11e1f
xorl %ebx, %ebx
cmpl $0x0, 0x668(%r14)
je 0x11e6d
leaq 0x1f9f4(%rip), %rdi     # 0x317df
callq 0xc4d0
andl $0x0, 0x668(%r14)
jmp 0x11e6d
xorl %ebx, %ebx
cmpl $0x1, 0x668(%r14)
je 0x11e6d
leaq 0x1fa01(%rip), %rdi     # 0x3180e
callq 0xc4d0
movl $0x1, 0x668(%r14)
jmp 0x11e6d
movq %rdi, %rbx
leaq 0x1fa17(%rip), %rdi     # 0x31840
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x2b11e(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1e61a(%rip), %rsi     # 0x3046a
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/sundale[P]gcode/rs274ngc/interp_convert.cc
// Function: Interp::convert_ijk_distance_mode(int, setup_struct*)
int Interp::convert_ijk_distance_mode(int g_code,    //!< g_code being executed (must be G_90_1 or G_91_1)
                                 setup_pointer settings)        //!< pointer to machine settings                 
{
  if (g_code == G_90_1) {
    if (settings->ijk_distance_mode != MODE_ABSOLUTE) {
#ifdef DEBUG_EMC
      enqueue_COMMENT("interpreter: IJK distance mode changed to absolute");
#endif
      settings->ijk_distance_mode = MODE_ABSOLUTE;
    }
  } else if (g_code == G_91_1) {
    if (settings->ijk_distance_mode != MODE_INCREMENTAL) {
#ifdef DEBUG_EMC
      enqueue_COMMENT("interpreter: IJK distance mode changed to incremental");
#endif
      settings->ijk_distance_mode = MODE_INCREMENTAL;
    }
  } else
    ERS(NCE_BUG_CODE_NOT_G90_OR_G91);
  return INTERP_OK;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movq %rdx, %r14
cmpl $0x38f, %esi            # imm = 0x38F
je 0x11eb4
cmpl $0x385, %esi            # imm = 0x385
jne 0x11ed9
xorl %ebx, %ebx
cmpl $0x0, 0x66c(%r14)
je 0x11f27
leaq 0x1f9b3(%rip), %rdi     # 0x31858
callq 0xc4d0
andl $0x0, 0x66c(%r14)
jmp 0x11f27
xorl %ebx, %ebx
cmpl $0x1, 0x66c(%r14)
je 0x11f27
leaq 0x1f9c4(%rip), %rdi     # 0x3188b
callq 0xc4d0
movl $0x1, 0x66c(%r14)
jmp 0x11f27
movq %rdi, %rbx
leaq 0x1f95d(%rip), %rdi     # 0x31840
callq 0xb220
movq %rbx, %rdi
movq %rax, %rsi
xorl %eax, %eax
callq 0xb8e0
movq 0x2b064(%rip), %rbx     # 0x3cf60
leaq 0xc6d0(%rbx), %rdi
leaq 0x1e5b1(%rip), %rsi     # 0x304bb
pushq $0x50
popq %rdx
callq 0xb940
andw $0x0, 0xc71f(%rbx)
movl $0x1, 0xd670(%rbx)
pushq $0x5
popq %rbx
movl %ebx, %eax
popq %rbx
popq %r14
popq %rbp
retq