// File: /workspace/github_cpp_makefile_star2_O3/halfflat[P]tinyopt/test/test_maybe.cc
// Function: maybe_conditional_assign_Test::TestBody()
TEST(maybe, conditional_assign) {
    int r = 0;

    EXPECT_TRUE(r << maybe<int>(0));
    EXPECT_EQ(0, r);

    EXPECT_TRUE(r << maybe<int>(4));
    EXPECT_EQ(4, r);

    EXPECT_TRUE(r << maybe<double>(5.3));
    EXPECT_EQ(5, r);

    EXPECT_FALSE(r << maybe<int>());
    EXPECT_EQ(5, r);
}

// Assembly:
pushq %rbx
subq $0x30, %rsp
xorl %eax, %eax
leaq 0x2c(%rsp), %r8
movl %eax, (%r8)
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x5c1b7(%rip), %rsi     # 0x72d08
leaq 0x5785c(%rip), %rdx     # 0x6e3b4
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x16bce
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x16b83
movq (%rax), %r8
jmp 0x16b8a
leaq 0x5844b(%rip), %r8      # 0x6efd5
leaq 0x55f0e(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x4a, %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 0x16bce
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x16be2
leaq 0x20(%rsp), %rdi
callq 0x153ca
movl $0x4, %eax
leaq 0x2c(%rsp), %r8
movl %eax, (%r8)
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x57e43(%rip), %rsi     # 0x6ea40
leaq 0x577b0(%rip), %rdx     # 0x6e3b4
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x16c7a
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x16c2f
movq (%rax), %r8
jmp 0x16c36
leaq 0x5839f(%rip), %r8      # 0x6efd5
leaq 0x55e62(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x4d, %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 0x16c7a
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x16c8e
leaq 0x20(%rsp), %rdi
callq 0x153ca
movl $0x5, %eax
leaq 0x2c(%rsp), %r8
movl %eax, (%r8)
leaq 0x8(%rsp), %rcx
movl %eax, (%rcx)
leaq 0x55ebf(%rip), %rsi     # 0x6cb68
leaq 0x57704(%rip), %rdx     # 0x6e3b4
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x16d26
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x16cdb
movq (%rax), %r8
jmp 0x16ce2
leaq 0x582f3(%rip), %r8      # 0x6efd5
leaq 0x55db6(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x50, %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 0x16d26
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x16d3a
leaq 0x20(%rsp), %rdi
callq 0x153ca
leaq 0x8(%rsp), %rcx
movl $0x5, (%rcx)
leaq 0x55e1c(%rip), %rsi     # 0x6cb68
leaq 0x57661(%rip), %rdx     # 0x6e3b4
leaq 0x18(%rsp), %rbx
leaq 0x2c(%rsp), %r8
movq %rbx, %rdi
callq 0x157b7
cmpb $0x0, (%rbx)
jne 0x16dce
leaq 0x8(%rsp), %rdi
callq 0x4ca86
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x16d83
movq (%rax), %r8
jmp 0x16d8a
leaq 0x5824b(%rip), %r8      # 0x6efd5
leaq 0x55d0e(%rip), %rdx     # 0x6ca9f
leaq 0x10(%rsp), %rdi
movl $0x1, %esi
movl $0x53, %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 0x16dce
movq (%rdi), %rax
callq *0x8(%rax)
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x16de2
leaq 0x20(%rsp), %rdi
callq 0x153ca
addq $0x30, %rsp
popq %rbx
retq
jmp 0x16df8
jmp 0x16e09
jmp 0x16df8
jmp 0x16e1e
jmp 0x16e09
jmp 0x16df8
jmp 0x16e1e
jmp 0x16e09
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x49096
jmp 0x16e0c
jmp 0x16e1e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x16e21
movq (%rdi), %rax
callq *0x8(%rax)
jmp 0x16e21
movq %rax, %rbx
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x16e35
leaq 0x20(%rsp), %rdi
callq 0x153ca
movq %rbx, %rdi
callq 0xda70
nop