// File: /workspace/github_cpp_makefile_star2_O2/Barath-Kannan[P]SignalsAndSlots/test/SignalTest.cpp
// Function: SignalTest_SynchronousSignal_Test::TestBody()
TEST_F(SignalTest, SynchronousSignal) {
    cout << "Instantiating signal object" << endl;
    Signal<int, int> testSignal;
    BasicTimer bt;
    cout << "Connecting signal" << endl;
    bt.start();
    int id = testSignal.connectSlot(ExecutorScheme::SYNCHRONOUS, staticSumFunction);
    bt.stop();
    cout << "Time to connect: " << bt.getElapsedMilliseconds() << "ms" << endl;

    cout << "Emitting signal" << endl;

    bt.start();
    testSignal(1, 2);
    bt.stop();
    cout << "Time to emit: " << bt.getElapsedMilliseconds() << "ms" << endl;

    ASSERT_EQ(globalStaticIntX, 3);
    ASSERT_EQ(0, id);

    testSignal.disconnectSlot(0);
}

// Assembly:
pushq %rbx
subq $0x180, %rsp            # imm = 0x180
movq 0x5206f(%rip), %rdi     # 0x5ffb0
leaq 0x2c240(%rip), %rsi     # 0x3a188
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x68(%rsp), %rdi
callq 0x10606
leaq 0x30(%rsp), %rdi
callq 0xcb2c
movq 0x52040(%rip), %rdi     # 0x5ffb0
leaq 0x2c259(%rip), %rsi     # 0x3a1d0
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x30(%rsp), %rdi
callq 0xcb9a
leaq 0x48(%rsp), %rdx
andq $0x0, 0x8(%rdx)
leaq -0x18a(%rip), %rax      # 0xde15
movq %rax, (%rdx)
leaq 0x719b(%rip), %rax      # 0x15144
movq %rax, 0x18(%rdx)
leaq 0x719a(%rip), %rax      # 0x1514e
movq %rax, 0x10(%rdx)
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x10164
movl %eax, %ebx
leaq 0x48(%rsp), %rdi
callq 0xd31c
movl %ebx, 0x2c(%rsp)
leaq 0x30(%rsp), %rdi
callq 0xcbc2
movq 0x51fcb(%rip), %rdi     # 0x5ffb0
leaq 0x2c1f6(%rip), %rsi     # 0x3a1e2
callq 0xb4f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2dcf6(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
movq 0x51f8c(%rip), %rdi     # 0x5ffb0
leaq 0x2c1c9(%rip), %rsi     # 0x3a1f4
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x30(%rsp), %rdi
callq 0xcb9a
leaq 0x18(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x8(%rsp), %rdx
movl $0x2, (%rdx)
leaq 0x68(%rsp), %rdi
callq 0x15170
leaq 0x30(%rsp), %rdi
callq 0xcbc2
movq 0x51f3d(%rip), %rdi     # 0x5ffb0
leaq 0x2c18a(%rip), %rsi     # 0x3a204
callq 0xb4f0
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0xcb66
movq %rbx, %rdi
callq 0xb960
leaq 0x2dc68(%rip), %rsi     # 0x3bd03
movq %rax, %rdi
callq 0xb4f0
movq %rax, %rdi
callq 0xb270
leaq 0x8(%rsp), %r8
movl $0x3, (%r8)
leaq 0x2c155(%rip), %rsi     # 0x3a213
leaq 0x2c15f(%rip), %rdx     # 0x3a224
leaq 0xa4640(%rip), %rcx     # 0xb270c
leaq 0x18(%rsp), %rdi
callq 0x15402
cmpb $0x0, 0x18(%rsp)
je 0xe12e
leaq 0x20(%rsp), %rdi
callq 0x10766
leaq 0x8(%rsp), %rcx
andl $0x0, (%rcx)
leaq 0x31f4c(%rip), %rsi     # 0x40042
leaq 0x3127e(%rip), %rdx     # 0x3f37b
leaq 0x18(%rsp), %rdi
leaq 0x2c(%rsp), %r8
callq 0x1558a
cmpb $0x0, 0x18(%rsp)
je 0xe147
leaq 0x20(%rsp), %rdi
callq 0x10766
leaq 0x68(%rsp), %rdi
xorl %esi, %esi
callq 0x15640
jmp 0xe1dd
leaq 0x8(%rsp), %rdi
callq 0x23d1e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xe160
movq (%rax), %r8
jmp 0xe167
leaq 0x8(%rsp), %rdi
callq 0x23d1e
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0xe18f
movq (%rax), %r8
jmp 0xe196
leaq 0x308dd(%rip), %r8      # 0x3ea44
leaq 0x2c006(%rip), %rdx     # 0x3a174
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $0x4e
popq %rcx
callq 0x22794
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x22812
jmp 0xe1bc
leaq 0x308ae(%rip), %r8      # 0x3ea44
leaq 0x2bfd7(%rip), %rdx     # 0x3a174
leaq 0x10(%rsp), %rdi
pushq $0x2
popq %rsi
pushq $0x4f
popq %rcx
callq 0x22794
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x22812
leaq 0x20(%rsp), %rbx
leaq 0x10(%rsp), %rdi
callq 0x227f4
leaq 0x8(%rsp), %rdi
callq 0x10720
movq %rbx, %rdi
callq 0x10766
leaq 0x68(%rsp), %rdi
callq 0x1352c
addq $0x180, %rsp            # imm = 0x180
popq %rbx
retq
jmp 0xe1f6
jmp 0xe205
jmp 0xe214
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x227f4
jmp 0xe208
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10720
jmp 0xe217
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x10766
jmp 0xe23d
jmp 0xe23a
jmp 0xe23a
jmp 0xe23a
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0xd31c
jmp 0xe23d
jmp 0xe23a
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x1352c
movq %rbx, %rdi
callq 0xba30
nop