// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r14
pushq %rbx
subq $0x30, %rsp
pushq $0x1
popq %rbp
leaq 0x2c(%rsp), %rbx
movl %ebp, (%rbx)
leaq 0x20(%rsp), %rdi
movb $0x1, -0x8(%rdi)
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %rcx
movl %ebp, (%rcx)
leaq 0x42dbf(%rip), %rsi     # 0x5803f
leaq 0x42175(%rip), %rdx     # 0x573fc
leaq 0x18(%rsp), %r14
movq %r14, %rdi
movq %rbx, %r8
callq 0x13a52
cmpb $0x0, (%r14)
jne 0x152fd
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x152b6
movq (%rax), %r8
jmp 0x152bd
leaq 0x43dad(%rip), %r8      # 0x5906a
leaq 0x41832(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x65
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x152fd
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x13646
movb $0x1, -0x8(%rbx)
leaq 0x20(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x1, (%rcx)
leaq 0x42d11(%rip), %rsi     # 0x5803f
leaq 0x420c7(%rip), %rdx     # 0x573fc
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x13a52
cmpb $0x0, (%rbx)
jne 0x153ac
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x15365
movq (%rax), %r8
jmp 0x1536c
leaq 0x43cfe(%rip), %r8      # 0x5906a
leaq 0x41783(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x68
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x153ac
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x13646
leaq 0x2c(%rsp), %r14
incl (%r14)
movb $0x1, -0x8(%rbx)
leaq 0x20(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x42c4a(%rip), %rsi     # 0x5802f
leaq 0x42010(%rip), %rdx     # 0x573fc
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
movq %r14, %r8
callq 0x13a52
cmpb $0x0, (%rbx)
jne 0x15461
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x1541a
movq (%rax), %r8
jmp 0x15421
leaq 0x43c49(%rip), %r8      # 0x5906a
leaq 0x416ce(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x6b
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15461
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rbx
movq %rbx, %rdi
callq 0x13646
movb $0x1, -0x8(%rbx)
leaq 0x20(%rsp), %rdi
andq $0x0, (%rdi)
callq 0x13646
leaq 0x8(%rsp), %rcx
movl $0x2, (%rcx)
leaq 0x42b9d(%rip), %rsi     # 0x5802f
leaq 0x41f63(%rip), %rdx     # 0x573fc
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x13a52
cmpb $0x0, (%rbx)
jne 0x15510
leaq 0x8(%rsp), %rdi
callq 0x3d5f6
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x154c9
movq (%rax), %r8
jmp 0x154d0
leaq 0x43b9a(%rip), %r8      # 0x5906a
leaq 0x4161f(%rip), %rdx     # 0x56af6
leaq 0x10(%rsp), %rdi
pushq $0x1
popq %rsi
pushq $0x6e
popq %rcx
callq 0x3b5b6
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x39b08
leaq 0x10(%rsp), %rdi
callq 0x3b616
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x15510
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
callq 0x13646
addq $0x30, %rsp
popq %rbx
popq %r14
popq %rbp
retq
jmp 0x15533
jmp 0x15544
jmp 0x15533
jmp 0x15559
jmp 0x15544
jmp 0x15533
jmp 0x15559
jmp 0x15544
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x3b616
jmp 0x15547
jmp 0x15559
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x1555c
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x1555c
movq %rax, %rbx
leaq 0x20(%rsp), %rdi
callq 0x13646
movq %rbx, %rdi
callq 0xdaa0