// File: 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 %rbp
movq %rsp, %rbp
subq $0x2a0, %rsp            # imm = 0x2A0
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rsi
leaq -0x38(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x19970
movq -0x258(%rbp), %rdi
leaq 0xaf644(%rip), %rsi     # 0xc847c
callq 0x1d470
movb %al, -0x249(%rbp)
jmp 0x18e45
movb -0x249(%rbp), %al
andb $0x1, %al
movb %al, -0x51(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x50(%rbp), %rdi
leaq -0x51(%rbp), %rsi
callq 0x1d4a0
jmp 0x18e63
leaq -0x50(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x259(%rbp)
jmp 0x18e74
movb -0x259(%rbp), %al
testb $0x1, %al
jne 0x18e80
jmp 0x18ea7
jmp 0x18f7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x18fda
leaq -0x70(%rbp), %rdi
callq 0x84210
jmp 0x18eb2
leaq 0xaf648(%rip), %rdx     # 0xc8501
leaq 0xaf58f(%rip), %rcx     # 0xc844f
leaq 0xaf58e(%rip), %r8      # 0xc8455
leaq -0x98(%rbp), %rdi
leaq -0x50(%rbp), %rsi
callq 0x7d210
jmp 0x18ed9
leaq -0x98(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xaf506(%rip), %rdx     # 0xc83f5
leaq -0x78(%rbp), %rdi
movl $0x1, %esi
movl $0x4b, %ecx
callq 0x80580
jmp 0x18f04
leaq -0x78(%rbp), %rdi
leaq -0x70(%rbp), %rsi
callq 0x7d370
jmp 0x18f13
leaq -0x78(%rbp), %rdi
callq 0x80600
leaq -0x98(%rbp), %rdi
callq 0x10fc8
leaq -0x70(%rbp), %rdi
callq 0x1d500
jmp 0x18f7b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x18f70
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x18f64
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x80600
leaq -0x98(%rbp), %rdi
callq 0x10fc8
leaq -0x70(%rbp), %rdi
callq 0x1d500
jmp 0x18fda
leaq -0x50(%rbp), %rdi
callq 0x1d520
movl $0x11, -0xac(%rbp)
leaq 0xaf4e7(%rip), %rsi     # 0xc847c
leaq 0xb60b1(%rip), %rdx     # 0xcf04d
leaq -0xa8(%rbp), %rdi
leaq -0xac(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x1d5d0
jmp 0x18fb5
leaq -0xa8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x25a(%rbp)
jmp 0x18fc9
movb -0x25a(%rbp), %al
testb $0x1, %al
jne 0x18fd5
jmp 0x18ff9
jmp 0x190a5
leaq -0x50(%rbp), %rdi
callq 0x1d520
jmp 0x19954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19117
leaq -0xb8(%rbp), %rdi
callq 0x84210
jmp 0x19007
leaq -0xa8(%rbp), %rdi
callq 0x1d620
movq %rax, -0x268(%rbp)
jmp 0x1901c
movq -0x268(%rbp), %r8
leaq 0xaf3cb(%rip), %rdx     # 0xc83f5
leaq -0xc0(%rbp), %rdi
movl $0x1, %esi
movl $0x4c, %ecx
callq 0x80580
jmp 0x19042
leaq -0xc0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x7d370
jmp 0x19057
leaq -0xc0(%rbp), %rdi
callq 0x80600
leaq -0xb8(%rbp), %rdi
callq 0x1d500
jmp 0x190a5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19097
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x80600
leaq -0xb8(%rbp), %rdi
callq 0x1d500
jmp 0x19117
leaq -0xa8(%rbp), %rdi
callq 0x1d520
leaq 0xaf451(%rip), %rsi     # 0xc8509
leaq -0x38(%rbp), %rdi
callq 0x1d470
movb %al, -0x269(%rbp)
jmp 0x190c9
movb -0x269(%rbp), %al
notb %al
andb $0x1, %al
movb %al, -0xd1(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0xd0(%rbp), %rdi
leaq -0xd1(%rbp), %rsi
callq 0x1d4a0
jmp 0x190f2
leaq -0xd0(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x26a(%rbp)
jmp 0x19106
movb -0x26a(%rbp), %al
testb $0x1, %al
jne 0x19112
jmp 0x19139
jmp 0x19228
leaq -0xa8(%rbp), %rdi
callq 0x1d520
jmp 0x19954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1928a
leaq -0xe0(%rbp), %rdi
callq 0x84210
jmp 0x19147
leaq 0xaf3c6(%rip), %rdx     # 0xc8514
leaq 0xaf300(%rip), %rcx     # 0xc8455
leaq 0xaf2f3(%rip), %r8      # 0xc844f
leaq -0x108(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x7d210
jmp 0x19171
leaq -0x108(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xaf26e(%rip), %rdx     # 0xc83f5
leaq -0xe8(%rbp), %rdi
movl $0x1, %esi
movl $0x4e, %ecx
callq 0x80580
jmp 0x1919f
leaq -0xe8(%rbp), %rdi
leaq -0xe0(%rbp), %rsi
callq 0x7d370
jmp 0x191b4
leaq -0xe8(%rbp), %rdi
callq 0x80600
leaq -0x108(%rbp), %rdi
callq 0x10fc8
leaq -0xe0(%rbp), %rdi
callq 0x1d500
jmp 0x19228
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1921a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1920e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0xe8(%rbp), %rdi
callq 0x80600
leaq -0x108(%rbp), %rdi
callq 0x10fc8
leaq -0xe0(%rbp), %rdi
callq 0x1d500
jmp 0x1928a
leaq -0xd0(%rbp), %rdi
callq 0x1d520
movl $0x11, -0x11c(%rbp)
leaq 0xaf237(%rip), %rsi     # 0xc847c
leaq 0xb5e01(%rip), %rdx     # 0xcf04d
leaq -0x118(%rbp), %rdi
leaq -0x11c(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x1d5d0
jmp 0x19265
leaq -0x118(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x26b(%rbp)
jmp 0x19279
movb -0x26b(%rbp), %al
testb $0x1, %al
jne 0x19285
jmp 0x192ac
jmp 0x1935b
leaq -0xd0(%rbp), %rdi
callq 0x1d520
jmp 0x19954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19406
leaq -0x128(%rbp), %rdi
callq 0x84210
jmp 0x192ba
leaq -0x118(%rbp), %rdi
callq 0x1d620
movq %rax, -0x278(%rbp)
jmp 0x192cf
movq -0x278(%rbp), %r8
leaq 0xaf118(%rip), %rdx     # 0xc83f5
leaq -0x130(%rbp), %rdi
movl $0x1, %esi
movl $0x4f, %ecx
callq 0x80580
jmp 0x192f5
leaq -0x130(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x7d370
jmp 0x1930a
leaq -0x130(%rbp), %rdi
callq 0x80600
leaq -0x128(%rbp), %rdi
callq 0x1d500
jmp 0x1935b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1934a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x130(%rbp), %rdi
callq 0x80600
leaq -0x128(%rbp), %rdi
callq 0x1d500
jmp 0x19406
leaq -0x118(%rbp), %rdi
callq 0x1d520
movl $0x0, -0x134(%rbp)
leaq -0x134(%rbp), %rax
movq %rax, -0x140(%rbp)
movq -0x140(%rbp), %rax
movq %rax, -0x168(%rbp)
movq -0x168(%rbp), %rsi
leaq -0x160(%rbp), %rdi
callq 0x199b0
jmp 0x193a2
xorl %eax, %eax
movl %eax, %esi
leaq -0x160(%rbp), %rdi
callq 0x1d470
movb %al, -0x279(%rbp)
jmp 0x193ba
movb -0x279(%rbp), %al
andb $0x1, %al
movb %al, -0x179(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x178(%rbp), %rdi
leaq -0x179(%rbp), %rsi
callq 0x1d4a0
jmp 0x193e1
leaq -0x178(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x27a(%rbp)
jmp 0x193f5
movb -0x27a(%rbp), %al
testb $0x1, %al
jne 0x19401
jmp 0x19439
jmp 0x19528
leaq -0x118(%rbp), %rdi
callq 0x1d520
jmp 0x19954
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1958d
leaq -0x188(%rbp), %rdi
callq 0x84210
jmp 0x19447
leaq 0xaf0d6(%rip), %rdx     # 0xc8524
leaq 0xaeffa(%rip), %rcx     # 0xc844f
leaq 0xaeff9(%rip), %r8      # 0xc8455
leaq -0x1b0(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x7d210
jmp 0x19471
leaq -0x1b0(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xaef6e(%rip), %rdx     # 0xc83f5
leaq -0x190(%rbp), %rdi
movl $0x1, %esi
movl $0x55, %ecx
callq 0x80580
jmp 0x1949f
leaq -0x190(%rbp), %rdi
leaq -0x188(%rbp), %rsi
callq 0x7d370
jmp 0x194b4
leaq -0x190(%rbp), %rdi
callq 0x80600
leaq -0x1b0(%rbp), %rdi
callq 0x10fc8
leaq -0x188(%rbp), %rdi
callq 0x1d500
jmp 0x19528
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1951a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1950e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x190(%rbp), %rdi
callq 0x80600
leaq -0x1b0(%rbp), %rdi
callq 0x10fc8
leaq -0x188(%rbp), %rdi
callq 0x1d500
jmp 0x1958d
leaq -0x178(%rbp), %rdi
callq 0x1d520
movl $0x1, -0x1c4(%rbp)
leaq 0xb0d91(%rip), %rsi     # 0xca2d6
leaq 0xb53ff(%rip), %rdx     # 0xce94b
leaq -0x1c0(%rbp), %rdi
leaq -0x1c4(%rbp), %rcx
leaq -0x134(%rbp), %r8
callq 0x1d5d0
jmp 0x19568
leaq -0x1c0(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x27b(%rbp)
jmp 0x1957c
movb -0x27b(%rbp), %al
testb $0x1, %al
jne 0x19588
jmp 0x195af
jmp 0x1965b
leaq -0x178(%rbp), %rdi
callq 0x1d520
jmp 0x19948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x196ce
leaq -0x1d0(%rbp), %rdi
callq 0x84210
jmp 0x195bd
leaq -0x1c0(%rbp), %rdi
callq 0x1d620
movq %rax, -0x288(%rbp)
jmp 0x195d2
movq -0x288(%rbp), %r8
leaq 0xaee15(%rip), %rdx     # 0xc83f5
leaq -0x1d8(%rbp), %rdi
movl $0x1, %esi
movl $0x56, %ecx
callq 0x80580
jmp 0x195f8
leaq -0x1d8(%rbp), %rdi
leaq -0x1d0(%rbp), %rsi
callq 0x7d370
jmp 0x1960d
leaq -0x1d8(%rbp), %rdi
callq 0x80600
leaq -0x1d0(%rbp), %rdi
callq 0x1d500
jmp 0x1965b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1964d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x80600
leaq -0x1d0(%rbp), %rdi
callq 0x1d500
jmp 0x196ce
leaq -0x1c0(%rbp), %rdi
callq 0x1d520
leaq 0xaeec1(%rip), %rsi     # 0xc852f
leaq -0x160(%rbp), %rdi
callq 0x1d470
movb %al, -0x289(%rbp)
jmp 0x19682
movb -0x289(%rbp), %al
andb $0x1, %al
movb %al, -0x1e9(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x1e8(%rbp), %rdi
leaq -0x1e9(%rbp), %rsi
callq 0x1d4a0
jmp 0x196a9
leaq -0x1e8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x28a(%rbp)
jmp 0x196bd
movb -0x28a(%rbp), %al
testb $0x1, %al
jne 0x196c9
jmp 0x196f0
jmp 0x197df
leaq -0x1c0(%rbp), %rdi
callq 0x1d520
jmp 0x19948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19844
leaq -0x1f8(%rbp), %rdi
callq 0x84210
jmp 0x196fe
leaq 0xaee31(%rip), %rdx     # 0xc8536
leaq 0xaed43(%rip), %rcx     # 0xc844f
leaq 0xaed42(%rip), %r8      # 0xc8455
leaq -0x220(%rbp), %rdi
leaq -0x1e8(%rbp), %rsi
callq 0x7d210
jmp 0x19728
leaq -0x220(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xaecb7(%rip), %rdx     # 0xc83f5
leaq -0x200(%rbp), %rdi
movl $0x1, %esi
movl $0x57, %ecx
callq 0x80580
jmp 0x19756
leaq -0x200(%rbp), %rdi
leaq -0x1f8(%rbp), %rsi
callq 0x7d370
jmp 0x1976b
leaq -0x200(%rbp), %rdi
callq 0x80600
leaq -0x220(%rbp), %rdi
callq 0x10fc8
leaq -0x1f8(%rbp), %rdi
callq 0x1d500
jmp 0x197df
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x197d1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x197c5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x80600
leaq -0x220(%rbp), %rdi
callq 0x10fc8
leaq -0x1f8(%rbp), %rdi
callq 0x1d500
jmp 0x19844
leaq -0x1e8(%rbp), %rdi
callq 0x1d520
movl $0x2, -0x234(%rbp)
leaq 0xb0aca(%rip), %rsi     # 0xca2c6
leaq 0xb5148(%rip), %rdx     # 0xce94b
leaq -0x230(%rbp), %rdi
leaq -0x234(%rbp), %rcx
leaq -0x134(%rbp), %r8
callq 0x1d5d0
jmp 0x1981f
leaq -0x230(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x28b(%rbp)
jmp 0x19833
movb -0x28b(%rbp), %al
testb $0x1, %al
jne 0x1983f
jmp 0x19866
jmp 0x19912
leaq -0x1e8(%rbp), %rdi
callq 0x1d520
jmp 0x19948
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x1993c
leaq -0x240(%rbp), %rdi
callq 0x84210
jmp 0x19874
leaq -0x230(%rbp), %rdi
callq 0x1d620
movq %rax, -0x298(%rbp)
jmp 0x19889
movq -0x298(%rbp), %r8
leaq 0xaeb5e(%rip), %rdx     # 0xc83f5
leaq -0x248(%rbp), %rdi
movl $0x1, %esi
movl $0x58, %ecx
callq 0x80580
jmp 0x198af
leaq -0x248(%rbp), %rdi
leaq -0x240(%rbp), %rsi
callq 0x7d370
jmp 0x198c4
leaq -0x248(%rbp), %rdi
callq 0x80600
leaq -0x240(%rbp), %rdi
callq 0x1d500
jmp 0x19912
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
jmp 0x19904
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x248(%rbp), %rdi
callq 0x80600
leaq -0x240(%rbp), %rdi
callq 0x1d500
jmp 0x1993c
leaq -0x230(%rbp), %rdi
callq 0x1d520
leaq -0x160(%rbp), %rdi
callq 0x1d540
leaq -0x38(%rbp), %rdi
callq 0x1d540
addq $0x2a0, %rsp            # imm = 0x2A0
popq %rbp
retq
leaq -0x230(%rbp), %rdi
callq 0x1d520
leaq -0x160(%rbp), %rdi
callq 0x1d540
leaq -0x38(%rbp), %rdi
callq 0x1d540
movq -0x60(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)