// File: /workspace/github_cpp_makefile_star2_O2/Barath-Kannan[P]SignalsAndSlots/test/SignalTest.cpp
// Function: SignalTest_MultipleConnectionTypes_Test::TestBody()
TEST_F(SignalTest, MultipleConnectionTypes) {
    cout << "Testing multiple connection types for single signal" << endl;
    Signal<BigThing> testSignal;

    cout << "Connecting signals" << endl;
    list<int> ids;
    ids.push_back(testSignal.connectSlot(ExecutorScheme::SYNCHRONOUS, pushToQueue));
    ids.push_back(testSignal.connectSlot(ExecutorScheme::ASYNCHRONOUS, pushToQueue));
    ids.push_back(testSignal.connectSlot(ExecutorScheme::STRAND, pushToQueue));

    cout << "Emitting signal" << endl;
    BasicTimer bt;
    BasicTimer bt2;

    bt.start();
    bt2.start();
    BigThing bigthing;
    for (uint32_t i = 0; i < 10; i++) {
        testSignal.emitSignal(bigthing);
    }
    bt2.stop();

    cout << "Dequeueing" << endl;
    for (int i = 0; i < 30; i++) {
        sq.dequeue();
    }

    bt.stop();

    cout << "Signals emitted" << endl;
    cout << "Total time for emission: " << bt2.getElapsedMilliseconds() << "ms" << endl;
    cout << "Total time for emission and processing: " << bt.getElapsedMilliseconds() << "ms" << endl;
    cout << "Average emission+processing time: " << bt.getElapsedMilliseconds() / 10.0 << "ms" << endl;
    ASSERT_LT(bt2.getElapsedSeconds(), 0.1);
    ASSERT_LT(bt.getElapsedSeconds(), 0.2);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x5d8, %rsp            # imm = 0x5D8
movq 0x510d6(%rip), %rbx     # 0x5ffb0
leaq 0x2b3e4(%rip), %rsi     # 0x3a2c5
movq %rbx, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0xc0(%rsp), %rdi
callq 0x10920
leaq 0x2b3f4(%rip), %rsi     # 0x3a2f9
movq %rbx, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x30(%rsp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
leaq 0xa0(%rsp), %rdx
andq $0x0, 0x8(%rdx)
leaq -0x1139(%rip), %rbx     # 0xde01
movq %rbx, (%rdx)
leaq 0x8c8c(%rip), %r14      # 0x17bd0
movq %r14, 0x18(%rdx)
leaq 0x8cbd(%rip), %r15      # 0x17c0c
movq %r15, 0x10(%rdx)
leaq 0xc0(%rsp), %rdi
xorl %esi, %esi
callq 0x10218
leaq 0x3d8(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x30(%rsp), %rdi
callq 0x1020c
leaq 0xa0(%rsp), %rdi
callq 0xd31c
leaq 0x80(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
movq %r14, 0x18(%rdx)
movq %r15, 0x10(%rdx)
leaq 0xc0(%rsp), %rdi
pushq $0x2
popq %rsi
callq 0x10218
leaq 0x3d8(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x30(%rsp), %rdi
callq 0x1020c
leaq 0x80(%rsp), %rdi
callq 0xd31c
leaq 0x60(%rsp), %rdx
andq $0x0, 0x8(%rdx)
movq %rbx, (%rdx)
movq %r14, 0x18(%rdx)
movq %r15, 0x10(%rdx)
leaq 0xc0(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x10218
leaq 0x3d8(%rsp), %rsi
movl %eax, (%rsi)
leaq 0x30(%rsp), %rdi
callq 0x1020c
leaq 0x60(%rsp), %rdi
callq 0xd31c
movq 0x50f9a(%rip), %rdi     # 0x5ffb0
leaq 0x2b1d7(%rip), %rsi     # 0x3a1f4
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x18(%rsp), %rdi
callq 0xcb2c
leaq 0x48(%rsp), %rdi
callq 0xcb2c
leaq 0x18(%rsp), %rdi
callq 0xcb9a
leaq 0x48(%rsp), %rdi
callq 0xcb9a
pushq $0xa
popq %rbp
leaq 0xc0(%rsp), %rbx
leaq 0x3d8(%rsp), %r14
subl $0x1, %ebp
jb 0xf077
movq %rbx, %rdi
movq %r14, %rsi
callq 0x17ce8
jmp 0xf065
leaq 0x48(%rsp), %rdi
callq 0xcbc2
movq 0x50f28(%rip), %rdi     # 0x5ffb0
leaq 0x2b27d(%rip), %rsi     # 0x3a30c
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
pushq $0x1e
popq %rbp
leaq 0xa366a(%rip), %rbx     # 0xb2710
leaq 0x1d8(%rsp), %r14
subl $0x1, %ebp
jb 0xf0c0
movq %r14, %rdi
movq %rbx, %rsi
callq 0x1026a
jmp 0xf0ae
leaq 0x18(%rsp), %rdi
callq 0xcbc2
movq 0x50edf(%rip), %rdi     # 0x5ffb0
leaq 0x2b23f(%rip), %rsi     # 0x3a317
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x50ec4(%rip), %rdi     # 0x5ffb0
leaq 0x2b234(%rip), %rsi     # 0x3a327
callq 0xb4f0
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2cbef(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x50e85(%rip), %rdi     # 0x5ffb0
leaq 0x2b20f(%rip), %rsi     # 0x3a341
callq 0xb4f0
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2cbb0(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x50e46(%rip), %rdi     # 0x5ffb0
leaq 0x2b1f9(%rip), %rsi     # 0x3a36a
callq 0xb4f0
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0xcb66
divsd 0x2aefd(%rip), %xmm0    # 0x3a088
movq %rbx, %rdi
callq 0xb960
leaq 0x2cb69(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x48(%rsp), %rdi
callq 0xcb38
leaq 0x10(%rsp), %rcx
movsd %xmm0, (%rcx)
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
leaq 0x2b07d(%rip), %rsi     # 0x3a253
leaq 0x2b08e(%rip), %rdx     # 0x3a26b
leaq 0x1d8(%rsp), %rdi
callq 0x101df
cmpb $0x0, 0x1d8(%rsp)
je 0xf26b
leaq 0x1e0(%rsp), %rdi
callq 0x10766
leaq 0x18(%rsp), %rdi
callq 0xcb38
leaq 0x10(%rsp), %rcx
movsd %xmm0, (%rcx)
movabsq $0x3fc999999999999a, %rax # imm = 0x3FC999999999999A
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
leaq 0x2b160(%rip), %rsi     # 0x3a38d
leaq 0x2b170(%rip), %rdx     # 0x3a3a4
leaq 0x1d8(%rsp), %rdi
callq 0x101df
cmpb $0x0, 0x1d8(%rsp)
jne 0xf31a
leaq 0x10(%rsp), %rdi
callq 0x23d1e
movq 0x1e0(%rsp), %rax
testq %rax, %rax
je 0xf2d7
movq (%rax), %r8
jmp 0xf2de
leaq 0x10(%rsp), %rdi
callq 0x23d1e
movq 0x1e0(%rsp), %rax
testq %rax, %rax
je 0xf287
movq (%rax), %r8
jmp 0xf28e
leaq 0x2f7b6(%rip), %r8      # 0x3ea44
leaq 0x2aedf(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0xde, %ecx
callq 0x22794
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x22812
leaq 0x1e0(%rsp), %rbx
leaq 0x8(%rsp), %rdi
callq 0x227f4
leaq 0x10(%rsp), %rdi
callq 0x10720
movq %rbx, %rdi
jmp 0xf322
leaq 0x2f766(%rip), %r8      # 0x3ea44
leaq 0x2ae8f(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0xdf, %ecx
callq 0x22794
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x22812
leaq 0x8(%rsp), %rdi
callq 0x227f4
leaq 0x10(%rsp), %rdi
callq 0x10720
leaq 0x1e0(%rsp), %rdi
callq 0x10766
leaq 0x30(%rsp), %rdi
callq 0x109b6
leaq 0xc0(%rsp), %rdi
callq 0x15d7a
addq $0x5d8, %rsp            # imm = 0x5D8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0xf352
jmp 0xf361
jmp 0xf372
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x227f4
jmp 0xf364
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x10720
jmp 0xf375
jmp 0xf3c2
movq %rax, %rbx
leaq 0x1e0(%rsp), %rdi
callq 0x10766
jmp 0xf3c5
jmp 0xf3c2
jmp 0xf3c2
jmp 0xf3c2
jmp 0xf3c2
jmp 0xf3c2
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
jmp 0xf3b0
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
jmp 0xf3b0
movq %rax, %rbx
leaq 0xa0(%rsp), %rdi
callq 0xd31c
jmp 0xf3c5
movq %rax, %rbx
jmp 0xf3cf
jmp 0xf3c2
jmp 0xf3c2
jmp 0xf3c2
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x109b6
leaq 0xc0(%rsp), %rdi
callq 0x15d7a
movq %rbx, %rdi
callq 0xba30