// File: /workspace/github_cpp_makefile_star2_O1/iZhangHui[P]CppPrimer/CH16_TemplatesAndGenericProgramming/examples/debug.cc
// Function: main
int main()
{
	vector<int> v = {1,2,3,4,5,6,7,8,9};
	string s("hi");
	cout << debug_rep(v) << endl;
	cout << debug_rep(s) << endl;
	cout << debug_rep("hi") << endl;
	cout << debug_rep(&v[0]) << endl;
	cout << debug_rep(&s) << endl;
	const string *sp = &s;
	cout << debug_rep(sp) << endl;

	char carr[] = "bye";            // calls pointer version if no overloads
	cout << debug_rep(carr) << endl;
	vector<string> authors = {"Proust", "Shakespeare", "Barth"};
	vector<const char*> authors2 = {"Proust", "Shakespeare", "Barth"};
	cout << debug_rep(authors) << endl;
	cout << debug_rep(authors2) << endl;
	cout << debug_rep(s) << endl;
	s += "more stuff";
	cout << debug_rep(s) << endl;
	s += "\\escape\"and quotes";
	cout << debug_rep(s) << endl;

	cout << debug_rep("hi world!") << endl; // calls debug_rep(T*)

	s = "hi";
	const char *cp = "bye";
	char arr[] = "world";

	cout << debug_rep(s) << endl;  // calls specialization debug_rep(const string&
	cout << debug_rep(cp) << endl; // calls specialization debug_rep(const char*
	cout << debug_rep(arr) << endl;// calls specialization debug_rep(char*
	cout << debug_rep(&s) << endl; // calls template debug_rep(T*)

	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movups 0x2b2c(%rip), %xmm0     # 0x5100
leaq -0x90(%rbp), %rsi
movaps %xmm0, 0x10(%rsi)
movups 0x2b0a(%rip), %xmm0     # 0x50f0
movaps %xmm0, (%rsi)
movl $0x9, 0x20(%rsi)
leaq -0xe8(%rbp), %rdi
leaq -0xb8(%rbp), %rcx
movl $0x9, %edx
callq 0x314e
leaq -0xa8(%rbp), %r12
movq %r12, -0x10(%r12)
leaq 0x29fa(%rip), %rsi      # 0x5015
leaq 0x29f5(%rip), %rdx      # 0x5017
leaq -0xb8(%rbp), %rdi
callq 0x3a2e
leaq -0x90(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
callq 0x3193
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4982(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
leaq -0x80(%rbp), %r13
movq -0x10(%r13), %rdi
cmpq %r13, %rdi
je 0x269e
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x23dc
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4912(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x270d
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq 0x2901(%rip), %rsi      # 0x5015
leaq -0x90(%rbp), %rdi
callq 0x2547
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x48a3(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x277c
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0xe8(%rbp), %rsi
leaq -0x90(%rbp), %rdi
callq 0x32aa
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4834(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x27eb
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x341a
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x47c5(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x285a
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x358a
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4756(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x28c9
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0xec(%rbp), %rsi
movl $0x657962, (%rsi)       # imm = 0x657962
leaq -0x90(%rbp), %rdi
callq 0x24d5
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x46e1(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x293e
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %r15
movq %r13, (%r15)
leaq 0x26c9(%rip), %rsi      # 0x5018
leaq 0x26c8(%rip), %rdx      # 0x501e
movq %r15, %rdi
callq 0x3a2e
leaq -0x70(%rbp), %r14
leaq -0x60(%rbp), %rax
movq %rax, -0x10(%rax)
leaq 0x26ae(%rip), %rsi      # 0x501f
leaq 0x26b2(%rip), %rdx      # 0x502a
movq %r14, %rdi
callq 0x3a2e
leaq -0x50(%rbp), %r14
leaq -0x40(%rbp), %rbx
movq %rbx, -0x10(%rbx)
leaq 0x2698(%rip), %rsi      # 0x502b
leaq 0x2696(%rip), %rdx      # 0x5030
movq %r14, %rdi
callq 0x3a2e
leaq -0x108(%rbp), %rdi
leaq -0x90(%rbp), %rsi
leaq -0xd0(%rbp), %rcx
movl $0x3, %edx
callq 0x36fa
movq $-0x60, %r14
movq -0x10(%rbx), %rdi
cmpq %rdi, %rbx
je 0x29dc
movq (%rbx), %rsi
incq %rsi
callq 0x2140
addq $-0x20, %rbx
addq $0x20, %r14
jne 0x29c8
movq 0x43bb(%rip), %rax      # 0x6da8
leaq -0x90(%rbp), %rsi
movq %rax, 0x10(%rsi)
movups 0x4399(%rip), %xmm0     # 0x6d98
movaps %xmm0, (%rsi)
leaq -0xd0(%rbp), %rdi
leaq -0x98(%rbp), %rcx
movl $0x3, %edx
callq 0x3742
leaq -0x90(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x3787
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4596(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2a89
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0xd0(%rbp), %rsi
callq 0x389e
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4527(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2af8
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x23dc
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x44b8(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2b67
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq 0x24c3(%rip), %rsi      # 0x5031
leaq -0xb8(%rbp), %rdi
callq 0x2220
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x23dc
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4436(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2be9
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq 0x244c(%rip), %rsi      # 0x503c
leaq -0xb8(%rbp), %rdi
callq 0x2220
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x23dc
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x43b4(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2c6b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq 0x23dd(%rip), %rsi      # 0x504f
leaq -0x90(%rbp), %rdi
callq 0x2547
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4345(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2cda
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0xb8(%rbp), %rdi
movq 0x8(%rdi), %rdx
leaq 0x2329(%rip), %rcx      # 0x5015
movl $0x2, %r8d
xorl %esi, %esi
callq 0x2190
movw $0x64, -0x94(%rbp)
movl $0x6c726f77, -0x98(%rbp) # imm = 0x6C726F77
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x23dc
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x42a4(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2d7b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq 0x22d7(%rip), %rsi      # 0x5059
leaq -0x90(%rbp), %rdi
callq 0x2547
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4235(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2dea
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x24d5
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x41c6(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2e59
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
leaq -0x90(%rbp), %rdi
leaq -0xb8(%rbp), %rsi
callq 0x341a
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdx
movq 0x4157(%rip), %rdi      # 0x6fd8
callq 0x2150
movq %rax, %rbx
movq (%rax), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x2120
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x20c0
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x2ec8
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x2ee3
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
leaq -0x108(%rbp), %rdi
callq 0x39b6
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x2f0a
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x2f25
movq -0xd8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
xorl %eax, %eax
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
jmp 0x2ff9
movq %rax, %rbx
jmp 0x3046
movq %rax, %rbx
leaq -0x30(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x2240
movb $0x1, %al
jmp 0x2f9b
jmp 0x2f8c
movq %rax, %rbx
xorl %eax, %eax
jmp 0x2f9b
movq %rax, %rbx
xorl %eax, %eax
movq %r15, %r14
cmpq %r14, %r15
sete %cl
orb %al, %cl
jne 0x3079
addq $-0x10, %r14
leaq -0x90(%rbp), %r15
movq -0x10(%r14), %rdi
cmpq %rdi, %r14
je 0x2fc8
movq (%r14), %rsi
incq %rsi
callq 0x2140
leaq -0x20(%r14), %rax
addq $-0x10, %r14
cmpq %r15, %r14
movq %rax, %r14
jne 0x2fb4
jmp 0x3079
jmp 0x2fe9
jmp 0x2fe9
jmp 0x2fe9
jmp 0x2fe9
jmp 0x2fe9
jmp 0x2fe9
movq %rax, %rbx
jmp 0x3079
movq %rax, %rbx
jmp 0x3094
movq %rax, %rbx
jmp 0x302b
jmp 0x3010
jmp 0x3010
jmp 0x3010
jmp 0x3010
jmp 0x3010
jmp 0x3010
jmp 0x3010
jmp 0x3010
jmp 0x3010
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x302b
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0xd0(%rbp), %rdi
testq %rdi, %rdi
je 0x3046
movq -0xc0(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
leaq -0x108(%rbp), %rdi
callq 0x39b6
jmp 0x3079
jmp 0x305e
jmp 0x305e
jmp 0x305e
jmp 0x305e
jmp 0x305e
movq %rax, %rbx
movq -0x90(%rbp), %rdi
cmpq %r13, %rdi
je 0x3079
movq -0x80(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0xb8(%rbp), %rdi
cmpq %r12, %rdi
je 0x3094
movq -0xa8(%rbp), %rsi
incq %rsi
callq 0x2140
movq -0xe8(%rbp), %rdi
testq %rdi, %rdi
je 0x30af
movq -0xd8(%rbp), %rsi
subq %rdi, %rsi
callq 0x2140
movq %rbx, %rdi
callq 0x21f0
movq %rax, %rbx
leaq -0x80(%rbp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
jne 0x306d
jmp 0x3079