// File: halfflat[P]tinyopt/test/test_sink.cc
// Function: sink_optionalrefctor_Test::TestBody()
TEST(sink, optionalrefctor) {
    std::optional<int> oa;
    to::sink soa(oa);

    ASSERT_FALSE(oa);
    EXPECT_FALSE(soa("foo"));
    EXPECT_FALSE(oa);

    EXPECT_TRUE(soa("312"));
    EXPECT_TRUE(oa);
    EXPECT_EQ(*oa, 312);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1f0, %rsp            # imm = 0x1F0
movq %rdi, -0x8(%rbp)
leaq -0x10(%rbp), %rdi
movq %rdi, -0x1d8(%rbp)
callq 0x1d780
movq -0x1d8(%rbp), %rsi
leaq -0x30(%rbp), %rdi
callq 0x1d7a0
movq -0x1d8(%rbp), %rdi
callq 0x1d7d0
xorb $0x1, %al
movb %al, -0x41(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x40(%rbp), %rdi
leaq -0x41(%rbp), %rsi
callq 0x1d4a0
jmp 0x17f83
leaq -0x40(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1d9(%rbp)
jmp 0x17f94
movb -0x1d9(%rbp), %al
testb $0x1, %al
jne 0x17fa0
jmp 0x17fc7
jmp 0x180a8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x187f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18131
leaq -0x60(%rbp), %rdi
callq 0x84210
jmp 0x17fd2
leaq 0xb04e7(%rip), %rdx     # 0xc84c0
leaq 0xb0475(%rip), %rcx     # 0xc8455
leaq 0xb0468(%rip), %r8      # 0xc844f
leaq -0x88(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x7d210
jmp 0x17ff9
leaq -0x88(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xb03e6(%rip), %rdx     # 0xc83f5
leaq -0x68(%rbp), %rdi
movl $0x2, %esi
movl $0x2f, %ecx
callq 0x80580
jmp 0x18024
leaq -0x68(%rbp), %rdi
leaq -0x60(%rbp), %rsi
callq 0x7d370
jmp 0x18033
leaq -0x68(%rbp), %rdi
callq 0x80600
leaq -0x88(%rbp), %rdi
callq 0x10fc8
leaq -0x60(%rbp), %rdi
callq 0x1d500
movl $0x1, -0x8c(%rbp)
jmp 0x180b2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1809a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1808e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x80600
leaq -0x88(%rbp), %rdi
callq 0x10fc8
leaq -0x60(%rbp), %rdi
callq 0x1d500
jmp 0x18131
movl $0x0, -0x8c(%rbp)
leaq -0x40(%rbp), %rdi
callq 0x1d520
movl -0x8c(%rbp), %eax
testl %eax, %eax
jne 0x187d2
jmp 0x180cb
leaq 0xb0370(%rip), %rsi     # 0xc8442
leaq -0x30(%rbp), %rdi
callq 0x1d470
movb %al, -0x1da(%rbp)
jmp 0x180e3
movb -0x1da(%rbp), %al
notb %al
andb $0x1, %al
movb %al, -0xa1(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0xa0(%rbp), %rdi
leaq -0xa1(%rbp), %rsi
callq 0x1d4a0
jmp 0x1810c
leaq -0xa0(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1db(%rbp)
jmp 0x18120
movb -0x1db(%rbp), %al
testb $0x1, %al
jne 0x1812c
jmp 0x18150
jmp 0x1823f
leaq -0x40(%rbp), %rdi
callq 0x1d520
jmp 0x187f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1829a
leaq -0xb0(%rbp), %rdi
callq 0x84210
jmp 0x1815e
leaq 0xb0344(%rip), %rdx     # 0xc84a9
leaq 0xb02e9(%rip), %rcx     # 0xc8455
leaq 0xb02dc(%rip), %r8      # 0xc844f
leaq -0xd8(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
callq 0x7d210
jmp 0x18188
leaq -0xd8(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xb0257(%rip), %rdx     # 0xc83f5
leaq -0xb8(%rbp), %rdi
movl $0x1, %esi
movl $0x30, %ecx
callq 0x80580
jmp 0x181b6
leaq -0xb8(%rbp), %rdi
leaq -0xb0(%rbp), %rsi
callq 0x7d370
jmp 0x181cb
leaq -0xb8(%rbp), %rdi
callq 0x80600
leaq -0xd8(%rbp), %rdi
callq 0x10fc8
leaq -0xb0(%rbp), %rdi
callq 0x1d500
jmp 0x1823f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18231
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18225
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x80600
leaq -0xd8(%rbp), %rdi
callq 0x10fc8
leaq -0xb0(%rbp), %rdi
callq 0x1d500
jmp 0x1829a
leaq -0xa0(%rbp), %rdi
callq 0x1d520
leaq -0x10(%rbp), %rdi
callq 0x1d7d0
xorb $0x1, %al
movb %al, -0xe9(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0xe8(%rbp), %rdi
leaq -0xe9(%rbp), %rsi
callq 0x1d4a0
jmp 0x18275
leaq -0xe8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1dc(%rbp)
jmp 0x18289
movb -0x1dc(%rbp), %al
testb $0x1, %al
jne 0x18295
jmp 0x182bc
jmp 0x183ab
leaq -0xa0(%rbp), %rdi
callq 0x1d520
jmp 0x187f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1841b
leaq -0xf8(%rbp), %rdi
callq 0x84210
jmp 0x182ca
leaq 0xb01ef(%rip), %rdx     # 0xc84c0
leaq 0xb017d(%rip), %rcx     # 0xc8455
leaq 0xb0170(%rip), %r8      # 0xc844f
leaq -0x120(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x7d210
jmp 0x182f4
leaq -0x120(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xb00eb(%rip), %rdx     # 0xc83f5
leaq -0x100(%rbp), %rdi
movl $0x1, %esi
movl $0x31, %ecx
callq 0x80580
jmp 0x18322
leaq -0x100(%rbp), %rdi
leaq -0xf8(%rbp), %rsi
callq 0x7d370
jmp 0x18337
leaq -0x100(%rbp), %rdi
callq 0x80600
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0xf8(%rbp), %rdi
callq 0x1d500
jmp 0x183ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1839d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18391
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x100(%rbp), %rdi
callq 0x80600
leaq -0x120(%rbp), %rdi
callq 0x10fc8
leaq -0xf8(%rbp), %rdi
callq 0x1d500
jmp 0x1841b
leaq -0xe8(%rbp), %rdi
callq 0x1d520
leaq 0xb009c(%rip), %rsi     # 0xc845a
leaq -0x30(%rbp), %rdi
callq 0x1d470
movb %al, -0x1dd(%rbp)
jmp 0x183cf
movb -0x1dd(%rbp), %al
andb $0x1, %al
movb %al, -0x131(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x130(%rbp), %rdi
leaq -0x131(%rbp), %rsi
callq 0x1d4a0
jmp 0x183f6
leaq -0x130(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1de(%rbp)
jmp 0x1840a
movb -0x1de(%rbp), %al
testb $0x1, %al
jne 0x18416
jmp 0x1843d
jmp 0x1852c
leaq -0xe8(%rbp), %rdi
callq 0x1d520
jmp 0x187f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18573
leaq -0x140(%rbp), %rdi
callq 0x84210
jmp 0x1844b
leaq 0xb0062(%rip), %rdx     # 0xc84b4
leaq 0xafff6(%rip), %rcx     # 0xc844f
leaq 0xafff5(%rip), %r8      # 0xc8455
leaq -0x168(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x7d210
jmp 0x18475
leaq -0x168(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xaff6a(%rip), %rdx     # 0xc83f5
leaq -0x148(%rbp), %rdi
movl $0x1, %esi
movl $0x33, %ecx
callq 0x80580
jmp 0x184a3
leaq -0x148(%rbp), %rdi
leaq -0x140(%rbp), %rsi
callq 0x7d370
jmp 0x184b8
leaq -0x148(%rbp), %rdi
callq 0x80600
leaq -0x168(%rbp), %rdi
callq 0x10fc8
leaq -0x140(%rbp), %rdi
callq 0x1d500
jmp 0x1852c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1851e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18512
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x80600
leaq -0x168(%rbp), %rdi
callq 0x10fc8
leaq -0x140(%rbp), %rdi
callq 0x1d500
jmp 0x18573
leaq -0x130(%rbp), %rdi
callq 0x1d520
xorl %eax, %eax
movl %eax, %edx
leaq -0x178(%rbp), %rdi
leaq -0x10(%rbp), %rsi
callq 0x1d7f0
jmp 0x1854e
leaq -0x178(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1df(%rbp)
jmp 0x18562
movb -0x1df(%rbp), %al
testb $0x1, %al
jne 0x1856e
jmp 0x18595
jmp 0x18684
leaq -0x130(%rbp), %rdi
callq 0x1d520
jmp 0x187f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x186ee
leaq -0x180(%rbp), %rdi
callq 0x84210
jmp 0x185a3
leaq 0xaff16(%rip), %rdx     # 0xc84c0
leaq 0xafe9e(%rip), %rcx     # 0xc844f
leaq 0xafe9d(%rip), %r8      # 0xc8455
leaq -0x1a8(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x7d210
jmp 0x185cd
leaq -0x1a8(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xafe12(%rip), %rdx     # 0xc83f5
leaq -0x188(%rbp), %rdi
movl $0x1, %esi
movl $0x34, %ecx
callq 0x80580
jmp 0x185fb
leaq -0x188(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x7d370
jmp 0x18610
leaq -0x188(%rbp), %rdi
callq 0x80600
leaq -0x1a8(%rbp), %rdi
callq 0x10fc8
leaq -0x180(%rbp), %rdi
callq 0x1d500
jmp 0x18684
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x18676
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x1866a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x80600
leaq -0x1a8(%rbp), %rdi
callq 0x10fc8
leaq -0x180(%rbp), %rdi
callq 0x1d500
jmp 0x186ee
leaq -0x178(%rbp), %rdi
callq 0x1d520
leaq -0x10(%rbp), %rdi
callq 0x1d830
movq %rax, %rcx
movl $0x138, -0x1bc(%rbp)    # imm = 0x138
leaq 0xafe12(%rip), %rsi     # 0xc84bf
leaq 0xafda6(%rip), %rdx     # 0xc845a
leaq -0x1b8(%rbp), %rdi
leaq -0x1bc(%rbp), %r8
callq 0x1d5d0
jmp 0x186c9
leaq -0x1b8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1e0(%rbp)
jmp 0x186dd
movb -0x1e0(%rbp), %al
testb $0x1, %al
jne 0x186e9
jmp 0x18710
jmp 0x187bc
leaq -0x178(%rbp), %rdi
callq 0x1d520
jmp 0x187f0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x187e4
leaq -0x1c8(%rbp), %rdi
callq 0x84210
jmp 0x1871e
leaq -0x1b8(%rbp), %rdi
callq 0x1d620
movq %rax, -0x1e8(%rbp)
jmp 0x18733
movq -0x1e8(%rbp), %r8
leaq 0xafcb4(%rip), %rdx     # 0xc83f5
leaq -0x1d0(%rbp), %rdi
movl $0x1, %esi
movl $0x35, %ecx
callq 0x80580
jmp 0x18759
leaq -0x1d0(%rbp), %rdi
leaq -0x1c8(%rbp), %rsi
callq 0x7d370
jmp 0x1876e
leaq -0x1d0(%rbp), %rdi
callq 0x80600
leaq -0x1c8(%rbp), %rdi
callq 0x1d500
jmp 0x187bc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x187ae
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x1d0(%rbp), %rdi
callq 0x80600
leaq -0x1c8(%rbp), %rdi
callq 0x1d500
jmp 0x187e4
leaq -0x1b8(%rbp), %rdi
callq 0x1d520
movl $0x0, -0x8c(%rbp)
leaq -0x30(%rbp), %rdi
callq 0x1d540
addq $0x1f0, %rsp            # imm = 0x1F0
popq %rbp
retq
leaq -0x1b8(%rbp), %rdi
callq 0x1d520
leaq -0x30(%rbp), %rdi
callq 0x1d540
movq -0x50(%rbp), %rdi
callq 0x10e00
nopw %cs:(%rax,%rax)