// File: Barath-Kannan[P]SignalsAndSlots/inc/BSignals/details/SignalImpl.hpp
// Function: BSignals::details::SignalImpl<unsigned int>::connectSlot(BSignals::ExecutorScheme, std::function<void (unsigned int)>)
int connectSlot(BSignals::ExecutorScheme scheme, std::function<void(Args...)> slot){
        uint32_t id = currentId.fetch_add(1);
        if (enableEmissionGuard){
            std::lock_guard<std::mutex> lock(connectBufferLock);
            connectBuffer.emplace(id, ConnectDescriptor{scheme, slot});
            connectBufferDirty = true;
            return id;
        }
        else{
            return connectSlotFunction(id, scheme, slot);
        }
    }

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdx, -0xd0(%rbp)
movq %rdi, -0x28(%rbp)
movl %esi, -0x2c(%rbp)
movq %rdx, -0x38(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0xc8(%rbp)
movq %rax, -0x8(%rbp)
movl $0x1, -0xc(%rbp)
movl $0x5, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xc0(%rbp)
movl -0x10(%rbp), %eax
movl -0xc(%rbp), %ecx
movl %ecx, -0x14(%rbp)
decl %eax
movl %eax, %ecx
movq %rcx, -0xb8(%rbp)
subl $0x4, %eax
ja 0x1ebd5
movq -0xb8(%rbp), %rax
leaq 0x865dc(%rip), %rcx     # 0xa51a8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x1ec32
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x1ec32
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x1ec32
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
jmp 0x1ec32
movq -0xc0(%rbp), %rcx
movl -0x14(%rbp), %eax
lock
xaddl %eax, (%rcx)
movl %eax, -0x18(%rbp)
movq -0xc8(%rbp), %rax
movl -0x18(%rbp), %ecx
movl %ecx, -0x3c(%rbp)
testb $0x1, 0x4(%rax)
je 0x1ed2f
movq -0xc8(%rbp), %rsi
addq $0xb8, %rsi
leaq -0x48(%rbp), %rdi
callq 0x11d00
movq -0xc8(%rbp), %rax
movq -0xd0(%rbp), %rsi
addq $0xe8, %rax
movq %rax, -0xd8(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0x70(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x1edd0
jmp 0x1ec8c
movq -0xd8(%rbp), %rdi
leaq -0x3c(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x1f3a0
movb %dl, -0xe1(%rbp)
movq %rax, -0xe0(%rbp)
jmp 0x1ecaf
movb -0xe1(%rbp), %al
movq -0xe0(%rbp), %rcx
movq %rcx, -0x90(%rbp)
movb %al, -0x88(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1f3f0
movq -0xc8(%rbp), %rdi
addq $0xe0, %rdi
movl $0x1, %esi
callq 0x1f410
movl -0x3c(%rbp), %eax
movl %eax, -0x1c(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x11ee0
jmp 0x1edb3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0x1ed21
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x70(%rbp), %rdi
callq 0x1f3f0
leaq -0x48(%rbp), %rdi
callq 0x11ee0
jmp 0x1edbf
movq -0xd0(%rbp), %rsi
movl -0x3c(%rbp), %eax
movl %eax, -0xf8(%rbp)
movl -0x2c(%rbp), %eax
movl %eax, -0xf4(%rbp)
leaq -0xb0(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x1edd0
movq -0xc8(%rbp), %rdi
movl -0xf8(%rbp), %esi
movl -0xf4(%rbp), %edx
movq -0xf0(%rbp), %rcx
callq 0x1f440
movl %eax, -0xe8(%rbp)
jmp 0x1ed82
movl -0xe8(%rbp), %eax
movl %eax, -0x1c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x1ee80
jmp 0x1edb3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x1ee80
jmp 0x1edbf
movl -0x1c(%rbp), %eax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0xdcb0
nopl (%rax,%rax)