// File: HQarroum[P]thread-pool/examples/one-producer-many-consumers/./../../includes/concurrent_queue.hpp
// Function: moodycamel::ConcurrentQueue<std::function<void ()>, moodycamel::ConcurrentQueueDefaultTraits>::get_or_add_implicit_producer()
ImplicitProducer* get_or_add_implicit_producer()
	{
		// Note that since the data is essentially thread-local (key is thread ID),
		// there's a reduced need for fences (memory ordering is already consistent
		// for any individual thread), except for the current table itself.
		
		// Start by looking for the thread ID in the current and all previous hash tables.
		// If it's not found, it must not be in there yet, since this same thread would
		// have added it previously to one of the tables that we traversed.
		
		// Code and algorithm adapted from http://preshing.com/20130605/the-worlds-simplest-lock-free-hash-table
		
#ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH
		debug::DebugLock lock(implicitProdMutex);
#endif
		
		auto id = details::thread_id();
		auto hashedId = details::hash_thread_id(id);
		
		auto mainHash = implicitProducerHash.load(std::memory_order_acquire);
		assert(mainHash != nullptr);  // silence clang-tidy and MSVC warnings (hash cannot be null)
		for (auto hash = mainHash; hash != nullptr; hash = hash->prev) {
			// Look for the id in this hash
			auto index = hashedId;
			while (true) {		// Not an infinite loop because at least one slot is free in the hash table
				index &= hash->capacity - 1;
				
				auto probedKey = hash->entries[index].key.load(std::memory_order_relaxed);
				if (probedKey == id) {
					// Found it! If we had to search several hashes deep, though, we should lazily add it
					// to the current main hash table to avoid the extended search next time.
					// Note there's guaranteed to be room in the current hash table since every subsequent
					// table implicitly reserves space for all previous tables (there's only one
					// implicitProducerHashCount).
					auto value = hash->entries[index].value;
					if (hash != mainHash) {
						index = hashedId;
						while (true) {
							index &= mainHash->capacity - 1;
							probedKey = mainHash->entries[index].key.load(std::memory_order_relaxed);
							auto empty = details::invalid_thread_id;
#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED
							auto reusable = details::invalid_thread_id2;
							if ((probedKey == empty    && mainHash->entries[index].key.compare_exchange_strong(empty,    id, std::memory_order_relaxed, std::memory_order_relaxed)) ||
								(probedKey == reusable && mainHash->entries[index].key.compare_exchange_strong(reusable, id, std::memory_order_acquire, std::memory_order_acquire))) {
#else
							if ((probedKey == empty    && mainHash->entries[index].key.compare_exchange_strong(empty,    id, std::memory_order_relaxed, std::memory_order_relaxed))) {
#endif
								mainHash->entries[index].value = value;
								break;
							}
							++index;
						}
					}
					
					return value;
				}
				if (probedKey == details::invalid_thread_id) {
					break;		// Not in this hash table
				}
				++index;
			}
		}
		
		// Insert!
		auto newCount = 1 + implicitProducerHashCount.fetch_add(1, std::memory_order_relaxed);
		while (true) {
			// NOLINTNEXTLINE(clang-analyzer-core.NullDereference)
			if (newCount >= (mainHash->capacity >> 1) && !implicitProducerHashResizeInProgress.test_and_set(std::memory_order_acquire)) {
				// We've acquired the resize lock, try to allocate a bigger hash table.
				// Note the acquire fence synchronizes with the release fence at the end of this block, and hence when
				// we reload implicitProducerHash it must be the most recent version (it only gets changed within this
				// locked block).
				mainHash = implicitProducerHash.load(std::memory_order_acquire);
				if (newCount >= (mainHash->capacity >> 1)) {
					auto newCapacity = mainHash->capacity << 1;
					while (newCount >= (newCapacity >> 1)) {
						newCapacity <<= 1;
					}
					auto raw = static_cast<char*>((Traits::malloc)(sizeof(ImplicitProducerHash) + std::alignment_of<ImplicitProducerKVP>::value - 1 + sizeof(ImplicitProducerKVP) * newCapacity));
					if (raw == nullptr) {
						// Allocation failed
						implicitProducerHashCount.fetch_sub(1, std::memory_order_relaxed);
						implicitProducerHashResizeInProgress.clear(std::memory_order_relaxed);
						return nullptr;
					}
					
					auto newHash = new (raw) ImplicitProducerHash;
					newHash->capacity = static_cast<size_t>(newCapacity);
					newHash->entries = reinterpret_cast<ImplicitProducerKVP*>(details::align_for<ImplicitProducerKVP>(raw + sizeof(ImplicitProducerHash)));
					for (size_t i = 0; i != newCapacity; ++i) {
						new (newHash->entries + i) ImplicitProducerKVP;
						newHash->entries[i].key.store(details::invalid_thread_id, std::memory_order_relaxed);
					}
					newHash->prev = mainHash;
					implicitProducerHash.store(newHash, std::memory_order_release);
					implicitProducerHashResizeInProgress.clear(std::memory_order_release);
					mainHash = newHash;
				}
				else {
					implicitProducerHashResizeInProgress.clear(std::memory_order_release);
				}
			}
			
			// If it's < three-quarters full, add to the old one anyway so that we don't have to wait for the next table
			// to finish being allocated by another thread (and if we just finished allocating above, the condition will
			// always be true)
			if (newCount < (mainHash->capacity >> 1) + (mainHash->capacity >> 2)) {
				bool recycled;
				auto producer = static_cast<ImplicitProducer*>(recycle_or_create_producer(false, recycled));
				if (producer == nullptr) {
					implicitProducerHashCount.fetch_sub(1, std::memory_order_relaxed);
					return nullptr;
				}
				if (recycled) {
					implicitProducerHashCount.fetch_sub(1, std::memory_order_relaxed);
				}
				
#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED
				producer->threadExitListener.callback = &ConcurrentQueue::implicit_producer_thread_exited_callback;
				producer->threadExitListener.userData = producer;
				details::ThreadExitNotifier::subscribe(&producer->threadExitListener);
#endif
				
				auto index = hashedId;
				while (true) {
					index &= mainHash->capacity - 1;
					auto probedKey = mainHash->entries[index].key.load(std::memory_order_relaxed);
					
					auto empty = details::invalid_thread_id;
#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED
					auto reusable = details::invalid_thread_id2;
					if ((probedKey == empty    && mainHash->entries[index].key.compare_exchange_strong(empty,    id, std::memory_order_relaxed, std::memory_order_relaxed)) ||
						(probedKey == reusable && mainHash->entries[index].key.compare_exchange_strong(reusable, id, std::memory_order_acquire, std::memory_order_acquire))) {
#else
					if ((probedKey == empty    && mainHash->entries[index].key.compare_exchange_strong(empty,    id, std::memory_order_relaxed, std::memory_order_relaxed))) {
#endif
						mainHash->entries[index].value = producer;
						break;
					}
					++index;
				}
				return producer;
			}
			
			// Hmm, the old hash is quite full and somebody else is busy allocating a new one.
			// We need to wait for the allocating thread to finish (if it succeeds, we add, if not,
			// we try to allocate ourselves).
			mainHash = implicitProducerHash.load(std::memory_order_acquire);
		}
	}
	
#ifdef MOODYCAMEL_CPP11_THREAD_LOCAL_SUPPORTED
	void implicit_producer_thread_exited(ImplicitProducer* producer)
	{
		// Remove from thread exit listeners
		details::ThreadExitNotifier::unsubscribe(&producer->threadExitListener);
		
		// Remove from hash
#ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH
		debug::DebugLock lock(implicitProdMutex);
#endif
		auto hash = implicitProducerHash.load(std::memory_order_acquire);
		assert(hash != nullptr);		// The thread exit listener is only registered if we were added to a hash in the first place
		auto id = details::thread_id();
		auto hashedId = details::hash_thread_id(id);
		details::thread_id_t probedKey;
		
		// We need to traverse all the hashes just in case other threads aren't on the current one yet and are
		// trying to add an entry thinking there's a free slot (because they reused a producer)
		for (; hash != nullptr; hash = hash->prev) {
			auto index = hashedId;
			do {
				index &= hash->capacity - 1;
				probedKey = hash->entries[index].key.load(std::memory_order_relaxed);
				if (probedKey == id) {
					hash->entries[index].key.store(details::invalid_thread_id2, std::memory_order_release);
					break;
				}
				++index;
			} while (probedKey != details::invalid_thread_id);		// Can happen if the hash has changed but we weren't put back in it yet, or if we weren't added to this hash in the first place
		}
		
		// Mark the queue as being recyclable
		producer->inactive.store(true, std::memory_order_release);
	}
	
	static void implicit_producer_thread_exited_callback(void* userData)
	{
		auto producer = static_cast<ImplicitProducer*>(userData);
		auto queue = producer->parent;
		queue->implicit_producer_thread_exited(producer);
	}
#endif
	
	//////////////////////////////////
	// Utility functions
	//////////////////////////////////

	template<typename TAlign>
	static inline void* aligned_malloc(size_t size)
	{
		MOODYCAMEL_CONSTEXPR_IF (std::alignment_of<TAlign>::value <= std::alignment_of<details::max_align_t>::value)
			return (Traits::malloc)(size);
		else {
			size_t alignment = std::alignment_of<TAlign>::value;
			void* raw = (Traits::malloc)(size + alignment - 1 + sizeof(void*));
			if (!raw)
				return nullptr;
			char* ptr = details::align_for<TAlign>(reinterpret_cast<char*>(raw) + sizeof(void*));
			*(reinterpret_cast<void**>(ptr) - 1) = raw;
			return ptr;
		}
	}

	template<typename TAlign>
	static inline void aligned_free(void* ptr)
	{
		MOODYCAMEL_CONSTEXPR_IF (std::alignment_of<TAlign>::value <= std::alignment_of<details::max_align_t>::value)
			return (Traits::free)(ptr);
		else
			(Traits::free)(ptr ? *(reinterpret_cast<void**>(ptr) - 1) : nullptr);
	}

	template<typename U>
	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;
	}

	template<typename U>
	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);
	}

	template<typename U>
	static inline U* create()
	{
		void* p = aligned_malloc<U>(sizeof(U));
		return p != nullptr ? new (p) U : nullptr;
	}

	template<typename U, typename A1>
	static inline U* create(A1&& a1)
	{
		void* p = aligned_malloc<U>(sizeof(U));
		return p != nullptr ? new (p) U(std::forward<A1>(a1)) : nullptr;
	}

	template<typename U>
	static inline void destroy(U* p)
	{
		if (p != nullptr)
			p->~U();
		aligned_free<U>(p);
	}

private:
	std::atomic<ProducerBase*> producerListTail;
	std::atomic<std::uint32_t> producerCount;
	
	std::atomic<size_t> initialBlockPoolIndex;
	Block* initialBlockPool;
	size_t initialBlockPoolSize;
	
#ifndef MCDBGQ_USEDEBUGFREELIST
	FreeList<Block> freeList;
#else
	debug::DebugFreeList<Block> freeList;
#endif
	
	std::atomic<ImplicitProducerHash*> implicitProducerHash;
	std::atomic<size_t> implicitProducerHashCount;		// Number of slots logically used
	ImplicitProducerHash initialImplicitProducerHash;
	std::array<ImplicitProducerKVP, INITIAL_IMPLICIT_PRODUCER_HASH_SIZE> initialImplicitProducerHashEntries;
	std::atomic_flag implicitProducerHashResizeInProgress;
	
	std::atomic<std::uint32_t> nextExplicitConsumerId;
	std::atomic<std::uint32_t> globalExplicitConsumerOffset;
	
#ifdef MCDBGQ_NOLOCKFREE_IMPLICITPRODHASH
	debug::DebugMutex implicitProdMutex;
#endif
	
#ifdef MOODYCAMEL_QUEUE_INTERNAL_DEBUG
	std::atomic<ExplicitProducer*> explicitProducers;
	std::atomic<ImplicitProducer*> implicitProducers;
#endif
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x540, %rsp            # imm = 0x540
movq %rdi, -0x1b8(%rbp)
movq -0x1b8(%rbp), %rax
movq %rax, -0x250(%rbp)
callq 0x133d0
movq %rax, -0x1c0(%rbp)
movq -0x1c0(%rbp), %rdi
callq 0x3900
movq -0x250(%rbp), %rdi
movq %rax, -0x1c8(%rbp)
addq $0x30, %rdi
movl $0x2, %esi
callq 0x6170
movq %rax, -0x1d0(%rbp)
cmpq $0x0, -0x1d0(%rbp)
je 0x115d7
jmp 0x115f6
leaq 0x75c6(%rip), %rdi      # 0x18ba4
leaq 0x6dc1(%rip), %rsi      # 0x183a6
movl $0xd42, %edx            # imm = 0xD42
leaq 0x75c7(%rip), %rcx      # 0x18bb8
callq 0x3180
movq -0x1d0(%rbp), %rax
movq %rax, -0x1d8(%rbp)
cmpq $0x0, -0x1d8(%rbp)
je 0x11f89
movq -0x1c8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rax
movq (%rax), %rcx
decq %rcx
movq -0x1e0(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x1e0(%rbp)
movq -0x1d8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x1e0(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x118(%rbp)
movl $0x0, -0x11c(%rbp)
movq -0x118(%rbp), %rax
movq %rax, -0x260(%rbp)
movl -0x11c(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x120(%rbp)
movl -0x11c(%rbp), %eax
movl %eax, -0x254(%rbp)
decl %eax
subl $0x2, %eax
jb 0x116c1
jmp 0x116a1
movl -0x254(%rbp), %eax
subl $0x5, %eax
je 0x116d4
jmp 0x116ae
movq -0x260(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x128(%rbp)
jmp 0x116e5
movq -0x260(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x128(%rbp)
jmp 0x116e5
movq -0x260(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x128(%rbp)
movq -0x128(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq -0x1e8(%rbp), %rax
cmpq -0x1c0(%rbp), %rax
jne 0x11f4d
movq -0x1d8(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x1e0(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq 0x8(%rax), %rax
movq %rax, -0x1f0(%rbp)
movq -0x1d8(%rbp), %rax
cmpq -0x1d0(%rbp), %rax
je 0x11f3a
movq -0x1c8(%rbp), %rax
movq %rax, -0x1e0(%rbp)
movq -0x1d0(%rbp), %rax
movq (%rax), %rcx
decq %rcx
movq -0x1e0(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x1e0(%rbp)
movq -0x1d0(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x1e0(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x130(%rbp)
movl $0x0, -0x134(%rbp)
movq -0x130(%rbp), %rax
movq %rax, -0x270(%rbp)
movl -0x134(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x138(%rbp)
movl -0x134(%rbp), %eax
movl %eax, -0x264(%rbp)
decl %eax
subl $0x2, %eax
jb 0x117ee
jmp 0x117ce
movl -0x264(%rbp), %eax
subl $0x5, %eax
je 0x11801
jmp 0x117db
movq -0x270(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x140(%rbp)
jmp 0x11812
movq -0x270(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x140(%rbp)
jmp 0x11812
movq -0x270(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x1e8(%rbp)
movq $0x0, -0x1f8(%rbp)
movq -0x1e8(%rbp), %rax
cmpq -0x1f8(%rbp), %rax
jne 0x11f21
movq -0x1d0(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x1e0(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x1c0(%rbp), %rax
movq %rcx, -0x80(%rbp)
leaq -0x1f8(%rbp), %rcx
movq %rcx, -0x88(%rbp)
movq %rax, -0x90(%rbp)
movl $0x0, -0x94(%rbp)
movl $0x0, -0x98(%rbp)
movq -0x80(%rbp), %rax
movq %rax, -0x290(%rbp)
movl -0x94(%rbp), %eax
movq -0x88(%rbp), %rcx
movq %rcx, -0x288(%rbp)
movq -0x90(%rbp), %rcx
movq %rcx, -0xa0(%rbp)
movl -0x98(%rbp), %ecx
movl %ecx, -0x27c(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x278(%rbp)
subl $0x4, %eax
ja 0x118ec
movq -0x278(%rbp), %rax
leaq 0x69cd(%rip), %rcx      # 0x182b0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x27c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x119e9
jmp 0x118ff
movl -0x27c(%rbp), %eax
subl $0x5, %eax
je 0x11a1f
jmp 0x119af
movl -0x27c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x11af7
jmp 0x11926
movl -0x27c(%rbp), %eax
subl $0x5, %eax
je 0x11b2d
jmp 0x11abd
movl -0x27c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x11c05
jmp 0x1194d
movl -0x27c(%rbp), %eax
subl $0x5, %eax
je 0x11c3b
jmp 0x11bcb
movl -0x27c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x11d13
jmp 0x11974
movl -0x27c(%rbp), %eax
subl $0x5, %eax
je 0x11d49
jmp 0x11cd9
movl -0x27c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x11e21
jmp 0x1199b
movl -0x27c(%rbp), %eax
subl $0x5, %eax
je 0x11e57
jmp 0x11de7
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x299(%rbp)
movq %rcx, -0x298(%rbp)
testb $0x1, %al
jne 0x11a6b
jmp 0x11a5a
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x2a9(%rbp)
movq %rcx, -0x2a8(%rbp)
testb $0x1, %al
jne 0x11a8c
jmp 0x11a7b
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x2b9(%rbp)
movq %rcx, -0x2b8(%rbp)
testb $0x1, %al
jne 0x11aad
jmp 0x11a9c
jmp 0x11ef2
movq -0x288(%rbp), %rax
movq -0x298(%rbp), %rcx
movq %rcx, (%rax)
movb -0x299(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11a55
movq -0x288(%rbp), %rax
movq -0x2a8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x2a9(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11a55
movq -0x288(%rbp), %rax
movq -0x2b8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x2b9(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11a55
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x2c9(%rbp)
movq %rcx, -0x2c8(%rbp)
testb $0x1, %al
jne 0x11b79
jmp 0x11b68
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x2d9(%rbp)
movq %rcx, -0x2d8(%rbp)
testb $0x1, %al
jne 0x11b9a
jmp 0x11b89
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x2e9(%rbp)
movq %rcx, -0x2e8(%rbp)
testb $0x1, %al
jne 0x11bbb
jmp 0x11baa
jmp 0x11ef2
movq -0x288(%rbp), %rax
movq -0x2c8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x2c9(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11b63
movq -0x288(%rbp), %rax
movq -0x2d8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x2d9(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11b63
movq -0x288(%rbp), %rax
movq -0x2e8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x2e9(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11b63
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x2f9(%rbp)
movq %rcx, -0x2f8(%rbp)
testb $0x1, %al
jne 0x11c87
jmp 0x11c76
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x309(%rbp)
movq %rcx, -0x308(%rbp)
testb $0x1, %al
jne 0x11ca8
jmp 0x11c97
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x319(%rbp)
movq %rcx, -0x318(%rbp)
testb $0x1, %al
jne 0x11cc9
jmp 0x11cb8
jmp 0x11ef2
movq -0x288(%rbp), %rax
movq -0x2f8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x2f9(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11c71
movq -0x288(%rbp), %rax
movq -0x308(%rbp), %rcx
movq %rcx, (%rax)
movb -0x309(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11c71
movq -0x288(%rbp), %rax
movq -0x318(%rbp), %rcx
movq %rcx, (%rax)
movb -0x319(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11c71
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x329(%rbp)
movq %rcx, -0x328(%rbp)
testb $0x1, %al
jne 0x11d95
jmp 0x11d84
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x339(%rbp)
movq %rcx, -0x338(%rbp)
testb $0x1, %al
jne 0x11db6
jmp 0x11da5
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x349(%rbp)
movq %rcx, -0x348(%rbp)
testb $0x1, %al
jne 0x11dd7
jmp 0x11dc6
jmp 0x11ef2
movq -0x288(%rbp), %rax
movq -0x328(%rbp), %rcx
movq %rcx, (%rax)
movb -0x329(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11d7f
movq -0x288(%rbp), %rax
movq -0x338(%rbp), %rcx
movq %rcx, (%rax)
movb -0x339(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11d7f
movq -0x288(%rbp), %rax
movq -0x348(%rbp), %rcx
movq %rcx, (%rax)
movb -0x349(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11d7f
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x359(%rbp)
movq %rcx, -0x358(%rbp)
testb $0x1, %al
jne 0x11ea0
jmp 0x11e8f
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x369(%rbp)
movq %rcx, -0x368(%rbp)
testb $0x1, %al
jne 0x11ec1
jmp 0x11eb0
movq -0x290(%rbp), %rcx
movq -0x288(%rbp), %rax
movq (%rax), %rax
movq -0xa0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x379(%rbp)
movq %rcx, -0x378(%rbp)
testb $0x1, %al
jne 0x11ee2
jmp 0x11ed1
jmp 0x11ef2
movq -0x288(%rbp), %rax
movq -0x358(%rbp), %rcx
movq %rcx, (%rax)
movb -0x359(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11e8d
movq -0x288(%rbp), %rax
movq -0x368(%rbp), %rcx
movq %rcx, (%rax)
movb -0x369(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11e8d
movq -0x288(%rbp), %rax
movq -0x378(%rbp), %rcx
movq %rcx, (%rax)
movb -0x379(%rbp), %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
jmp 0x11e8d
testb $0x1, -0xa1(%rbp)
je 0x11f21
movq -0x1f0(%rbp), %rcx
movq -0x1d0(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x1e0(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x11f38
movq -0x1e0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1e0(%rbp)
jmp 0x1174d
jmp 0x11f3a
movq -0x1f0(%rbp), %rax
movq %rax, -0x1b0(%rbp)
jmp 0x130b9
cmpq $0x0, -0x1e8(%rbp)
jne 0x11f59
jmp 0x11f70
movq -0x1e0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x1e0(%rbp)
jmp 0x11620
jmp 0x11f72
movq -0x1d8(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x1d8(%rbp)
jmp 0x11604
movq -0x250(%rbp), %rax
addq $0x38, %rax
movq %rax, -0xf0(%rbp)
movq $0x1, -0xf8(%rbp)
movl $0x0, -0xfc(%rbp)
movq -0xf0(%rbp), %rax
movq %rax, -0x390(%rbp)
movl -0xfc(%rbp), %eax
movq -0xf8(%rbp), %rcx
movq %rcx, -0x108(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x388(%rbp)
subl $0x4, %eax
ja 0x11ff9
movq -0x388(%rbp), %rax
leaq 0x6248(%rip), %rcx      # 0x18238
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x390(%rbp), %rcx
movq -0x108(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x12083
movq -0x390(%rbp), %rcx
movq -0x108(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x12083
movq -0x390(%rbp), %rcx
movq -0x108(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x12083
movq -0x390(%rbp), %rcx
movq -0x108(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x110(%rbp)
jmp 0x12083
movq -0x390(%rbp), %rcx
movq -0x108(%rbp), %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x110(%rbp)
movq -0x110(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x200(%rbp)
movq -0x200(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jb 0x12668
movq -0x250(%rbp), %rax
addq $0x258, %rax            # imm = 0x258
movq %rax, -0xe0(%rbp)
movl $0x2, -0xe4(%rbp)
movq -0xe0(%rbp), %rax
movq %rax, -0x3a0(%rbp)
movl -0xe4(%rbp), %eax
decl %eax
movl %eax, %ecx
movq %rcx, -0x398(%rbp)
subl $0x4, %eax
ja 0x1210b
movq -0x398(%rbp), %rax
leaq 0x614a(%rip), %rcx      # 0x1824c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x3a0(%rbp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, -0x3a1(%rbp)
jmp 0x12168
movq -0x3a0(%rbp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, -0x3a1(%rbp)
jmp 0x12168
movq -0x3a0(%rbp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, -0x3a1(%rbp)
jmp 0x12168
movq -0x3a0(%rbp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, -0x3a1(%rbp)
jmp 0x12168
movq -0x3a0(%rbp), %rcx
movb $0x1, %al
xchgb %al, (%rcx)
movb %al, -0x3a1(%rbp)
movb -0x3a1(%rbp), %al
cmpb $0x0, %al
jne 0x12668
movq -0x250(%rbp), %rdi
addq $0x30, %rdi
movl $0x2, %esi
callq 0x6170
movq %rax, -0x1d0(%rbp)
movq -0x200(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
cmpq %rcx, %rax
jb 0x125c7
movq -0x1d0(%rbp), %rax
movq (%rax), %rax
shlq %rax
movq %rax, -0x208(%rbp)
movq -0x200(%rbp), %rax
movq -0x208(%rbp), %rcx
shrq %rcx
cmpq %rcx, %rax
jb 0x121ec
movq -0x208(%rbp), %rax
shlq %rax
movq %rax, -0x208(%rbp)
jmp 0x121c3
movq -0x208(%rbp), %rdi
shlq $0x4, %rdi
addq $0x1f, %rdi
callq 0x5b10
movq %rax, -0x210(%rbp)
cmpq $0x0, -0x210(%rbp)
jne 0x12398
movq -0x250(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x8(%rbp)
movq $0x1, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x3b8(%rbp)
movl -0x14(%rbp), %eax
movq -0x10(%rbp), %rcx
movq %rcx, -0x20(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x3b0(%rbp)
subl $0x4, %eax
ja 0x12270
movq -0x3b0(%rbp), %rax
leaq 0x5ff9(%rip), %rcx      # 0x18260
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x3b8(%rbp), %rcx
movq -0x20(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x122eb
movq -0x3b8(%rbp), %rcx
movq -0x20(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x122eb
movq -0x3b8(%rbp), %rcx
movq -0x20(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x122eb
movq -0x3b8(%rbp), %rcx
movq -0x20(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
jmp 0x122eb
movq -0x3b8(%rbp), %rcx
movq -0x20(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x28(%rbp)
movq -0x250(%rbp), %rax
addq $0x258, %rax            # imm = 0x258
movq %rax, -0x180(%rbp)
movl $0x0, -0x184(%rbp)
movq -0x180(%rbp), %rax
movq %rax, -0x3c8(%rbp)
movl -0x184(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x3bc(%rbp)
jmp 0x1232f
movl -0x3bc(%rbp), %eax
movl %eax, -0x188(%rbp)
movl -0x184(%rbp), %eax
movl %eax, -0x3cc(%rbp)
subl $0x3, %eax
je 0x12367
jmp 0x1234e
movl -0x3cc(%rbp), %eax
subl $0x5, %eax
je 0x12373
jmp 0x1235b
movq -0x3c8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x12388
movq -0x3c8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x12388
movq -0x3c8(%rbp), %rcx
xorl %eax, %eax
xchgb %al, (%rcx)
jmp 0x12388
movq %rax, %rdi
callq 0x4410
movq $0x0, -0x1b0(%rbp)
jmp 0x130b9
movq -0x210(%rbp), %rax
movq %rax, -0x218(%rbp)
movq -0x208(%rbp), %rcx
movq -0x218(%rbp), %rax
movq %rcx, (%rax)
movq -0x210(%rbp), %rdi
addq $0x18, %rdi
callq 0x3930
movq %rax, %rcx
movq -0x218(%rbp), %rax
movq %rcx, 0x8(%rax)
movq $0x0, -0x220(%rbp)
movq -0x220(%rbp), %rax
cmpq -0x208(%rbp), %rax
je 0x124e9
movq -0x218(%rbp), %rax
movq 0x8(%rax), %rdi
movq -0x220(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rdi
callq 0x58b0
movq -0x218(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x220(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x160(%rbp)
movq $0x0, -0x168(%rbp)
movl $0x0, -0x16c(%rbp)
movq -0x160(%rbp), %rax
movq %rax, -0x3d8(%rbp)
movl -0x16c(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x170(%rbp)
movl -0x16c(%rbp), %eax
movl %eax, -0x3d0(%rbp)
movq -0x168(%rbp), %rcx
movq %rcx, -0x178(%rbp)
subl $0x3, %eax
je 0x124ac
jmp 0x1248c
movl -0x3d0(%rbp), %eax
subl $0x5, %eax
je 0x124bf
jmp 0x12499
movq -0x3d8(%rbp), %rax
movq -0x178(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x124d0
movq -0x3d8(%rbp), %rax
movq -0x178(%rbp), %rcx
movq %rcx, (%rax)
jmp 0x124d0
movq -0x3d8(%rbp), %rcx
movq -0x178(%rbp), %rax
xchgq %rax, (%rcx)
jmp 0x124d2
movq -0x220(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x220(%rbp)
jmp 0x123e0
movq -0x250(%rbp), %rdi
movq -0x1d0(%rbp), %rcx
movq -0x218(%rbp), %rax
movq %rcx, 0x10(%rax)
addq $0x30, %rdi
movq -0x218(%rbp), %rsi
movl $0x3, %edx
callq 0x5920
movq -0x250(%rbp), %rax
addq $0x258, %rax            # imm = 0x258
movq %rax, -0x190(%rbp)
movl $0x3, -0x194(%rbp)
movq -0x190(%rbp), %rax
movq %rax, -0x3e8(%rbp)
movl -0x194(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x3dc(%rbp)
jmp 0x1255b
movl -0x3dc(%rbp), %eax
movl %eax, -0x198(%rbp)
movl -0x194(%rbp), %eax
movl %eax, -0x3ec(%rbp)
subl $0x3, %eax
je 0x12593
jmp 0x1257a
movl -0x3ec(%rbp), %eax
subl $0x5, %eax
je 0x1259f
jmp 0x12587
movq -0x3e8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x125b4
movq -0x3e8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x125b4
movq -0x3e8(%rbp), %rcx
xorl %eax, %eax
xchgb %al, (%rcx)
jmp 0x125b4
movq %rax, %rdi
callq 0x4410
movq -0x218(%rbp), %rax
movq %rax, -0x1d0(%rbp)
jmp 0x12666
movq -0x250(%rbp), %rax
addq $0x258, %rax            # imm = 0x258
movq %rax, -0x1a0(%rbp)
movl $0x3, -0x1a4(%rbp)
movq -0x1a0(%rbp), %rax
movq %rax, -0x3f8(%rbp)
movl -0x1a4(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x3f0(%rbp)
jmp 0x1260b
movl -0x3f0(%rbp), %eax
movl %eax, -0x1a8(%rbp)
movl -0x1a4(%rbp), %eax
movl %eax, -0x3fc(%rbp)
subl $0x3, %eax
je 0x12643
jmp 0x1262a
movl -0x3fc(%rbp), %eax
subl $0x5, %eax
je 0x1264f
jmp 0x12637
movq -0x3f8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x12664
movq -0x3f8(%rbp), %rax
movb $0x0, (%rax)
jmp 0x12664
movq -0x3f8(%rbp), %rcx
xorl %eax, %eax
xchgb %al, (%rcx)
jmp 0x12664
movq %rax, %rdi
callq 0x4410
jmp 0x12666
jmp 0x12668
movq -0x200(%rbp), %rax
movq -0x1d0(%rbp), %rcx
movq (%rcx), %rcx
shrq %rcx
movq -0x1d0(%rbp), %rdx
movq (%rdx), %rdx
shrq $0x2, %rdx
addq %rdx, %rcx
cmpq %rcx, %rax
jae 0x13098
movq -0x250(%rbp), %rdi
xorl %esi, %esi
leaq -0x221(%rbp), %rdx
callq 0x133f0
movq %rax, -0x230(%rbp)
cmpq $0x0, -0x230(%rbp)
jne 0x127a6
movq -0x250(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x30(%rbp)
movq $0x1, -0x38(%rbp)
movl $0x0, -0x3c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x410(%rbp)
movl -0x3c(%rbp), %eax
movq -0x38(%rbp), %rcx
movq %rcx, -0x48(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x408(%rbp)
subl $0x4, %eax
ja 0x1271b
movq -0x408(%rbp), %rax
leaq 0x5b8a(%rip), %rcx      # 0x1829c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x410(%rbp), %rcx
movq -0x48(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x50(%rbp)
jmp 0x12796
movq -0x410(%rbp), %rcx
movq -0x48(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x50(%rbp)
jmp 0x12796
movq -0x410(%rbp), %rcx
movq -0x48(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x50(%rbp)
jmp 0x12796
movq -0x410(%rbp), %rcx
movq -0x48(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x50(%rbp)
jmp 0x12796
movq -0x410(%rbp), %rcx
movq -0x48(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x50(%rbp)
movq $0x0, -0x1b0(%rbp)
jmp 0x130b9
testb $0x1, -0x221(%rbp)
je 0x12889
movq -0x250(%rbp), %rax
addq $0x38, %rax
movq %rax, -0x58(%rbp)
movq $0x1, -0x60(%rbp)
movl $0x0, -0x64(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0x420(%rbp)
movl -0x64(%rbp), %eax
movq -0x60(%rbp), %rcx
movq %rcx, -0x70(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x418(%rbp)
subl $0x4, %eax
ja 0x1280e
movq -0x418(%rbp), %rax
leaq 0x5a6f(%rip), %rcx      # 0x18274
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x420(%rbp), %rcx
movq -0x70(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x78(%rbp)
jmp 0x12889
movq -0x420(%rbp), %rcx
movq -0x70(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x78(%rbp)
jmp 0x12889
movq -0x420(%rbp), %rcx
movq -0x70(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x78(%rbp)
jmp 0x12889
movq -0x420(%rbp), %rcx
movq -0x70(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x78(%rbp)
jmp 0x12889
movq -0x420(%rbp), %rcx
movq -0x70(%rbp), %rax
negq %rax
lock
xaddq %rax, (%rcx)
movq %rax, -0x78(%rbp)
movq -0x1c8(%rbp), %rax
movq %rax, -0x238(%rbp)
movq -0x1d0(%rbp), %rax
movq (%rax), %rcx
decq %rcx
movq -0x238(%rbp), %rax
andq %rcx, %rax
movq %rax, -0x238(%rbp)
movq -0x1d0(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x238(%rbp), %rcx
shlq $0x4, %rcx
addq %rcx, %rax
movq %rax, -0x148(%rbp)
movl $0x0, -0x14c(%rbp)
movq -0x148(%rbp), %rax
movq %rax, -0x430(%rbp)
movl -0x14c(%rbp), %edi
movl $0xffff, %esi           # imm = 0xFFFF
callq 0x58d0
movl %eax, -0x150(%rbp)
movl -0x14c(%rbp), %eax
movl %eax, -0x424(%rbp)
decl %eax
subl $0x2, %eax
jb 0x12938
jmp 0x12918
movl -0x424(%rbp), %eax
subl $0x5, %eax
je 0x1294b
jmp 0x12925
movq -0x430(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x158(%rbp)
jmp 0x1295c
movq -0x430(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x158(%rbp)
jmp 0x1295c
movq -0x430(%rbp), %rax
movq (%rax), %rax
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x240(%rbp)
movq $0x0, -0x248(%rbp)
movq -0x240(%rbp), %rax
cmpq -0x248(%rbp), %rax
jne 0x13071
movq -0x1d0(%rbp), %rax
movq 0x8(%rax), %rcx
movq -0x238(%rbp), %rax
shlq $0x4, %rax
addq %rax, %rcx
movq -0x1c0(%rbp), %rax
movq %rcx, -0xb0(%rbp)
leaq -0x248(%rbp), %rcx
movq %rcx, -0xb8(%rbp)
movq %rax, -0xc0(%rbp)
movl $0x0, -0xc4(%rbp)
movl $0x0, -0xc8(%rbp)
movq -0xb0(%rbp), %rax
movq %rax, -0x450(%rbp)
movl -0xc4(%rbp), %eax
movq -0xb8(%rbp), %rcx
movq %rcx, -0x448(%rbp)
movq -0xc0(%rbp), %rcx
movq %rcx, -0xd0(%rbp)
movl -0xc8(%rbp), %ecx
movl %ecx, -0x43c(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0x438(%rbp)
subl $0x4, %eax
ja 0x12a3c
movq -0x438(%rbp), %rax
leaq 0x5855(%rip), %rcx      # 0x18288
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x43c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x12b39
jmp 0x12a4f
movl -0x43c(%rbp), %eax
subl $0x5, %eax
je 0x12b6f
jmp 0x12aff
movl -0x43c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x12c47
jmp 0x12a76
movl -0x43c(%rbp), %eax
subl $0x5, %eax
je 0x12c7d
jmp 0x12c0d
movl -0x43c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x12d55
jmp 0x12a9d
movl -0x43c(%rbp), %eax
subl $0x5, %eax
je 0x12d8b
jmp 0x12d1b
movl -0x43c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x12e63
jmp 0x12ac4
movl -0x43c(%rbp), %eax
subl $0x5, %eax
je 0x12e99
jmp 0x12e29
movl -0x43c(%rbp), %eax
decl %eax
subl $0x2, %eax
jb 0x12f71
jmp 0x12aeb
movl -0x43c(%rbp), %eax
subl $0x5, %eax
je 0x12fa7
jmp 0x12f37
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x459(%rbp)
movq %rcx, -0x458(%rbp)
testb $0x1, %al
jne 0x12bbb
jmp 0x12baa
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x469(%rbp)
movq %rcx, -0x468(%rbp)
testb $0x1, %al
jne 0x12bdc
jmp 0x12bcb
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x479(%rbp)
movq %rcx, -0x478(%rbp)
testb $0x1, %al
jne 0x12bfd
jmp 0x12bec
jmp 0x13042
movq -0x448(%rbp), %rax
movq -0x458(%rbp), %rcx
movq %rcx, (%rax)
movb -0x459(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12ba5
movq -0x448(%rbp), %rax
movq -0x468(%rbp), %rcx
movq %rcx, (%rax)
movb -0x469(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12ba5
movq -0x448(%rbp), %rax
movq -0x478(%rbp), %rcx
movq %rcx, (%rax)
movb -0x479(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12ba5
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x489(%rbp)
movq %rcx, -0x488(%rbp)
testb $0x1, %al
jne 0x12cc9
jmp 0x12cb8
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x499(%rbp)
movq %rcx, -0x498(%rbp)
testb $0x1, %al
jne 0x12cea
jmp 0x12cd9
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x4a9(%rbp)
movq %rcx, -0x4a8(%rbp)
testb $0x1, %al
jne 0x12d0b
jmp 0x12cfa
jmp 0x13042
movq -0x448(%rbp), %rax
movq -0x488(%rbp), %rcx
movq %rcx, (%rax)
movb -0x489(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12cb3
movq -0x448(%rbp), %rax
movq -0x498(%rbp), %rcx
movq %rcx, (%rax)
movb -0x499(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12cb3
movq -0x448(%rbp), %rax
movq -0x4a8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x4a9(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12cb3
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x4b9(%rbp)
movq %rcx, -0x4b8(%rbp)
testb $0x1, %al
jne 0x12dd7
jmp 0x12dc6
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x4c9(%rbp)
movq %rcx, -0x4c8(%rbp)
testb $0x1, %al
jne 0x12df8
jmp 0x12de7
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x4d9(%rbp)
movq %rcx, -0x4d8(%rbp)
testb $0x1, %al
jne 0x12e19
jmp 0x12e08
jmp 0x13042
movq -0x448(%rbp), %rax
movq -0x4b8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x4b9(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12dc1
movq -0x448(%rbp), %rax
movq -0x4c8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x4c9(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12dc1
movq -0x448(%rbp), %rax
movq -0x4d8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x4d9(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12dc1
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x4e9(%rbp)
movq %rcx, -0x4e8(%rbp)
testb $0x1, %al
jne 0x12ee5
jmp 0x12ed4
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x4f9(%rbp)
movq %rcx, -0x4f8(%rbp)
testb $0x1, %al
jne 0x12f06
jmp 0x12ef5
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x509(%rbp)
movq %rcx, -0x508(%rbp)
testb $0x1, %al
jne 0x12f27
jmp 0x12f16
jmp 0x13042
movq -0x448(%rbp), %rax
movq -0x4e8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x4e9(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12ecf
movq -0x448(%rbp), %rax
movq -0x4f8(%rbp), %rcx
movq %rcx, (%rax)
movb -0x4f9(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12ecf
movq -0x448(%rbp), %rax
movq -0x508(%rbp), %rcx
movq %rcx, (%rax)
movb -0x509(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12ecf
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x519(%rbp)
movq %rcx, -0x518(%rbp)
testb $0x1, %al
jne 0x12ff0
jmp 0x12fdf
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x529(%rbp)
movq %rcx, -0x528(%rbp)
testb $0x1, %al
jne 0x13011
jmp 0x13000
movq -0x450(%rbp), %rcx
movq -0x448(%rbp), %rax
movq (%rax), %rax
movq -0xd0(%rbp), %rdx
lock
cmpxchgq %rdx, (%rcx)
movq %rax, %rcx
sete %al
movb %al, -0x539(%rbp)
movq %rcx, -0x538(%rbp)
testb $0x1, %al
jne 0x13032
jmp 0x13021
jmp 0x13042
movq -0x448(%rbp), %rax
movq -0x518(%rbp), %rcx
movq %rcx, (%rax)
movb -0x519(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12fdd
movq -0x448(%rbp), %rax
movq -0x528(%rbp), %rcx
movq %rcx, (%rax)
movb -0x529(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12fdd
movq -0x448(%rbp), %rax
movq -0x538(%rbp), %rcx
movq %rcx, (%rax)
movb -0x539(%rbp), %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
jmp 0x12fdd
testb $0x1, -0xd1(%rbp)
je 0x13071
movq -0x230(%rbp), %rcx
movq -0x1d0(%rbp), %rax
movq 0x8(%rax), %rax
movq -0x238(%rbp), %rdx
shlq $0x4, %rdx
addq %rdx, %rax
movq %rcx, 0x8(%rax)
jmp 0x13088
movq -0x238(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x238(%rbp)
jmp 0x12897
movq -0x230(%rbp), %rax
movq %rax, -0x1b0(%rbp)
jmp 0x130b9
movq -0x250(%rbp), %rdi
addq $0x30, %rdi
movl $0x2, %esi
callq 0x6170
movq %rax, -0x1d0(%rbp)
jmp 0x12095
movq -0x1b0(%rbp), %rax
addq $0x540, %rsp            # imm = 0x540
popq %rbp
retq
nopl (%rax)