// File: /workspace/github_cpp_makefile_star2_O2/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/useBlob.cc
// Function: main
int main()
{
	Blob<string> b1; // empty Blob
	cout << b1.size() << endl;
	{  // new scope
		Blob<string> b2 = {"a", "an", "the"};
		b1 = b2;  // b1 and b2 share the same elements
		b2.push_back("about");
		cout << b1.size() << " " << b2.size() << endl;
	} // b2 is destroyed, but the elements it points to must not be destroyed
	cout << b1.size() << endl;
	for(auto p = b1.begin(); p != b1.end(); ++p)
		cout << *p << endl;

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
leaq -0x40(%rbp), %rbx
movq %rbx, %rdi
callq 0x286f
movq (%rbx), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x4c7f(%rip), %rdi      # 0x6fc0
callq 0x20c0
movq %rax, %rdi
callq 0x2090
leaq 0x1caf(%rip), %rsi      # 0x4004
leaq -0xb8(%rbp), %r14
leaq -0x29(%rbp), %rdx
movq %r14, %rdi
callq 0x2060
leaq -0x98(%rbp), %r15
leaq 0x1c90(%rip), %rsi      # 0x4006
leaq -0x2b(%rbp), %rdx
movq %r15, %rdi
callq 0x2060
leaq -0x78(%rbp), %r15
leaq 0x1c7c(%rip), %rsi      # 0x4009
leaq -0x2a(%rbp), %rdx
movq %r15, %rdi
callq 0x2060
leaq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
pushq $0x3
popq %rdx
callq 0x25ae
pushq $0x40
popq %rbx
leaq (%rbx,%rbp), %rdi
addq $-0xb8, %rdi
callq 0x2080
addq $-0x20, %rbx
cmpq $-0x20, %rbx
jne 0x23af
leaq -0x40(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x271a
leaq 0x1c30(%rip), %rsi      # 0x400d
leaq -0xb8(%rbp), %rdi
leaq -0x29(%rbp), %rdx
callq 0x2060
movq -0x58(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x2d28
leaq -0xb8(%rbp), %rdi
callq 0x2080
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x4ba1(%rip), %rdi      # 0x6fc0
callq 0x20c0
leaq 0x1be8(%rip), %rsi      # 0x4013
movq %rax, %rdi
callq 0x2110
movq -0x58(%rbp), %rcx
movq 0x8(%rcx), %rsi
subq (%rcx), %rsi
sarq $0x5, %rsi
movq %rax, %rdi
callq 0x20c0
movq %rax, %rdi
callq 0x2090
leaq -0x50(%rbp), %rdi
callq 0x2814
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x4b4f(%rip), %rdi      # 0x6fc0
callq 0x20c0
movq %rax, %rdi
callq 0x2090
leaq -0xb8(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x25d0
leaq -0x58(%rbp), %rbx
leaq -0x40(%rbp), %r15
leaq -0xb8(%rbp), %r12
movq 0x4b1c(%rip), %r13      # 0x6fc0
movq %rbx, %rdi
movq %r15, %rsi
callq 0x25fa
movq %r12, %rdi
movq %rbx, %rsi
callq 0x25ed
movl %eax, %r14d
leaq -0x50(%rbp), %rdi
callq 0x2828
testb %r14b, %r14b
je 0x24f0
movq %r12, %rdi
callq 0x2624
movq %r13, %rdi
movq %rax, %rsi
callq 0x2100
movq %rax, %rdi
callq 0x2090
movq %r12, %rdi
callq 0x26a4
jmp 0x24a4
leaq -0xb0(%rbp), %rdi
callq 0x2828
leaq -0x38(%rbp), %rdi
callq 0x2814
xorl %eax, %eax
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2579
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x2080
jmp 0x256e
jmp 0x256b
movq %rax, %rbx
pushq $0x40
popq %r14
leaq (%r14,%rbp), %rdi
addq $-0xb8, %rdi
callq 0x2080
addq $-0x20, %r14
cmpq $-0x20, %r14
jne 0x2535
jmp 0x259d
jmp 0x2553
movq %rax, %rbx
addq $-0x20, %r15
movq %r15, %rdi
callq 0x2080
cmpq %r14, %r15
jne 0x2556
jmp 0x259d
jmp 0x2579
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2814
jmp 0x259d
movq %rax, %rbx
jmp 0x259d
jmp 0x258e
movq %rax, %rbx
leaq -0x50(%rbp), %rdi
callq 0x2828
jmp 0x2591
movq %rax, %rbx
leaq -0xb0(%rbp), %rdi
callq 0x2828
leaq -0x38(%rbp), %rdi
callq 0x2814
movq %rbx, %rdi
callq 0x21c0