LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block* moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::create_array<moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block>(unsigned long)
static inline U* create_array(size_t count)
	{
		assert(count > 0);
		U* p = static_cast<U*>(aligned_malloc<U>(sizeof(U) * count));
		if (p == nullptr)
			return nullptr;

		for (size_t i = 0; i != count; ++i)
			new (p + i) U();
		return p;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jbe 0x59e5
jmp 0x5a04
leaq 0x129b0(%rip), %rdi     # 0x1839c
leaq 0x129b3(%rip), %rsi     # 0x183a6
movl $0xe11, %edx            # imm = 0xE11
leaq 0x129cd(%rip), %rcx     # 0x183cc
callq 0x3180
imulq $0x448, -0x10(%rbp), %rdi # imm = 0x448
callq 0x5a70
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x5a26
movq $0x0, -0x8(%rbp)
jmp 0x5a62
movq $0x0, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq -0x10(%rbp), %rax
je 0x5a5a
movq -0x18(%rbp), %rdi
imulq $0x448, -0x20(%rbp), %rax # imm = 0x448
addq %rax, %rdi
callq 0x5a90
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x5a2e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: void moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::destroy_array<moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block>(moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block*, unsigned long)
static inline void destroy_array(U* p, size_t count)
	{
		if (p != nullptr) {
			assert(count > 0);
			for (size_t i = count; i != 0; )
				(p + --i)->~U();
		}
		aligned_free<U>(p);
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0x631e
cmpq $0x0, -0x10(%rbp)
jbe 0x62e0
jmp 0x62ff
leaq 0x120b5(%rip), %rdi     # 0x1839c
leaq 0x120b8(%rip), %rsi     # 0x183a6
movl $0xe1f, %edx            # imm = 0xE1F
leaq 0x1227d(%rip), %rcx     # 0x18577
callq 0x3180
movq -0x10(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x631c
movq -0x18(%rbp), %rax
addq $-0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x6307
jmp 0x631e
movq -0x8(%rbp), %rdi
callq 0x6350
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/blocking_concurrent_queue.hpp
// Function: unsigned long moodycamel::BlockingConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::wait_dequeue_bulk_timed<std::function<void ()>*&>(moodycamel::ConsumerToken&, std::function<void ()>*&, unsigned long, long)
inline size_t wait_dequeue_bulk_timed(consumer_token_t& token, It itemFirst, size_t max, std::int64_t timeout_usecs)
	{
		size_t count = 0;
		max = (size_t)sema->waitMany((LightweightSemaphore::ssize_t)(ssize_t)max, timeout_usecs);
		while (count != max) {
			count += inner.template try_dequeue_bulk<It&>(token, itemFirst, max - count);
		}
		return count;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq $0x0, -0x30(%rbp)
addq $0x268, %rdi            # imm = 0x268
callq 0x71a0
movq %rax, %rdi
movq -0x20(%rbp), %rsi
movq -0x28(%rbp), %rdx
callq 0x71c0
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x7159
movq -0x38(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
movq -0x20(%rbp), %rcx
subq -0x30(%rbp), %rcx
callq 0x7250
addq -0x30(%rbp), %rax
movq %rax, -0x30(%rbp)
jmp 0x712c
movq -0x30(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/lightweight_semaphore.hpp
// Function: moodycamel::LightweightSemaphore::waitMany(long, long)
ssize_t waitMany(ssize_t max, std::int64_t timeout_usecs)
	{
		assert(max >= 0);
		ssize_t result = tryWaitMany(max);
		if (result == 0 && max > 0)
			result = waitManyWithPartialSpinning(max, timeout_usecs);
		return result;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x10(%rbp)
jl 0x71e5
jmp 0x7204
leaq 0x11491(%rip), %rdi     # 0x1867d
leaq 0x112cf(%rip), %rsi     # 0x184c2
movl $0x17b, %edx            # imm = 0x17B
leaq 0x11487(%rip), %rcx     # 0x18686
callq 0x3180
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
callq 0x7610
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x7238
cmpq $0x0, -0x10(%rbp)
jle 0x7238
movq -0x28(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
callq 0x7d50
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/lightweight_semaphore.hpp
// Function: moodycamel::details::Semaphore::wait()
bool wait()
	{
		// http://stackoverflow.com/questions/2013181/gdb-causes-sem-wait-to-fail-with-eintr-error
		int rc;
		do {
			rc = sem_wait(&m_sema);
		} while (rc == -1 && errno == EINTR);
		return rc == 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3140
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0xc(%rbp)
movb %al, -0x19(%rbp)
jne 0x8e89
callq 0x3030
cmpl $0x4, (%rax)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x8e64
cmpl $0x0, -0xc(%rbp)
sete %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/lightweight_semaphore.hpp
// Function: moodycamel::details::Semaphore::timed_wait(unsigned long)
bool timed_wait(std::uint64_t usecs)
	{
		struct timespec ts;
		const int usecs_in_1_sec = 1000000;
		const int nsecs_in_1_sec = 1000000000;
		clock_gettime(CLOCK_REALTIME, &ts);
		ts.tv_sec += (time_t)(usecs / usecs_in_1_sec);
		ts.tv_nsec += (long)(usecs % usecs_in_1_sec) * 1000;
		// sem_timedwait bombs if you have more than 1e9 in tv_nsec
		// so we have to clean things up before passing it in
		if (ts.tv_nsec >= nsecs_in_1_sec) {
			ts.tv_nsec -= nsecs_in_1_sec;
			++ts.tv_sec;
		}

		int rc;
		do {
			rc = sem_timedwait(&m_sema, &ts);
		} while (rc == -1 && errno == EINTR);
		return rc == 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0xf4240, -0x24(%rbp)   # imm = 0xF4240
movl $0x3b9aca00, -0x28(%rbp) # imm = 0x3B9ACA00
xorl %edi, %edi
leaq -0x20(%rbp), %rsi
callq 0x3210
movq -0x10(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
addq -0x20(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x10(%rbp), %rax
movl $0xf4240, %ecx          # imm = 0xF4240
xorl %edx, %edx
divq %rcx
imulq $0x3e8, %rdx, %rax      # imm = 0x3E8
addq -0x18(%rbp), %rax
movq %rax, -0x18(%rbp)
cmpq $0x3b9aca00, -0x18(%rbp) # imm = 0x3B9ACA00
jl 0x8f28
movq -0x18(%rbp), %rax
subq $0x3b9aca00, %rax       # imm = 0x3B9ACA00
movq %rax, -0x18(%rbp)
movq -0x20(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x20(%rbp)
jmp 0x8f2a
movq -0x38(%rbp), %rdi
leaq -0x20(%rbp), %rsi
callq 0x3320
movl %eax, -0x2c(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0x2c(%rbp)
movb %al, -0x39(%rbp)
jne 0x8f53
callq 0x3030
cmpl $0x4, (%rax)
sete %al
movb %al, -0x39(%rbp)
movb -0x39(%rbp), %al
testb $0x1, %al
jne 0x8f2a
cmpl $0x0, -0x2c(%rbp)
sete %al
andb $0x1, %al
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/lightweight_semaphore.hpp
// Function: moodycamel::details::Semaphore::try_wait()
bool try_wait()
	{
		int rc;
		do {
			rc = sem_trywait(&m_sema);
		} while (rc == -1 && errno == EINTR);
		return rc == 0;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x3080
movl %eax, -0xc(%rbp)
xorl %eax, %eax
cmpl $-0x1, -0xc(%rbp)
movb %al, -0x19(%rbp)
jne 0x8fa9
callq 0x3030
cmpl $0x4, (%rax)
sete %al
movb %al, -0x19(%rbp)
movb -0x19(%rbp), %al
testb $0x1, %al
jne 0x8f84
cmpl $0x0, -0xc(%rbp)
sete %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nop
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::FreeList<moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block>::add(moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block*)
inline void add(N* node)
		{
#ifdef MCDBGQ_NOLOCKFREE_FREELIST
			debug::DebugLock lock(mutex);
#endif		
			// We know that the should-be-on-freelist bit is 0 at this point, so it's safe to
			// set it using a fetch_add
			if (node->freeListRefs.fetch_add(SHOULD_BE_ON_FREELIST, std::memory_order_acq_rel) == 0) {
				// Oh look! We were the last ones referencing this node, and we know
				// we want to add it to the free list, so let's do it!
		 		add_knowing_refcount_is_zero(node);
			}
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x20(%rbp)
movq %rsi, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x28(%rbp), %rax
addq $0x430, %rax            # imm = 0x430
movq %rax, -0x8(%rbp)
movl $0x80000000, -0xc(%rbp) # imm = 0x80000000
movl $0x4, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, -0x14(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x30(%rbp)
subl $0x4, %eax
ja 0xb246
movq -0x30(%rbp), %rax
leaq 0xcf4f(%rip), %rcx      # 0x1818c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0xb294
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0xb294
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0xb294
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0xb294
movq -0x38(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
cmpl $0x0, -0x18(%rbp)
jne 0xb2a7
movq -0x40(%rbp), %rdi
movq -0x28(%rbp), %rsi
callq 0xb2b0
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/blocking_concurrent_queue.hpp
// Function: moodycamel::BlockingConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::enqueue(std::function<void ()>&&)
inline bool enqueue(T&& item)
	{
		if ((details::likely)(inner.enqueue(std::move(item)))) {
			sema->signal();
			return true;
		}
		return false;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
movq -0x18(%rbp), %rsi
callq 0x113b0
movzbl %al, %edi
andl $0x1, %edi
callq 0x38e0
testb $0x1, %al
jne 0xc5b2
jmp 0xc5d5
movq -0x20(%rbp), %rdi
addq $0x268, %rdi            # imm = 0x268
callq 0x71a0
movq %rax, %rdi
movl $0x1, %esi
callq 0x113e0
movb $0x1, -0x1(%rbp)
jmp 0xc5d9
movb $0x0, -0x1(%rbp)
movb -0x1(%rbp), %al
andb $0x1, %al
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/lightweight_semaphore.hpp
// Function: moodycamel::LightweightSemaphore::signal(long)
void signal(ssize_t count = 1)
	{
		assert(count >= 0);
		ssize_t oldCount = m_count.fetch_add(count, std::memory_order_release);
		ssize_t toRelease = -oldCount < count ? -oldCount : count;
		if (toRelease > 0)
		{
			m_sema.signal((int)toRelease);
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x70, %rsp
movq %rdi, -0x30(%rbp)
movq %rsi, -0x38(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x50(%rbp)
cmpq $0x0, -0x38(%rbp)
jl 0x11401
jmp 0x11420
leaq 0x7f54(%rip), %rdi      # 0x1935c
leaq 0x70b3(%rip), %rsi      # 0x184c2
movl $0x18b, %edx            # imm = 0x18B
leaq 0x7f4c(%rip), %rcx      # 0x19367
callq 0x3180
movq -0x50(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0x8(%rbp)
movq %rax, -0x10(%rbp)
movl $0x3, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x60(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x58(%rbp)
subl $0x4, %eax
ja 0x1146b
movq -0x58(%rbp), %rax
leaq 0x6dc2(%rip), %rcx      # 0x18224
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x114c8
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x114c8
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x114c8
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x114c8
movq -0x60(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x40(%rbp)
xorl %eax, %eax
subq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jge 0x114e8
xorl %eax, %eax
subq -0x40(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x114f0
movq -0x38(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x68(%rbp), %rax
movq %rax, -0x48(%rbp)
cmpq $0x0, -0x48(%rbp)
jle 0x11512
movq -0x50(%rbp), %rdi
addq $0x8, %rdi
movq -0x48(%rbp), %rax
movl %eax, %esi
callq 0x16af0
addq $0x70, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::recycle_or_create_producer(bool, bool&)
ProducerBase* recycle_or_create_producer(bool isExplicit, bool& recycled)
	{
#ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH
		debug::DebugLock lock(implicitProdMutex);
#endif
		// Try to re-use one first
		for (auto ptr = producerListTail.load(std::memory_order_acquire); ptr != nullptr; ptr = ptr->next_prod()) {
			if (ptr->inactive.load(std::memory_order_relaxed) && ptr->isExplicit == isExplicit) {
				bool expected = true;
				if (ptr->inactive.compare_exchange_strong(expected, /* desired */ false, std::memory_order_acquire, std::memory_order_relaxed)) {
					// We caught one! It's been marked as activated, the caller can have it
					recycled = true;
					return ptr;
				}
			}
		}
		
		recycled = false;
		return add_producer(isExplicit ? static_cast<ProducerBase*>(create<ExplicitProducer>(this)) : create<ImplicitProducer>(this));
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movb %sil, %al
movq %rdi, -0x10(%rbp)
andb $0x1, %al
movb %al, -0x11(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x48(%rbp)
movl $0x2, %esi
callq 0x6080
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x28(%rbp)
je 0x134ac
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
xorl %esi, %esi
callq 0xabc0
testb $0x1, %al
jne 0x13442
jmp 0x13498
movq -0x28(%rbp), %rax
movb 0x48(%rax), %al
andb $0x1, %al
movzbl %al, %eax
movb -0x11(%rbp), %cl
andb $0x1, %cl
movzbl %cl, %ecx
cmpl %ecx, %eax
jne 0x13498
movb $0x1, -0x29(%rbp)
movq -0x28(%rbp), %rdi
addq $0x8, %rdi
addq $0x8, %rdi
leaq -0x29(%rbp), %rsi
xorl %r8d, %r8d
movl $0x2, %ecx
movl %r8d, %edx
callq 0x13580
testb $0x1, %al
jne 0x13485
jmp 0x13496
movq -0x20(%rbp), %rax
movb $0x1, (%rax)
movq -0x28(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x134f6
jmp 0x13498
jmp 0x1349a
movq -0x28(%rbp), %rdi
callq 0x6100
movq %rax, -0x28(%rbp)
jmp 0x1341e
movq -0x20(%rbp), %rax
movb $0x0, (%rax)
testb $0x1, -0x11(%rbp)
je 0x134d0
movq -0x48(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x13b20
movq %rax, -0x50(%rbp)
jmp 0x134e5
movq -0x48(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x13b80
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rdi
movq -0x50(%rbp), %rsi
callq 0x139e0
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x50, %rsp
popq %rbp
retq
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::details::_hash_32_or_64<true>::hash(unsigned long)
static inline std::uint64_t hash(std::uint64_t h)
		{
			h ^= h >> 33;
			h *= 0xff51afd7ed558ccd;
			h ^= h >> 33;
			h *= 0xc4ceb9fe1a85ec53;
			return h ^ (h >> 33);
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x21, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movabsq $-0xae502812aa7333, %rax # imm = 0xFF51AFD7ED558CCD
imulq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
shrq $0x21, %rax
xorq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movabsq $-0x3b314601e57a13ad, %rax # imm = 0xC4CEB9FE1A85EC53
imulq -0x8(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq -0x8(%rbp), %rcx
shrq $0x21, %rcx
xorq %rcx, %rax
popq %rbp
retq
nop
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::ExplicitProducer::ExplicitProducer(moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>*)
explicit ExplicitProducer(ConcurrentQueue* parent_) :
			ProducerBase(parent_, true),
			blockIndex(nullptr),
			pr_blockIndexSlotsUsed(0),
			pr_blockIndexSize(EXPLICIT_INITIAL_INDEX_SIZE >> 1),
			pr_blockIndexFront(0),
			pr_blockIndexEntries(nullptr),
			pr_blockIndexRaw(nullptr)
		{
			size_t poolBasedIndexSize = details::ceil_to_pow_2(parent_->initialBlockPoolSize) >> 1;
			if (poolBasedIndexSize > pr_blockIndexSize) {
				pr_blockIndexSize = poolBasedIndexSize;
			}
			
			new_block_index(0);		// This creates an index with double the number of current entries, i.e. EXPLICIT_INITIAL_INDEX_SIZE
		}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rdi
movq %rdi, -0x38(%rbp)
movq -0x10(%rbp), %rsi
movl $0x1, %edx
callq 0x14260
movq -0x38(%rbp), %rdi
leaq 0xfacf(%rip), %rax      # 0x23c80
movq %rax, (%rdi)
addq $0x58, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x14300
movq -0x38(%rbp), %rax
movq $0x0, 0x60(%rax)
movq $0x10, 0x68(%rax)
movq $0x0, 0x70(%rax)
movq $0x0, 0x78(%rax)
movq $0x0, 0x80(%rax)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3960
movq %rax, -0x30(%rbp)
jmp 0x14203
movq -0x38(%rbp), %rcx
movq -0x30(%rbp), %rax
shrq %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
cmpq 0x68(%rcx), %rax
jbe 0x14241
movq -0x38(%rbp), %rax
movq -0x18(%rbp), %rcx
movq %rcx, 0x68(%rax)
jmp 0x14241
movq -0x38(%rbp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x20(%rbp)
movl %eax, -0x24(%rbp)
callq 0x14c50
jmp 0x14256
movq -0x38(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x14330
jmp 0x14250
addq $0x40, %rsp
popq %rbp
retq
movq -0x20(%rbp), %rdi
callq 0x3390
nop
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: bool moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block::is_empty<(moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::InnerQueueContext)1>() const
inline bool is_empty() const
		{
			MOODYCAMEL_CONSTEXPR_IF (context == explicit_context && BLOCK_SIZE <= EXPLICIT_BLOCK_EMPTY_COUNTER_THRESHOLD) {
				// Check flags
				for (size_t i = 0; i < BLOCK_SIZE; ++i) {
					if (!emptyFlags[i].load(std::memory_order_relaxed)) {
						return false;
					}
				}
				
				// Aha, empty; make sure we have all other memory effects that happened before the empty flags were set
				std::atomic_thread_fence(std::memory_order_acquire);
				return true;
			}
			else {
				// Check counter
				if (elementsCompletelyDequeued.load(std::memory_order_relaxed) == BLOCK_SIZE) {
					std::atomic_thread_fence(std::memory_order_acquire);
					return true;
				}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq $0x0, -0x18(%rbp)
cmpq $0x20, -0x18(%rbp)
jae 0x14d93
movq -0x20(%rbp), %rdi
addq $0x410, %rdi            # imm = 0x410
addq -0x18(%rbp), %rdi
xorl %esi, %esi
callq 0xabc0
testb $0x1, %al
jne 0x14d83
movb $0x0, -0x5(%rbp)
jmp 0x14dcb
jmp 0x14d85
movq -0x18(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x18(%rbp)
jmp 0x14d5c
movl $0x2, -0x4(%rbp)
movl -0x4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x28(%rbp)
subl $0x4, %eax
ja 0x14dc7
movq -0x28(%rbp), %rax
leaq 0x354b(%rip), %rcx      # 0x18300
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
jmp 0x14dc7
jmp 0x14dc7
jmp 0x14dc7
mfence
movb $0x1, -0x5(%rbp)
movb -0x5(%rbp), %al
andb $0x1, %al
addq $0x30, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::Block* moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::requisition_block<(moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::AllocationMode)0>()
Block* requisition_block()
	{
		auto block = try_get_block_from_initial_pool();
		if (block != nullptr) {
			return block;
		}
		
		block = try_get_block_from_free_list();
		if (block != nullptr) {
			return block;
		}
		
		MOODYCAMEL_CONSTEXPR_IF (canAlloc == CanAlloc) {
			return create<Block>();
		}
		else {
			return nullptr;
		}
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq -0x10(%rbp), %rdi
movq %rdi, -0x20(%rbp)
callq 0x15f40
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x15d5e
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x15d85
movq -0x20(%rbp), %rdi
callq 0x160e0
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
je 0x15d7c
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x15d85
callq 0x16100
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nop
// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::try_get_block_from_initial_pool()
inline Block* try_get_block_from_initial_pool()
	{
		if (initialBlockPoolIndex.load(std::memory_order_relaxed) >= initialBlockPoolSize) {
			return nullptr;
		}
		
		auto index = initialBlockPoolIndex.fetch_add(1, std::memory_order_relaxed);
		
		return index < initialBlockPoolSize ? (initialBlockPool + index) : nullptr;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x90, %rsp
movq %rdi, -0x50(%rbp)
movq -0x50(%rbp), %rax
movq %rax, -0x70(%rbp)
addq $0x10, %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x34(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x68(%rbp)
movl -0x34(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x38(%rbp)
movl -0x34(%rbp), %eax
movl %eax, -0x5c(%rbp)
decl %eax
subl $0x2, %eax
jb 0x15fa4
jmp 0x15f8d
movl -0x5c(%rbp), %eax
subl $0x5, %eax
je 0x15fb1
jmp 0x15f97
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x15fbc
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
jmp 0x15fbc
movq -0x68(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x40(%rbp)
movq -0x70(%rbp), %rcx
movq -0x40(%rbp), %rax
cmpq 0x20(%rcx), %rax
jb 0x15fd7
movq $0x0, -0x48(%rbp)
jmp 0x160cb
movq -0x70(%rbp), %rax
addq $0x10, %rax
movq %rax, -0x8(%rbp)
movq $0x1, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x80(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x78(%rbp)
subl $0x4, %eax
ja 0x16026
movq -0x78(%rbp), %rax
leaq 0x22f7(%rip), %rcx      # 0x18314
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x16083
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x16083
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x16083
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x16083
movq -0x80(%rbp), %rcx
movq -0x20(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
movq -0x70(%rbp), %rcx
movq -0x28(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rax
cmpq 0x20(%rcx), %rax
jae 0x160b5
movq -0x70(%rbp), %rax
movq 0x18(%rax), %rax
imulq $0x448, -0x58(%rbp), %rcx # imm = 0x448
addq %rcx, %rax
movq %rax, -0x88(%rbp)
jmp 0x160c0
xorl %eax, %eax
movq %rax, -0x88(%rbp)
jmp 0x160c0
movq -0x88(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x48(%rbp), %rax
addq $0x90, %rsp
popq %rbp
retq
nopl (%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/main.cpp
// Function: main
int main(int argc, char *argv[]) {
    random_device rng;
    Globals::urng.seed(rng());

    // vector<int> t1,t2;
    // t1.push_back(1);
    // t1.push_back(2);
    // t1.push_back(3);
    // t1.push_back(4);
    // t1.push_back(5);
    // t1.push_back(6);

    // t2.push_back(5);
    // t2.push_back(6);
    // t2.push_back(4);
    // t2.push_back(2);
    // t2.push_back(1);
    // t2.push_back(3);
    // Globals::TOUR_SIZE = t1.size();

    // cout<<"chegou aqui?"<<endl;

    // OX::crossover(t1,t2);

    // for(int i : t1){
    //     cout<<i<<" ";
    // }cout<<endl;

    // for(int i : t2){
    //     cout<<i<<" ";
    // }cout<<endl;

    initArgs(argc,argv);

    GA();

    return 0;
}

// Assembly:
subq $0x13b8, %rsp           # imm = 0x13B8
movl $0x0, 0x13b4(%rsp)
movl %edi, 0x13b0(%rsp)
movq %rsi, 0x13a8(%rsp)
leaq 0x20(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0x9110
movq 0x8(%rsp), %rdi
callq 0x9280
movl %eax, 0x10(%rsp)
jmp 0x7170
movl 0x10(%rsp), %eax
movl %eax, %eax
movl %eax, %esi
leaq 0x95889(%rip), %rdi     # 0x9ca08
callq 0x91b0
jmp 0x7186
movl 0x13b0(%rsp), %edi
movq 0x13a8(%rsp), %rsi
callq 0x71f0
jmp 0x719c
callq 0x8a70
jmp 0x71a3
movl $0x0, 0x13b4(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x9290
movl 0x13b4(%rsp), %eax
addq $0x13b8, %rsp           # imm = 0x13B8
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x18(%rsp)
movl %eax, 0x14(%rsp)
leaq 0x20(%rsp), %rdi
callq 0x9290
movq 0x18(%rsp), %rdi
callq 0x6850
nopl (%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/GAUtils.cpp
// Function: GAUtils::init(Population&)
void GAUtils::init(Population &pop){
    //Import the map
    ImportData dataFile(Config::LIB_PATH+Config::NAME);
    Globals::map.setCityList(dataFile.getCitiesCoord());

    //Import the first population from LK
    unsigned lkPop = Config::POP_SIZE * Config::LK_PERCENTAGE; 
    unsigned fillPop = Config::POP_SIZE - lkPop;
    if (Config::LK_PERCENTAGE > 0) { 
        pop = dataFile.importFirstPopulation(Config::NAME, lkPop);
    }

    //fill the rest of the population with 2-opt
    GAUtils::fillPopulationWithReset(pop, fillPop);
}

// Assembly:
subq $0x3a8, %rsp            # imm = 0x3A8
movq %rdi, 0x3a0(%rsp)
leaq 0x92092(%rip), %rsi     # 0x9c9d8
leaq 0x9206b(%rip), %rdx     # 0x9c9b8
leaq 0x78(%rsp), %rdi
movq %rdi, 0x8(%rsp)
callq 0xfa90
movq 0x8(%rsp), %rsi
leaq 0x98(%rsp), %rdi
callq 0x1bcf0
jmp 0xa970
leaq 0x78(%rsp), %rdi
callq 0x6988
leaq 0x50(%rsp), %rdi
leaq 0x98(%rsp), %rsi
callq 0x1d700
jmp 0xa98e
leaq 0x933fb(%rip), %rdi     # 0x9dd90
leaq 0x50(%rsp), %rsi
callq 0x19720
jmp 0xa9a1
leaq 0x50(%rsp), %rdi
callq 0xfb20
leaq 0x9204e(%rip), %rax     # 0x9ca00
movl (%rax), %eax
cvtsi2sd %rax, %xmm0
leaq 0x92038(%rip), %rax     # 0x9c9f8
movsd (%rax), %xmm1
mulsd %xmm1, %xmm0
cvttsd2si %xmm0, %rax
movl %eax, 0x4c(%rsp)
leaq 0x92028(%rip), %rax     # 0x9ca00
movl (%rax), %eax
subl 0x4c(%rsp), %eax
movl %eax, 0x48(%rsp)
leaq 0x9200f(%rip), %rax     # 0x9c9f8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jbe 0xaab0
leaq 0x91fb7(%rip), %rsi     # 0x9c9b8
leaq 0x10(%rsp), %rdi
callq 0x6200
jmp 0xaa0d
movl 0x4c(%rsp), %ecx
leaq 0x30(%rsp), %rdi
leaq 0x98(%rsp), %rsi
leaq 0x10(%rsp), %rdx
callq 0x1d760
jmp 0xaa2a
movq 0x3a0(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9410
leaq 0x30(%rsp), %rdi
callq 0x9440
leaq 0x10(%rsp), %rdi
callq 0x6988
jmp 0xaab0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x78(%rsp), %rdi
callq 0x6988
jmp 0xaae5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
jmp 0xaad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x50(%rsp), %rdi
callq 0xfb20
jmp 0xaad8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x70(%rsp)
movl %eax, 0x6c(%rsp)
leaq 0x10(%rsp), %rdi
callq 0x6988
jmp 0xaad8
movq 0x3a0(%rsp), %rdi
movl 0x48(%rsp), %esi
callq 0xaaf0
jmp 0xaac3
leaq 0x98(%rsp), %rdi
callq 0xfb80
addq $0x3a8, %rsp            # imm = 0x3A8
retq
leaq 0x98(%rsp), %rdi
callq 0xfb80
movq 0x70(%rsp), %rdi
callq 0x6850
nop
// File: GAStudyGroup[P]GPX2/src/base/sources/GAUtils.cpp
// Function: GAUtils::fillPopulationWithReset(Population&, unsigned int)
void GAUtils::fillPopulationWithReset(Population &pop, unsigned popToFill) {
    for (unsigned i = 0; i < popToFill; i++) {
        vector<int> t;
        //random
        if(Config::NEW_TOUR_MODE==0 || Config::NEW_TOUR_MODE==1){
            t = Globals::map.getCityList();
            shuffle(t.begin(), t.end(),Globals::urng);
        }else{
            t = nearestNeighbor();
        }
        //apply 2-opt
        if(Config::NEW_TOUR_MODE==1 || Config::NEW_TOUR_MODE==2){
            t = Opt::optimize(t); 
        }
        
        pop.getPopulation().push_back(t);
    } 
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0xa0(%rsp)
movl %esi, 0x9c(%rsp)
movl $0x0, 0x98(%rsp)
movl 0x98(%rsp), %eax
cmpl 0x9c(%rsp), %eax
jae 0xac98
leaq 0x80(%rsp), %rdi
callq 0xfdf0
leaq 0x91dbf(%rip), %rax     # 0x9c8f8
cmpl $0x0, (%rax)
je 0xab4e
leaq 0x91db3(%rip), %rax     # 0x9c8f8
cmpl $0x1, (%rax)
jne 0xabdf
leaq 0x9323b(%rip), %rsi     # 0x9dd90
leaq 0x68(%rsp), %rdi
callq 0x195b0
jmp 0xab61
leaq 0x80(%rsp), %rdi
movq %rdi, 0x10(%rsp)
leaq 0x68(%rsp), %rsi
movq %rsi, 0x8(%rsp)
callq 0xfe00
movq 0x8(%rsp), %rdi
callq 0x9af0
movq 0x10(%rsp), %rdi
callq 0x10130
movq 0x10(%rsp), %rdi
movq %rax, 0x50(%rsp)
callq 0x10160
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
movq 0x48(%rsp), %rsi
leaq 0x91e52(%rip), %rdx     # 0x9ca08
callq 0xfe40
jmp 0xabbd
jmp 0xac07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x60(%rsp)
movl %eax, 0x5c(%rsp)
leaq 0x80(%rsp), %rdi
callq 0x9af0
jmp 0xaca0
leaq 0x30(%rsp), %rdi
callq 0xaee0
jmp 0xabeb
leaq 0x80(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0xfe00
leaq 0x30(%rsp), %rdi
callq 0x9af0
leaq 0x91cea(%rip), %rax     # 0x9c8f8
cmpl $0x1, (%rax)
je 0xac1f
leaq 0x91cde(%rip), %rax     # 0x9c8f8
cmpl $0x2, (%rax)
jne 0xac4f
leaq 0x18(%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x4c220
jmp 0xac33
leaq 0x80(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0xfe00
leaq 0x18(%rsp), %rdi
callq 0x9af0
movq 0xa0(%rsp), %rdi
callq 0x19230
movq %rax, (%rsp)
jmp 0xac62
movq (%rsp), %rdi
leaq 0x80(%rsp), %rsi
callq 0x10190
jmp 0xac75
leaq 0x80(%rsp), %rdi
callq 0x9af0
movl 0x98(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x98(%rsp)
jmp 0xab11
addq $0xa8, %rsp
retq
movq 0x60(%rsp), %rdi
callq 0x6850
nopw (%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/GAUtils.cpp
// Function: GAUtils::roulete(Population&)
vector<int> GAUtils::roulete(Population &pop){
    double sumFitness{0.0},ctrl{0.0};

    for_each(pop.getPopulation().begin(),pop.getPopulation().end(),[&sumFitness](vector<int> t){sumFitness+=(1.0/(double)getFitness(t));});    

    uniform_real_distribution<double> dist(0,sumFitness);
    ctrl = dist(Globals::urng);

    int i=0;
    for(vector<int> t : pop.getPopulation()){
        ctrl -= (1.0/(double)getFitness(t));
        if(ctrl<=0){
            return(t);
        }
        i++;
    }
    return(pop.getPopulation().back());
}

// Assembly:
subq $0xa8, %rsp
movq %rdi, 0x10(%rsp)
movq %rdi, %rax
movq %rax, 0x18(%rsp)
movq %rdi, 0xa0(%rsp)
movq %rsi, 0x98(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x90(%rsp)
xorps %xmm0, %xmm0
movsd %xmm0, 0x88(%rsp)
movq 0x98(%rsp), %rdi
callq 0x19230
movq %rax, %rdi
callq 0xfc20
movq %rax, 0x80(%rsp)
movq 0x98(%rsp), %rdi
callq 0x19230
movq %rax, %rdi
callq 0xfc50
movq %rax, 0x78(%rsp)
leaq 0x90(%rsp), %rax
movq %rax, 0x70(%rsp)
movq 0x80(%rsp), %rdi
movq 0x78(%rsp), %rsi
movq 0x70(%rsp), %rdx
callq 0xd300
movq %rax, 0x68(%rsp)
movsd 0x90(%rsp), %xmm1
leaq 0x58(%rsp), %rdi
xorps %xmm0, %xmm0
callq 0x10740
leaq 0x58(%rsp), %rdi
leaq 0x9156a(%rip), %rsi     # 0x9ca08
callq 0x10770
movsd %xmm0, 0x88(%rsp)
movl $0x0, 0x54(%rsp)
movq 0x98(%rsp), %rdi
callq 0x19230
movq %rax, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0xfc20
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rdi
callq 0xfc50
movq %rax, 0x38(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x38(%rsp), %rsi
callq 0xfc80
testb $0x1, %al
jne 0xb4fc
jmp 0xb5ca
movb $0x0, 0x37(%rsp)
leaq 0x40(%rsp), %rdi
callq 0xfcc0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xfcd0
movq 0x10(%rsp), %rdi
callq 0x1b240
movl %eax, 0xc(%rsp)
jmp 0xb528
movl 0xc(%rsp), %eax
cvtsi2sd %eax, %xmm0
movsd 0x68d78(%rip), %xmm1    # 0x742b0
divsd %xmm0, %xmm1
movsd 0x88(%rsp), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, 0x88(%rsp)
xorps %xmm0, %xmm0
ucomisd 0x88(%rsp), %xmm0
jb 0xb589
movb $0x1, 0x37(%rsp)
movl $0x1, 0x20(%rsp)
jmp 0xb59c
movq 0x10(%rsp), %rdi
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
callq 0x9af0
jmp 0xb5f9
movl 0x54(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x54(%rsp)
movl $0x0, 0x20(%rsp)
testb $0x1, 0x37(%rsp)
jne 0xb5ad
movq 0x10(%rsp), %rdi
callq 0x9af0
movl 0x20(%rsp), %eax
testl %eax, %eax
je 0xb5b9
jmp 0xb5b7
jmp 0xb5ec
jmp 0xb5bb
leaq 0x40(%rsp), %rdi
callq 0xfdd0
jmp 0xb4e4
movq 0x98(%rsp), %rdi
callq 0x19230
movq %rax, %rdi
callq 0x107a0
movq 0x10(%rsp), %rdi
movq %rax, %rsi
callq 0xfcd0
movq 0x18(%rsp), %rax
addq $0xa8, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x6850
nopw %cs:(%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/GAUtils.cpp
// Function: GAUtils::generateNewPopulation(Population&)
Population GAUtils::generateNewPopulation(Population &pop) {
    if(Config::NEW_POP_TYPE==0){
        return crossOX(pop);
    }else if(Config::NEW_POP_TYPE==1){
        return crossAllxAllwithNBestAndReset(pop);
    }else if(Config::NEW_POP_TYPE==2){
        return crossGPX2WithAntColony(pop);
    }else{
        //default
        return crossAllxAllwithNBestAndReset(pop);
    }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, %rax
movq %rax, 0x10(%rsp)
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
leaq 0x912b2(%rip), %rax     # 0x9c8e4
cmpl $0x0, (%rax)
jne 0xb648
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xb6a0
jmp 0xb691
leaq 0x91295(%rip), %rax     # 0x9c8e4
cmpl $0x1, (%rax)
jne 0xb665
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xb9a0
jmp 0xb691
leaq 0x91278(%rip), %rax     # 0x9c8e4
cmpl $0x2, (%rax)
jne 0xb682
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xbe70
jmp 0xb691
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
callq 0xb9a0
movq 0x10(%rsp), %rax
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/GAUtils.cpp
// Function: GAUtils::crossOX(Population&)
Population GAUtils::crossOX(Population &pop){
    Population newPop;
    for(vector<int> vec : elitsm(pop)){
        newPop.getPopulation().push_back(vec);
    }
    
    while(newPop.getPopulation().size()<Config::POP_SIZE){
        newPop.getPopulation().push_back(OX::crossover(roulete(pop),roulete(pop)));
    }

    return newPop;
}

// Assembly:
subq $0xf8, %rsp
movq %rdi, 0x18(%rsp)
movq %rdi, %rax
movq %rax, 0x20(%rsp)
movq %rdi, 0xf0(%rsp)
movq %rsi, 0xe8(%rsp)
movb $0x0, 0xe7(%rsp)
callq 0x19220
movq 0xe8(%rsp), %rsi
leaq 0xa8(%rsp), %rdi
callq 0x10670
jmp 0xb6e8
leaq 0xc0(%rsp), %rdi
leaq 0xa8(%rsp), %rsi
callq 0xd1f0
jmp 0xb6ff
leaq 0xa8(%rsp), %rdi
callq 0x9440
leaq 0xc0(%rsp), %rax
movq %rax, 0xd8(%rsp)
movq 0xd8(%rsp), %rdi
callq 0xfc20
movq %rax, 0x90(%rsp)
movq 0xd8(%rsp), %rdi
callq 0xfc50
movq %rax, 0x88(%rsp)
leaq 0x90(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0xfc80
testb $0x1, %al
jne 0xb7b0
leaq 0xc0(%rsp), %rdi
callq 0x9860
jmp 0xb850
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xb989
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0xa8(%rsp), %rdi
callq 0x9440
jmp 0xb989
leaq 0x90(%rsp), %rdi
callq 0xfcc0
movq %rax, %rsi
leaq 0x70(%rsp), %rdi
callq 0xfcd0
jmp 0xb7cc
movq 0x18(%rsp), %rdi
callq 0x19230
movq %rax, 0x10(%rsp)
jmp 0xb7dd
movq 0x10(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x10190
jmp 0xb7ee
leaq 0x70(%rsp), %rdi
callq 0x9af0
leaq 0x90(%rsp), %rdi
callq 0xfdd0
jmp 0xb746
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xb83e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x70(%rsp), %rdi
callq 0x9af0
leaq 0xc0(%rsp), %rdi
callq 0x9860
jmp 0xb989
jmp 0xb852
movq 0x18(%rsp), %rdi
callq 0x19230
movq %rax, 0x8(%rsp)
jmp 0xb863
movq 0x8(%rsp), %rdi
callq 0x10510
leaq 0x9118c(%rip), %rcx     # 0x9ca00
movl (%rcx), %ecx
cmpq %rcx, %rax
jae 0xb960
movq 0x18(%rsp), %rdi
callq 0x19230
movq %rax, (%rsp)
jmp 0xb88f
movq 0xe8(%rsp), %rsi
leaq 0x40(%rsp), %rdi
callq 0xb3e0
jmp 0xb8a3
movq 0xe8(%rsp), %rsi
leaq 0x28(%rsp), %rdi
callq 0xb3e0
jmp 0xb8b7
leaq 0x58(%rsp), %rdi
leaq 0x40(%rsp), %rsi
leaq 0x28(%rsp), %rdx
callq 0x72d30
jmp 0xb8cd
movq (%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x10200
jmp 0xb8dd
leaq 0x58(%rsp), %rdi
callq 0x9af0
leaq 0x28(%rsp), %rdi
callq 0x9af0
leaq 0x40(%rsp), %rdi
callq 0x9af0
jmp 0xb852
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xb954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
jmp 0xb94a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa0(%rsp)
movl %eax, 0x9c(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x9af0
leaq 0x28(%rsp), %rdi
callq 0x9af0
leaq 0x40(%rsp), %rdi
callq 0x9af0
jmp 0xb989
movb $0x1, 0xe7(%rsp)
testb $0x1, 0xe7(%rsp)
jne 0xb97c
movq 0x18(%rsp), %rdi
callq 0x9440
movq 0x20(%rsp), %rax
addq $0xf8, %rsp
retq
movq 0x18(%rsp), %rdi
callq 0x9440
movq 0xa0(%rsp), %rdi
callq 0x6850
// File: GAStudyGroup[P]GPX2/src/base/sources/Log.cpp
// Function: Log::printTime(std::ostream&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, double)
void Log::printTime(ostream &out, string txt, double milli){
    out << "\n"+txt+"\n";
    out << "\t" << milli << " milliseconds.\n";
    out << "\t" << (milli/=1000.0) << " seconds.\n";
    out << "\t" << (milli/=60.0) << " minutes.\n";
    out.flush();
}

// Assembly:
subq $0x88, %rsp
movq %rsi, %rdx
movq %rdi, 0x80(%rsp)
movq %rdx, 0x78(%rsp)
movsd %xmm0, 0x70(%rsp)
movq 0x80(%rsp), %rax
movq %rax, 0x8(%rsp)
leaq 0x5e7ed(%rip), %rsi     # 0x7584e
movq %rsi, 0x18(%rsp)
leaq 0x30(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x189f0
movq 0x10(%rsp), %rsi
movq 0x18(%rsp), %rdx
leaq 0x50(%rsp), %rdi
callq 0x186c0
jmp 0x1708b
movq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x6440
jmp 0x1709c
leaq 0x50(%rsp), %rdi
callq 0x6988
leaq 0x30(%rsp), %rdi
callq 0x6988
movq 0x80(%rsp), %rdi
leaq 0x5e934(%rip), %rsi     # 0x759f3
callq 0x64a0
movq %rax, %rdi
movsd 0x70(%rsp), %xmm0
callq 0x6900
movq %rax, %rdi
leaq 0x5d4e6(%rip), %rsi     # 0x745c2
callq 0x64a0
movq 0x80(%rsp), %rdi
leaq 0x5e903(%rip), %rsi     # 0x759f3
callq 0x64a0
movq %rax, %rdi
movsd 0x70(%rsp), %xmm0
movsd 0x5d2e2(%rip), %xmm1    # 0x743e8
divsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
callq 0x6900
movq %rax, %rdi
leaq 0x5d4b3(%rip), %rsi     # 0x745d2
callq 0x64a0
movq 0x80(%rsp), %rdi
leaq 0x5e8c0(%rip), %rsi     # 0x759f3
callq 0x64a0
movq %rax, %rdi
movsd 0x70(%rsp), %xmm0
movsd 0x5d297(%rip), %xmm1    # 0x743e0
divsd %xmm1, %xmm0
movsd %xmm0, 0x70(%rsp)
callq 0x6900
movq %rax, %rdi
leaq 0x5d47b(%rip), %rsi     # 0x745dd
callq 0x64a0
movq 0x80(%rsp), %rdi
callq 0x6340
addq $0x88, %rsp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
jmp 0x171a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x50(%rsp), %rdi
callq 0x6988
leaq 0x30(%rsp), %rdi
callq 0x6988
movq 0x28(%rsp), %rdi
callq 0x6850
nopl (%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/Log.cpp
// Function: Log::printTourFile(std::vector<int, std::allocator<int>>&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>)
void Log::printTourFile(vector<int> &tour,string name){
    string fileName{name+".txt"};
    ofstream file(fileName);

    if(file.is_open()){
        printTour(tour,file);
    }
}

// Assembly:
subq $0x258, %rsp            # imm = 0x258
movq %rdi, 0x250(%rsp)
movq %rsi, 0x248(%rsp)
leaq 0x5d40a(%rip), %rdx     # 0x745e8
leaq 0x228(%rsp), %rdi
movq %rdi, 0x10(%rsp)
callq 0x18b20
movq 0x10(%rsp), %rsi
leaq 0x28(%rsp), %rdi
movl $0x10, %edx
callq 0x6920
jmp 0x17206
leaq 0x28(%rsp), %rdi
callq 0x63b0
movb %al, 0xf(%rsp)
jmp 0x17216
movb 0xf(%rsp), %al
testb $0x1, %al
jne 0x17220
jmp 0x17260
movq 0x250(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x1b360
jmp 0x17234
jmp 0x17260
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
jmp 0x1727f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x6710
jmp 0x1727f
leaq 0x28(%rsp), %rdi
callq 0x6710
leaq 0x228(%rsp), %rdi
callq 0x6988
addq $0x258, %rsp            # imm = 0x258
retq
leaq 0x228(%rsp), %rdi
callq 0x6988
movq 0x20(%rsp), %rdi
callq 0x6850
nopw %cs:(%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/Population.cpp
// Function: Population::bestFitness()
int Population::bestFitness()
{
    int min = numeric_limits<int>::max(), fitness{ 0 };
    for (vector<int> t : population) {
        fitness = getFitness(t); 
        if (min > fitness) {
            min = fitness;
        }
    }
    return (min);
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x60(%rsp)
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rsp)
callq 0x19530
movl %eax, %ecx
movq 0x10(%rsp), %rax
movl %ecx, 0x5c(%rsp)
movl $0x0, 0x58(%rsp)
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rdi
callq 0xfc20
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rdi
callq 0xfc50
movq %rax, 0x40(%rsp)
leaq 0x48(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq 0xfc80
testb $0x1, %al
jne 0x192a3
jmp 0x1931c
leaq 0x48(%rsp), %rdi
callq 0xfcc0
movq %rax, %rsi
leaq 0x28(%rsp), %rdi
movq %rdi, (%rsp)
callq 0xfcd0
movq (%rsp), %rdi
callq 0x1b240
movl %eax, 0xc(%rsp)
jmp 0x192cd
movl 0xc(%rsp), %eax
movl %eax, 0x58(%rsp)
movl 0x5c(%rsp), %eax
cmpl 0x58(%rsp), %eax
jle 0x19303
movl 0x58(%rsp), %eax
movl %eax, 0x5c(%rsp)
jmp 0x19303
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x20(%rsp)
movl %eax, 0x1c(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x9af0
jmp 0x19325
leaq 0x28(%rsp), %rdi
callq 0x9af0
leaq 0x48(%rsp), %rdi
callq 0xfdd0
jmp 0x1928e
movl 0x5c(%rsp), %eax
addq $0x68, %rsp
retq
movq 0x20(%rsp), %rdi
callq 0x6850
nop
// File: GAStudyGroup[P]GPX2/src/base/sources/Population.cpp
// Function: Population::getBestTour()
vector<int>& Population::getBestTour(){
    int min = numeric_limits<int>::max(), fitness{ 0 },index{-1};
    for(unsigned i=0;i<population.size();i++){
        fitness = getFitness(population[i]);
        if(min>fitness){
            min = fitness;
            index = i;
        }
    }
    return (population[index]);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rax
movq %rax, 0x8(%rsp)
callq 0x19530
movl %eax, 0x1c(%rsp)
movl $0x0, 0x18(%rsp)
movl $0xffffffff, 0x14(%rsp) # imm = 0xFFFFFFFF
movl $0x0, 0x10(%rsp)
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %eax
movq %rax, (%rsp)
callq 0x10510
movq %rax, %rcx
movq (%rsp), %rax
cmpq %rcx, %rax
jae 0x193c7
movq 0x8(%rsp), %rdi
movl 0x10(%rsp), %eax
movl %eax, %esi
callq 0x10230
movq %rax, %rdi
callq 0x1b240
movl %eax, 0x18(%rsp)
movl 0x1c(%rsp), %eax
cmpl 0x18(%rsp), %eax
jle 0x193b8
movl 0x18(%rsp), %eax
movl %eax, 0x1c(%rsp)
movl 0x10(%rsp), %eax
movl %eax, 0x14(%rsp)
jmp 0x193ba
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x19364
movq 0x8(%rsp), %rdi
movslq 0x14(%rsp), %rsi
callq 0x10230
addq $0x28, %rsp
retq
nopl (%rax,%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/Population.cpp
// Function: operator<<(std::ostream&, Population&)
ostream& operator<<(ostream& output, Population& pop)
{ // Overload de operador para impressão da população
    int i{ 0 };
    for (vector<int> t : pop.getPopulation()) {
        // output << "Tour " << i << "\n";
        // printTour(t,output);
        output<<"Tour "<<i<<" "<<getFitness(t);
        output<<"\n";
        ++i;
    }
    return (output);
}

// Assembly:
subq $0x78, %rsp
movq %rdi, 0x70(%rsp)
movq %rsi, 0x68(%rsp)
movl $0x0, 0x64(%rsp)
movq 0x68(%rsp), %rdi
callq 0x19230
movq %rax, 0x58(%rsp)
movq 0x58(%rsp), %rdi
callq 0xfc20
movq %rax, 0x50(%rsp)
movq 0x58(%rsp), %rdi
callq 0xfc50
movq %rax, 0x48(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x48(%rsp), %rsi
callq 0xfc80
testb $0x1, %al
jne 0x1943b
jmp 0x19508
leaq 0x50(%rsp), %rdi
callq 0xfcc0
movq %rax, %rsi
leaq 0x30(%rsp), %rdi
callq 0xfcd0
movq 0x70(%rsp), %rdi
leaq 0x5b25b(%rip), %rsi     # 0x746b9
callq 0x64a0
movq %rax, 0x18(%rsp)
jmp 0x1946a
movq 0x18(%rsp), %rdi
movl 0x64(%rsp), %esi
callq 0x6820
movq %rax, 0x10(%rsp)
jmp 0x1947f
movq 0x10(%rsp), %rdi
leaq 0x5aec9(%rip), %rsi     # 0x74354
callq 0x64a0
movq %rax, 0x8(%rsp)
jmp 0x19497
leaq 0x30(%rsp), %rdi
callq 0x1b240
movl %eax, 0x4(%rsp)
jmp 0x194a7
movl 0x4(%rsp), %esi
movq 0x8(%rsp), %rdi
callq 0x6820
jmp 0x194b7
movq 0x70(%rsp), %rdi
leaq 0x5c38b(%rip), %rsi     # 0x7584e
callq 0x64a0
jmp 0x194ca
movl 0x64(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x64(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x9af0
leaq 0x50(%rsp), %rdi
callq 0xfdd0
jmp 0x19423
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0x28(%rsp)
movl %eax, 0x24(%rsp)
leaq 0x30(%rsp), %rdi
callq 0x9af0
jmp 0x19512
movq 0x70(%rsp), %rax
addq $0x78, %rsp
retq
movq 0x28(%rsp), %rdi
callq 0x6850
nopl (%rax)
// File: GAStudyGroup[P]GPX2/src/base/sources/Coordinates.cpp
// Function: Coordinates::getCityById(int)
City Coordinates::getCityById(const int id)
{
    auto it = find_if(cityList.begin(), cityList.end(), [&id](const City& obj) { return (obj.getId() == id); });
    if (it != cityList.end()) {
        return (*it);
    } else {
        return (City());
    }
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x8(%rsp)
movq %rdi, 0x10(%rsp)
movq %rsi, 0x50(%rsp)
movl %edx, 0x4c(%rsp)
movq 0x50(%rsp), %rdi
movq %rdi, 0x18(%rsp)
callq 0x19cf0
movq 0x18(%rsp), %rdi
movq %rax, 0x38(%rsp)
callq 0x19d20
movq %rax, 0x30(%rsp)
leaq 0x4c(%rsp), %rax
movq %rax, 0x28(%rsp)
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
movq 0x28(%rsp), %rdx
callq 0x19800
movq 0x18(%rsp), %rdi
movq %rax, 0x40(%rsp)
callq 0x19d20
movq %rax, 0x20(%rsp)
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x1a040
testb $0x1, %al
jne 0x197c1
jmp 0x197eb
leaq 0x40(%rsp), %rdi
callq 0x1a080
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq (%rcx), %rdx
movq %rdx, (%rax)
movq 0x8(%rcx), %rdx
movq %rdx, 0x8(%rax)
movq 0x10(%rcx), %rcx
movq %rcx, 0x10(%rax)
jmp 0x197f5
movq 0x8(%rsp), %rdi
callq 0x1bae0
movq 0x10(%rsp), %rax
addq $0x58, %rsp
retq
nop
// File: GAStudyGroup[P]GPX2/src/base/sources/Utils.cpp
// Function: getFitness(std::vector<int, std::allocator<int>> const&)
int getFitness(const vector<int> &t)
{ // Calculate fitness of tour
    int sum{0};
    unsigned size{(unsigned)t.size()};
    for(unsigned i=0; i<size; i++){
        sum += distance(t[i], t[(i+1)%size]);
    }
    return(sum);
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movl $0x0, 0xc(%rsp)
movq 0x10(%rsp), %rdi
callq 0x107e0
movl %eax, 0x8(%rsp)
movl $0x0, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x8(%rsp), %eax
jae 0x1b2c0
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %eax
movl %eax, %esi
callq 0x1ba50
movl (%rax), %eax
movl %eax, (%rsp)
movq 0x10(%rsp), %rdi
movl 0x4(%rsp), %eax
addl $0x1, %eax
xorl %edx, %edx
divl 0x8(%rsp)
movl %edx, %eax
movl %eax, %esi
callq 0x1ba50
movl (%rsp), %edi
movl (%rax), %esi
callq 0x1b2d0
addl 0xc(%rsp), %eax
movl %eax, 0xc(%rsp)
movl 0x4(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x4(%rsp)
jmp 0x1b267
movl 0xc(%rsp), %eax
addq $0x18, %rsp
retq
nopl (%rax)