// File: /workspace/github_cpp_makefile_star2_O3/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 0x378(%rsp), %rbx
movq %rbx, %rdi
callq 0x120b6
xorl %r12d, %r12d
leaq 0x2a0(%rsp), %r14
movl %r12d, -0x40(%r14)
movb %r12b, -0x3c(%r14)
xorps %xmm0, %xmm0
movups %xmm0, -0x38(%r14)
movups %xmm0, -0x28(%r14)
movups %xmm0, -0x18(%r14)
movq %r12, -0x8(%r14)
movq %r14, %rdi
callq 0xb7c0
movb %r12b, 0x40(%r14)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%r14)
leaq 0x2f0(%rsp), %rax
movl %r12d, (%rax)
movq %r12, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
leaq 0x350(%rsp), %rax
movl %r12d, (%rax)
movq %r12, 0x8(%rax)
movups %xmm0, -0x40(%rax)
movups %xmm0, -0x30(%rax)
movups %xmm0, -0x20(%rax)
movb %r12b, -0x10(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r12, 0x20(%rax)
leaq 0x14f0(%rip), %r15      # 0x121b2
leaq 0x28(%rsp), %rdx
movq %r15, (%rdx)
movq %r12, 0x8(%rdx)
leaq 0x260(%rsp), %rdi
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1ab30
leaq 0x157d(%rip), %r14      # 0x12264
leaq 0x28(%rsp), %rdx
movq %r14, (%rdx)
movq $0x0, 0x8(%rdx)
leaq 0x260(%rsp), %rdi
leaq 0x378(%rsp), %rcx
xorl %esi, %esi
callq 0x1ca1c
leaq 0x28(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x260(%rsp), %rdi
callq 0x1cbc4
movl 0x378(%rsp), %eax
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x2, (%r8)
leaq 0x3865d(%rip), %rsi     # 0x493a7
leaq 0x38666(%rip), %rdx     # 0x493b7
leaq 0x28(%rsp), %rdi
callq 0x1ce9b
cmpb $0x0, 0x28(%rsp)
je 0x11025
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
leaq 0x378(%rsp), %rbx
movq %rbx, %rdi
callq 0x12316
movl 0x378(%rsp), %eax
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x3, (%r8)
leaq 0x38601(%rip), %rsi     # 0x493a7
leaq 0x3860d(%rip), %rdx     # 0x493ba
leaq 0x28(%rsp), %rdi
callq 0x1ce9b
cmpb $0x0, 0x28(%rsp)
je 0x11041
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
leaq 0x28(%rsp), %rdx
movq %r15, (%rdx)
movq $0x0, 0x8(%rdx)
leaq 0x148(%rsp), %rcx
movq %rbx, (%rcx)
leaq 0x260(%rsp), %rdi
xorl %esi, %esi
callq 0x1d018
leaq 0x28(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x260(%rsp), %rdi
callq 0x1cbc4
movl 0x378(%rsp), %eax
leaq 0x148(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x8(%rsp), %r8
movl $0x6, (%r8)
leaq 0x38573(%rip), %rsi     # 0x493a7
leaq 0x38582(%rip), %rdx     # 0x493bd
leaq 0x28(%rsp), %rdi
callq 0x1ce9b
cmpb $0x0, 0x28(%rsp)
je 0x110df
leaq 0x30(%rsp), %rdi
xorl %r15d, %r15d
xorl %esi, %esi
callq 0x125fc
leaq 0x188(%rsp), %rbx
movl %r15d, -0x40(%rbx)
movb %r15b, -0x3c(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, -0x38(%rbx)
movups %xmm0, -0x28(%rbx)
movups %xmm0, -0x18(%rbx)
movq %r15, -0x8(%rbx)
movq %rbx, %rdi
callq 0xb7c0
movb %r15b, 0x40(%rbx)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rbx)
leaq 0x1d8(%rsp), %rax
movl %r15d, (%rax)
movq %r15, 0x8(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
leaq 0x238(%rsp), %rax
movl %r15d, (%rax)
movq %r15, 0x8(%rax)
movups %xmm0, -0x40(%rax)
movups %xmm0, -0x30(%rax)
movups %xmm0, -0x20(%rax)
movb %r15b, -0x10(%rax)
movq %rax, 0x10(%rax)
movq %rax, 0x18(%rax)
movq %r15, 0x20(%rax)
leaq 0x28(%rsp), %rdx
movq %r14, (%rdx)
movq %r15, 0x8(%rdx)
leaq 0x148(%rsp), %rdi
leaq 0x378(%rsp), %rcx
xorl %esi, %esi
callq 0x1ca1c
leaq 0x28(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x148(%rsp), %rdi
callq 0x1cbc4
movl 0x378(%rsp), %eax
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x18(%rsp), %r8
movl $0x7, (%r8)
leaq 0x38474(%rip), %rsi     # 0x493a7
leaq 0x38486(%rip), %rdx     # 0x493c0
leaq 0x28(%rsp), %rdi
callq 0x1ce9b
cmpb $0x0, 0x28(%rsp)
je 0x1117d
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
leaq 0x28(%rsp), %rdi
callq 0x120b6
leaq 0x8(%rsp), %rdx
movq %r14, (%rdx)
movq $0x0, 0x8(%rdx)
leaq 0x148(%rsp), %rdi
leaq 0x28(%rsp), %rbx
xorl %esi, %esi
movq %rbx, %rcx
callq 0x1d118
leaq 0x8(%rsp), %rdx
movq %r14, (%rdx)
movq $0x0, 0x8(%rdx)
leaq 0x18(%rsp), %rcx
movq %rbx, (%rcx)
leaq 0x148(%rsp), %rdi
xorl %esi, %esi
callq 0x1d2c0
leaq 0x8(%rsp), %rsi
movl $0x1, (%rsi)
leaq 0x148(%rsp), %rdi
callq 0x1cbc4
movl 0x28(%rsp), %eax
leaq 0x18(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x20(%rsp), %r8
movl $0x2, (%r8)
leaq 0x383da(%rip), %rsi     # 0x493c3
leaq 0x383c7(%rip), %rdx     # 0x493b7
leaq 0x8(%rsp), %rdi
callq 0x1ce9b
cmpb $0x0, 0x8(%rsp)
jne 0x112e8
leaq 0x18(%rsp), %rdi
callq 0x28fb6
movq 0x10(%rsp), %rax
testq %rax, %rax
je 0x11287
movq (%rax), %r8
jmp 0x1128e
leaq 0x148(%rsp), %rdi
callq 0x28fb6
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x11064
movq (%rax), %r8
jmp 0x1106b
leaq 0x148(%rsp), %rdi
callq 0x28fb6
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x11102
movq (%rax), %r8
jmp 0x11109
leaq 0x3ca39(%rip), %r8      # 0x4daa4
leaq 0x380f2(%rip), %rdx     # 0x49164
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x118, %ecx            # imm = 0x118
callq 0x2703e
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x270da
leaq 0x8(%rsp), %rdi
callq 0x270aa
cmpq $0x0, 0x148(%rsp)
je 0x110ce
movl $0x1, %edi
callq 0x2703b
testb %al, %al
je 0x110ce
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x110ce
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
jmp 0x1130b
leaq 0x148(%rsp), %rdi
callq 0x28fb6
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x1119d
movq (%rax), %r8
jmp 0x111a4
leaq 0x3c99b(%rip), %r8      # 0x4daa4
leaq 0x38054(%rip), %rdx     # 0x49164
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x11c, %ecx            # imm = 0x11C
callq 0x2703e
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x270da
leaq 0x8(%rsp), %rdi
callq 0x270aa
cmpq $0x0, 0x148(%rsp)
je 0x1116c
movl $0x1, %edi
callq 0x2703b
testb %al, %al
je 0x1116c
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x1116c
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
jmp 0x1130b
leaq 0x8(%rsp), %rdi
callq 0x28fb6
movq 0x30(%rsp), %rax
testq %rax, %rax
je 0x11218
movq (%rax), %r8
jmp 0x1121f
leaq 0x3c900(%rip), %r8      # 0x4daa4
leaq 0x37fb9(%rip), %rdx     # 0x49164
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x121, %ecx            # imm = 0x121
callq 0x2703e
leaq 0x8(%rsp), %rdi
leaq 0x148(%rsp), %rsi
callq 0x270da
leaq 0x8(%rsp), %rdi
callq 0x270aa
cmpq $0x0, 0x148(%rsp)
je 0x11207
movl $0x1, %edi
callq 0x2703b
testb %al, %al
je 0x11207
movq 0x148(%rsp), %rdi
testq %rdi, %rdi
je 0x11207
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
jmp 0x1130b
leaq 0x3c885(%rip), %r8      # 0x4daa4
leaq 0x37f3e(%rip), %rdx     # 0x49164
leaq 0x18(%rsp), %rdi
movl $0x2, %esi
movl $0x128, %ecx            # imm = 0x128
callq 0x2703e
leaq 0x18(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x270da
leaq 0x18(%rsp), %rdi
callq 0x270aa
cmpq $0x0, 0x8(%rsp)
je 0x11279
movl $0x1, %edi
callq 0x2703b
testb %al, %al
je 0x11279
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x11279
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x30(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
jmp 0x112fe
leaq 0x3c816(%rip), %r8      # 0x4daa4
leaq 0x37ecf(%rip), %rdx     # 0x49164
leaq 0x20(%rsp), %rdi
movl $0x2, %esi
movl $0x12f, %ecx            # imm = 0x12F
callq 0x2703e
leaq 0x20(%rsp), %rdi
leaq 0x18(%rsp), %rsi
callq 0x270da
leaq 0x20(%rsp), %rdi
callq 0x270aa
cmpq $0x0, 0x18(%rsp)
je 0x112e8
movl $0x1, %edi
callq 0x2703b
testb %al, %al
je 0x112e8
movq 0x18(%rsp), %rdi
testq %rdi, %rdi
je 0x112e8
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
callq 0x125fc
leaq 0x30(%rsp), %rdi
callq 0x14c94
leaq 0x148(%rsp), %rdi
callq 0x1a9b2
leaq 0x260(%rsp), %rdi
callq 0x1a9b2
leaq 0x380(%rsp), %rdi
callq 0x14c94
addq $0x498, %rsp            # imm = 0x498
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x11427
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x270aa
jmp 0x1134b
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x11f0a
jmp 0x1135a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x11f1c
jmp 0x1138d
jmp 0x11427
jmp 0x11427
jmp 0x1138a
jmp 0x1138a
jmp 0x11427
jmp 0x1138a
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x270aa
jmp 0x1139c
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
callq 0x14c94
jmp 0x113ca
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x11f0a
jmp 0x113ad
jmp 0x113c7
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x11f1c
jmp 0x113ca
jmp 0x11427
jmp 0x11427
jmp 0x11427
jmp 0x113c7
jmp 0x113f3
jmp 0x113c7
jmp 0x11404
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x1a9b2
jmp 0x11438
jmp 0x11418
jmp 0x11427
jmp 0x11427
jmp 0x11427
jmp 0x11435
jmp 0x113f3
jmp 0x11435
jmp 0x11404
jmp 0x11435
jmp 0x11418
jmp 0x11427
jmp 0x11427
jmp 0x11427
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x270aa
jmp 0x11407
jmp 0x11435
movq %rax, %rbx
leaq 0x148(%rsp), %rdi
callq 0x11f0a
jmp 0x1141b
jmp 0x11435
movq %rax, %rbx
leaq 0x28(%rsp), %rdi
callq 0x11f1c
jmp 0x11438
movq %rax, %rdi
callq 0xd7cf
jmp 0x11435
jmp 0x11435
jmp 0x11435
movq %rax, %rbx
leaq 0x260(%rsp), %rdi
callq 0x1a9b2
leaq 0x380(%rsp), %rdi
callq 0x14c94
movq %rbx, %rdi
callq 0xba10