// File: /workspace/github_cpp_makefile_star2_O2/Barath-Kannan[P]SignalsAndSlots/test/SignalTest.cpp
// Function: SignalTest_MemberFunction_Test::TestBody()
TEST_F(SignalTest, MemberFunction) {
    TestClass tc;
    Signal<int> testSignal;

    testSignal.connectMemberSlot(ExecutorScheme::SYNCHRONOUS, &TestClass::dostuff, tc);
    testSignal.connectMemberSlot(ExecutorScheme::SYNCHRONOUS, &TestClass::dostuffconst, tc);

    testSignal.emitSignal(1);

    ASSERT_EQ(tc.getCounter(), 2u);

    tc.emitIncrement();

    ASSERT_EQ(tc.getCounter(), 3u);

    testSignal.connectMemberSlot(ExecutorScheme::SYNCHRONOUS, &TestClass::dostuff, &tc);

    testSignal.emitSignal(1);
    ASSERT_EQ(tc.getCounter(), 6u);

    Signal<int> testSignal2;
    testSignal2.connectMemberSlot(ExecutorScheme::SYNCHRONOUS, &TestClass::dostuffconst, tc);

    testSignal2.emitSignal(1);

    ASSERT_EQ(tc.getCounter(), 7u);

    const TestClass tc2;

    testSignal2.connectMemberSlot(ExecutorScheme::SYNCHRONOUS, &TestClass::dostuffconst, tc2);
    testSignal2.connectMemberSlot(ExecutorScheme::SYNCHRONOUS, &TestClass::dostuffconst, &tc2);
    testSignal2.emitSignal(1);
    ASSERT_EQ(tc2.getCounter(), 2u);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x498, %rsp            # imm = 0x498
leaq 0x260(%rsp), %rbx
movq %rbx, %rdi
callq 0x1030e
leaq 0x380(%rsp), %r14
movq %r14, %rdi
callq 0x12cec
leaq 0xf4f(%rip), %r12       # 0x10368
leaq 0x28(%rsp), %rdx
movq %r12, (%rdx)
andq $0x0, 0x8(%rdx)
movq %r14, %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x18138
leaq 0xf8c(%rip), %r15       # 0x103c6
leaq 0x28(%rsp), %rdx
movq %r15, (%rdx)
andq $0x0, 0x8(%rdx)
leaq 0x380(%rsp), %rdi
leaq 0x260(%rsp), %rcx
xorl %esi, %esi
callq 0x19c0e
leaq 0x28(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x380(%rsp), %rdi
callq 0x19de8
movl 0x260(%rsp), %eax
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x2, (%r8)
leaq 0x2af1d(%rip), %rsi     # 0x3a3b7
leaq 0x2af26(%rip), %rdx     # 0x3a3c7
leaq 0x28(%rsp), %rdi
callq 0x1a05c
cmpb $0x0, 0x28(%rsp)
je 0xf6fb
leaq 0x30(%rsp), %rdi
callq 0x10766
leaq 0x260(%rsp), %rbx
movq %rbx, %rdi
callq 0x10424
movl 0x260(%rsp), %eax
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x3, (%r8)
leaq 0x2aec3(%rip), %rsi     # 0x3a3b7
leaq 0x2aecf(%rip), %rdx     # 0x3a3ca
leaq 0x28(%rsp), %rdi
callq 0x1a05c
cmpb $0x0, 0x28(%rsp)
je 0xf717
leaq 0x30(%rsp), %r14
movq %r14, %rdi
callq 0x10766
movq %r12, -0x8(%r14)
andq $0x0, (%r14)
leaq 0x148(%rsp), %rcx
movq %rbx, (%rcx)
leaq 0x380(%rsp), %rdi
leaq 0x28(%rsp), %rdx
xorl %esi, %esi
callq 0x1a17a
leaq 0x28(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x380(%rsp), %rdi
callq 0x19de8
movl 0x260(%rsp), %eax
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x6, (%r8)
leaq 0x2ae37(%rip), %rsi     # 0x3a3b7
leaq 0x2ae46(%rip), %rdx     # 0x3a3cd
leaq 0x28(%rsp), %rdi
callq 0x1a05c
cmpb $0x0, 0x28(%rsp)
je 0xf76a
leaq 0x30(%rsp), %rbx
movq %rbx, %rdi
callq 0x10766
leaq 0x148(%rsp), %r14
movq %r14, %rdi
callq 0x12cec
movq %r15, -0x8(%rbx)
andq $0x0, (%rbx)
leaq 0x28(%rsp), %rdx
leaq 0x260(%rsp), %rcx
movq %r14, %rdi
xorl %esi, %esi
callq 0x19c0e
leaq 0x28(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x148(%rsp), %rdi
callq 0x19de8
movl 0x260(%rsp), %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x18(%rsp), %r8
movl $0x7, (%r8)
leaq 0x2ada6(%rip), %rsi     # 0x3a3b7
leaq 0x2adb8(%rip), %rdx     # 0x3a3d0
leaq 0x28(%rsp), %rdi
callq 0x1a05c
cmpb $0x0, 0x28(%rsp)
je 0xf7ba
leaq 0x30(%rsp), %rdi
callq 0x10766
leaq 0x28(%rsp), %rdi
callq 0x1030e
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
andq $0x0, 0x8(%rdx)
leaq 0x148(%rsp), %rdi
leaq 0x28(%rsp), %rbx
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1a1f6
leaq 0x8(%rsp), %rdx
movq %r15, (%rdx)
andq $0x0, 0x8(%rdx)
leaq 0x18(%rsp), %rcx
movq %rbx, (%rcx)
leaq 0x148(%rsp), %rdi
xorl %esi, %esi
callq 0x1a3d0
leaq 0x8(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x148(%rsp), %rdi
callq 0x19de8
movl 0x28(%rsp), %eax
leaq 0x18(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x20(%rsp), %r8
movl $0x2, (%r8)
leaq 0x2ad14(%rip), %rsi     # 0x3a3d3
leaq 0x2ad01(%rip), %rdx     # 0x3a3c7
leaq 0x8(%rsp), %rdi
callq 0x1a05c
cmpb $0x0, 0x8(%rsp)
jne 0xf8ee
leaq 0x18(%rsp), %rdi
callq 0x23d1e
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0xf8ab
movq (%rax), %r8
jmp 0xf8b2
leaq 0x148(%rsp), %rdi
callq 0x23d1e
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xf733
movq (%rax), %r8
jmp 0xf73a
leaq 0x148(%rsp), %rdi
callq 0x23d1e
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xf786
movq (%rax), %r8
jmp 0xf78d
leaq 0x2f30a(%rip), %r8      # 0x3ea44
leaq 0x2aa33(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x118, %ecx            # imm = 0x118
callq 0x22794
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x22812
jmp 0xf80c
leaq 0x148(%rsp), %rdi
callq 0x23d1e
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xf7da
movq (%rax), %r8
jmp 0xf7e1
leaq 0x2f2b7(%rip), %r8      # 0x3ea44
leaq 0x2a9e0(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x11c, %ecx            # imm = 0x11C
callq 0x22794
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x22812
jmp 0xf80c
leaq 0x8(%rsp), %rdi
callq 0x23d1e
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0xf859
movq (%rax), %r8
jmp 0xf860
leaq 0x2f263(%rip), %r8      # 0x3ea44
leaq 0x2a98c(%rip), %rdx     # 0x3a174
leaq 0x8(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x121, %ecx            # imm = 0x121
callq 0x22794
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x22812
leaq 0x30(%rsp), %rbx
leaq 0x8(%rsp), %rdi
callq 0x227f4
leaq 0x148(%rsp), %rdi
callq 0x10720
movq %rbx, %rdi
callq 0x10766
leaq 0x380(%rsp), %rdi
callq 0x17fb8
leaq 0x268(%rsp), %rdi
callq 0x12bb8
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r14
popq %r15
retq
leaq 0x2f1e4(%rip), %r8      # 0x3ea44
leaq 0x2a90d(%rip), %rdx     # 0x3a174
leaq 0x18(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x128, %ecx            # imm = 0x128
callq 0x22794
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x22812
leaq 0x30(%rsp), %rbx
leaq 0x18(%rsp), %rdi
callq 0x227f4
leaq 0x8(%rsp), %rdi
callq 0x10720
movq %rbx, %rdi
callq 0x10766
jmp 0xf902
leaq 0x2f192(%rip), %r8      # 0x3ea44
leaq 0x2a8bb(%rip), %rdx     # 0x3a174
leaq 0x20(%rsp), %rdi
pushq $0x2
popq %rsi
movl $0x12f, %ecx            # imm = 0x12F
callq 0x22794
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x22812
leaq 0x20(%rsp), %rdi
callq 0x227f4
leaq 0x18(%rsp), %rdi
callq 0x10720
leaq 0x10(%rsp), %rdi
callq 0x10766
leaq 0x30(%rsp), %rdi
callq 0x12bb8
leaq 0x148(%rsp), %rdi
callq 0x17fb8
jmp 0xf830
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x227f4
jmp 0xf926
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x10720
jmp 0xf935
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x10766
jmp 0xf968
jmp 0xf965
jmp 0xf965
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x227f4
jmp 0xf959
jmp 0xf965
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10720
jmp 0xf977
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x12bb8
jmp 0xf992
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x10766
jmp 0xf992
jmp 0xf98f
jmp 0xf9ad
jmp 0xf98f
jmp 0xf9bc
jmp 0xf98f
jmp 0xf9d0
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x17fb8
jmp 0xf9ea
jmp 0xf9ad
jmp 0xf9e7
jmp 0xf9bc
jmp 0xf9e7
jmp 0xf9d0
jmp 0xf9e7
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x227f4
jmp 0xf9bf
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x10720
jmp 0xf9d3
jmp 0xf9e7
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x10766
jmp 0xf9ea
jmp 0xf9e7
jmp 0xf9e7
jmp 0xf9e7
jmp 0xf9e7
movq %rax, %rbx
leaq 0x380(%rsp), %rdi
callq 0x17fb8
leaq 0x268(%rsp), %rdi
callq 0x12bb8
movq %rbx, %rdi
callq 0xba30