// File: halfflat[P]tinyopt/test/test_maybe.cc
// Function: maybe_conditional_apply_Test::TestBody()
TEST(maybe, conditional_apply) {
    int c = 0;
    auto f = [&c]() { ++c; };

    EXPECT_TRUE(f << something);
    EXPECT_EQ(1, c);

    EXPECT_FALSE(f << nothing);
    EXPECT_EQ(1, c);

    EXPECT_TRUE(f << maybe<int>(22));
    EXPECT_EQ(2, c);

    EXPECT_FALSE(f << maybe<int>());
    EXPECT_EQ(2, c);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
leaq -0xc(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0xa22fe(%rip), %rdx     # 0xc8e03
leaq -0x29(%rbp), %rdi
movq %rdi, -0x210(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x27690
movq -0x210(%rbp), %rsi
xorl %eax, %eax
movl %eax, %edx
leaq -0x28(%rbp), %rdi
movq %rdi, -0x208(%rbp)
callq 0x29220
movq -0x208(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x1f9(%rbp)
jmp 0x26b48
movb -0x1f9(%rbp), %al
testb $0x1, %al
jne 0x26b54
jmp 0x26b6a
jmp 0x26c32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26c93
leaq -0x48(%rbp), %rdi
callq 0x84210
jmp 0x26b75
leaq 0xa21da(%rip), %rdx     # 0xc8d56
leaq 0xa18cc(%rip), %rcx     # 0xc844f
leaq 0xa18cb(%rip), %r8      # 0xc8455
leaq -0x70(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7d210
jmp 0x26b99
leaq -0x70(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xa1fdf(%rip), %rdx     # 0xc8b8b
leaq -0x50(%rbp), %rdi
movl $0x1, %esi
movl $0x64, %ecx
callq 0x80580
jmp 0x26bc1
leaq -0x50(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x7d370
jmp 0x26bd0
leaq -0x50(%rbp), %rdi
callq 0x80600
leaq -0x70(%rbp), %rdi
callq 0x10fc8
leaq -0x48(%rbp), %rdi
callq 0x1d500
jmp 0x26c32
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26c27
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26c1e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x50(%rbp), %rdi
callq 0x80600
leaq -0x70(%rbp), %rdi
callq 0x10fc8
leaq -0x48(%rbp), %rdi
callq 0x1d500
jmp 0x26c93
leaq -0x28(%rbp), %rdi
callq 0x1d520
movl $0x1, -0x84(%rbp)
leaq 0xa368a(%rip), %rsi     # 0xca2d6
leaq 0xa9346(%rip), %rdx     # 0xcff99
leaq -0x80(%rbp), %rdi
movq %rdi, -0x220(%rbp)
leaq -0x84(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x1d5d0
movq -0x220(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x211(%rbp)
jmp 0x26c82
movb -0x211(%rbp), %al
testb $0x1, %al
jne 0x26c8e
jmp 0x26cb2
jmp 0x26d5e
leaq -0x28(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26df6
leaq -0x90(%rbp), %rdi
callq 0x84210
jmp 0x26cc0
leaq -0x80(%rbp), %rdi
callq 0x1d620
movq %rax, -0x228(%rbp)
jmp 0x26cd2
movq -0x228(%rbp), %r8
leaq 0xa1eab(%rip), %rdx     # 0xc8b8b
leaq -0x98(%rbp), %rdi
movl $0x1, %esi
movl $0x65, %ecx
callq 0x80580
jmp 0x26cf8
leaq -0x98(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x7d370
jmp 0x26d0d
leaq -0x98(%rbp), %rdi
callq 0x80600
leaq -0x90(%rbp), %rdi
callq 0x1d500
jmp 0x26d5e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26d4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x98(%rbp), %rdi
callq 0x80600
leaq -0x90(%rbp), %rdi
callq 0x1d500
jmp 0x26df6
leaq -0x80(%rbp), %rdi
callq 0x1d520
leaq 0xa2094(%rip), %rsi     # 0xc8e02
leaq -0xab(%rbp), %rdi
movq %rdi, -0x248(%rbp)
callq 0x20de0
movq -0x248(%rbp), %rdx
leaq -0xaa(%rbp), %rdi
movq %rdi, -0x240(%rbp)
leaq -0x18(%rbp), %rsi
callq 0x27690
movq -0x240(%rbp), %rdi
callq 0x20d30
xorb $0x1, %al
movb %al, -0xa9(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0xa8(%rbp), %rdi
movq %rdi, -0x238(%rbp)
leaq -0xa9(%rbp), %rsi
callq 0x1d4a0
movq -0x238(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x229(%rbp)
jmp 0x26de5
movb -0x229(%rbp), %al
testb $0x1, %al
jne 0x26df1
jmp 0x26e15
jmp 0x26f04
leaq -0x80(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26f6b
leaq -0xb8(%rbp), %rdi
callq 0x84210
jmp 0x26e23
leaq 0xa1f3b(%rip), %rdx     # 0xc8d65
leaq 0xa1624(%rip), %rcx     # 0xc8455
leaq 0xa1617(%rip), %r8      # 0xc844f
leaq -0xe0(%rbp), %rdi
leaq -0xa8(%rbp), %rsi
callq 0x7d210
jmp 0x26e4d
leaq -0xe0(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xa1d28(%rip), %rdx     # 0xc8b8b
leaq -0xc0(%rbp), %rdi
movl $0x1, %esi
movl $0x67, %ecx
callq 0x80580
jmp 0x26e7b
leaq -0xc0(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x7d370
jmp 0x26e90
leaq -0xc0(%rbp), %rdi
callq 0x80600
leaq -0xe0(%rbp), %rdi
callq 0x10fc8
leaq -0xb8(%rbp), %rdi
callq 0x1d500
jmp 0x26f04
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26ef6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x26eea
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x80600
leaq -0xe0(%rbp), %rdi
callq 0x10fc8
leaq -0xb8(%rbp), %rdi
callq 0x1d500
jmp 0x26f6b
leaq -0xa8(%rbp), %rdi
callq 0x1d520
movl $0x1, -0xf4(%rbp)
leaq 0xa33b5(%rip), %rsi     # 0xca2d6
leaq 0xa9071(%rip), %rdx     # 0xcff99
leaq -0xf0(%rbp), %rdi
movq %rdi, -0x258(%rbp)
leaq -0xf4(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x1d5d0
movq -0x258(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x249(%rbp)
jmp 0x26f5a
movb -0x249(%rbp), %al
testb $0x1, %al
jne 0x26f66
jmp 0x26f8d
jmp 0x2703c
leaq -0xa8(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x270e9
leaq -0x100(%rbp), %rdi
callq 0x84210
jmp 0x26f9b
leaq -0xf0(%rbp), %rdi
callq 0x1d620
movq %rax, -0x260(%rbp)
jmp 0x26fb0
movq -0x260(%rbp), %r8
leaq 0xa1bcd(%rip), %rdx     # 0xc8b8b
leaq -0x108(%rbp), %rdi
movl $0x1, %esi
movl $0x68, %ecx
callq 0x80580
jmp 0x26fd6
leaq -0x108(%rbp), %rdi
leaq -0x100(%rbp), %rsi
callq 0x7d370
jmp 0x26feb
leaq -0x108(%rbp), %rdi
callq 0x80600
leaq -0x100(%rbp), %rdi
callq 0x1d500
jmp 0x2703c
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2702b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x108(%rbp), %rdi
callq 0x80600
leaq -0x100(%rbp), %rdi
callq 0x1d500
jmp 0x270e9
leaq -0xf0(%rbp), %rdi
callq 0x1d520
movl $0x16, -0x128(%rbp)
leaq -0x124(%rbp), %rdi
movq %rdi, -0x270(%rbp)
leaq -0x128(%rbp), %rsi
callq 0x20020
movq -0x270(%rbp), %rsi
leaq -0x11a(%rbp), %rdi
movq %rdi, -0x268(%rbp)
callq 0x29660
movq -0x268(%rbp), %rdx
leaq -0x119(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x27690
jmp 0x2709f
xorl %eax, %eax
movl %eax, %edx
leaq -0x118(%rbp), %rdi
leaq -0x119(%rbp), %rsi
callq 0x29220
jmp 0x270b8
leaq -0x124(%rbp), %rdi
callq 0x1d710
leaq -0x118(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x271(%rbp)
jmp 0x270d8
movb -0x271(%rbp), %al
testb $0x1, %al
jne 0x270e4
jmp 0x27128
jmp 0x27217
leaq -0xf0(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x124(%rbp), %rdi
callq 0x1d710
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2727e
leaq -0x130(%rbp), %rdi
callq 0x84210
jmp 0x27136
leaq 0xa1c35(%rip), %rdx     # 0xc8d72
leaq 0xa130b(%rip), %rcx     # 0xc844f
leaq 0xa130a(%rip), %r8      # 0xc8455
leaq -0x158(%rbp), %rdi
leaq -0x118(%rbp), %rsi
callq 0x7d210
jmp 0x27160
leaq -0x158(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xa1a15(%rip), %rdx     # 0xc8b8b
leaq -0x138(%rbp), %rdi
movl $0x1, %esi
movl $0x6a, %ecx
callq 0x80580
jmp 0x2718e
leaq -0x138(%rbp), %rdi
leaq -0x130(%rbp), %rsi
callq 0x7d370
jmp 0x271a3
leaq -0x138(%rbp), %rdi
callq 0x80600
leaq -0x158(%rbp), %rdi
callq 0x10fc8
leaq -0x130(%rbp), %rdi
callq 0x1d500
jmp 0x27217
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27209
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x271fd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x138(%rbp), %rdi
callq 0x80600
leaq -0x158(%rbp), %rdi
callq 0x10fc8
leaq -0x130(%rbp), %rdi
callq 0x1d500
jmp 0x2727e
leaq -0x118(%rbp), %rdi
callq 0x1d520
movl $0x2, -0x16c(%rbp)
leaq 0xa3092(%rip), %rsi     # 0xca2c6
leaq 0xa8d5e(%rip), %rdx     # 0xcff99
leaq -0x168(%rbp), %rdi
movq %rdi, -0x280(%rbp)
leaq -0x16c(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x1d5d0
movq -0x280(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x272(%rbp)
jmp 0x2726d
movb -0x272(%rbp), %al
testb $0x1, %al
jne 0x27279
jmp 0x272a0
jmp 0x2734f
leaq -0x118(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x273ff
leaq -0x178(%rbp), %rdi
callq 0x84210
jmp 0x272ae
leaq -0x168(%rbp), %rdi
callq 0x1d620
movq %rax, -0x288(%rbp)
jmp 0x272c3
movq -0x288(%rbp), %r8
leaq 0xa18ba(%rip), %rdx     # 0xc8b8b
leaq -0x180(%rbp), %rdi
movl $0x1, %esi
movl $0x6b, %ecx
callq 0x80580
jmp 0x272e9
leaq -0x180(%rbp), %rdi
leaq -0x178(%rbp), %rsi
callq 0x7d370
jmp 0x272fe
leaq -0x180(%rbp), %rdi
callq 0x80600
leaq -0x178(%rbp), %rdi
callq 0x1d500
jmp 0x2734f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2733e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x80600
leaq -0x178(%rbp), %rdi
callq 0x1d500
jmp 0x273ff
leaq -0x168(%rbp), %rdi
callq 0x1d520
leaq -0x19c(%rbp), %rdi
movq %rdi, -0x298(%rbp)
callq 0x1d640
movq -0x298(%rbp), %rsi
leaq -0x193(%rbp), %rdi
movq %rdi, -0x290(%rbp)
callq 0x29660
movq -0x290(%rbp), %rdx
leaq -0x192(%rbp), %rdi
leaq -0x18(%rbp), %rsi
callq 0x27690
jmp 0x273a1
leaq -0x192(%rbp), %rdi
callq 0x20d30
xorb $0x1, %al
movb %al, -0x191(%rbp)
xorl %eax, %eax
movl %eax, %edx
leaq -0x190(%rbp), %rdi
leaq -0x191(%rbp), %rsi
callq 0x1d4a0
jmp 0x273ce
leaq -0x19c(%rbp), %rdi
callq 0x1d710
leaq -0x190(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x299(%rbp)
jmp 0x273ee
movb -0x299(%rbp), %al
testb $0x1, %al
jne 0x273fa
jmp 0x2743e
jmp 0x2752d
leaq -0x168(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x19c(%rbp), %rdi
callq 0x1d710
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27594
leaq -0x1a8(%rbp), %rdi
callq 0x84210
jmp 0x2744c
leaq 0xa1933(%rip), %rdx     # 0xc8d86
leaq 0xa0ffb(%rip), %rcx     # 0xc8455
leaq 0xa0fee(%rip), %r8      # 0xc844f
leaq -0x1d0(%rbp), %rdi
leaq -0x190(%rbp), %rsi
callq 0x7d210
jmp 0x27476
leaq -0x1d0(%rbp), %rdi
callq 0x102c0
movq %rax, %r8
leaq 0xa16ff(%rip), %rdx     # 0xc8b8b
leaq -0x1b0(%rbp), %rdi
movl $0x1, %esi
movl $0x6d, %ecx
callq 0x80580
jmp 0x274a4
leaq -0x1b0(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
callq 0x7d370
jmp 0x274b9
leaq -0x1b0(%rbp), %rdi
callq 0x80600
leaq -0x1d0(%rbp), %rdi
callq 0x10fc8
leaq -0x1a8(%rbp), %rdi
callq 0x1d500
jmp 0x2752d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x2751f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27513
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1b0(%rbp), %rdi
callq 0x80600
leaq -0x1d0(%rbp), %rdi
callq 0x10fc8
leaq -0x1a8(%rbp), %rdi
callq 0x1d500
jmp 0x27594
leaq -0x190(%rbp), %rdi
callq 0x1d520
movl $0x2, -0x1e4(%rbp)
leaq 0xa2d7c(%rip), %rsi     # 0xca2c6
leaq 0xa8a48(%rip), %rdx     # 0xcff99
leaq -0x1e0(%rbp), %rdi
movq %rdi, -0x2a8(%rbp)
leaq -0x1e4(%rbp), %rcx
leaq -0xc(%rbp), %r8
callq 0x1d5d0
movq -0x2a8(%rbp), %rdi
callq 0x1d4e0
movb %al, -0x29a(%rbp)
jmp 0x27583
movb -0x29a(%rbp), %al
testb $0x1, %al
jne 0x2758f
jmp 0x275b6
jmp 0x27662
leaq -0x190(%rbp), %rdi
callq 0x1d520
jmp 0x27683
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27677
leaq -0x1f0(%rbp), %rdi
callq 0x84210
jmp 0x275c4
leaq -0x1e0(%rbp), %rdi
callq 0x1d620
movq %rax, -0x2b0(%rbp)
jmp 0x275d9
movq -0x2b0(%rbp), %r8
leaq 0xa15a4(%rip), %rdx     # 0xc8b8b
leaq -0x1f8(%rbp), %rdi
movl $0x1, %esi
movl $0x6e, %ecx
callq 0x80580
jmp 0x275ff
leaq -0x1f8(%rbp), %rdi
leaq -0x1f0(%rbp), %rsi
callq 0x7d370
jmp 0x27614
leaq -0x1f8(%rbp), %rdi
callq 0x80600
leaq -0x1f0(%rbp), %rdi
callq 0x1d500
jmp 0x27662
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
jmp 0x27654
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x38(%rbp)
movl %eax, -0x3c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x80600
leaq -0x1f0(%rbp), %rdi
callq 0x1d500
jmp 0x27677
leaq -0x1e0(%rbp), %rdi
callq 0x1d520
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
leaq -0x1e0(%rbp), %rdi
callq 0x1d520
movq -0x38(%rbp), %rdi
callq 0x10e00
nopl (%rax)