// File: /workspace/github_c_makefile_star2_O3/deplinenoise[P]tundra/unittest/Test_MemAllocLinear.cpp
// Function: MemAllocLinearTest_Alignmenment_Test::TestBody()
TEST_F(MemAllocLinearTest, Alignmenment)
{
  // Allocate an int, check alignment.
  int* iptr = LinearAllocate<int>(&alloc);
  ASSERT_EQ(sizeof(int), alloc.m_Offset);
  ASSERT_EQ(0, uintptr_t(iptr) & 3);

  // Allocate a character.
  LinearAllocate<char>(&alloc);
  ASSERT_EQ(sizeof(int) + sizeof(char), alloc.m_Offset);

  // Allocate another int, check alignment.
  iptr = LinearAllocate<int>(&alloc);
  ASSERT_EQ(sizeof(int) * 3, alloc.m_Offset);
  ASSERT_EQ(0, uintptr_t(iptr) & 3);
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
leaq 0x18(%rdi), %r14
movl $0x4, %esi
movl $0x4, %edx
movq %r14, %rdi
callq 0x41fb0
movq %rax, %r15
leaq 0x8(%rsp), %rcx
movq $0x4, (%rcx)
addq $0x30, %rbx
leaq 0x1af49(%rip), %rsi     # 0x5554b
leaq 0x1af26(%rip), %rdx     # 0x5552f
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbx, %r8
callq 0x3afbe
cmpb $0x0, (%r12)
je 0x3a77a
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
andl $0x3, %r15d
leaq 0x8(%rsp), %r8
movq %r15, (%r8)
leaq 0x194ea(%rip), %rsi     # 0x53b38
leaq 0x1af02(%rip), %rdx     # 0x55557
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x32e9d
cmpb $0x0, (%r15)
je 0x3a793
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x41fb0
leaq 0x8(%rsp), %rcx
movq $0x5, (%rcx)
leaq 0x1aece(%rip), %rsi     # 0x5556b
leaq 0x1ae8b(%rip), %rdx     # 0x5552f
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbx, %r8
callq 0x3afbe
cmpb $0x0, (%r15)
je 0x3a825
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
movl $0x4, %esi
movl $0x4, %edx
movq %r14, %rdi
callq 0x41fb0
movq %rax, %r14
leaq 0x8(%rsp), %rcx
movq $0xc, (%rcx)
leaq 0x1ae94(%rip), %rsi     # 0x55586
leaq 0x1ae36(%rip), %rdx     # 0x5552f
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbx, %r8
callq 0x3afbe
cmpb $0x0, (%r15)
je 0x3a8b7
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
andl $0x3, %r14d
leaq 0x8(%rsp), %r8
movq %r14, (%r8)
leaq 0x193fb(%rip), %rsi     # 0x53b38
leaq 0x1ae13(%rip), %rdx     # 0x55557
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x32e9d
cmpb $0x0, (%rbx)
jne 0x3aa12
leaq 0x8(%rsp), %rdi
callq 0x12e46
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a9b1
movq (%rax), %r8
jmp 0x3a9b8
leaq 0x8(%rsp), %rdi
callq 0x12e46
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a7b3
movq (%rax), %r8
jmp 0x3a7ba
leaq 0x8(%rsp), %rdi
callq 0x12e46
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a845
movq (%rax), %r8
jmp 0x3a84c
leaq 0x1d70d(%rip), %r8      # 0x57ec7
leaq 0x1ad4d(%rip), %rdx     # 0x5550e
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x25, %ecx
callq 0x10b64
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c00
leaq 0x10(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, 0x8(%rsp)
je 0x3a814
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x3a814
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a814
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x3aa1e
leaq 0x8(%rsp), %rdi
callq 0x12e46
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a8d0
movq (%rax), %r8
jmp 0x3a8d7
leaq 0x1d67b(%rip), %r8      # 0x57ec7
leaq 0x1acbb(%rip), %rdx     # 0x5550e
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x26, %ecx
callq 0x10b64
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c00
leaq 0x10(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, 0x8(%rsp)
je 0x3a8a6
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x3a8a6
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a8a6
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x3aa1e
leaq 0x8(%rsp), %rdi
callq 0x12e46
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3a942
movq (%rax), %r8
jmp 0x3a949
leaq 0x1d5f0(%rip), %r8      # 0x57ec7
leaq 0x1ac30(%rip), %rdx     # 0x5550e
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x2a, %ecx
callq 0x10b64
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c00
leaq 0x10(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, 0x8(%rsp)
je 0x3a931
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x3a931
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a931
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x3aa1e
leaq 0x1d57e(%rip), %r8      # 0x57ec7
leaq 0x1abbe(%rip), %rdx     # 0x5550e
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x2e, %ecx
callq 0x10b64
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c00
leaq 0x10(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, 0x8(%rsp)
je 0x3a9a3
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x3a9a3
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3a9a3
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
jmp 0x3aa1e
leaq 0x1d50f(%rip), %r8      # 0x57ec7
leaq 0x1ab4f(%rip), %rdx     # 0x5550e
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x2f, %ecx
callq 0x10b64
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c00
leaq 0x10(%rsp), %rdi
callq 0x10bd0
cmpq $0x0, 0x8(%rsp)
je 0x3aa12
movl $0x1, %edi
callq 0x10b61
testb %al, %al
je 0x3aa12
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3aa12
movq (%rdi), %rax
callq *0x8(%rax)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c37a
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3aa8f
jmp 0x3aa5c
jmp 0x3aa6b
jmp 0x3aa7a
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa5c
jmp 0x3aa6b
jmp 0x3aa7a
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa5c
jmp 0x3aa6b
jmp 0x3aa7a
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa5c
jmp 0x3aa6b
jmp 0x3aa7a
jmp 0x3aa8f
jmp 0x3aa8f
jmp 0x3aa8f
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x10bd0
jmp 0x3aa6e
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31a70
jmp 0x3aa7d
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x31a82
movq %rbx, %rdi
callq 0xcbb0
movq %rax, %rdi
callq 0x287ef
nop