// File: /workspace/github_cpp_makefile_star2_O2/f18m[P]boost-intrusive-pool/tests/unit_tests.cpp
// Function: test_allocate_methods()
void test_allocate_methods()
{
    {
        boost_intrusive_pool<dummy_two> pool;

        BOOST_REQUIRE(pool.init());

        auto o1 = pool.allocate();
        auto o2 = pool.allocate();

        // the pool constructs BOOST_INTRUSIVE_POOL_DEFAULT_POOL_SIZE items
        // and then we did not call any ctor (using allocate() nothing gets called inside
        // the dummy_two class):
        BOOST_REQUIRE_EQUAL(dummy_two::m_count, BOOST_INTRUSIVE_POOL_DEFAULT_POOL_SIZE);
    }

    // now all BOOST_INTRUSIVE_POOL_DEFAULT_POOL_SIZE items have been destroyed through
    // their dtor so the count returns to zero:
    BOOST_REQUIRE_EQUAL(dummy_two::m_count, 0);

    {
        boost_intrusive_pool<dummy_two> pool;

        BOOST_REQUIRE(pool.init());

        auto o1 = pool.allocate_through_init(3U);
        auto o2 = pool.allocate_through_init(3U);

        // the pool constructs BOOST_INTRUSIVE_POOL_DEFAULT_POOL_SIZE items
        BOOST_REQUIRE_EQUAL(dummy_two::m_count, BOOST_INTRUSIVE_POOL_DEFAULT_POOL_SIZE);
    }

    // now all BOOST_INTRUSIVE_POOL_DEFAULT_POOL_SIZE items have been destroyed through
    // their dtor so it just remains an offset = 2 in the static instance count:
    BOOST_REQUIRE_EQUAL(dummy_two::m_count, 0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1d8, %rsp            # imm = 0x1D8
leaq -0x38(%rbp), %rdi
callq 0x3312e
leaq 0x2ad71(%rip), %r14     # 0x5282d
leaq -0x200(%rbp), %rsi
movq %r14, (%rsi)
leaq 0x2ad74(%rip), %r12     # 0x52841
movq %r12, 0x8(%rsi)
leaq 0x33140(%rip), %r15     # 0x5ac18
leaq -0x1f0(%rbp), %rcx
movq %r15, (%rcx)
movq %r15, 0x8(%rcx)
movl $0x185, %edx            # imm = 0x185
callq 0x1c49e
xorps %xmm0, %xmm0
leaq -0xe0(%rbp), %r9
movaps %xmm0, (%r9)
movaps %xmm0, 0x10(%r9)
leaq -0x38(%rbp), %rdi
pushq $0x40
popq %rdx
movq %rdx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x33172
leaq -0x68(%rbp), %rdi
movb %al, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
leaq 0x2afc7(%rip), %rcx     # 0x52af2
leaq -0x50(%rbp), %rax
movq %rcx, (%rax)
leaq 0x2afc4(%rip), %rcx     # 0x52afd
movq %rcx, 0x8(%rax)
leaq -0x98(%rbp), %rsi
movb $0x0, 0x8(%rsi)
leaq 0x56ec1(%rip), %r13     # 0x7ea10
addq $0x10, %r13
movq %r13, (%rsi)
leaq 0x57e83(%rip), %rbx     # 0x7f9e0
movq %rbx, 0x10(%rsi)
movq %rax, 0x18(%rsi)
leaq -0x1e0(%rbp), %rdx
movq %r14, (%rdx)
movq %r12, 0x8(%rdx)
subq $0x10, %rsp
andq $0x0, (%rsp)
pushq $0x2
popq %r8
movl $0x185, %ecx            # imm = 0x185
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x18e5c
popq %rcx
popq %rdx
leaq -0x58(%rbp), %rdi
callq 0x35d22
leaq -0xe0(%rbp), %rdi
callq 0x332be
leaq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x332de
leaq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x332de
movq %r13, -0x78(%rbp)
leaq -0x1d0(%rbp), %rsi
movq %r14, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x1c0(%rbp), %rcx
movq %r15, (%rcx)
movq %r15, 0x8(%rcx)
movl $0x18d, %edx            # imm = 0x18D
callq 0x1c49e
leaq -0x98(%rbp), %rdi
movb $0x0, 0x8(%rdi)
leaq 0x56e54(%rip), %r13     # 0x7ea50
addq $0x10, %r13
movq %r13, (%rdi)
movq %rbx, 0x10(%rdi)
leaq 0x2a28b(%rip), %rax     # 0x51e99
movq %rax, 0x18(%rdi)
leaq -0x1b0(%rbp), %rsi
movq %r14, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x3c(%rbp), %rax
movl $0x40, (%rax)
subq $0x8, %rsp
leaq 0x2aedd(%rip), %r10     # 0x52b12
leaq 0x2af0c(%rip), %r11     # 0x52b48
leaq 0x58139(%rip), %r9      # 0x7fd7c
pushq $0x2
popq %rcx
movl $0x18d, %edx            # imm = 0x18D
movl %ecx, %r8d
pushq %r10
pushq %rax
pushq %r11
callq 0x32edd
addq $0x20, %rsp
movq %r14, %r15
leaq -0x50(%rbp), %rdi
callq 0x33364
leaq -0x68(%rbp), %r14
movq %r14, %rdi
callq 0x33364
leaq -0x38(%rbp), %rdi
callq 0x33380
leaq -0x1a0(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x190(%rbp), %rcx
leaq 0x32f7f(%rip), %rbx     # 0x5ac18
movq %rbx, (%rcx)
movq %rbx, 0x8(%rcx)
movl $0x192, %edx            # imm = 0x192
callq 0x1c49e
leaq -0x98(%rbp), %rdi
movb $0x0, 0x8(%rdi)
movq %r13, -0x70(%rbp)
movq %r13, (%rdi)
leaq 0x57d1d(%rip), %rax     # 0x7f9e0
movq %rax, 0x10(%rdi)
leaq 0x2a1cb(%rip), %rax     # 0x51e99
movq %rax, 0x18(%rdi)
leaq -0x180(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
andl $0x0, (%r14)
subq $0x8, %rsp
leaq 0x2fa10(%rip), %rax     # 0x576ff
leaq 0x58086(%rip), %r9      # 0x7fd7c
pushq $0x2
popq %rcx
movl $0x192, %edx            # imm = 0x192
movl %ecx, %r8d
pushq %rax
pushq %r14
leaq 0x2ae3d(%rip), %rax     # 0x52b48
pushq %rax
callq 0x32edd
addq $0x20, %rsp
leaq -0x38(%rbp), %rdi
callq 0x3312e
leaq -0x170(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x160(%rbp), %rcx
movq %rbx, (%rcx)
movq %rbx, 0x8(%rcx)
movl $0x197, %edx            # imm = 0x197
callq 0x1c49e
xorps %xmm0, %xmm0
leaq -0xc0(%rbp), %r9
movaps %xmm0, (%r9)
movaps %xmm0, 0x10(%r9)
leaq -0x38(%rbp), %rdi
pushq $0x40
popq %rdx
movq %rdx, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq 0x33172
leaq 0x2ad80(%rip), %rcx     # 0x52af2
leaq 0x2ad84(%rip), %rdx     # 0x52afd
movq -0x78(%rbp), %r8
leaq -0x68(%rbp), %rdi
movb %al, (%rdi)
xorps %xmm0, %xmm0
movups %xmm0, 0x8(%rdi)
movq %rcx, -0x50(%rbp)
movq %rdx, -0x48(%rbp)
leaq -0x98(%rbp), %rsi
movb $0x0, 0x8(%rsi)
movq %r8, (%rsi)
leaq 0x57c39(%rip), %rbx     # 0x7f9e0
movq %rbx, 0x10(%rsi)
leaq -0x50(%rbp), %rax
movq %rax, 0x18(%rsi)
leaq -0x150(%rbp), %rdx
movq %r15, (%rdx)
leaq 0x2aa7d(%rip), %r12     # 0x52841
movq %r12, 0x8(%rdx)
subq $0x10, %rsp
andq $0x0, (%rsp)
pushq $0x2
popq %r8
movl $0x197, %ecx            # imm = 0x197
xorl %r9d, %r9d
xorl %eax, %eax
callq 0x18e5c
popq %rcx
popq %rdx
leaq 0x32e2b(%rip), %r13     # 0x5ac18
movq -0x70(%rbp), %r14
leaq -0x58(%rbp), %rdi
callq 0x35d22
leaq -0xc0(%rbp), %rdi
callq 0x332be
leaq -0x98(%rbp), %rdx
movl $0x3, (%rdx)
leaq -0x68(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x333c6
leaq -0x98(%rbp), %rdx
movl $0x3, (%rdx)
leaq -0x50(%rbp), %rdi
leaq -0x38(%rbp), %rsi
callq 0x333c6
leaq -0x140(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
leaq -0x130(%rbp), %rcx
movq %r13, (%rcx)
movq %r13, 0x8(%rcx)
movl $0x19d, %edx            # imm = 0x19D
callq 0x1c49e
leaq -0x98(%rbp), %rdi
movb $0x0, 0x8(%rdi)
movq %r14, (%rdi)
movq %rbx, 0x10(%rdi)
leaq 0x2a020(%rip), %rax     # 0x51e99
movq %rax, 0x18(%rdi)
leaq -0x120(%rbp), %rsi
movq %r15, (%rsi)
movq %r12, 0x8(%rsi)
movl $0x40, -0x3c(%rbp)
subq $0x8, %rsp
leaq 0x57edf(%rip), %r9      # 0x7fd7c
pushq $0x2
popq %rcx
movl $0x19d, %edx            # imm = 0x19D
movl %ecx, %r8d
leaq 0x2ac63(%rip), %rax     # 0x52b12
pushq %rax
leaq -0x3c(%rbp), %rax
pushq %rax
movq %r12, %r13
movq %r15, %r12
leaq 0x2ac86(%rip), %r15     # 0x52b48
pushq %r15
callq 0x32edd
addq $0x20, %rsp
leaq -0x50(%rbp), %rdi
callq 0x33364
leaq -0x68(%rbp), %rbx
movq %rbx, %rdi
callq 0x33364
leaq -0x38(%rbp), %rdi
callq 0x33380
leaq -0x110(%rbp), %rsi
movq %r12, (%rsi)
movq %r13, 0x8(%rsi)
leaq -0x100(%rbp), %rcx
leaq 0x32d11(%rip), %rax     # 0x5ac18
movq %rax, (%rcx)
movq %rax, 0x8(%rcx)
movl $0x1a2, %edx            # imm = 0x1A2
callq 0x1c49e
leaq -0x98(%rbp), %rdi
movb $0x0, 0x8(%rdi)
movq %r14, (%rdi)
leaq 0x57ab3(%rip), %rax     # 0x7f9e0
movq %rax, 0x10(%rdi)
leaq 0x29f61(%rip), %rax     # 0x51e99
movq %rax, 0x18(%rdi)
leaq -0xf0(%rbp), %rsi
movq %r12, (%rsi)
movq %r13, 0x8(%rsi)
andl $0x0, (%rbx)
subq $0x8, %rsp
leaq 0x57e24(%rip), %r9      # 0x7fd7c
pushq $0x2
popq %rcx
movl $0x1a2, %edx            # imm = 0x1A2
movl %ecx, %r8d
leaq 0x2f795(%rip), %rax     # 0x576ff
pushq %rax
pushq %rbx
pushq %r15
callq 0x32edd
addq $0x1f8, %rsp            # imm = 0x1F8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x27f87
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x33364
jmp 0x27f98
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x33364
jmp 0x27fc7
jmp 0x27fc4
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35d22
jmp 0x27fb6
movq %rax, %rbx
leaq -0xc0(%rbp), %rdi
callq 0x332be
jmp 0x27fc7
movq %rax, %rbx
jmp 0x2800b
jmp 0x27fcb
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x33364
jmp 0x27fdc
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x33364
jmp 0x2800b
jmp 0x28008
movq %rax, %rbx
leaq -0x58(%rbp), %rdi
callq 0x35d22
jmp 0x27ffa
movq %rax, %rbx
leaq -0xe0(%rbp), %rdi
callq 0x332be
jmp 0x2800b
movq %rax, %rbx
leaq -0x38(%rbp), %rdi
callq 0x33380
movq %rbx, %rdi
callq 0xf8a0