// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/unittest/Test_Buffer.cpp
// Function: BufferTest_Fill_Test::TestBody()
TEST_F(BufferTest, Fill)
{
  Buffer<int> b;

  BufferInit(&b);
  int* ptr = BufferAllocFill(&b, &heap, 3, -1);
  ASSERT_EQ(3, b.m_Size);
  ASSERT_EQ(-1, ptr[0]);
  ASSERT_EQ(-1, ptr[1]);
  ASSERT_EQ(-1, ptr[2]);
  BufferDestroy(&b, &heap);
  ASSERT_EQ(nullptr, b.m_Storage);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rdi, %rbx
addq $0x10, %rbx
leaq 0x28(%rsp), %r15
movl $0x20, %edx
movq %rbx, %rdi
xorl %esi, %esi
callq 0x41ef2
movq %rax, %r14
movq %rax, -0x8(%r15)
movq $0x8, 0x8(%r15)
movq $0x3, (%r15)
movl $0xffffffff, 0x8(%rax)  # imm = 0xFFFFFFFF
movq $-0x1, (%rax)
movq %rsp, %rcx
movl $0x3, (%rcx)
leaq 0x22e85(%rip), %rsi     # 0x55569
leaq 0x21d34(%rip), %rdx     # 0x5441f
leaq 0x10(%rsp), %r12
movq %r12, %rdi
movq %r15, %r8
callq 0x32e9d
cmpb $0x0, (%r12)
je 0x32843
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
movq %rsp, %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
leaq 0x20a54(%rip), %rsi     # 0x53176
leaq 0x21d0b(%rip), %rdx     # 0x54434
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %r8
callq 0x31b38
cmpb $0x0, (%r15)
je 0x3285a
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
movq %rsp, %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
leaq 0x4(%r14), %r8
leaq 0x20a13(%rip), %rsi     # 0x53176
leaq 0x21cd1(%rip), %rdx     # 0x5443b
leaq 0x10(%rsp), %r15
movq %r15, %rdi
callq 0x31b38
cmpb $0x0, (%r15)
je 0x328e6
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
movq %rsp, %rcx
movl $0xffffffff, (%rcx)     # imm = 0xFFFFFFFF
addq $0x8, %r14
leaq 0x209d5(%rip), %rsi     # 0x53176
leaq 0x21c9a(%rip), %rdx     # 0x54442
leaq 0x10(%rsp), %r15
movq %r15, %rdi
movq %r14, %r8
callq 0x31b38
cmpb $0x0, (%r15)
je 0x32972
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
movq 0x20(%rsp), %rsi
testq %rsi, %rsi
je 0x327f1
movq %rbx, %rdi
callq 0x41eea
xorps %xmm0, %xmm0
movaps %xmm0, 0x20(%rsp)
movq $0x0, 0x30(%rsp)
xorl %eax, %eax
movq %rsp, %r8
movq %rax, (%r8)
leaq 0x8(%rsp), %rcx
movq %rax, (%rcx)
leaq 0x21c03(%rip), %rsi     # 0x5440b
leaq 0x21c04(%rip), %rdx     # 0x54413
leaq 0x10(%rsp), %rbx
movq %rbx, %rdi
callq 0x32cf6
cmpb $0x0, (%rbx)
jne 0x32abf
movq %rsp, %rdi
callq 0x12e46
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x32a62
movq (%rax), %r8
jmp 0x32a69
movq %rsp, %rdi
callq 0x12e46
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x32878
movq (%rax), %r8
jmp 0x3287f
movq %rsp, %rdi
callq 0x12e46
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x32904
movq (%rax), %r8
jmp 0x3290b
leaq 0x25648(%rip), %r8      # 0x57ec7
leaq 0x21b6c(%rip), %rdx     # 0x543f2
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x4b, %ecx
callq 0x10b64
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c00
leaq 0x8(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, (%rsp)
je 0x328d5
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x328d5
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x328d5
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x32acb
movq %rsp, %rdi
callq 0x12e46
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x32989
movq (%rax), %r8
jmp 0x32990
leaq 0x255bc(%rip), %r8      # 0x57ec7
leaq 0x21ae0(%rip), %rdx     # 0x543f2
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x4c, %ecx
callq 0x10b64
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c00
leaq 0x8(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, (%rsp)
je 0x32961
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x32961
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x32961
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x32acb
movq %rsp, %rdi
callq 0x12e46
movq 0x18(%rsp), %rax
testq %rax, %rax
je 0x329f7
movq (%rax), %r8
jmp 0x329fe
leaq 0x25537(%rip), %r8      # 0x57ec7
leaq 0x21a5b(%rip), %rdx     # 0x543f2
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x4d, %ecx
callq 0x10b64
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c00
leaq 0x8(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, (%rsp)
je 0x329e6
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x329e6
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x329e6
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x32acb
leaq 0x254c9(%rip), %r8      # 0x57ec7
leaq 0x219ed(%rip), %rdx     # 0x543f2
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x4e, %ecx
callq 0x10b64
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c00
leaq 0x8(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, (%rsp)
je 0x32a54
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x32a54
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x32a54
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x32acb
leaq 0x2545e(%rip), %r8      # 0x57ec7
leaq 0x21982(%rip), %rdx     # 0x543f2
leaq 0x8(%rsp), %rdi
movl $0x2, %esi
movl $0x50, %ecx
callq 0x10b64
leaq 0x8(%rsp), %rdi
movq %rsp, %rsi
callq 0x10c00
leaq 0x8(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, (%rsp)
je 0x32abf
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x32abf
movq (%rsp), %rdi
testq %rdi, %rdi
je 0x32abf
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x18(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x32b3a
jmp 0x32b09
jmp 0x32b18
jmp 0x32b25
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b09
jmp 0x32b18
jmp 0x32b25
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b09
jmp 0x32b18
jmp 0x32b25
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b09
jmp 0x32b18
jmp 0x32b25
jmp 0x32b3a
jmp 0x32b3a
jmp 0x32b3a
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x10bd0
jmp 0x32b1b
movq %rax, %rbx
movq %rsp, %rdi
callq 0x31a70
jmp 0x32b28
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x31a82
movq %rbx, %rdi
callq 0xcbb0
movq %rax, %rdi
callq 0x287ef