// File: /workspace/github_cpp_makefile_star2_O2/onlyuser[P]Sandbox/test_c/c++14/main2.cpp
// Function: main
int main(int argc, char** argv)
{
    //===============
    // lhs_lvalue_ref
    //===============

    // non-const
    std::cout << "lhs_lvalue_ref(rhs_lvalue_ref())" << std::endl;
    lhs_lvalue_ref(rhs_lvalue_ref());

    std::cout << "lhs_lvalue_ref(rhs_rvalue())" << std::endl;
    std::cout << "\terror: invalid initialization of non-const reference of type ‘Foo&’ from an rvalue of type ‘Foo’" << std::endl;
    //lhs_lvalue_ref(rhs_rvalue());

    std::cout << "lhs_lvalue_ref(rhs_rvalue_ref())" << std::endl;
    std::cout << "\terror: invalid initialization of non-const reference of type ‘Foo&’ from an rvalue of type ‘std::remove_reference<Foo>::type {aka Foo}’" << std::endl;
    //lhs_lvalue_ref(rhs_rvalue_ref());

    // const
    std::cout << "lhs_const_lvalue_ref(rhs_lvalue_ref())" << std::endl;
    lhs_const_lvalue_ref(rhs_lvalue_ref());

    std::cout << "lhs_const_lvalue_ref(rhs_rvalue())" << std::endl;
    lhs_const_lvalue_ref(rhs_rvalue());

    std::cout << "lhs_const_lvalue_ref(rhs_rvalue_ref())" << std::endl;
    lhs_const_lvalue_ref(rhs_rvalue_ref());

    //===========
    // lhs_rvalue
    //===========

    // non-const
    std::cout << "lhs_rvalue(rhs_lvalue_ref())" << std::endl;
    lhs_rvalue(rhs_lvalue_ref());

    std::cout << "lhs_rvalue(rhs_rvalue())" << std::endl;
    lhs_rvalue(rhs_rvalue());

    std::cout << "lhs_rvalue(rhs_rvalue_ref())" << std::endl;
    lhs_rvalue(rhs_rvalue_ref());

    // const
    std::cout << "lhs_const_rvalue(rhs_lvalue_ref())" << std::endl;
    lhs_const_rvalue(rhs_lvalue_ref());

    std::cout << "lhs_const_rvalue(rhs_rvalue())" << std::endl;
    lhs_const_rvalue(rhs_rvalue());

    std::cout << "lhs_const_rvalue(rhs_rvalue_ref())" << std::endl;
    lhs_const_rvalue(rhs_rvalue_ref());

    //===============
    // lhs_rvalue_ref
    //===============

    // non-const
    std::cout << "lhs_rvalue_ref(rhs_lvalue_ref())" << std::endl;
    std::cout << "\terror: cannot bind ‘Foo’ lvalue to ‘Foo&&’" << std::endl;
    //lhs_rvalue_ref(rhs_lvalue_ref());

    std::cout << "lhs_rvalue_ref(rhs_rvalue())" << std::endl;
    lhs_rvalue_ref(rhs_rvalue());

    std::cout << "lhs_rvalue_ref(rhs_rvalue_ref())" << std::endl;
    lhs_rvalue_ref(rhs_rvalue_ref());

    // const
    std::cout << "lhs_const_rvalue_ref(rhs_lvalue_ref())" << std::endl;
    std::cout << "\terror: cannot bind ‘Foo’ lvalue to ‘const Foo&&’" << std::endl;
    //lhs_const_rvalue_ref(rhs_lvalue_ref());

    std::cout << "lhs_const_rvalue_ref(rhs_rvalue())" << std::endl;
    lhs_const_rvalue_ref(rhs_rvalue());

    std::cout << "lhs_const_rvalue_ref(rhs_rvalue_ref())" << std::endl;
    lhs_const_rvalue_ref(rhs_rvalue_ref());

    //=================
    // lhs_unversal_ref
    //=================

    // non-const
    std::cout << "lhs_unversal_ref(rhs_lvalue_ref())" << std::endl;
    lhs_unversal_ref(rhs_lvalue_ref());

    std::cout << "lhs_unversal_ref(rhs_rvalue())" << std::endl;
    lhs_unversal_ref(rhs_rvalue());

    std::cout << "lhs_unversal_ref(rhs_rvalue_ref())" << std::endl;
    lhs_unversal_ref(rhs_rvalue_ref());

    // const
    std::cout << "lhs_const_unversal_ref(rhs_lvalue_ref())" << std::endl;
    std::cout << "\terror: cannot bind ‘Foo’ lvalue to ‘const Foo&&’" << std::endl;
    //lhs_const_unversal_ref(rhs_lvalue_ref());

    std::cout << "lhs_const_unversal_ref(rhs_rvalue())" << std::endl;
    std::cout << "\terror: no matching function for call to ‘forward(const Foo&)" << std::endl;
    //lhs_const_unversal_ref(rhs_rvalue());

    std::cout << "lhs_const_unversal_ref(rhs_rvalue_ref())" << std::endl;
    std::cout << "\terror: no matching function for call to ‘forward(const Foo&)’" << std::endl;
    //lhs_const_unversal_ref(rhs_rvalue_ref());

    return 0;
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq 0x2c60(%rip), %rbx      # 0x3fd8
leaq 0xde6(%rip), %rsi       # 0x2165
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x11bc
callq 0x122e
leaq 0xde6(%rip), %rsi       # 0x2186
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xdec(%rip), %rsi       # 0x21a3
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xe3f(%rip), %rsi       # 0x220d
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xe49(%rip), %rsi       # 0x222e
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xec3(%rip), %rsi       # 0x22bf
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x11bc
callq 0x1285
leaq 0xec9(%rip), %rsi       # 0x22e6
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x1285
leaq 0xed0(%rip), %rsi       # 0x2309
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x1285
leaq 0xedb(%rip), %rsi       # 0x2330
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x11bc
callq 0x124b
leaq 0xed7(%rip), %rsi       # 0x234d
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x124b
leaq 0xed4(%rip), %rsi       # 0x2366
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x124b
leaq 0xed5(%rip), %rsi       # 0x2383
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x11bc
callq 0x12a2
leaq 0xed7(%rip), %rsi       # 0x23a6
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x12a2
leaq 0xeda(%rip), %rsi       # 0x23c5
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x12a2
leaq 0xee1(%rip), %rsi       # 0x23e8
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xeeb(%rip), %rsi       # 0x2409
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf08(%rip), %rsi       # 0x243d
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x1268
leaq 0xf09(%rip), %rsi       # 0x245a
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x1268
leaq 0xf0e(%rip), %rsi       # 0x247b
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf1e(%rip), %r14       # 0x24a2
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf3e(%rip), %rsi       # 0x24dc
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x12bf
leaq 0xf45(%rip), %rsi       # 0x24ff
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x12bf
leaq 0xf50(%rip), %rsi       # 0x2526
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
callq 0x11bc
leaq 0x2a6f(%rip), %rdi      # 0x4061
callq 0x16c9
leaq 0xf4b(%rip), %rsi       # 0x2549
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0x7(%rsp), %rdi
callq 0x16eb
leaq 0xf49(%rip), %rsi       # 0x2568
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0x6(%rsp), %rdi
callq 0x16eb
leaq 0xf4b(%rip), %rsi       # 0x258b
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf4a(%rip), %rsi       # 0x25b4
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf58(%rip), %rsi       # 0x25d9
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf81(%rip), %rsi       # 0x2619
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
leaq 0xf93(%rip), %rsi       # 0x2642
movq %rbx, %rdi
callq 0x1060
movq %rax, %rdi
callq 0x1030
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r14
retq