// File: /workspace/github_cpp_makefile_star2_O3/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 $0xa8, %rsp
movl $0x28, %edi
callq 0x2120
movabsq $0x100000001, %rcx      # imm = 0x100000001
movq %rcx, 0x8(%rax)
leaq 0x3979(%rip), %rcx      # 0x5d28
movq %rcx, (%rax)
leaq 0x10(%rax), %rcx
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movq $0x0, 0x20(%rax)
movq %rax, -0x38(%rbp)
movq %rcx, -0x40(%rbp)
movq 0x3bec(%rip), %rdi      # 0x5fc0
xorl %esi, %esi
callq 0x20a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
leaq -0xb8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x1bec(%rip), %rsi      # 0x4004
leaq 0x1be6(%rip), %rdx      # 0x4005
leaq -0xc8(%rbp), %r14
movq %r14, %rdi
callq 0x2b4a
leaq -0xa8(%rbp), %r15
leaq -0x98(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x1bbf(%rip), %rsi      # 0x4006
leaq 0x1bba(%rip), %rdx      # 0x4008
movq %r15, %rdi
callq 0x2b4a
leaq -0x88(%rbp), %r15
leaq -0x78(%rbp), %r13
movq %r13, -0x10(%r13)
leaq 0x1b9d(%rip), %rsi      # 0x4009
leaq 0x1b99(%rip), %rdx      # 0x400c
movq %r15, %rdi
callq 0x2b4a
leaq -0x68(%rbp), %rcx
movq %r14, (%rcx)
movq $0x3, 0x8(%rcx)
leaq -0x48(%rbp), %rbx
movq $0x0, -0x8(%rbx)
leaq -0x50(%rbp), %rsi
leaq -0x29(%rbp), %rdx
movq %rbx, %rdi
callq 0x2be8
leaq -0x38(%rbp), %r14
movq $-0x60, %r15
movq -0x10(%r13), %rdi
cmpq %rdi, %r13
je 0x24c6
movq (%r13), %rsi
incq %rsi
callq 0x2130
addq $-0x20, %r13
addq $0x20, %r15
jne 0x24b1
movq -0x50(%rbp), %rax
movq %rax, -0x40(%rbp)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x295c
leaq -0xc8(%rbp), %rdi
movq %r12, (%rdi)
leaq 0x1b19(%rip), %rsi      # 0x400d
leaq 0x1b17(%rip), %rdx      # 0x4012
callq 0x2b4a
movq -0x50(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x2e68
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x252b
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2130
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x3a7f(%rip), %rdi      # 0x5fc0
callq 0x20a0
movq %rax, %rbx
leaq 0x1ac3(%rip), %rsi      # 0x4013
movl $0x1, %edx
movq %rax, %rdi
callq 0x2140
movq -0x50(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq %rbx, %rdi
callq 0x20a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x25ac
callq 0x29b4
movq -0x40(%rbp), %rax
movq 0x8(%rax), %rsi
subq (%rax), %rsi
sarq $0x5, %rsi
movq 0x39fe(%rip), %rdi      # 0x5fc0
callq 0x20a0
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq -0x40(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, -0xc8(%rbp)
movq %rax, -0xc0(%rbp)
testq %rax, %rax
je 0x2621
movq 0x39a5(%rip), %rcx      # 0x5fb8
cmpb $0x0, (%rcx)
je 0x261d
incl 0xc(%rax)
jmp 0x2621
lock
incl 0xc(%rax)
leaq -0xc8(%rbp), %rbx
movq $0x0, 0x10(%rbx)
leaq -0x68(%rbp), %r14
movq 0x3985(%rip), %r15      # 0x5fc0
movq 0x3976(%rip), %r13      # 0x5fb8
movq -0x40(%rbp), %rsi
movq -0x38(%rbp), %rdx
movq (%rsi), %rcx
movq 0x8(%rsi), %rax
movq %rsi, -0x68(%rbp)
movq %rdx, -0x60(%rbp)
testq %rdx, %rdx
je 0x266e
cmpb $0x0, (%r13)
je 0x266a
incl 0xc(%rdx)
jmp 0x266e
lock
incl 0xc(%rdx)
subq %rcx, %rax
sarq $0x5, %rax
movq %rax, -0x58(%rbp)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x30b2
movl %eax, %r12d
movq -0x60(%rbp), %rdi
testq %rdi, %rdi
je 0x26b7
cmpb $0x0, (%r13)
je 0x26a2
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x26ac
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x26b7
movq (%rdi), %rax
callq *0x18(%rax)
testb %r12b, %r12b
jne 0x270a
movq %rbx, %rdi
callq 0x280a
movq (%rax), %rsi
movq 0x8(%rax), %rdx
movq %r15, %rdi
callq 0x2140
movq %rax, %r12
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x2110
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20b0
movq %rbx, %rdi
callq 0x28ba
jmp 0x2642
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x273d
cmpb $0x0, (%r13)
je 0x2728
movl 0xc(%rdi), %eax
leal -0x1(%rax), %ecx
movl %ecx, 0xc(%rdi)
jmp 0x2732
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
lock
xaddl %eax, 0xc(%rdi)
cmpl $0x1, %eax
jne 0x273d
movq (%rdi), %rax
callq *0x18(%rax)
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x274b
callq 0x29b4
xorl %eax, %eax
addq $0xa8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0xc8(%rbp), %rdi
cmpq %r12, %rdi
je 0x27ca
movq -0xb8(%rbp), %rsi
incq %rsi
callq 0x2130
jmp 0x27ca
jmp 0x27c7
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
leaq -0xc8(%rbp), %rsi
callq 0x21e0
jmp 0x27f3
jmp 0x2798
movq %rax, %rbx
addq $-0x10, %r15
movq -0x10(%r15), %rdi
cmpq %rdi, %r15
je 0x27b3
movq (%r15), %rsi
incq %rsi
callq 0x2130
leaq -0x20(%r15), %rax
addq $-0x10, %r15
cmpq %r14, %r15
movq %rax, %r15
jne 0x279f
jmp 0x27f3
jmp 0x27da
movq %rax, %rbx
movq -0x48(%rbp), %rdi
testq %rdi, %rdi
je 0x27f3
callq 0x29b4
jmp 0x27f3
movq %rax, %rbx
jmp 0x27f3
movq %rax, %rbx
movq -0xc0(%rbp), %rdi
testq %rdi, %rdi
je 0x27f3
callq 0x221a
movq -0x38(%rbp), %rdi
testq %rdi, %rdi
je 0x2801
callq 0x29b4
movq %rbx, %rdi
callq 0x21b0
nop