// File: /workspace/github_c_makefile_star2_O1/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 0x42e6c
movq %rax, %r15
leaq 0x8(%rsp), %rcx
movq $0x4, (%rcx)
addq $0x30, %rbx
leaq 0x1b575(%rip), %rsi     # 0x5651b
leaq 0x1b552(%rip), %rdx     # 0x564ff
leaq 0x18(%rsp), %r12
movq %r12, %rdi
movq %rbx, %r8
callq 0x3b9ca
cmpb $0x0, (%r12)
je 0x3b11e
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
andl $0x3, %r15d
leaq 0x8(%rsp), %r8
movq %r15, (%r8)
leaq 0x19b16(%rip), %rsi     # 0x54b08
leaq 0x1b52e(%rip), %rdx     # 0x56527
leaq 0x18(%rsp), %r15
movq %r15, %rdi
callq 0x3352d
cmpb $0x0, (%r15)
je 0x3b137
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
movl $0x1, %esi
movl $0x1, %edx
movq %r14, %rdi
callq 0x42e6c
leaq 0x8(%rsp), %rcx
movq $0x5, (%rcx)
leaq 0x1b4fa(%rip), %rsi     # 0x5653b
leaq 0x1b4b7(%rip), %rdx     # 0x564ff
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbx, %r8
callq 0x3b9ca
cmpb $0x0, (%r15)
je 0x3b1d2
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
movl $0x4, %esi
movl $0x4, %edx
movq %r14, %rdi
callq 0x42e6c
movq %rax, %r14
leaq 0x8(%rsp), %rcx
movq $0xc, (%rcx)
leaq 0x1b4c0(%rip), %rsi     # 0x56556
leaq 0x1b462(%rip), %rdx     # 0x564ff
leaq 0x18(%rsp), %r15
movq %r15, %rdi
movq %rbx, %r8
callq 0x3b9ca
cmpb $0x0, (%r15)
je 0x3b26d
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
leaq 0x10(%rsp), %rcx
movl $0x0, (%rcx)
andl $0x3, %r14d
leaq 0x8(%rsp), %r8
movq %r14, (%r8)
leaq 0x19a27(%rip), %rsi     # 0x54b08
leaq 0x1b43f(%rip), %rdx     # 0x56527
leaq 0x18(%rsp), %rbx
movq %rbx, %rdi
callq 0x3352d
cmpb $0x0, (%rbx)
jne 0x3b3ea
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3b380
movq (%rax), %r8
jmp 0x3b387
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3b157
movq (%rax), %r8
jmp 0x3b15e
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3b1f2
movq (%rax), %r8
jmp 0x3b1f9
leaq 0x1dcf5(%rip), %r8      # 0x58e53
leaq 0x1b379(%rip), %rdx     # 0x564de
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x25, %ecx
callq 0x10bb8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x10(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3b1c1
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3b1b8
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b1b8
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
jmp 0x3b3f6
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3b28d
movq (%rax), %r8
jmp 0x3b294
leaq 0x1dc5a(%rip), %r8      # 0x58e53
leaq 0x1b2de(%rip), %rdx     # 0x564de
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x26, %ecx
callq 0x10bb8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x10(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3b25c
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3b253
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b253
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
jmp 0x3b3f6
leaq 0x8(%rsp), %rdi
callq 0x12eee
movq 0x20(%rsp), %rax
testq %rax, %rax
je 0x3b308
movq (%rax), %r8
jmp 0x3b30f
leaq 0x1dbbf(%rip), %r8      # 0x58e53
leaq 0x1b243(%rip), %rdx     # 0x564de
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x2a, %ecx
callq 0x10bb8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x10(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3b2f7
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3b2ee
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b2ee
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
jmp 0x3b3f6
leaq 0x1db44(%rip), %r8      # 0x58e53
leaq 0x1b1c8(%rip), %rdx     # 0x564de
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x2e, %ecx
callq 0x10bb8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x10(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3b372
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3b369
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b369
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
jmp 0x3b3f6
leaq 0x1dacc(%rip), %r8      # 0x58e53
leaq 0x1b150(%rip), %rdx     # 0x564de
leaq 0x10(%rsp), %rdi
movl $0x2, %esi
movl $0x2f, %ecx
callq 0x10bb8
leaq 0x10(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x10c56
leaq 0x10(%rsp), %rdi
callq 0x10c24
cmpq $0x0, 0x8(%rsp)
je 0x3b3ea
movl $0x1, %edi
callq 0x10bb4
testb %al, %al
je 0x3b3e1
movq 0x8(%rsp), %rdi
testq %rdi, %rdi
je 0x3b3e1
movq (%rdi), %rax
callq *0x8(%rax)
movq $0x0, 0x8(%rsp)
leaq 0x20(%rsp), %rdi
xorl %esi, %esi
callq 0x2c81c
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
jmp 0x3b467
jmp 0x3b434
jmp 0x3b443
jmp 0x3b452
jmp 0x3b467
jmp 0x3b467
jmp 0x3b467
jmp 0x3b434
jmp 0x3b443
jmp 0x3b452
jmp 0x3b467
jmp 0x3b467
jmp 0x3b467
jmp 0x3b434
jmp 0x3b443
jmp 0x3b452
jmp 0x3b467
jmp 0x3b467
jmp 0x3b467
jmp 0x3b434
jmp 0x3b443
jmp 0x3b452
jmp 0x3b467
jmp 0x3b467
jmp 0x3b467
movq %rax, %rbx
leaq 0x10(%rsp), %rdi
callq 0x10c24
jmp 0x3b446
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x31faa
jmp 0x3b455
movq %rax, %rbx
leaq 0x18(%rsp), %rdi
callq 0x31fbc
movq %rbx, %rdi
callq 0xcbb0
movq %rax, %rdi
callq 0x28baf
nop