// File: /workspace/github_cpp_makefile_star2_O3/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 0x56fa9(%rip), %rsi     # 0x6dfaf
leaq 0x55fc2(%rip), %rdx     # 0x6cfcf
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x17083
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x17038
movq (%rax), %r8
jmp 0x1703f
leaq 0x57f96(%rip), %r8      # 0x6efd5
leaq 0x55a59(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x65, %ecx
callq 0x4902a
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
leaq 0x10(%rsp), %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x17083
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x17097
leaq 0x20(%rsp), %rdi
callq 0x153ca
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x56f06(%rip), %rsi     # 0x6dfaf
leaq 0x55f1f(%rip), %rdx     # 0x6cfcf
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x1712b
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x170e0
movq (%rax), %r8
jmp 0x170e7
leaq 0x57eee(%rip), %r8      # 0x6efd5
leaq 0x559b1(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x68, %ecx
callq 0x4902a
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
leaq 0x10(%rsp), %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1712b
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x1713f
leaq 0x20(%rsp), %rdi
callq 0x153ca
leaq 0x2c(%rsp), %r8
incl (%r8)
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x56e46(%rip), %rsi     # 0x6df9f
leaq 0x55e6f(%rip), %rdx     # 0x6cfcf
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x171d6
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x1718b
movq (%rax), %r8
jmp 0x17192
leaq 0x57e43(%rip), %r8      # 0x6efd5
leaq 0x55906(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x6b, %ecx
callq 0x4902a
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
leaq 0x10(%rsp), %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x171d6
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x171ea
leaq 0x20(%rsp), %rdi
callq 0x153ca
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x56da3(%rip), %rsi     # 0x6df9f
leaq 0x55dcc(%rip), %rdx     # 0x6cfcf
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x1727e
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x17233
movq (%rax), %r8
jmp 0x1723a
leaq 0x57d9b(%rip), %r8      # 0x6efd5
leaq 0x5585e(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x6e, %ecx
callq 0x4902a
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x46a1c
leaq 0x10(%rsp), %rdi
callq 0x49096
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1727e
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x17292
leaq 0x20(%rsp), %rdi
callq 0x153ca
addq $0x30, %rsp
popq %rbx
retq
jmp 0x172a8
jmp 0x172b9
jmp 0x172a8
jmp 0x172ce
jmp 0x172b9
jmp 0x172a8
jmp 0x172ce
jmp 0x172b9
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x49096
jmp 0x172bc
jmp 0x172ce
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x172d1
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x172d1
movq %rax, %rbx
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x172e5
leaq 0x20(%rsp), %rdi
callq 0x153ca
movq %rbx, %rdi
callq 0xda70
nop