// File: /workspace/github_cpp_makefile_star2_O2/Barath-Kannan[P]SignalsAndSlots/test/SignalTest.cpp
// Function: SignalTest_StrandSignal_Test::TestBody()
TEST_F(SignalTest, StrandSignal) {
    cout << "Instantiating signal object" << endl;

    Signal<int, int> testSignal;

    BasicTimer bt;
    BasicTimer bt2;
    cout << "Connecting signal" << endl;
    bt.start();
    int id = testSignal.connectSlot(ExecutorScheme::STRAND, staticSumFunction);
    bt.stop();
    cout << "Time to connect: " << bt.getElapsedMilliseconds() << "ms" << endl;

    cout << "Emitting signal" << endl;

    bt.start();
    bt2.start();
    testSignal.emitSignal(1, 2);
    bt.stop();

    while (bt2.getElapsedSeconds() < 0.1) {
        if (globalStaticIntX == 3) {
            bt2.stop();
            break;
        }
    }
    ASSERT_LT(bt2.getElapsedSeconds(), 0.1);
    ASSERT_EQ(globalStaticIntX, 3);

    cout << "Time to emit: " << bt.getElapsedMilliseconds() << "ms" << endl;
    cout << "Time to emit and process: " << bt2.getElapsedMilliseconds() << "ms" << endl;
    cout << "Net time to process: " << bt2.getElapsedMilliseconds() - bt.getElapsedMilliseconds() << "ms" << endl;

    ASSERT_EQ(0, id);

    testSignal.disconnectAllSlots();

}

// Assembly:
pushq %r14
pushq %rbx
subq $0x198, %rsp            # imm = 0x198
movq 0x51589(%rip), %rdi     # 0x5ffb0
leaq 0x2b75a(%rip), %rsi     # 0x3a188
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x80(%rsp), %rdi
callq 0x10606
leaq 0x28(%rsp), %rdi
callq 0xcb2c
leaq 0x40(%rsp), %rdi
callq 0xcb2c
movq 0x5154d(%rip), %rdi     # 0x5ffb0
leaq 0x2b766(%rip), %rsi     # 0x3a1d0
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x28(%rsp), %rdi
callq 0xcb9a
leaq 0x60(%rsp), %rdx
andq $0x0, 0x8(%rdx)
leaq -0xc7d(%rip), %rax      # 0xde15
movq %rax, (%rdx)
leaq 0x66a8(%rip), %rax      # 0x15144
movq %rax, 0x18(%rdx)
leaq 0x66a7(%rip), %rax      # 0x1514e
movq %rax, 0x10(%rdx)
leaq 0x80(%rsp), %rdi
pushq $0x3
popq %rsi
callq 0x10164
movl %eax, %ebx
leaq 0x60(%rsp), %rdi
callq 0xd31c
movl %ebx, 0x24(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xcbc2
movq 0x514d4(%rip), %rdi     # 0x5ffb0
leaq 0x2b6ff(%rip), %rsi     # 0x3a1e2
callq 0xb4f0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2d1ff(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x51495(%rip), %rdi     # 0x5ffb0
leaq 0x2b6d2(%rip), %rsi     # 0x3a1f4
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x28(%rsp), %rdi
callq 0xcb9a
leaq 0x40(%rsp), %rdi
callq 0xcb9a
leaq 0x10(%rsp), %rsi
movl $0x1, (%rsi)
movq %rsp, %rdx
movl $0x2, (%rdx)
leaq 0x80(%rsp), %rdi
callq 0x15170
leaq 0x28(%rsp), %rdi
callq 0xcbc2
leaq 0x40(%rsp), %rbx
leaq 0xa3b92(%rip), %r14     # 0xb270c
movq %rbx, %rdi
callq 0xcb38
movsd 0x2b4f6(%rip), %xmm1    # 0x3a080
ucomisd %xmm0, %xmm1
jbe 0xeba2
movl (%r14), %eax
cmpl $0x3, %eax
jne 0xeb7a
leaq 0x40(%rsp), %rdi
callq 0xcbc2
leaq 0x40(%rsp), %rdi
callq 0xcb38
movq %rsp, %rcx
movsd %xmm0, (%rcx)
movabsq $0x3fb999999999999a, %rax # imm = 0x3FB999999999999A
leaq 0x8(%rsp), %r8
movq %rax, (%r8)
leaq 0x2b687(%rip), %rsi     # 0x3a253
leaq 0x2b698(%rip), %rdx     # 0x3a26b
leaq 0x10(%rsp), %rdi
callq 0x101df
cmpb $0x0, 0x10(%rsp)
je 0xed51
leaq 0x18(%rsp), %rdi
callq 0x10766
movq %rsp, %r8
movl $0x3, (%r8)
leaq 0x2b610(%rip), %rsi     # 0x3a213
leaq 0x2b61a(%rip), %rdx     # 0x3a224
leaq 0xa3afb(%rip), %rcx     # 0xb270c
leaq 0x10(%rsp), %rdi
callq 0x15402
cmpb $0x0, 0x10(%rsp)
je 0xed68
leaq 0x18(%rsp), %rdi
callq 0x10766
movq 0x51379(%rip), %rdi     # 0x5ffb0
leaq 0x2b5c6(%rip), %rsi     # 0x3a204
callq 0xb4f0
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2d0a4(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x5133a(%rip), %rdi     # 0x5ffb0
leaq 0x2b5f2(%rip), %rsi     # 0x3a26f
callq 0xb4f0
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2d065(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x512fb(%rip), %rdi     # 0x5ffb0
leaq 0x2b5ce(%rip), %rsi     # 0x3a28a
callq 0xb4f0
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0xcb66
movsd %xmm0, 0x58(%rsp)
leaq 0x28(%rsp), %rdi
callq 0xcb66
movsd 0x58(%rsp), %xmm1
subsd %xmm0, %xmm1
movq %rbx, %rdi
movapd %xmm1, %xmm0
callq 0xb960
leaq 0x2d008(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq %rsp, %rcx
andl $0x0, (%rcx)
leaq 0x3132a(%rip), %rsi     # 0x40042
leaq 0x3065c(%rip), %rdx     # 0x3f37b
leaq 0x10(%rsp), %rdi
leaq 0x24(%rsp), %r8
callq 0x1558a
cmpb $0x0, 0x10(%rsp)
je 0xedae
leaq 0x18(%rsp), %rdi
callq 0x10766
leaq 0x80(%rsp), %rdi
callq 0x1356c
jmp 0xee40
movq %rsp, %rdi
callq 0x23d1e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xed7f
movq (%rax), %r8
jmp 0xed86
movq %rsp, %rdi
callq 0x23d1e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xedc5
movq (%rax), %r8
jmp 0xedcc
leaq 0x2fcbe(%rip), %r8      # 0x3ea44
leaq 0x2b3e7(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0xb0, %ecx
callq 0x22794
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x22812
jmp 0xee21
movq %rsp, %rdi
callq 0x23d1e
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0xedf4
movq (%rax), %r8
jmp 0xedfb
leaq 0x2fc78(%rip), %r8      # 0x3ea44
leaq 0x2b3a1(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0xb1, %ecx
callq 0x22794
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x22812
jmp 0xee21
leaq 0x2fc49(%rip), %r8      # 0x3ea44
leaq 0x2b372(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0xb7, %ecx
callq 0x22794
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x22812
leaq 0x18(%rsp), %rbx
leaq 0x8(%rsp), %rdi
callq 0x227f4
movq %rsp, %rdi
callq 0x10720
movq %rbx, %rdi
callq 0x10766
leaq 0x80(%rsp), %rdi
callq 0x1352c
addq $0x198, %rsp            # imm = 0x198
popq %rbx
popq %r14
retq
jmp 0xee66
jmp 0xee75
jmp 0xee82
jmp 0xeeae
jmp 0xee66
jmp 0xee75
jmp 0xee82
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x227f4
jmp 0xee78
movq %rax, %rbx
movq %rsp, %rdi
callq 0x10720
jmp 0xee85
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10766
jmp 0xeeb1
jmp 0xeeae
jmp 0xeeae
jmp 0xeeae
jmp 0xeeae
movq %rax, %rbx
leaq 0x60(%rsp), %rdi
callq 0xd31c
jmp 0xeeb1
jmp 0xeeae
jmp 0xeeae
jmp 0xeeae
movq %rax, %rbx
leaq 0x80(%rsp), %rdi
callq 0x1352c
movq %rbx, %rdi
callq 0xba30