// File: /workspace/github_cpp_makefile_star2_O1/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 %rbx
subq $0x30, %rsp
movl $0x1, %eax
leaq 0x2c(%rsp), %r8
movl %eax, (%r8)
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x58bef(%rip), %rsi     # 0x6ffcf
leaq 0x57fa5(%rip), %rdx     # 0x6f38c
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x15aba
cmpb $0x0, (%rbx)
jne 0x1745d
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x17412
movq (%rax), %r8
jmp 0x17419
leaq 0x59bdf(%rip), %r8      # 0x70ff8
leaq 0x5767f(%rip), %rdx     # 0x6ea9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x65, %ecx
callq 0x4a84c
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1745d
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x17471
leaq 0x20(%rsp), %rdi
callq 0x156d0
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x58b4c(%rip), %rsi     # 0x6ffcf
leaq 0x57f02(%rip), %rdx     # 0x6f38c
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x15aba
cmpb $0x0, (%rbx)
jne 0x17505
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x174ba
movq (%rax), %r8
jmp 0x174c1
leaq 0x59b37(%rip), %r8      # 0x70ff8
leaq 0x575d7(%rip), %rdx     # 0x6ea9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x68, %ecx
callq 0x4a84c
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17505
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x17519
leaq 0x20(%rsp), %rdi
callq 0x156d0
leaq 0x2c(%rsp), %r8
incl (%r8)
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x58a8c(%rip), %rsi     # 0x6ffbf
leaq 0x57e52(%rip), %rdx     # 0x6f38c
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x15aba
cmpb $0x0, (%rbx)
jne 0x175b0
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x17565
movq (%rax), %r8
jmp 0x1756c
leaq 0x59a8c(%rip), %r8      # 0x70ff8
leaq 0x5752c(%rip), %rdx     # 0x6ea9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x6b, %ecx
callq 0x4a84c
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x175b0
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x175c4
leaq 0x20(%rsp), %rdi
callq 0x156d0
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x589e9(%rip), %rsi     # 0x6ffbf
leaq 0x57daf(%rip), %rdx     # 0x6f38c
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x15aba
cmpb $0x0, (%rbx)
jne 0x17658
leaq 0x8(%rsp), %rdi
callq 0x4e2e8
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x1760d
movq (%rax), %r8
jmp 0x17614
leaq 0x599e4(%rip), %r8      # 0x70ff8
leaq 0x57484(%rip), %rdx     # 0x6ea9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x6e, %ecx
callq 0x4a84c
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x481aa
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17658
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x1766c
leaq 0x20(%rsp), %rdi
callq 0x156d0
addq $0x30, %rsp
popq %rbx
retq
jmp 0x17682
jmp 0x17693
jmp 0x17682
jmp 0x176b1
jmp 0x17693
jmp 0x17682
jmp 0x176b1
jmp 0x17693
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x4a8b8
jmp 0x17696
jmp 0x176b1
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x176a6
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
jmp 0x176b4
movq %rax, %rbx
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x176c8
leaq 0x20(%rsp), %rdi
callq 0x156d0
movq %rbx, %rdi
callq 0xda70