// File: 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 %rbp
movq %rsp, %rbp
subq $0x250, %rsp            # imm = 0x250
movq %rdi, -0x8(%rbp)
movq 0xe3012(%rip), %rdi     # 0xfafb8
leaq 0x8d712(%rip), %rsi     # 0xa56bf
callq 0xd640
movq %rax, %rdi
movq 0xe2fd4(%rip), %rsi     # 0xfaf90
callq 0xd6e0
leaq -0x120(%rbp), %rdi
callq 0x1c140
leaq -0x138(%rbp), %rdi
callq 0xfc20
jmp 0x17fdb
movq 0xe2fd6(%rip), %rdi     # 0xfafb8
leaq 0x8d71e(%rip), %rsi     # 0xa5707
callq 0xd640
movq %rax, -0x1d0(%rbp)
jmp 0x17ff7
movq -0x1d0(%rbp), %rdi
movq 0xe2f8b(%rip), %rsi     # 0xfaf90
callq 0xd6e0
jmp 0x1800c
leaq -0x138(%rbp), %rdi
callq 0xfde0
jmp 0x1801a
leaq -0x2b1(%rip), %rsi      # 0x17d70
leaq -0x168(%rbp), %rdi
movq %rdi, -0x1e0(%rbp)
callq 0x1c3d0
movq -0x1e0(%rbp), %rdx
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
callq 0x1c350
movl %eax, -0x1d4(%rbp)
jmp 0x18051
leaq -0x168(%rbp), %rdi
callq 0x1c460
movl -0x1d4(%rbp), %eax
movl %eax, -0x148(%rbp)
leaq -0x138(%rbp), %rdi
callq 0xfe30
jmp 0x18077
movq 0xe2f3a(%rip), %rdi     # 0xfafb8
leaq 0x8d694(%rip), %rsi     # 0xa5719
callq 0xd640
movq %rax, -0x1e8(%rbp)
jmp 0x18093
leaq -0x138(%rbp), %rdi
callq 0xfd00
movsd %xmm0, -0x1f0(%rbp)
jmp 0x180a9
movsd -0x1f0(%rbp), %xmm0
movq -0x1e8(%rbp), %rdi
callq 0xddc0
movq %rax, -0x1f8(%rbp)
jmp 0x180c6
movq -0x1f8(%rbp), %rdi
leaq 0x8f0c7(%rip), %rsi     # 0xa719b
callq 0xd640
movq %rax, -0x200(%rbp)
jmp 0x180e2
movq -0x200(%rbp), %rdi
movq 0xe2ea0(%rip), %rsi     # 0xfaf90
callq 0xd6e0
jmp 0x180f7
movq 0xe2eba(%rip), %rdi     # 0xfafb8
leaq 0x8d626(%rip), %rsi     # 0xa572b
callq 0xd640
movq %rax, -0x208(%rbp)
jmp 0x18113
movq -0x208(%rbp), %rdi
movq 0xe2e6f(%rip), %rsi     # 0xfaf90
callq 0xd6e0
jmp 0x18128
leaq -0x138(%rbp), %rdi
callq 0xfde0
jmp 0x18136
movl $0x1, -0x16c(%rbp)
movl $0x2, -0x170(%rbp)
leaq -0x120(%rbp), %rdi
leaq -0x16c(%rbp), %rsi
leaq -0x170(%rbp), %rdx
callq 0x1c480
jmp 0x18166
leaq -0x138(%rbp), %rdi
callq 0xfe30
jmp 0x18174
movq 0xe2e3d(%rip), %rdi     # 0xfafb8
leaq 0x8d5b9(%rip), %rsi     # 0xa573b
callq 0xd640
movq %rax, -0x210(%rbp)
jmp 0x18190
leaq -0x138(%rbp), %rdi
callq 0xfd00
movsd %xmm0, -0x218(%rbp)
jmp 0x181a6
movsd -0x218(%rbp), %xmm0
movq -0x210(%rbp), %rdi
callq 0xddc0
movq %rax, -0x220(%rbp)
jmp 0x181c3
movq -0x220(%rbp), %rdi
leaq 0x8efca(%rip), %rsi     # 0xa719b
callq 0xd640
movq %rax, -0x228(%rbp)
jmp 0x181df
movq -0x228(%rbp), %rdi
movq 0xe2da3(%rip), %rsi     # 0xfaf90
callq 0xd6e0
jmp 0x181f4
movl $0x3, -0x184(%rbp)
leaq 0x8d545(%rip), %rsi     # 0xa574a
leaq 0x8d54f(%rip), %rdx     # 0xa575b
leaq 0x135661(%rip), %rcx    # 0x14d874
leaq -0x180(%rbp), %rdi
leaq -0x184(%rbp), %r8
callq 0x1c4b0
jmp 0x18228
leaq -0x180(%rbp), %rdi
callq 0x1c500
movb %al, -0x229(%rbp)
jmp 0x1823c
movb -0x229(%rbp), %al
testb $0x1, %al
jne 0x18248
jmp 0x1829e
jmp 0x18363
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
jmp 0x1852e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
leaq -0x168(%rbp), %rdi
callq 0x1c460
jmp 0x1852e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
jmp 0x183e7
leaq -0x190(%rbp), %rdi
callq 0x6f130
jmp 0x182ac
leaq -0x180(%rbp), %rdi
callq 0x1c520
movq %rax, -0x238(%rbp)
jmp 0x182c1
movq -0x238(%rbp), %r8
leaq 0x8d3dc(%rip), %rdx     # 0xa56ab
leaq -0x198(%rbp), %rdi
movl $0x2, %esi
movl $0x4e, %ecx
callq 0x6c7e0
jmp 0x182e7
leaq -0x198(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x6c8a0
jmp 0x182fc
leaq -0x198(%rbp), %rdi
callq 0x6c860
leaq -0x190(%rbp), %rdi
callq 0x1c540
movl $0x1, -0x19c(%rbp)
jmp 0x1836d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
jmp 0x18352
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
leaq -0x198(%rbp), %rdi
callq 0x6c860
leaq -0x190(%rbp), %rdi
callq 0x1c540
jmp 0x183e7
movl $0x0, -0x19c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x1c560
movl -0x19c(%rbp), %eax
testl %eax, %eax
jne 0x1850d
jmp 0x18389
movl $0x0, -0x1b4(%rbp)
leaq 0x933b5(%rip), %rsi     # 0xab74f
leaq 0x92758(%rip), %rdx     # 0xaaaf9
xorl %eax, %eax
movl %eax, %r9d
leaq -0x1b0(%rbp), %rdi
leaq -0x1b4(%rbp), %rcx
leaq -0x148(%rbp), %r8
callq 0x1c580
jmp 0x183c2
leaq -0x1b0(%rbp), %rdi
callq 0x1c500
movb %al, -0x239(%rbp)
jmp 0x183d6
movb -0x239(%rbp), %al
testb $0x1, %al
jne 0x183e2
jmp 0x1840f
jmp 0x184d1
leaq -0x180(%rbp), %rdi
callq 0x1c560
jmp 0x1852e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
jmp 0x18522
leaq -0x1c0(%rbp), %rdi
callq 0x6f130
jmp 0x1841d
leaq -0x1b0(%rbp), %rdi
callq 0x1c520
movq %rax, -0x248(%rbp)
jmp 0x18432
movq -0x248(%rbp), %r8
leaq 0x8d26b(%rip), %rdx     # 0xa56ab
leaq -0x1c8(%rbp), %rdi
movl $0x2, %esi
movl $0x4f, %ecx
callq 0x6c7e0
jmp 0x18458
leaq -0x1c8(%rbp), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x6c8a0
jmp 0x1846d
leaq -0x1c8(%rbp), %rdi
callq 0x6c860
leaq -0x1c0(%rbp), %rdi
callq 0x1c540
movl $0x1, -0x19c(%rbp)
jmp 0x184db
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
jmp 0x184c3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x140(%rbp)
movl %eax, -0x144(%rbp)
leaq -0x1c8(%rbp), %rdi
callq 0x6c860
leaq -0x1c0(%rbp), %rdi
callq 0x1c540
jmp 0x18522
movl $0x0, -0x19c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x1c560
movl -0x19c(%rbp), %eax
testl %eax, %eax
jne 0x1850d
jmp 0x184f3
leaq -0x120(%rbp), %rdi
xorl %esi, %esi
callq 0x1c5d0
jmp 0x18503
movl $0x0, -0x19c(%rbp)
leaq -0x120(%rbp), %rdi
callq 0x1c2f0
addq $0x250, %rsp            # imm = 0x250
popq %rbp
retq
leaq -0x1b0(%rbp), %rdi
callq 0x1c560
leaq -0x120(%rbp), %rdi
callq 0x1c2f0
movq -0x140(%rbp), %rdi
callq 0xdcb0
nopw %cs:(%rax,%rax)