// File: Barath-Kannan[P]SignalsAndSlots/inc/BSignals/details/SignalImpl.hpp
// Function: BSignals::details::SignalImpl<unsigned int>::emitSignalThreadSafe(unsigned int const&)
inline void emitSignalThreadSafe(const Args& ... p){
        while (connectBufferDirty.load(std::memory_order_acquire)){
            connectBufferLock.lock();
            if (!connectBufferDirty.load(std::memory_order_acquire)){
                connectBufferLock.unlock();
                break;
            }
            for (auto const &kvpair : connectBuffer){
                connectSlotFunction(kvpair.first, kvpair.second.scheme, kvpair.second.slot);
            }
            connectBuffer.clear();
            connectBufferDirty.store(false, std::memory_order_release);
            connectBufferLock.unlock();
            slotLock.lock();
            for (auto it = slots.begin(); it!= slots.end();){
                if (!it->second->isAlive()){
                    it = slots.erase(it);
                }
                else{
                    ++it;
                }
            }
            slotLock.unlock();
        }
        slotLock.lock_shared();
        for (auto const &kvpair : slots){
            if (kvpair.second->isAlive()){
                kvpair.second->execute(p...);
            }
        }
        slotLock.unlock_shared();
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xc0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0xa8(%rbp), %rdi
addq $0xe0, %rdi
movl $0x2, %esi
callq 0x147b0
testb $0x1, %al
jne 0x2aa6f
jmp 0x2ac81
movq -0xa8(%rbp), %rdi
addq $0xb8, %rdi
callq 0x10860
movq -0xa8(%rbp), %rdi
addq $0xe0, %rdi
movl $0x2, %esi
callq 0x147b0
testb $0x1, %al
jne 0x2aab6
movq -0xa8(%rbp), %rdi
addq $0xb8, %rdi
callq 0x108e0
jmp 0x2ac81
movq -0xa8(%rbp), %rax
addq $0xe8, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2ae00
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x2ae30
movq %rax, -0x28(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x2ae60
testb $0x1, %al
jne 0x2aaf7
jmp 0x2ab7f
leaq -0x20(%rbp), %rdi
callq 0x2ae90
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rsi
movl (%rsi), %eax
movl %eax, -0xb8(%rbp)
movl 0x8(%rsi), %eax
movl %eax, -0xb4(%rbp)
addq $0x10, %rsi
leaq -0x50(%rbp), %rdi
movq %rdi, -0xb0(%rbp)
callq 0x1edd0
movq -0xa8(%rbp), %rdi
movl -0xb8(%rbp), %esi
movl -0xb4(%rbp), %edx
movq -0xb0(%rbp), %rcx
callq 0x1f440
jmp 0x2ab4e
leaq -0x50(%rbp), %rdi
callq 0x1ee80
leaq -0x20(%rbp), %rdi
callq 0x2aeb0
jmp 0x2aae1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x58(%rbp)
movl %eax, -0x5c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x1ee80
jmp 0x2ad5b
movq -0xa8(%rbp), %rdi
addq $0xe8, %rdi
callq 0x2aee0
movq -0xa8(%rbp), %rdi
addq $0xe0, %rdi
xorl %esi, %esi
movl $0x3, %edx
callq 0x11240
movq -0xa8(%rbp), %rdi
addq $0xb8, %rdi
callq 0x108e0
movq -0xa8(%rbp), %rdi
addq $0x18, %rdi
callq 0x10920
movq -0xa8(%rbp), %rdi
addq $0x88, %rdi
callq 0x2af00
movq %rax, -0x68(%rbp)
movq -0xa8(%rbp), %rdi
addq $0x88, %rdi
callq 0x20ed0
movq %rax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x2af30
testb $0x1, %al
jne 0x2ac10
jmp 0x2ac6c
leaq -0x68(%rbp), %rdi
callq 0x2af60
movq %rax, %rdi
addq $0x8, %rdi
callq 0x242d0
movq %rax, %rdi
callq 0x242f0
testb $0x1, %al
jne 0x2ac5e
movq -0xa8(%rbp), %rdi
addq $0x88, %rdi
movq -0x68(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x80(%rbp), %rsi
callq 0x2af80
movq %rax, -0x78(%rbp)
movq -0x78(%rbp), %rax
movq %rax, -0x68(%rbp)
jmp 0x2ac67
leaq -0x68(%rbp), %rdi
callq 0x2a040
jmp 0x2abe6
movq -0xa8(%rbp), %rdi
addq $0x18, %rdi
callq 0x10a60
jmp 0x2aa4e
movq -0xa8(%rbp), %rdi
addq $0x18, %rdi
callq 0x10b60
movq -0xa8(%rbp), %rax
addq $0x88, %rax
movq %rax, -0x88(%rbp)
movq -0x88(%rbp), %rdi
callq 0x2af00
movq %rax, -0x90(%rbp)
movq -0x88(%rbp), %rdi
callq 0x20ed0
movq %rax, -0x98(%rbp)
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x2af30
testb $0x1, %al
jne 0x2ace4
jmp 0x2ad42
leaq -0x90(%rbp), %rdi
callq 0x2afc0
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0x242d0
movq %rax, %rdi
callq 0x242f0
testb $0x1, %al
jne 0x2ad15
jmp 0x2ad32
movq -0xa0(%rbp), %rdi
addq $0x8, %rdi
callq 0x242d0
movq %rax, %rdi
movq -0x10(%rbp), %rsi
movq (%rdi), %rax
callq *0x10(%rax)
jmp 0x2ad34
leaq -0x90(%rbp), %rdi
callq 0x2a040
jmp 0x2accb
movq -0xa8(%rbp), %rdi
addq $0x18, %rdi
callq 0x10f40
addq $0xc0, %rsp
popq %rbp
retq
movq -0x58(%rbp), %rdi
callq 0xdcb0
nopw %cs:(%rax,%rax)
nop