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

  BufferInit(&b);
  int* ptr = BufferAlloc(&b, &heap, 3);

  ASSERT_EQ(3, b.m_Size);

  ptr[0] = 1;
  ptr[1] = 2;
  ptr[2] = 3;

  BufferDestroy(&b, &heap);

  ASSERT_EQ(nullptr, b.m_Storage);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq -0x20(%rbp), %rdi
movq %rdi, -0xa0(%rbp)
callq 0x50610
movq -0xa8(%rbp), %rsi
movq -0xa0(%rbp), %rdi
addq $0x10, %rsi
movl $0x3, %edx
callq 0x50780
movq %rax, -0x28(%rbp)
movl $0x3, -0x3c(%rbp)
leaq -0x18(%rbp), %r8
leaq 0x3e54d(%rip), %rsi     # 0x8daf9
leaq 0x3d3dc(%rip), %rdx     # 0x8c98f
leaq -0x38(%rbp), %rdi
movq %rdi, -0x98(%rbp)
leaq -0x3c(%rbp), %rcx
callq 0x50860
movq -0x98(%rbp), %rdi
callq 0x31090
movb %al, -0x89(%rbp)
jmp 0x4f5db
movb -0x89(%rbp), %al
testb $0x1, %al
jne 0x4f5e7
jmp 0x4f5fd
jmp 0x4f698
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f735
leaq -0x58(%rbp), %rdi
callq 0x16d70
jmp 0x4f608
leaq -0x38(%rbp), %rdi
callq 0x310b0
movq %rax, -0xb0(%rbp)
jmp 0x4f61a
movq -0xb0(%rbp), %r8
leaq 0x3d33a(%rip), %rdx     # 0x8c962
leaq -0x60(%rbp), %rdi
movl $0x2, %esi
movl $0x2c, %ecx
callq 0x13fa0
jmp 0x4f63d
leaq -0x60(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x14060
jmp 0x4f64c
leaq -0x60(%rbp), %rdi
callq 0x14020
leaq -0x58(%rbp), %rdi
callq 0x31070
movl $0x1, -0x64(%rbp)
jmp 0x4f69f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f68a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x14020
leaq -0x58(%rbp), %rdi
callq 0x31070
jmp 0x4f735
movl $0x0, -0x64(%rbp)
leaq -0x38(%rbp), %rdi
callq 0x30d20
movl -0x64(%rbp), %eax
testl %eax, %eax
je 0x4f6b6
jmp 0x4f6b1
jmp 0x4f808
movq -0xa8(%rbp), %rsi
movq -0x28(%rbp), %rax
movl $0x1, (%rax)
movq -0x28(%rbp), %rax
movl $0x2, 0x4(%rax)
movq -0x28(%rbp), %rax
movl $0x3, 0x8(%rax)
addq $0x10, %rsi
leaq -0x20(%rbp), %rdi
callq 0x506e0
movq -0x20(%rbp), %r8
leaq 0x3d286(%rip), %rsi     # 0x8c97b
leaq 0x3d287(%rip), %rdx     # 0x8c983
xorl %eax, %eax
movl %eax, %ecx
leaq -0x78(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x50640
movq -0xc0(%rbp), %rdi
callq 0x31090
movb %al, -0xb1(%rbp)
jmp 0x4f724
movb -0xb1(%rbp), %al
testb $0x1, %al
jne 0x4f730
jmp 0x4f754
jmp 0x4f7f8
leaq -0x38(%rbp), %rdi
callq 0x30d20
jmp 0x4f81a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f811
leaq -0x80(%rbp), %rdi
callq 0x16d70
jmp 0x4f75f
leaq -0x78(%rbp), %rdi
callq 0x310b0
movq %rax, -0xc8(%rbp)
jmp 0x4f771
movq -0xc8(%rbp), %r8
leaq 0x3d1e3(%rip), %rdx     # 0x8c962
leaq -0x88(%rbp), %rdi
movl $0x2, %esi
movl $0x34, %ecx
callq 0x13fa0
jmp 0x4f797
leaq -0x88(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x14060
jmp 0x4f7a9
leaq -0x88(%rbp), %rdi
callq 0x14020
leaq -0x80(%rbp), %rdi
callq 0x31070
movl $0x1, -0x64(%rbp)
jmp 0x4f7ff
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
jmp 0x4f7ed
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x48(%rbp)
movl %eax, -0x4c(%rbp)
leaq -0x88(%rbp), %rdi
callq 0x14020
leaq -0x80(%rbp), %rdi
callq 0x31070
jmp 0x4f811
movl $0x0, -0x64(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x30d20
addq $0xd0, %rsp
popq %rbp
retq
leaq -0x78(%rbp), %rdi
callq 0x30d20
movq -0x48(%rbp), %rdi
callq 0xee80
nopw %cs:(%rax,%rax)