// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/test/test_sink.cc
// Function: sink_action_implicit_Test::TestBody()
TEST(sink, action_implicit) {
    int n = 0;
    auto setter = [&n](int y) { n = y; };

    auto a = to::action(setter);
    EXPECT_TRUE(a("17"));
    EXPECT_EQ(17, n);

    EXPECT_FALSE(a("fishsticks"));
    EXPECT_EQ(17, n);

    int y = 0;
    auto voidsetter = [&y]() { ++y; };

    auto b = to::action(voidsetter);
    EXPECT_TRUE(b(nullptr));
    EXPECT_EQ(1, y);
    EXPECT_TRUE(b("wizard"));
    EXPECT_EQ(2, y);
}

// Assembly:
pushq %r14
pushq %rbx
subq $0x98, %rsp
leaq 0x64(%rsp), %rax
movl $0x0, (%rax)
movq $0x0, 0x80(%rsp)
movq %rax, 0x78(%rsp)
leaq 0x1b15(%rip), %rax      # 0x14f04
movq %rax, 0x90(%rsp)
leaq 0x1b3e(%rip), %rax      # 0x14f3c
movq %rax, 0x88(%rsp)
leaq 0x58d1c(%rip), %rdx     # 0x6c129
leaq 0x40(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x1567a
cmpb $0x1, 0x40(%rsp)
jne 0x13433
movl 0x44(%rsp), %eax
movq 0x78(%rsp), %rcx
movl %eax, (%rcx)
jmp 0x134e8
leaq 0x28(%rsp), %r14
movb $0x0, -0x8(%r14)
movq $0x0, (%r14)
leaq 0x10(%rsp), %rdi
callq 0x4ca86
leaq 0x58d4f(%rip), %rdx     # 0x6c1a4
leaq 0x58caa(%rip), %rcx     # 0x6c106
leaq 0x58ca9(%rip), %r8      # 0x6c10c
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46893
movq 0x40(%rsp), %r8
leaq 0x58c37(%rip), %rdx     # 0x6c0b5
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x4b, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x134c6
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x134d6
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x134e8
movq %r14, %rdi
callq 0x153ca
leaq 0x20(%rsp), %rcx
movl $0x11, (%rcx)
leaq 0x58c2f(%rip), %rsi     # 0x6c129
leaq 0x5f0f0(%rip), %rdx     # 0x725f1
leaq 0x40(%rsp), %rdi
leaq 0x64(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x40(%rsp)
jne 0x1357b
leaq 0x20(%rsp), %rdi
callq 0x4ca86
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x13530
movq (%rax), %r8
jmp 0x13537
leaq 0x5ba9e(%rip), %r8      # 0x6efd5
leaq 0x58b77(%rip), %rdx     # 0x6c0b5
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x4c, %ecx
callq 0x4902a
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46a1c
leaq 0x10(%rsp), %rdi
callq 0x49096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1357b
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x1358f
leaq 0x48(%rsp), %rdi
callq 0x153ca
leaq 0x58c16(%rip), %rax     # 0x6c1ac
movq %rax, 0x40(%rsp)
cmpq $0x0, 0x88(%rsp)
je 0x139bc
leaq 0x78(%rsp), %rdi
leaq 0x40(%rsp), %rsi
callq *0x18(%rdi)
movl %eax, %ecx
xorb $0x1, %cl
movb %cl, 0x20(%rsp)
movq $0x0, 0x28(%rsp)
testb %al, %al
je 0x1367a
leaq 0x28(%rsp), %r14
leaq 0x10(%rsp), %rdi
callq 0x4ca86
leaq 0x58bd0(%rip), %rdx     # 0x6c1b7
leaq 0x58b1e(%rip), %rcx     # 0x6c10c
leaq 0x58b11(%rip), %r8      # 0x6c106
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46893
movq 0x40(%rsp), %r8
leaq 0x58aa5(%rip), %rdx     # 0x6c0b5
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x4e, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13658
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13668
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x1367a
movq %r14, %rdi
callq 0x153ca
leaq 0x20(%rsp), %rcx
movl $0x11, (%rcx)
leaq 0x58a9d(%rip), %rsi     # 0x6c129
leaq 0x5ef5e(%rip), %rdx     # 0x725f1
leaq 0x40(%rsp), %rdi
leaq 0x64(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x40(%rsp)
jne 0x1370d
leaq 0x20(%rsp), %rdi
callq 0x4ca86
movq 0x48(%rsp), %rax
testq %rax, %rax
je 0x136c2
movq (%rax), %r8
jmp 0x136c9
leaq 0x5b90c(%rip), %r8      # 0x6efd5
leaq 0x589e5(%rip), %rdx     # 0x6c0b5
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x4f, %ecx
callq 0x4902a
leaq 0x10(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq 0x46a1c
leaq 0x10(%rsp), %rdi
callq 0x49096
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x1370d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x13721
leaq 0x48(%rsp), %rdi
callq 0x153ca
movq $0x0, 0x48(%rsp)
leaq 0x74(%rsp), %r8
movq %r8, 0x40(%rsp)
leaq 0x1827(%rip), %rax      # 0x14f62
movq %rax, 0x58(%rsp)
leaq 0x1823(%rip), %rax      # 0x14f6a
movq %rax, 0x50(%rsp)
movl $0x1, %eax
movl %eax, (%r8)
leaq 0x10(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x5a84d(%rip), %rsi     # 0x6dfaf
leaq 0x5e7ca(%rip), %rdx     # 0x71f33
leaq 0x20(%rsp), %rdi
callq 0x157b7
cmpb $0x0, 0x20(%rsp)
jne 0x137de
leaq 0x10(%rsp), %rdi
callq 0x4ca86
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x13793
movq (%rax), %r8
jmp 0x1379a
leaq 0x5b83b(%rip), %r8      # 0x6efd5
leaq 0x58914(%rip), %rdx     # 0x6c0b5
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x56, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x137de
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x137f2
leaq 0x28(%rsp), %rdi
callq 0x153ca
leaq 0x589ce(%rip), %rax     # 0x6c1c7
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x50(%rsp)
je 0x139c1
leaq 0x40(%rsp), %rdi
leaq 0x20(%rsp), %rsi
callq *0x18(%rdi)
movb %al, 0x10(%rsp)
movq $0x0, 0x18(%rsp)
testb %al, %al
jne 0x138d5
leaq 0x18(%rsp), %r14
leaq 0x8(%rsp), %rdi
callq 0x4ca86
leaq 0x5898c(%rip), %rdx     # 0x6c1ce
leaq 0x588bd(%rip), %rcx     # 0x6c106
leaq 0x588bc(%rip), %r8      # 0x6c10c
leaq 0x20(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46893
movq 0x20(%rsp), %r8
leaq 0x5884a(%rip), %rdx     # 0x6c0b5
leaq 0x68(%rsp), %rdi
movl $0x1, %esi
movl $0x57, %ecx
callq 0x4902a
leaq 0x68(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
leaq 0x68(%rsp), %rdi
callq 0x49096
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x138b3
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x138c3
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x138d5
movq %r14, %rdi
callq 0x153ca
leaq 0x10(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x5a6b8(%rip), %rsi     # 0x6df9f
leaq 0x5e645(%rip), %rdx     # 0x71f33
leaq 0x20(%rsp), %rdi
leaq 0x74(%rsp), %r8
callq 0x157b7
cmpb $0x0, 0x20(%rsp)
jne 0x13968
leaq 0x10(%rsp), %rdi
callq 0x4ca86
movq 0x28(%rsp), %rax
testq %rax, %rax
je 0x1391d
movq (%rax), %r8
jmp 0x13924
leaq 0x5b6b1(%rip), %r8      # 0x6efd5
leaq 0x5878a(%rip), %rdx     # 0x6c0b5
leaq 0x8(%rsp), %rdi
movl $0x1, %esi
movl $0x58, %ecx
callq 0x4902a
leaq 0x8(%rsp), %rdi
leaq 0x10(%rsp), %rsi
callq 0x46a1c
leaq 0x8(%rsp), %rdi
callq 0x49096
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13968
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x1397c
leaq 0x28(%rsp), %rdi
callq 0x153ca
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x13995
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x139b1
leaq 0x78(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
addq $0x98, %rsp
popq %rbx
popq %r14
retq
callq 0xd1f0
callq 0xd1f0
jmp 0x13a26
jmp 0x13a35
jmp 0x13a4a
movq %rax, %rbx
leaq 0x68(%rsp), %rdi
callq 0x49096
jmp 0x139de
movq %rax, %rbx
leaq 0x30(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x139fe
movq 0x30(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x139fe
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x13a13
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13a13
movq %rax, %rbx
movq 0x18(%rsp), %rsi
testq %rsi, %rsi
je 0x13b23
movq %r14, %rdi
jmp 0x13a60
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x49096
jmp 0x13a38
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13a4d
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13a4d
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x13b23
leaq 0x28(%rsp), %rdi
callq 0x153ca
jmp 0x13b23
jmp 0x13a7b
jmp 0x13a8a
jmp 0x13a9f
jmp 0x13ab7
jmp 0x13ac6
jmp 0x13ae6
jmp 0x13afb
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x49096
jmp 0x13a8d
movq %rax, %rbx
movq 0x20(%rsp), %rdi
testq %rdi, %rdi
je 0x13aa2
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13aa2
movq %rax, %rbx
movq 0x48(%rsp), %rsi
testq %rsi, %rsi
je 0x13b41
leaq 0x48(%rsp), %rdi
jmp 0x13b0b
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x49096
jmp 0x13ac9
movq %rax, %rbx
leaq 0x50(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x13ae9
movq 0x50(%rsp), %rsi
incq %rsi
callq 0xd530
jmp 0x13ae9
movq %rax, %rbx
movq 0x10(%rsp), %rdi
testq %rdi, %rdi
je 0x13afe
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x13afe
movq %rax, %rbx
movq 0x28(%rsp), %rsi
testq %rsi, %rsi
je 0x13b41
movq %r14, %rdi
callq 0x153ca
jmp 0x13b41
jmp 0x13b67
jmp 0x13b67
jmp 0x13b20
jmp 0x13b20
jmp 0x13b3e
jmp 0x13b3e
jmp 0x13b3e
movq %rax, %rbx
movq 0x50(%rsp), %rax
testq %rax, %rax
je 0x13b41
leaq 0x40(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
jmp 0x13b41
movq %rax, %rbx
movq 0x88(%rsp), %rax
testq %rax, %rax
je 0x13b5d
leaq 0x78(%rsp), %rdi
movq %rdi, %rsi
movl $0x3, %edx
callq *%rax
movq %rbx, %rdi
callq 0xda70
jmp 0x13b67
movq %rax, %rdi
callq 0x1536f
nop