// File: sgalkina[P]data_structures/src/test_map.h
// Function: void gtl::value_semantics_memory_test<gtl::vector_map<int, memcheck>>(gtl::vector_map<int, memcheck>&)
void value_semantics_memory_test(T & obj) {
  /*
   * Memcheck type has to be used in order to run this test
   */
  size_t old_counter = memcheck::get_counter();
  T obj2(obj);
  assert(memcheck::get_counter() == old_counter*2);
  T obj3(std::move(obj));
  assert(memcheck::get_counter() == old_counter*2);
  T obj4;
  obj4 = obj3;
  assert(memcheck::get_counter() == old_counter*3);
  T obj5;
  obj5 = std::move(obj3);
  assert(memcheck::get_counter() == old_counter*3);
}

// Assembly:
subq $0xd8, %rsp
movq %rdi, 0xd0(%rsp)
callq 0xd340
movq %rax, 0xc8(%rsp)
movq 0xd0(%rsp), %rsi
leaq 0xb0(%rsp), %rdi
callq 0x7c20
callq 0xd340
movq %rax, 0x20(%rsp)
jmp 0x737d
movq 0x20(%rsp), %rax
movq 0xc8(%rsp), %rcx
shlq %rcx
cmpq %rcx, %rax
jne 0x7394
jmp 0x73cc
leaq 0x6f40(%rip), %rdi      # 0xe2db
leaq 0x6f62(%rip), %rsi      # 0xe304
movl $0x45, %edx
leaq 0x7413(%rip), %rcx      # 0xe7c1
callq 0x2080
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x75fd
movq 0xd0(%rsp), %rsi
leaq 0x88(%rsp), %rdi
callq 0x7c50
jmp 0x73e3
callq 0xd340
movq %rax, 0x18(%rsp)
jmp 0x73ef
movq 0x18(%rsp), %rax
movq 0xc8(%rsp), %rcx
shlq %rcx
cmpq %rcx, %rax
jne 0x7406
jmp 0x743e
leaq 0x6ece(%rip), %rdi      # 0xe2db
leaq 0x6ef0(%rip), %rsi      # 0xe304
movl $0x47, %edx
leaq 0x73a1(%rip), %rcx      # 0xe7c1
callq 0x2080
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x75f0
leaq 0x70(%rsp), %rdi
callq 0x7230
jmp 0x744a
leaq 0x58(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x7c20
jmp 0x745e
leaq 0x70(%rsp), %rdi
leaq 0x58(%rsp), %rsi
callq 0x7cb0
jmp 0x746f
leaq 0x58(%rsp), %rdi
callq 0x7620
callq 0xd340
movq %rax, 0x10(%rsp)
jmp 0x7485
movq 0x10(%rsp), %rax
imulq $0x3, 0xc8(%rsp), %rcx
cmpq %rcx, %rax
jne 0x749a
jmp 0x74f5
leaq 0x6eb9(%rip), %rdi      # 0xe35a
leaq 0x6e5c(%rip), %rsi      # 0xe304
movl $0x4a, %edx
leaq 0x730d(%rip), %rcx      # 0xe7c1
callq 0x2080
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x75e6
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x58(%rsp), %rdi
callq 0x7620
jmp 0x75e6
leaq 0x40(%rsp), %rdi
callq 0x7230
jmp 0x7501
leaq 0x28(%rsp), %rdi
leaq 0x88(%rsp), %rsi
callq 0x7c50
jmp 0x7515
leaq 0x40(%rsp), %rdi
leaq 0x28(%rsp), %rsi
callq 0x7cb0
jmp 0x7526
leaq 0x28(%rsp), %rdi
callq 0x7620
callq 0xd340
movq %rax, 0x8(%rsp)
jmp 0x753c
movq 0x8(%rsp), %rax
imulq $0x3, 0xc8(%rsp), %rcx
cmpq %rcx, %rax
jne 0x7551
jmp 0x75a6
leaq 0x6e02(%rip), %rdi      # 0xe35a
leaq 0x6da5(%rip), %rsi      # 0xe304
movl $0x4d, %edx
leaq 0x7256(%rip), %rcx      # 0xe7c1
callq 0x2080
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
jmp 0x75dc
movq %rax, %rcx
movl %edx, %eax
movq %rcx, 0xa8(%rsp)
movl %eax, 0xa4(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x7620
jmp 0x75dc
leaq 0x40(%rsp), %rdi
callq 0x7620
leaq 0x70(%rsp), %rdi
callq 0x7620
leaq 0x88(%rsp), %rdi
callq 0x7620
leaq 0xb0(%rsp), %rdi
callq 0x7620
addq $0xd8, %rsp
retq
leaq 0x40(%rsp), %rdi
callq 0x7620
leaq 0x70(%rsp), %rdi
callq 0x7620
leaq 0x88(%rsp), %rdi
callq 0x7620
leaq 0xb0(%rsp), %rdi
callq 0x7620
movq 0xa8(%rsp), %rdi
callq 0x21a0
nopw (%rax,%rax)